/*
Theme Name: Feuillée Cassis
Theme URI:
Author: Ce que mange Élise
Description: Habillage enfant GeneratePress — colonne latérale gauche, navigation sous l'en-tête, palette cassis, duo Libre Baskerville / Poppins.
Template: generatepress
Version: 1.0
Text Domain: feuillee-cassis
*/

@import url("./assets/fonts/fonts.css");

/* ---------------------------------------------------------------------------
   Jetons — brief §10. Les valeurs vivent ici et nulle part ailleurs, pour que
   la relecture d'une seule déclaration suffise à vérifier un jeton.
   palette berry-vivid · rayon moderate · ombre none · espacement spacious
   --------------------------------------------------------------------------- */
:root {
    --fc-primaire: #7C3AED;
    --fc-primaire-fonce: #5B21B6;
    --fc-primaire-profond: #4C1D95;
    --fc-texte: #2E1065;
    --fc-texte-second: #585069;
    --fc-fond: #FFFFFF;
    --fc-fond-doux: #F6F2FD;
    --fc-bordure: #E6DEF8;

    --fc-rayon: 8px;              /* border_radius = moderate */
    --fc-ombre: none;             /* shadow_style = none */
    --fc-ecart-section: 6rem;     /* spacing_system = spacious */
    --fc-ecart-bloc: 2rem;
    --fc-marge-conteneur: 3rem;
}

/* ---------------------------------------------------------------------------
   Typographie — Libre Baskerville au courant du texte, Poppins aux titres.
   --------------------------------------------------------------------------- */
body,
.entry-content,
button,
input,
select,
textarea {
    font-family: 'Libre Baskerville', Georgia, serif;
    color: var(--fc-texte);
}

h1, h2, h3, h4, h5, h6,
.site-title,
.main-navigation a,
.widget-title,
.entry-title {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.01em;
}

h1, h2, h3 {
    color: var(--fc-texte);
}

h2 { color: var(--fc-primaire-profond); }
h3 { color: var(--fc-primaire-fonce); }

a {
    color: var(--fc-primaire-fonce);
}
a:hover,
a:focus {
    color: var(--fc-primaire);
}

/* ---------------------------------------------------------------------------
   Rythme spacious — l'écart entre sections est le signe le plus visible du
   jeton ; il s'applique aux titres de niveau 2 du corps d'article.
   --------------------------------------------------------------------------- */
.entry-content > h2 {
    margin-top: var(--fc-ecart-section);
    margin-bottom: var(--fc-ecart-bloc);
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--fc-bordure);
}
.entry-content > h3 {
    margin-top: calc(var(--fc-ecart-section) / 2);
    margin-bottom: 0.9rem;
}
.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > figure,
.entry-content > table {
    margin-bottom: var(--fc-ecart-bloc);
}
.entry-content {
    font-size: 1.0625rem;
    line-height: 1.75;
}
.entry-content ul,
.entry-content ol {
    padding-left: 1.4rem;
}
.entry-content li {
    margin-bottom: 0.5rem;
}
.entry-content blockquote {
    margin: var(--fc-ecart-bloc) 0;
    padding: 1.1rem 1.4rem;
    border-left: 4px solid var(--fc-primaire);
    background: var(--fc-fond-doux);
    border-radius: var(--fc-rayon);
    font-style: normal;
}
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.94rem;
}
.entry-content table th,
.entry-content table td {
    border: 1px solid var(--fc-bordure);
    padding: 0.55rem 0.75rem;
    text-align: left;
}
.entry-content table th {
    background: var(--fc-fond-doux);
    color: var(--fc-texte);
}

/* Conteneurs séparés — rayon moderate, aucune ombre. */
.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.separate-containers .paging-navigation,
.one-container .site-content,
.inside-page-header {
    border-radius: var(--fc-rayon);
    box-shadow: var(--fc-ombre);
    border: 1px solid var(--fc-bordure);
}

/* ---------------------------------------------------------------------------
   En-tête et navigation — sig-B : barre de navigation SOUS l'en-tête, fond
   clair. Le logotype reste donc sur blanc, y compris dans la barre mobile que
   GP Menu Plus fusionne avec la navigation.
   --------------------------------------------------------------------------- */
.site-header {
    border-bottom: 1px solid var(--fc-bordure);
}
.main-navigation {
    border-bottom: 1px solid var(--fc-bordure);
}
.main-navigation a {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}
.main-navigation .main-nav ul li.current-menu-item > a {
    border-bottom: 2px solid var(--fc-primaire);
}

/* ---------------------------------------------------------------------------
   Colonne latérale GAUCHE — GeneratePress rend la zone sidebar-2 pour la
   disposition left-sidebar, pas sidebar-1. Les trois widgets du §10 y vivent.
   --------------------------------------------------------------------------- */
.inside-left-sidebar .widget {
    background: var(--fc-fond-doux);
    border: 1px solid var(--fc-bordure);
    border-radius: var(--fc-rayon);
    padding: 1.1rem 1.2rem;
    margin-bottom: var(--fc-ecart-bloc);
}
.inside-left-sidebar .widget-title {
    font-size: 1rem;
    margin-bottom: 0.7rem;
    color: var(--fc-texte);
}
.inside-left-sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.inside-left-sidebar .widget ul li {
    padding: 0.28rem 0;
    border-bottom: 1px dotted var(--fc-bordure);
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.92rem;
}
.inside-left-sidebar .widget ul li:last-child {
    border-bottom: 0;
}
.inside-left-sidebar .search-field {
    width: 100%;
}

/* Bloc bio du widget « Qui suis-je ». */
.fc-bio__portrait {
    display: block;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin: 0 0 0.7rem;
    object-fit: cover;
}
.fc-bio__texte {
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0 0 0.6rem;
}
.fc-bio__lien {
    margin: 0;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.88rem;
}

/* ---------------------------------------------------------------------------
   Accueil — hero featured-post (APPENDIX-E §featured-post).
   --------------------------------------------------------------------------- */
.fc-titre-accueil {
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 0 0 var(--fc-ecart-bloc);
    padding: 0 0 0.6rem;
    border-bottom: 2px solid var(--fc-primaire);
    color: var(--fc-texte);
}

.fc-hero-une,
.fc-recents,
.fc-rubriques {
    margin-bottom: var(--fc-ecart-section);
}
.fc-hero-une__chapeau,
.fc-recents__chapeau,
.fc-rubriques__chapeau {
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fc-texte-second);
    margin: 0 0 var(--fc-ecart-bloc);
}
.fc-hero-une__billet {
    border: 1px solid var(--fc-bordure);
    border-radius: var(--fc-rayon);
    overflow: hidden;
    background: var(--fc-fond);
}
.fc-hero-une__media {
    display: block;
}
.fc-hero-une__image {
    display: block;
    width: 100%;
    height: auto;
}
.fc-hero-une__corps {
    padding: 1.3rem 1.4rem 1.5rem;
}
.fc-hero-une__titre {
    font-size: 1.45rem;
    line-height: 1.25;
    margin: 0 0 0.45rem;
}
.fc-hero-une__titre a {
    color: var(--fc-texte);
}
.fc-hero-une__titre a:hover {
    color: var(--fc-primaire);
}
.fc-hero-une__meta,
.fc-carte__meta {
    display: block;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.82rem;
    color: var(--fc-texte-second);
    margin-bottom: 0.7rem;
}
.fc-hero-une__extrait {
    margin: 0 0 1rem;
}
.fc-hero-une__lien,
.fc-carte__lien {
    display: inline-block;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fc-primaire-fonce);
}
.fc-hero-une__lien::after,
.fc-carte__lien::after {
    content: " →";
}

.fc-cartes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--fc-ecart-bloc);
}
.fc-carte {
    border: 1px solid var(--fc-bordure);
    border-radius: var(--fc-rayon);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--fc-fond);
}
.fc-carte__vignette {
    display: block;
    width: 100%;
    height: auto;
}
.fc-carte__corps {
    padding: 0.95rem 1.05rem 1.15rem;
}
.fc-carte__titre {
    font-size: 1.05rem;
    line-height: 1.3;
    margin: 0 0 0.35rem;
}
.fc-carte__titre a {
    color: var(--fc-texte);
}
.fc-carte__titre a:hover {
    color: var(--fc-primaire);
}
.fc-carte__extrait {
    font-size: 0.93rem;
    line-height: 1.6;
    margin: 0 0 0.75rem;
}

.fc-rubriques__rangee {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fc-ecart-bloc);
}
.fc-rubrique {
    flex: 1 1 200px;
    background: var(--fc-fond-doux);
    border: 1px solid var(--fc-bordure);
    border-radius: var(--fc-rayon);
    padding: 1rem 1.1rem;
}
.fc-rubrique__titre {
    font-size: 1rem;
    margin: 0 0 0.4rem;
}
.fc-rubrique__resume {
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0 0 0.5rem;
}
.fc-rubrique__compte {
    margin: 0;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.82rem;
    color: var(--fc-texte-second);
}

/* ---------------------------------------------------------------------------
   Page « Qui écrit ici ? » — structure about-left-float (§10) : le portrait
   flotte à gauche du premier paragraphe.
   --------------------------------------------------------------------------- */
.fc-apropos__portrait {
    float: left;
    width: 180px;
    height: auto;
    margin: 0 1.6rem 1.1rem 0;
    border-radius: var(--fc-rayon);
}
.fc-apropos::after {
    content: "";
    display: block;
    clear: both;
}

/* ---------------------------------------------------------------------------
   Carte de signature en fin de billet.
   --------------------------------------------------------------------------- */
.fc-signature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-top: var(--fc-ecart-bloc);
    padding: 1.1rem 1.2rem;
    background: var(--fc-fond-doux);
    border: 1px solid var(--fc-bordure);
    border-radius: var(--fc-rayon);
}
.fc-signature__portrait {
    border-radius: 50%;
    flex: 0 0 64px;
    object-fit: cover;
}
.fc-signature__nom {
    margin: 0 0 0.25rem;
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 600;
}
.fc-signature__mot {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--fc-texte-second);
}

/* ---------------------------------------------------------------------------
   Pied single-line-light — une ligne claire : liens légaux puis droits.
   §10 footer headings = none, donc aucune zone de widgets (setting = 0).
   --------------------------------------------------------------------------- */
.site-footer {
    background: var(--fc-fond-doux);
    border-top: 1px solid var(--fc-bordure);
}
.site-info {
    display: none;   /* la ligne du pied est rendue par fc-pied */
}
.fc-pied {
    background: var(--fc-fond-doux);
    padding: 1.1rem var(--fc-marge-conteneur);
}
.fc-pied__ligne {
    max-width: 1020px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1.4rem;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.86rem;
    color: var(--fc-texte-second);
}
.fc-pied__liens {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.fc-pied__liens a {
    color: var(--fc-primaire-fonce);
}
.fc-pied__liens a:hover {
    color: var(--fc-primaire);
}
.fc-pied__droits {
    white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Boutons de formulaire — Turnstile et le formulaire de contact héritent du
   bouton GP ; la règle ci-dessous garantit le contraste AA sur le primaire.
   --------------------------------------------------------------------------- */
body .wpcf7-submit,
body input[type="submit"],
body button[type="submit"] {
    background-color: var(--fc-primaire) !important;
    color: #FFFFFF !important;
    border: 0 !important;
    border-radius: var(--fc-rayon) !important;
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 600;
    padding: 0.7rem 1.4rem !important;
}
body .wpcf7-submit:hover,
body input[type="submit"]:hover,
body button[type="submit"]:hover {
    background-color: var(--fc-primaire-fonce) !important;
}
.wpcf7-form label {
    display: block;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.92rem;
    margin-bottom: 0.9rem;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    width: 100%;
    border: 1px solid var(--fc-bordure);
    border-radius: var(--fc-rayon);
    padding: 0.55rem 0.7rem;
}

/* Logo — largeur fixée pour que la barre mobile ne le réduise pas à zéro. */
.site-logo img,
#mobile-header .site-logo img {
    max-width: 100%;
    height: auto;
}

/* ---------------------------------------------------------------------------
   Signature mobile — rappel du slogan dans la barre de navigation.
   Repère de marque responsive (phrase 47 du dictionnaire de variance
   APPENDIX-A). Élément décoratif distinct du slogan GeneratePress, qui reste
   masqué (hide_tagline = 1) : il s'agit d'un ::before posé sur la barre, à
   gauche du bouton hamburger. Vérifié par mobile-tagline.cjs.
   --------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .inside-navigation {
        position: relative;
    }
    /* GP Menu Plus fusionne logo et navigation dans #mobile-header. La barre
       reste claire pour que le logotype en encre cassis garde son contraste. */
    #mobile-header,
    #mobile-header .inside-navigation {
        background-color: var(--fc-fond);
        border-bottom: 1px solid var(--fc-bordure);
    }
    #mobile-header .menu-toggle,
    #mobile-header .menu-toggle:hover,
    #mobile-header .menu-toggle:focus {
        background-color: transparent;
        color: var(--fc-texte);
    }
    /* La barre doit être assez haute pour le logotype sur deux lignes : avec
       la hauteur d'item héritée de GP elle tombait à 17 px et rognait le logo. */
    #mobile-header .inside-navigation {
        min-height: 58px;
        display: flex;
        align-items: center;
    }
    #mobile-header .site-logo {
        display: flex;
        align-items: center;
    }
    #mobile-header .site-logo img {
        width: 102px;
        height: auto;
    }
    #mobile-header .menu-toggle {
        min-height: 58px;
        display: flex;
        align-items: center;
    }
    .inside-navigation::before {
        content: "Manger mieux, comprendre pourquoi";
        position: absolute;
        left: 122px;
        top: 50%;
        transform: translateY(-50%);
        max-width: 29%;
        font-family: 'Libre Baskerville', Georgia, serif;
        font-style: italic;
        font-size: 9.5px;
        line-height: 1.25;
        color: var(--fc-texte-second);
        pointer-events: none;
    }
    .fc-cartes {
        grid-template-columns: 1fr;
    }
    .fc-pied__ligne {
        justify-content: flex-start;
    }
    .fc-apropos__portrait {
        float: none;
        display: block;
        width: 150px;
        margin: 0 0 1rem;
    }
    .fc-titre-accueil {
        font-size: 1.25rem;
    }
}

/* Bouton retour en haut (§10 scroll-to-top = yes). */
.generate-back-to-top {
    background-color: var(--fc-primaire-profond);
    color: #FFFFFF;
    border-radius: var(--fc-rayon);
}
.generate-back-to-top:hover,
.generate-back-to-top:focus {
    background-color: var(--fc-primaire);
    color: #FFFFFF;
}
