/* =====================================================
   HEADER GLOBAL (fixe au scroll)
   ===================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--paper);
    /* Sur l’accueil seulement : transparente en haut de page, elle apparaît au
       défilement. Partout ailleurs, --bordered la rend permanente. */
    border-bottom: 3px solid transparent;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}
.site-header--bordered {
    border-bottom-color: var(--ink);
}
.site-header--scrolled {
    border-bottom-color: var(--ink);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
/* Deux lignes : marque + CTA, puis la navigation. Le `flex-basis: 100%` de la
   nav suffit à provoquer le passage à la ligne, sans point de rupture. */
.site-header__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px clamp(20px, 4vw, 40px) 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: clamp(16px, 3vw, 36px);
    row-gap: 0;
}
.site-header__bar {
    display: flex;
    align-items: center;
    gap: 16px;
}
.site-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--ink);
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(19px, 2vw, 22px);
    letter-spacing: 0.01em;
    text-transform: uppercase;
    white-space: nowrap;
}
.site-header__brand strong { color: var(--ink); font-weight: 400; }
.site-header__logo {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    object-fit: contain;
}

/* Bouton menu (DS CS 8, §04) : trois barres de 24 × 3 px, cible tactile de 44 px. */
.site-header__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    color: var(--ink);
    border: 0;
    cursor: pointer;
}
.site-header__toggle:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}
.site-header__burger {
    position: relative;
    display: block;
    width: 24px;
    height: 3px;
    background: currentColor;
}
.site-header__burger::before,
.site-header__burger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 24px;
    height: 3px;
    background: currentColor;
}
.site-header__burger::before { top: -7px; }
.site-header__burger::after { top: 7px; }

.site-header__nav {
    flex-basis: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(10px, 1.6vw, 24px);
    padding: 26px 0 16px;
}
.site-header__nav a {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    padding: 0 0 5px;
    /* Bordure transparente par défaut pour que le soulignement actif ne décale rien. */
    border-bottom: 4px solid transparent;
    transition: color 140ms ease, border-color 140ms ease;
}
.site-header__nav a:hover {
    color: var(--red);
}
.site-header__nav a:focus-visible {
    color: var(--red);
    outline: 2px solid var(--yellow);
    outline-offset: 2px;
}
.site-header__nav a[aria-current="page"] {
    border-bottom-color: var(--yellow);
}

/* Styling via .btn .btn-cta ; on ne garde que le comportement de mise en page. */
.site-header__cta { flex-shrink: 0; }

/* Menu mobile plein écran (< 768px) */
@media (max-width: 767px) {
    .site-header__toggle { display: inline-flex; }
    .site-header__nav,
    .site-header__cta { display: none; }
    .site-header__bar {
        flex: 1;
        justify-content: space-between;
    }

    .site-header--nav-open {
        position: fixed;
        inset: 0;
        height: 100vh;
        overflow-y: auto;
        background: var(--ink);
    }
    .site-header--nav-open .site-header__inner {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        height: 100%;
        padding: 0;
    }
    .site-header--nav-open .site-header__bar {
        flex: 0 0 auto;
        padding: 14px 24px;
    }
    .site-header--nav-open .site-header__brand,
    .site-header--nav-open .site-header__brand strong {
        color: var(--paper);
    }
    .site-header--nav-open .site-header__toggle {
        color: var(--paper);
    }
    /* Menu ouvert : les barres se croisent en ✕. */
    .site-header--nav-open .site-header__burger {
        background: transparent;
    }
    .site-header--nav-open .site-header__burger::before {
        top: 0;
        transform: rotate(45deg);
    }
    .site-header--nav-open .site-header__burger::after {
        top: 0;
        transform: rotate(-45deg);
    }
    .site-header--nav-open .site-header__nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 0;
        overflow-y: auto;
    }
    .site-header--nav-open .site-header__nav a {
        color: var(--paper);
        height: 56px;
        display: flex;
        align-items: center;
        padding: 0 24px;
        font-size: 13px;
        border-bottom: 1px solid #3A3A3A;
    }
    .site-header--nav-open .site-header__nav a:hover,
    .site-header--nav-open .site-header__nav a:focus-visible {
        color: var(--yellow);
    }
    .site-header--nav-open .site-header__nav a[aria-current="page"] {
        border-bottom: 4px solid var(--yellow);
    }
    /* Le CTA reste collé en bas de l’écran, sur toute la largeur. */
    .site-header--nav-open .site-header__cta {
        display: flex;
        order: 3;
        width: 100%;
        margin-top: auto;
        box-shadow: none;
    }
}

/* ---------- Barre minimale de la page caisse (DS CS 6 écran 11, CS 8 M12) ---------- */
.site-header--minimal {
    position: static;
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 clamp(20px, 4vw, 40px);
}
.site-header__back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 140ms ease;
}
.site-header__back:hover {
    color: var(--red);
}
.site-header__back:focus-visible {
    color: var(--red);
    outline: 2px solid var(--yellow);
    outline-offset: 2px;
}
.site-header__back-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
}
@media (max-width: 767px) {
    .site-header--minimal {
        min-height: 56px;
    }
    .site-header__back {
        color: var(--ink);
        font-family: var(--display);
        font-size: 16px;
        letter-spacing: 0.01em;
    }
    .site-header__back-logo {
        width: 24px;
        height: 24px;
    }
}
