/*
Theme Name: Margelle Melisse
Template: generatepress
Version: 1.0.0
Description: Custom theme for Les mains qui parlent
*/

/* ---------------------------------------------------------------
   Tokens — palette terracotta-warm, spacing compact, width standard,
   radius none (sharp), shadow dramatic, signature sig-D
   (right sidebar / one container / nav above header).
   --------------------------------------------------------------- */
:root {
    --mme-primary: #B45309;
    --mme-primary-deep: #8A3F07;   /* 4.46:1 on the warm tint is under AA; this is 6.68 */
    --mme-secondary: #D97706;
    --mme-accent: #CA8A04;
    --mme-warm: #FAF0E6;
    --mme-surface: #FFFBEB;
    --mme-bg: #FFFFFF;
    --mme-ink: #1C1917;
    --mme-ink-2: #57534E;
    --mme-rule: #F5E6D0;
    --mme-nav: #7C2D12;            /* nav-above-header ground, 9.37:1 against white */
    --mme-nav-ink: #FBE9D3;
    --mme-radius: 0px;             /* border_radius token "none" */
    --mme-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --mme-gap-section: 2rem;
    --mme-gap-block: 1rem;
    --mme-pad: 1rem;
    --mme-measure: 900px;          /* content width token "standard" */
}

/* Trait éditorial lisible en mobile */
@media (max-width: 1024px) {
    .inside-navigation::before {
        content: "La surdité, la langue des signes et les aides auditives vues par quelqu'un qui apprend, pas par quelqu'un qui enseigne.";
        font-style: italic;
        position: absolute;
        left: 16px;
        /* Measured, not guessed: the logotype box ends at y=86 (184px wide at the
           441x125 intrinsic ratio, plus GP's own 10px padding), and the toggle
           occupies y 28-78 in the right 52px. Sitting the line at y=92 clears
           both, so it can run the full width instead of being squeezed into a
           column beside the hamburger. */
        right: 16px;
        top: 92px;
        font-size: 10px;
        line-height: 1.3;
        color: var(--mme-ink-2);
    }
    .inside-navigation { position: relative; }
}

/* ---------------------------------------------------------------
   Logo — 2x combination PNG (signing-hand mark + two-line wordmark),
   intrinsic 441 x 125 (ratio 3.53), so 220px wide renders 62px tall.
   Width is pinned so the flex row cannot shrink-to-fit the anchor;
   height is left to the intrinsic ratio, because pinning both has
   been measured to clip the glyph band.
   --------------------------------------------------------------- */
.site-logo { flex: 0 0 auto; }

.site-header .site-logo a   { display: block; width: 220px; }
.site-header .site-logo img {
    width: 220px !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
}

/* ---------------------------------------------------------------
   Navigation — sig-D puts it above the header, so it is the first
   band on the page and carries the dark terracotta ground.
   --------------------------------------------------------------- */
.main-navigation { border-bottom: 3px solid var(--mme-primary); }

.main-navigation .main-nav > ul > li > a {
    font-family: 'Poppins', system-ui, sans-serif;
    letter-spacing: 0.015em;
}

/* ---------------------------------------------------------------
   Mobile header (GP Menu Plus, breakpoint 1024). The module folds
   the logotype into the navigation row, which carries the dark
   terracotta ground; the bar is repainted light here so the ink
   wordmark keeps its contrast, and stacked so the editorial line
   sits beneath the logotype rather than across it.
   --------------------------------------------------------------- */
@media (max-width: 1024px) {
    #mobile-header,
    #mobile-header .inside-navigation {
        background-color: var(--mme-bg);
        border-bottom: 2px solid var(--mme-primary);
    }

    #mobile-header .inside-navigation {
        position: relative;
        min-height: 134px;
        padding-bottom: 34px;
    }

    #mobile-header .site-logo {
        flex: 0 0 auto;
        display: block;
        margin-top: 14px;
        align-self: flex-start;
    }
    #mobile-header .site-logo a   { display: block; width: 184px; }
    #mobile-header .site-logo img {
        width: 184px !important;
        height: auto !important;
        max-width: none !important;
        max-height: none !important;
    }

    #mobile-header .menu-toggle,
    #mobile-header .menu-toggle:hover,
    #mobile-header .menu-toggle:focus {
        position: absolute !important;
        right: 0 !important;
        top: 28px;
        background-color: transparent;
        color: var(--mme-ink);
        z-index: 4;
    }

    /* GP can drop a search item into the nav that overlays the toggle
       and swallows the tap. */
    #mobile-header .search-item { display: none; }

    #mobile-header #mobile-menu { margin-top: 28px; }
    #mobile-header #mobile-menu a {
        color: var(--mme-ink);
        border-top: 1px solid var(--mme-rule);
    }
}

/* ---------------------------------------------------------------
   Front page — compact-tagline hero. One band: the §10 heading and
   the editorial line under it, nothing else above the fold. Sharp
   corners, a thick left rule, no card.
   --------------------------------------------------------------- */
.mme-bandeau {
    background-color: var(--mme-surface);
    border-top: 1px solid var(--mme-rule);
    border-bottom: 1px solid var(--mme-rule);
    border-left: 8px solid var(--mme-primary);
    padding: 1.5rem 1.7rem 1.6rem;
    margin-bottom: var(--mme-gap-section);
}

.site-tagline-heading {
    display: block;
    margin: 0 0 0.55rem;
    padding: 0;
    font-size: 1.62rem;
    line-height: 1.26;
    color: var(--mme-ink);
}

.mme-bandeau__ligne {
    margin: 0;
    font-size: 1rem;
    line-height: 1.62;
    color: var(--mme-ink-2);
    font-style: italic;
}

.mme-chapeau {
    font-size: 1.01rem;
    line-height: 1.8;
    color: var(--mme-ink);
    margin: 0 0 var(--mme-gap-section);
}

/* ---------------------------------------------------------------
   Section headings on the front page (§10 "Les nouveautés")
   --------------------------------------------------------------- */
.mme-titre-section {
    font-size: 1.2rem;
    margin: 0 0 var(--mme-gap-block);
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--mme-primary);
    letter-spacing: 0.01em;
    line-height: 1.3;
}

/* ---------------------------------------------------------------
   Article rail — [mme_dernieres]. Rule-separated rows rather than
   cards: sig-D is one-container, so boxing each entry would fight
   the single wrap the signature is built on.
   --------------------------------------------------------------- */
.mme-rail {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--mme-gap-section);
}

.mme-note {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
    padding: 1.05rem 0;
    border-bottom: 1px solid var(--mme-rule);
}

.mme-note:first-child { padding-top: 0; }

.mme-note__vue {
    flex: 0 0 150px;
    max-width: 150px;
    display: block;
    line-height: 0;
    box-shadow: var(--mme-shadow);
}

.mme-note__vue img {
    width: 100%;
    height: 106px;
    object-fit: cover;
    display: block;
    border-radius: var(--mme-radius);
}

.mme-note__corps {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.mme-note__sujet {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--mme-primary-deep);
    margin-bottom: 0.35rem;
}

.mme-note h3 {
    font-size: 1.04rem;
    line-height: 1.36;
    margin: 0 0 0.4rem;
}

.mme-note h3 a { color: var(--mme-ink); text-decoration: none; }
.mme-note h3 a:hover { color: var(--mme-primary-deep); }

.mme-note p {
    font-size: 0.9rem;
    line-height: 1.62;
    color: var(--mme-ink-2);
    margin: 0 0 0.75rem;
}

.mme-lien {
    margin-top: auto;
    align-self: flex-start;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--mme-primary-deep);
    text-decoration: none;
    border-bottom: 2px solid var(--mme-rule);
    padding-bottom: 2px;
}

.mme-lien:hover { color: var(--mme-nav); border-bottom-color: var(--mme-primary); }

/* ---------------------------------------------------------------
   Subject rail — [mme_sujets]. Sharp blocks on the warm tint, the
   shadow token doing the separation the radius token cannot.
   --------------------------------------------------------------- */
.mme-sujets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: var(--mme-gap-block);
    margin-bottom: var(--mme-gap-section);
}

.mme-sujet {
    background-color: var(--mme-warm);
    border-top: 4px solid var(--mme-primary);
    border-radius: var(--mme-radius);
    padding: 1rem 1.15rem 1.1rem;
    box-shadow: var(--mme-shadow);
}

.mme-sujet h3 { font-size: 0.98rem; margin: 0 0 0.4rem; line-height: 1.3; }
.mme-sujet h3 a { color: var(--mme-ink); text-decoration: none; }
.mme-sujet h3 a:hover { color: var(--mme-primary-deep); }
.mme-sujet p { font-size: 0.87rem; line-height: 1.6; color: var(--mme-ink-2); margin: 0; }

/* ---------------------------------------------------------------
   Post signature + author card
   --------------------------------------------------------------- */
.mme-signature {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0.35rem 0 1.35rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--mme-rule);
    font-size: 0.88rem;
    color: var(--mme-ink-2);
}

.mme-signature img { border-radius: 50%; display: block; }
.mme-signature a { color: var(--mme-primary-deep); text-decoration: none; }
.mme-signature a:hover { text-decoration: underline; }

.mme-carte-auteur {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    margin-top: var(--mme-gap-section);
    padding: 1.25rem 1.35rem;
    background-color: var(--mme-surface);
    border-left: 5px solid var(--mme-primary);
    border-radius: var(--mme-radius);
    box-shadow: var(--mme-shadow);
}

.mme-carte-auteur img { border-radius: 50%; flex: 0 0 auto; display: block; }
.mme-carte-auteur strong { font-family: 'Poppins', system-ui, sans-serif; font-size: 0.98rem; }
.mme-carte-auteur strong a { color: var(--mme-ink); text-decoration: none; }
.mme-carte-auteur strong a:hover { color: var(--mme-primary-deep); }
.mme-carte-auteur p { margin: 0.35rem 0 0; font-size: 0.88rem; line-height: 1.62; color: var(--mme-ink-2); }

/* ---------------------------------------------------------------
   Running text
   --------------------------------------------------------------- */
.single .entry-content, .page .entry-content { font-size: 1.01rem; line-height: 1.8; }

.entry-content h2 {
    margin-top: 2.2rem;
    font-size: 1.34rem;
    line-height: 1.3;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--mme-rule);
}

.entry-content h3 { margin-top: 1.65rem; font-size: 1.1rem; line-height: 1.35; }

.entry-content a { color: var(--mme-primary); }
.entry-content a:hover { color: var(--mme-primary-deep); }

.entry-content blockquote {
    border-left: 5px solid var(--mme-primary);
    background-color: var(--mme-warm);
    border-radius: var(--mme-radius);
    padding: 0.95rem 1.15rem;
    margin-left: 0;
    font-style: normal;
    color: var(--mme-ink);
}

.entry-content ul, .entry-content ol { line-height: 1.75; }

/* ---------------------------------------------------------------
   Archive / index listing (one-container, right sidebar). No cards —
   entries are separated by rules so the single wrap stays readable.
   --------------------------------------------------------------- */
.page-header { margin-bottom: var(--mme-gap-block); }

.page-header .page-title {
    font-size: 1.46rem;
    margin: 0;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--mme-primary);
    line-height: 1.3;
}

.one-container .site-main > article {
    padding-bottom: 1.4rem;
    margin-bottom: 1.4rem;
    border-bottom: 1px solid var(--mme-rule);
}

.one-container .site-main > article:last-of-type { border-bottom: 0; }

.blog .post-image img, .archive .post-image img {
    border-radius: var(--mme-radius);
    box-shadow: var(--mme-shadow);
}

.entry-title a { text-decoration: none; }
.entry-title a:hover { color: var(--mme-primary-deep); }

.entry-meta { font-size: 0.85rem; color: var(--mme-ink-2); }
.entry-meta a { color: var(--mme-primary-deep); }

.paging-navigation {
    padding-top: 1.2rem;
    border-top: 2px solid var(--mme-rule);
}

/* ---------------------------------------------------------------
   Sidebar (sig-D: right). Widget titles come from §10.
   --------------------------------------------------------------- */
.sidebar .widget {
    background-color: var(--mme-surface);
    border-top: 3px solid var(--mme-primary);
    border-radius: var(--mme-radius);
    padding: 1rem 1.15rem 1.1rem;
    margin-bottom: var(--mme-gap-block);
}

.sidebar .widget .widget-title {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--mme-primary-deep);
    margin: 0 0 0.7rem;
}

.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { margin: 0 0 0.5rem; font-size: 0.9rem; line-height: 1.45; }
.sidebar .widget li a { color: var(--mme-ink); text-decoration: none; }
.sidebar .widget li a:hover { color: var(--mme-primary-deep); text-decoration: underline; }

.sidebar .search-field, .widget .search-field {
    width: 100%;
    border: 1px solid #D9C4A4;
    border-radius: var(--mme-radius);
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
}

.sidebar .search-field:focus, .widget .search-field:focus {
    border-color: var(--mme-primary);
    outline: 2px solid var(--mme-secondary);
}

/* ---------------------------------------------------------------
   Footer — single-line-light, no headings (§10: footer headings none)
   --------------------------------------------------------------- */
.site-footer { background-color: var(--mme-surface); border-top: 3px solid var(--mme-primary); }

.site-footer .footer-widgets { display: none; }

.site-info {
    text-align: center;
    font-size: 0.85rem;
    color: var(--mme-ink-2);
    padding-top: 1.15rem;
    padding-bottom: 1.15rem;
}

.site-info a { color: var(--mme-primary-deep); text-decoration: none; }
.site-info a:hover { text-decoration: underline; }

.footer-bar, .inside-site-info { justify-content: center; }

.mme-pied-nav ul {
    list-style: none;
    margin: 0 0 0.6rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1.3rem;
}

.mme-pied-nav li { margin: 0; }

.mme-pied-nav a {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.82rem;
    color: var(--mme-ink-2);
    text-decoration: none;
}

.mme-pied-nav a:hover { color: var(--mme-primary-deep); text-decoration: underline; }

/* ---------------------------------------------------------------
   Contact form — the submit button carries the palette primary, not
   the plugin's grey default. Gated by contact-form-render.cjs.
   --------------------------------------------------------------- */
body .wpcf7-submit,
body input.wpcf7-submit,
body button.wpforms-submit,
body .ff-btn-submit {
    background-color: #B45309 !important;
    color: #ffffff !important;
    border-radius: var(--mme-radius) !important;
    border: none !important;
    font-family: 'Poppins', system-ui, sans-serif !important;
    font-weight: 700 !important;
    padding: 0.7rem 1.5rem !important;
}

body .wpcf7-submit:hover,
body input.wpcf7-submit:hover,
body button.wpforms-submit:hover,
body .ff-btn-submit:hover {
    background-color: #8A3F07 !important;
    color: #ffffff !important;
}

.wpcf7 input[type=text],
.wpcf7 input[type=email],
.wpcf7 select,
.wpcf7 textarea {
    border: 1px solid #D9C4A4 !important;
    border-radius: var(--mme-radius) !important;
    width: 100%;
}

.wpcf7 input[type=text]:focus,
.wpcf7 input[type=email]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
    border-color: var(--mme-primary) !important;
    outline: 2px solid var(--mme-secondary);
}

.wpcf7 label { display: block; font-size: 0.92rem; margin-bottom: 0.9rem; }

/* ---------------------------------------------------------------
   404 (§10: heading "404")
   --------------------------------------------------------------- */
.mme-404 { max-width: var(--mme-measure); }
.mme-404 h1 {
    font-size: 2.6rem;
    margin: 0 0 0.7rem;
    color: var(--mme-primary);
    letter-spacing: 0.02em;
}
.mme-404 p { font-size: 1.01rem; line-height: 1.75; }
.mme-404 a { color: var(--mme-primary); }
.mme-404 .search-form { margin-top: 1.3rem; }

/* ---------------------------------------------------------------
   Presentation page — about-inline-circle (§10). Higher specificity
   than .entry-content img, which would otherwise win on source order
   and square the portrait off.
   --------------------------------------------------------------- */
.mme-portrait-cercle {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin: 0 0 1.5rem;
    padding-bottom: 1.3rem;
    border-bottom: 1px solid var(--mme-rule);
}

.entry-content .mme-portrait-cercle img {
    flex: 0 0 132px;
    width: 132px;
    height: 132px;
    border-radius: 50% !important;
    object-fit: cover;
    box-shadow: var(--mme-shadow);
    display: block;
    margin: 0;
}

.mme-portrait-cercle figcaption,
.mme-portrait-cercle .mme-portrait-cercle__legende {
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--mme-ink-2);
    margin: 0;
}

.mme-signature-fin {
    margin-top: 1.6rem;
    font-style: italic;
    color: var(--mme-ink-2);
}

/* ---------------------------------------------------------------
   Small screens
   --------------------------------------------------------------- */
@media (max-width: 768px) {
    :root { --mme-gap-section: 1.6rem; }
    .site-tagline-heading { font-size: 1.3rem; }
    .mme-bandeau { padding: 1.2rem 1.2rem 1.3rem; }
    .mme-note { flex-direction: column; }
    .mme-note__vue { flex: 0 0 auto; max-width: 100%; width: 100%; }
    .mme-note__vue img { height: 184px; }
    .mme-carte-auteur { flex-direction: column; }
    .mme-portrait-cercle { flex-direction: column; align-items: flex-start; }
}
