/*
Theme Name:        Patrimoines-Médias
Theme URI:         https://patrimoines-medias.fr
Description:       Thème enfant GeneratePress pour patrimoines-medias.fr — investissement, optimisation fiscale, expatriation, immobilier, indépendance financière. Audience : entrepreneurs, investisseurs, digital nomads francophones.
Author:            Patrimoines-Médias
Author URI:        https://patrimoines-medias.fr
Template:          generatepress
Version:           1.0.0
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       patrimoines-medias
Tags:              patrimoine, investissement, editorial, generatepress-child
*/

/* ==========================================================================
   CSS Custom Properties — Design System Patrimoines-Médias
   Toutes les valeurs de design sont définies ici.
   Pour surcharger via le Customizer, voir inc/customizer.php.
   ========================================================================== */

:root {
    /* --- Couleurs --- */
    --pm-color-primary:           #0f2421; /* vert nuit — titres, fonds sombres */
    --pm-color-primary-text:      #ffffff; /* texte sur fond primaire */
    --pm-color-secondary:         #775a19; /* ambre/or — catégories, accents */
    --pm-color-secondary-light:   #fed488; /* ambre clair — hover, tags */
    --pm-color-background:        #f9f9f9; /* fond global */
    --pm-color-surface:           #ffffff; /* cartes, nav */
    --pm-color-surface-alt:       #eeeeee; /* sections alternées */
    --pm-color-border:            #c2c8c5; /* bordures légères */
    --pm-color-text:              #1a1c1c; /* texte courant */
    --pm-color-text-muted:        #424846; /* texte secondaire */

    /* --- Typographie --- */
    --pm-font-body:      'Manrope', sans-serif;
    --pm-font-heading:   'Noto Serif', serif;

    --pm-text-body:      16px;
    --pm-text-body-lg:   18px;
    --pm-text-label:     13px;
    --pm-text-h3:        24px;
    --pm-text-h2:        32px;
    --pm-text-h1:        48px;

    /* --- Layout --- */
    --pm-container:      1280px;
    --pm-padding-x:      40px;
    --pm-gap:            24px;
    --pm-section-gap:    80px;

    /* --- Divers --- */
    --pm-transition:     0.3s ease;
    --pm-shadow-card:    0 20px 50px rgba(0, 0, 0, 0.06);
    --pm-nav-height:     80px;
}

@media (max-width: 768px) {
    :root {
        --pm-padding-x:   20px;
        --pm-text-h1:     32px;
        --pm-text-h2:     24px;
        --pm-text-h3:     20px;
        --pm-section-gap: 48px;
    }
}

/* ==========================================================================
   Reset GeneratePress
   On remplace les polices et couleurs GP par nos variables CSS.
   On ne désactive pas les fonctionnalités GP (layouts, responsive, etc.).
   ========================================================================== */

/* Police de base — remplace la police GP par défaut */
body,
.entry-content,
.entry-summary,
p {
    font-family: var(--pm-font-body);
    font-size: var(--pm-text-body);
    line-height: 1.6;
    color: var(--pm-color-text);
}

body {
    background-color: var(--pm-color-background);
}
.main-title{font-family: var(--pm-font-heading)}
/* Titres — Noto Serif pour toute la hiérarchie */
h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.widget-title {
    font-family: var(--pm-font-heading);
    color: var(--pm-color-primary);
    line-height: 1.3;
}

h1 { font-size: var(--pm-text-h1); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: var(--pm-text-h2); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
h3 { font-size: var(--pm-text-h3); font-weight: 600; line-height: 1.4; }
h4 { font-size: 20px; font-weight: 600; }

/* Liens globaux */
a {
    color: var(--pm-color-primary);
    text-decoration: none;
    transition: color var(--pm-transition);
}
a:hover { color: var(--pm-color-secondary); }

/* Liens dans le contenu éditorial */
.entry-content a {
    color: var(--pm-color-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.entry-content a:hover { color: var(--pm-color-primary); }

/* Container GP — aligne sur notre système */
.grid-container {
    max-width: var(--pm-container);
    padding-left: var(--pm-padding-x);
    padding-right: var(--pm-padding-x);
}

/* GP : supprimer les couleurs de fond GP par défaut sur la nav */
.main-navigation a,
.main-navigation .menu-item > a {
    font-family: var(--pm-font-heading);
    color: var(--pm-color-primary);
}

/* GP : boutons */
.button,
button,
input[type="submit"],
input[type="button"] {
    font-family: var(--pm-font-body);
    border-radius: 0;
}

/* GP : sidebar widgets */
.sidebar .widget-title {
    font-size: 13px;
    font-family: var(--pm-font-body);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--pm-color-secondary);
}

/* ==========================================================================
   Utilitaires globaux partagés entre tous les templates
   ========================================================================== */

.pm-container {
    max-width: var(--pm-container);
    margin: 0 auto;
    padding: 0 var(--pm-padding-x);
}

/* Étiquette typographique (catégorie, rubrique, label) */
.pm-label {
    font-family: var(--pm-font-body);
    font-size: var(--pm-text-label);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pm-text-secondary { color: var(--pm-color-secondary); }
.pm-text-muted     { color: var(--pm-color-text-muted); }
.pm-text-primary   { color: var(--pm-color-primary); }

/* Séparateur visuel */
.pm-divider {
    display: inline-block;
    width: 8px;
    height: 1px;
    background-color: var(--pm-color-border);
    vertical-align: middle;
    margin: 0 8px;
}

/* Grille 3 colonnes générique */
.pm-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--pm-gap);
}

@media (max-width: 900px) {
    .pm-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
   .inside-header {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        padding: 0 16px;
        min-height: 64px;
    }

    .site-branding-container {
        flex: 1;
        margin: 0 !important;
        padding: 0 !important;
    }

    .mobile-menu-control-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        flex-shrink: 0;
    }

    /* La nav prend toute la largeur et passe à la ligne */
    nav#site-navigation {
        flex-basis: 100%;
        width: 100%;
        order: 3;
    }
	 /* Cache le contenu de la nav par défaut */
    nav#site-navigation .inside-navigation {
        display: none;
    }

    /* L'affiche quand GP ajoute .toggled au clic du hamburger */
    nav#site-navigation.toggled .inside-navigation {
        display: block;
    }
}

@media (max-width: 600px) {
    .pm-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Accessibilité : skip link */
.pm-skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--pm-color-primary);
    color: var(--pm-color-primary-text);
    padding: 8px 16px;
    z-index: 1000;
    transition: top var(--pm-transition);
}
.pm-skip-link:focus { top: 0; }

/* Screen reader only */
.pm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/*mailerlite sidebar*/
.mailerlite-form .mailerlite-form-field {
    margin-bottom: 10px;
    text-align: center;
}