/* ============================================================
   AG HEADER (v2) — feature-gated via ag_use_new_header()
   Préfixe `.ag-` exclusivement ; scopé pour ne pas polluer le legacy.
   ============================================================ */

.ag-site-header {
    --ag-bg: #fafbfc;
    --ag-surface: #ffffff;
    --ag-border: #ececf0;
    --ag-border-strong: #d9d9e0;
    --ag-text: #111827;
    --ag-text-muted: #484b53;
    --ag-text-soft: #9ca3af;
    --ag-accent: var(--link-color, #175298);
    --ag-accent-soft: #eaf1fb; /* défaut FR/EN, override par langue plus bas */
    --ag-radius: 14px;
    --ag-radius-sm: 10px;
    --ag-radius-pill: 999px;
    --ag-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    --ag-shadow-hover: 0 4px 16px rgba(15, 23, 42, 0.06);
    --ag-shadow-sticky: 0 4px 20px rgba(15, 23, 42, 0.08);
    --ag-shadow-dropdown: 0 12px 28px rgba(15, 23, 42, 0.12);
    --ag-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ag-site-header,
.ag-site-header * { box-sizing: border-box; }

/* Variantes "light" (--ag-accent-soft) par langue, alignées sur --link-color
   défini globalement par le thème dans style.min.css :
   fr-FR / en-US : #175298  → bleu pâle
   es-ES         : #021f3c  → bleu marine pâle
   it-IT         : #067a45  → vert pâle
   de-DE         : #333333  → gris pâle
   pt-PT         : #1b6035  → vert pâle (teinte plus claire)
   pl-PL         : #db143c  → rose pâle */
html[lang='fr-FR'] .ag-site-header,
html[lang='en-US'] .ag-site-header { --ag-accent-soft: #eaf1fb; }
html[lang='es-ES'] .ag-site-header { --ag-accent-soft: #e6ecf2; }
html[lang='it-IT'] .ag-site-header { --ag-accent-soft: #e6f4ed; }
html[lang='de-DE'] .ag-site-header { --ag-accent-soft: #f0f0f0; }
html[lang='pt-PT'] .ag-site-header { --ag-accent-soft: #e8f1ec; }
html[lang='pl-PL'] .ag-site-header { --ag-accent-soft: #fce8ec; }

.ag-site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--ag-surface);
    font-family: var(--ag-font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ag-text);
}
/* Bannière full-width au-dessus de la mainbar (ex: "Compte bloqué" admin) */
.ag-banner {
    width: 100%;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    line-height: 1.3;
}
.ag-banner-danger { background: #ef4444; color: #fff; }

/* Spacer pour compenser le header en position fixed */
.ag-site-header-spacer { height: 80px; }
@media (max-width: 767px) { .ag-site-header-spacer { height: 60px; } }

/* Quand une bannière est présente : header + spacer plus hauts (~36px) */
.ag-site-header-spacer.has-banner { height: 116px; }
@media (max-width: 767px) { .ag-site-header-spacer.has-banner { height: 96px; } }

/* Mode "framed" : pas de spacer en hauteur, on compense via margin-top.
   Le frame du thème ajoute déjà son propre padding/wrapper. */
body.thememount-framed .ag-site-header-spacer {
    height: 0;
    margin-top: 80px;
}
@media (max-width: 767px) {
    body.thememount-framed .ag-site-header-spacer { margin-top: 15px; }
}

/* Mode "framed" : le container du header s'aligne sur le frame du thème
   (max 1200px, sans padding horizontal). Override les règles 750/970/85%. */
body.thememount-framed .ag-mainbar .ag-container {
    width: 100%;
    max-width: 1200px;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
}
/* En dessous de 1200px, le container touche les bords → réintroduire un padding */
@media (max-width: 1199px) {
    body.thememount-framed .ag-mainbar .ag-container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Décale le header sous la WP admin bar quand elle est affichée.
   Admin bar : 32px (>782px) / 46px (≤782px) / scroll avec la page (≤600px). */
body.admin-bar .ag-site-header { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .ag-site-header { top: 46px; }
}
@media screen and (max-width: 600px) {
    body.admin-bar .ag-site-header { top: 0; }
}

/* ---- Container ---- */
.ag-site-header .ag-container {
    padding-left: 25px;
    padding-right: 25px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}
@media (min-width: 768px)  { .ag-site-header .ag-container { width: 750px; } }
@media (min-width: 992px)  { .ag-site-header .ag-container { width: 970px; } }
@media (min-width: 1200px) { .ag-site-header .ag-container { width: 85%; min-width: auto; } }

/* ---- Master account switcher (compact pill) ---- */
.ag-acct {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 4px 0 14px;
    border-radius: var(--ag-radius-pill);
    background: var(--ag-surface); color: var(--ag-text);
    border: 1px solid var(--ag-border-strong);
    box-shadow: var(--ag-shadow);
    font-size: 13.5px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ag-acct:hover { border-color: var(--ag-accent); box-shadow: var(--ag-shadow-hover); }
.ag-acct > .bi-globe2 { font-size: 15px; color: var(--ag-text-muted); flex-shrink: 0; transition: color .15s ease; }
.ag-acct:hover > .bi-globe2 { color: var(--ag-accent); }
.ag-acct select {
    appearance: none; -webkit-appearance: none;
    border: 0;
    background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 4px center;
    color: var(--ag-text);
    font-family: var(--ag-font);
    font-size: 13.5px;
    font-weight: 600;
    padding: 0 22px 0 0;
    max-width: 180px;
    text-overflow: ellipsis;
    cursor: pointer;
    outline: 0;
}
.ag-acct .switch-back {
    background: var(--ag-border);
    border: 0;
    color: var(--ag-text-muted);
    border-radius: 50%;
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease;
    text-decoration: none;
}
.ag-acct .switch-back:hover { background: var(--ag-border-strong); color: var(--ag-text); }

/* ---- Main bar ---- */
.ag-mainbar {
    height: 80px;
    border-bottom: 1px solid var(--ag-border);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: height .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ag-mainbar .ag-container { height: 100%; display: flex; align-items: center; gap: 28px; }

.ag-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; margin-right: 10px; }
.ag-logo img { height: 45px; width: auto; display: block; transition: height .2s ease; }

/* ============================================================
   PRIMARY NAV — adapté markup wp_nav_menu (UL/LI standard)
   Walker WP : <ul class="ag-nav-menu"><li class="menu-item[ menu-item-has-children][ current-menu-item]">…
   ============================================================ */
.ag-nav { display: none; align-items: center; flex: 1 1 auto; justify-content: flex-start; min-width: 0; }
.ag-nav.is-visible { display: flex; }
.ag-nav ul { list-style: none; margin: 0; padding: 0; }
.ag-nav > div > ul, .ag-nav > ul {
    display: flex; align-items: center; gap: 2px;
}

.ag-nav li { position: relative; }
.ag-nav li > a {
    position: relative;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 10px 12px;
    font-size: 14px; font-weight: 500;
    color: var(--ag-text-muted);
    text-decoration: none;
    border-radius: var(--ag-radius-sm);
    transition: color .15s ease, background .15s ease;
    white-space: nowrap;
}
.ag-nav li > a:hover { color: var(--ag-text); background: var(--ag-bg); }

/* Chevron pour items avec enfants */
.ag-nav li.menu-item-has-children > a::after {
    content: "\F282"; /* bi-chevron-down */
    font-family: "bootstrap-icons";
    font-size: 11px;
    line-height: 1;
    color: var(--ag-text-soft);
    margin-left: 2px;
    transition: transform .2s ease;
    position: relative;
    top: 1px;
}

/* État actif */
.ag-nav li.current-menu-item > a,
.ag-nav li.current-menu-ancestor > a,
.ag-nav li.current-menu-parent > a {
    color: var(--ag-accent);
    font-weight: 600;
}
/* État actif au niveau des sous-menus (spécificité plus forte pour battre
   `.ag-nav .sub-menu > li > a` et la variante mobile) */
.ag-nav .sub-menu li.current-menu-item > a,
.ag-nav .sub-menu li.current-menu-ancestor > a {
    color: var(--ag-accent);
    font-weight: 600;
}

/* Sub-menu (level 2) */
.ag-nav .sub-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    background: var(--ag-surface);
    border: 1px solid var(--ag-border);
    border-radius: var(--ag-radius);
    box-shadow: var(--ag-shadow-dropdown);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all .15s ease;
    z-index: 50;
    display: flex;
    flex-direction: column;
}
.ag-nav li:hover > .sub-menu,
.ag-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.ag-nav .sub-menu li { width: 100%; }
.ag-nav .sub-menu > li > a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 9px 12px;
    font-size: 13.5px; font-weight: 500;
    color: var(--ag-text); text-decoration: none;
    border-radius: var(--ag-radius-sm);
    white-space: nowrap;
}
.ag-nav .sub-menu > li > a:hover { background: var(--ag-bg); }
.ag-nav .sub-menu li.menu-item-has-children > a::after {
    content: "\F285"; /* bi-chevron-right */
}

/* Badge compteur (ex: "Avis en attente" + nombre) */
.ag-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 3px 8px;
    border-radius: 999px;
    min-width: 18px;
}

/* Sub-sub-menu (level 3 flyout) */
.ag-nav .sub-menu .sub-menu {
    top: -7px;
    left: calc(100% + 4px);
    transform: translateY(0) translateX(-4px);
}
.ag-nav .sub-menu li:hover > .sub-menu,
.ag-nav .sub-menu li:focus-within > .sub-menu { transform: translateY(0) translateX(0); }

/* ---- Right zone ---- */
.ag-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }

/* Support button */
.ag-support-btn {
    display: inline-flex; align-items: center; gap: 7px;
    height: 38px; padding: 0 14px;
    border-radius: var(--ag-radius-pill);
    background: var(--ag-surface); color: var(--ag-text);
    border: 1px solid var(--ag-border-strong);
    box-shadow: var(--ag-shadow);
    font-size: 13.5px; font-weight: 600;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.ag-support-btn:hover { border-color: var(--ag-accent); color: var(--ag-accent); box-shadow: var(--ag-shadow-hover); }
.ag-support-btn i { font-size: 15px; color: var(--ag-text-muted); }
.ag-support-btn:hover i { color: var(--ag-accent); }

/* Language selector */
.ag-lang { position: relative; }
.ag-lang-btn {
    display: inline-flex; align-items: center; gap: 7px;
    height: 38px; padding: 0 8px 0 16px;
    border-radius: var(--ag-radius-pill);
    background: var(--ag-surface); color: var(--ag-text);
    border: 1px solid var(--ag-border-strong);
    box-shadow: var(--ag-shadow);
    font-size: 13px; font-weight: 600; font-family: var(--ag-font);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ag-lang-btn:hover { border-color: var(--ag-accent); box-shadow: var(--ag-shadow-hover); }
.ag-lang-btn .code { letter-spacing: 0.03em; text-transform: uppercase; font-size: 12.5px; }
.ag-lang-btn .chev { font-size: 11px; color: var(--ag-text-soft); }
.ag-lang-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0;
    min-width: 180px; background: var(--ag-surface);
    border: 1px solid var(--ag-border); border-radius: var(--ag-radius);
    box-shadow: var(--ag-shadow-dropdown);
    padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: all .15s ease;
    z-index: 60;
}
.ag-lang.is-open .ag-lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.ag-site-header[data-state="public"] .ag-lang-dropdown { left: auto; right: 0; }
.ag-lang-dropdown a {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; color: var(--ag-text); text-decoration: none;
    border-radius: var(--ag-radius-sm); font-size: 13.5px; font-weight: 500;
}
.ag-lang-dropdown a:hover { background: var(--ag-bg); }
.ag-lang-dropdown a.is-active { color: var(--ag-accent); font-weight: 600; }
.ag-lang-dropdown a.is-active::after { content: "\F633"; font-family: "bootstrap-icons"; margin-left: auto; font-size: 14px; }
.ag-flag {
    width: 18px;
    height: 12px;
    display: inline-block;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 2px;
    vertical-align: middle;
}

/* User menu */
.ag-user {
    position: relative; display: inline-flex; align-items: center; gap: 10px;
    height: 38px; padding: 0 12px 0 4px; border-radius: var(--ag-radius-pill);
    cursor: pointer; transition: background .15s ease;
}
.ag-user:hover { background: var(--ag-bg); }
.ag-user .avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--ag-accent-soft); color: var(--ag-accent);
    display: grid; place-items: center;
    font-weight: 700; font-size: 14px; line-height: 1; letter-spacing: 0.02em;
}
.ag-user .meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    line-height: 1;
}
.ag-user .name,
.ag-user .site {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    line-height: 1;
}
.ag-user .name { font-size: 13px; font-weight: 600; color: var(--ag-text); }
.ag-user .site { font-size: 11px; color: var(--ag-text-muted); }
.ag-user .chev { color: var(--ag-text-soft); font-size: 11px; }
.ag-user-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 240px; background: var(--ag-surface);
    border: 1px solid var(--ag-border); border-radius: var(--ag-radius);
    box-shadow: var(--ag-shadow-dropdown);
    padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: all .15s ease;
    z-index: 60;
}
.ag-user.is-open .ag-user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.ag-user-dropdown .header { padding: 10px 12px 12px; border-bottom: 1px solid var(--ag-border); margin-bottom: 6px; }
.ag-user-dropdown .header .who { font-weight: 600; color: var(--ag-text); font-size: 13.5px; }
.ag-user-dropdown .header .email { color: var(--ag-text-muted); font-size: 12px; margin-top: 2px; }
.ag-user-dropdown a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; color: var(--ag-text); text-decoration: none;
    border-radius: var(--ag-radius-sm); font-size: 13.5px; font-weight: 500;
}
.ag-user-dropdown a:hover { background: var(--ag-bg); }
.ag-user-dropdown a i { font-size: 15px; color: var(--ag-text-muted); width: 18px; }
.ag-user-dropdown a.danger,
.ag-user-dropdown a.danger:hover { color: #ef4444 !important; }
.ag-user-dropdown a.danger i { color: #ef4444 !important; }
.ag-user-dropdown .sep { height: 1px; background: var(--ag-border); margin: 6px 4px; }

/* Public CTAs */
.ag-cta-row { display: flex; gap: 8px; }
.ag-cta {
    display: inline-flex; align-items: center; gap: 6px;
    height: 38px; padding: 0 16px; border-radius: var(--ag-radius-pill);
    font-weight: 600; font-size: 13.5px; text-decoration: none;
    transition: all .15s ease;
}
.ag-cta-ghost { color: var(--ag-text); border: 1px solid var(--ag-border-strong); background: var(--ag-surface); }
.ag-cta-ghost:hover { border-color: var(--ag-accent); color: var(--ag-accent); }
.ag-cta-primary { color: #fff !important; background: var(--ag-accent); border: 1px solid var(--ag-accent); }
.ag-cta-primary:hover {
    color: #fff !important;
    background: color-mix(in srgb, var(--ag-accent), black 18%);
    border-color: color-mix(in srgb, var(--ag-accent), black 18%);
}

/* ============================================================
   HAMBURGER + DRAWER
   ============================================================ */
.ag-nav-toggle {
    display: none;
    width: 48px; height: 48px;
    background: transparent;
    border: 0;
    box-shadow: none !important;
    border-radius: var(--ag-radius-sm);
    color: var(--ag-text);
    font-size: 30px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: -10px;
}
.ag-nav-toggle:hover { background: var(--ag-bg); }
.ag-nav-toggle .bi { line-height: 1; margin: 0; }
.ag-nav-toggle .bi-list { font-size: 26px; }

.ag-drawer {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 28px;
}
.ag-drawer-header { display: none; }
.ag-nav-close {
    width: 36px; height: 36px;
    background: transparent;
    border: 0;
    box-shadow: none !important;
    border-radius: var(--ag-radius-sm);
    color: var(--ag-text);
    font-size: 18px;
    cursor: pointer;
    display: grid; place-items: center;
}
.ag-nav-close:hover { background: var(--ag-bg); }
.ag-nav-close .bi { line-height: 1; margin: 0; }
.ag-nav-close .bi-x-lg { font-size: 20px; }

/* Sticky state */
.ag-site-header.is-stuck .ag-mainbar { height: 70px; box-shadow: var(--ag-shadow-sticky); border-bottom-color: var(--ag-border); }
.ag-site-header.is-stuck .ag-logo img { height: 40px; }

/* ============================================================
   RESPONSIVE — drawer < 1200px
   ============================================================ */
@keyframes ag-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes ag-fade-in  { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1199px) {
    .ag-nav-toggle { display: inline-flex; }
    .ag-drawer { display: none; }

    body.ag-nav-open .ag-drawer {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: var(--ag-surface);
        z-index: 110;
        animation: ag-slide-in .22s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.ag-nav-open .ag-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        border-bottom: 1px solid var(--ag-border);
        position: sticky;
        top: 0;
        background: var(--ag-surface);
        z-index: 5;
    }
    body.ag-nav-open .ag-drawer-header img { height: 32px; width: auto; }

    body.ag-nav-open .ag-site-header { z-index: 120; }

    body.ag-nav-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 105;
        animation: ag-fade-in .22s ease;
    }

    body.ag-nav-open .ag-nav.is-visible {
        display: flex;
        flex-direction: column;
        flex: 0 0 auto;
        align-items: stretch;
        gap: 2px;
        padding: 14px 12px 4px;
    }
    body.ag-nav-open .ag-nav > div > ul,
    body.ag-nav-open .ag-nav > ul {
        flex-direction: column;
        gap: 2px;
        width: 100%;
    }
    body.ag-nav-open .ag-nav li {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    body.ag-nav-open .ag-nav li > a {
        display: flex;
        padding: 12px 14px;
        font-size: 14.5px;
        justify-content: space-between;
        border-radius: var(--ag-radius-sm);
        color: var(--ag-text);
    }
    body.ag-nav-open .ag-nav li.current-menu-item > a,
    body.ag-nav-open .ag-nav li.current-menu-ancestor > a { color: var(--ag-accent); }

    body.ag-nav-open .ag-nav .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 0 0 0 14px;
        margin: 0;
        min-width: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease, padding .25s ease;
    }
    body.ag-nav-open .ag-nav li.is-expanded > .sub-menu {
        max-height: 1200px;
        padding-top: 4px;
        padding-bottom: 8px;
    }
    body.ag-nav-open .ag-nav li.menu-item-has-children > a::after { transition: transform .2s ease; }
    body.ag-nav-open .ag-nav li.menu-item-has-children.is-expanded > a::after { transform: rotate(180deg); }
    body.ag-nav-open .ag-nav .sub-menu li > a {
        padding: 10px 12px;
        font-size: 13.5px;
        color: var(--ag-text-muted);
        font-weight: 500;
        white-space: normal;
    }

    body.ag-nav-open .ag-right {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px 12px 24px;
        border-top: 1px solid var(--ag-border);
        margin-top: 8px;
        margin-left: 0;
    }

    body.ag-nav-open .ag-cta-row { flex-direction: column; gap: 8px; }
    body.ag-nav-open .ag-cta { width: 100%; justify-content: center; height: 44px; }

    body.ag-nav-open .ag-support-btn {
        width: 100%;
        height: 44px;
        justify-content: center;
        padding: 0 14px;
    }

    body.ag-nav-open .ag-acct {
        width: 100%;
        height: 44px;
    }

    body.ag-nav-open .ag-lang { width: 100%; order: 99; }
    body.ag-nav-open .ag-lang-btn { display: none; }
    body.ag-nav-open .ag-lang-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 0;
        min-width: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }
    body.ag-nav-open .ag-lang-dropdown a {
        background: var(--ag-bg);
        padding: 10px 12px;
        font-size: 13px;
    }
    body.ag-nav-open .ag-lang-dropdown a.is-active {
        background: var(--ag-accent-soft);
        color: var(--ag-accent);
    }
    body.ag-nav-open .ag-lang-dropdown a.is-active::after { display: none; }

    body.ag-nav-open .ag-user {
        width: 100%;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        height: auto;
        padding: 14px;
        background: var(--ag-bg);
        border-radius: var(--ag-radius);
        gap: 12px;
        cursor: default;
    }
    body.ag-nav-open .ag-user:hover { background: var(--ag-bg); }
    body.ag-nav-open .ag-user > .chev { display: none; }
    body.ag-nav-open .ag-user .name,
    body.ag-nav-open .ag-user .site { max-width: 100%; }
    body.ag-nav-open .ag-user-dropdown {
        flex: 1 1 100%;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 0;
        min-width: 0;
        margin: 0;
    }
    body.ag-nav-open .ag-user-dropdown .header,
    body.ag-nav-open .ag-user-dropdown .sep { display: none; }
    body.ag-nav-open .ag-user-dropdown a {
        padding: 10px 12px;
        background: var(--ag-surface);
        margin-bottom: 2px;
        border-radius: var(--ag-radius-sm);
    }
}

@media (max-width: 767px) {
    .ag-logo img { height: 32px; }
    .ag-mainbar .ag-container { gap: 8px; }
    .ag-mainbar { height: 60px; }
    .ag-site-header.is-stuck .ag-mainbar { height: 60px; }
    .ag-site-header .ag-container { padding-left: 12px; padding-right: 12px; }
}

/* ============================================================
   ÉTATS — visibilité conditionnelle des composants right zone
   ============================================================ */
.ag-site-header[data-state="public"] .ag-user,
.ag-site-header[data-state="public"] .ag-support-btn { display: none; }
.ag-site-header:not([data-state="public"]) .ag-cta-row { display: none; }
.ag-site-header:not([data-state="master"]) .ag-acct { display: none; }
