/*
Theme Name: Linteau Sarriette
Template: generatepress
Version: 1.0.0
Description: Custom theme for Copeaux du Nord
*/

/* ---------------------------------------------------------------
   Tokens — palette ocean-deep, spacing compact, width standard,
   radius rounded (16px), shadow dramatic, signature sig-A
   (right sidebar / separate containers / nav below header).
   --------------------------------------------------------------- */
:root {
    --lsa-primary: #1A56DB;
    --lsa-primary-deep: #123E9E;
    --lsa-secondary: #6B7280;
    --lsa-accent: #3B82F6;
    --lsa-accent-warm: #E8EEF8;
    --lsa-surface: #EFF6FF;
    --lsa-bg: #FFFFFF;
    --lsa-ink: #1F2937;
    --lsa-ink-2: #55606E;        /* 6B7280 falls under AA on --lsa-surface */
    --lsa-rule: #E5E7EB;
    --lsa-dark: #16202E;         /* single-line-dark footer ground */
    --lsa-dark-ink: #D8E2F2;
    --lsa-radius: 16px;
    --lsa-radius-sm: 8px;
    --lsa-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --lsa-gap-section: 2rem;
    --lsa-gap-block: 1rem;
    --lsa-pad: 1rem;
    --lsa-measure: 900px;        /* content width token "standard" */
}

/* Empreinte de ligne éditoriale mobile */
@media (max-width: 1024px) {
    .inside-navigation::before {
        content: "Un regard amateur sur le bois, la charpente et la maison — depuis le Nord.";
        font-style: italic;
        position: absolute;
        left: 16px;
        /* clears the toggle, which sits in the right 96px of the bar */
        right: 106px;
        top: 58px;
        font-size: 10px;
        line-height: 1.3;
        color: var(--lsa-ink-2);
    }
    .inside-navigation { position: relative; }
}

/* ---------------------------------------------------------------
   Logo — 2x wordmark PNG, intrinsic 910 x 130 (ratio 7.0).
   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 on Chrome.
   --------------------------------------------------------------- */
.site-logo { flex: 0 0 auto; }

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

/* ---------------------------------------------------------------
   Mobile header (GP Menu Plus, breakpoint 1024). The module folds
   the logotype into the navigation row, which carries the dark
   navigation 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(--lsa-bg);
        border-bottom: 1px solid var(--lsa-rule);
    }

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

    #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: 214px; }
    #mobile-header .site-logo img {
        width: 214px !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(--lsa-ink);
        z-index: 3;
    }

    /* GP drops a search item into the nav that overlays the toggle and
       swallows the tap; it is pushed behind and shrunk to the icon. */
    #mobile-header .nav-search-enabled .menu-toggle { z-index: 4; }
    #mobile-header .search-item { display: none; }

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

/* ---------------------------------------------------------------
   Front page — compact-tagline hero. One band: the §10 heading,
   the editorial line under it, nothing above the fold but those.
   --------------------------------------------------------------- */
.lsa-bandeau {
    background-color: var(--lsa-surface);
    border-left: 6px solid var(--lsa-primary);
    border-radius: var(--lsa-radius);
    padding: 1.4rem 1.6rem 1.5rem;
    margin-bottom: var(--lsa-gap-section);
}

.site-tagline-heading {
    display: block;
    margin: 0 0 0.5rem;
    padding: 0;
    font-size: 1.68rem;
    line-height: 1.25;
    color: var(--lsa-ink);
}

.lsa-bandeau__ligne {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.6;
    color: var(--lsa-ink-2);
    font-style: italic;
}

.lsa-chapeau {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--lsa-ink);
    margin: 0 0 var(--lsa-gap-section);
}

/* ---------------------------------------------------------------
   Section headings on the front page (§10 "Fraîchement publié")
   --------------------------------------------------------------- */
.lsa-titre-section {
    font-size: 1.24rem;
    margin: 0 0 var(--lsa-gap-block);
    padding-left: 0.75rem;
    border-left: 4px solid var(--lsa-primary);
    line-height: 1.3;
}

/* ---------------------------------------------------------------
   Article rail — [lsa_derniers]. Stacked rows rather than a card
   grid: the right sidebar already carves the measure down.
   --------------------------------------------------------------- */
.lsa-rail {
    display: flex;
    flex-direction: column;
    gap: var(--lsa-gap-block);
    margin-bottom: var(--lsa-gap-section);
}

.lsa-bille {
    display: flex;
    gap: 1.1rem;
    align-items: stretch;
    background-color: var(--lsa-bg);
    border: 1px solid var(--lsa-rule);
    border-radius: var(--lsa-radius);
    box-shadow: var(--lsa-shadow);
    overflow: hidden;
}

.lsa-bille__vue {
    flex: 0 0 34%;
    max-width: 34%;
    display: block;
    line-height: 0;
}

.lsa-bille__vue img {
    width: 100%;
    height: 100%;
    min-height: 148px;
    object-fit: cover;
    display: block;
}

.lsa-bille__corps {
    flex: 1 1 auto;
    padding: 1rem 1.15rem 1.1rem 0;
    display: flex;
    flex-direction: column;
}

.lsa-bille--nue .lsa-bille__corps { padding-left: 1.15rem; }

.lsa-bille__domaine {
    font-family: 'PT Sans', system-ui, sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--lsa-primary);
    margin-bottom: 0.4rem;
}

.lsa-bille h3 {
    font-size: 1.06rem;
    line-height: 1.34;
    margin: 0 0 0.45rem;
}

.lsa-bille h3 a { color: var(--lsa-ink); text-decoration: none; }
.lsa-bille h3 a:hover { color: var(--lsa-primary); }

.lsa-bille p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--lsa-ink-2);
    margin: 0 0 0.85rem;
}

.lsa-lien {
    margin-top: auto;
    align-self: flex-start;
    font-family: 'PT Sans', system-ui, sans-serif;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--lsa-primary);
    text-decoration: none;
    border-bottom: 2px solid var(--lsa-accent-warm);
    padding-bottom: 2px;
}

.lsa-lien:hover { color: var(--lsa-primary-deep); border-bottom-color: var(--lsa-primary); }

/* ---------------------------------------------------------------
   Category rail — [lsa_domaines]
   --------------------------------------------------------------- */
.lsa-domaines {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--lsa-gap-block);
    margin-bottom: var(--lsa-gap-section);
}

.lsa-domaine {
    background-color: var(--lsa-surface);
    border-radius: var(--lsa-radius);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--lsa-shadow);
}

.lsa-domaine h3 { font-size: 1rem; margin: 0 0 0.4rem; }
.lsa-domaine h3 a { color: var(--lsa-ink); text-decoration: none; }
.lsa-domaine h3 a:hover { color: var(--lsa-primary); }
.lsa-domaine p { font-size: 0.89rem; line-height: 1.6; color: var(--lsa-ink-2); margin: 0; }

/* ---------------------------------------------------------------
   Post signature + author card
   --------------------------------------------------------------- */
.lsa-signature {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0.3rem 0 1.3rem;
    font-size: 0.89rem;
    color: var(--lsa-ink-2);
}

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

.lsa-carte-auteur {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: var(--lsa-gap-section);
    padding: 1.2rem 1.3rem;
    background-color: var(--lsa-surface);
    border-radius: var(--lsa-radius);
    box-shadow: var(--lsa-shadow);
}

.lsa-carte-auteur img { border-radius: 50%; flex: 0 0 auto; display: block; }
.lsa-carte-auteur strong { font-family: 'PT Sans', system-ui, sans-serif; font-size: 1rem; }
.lsa-carte-auteur strong a { color: var(--lsa-ink); text-decoration: none; }
.lsa-carte-auteur strong a:hover { color: var(--lsa-primary); }
.lsa-carte-auteur p { margin: 0.35rem 0 0; font-size: 0.89rem; line-height: 1.6; color: var(--lsa-ink-2); }

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

.entry-content h2 { margin-top: 2.1rem; font-size: 1.38rem; line-height: 1.3; }
.entry-content h3 { margin-top: 1.6rem; font-size: 1.12rem; line-height: 1.35; }

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

.entry-content blockquote {
    border-left: 4px solid var(--lsa-primary);
    background-color: var(--lsa-surface);
    border-radius: 0 var(--lsa-radius-sm) var(--lsa-radius-sm) 0;
    padding: 0.9rem 1.1rem;
    margin-left: 0;
    font-style: normal;
    color: var(--lsa-ink);
}

/* ---------------------------------------------------------------
   Archive / index cards (separate-containers, right sidebar)
   --------------------------------------------------------------- */
.page-header { margin-bottom: var(--lsa-gap-block); }

.page-header .page-title {
    font-size: 1.5rem;
    margin: 0;
    padding-left: 0.75rem;
    border-left: 4px solid var(--lsa-primary);
    line-height: 1.3;
}

.separate-containers .site-main > article,
.separate-containers .paging-navigation {
    border: 1px solid var(--lsa-rule);
    border-radius: var(--lsa-radius);
    box-shadow: var(--lsa-shadow);
}

.blog .post-image img, .archive .post-image img {
    border-radius: var(--lsa-radius) var(--lsa-radius) 0 0;
}

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

/* ---------------------------------------------------------------
   Sidebar (sig-A: right). Widget titles come from §10.
   --------------------------------------------------------------- */
.sidebar .widget {
    background-color: var(--lsa-bg);
    border: 1px solid var(--lsa-rule);
    border-radius: var(--lsa-radius);
    box-shadow: var(--lsa-shadow);
    padding: 1.05rem 1.15rem;
    margin-bottom: var(--lsa-gap-block);
}

.sidebar .widget .widget-title {
    font-family: 'PT Sans', system-ui, sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--lsa-primary);
    margin: 0 0 0.7rem;
}

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

.sidebar .search-field, .widget .search-field {
    width: 100%;
    border: 1px solid var(--lsa-rule);
    border-radius: var(--lsa-radius-sm);
    padding: 0.5rem 0.7rem;
    font-size: 0.92rem;
}

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

/* ---------------------------------------------------------------
   Footer — single-line-dark, no headings (§10: footer headings none)
   --------------------------------------------------------------- */
.site-footer { background-color: var(--lsa-dark); }

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

.site-info {
    text-align: center;
    font-size: 0.86rem;
    color: var(--lsa-dark-ink);
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}

.site-info a { color: #FFFFFF; text-decoration: none; }
.site-info a:hover { text-decoration: underline; }

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

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

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

.lsa-pied-nav a {
    font-size: 0.85rem;
    color: var(--lsa-dark-ink);
    text-decoration: none;
}

.lsa-pied-nav a:hover { color: #FFFFFF; text-decoration: underline; }

/* ---------------------------------------------------------------
   Scroll-to-top (§10: yes). GP Premium has no option for the shape,
   so the button is styled here.
   --------------------------------------------------------------- */
.generate-back-to-top {
    background-color: var(--lsa-primary);
    color: #FFFFFF;
    border-radius: var(--lsa-radius-sm);
    box-shadow: var(--lsa-shadow);
}

.generate-back-to-top:hover, .generate-back-to-top:focus {
    background-color: var(--lsa-primary-deep);
    color: #FFFFFF;
}

/* ---------------------------------------------------------------
   Contact form — the submit button carries the palette primary,
   not the plugin's grey default. Gated by contact-form-render.cjs.
   --------------------------------------------------------------- */
body button.wpforms-submit,
body .wpforms-container button[type=submit],
body .wpcf7-submit,
body .ff-btn-submit {
    background-color: #1A56DB !important;
    color: #ffffff !important;
    border-radius: var(--lsa-radius-sm) !important;
    border: none !important;
}

body button.wpforms-submit:hover,
body .wpforms-container button[type=submit]:hover,
body .wpcf7-submit:hover,
body .ff-btn-submit:hover {
    filter: brightness(0.88) !important;
}

.wpforms-container input[type=text],
.wpforms-container input[type=email],
.wpforms-container select,
.wpforms-container textarea {
    border: 1px solid var(--lsa-rule) !important;
    border-radius: var(--lsa-radius-sm) !important;
}

.wpforms-container input[type=text]:focus,
.wpforms-container input[type=email]:focus,
.wpforms-container select:focus,
.wpforms-container textarea:focus {
    border-color: var(--lsa-primary) !important;
    outline: 2px solid var(--lsa-accent-warm);
}

/* ---------------------------------------------------------------
   404
   --------------------------------------------------------------- */
.lsa-404 { max-width: var(--lsa-measure); }
.lsa-404 h1 { font-size: 2.3rem; margin: 0 0 0.7rem; color: var(--lsa-primary); }
.lsa-404 p { font-size: 1.02rem; line-height: 1.7; }
.lsa-404 a { color: var(--lsa-primary); }
.lsa-404 .search-form { margin-top: 1.2rem; }

/* ---------------------------------------------------------------
   About page — about-left-float (§10)
   --------------------------------------------------------------- */
.lsa-portrait {
    float: left;
    margin: 0.2rem 1.4rem 1rem 0;
    max-width: 200px;
}

.lsa-portrait img {
    display: block;
    border-radius: var(--lsa-radius);
    box-shadow: var(--lsa-shadow);
    width: 100%;
    height: auto;
}

.lsa-portrait figcaption {
    font-size: 0.8rem;
    color: var(--lsa-ink-2);
    margin-top: 0.4rem;
    line-height: 1.4;
}

.entry-content::after { content: ""; display: table; clear: both; }

/* ---------------------------------------------------------------
   Small screens
   --------------------------------------------------------------- */
@media (max-width: 768px) {
    :root { --lsa-gap-section: 1.6rem; }
    .site-tagline-heading { font-size: 1.34rem; }
    .lsa-bille { flex-direction: column; }
    .lsa-bille__vue { flex: 0 0 auto; max-width: 100%; }
    .lsa-bille__vue img { height: 190px; min-height: 0; }
    .lsa-bille__corps { padding: 1rem 1.15rem 1.1rem; }
    .lsa-carte-auteur { flex-direction: column; }
    .lsa-portrait { float: none; margin: 0 0 1rem; max-width: 100%; }
}
