/* =============================================================================
   TEHONO HEADER - styles
   Chargé via wp_enqueue_style (handle: th-header)
   Header horizontal + subheader vertical (collapsed/expanded)
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800&display=swap');

:root {
    --sb-width-closed: 60px;
    --sb-width-open:   220px;
    --hd-height:       72px;
    --hd-gap-top:      0px;
    --hd-bg:           #000000;
    --sb-bg:           #000000;
    --border:          rgba(255,255,255,0.08);
    --muted:           rgba(255,255,255,0.55);
    --active:          #ffffff;
    --font:            'Montserrat',sans-serif;
    --ease:            0.22s cubic-bezier(0.4,0,0.2,1);
    --c-green:         #2ecc71;
    --c-pink:          #6c72e0;
    --c-cyan:          #b18649;
    --c-violet:        #9b59b6;
    --c-gold:          #f1c40f;
    --c-red:           #9e2a2b;
    --c-white:         rgba(255,255,255,.8);
    --c-sanctum:       #f1c40f;
    --c-exposition:    #d97e2b; /* terracotta : distinct de Gold/Sanctum */
    --c-scanner:       #3498db;
    --c-multi:         #e67e22;
    --c-settings:      #95a5a6;
    --c-transmutation: #1abc9c;
}

/* ── Reset header natif ───────────────────────────────────────────────────── */
.site-header,
#masthead,
.elementor-location-header,
header.entry-header { display:none !important; }

/* Le widget Elementor "Shortcode" qui contient [tehono_header] occupe une
   place dans le flux même si le shortcode lui-même est en position:fixed.
   On détecte ce widget en cherchant celui qui contient #th-site-header,
   et on neutralise sa hauteur, padding et margin. */
.elementor-widget-shortcode:has(#th-site-header) {
    height:0 !important;
    min-height:0 !important;
    padding:0 !important;
    margin:0 !important;
    overflow:visible !important;
}
.elementor-widget-shortcode:has(#th-site-header) .elementor-widget-container {
    height:0 !important;
    min-height:0 !important;
    padding:0 !important;
    margin:0 !important;
}

/* Neutraliser les outlines / box-shadows / tap highlights bleus du thème.
   On ne touche PAS aux couleurs (color/background) au focus pour ne pas
   casser les hovers définis plus haut. Le bleu vient en général d'un
   outline ou d'un box-shadow qu'Astra/Elementor injecte. */
#th-site-header button,
#th-site-header a,
#th-gate-nav button,
#th-gate-nav a {
    outline:none !important;
    -webkit-tap-highlight-color:transparent !important;
}
#th-site-header button:focus,
#th-site-header button:focus-within,
#th-site-header a:focus,
#th-site-header a:focus-within,
#th-gate-nav button:focus,
#th-gate-nav button:focus-within,
#th-gate-nav a:focus,
#th-gate-nav a:focus-within {
    outline:none !important;
    box-shadow:none !important;
}
/* Focus clavier accessible (Tab) */
#th-site-header button:focus-visible,
#th-site-header a:focus-visible,
#th-gate-nav button:focus-visible,
#th-gate-nav a:focus-visible {
    outline:2px solid rgba(255,255,255,.45) !important;
    outline-offset:2px;
}

/* ── Visibilité conditionnée au wallet ────────────────────────────────────── */
body:not(.th-wallet-connected) .th-show-if-connected { display:none !important; }
body.th-wallet-connected .th-hide-if-connected        { display:none !important; }

/* ── Fond noir global #000 (toutes pages frontend) ───────────────────────── */
html,
body,
body > .elementor,
body > #page,
body > main,
body > .site,
body > .ast-container,
body > .hfeed,
.elementor-section,
.elementor-section-wrap,
.entry-content,
.site-content {
    background-color:#000 !important;
}

/* ── Body : marge haut pour le header, marge gauche pour le subheader ───── */
body {
    padding-top:var(--hd-height) !important;
    transition:margin-left var(--ease);
}
/* Elementor / Astra / thèmes : forcer le contenu à respecter le padding body */
body > .elementor,
body > #page,
body > main,
body > .site {
    position:relative;
    z-index:1;
}
/* Marge gauche : 60px en collapsed, 220px en expanded.
   UNIQUEMENT si le wallet est connecté - sinon le contenu reste à fond perdu. */
body.th-wallet-connected.th-sidebar-open      { margin-left:var(--sb-width-closed) !important; }
body.th-wallet-connected.th-sidebar-expanded  { margin-left:var(--sb-width-open)   !important; }
/* Sécurité : si pas connecté, aucune marge gauche */
body:not(.th-wallet-connected) { margin-left:0 !important; }

/* ═══════════════ HEADER HORIZONTAL ═══════════════════════════════════════ */
#th-site-header {
    position:fixed;
    top:0; left:0; right:0;
    height:var(--hd-height);
    background:var(--hd-bg);
    border-bottom:1px solid var(--border);
    display:flex; align-items:center;
    padding:0 28px 0 12px;
    z-index:9985;
    font-family:var(--font);
    box-shadow:0 2px 24px rgba(0,0,0,.5);
}

/* Toggle subheader (hamburger) */
.th-hd-sb-toggle {
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
    width:42px; height:42px; border-radius:9px;
    background:transparent; border:1px solid transparent;
    cursor:pointer; padding:0; margin-right:8px; flex-shrink:0;
    transition:all var(--ease);
}
.th-hd-sb-toggle:hover { background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.1); }
.th-hd-sb-toggle span {
    display:block; width:20px; height:2px;
    background:rgba(255,255,255,.75); border-radius:2px;
    transition:all var(--ease);
}
.th-hd-sb-toggle:hover span { background:#fff; }

/* Logo */
.th-hd-logo {
    display:flex; align-items:center; gap:12px;
    text-decoration:none !important; flex-shrink:0; margin-right:40px; padding:0 8px;
}
.th-hd-logo-img { width:32px; height:32px; border-radius:6px; object-fit:cover; }
.th-hd-logo-fallback { font-size:20px; color:var(--c-green); }
.th-hd-site-name {
    font-size:17px; font-weight:600; letter-spacing:.3px;
    color:#fff; white-space:nowrap;
    font-family:var(--font);
}

/* Nav principale */
.th-hd-nav { display:flex; align-items:center; gap:8px; }
.th-hd-nav-link {
    padding:8px 16px; border-radius:6px;
    font-size:14px; font-weight:500; letter-spacing:.2px;
    color:rgba(255,255,255,.72); text-decoration:none !important;
    transition:color var(--ease), background var(--ease);
    border:1px solid transparent; white-space:nowrap;
}
.th-hd-nav-link:hover { color:#fff; background:rgba(255,255,255,.04); }
.th-hd-nav-link.active { color:#fff; background:rgba(255,255,255,.06); }

.th-hd-spacer { flex:1; }
.th-hd-right { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.th-hd-bell { display:flex; align-items:center; }
.th-hd-bell .th-bell-wrapper,
.th-hd-bell #th-bell-btn { background:transparent !important; border:none !important; }

@keyframes thP { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── Pill Racines Liées - toute la pill est cliquable pour copier ──────── */
.th-hd-wallet-block {
    display:flex; align-items:center; gap:8px;
    height:34px; padding:0 14px;
    background:rgba(46,204,113,.06);
    border:1px solid rgba(46,204,113,.32);
    border-radius:18px;
    position:relative;
    cursor:pointer;
    transition:background var(--ease), border-color var(--ease);
    user-select:none;
}
.th-hd-wallet-block:hover {
    background:rgba(46,204,113,.1);
    border-color:rgba(46,204,113,.5);
}
.th-hd-wallet-dot {
    width:6px; height:6px; border-radius:50%; flex-shrink:0;
    background:var(--c-green); box-shadow:0 0 5px var(--c-green);
    animation:thP 2s infinite;
}
.th-hd-wallet-label {
    font-size:9px; font-weight:700; text-transform:uppercase;
    letter-spacing:1.5px; color:rgba(255,255,255,.45); white-space:nowrap;
    pointer-events:none;
    line-height:1;
    display:inline-flex; align-items:center;
}

/* Le span d'adresse n'a plus besoin d'être un button - c'est juste un span
   à largeur fixe pour que le hover ne pousse rien.
   Filet de securite cross-browser : si le JS de troncature ne suffit pas
   (Safari ne clippe pas tout seul comme Firefox le faisait via une regle
   theme), on force overflow:hidden + ellipsis pour que la pill ne deborde
   jamais visuellement. */
.th-hd-wallet-addr {
    font-family:monospace; font-size:11px; font-weight:600;
    color:rgba(255,255,255,.85); letter-spacing:.2px;
    width:100px; max-width:100px;
    text-align:left;
    display:inline-block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    line-height:1;
    vertical-align:middle;
    pointer-events:none;
}

/* Tooltip adresse complète au survol */
.th-hd-wallet-block .th-hd-wallet-tooltip {
    position:absolute;
    top:calc(100% + 6px); left:50%;
    transform:translateX(-50%);
    background:#0a0b0e;
    border:1px solid rgba(46,204,113,.35);
    color:#fff;
    font-family:monospace; font-size:11px; font-weight:500;
    padding:7px 12px; border-radius:7px; white-space:nowrap;
    opacity:0; pointer-events:none;
    transition:opacity var(--ease);
    box-shadow:0 4px 18px rgba(0,0,0,.5);
    z-index:10000;
}
.th-hd-wallet-block:hover .th-hd-wallet-tooltip { opacity:1; }

/* Bouton Sanctuaire - tailles d'origine */
.th-hd-btn-sanctuaire {
    height:34px; padding:0 18px; border-radius:8px;
    border:1px solid rgba(255,255,255,.18);
    background:#0a0b0e; color:#fff;
    font-family:var(--font); font-size:11px; font-weight:800;
    text-transform:uppercase; letter-spacing:1px; white-space:nowrap;
    text-decoration:none !important;
    display:inline-flex; align-items:center;
    transition:all var(--ease);
}
.th-hd-btn-sanctuaire:hover {
    background:#16171c; border-color:rgba(255,255,255,.5);
    color:#fff;
    text-shadow:0 0 10px rgba(255,255,255,.85), 0 0 20px rgba(255,255,255,.4);
    box-shadow:0 0 16px rgba(255,255,255,.2);
}

/* Bouton déconnexion - carré rouge */
.th-hd-disconnect-btn {
    width:34px; height:34px; border-radius:8px;
    background:rgba(231,76,60,.1);
    border:1px solid rgba(231,76,60,.4);
    color:#e74c3c; cursor:pointer;
    display:inline-flex; align-items:center; justify-content:center;
    padding:0; flex-shrink:0;
    font-size:16px; line-height:1; font-family:var(--font);
    transition:all var(--ease);
}
.th-hd-disconnect-btn:hover {
    background:rgba(231,76,60,.22);
    border-color:rgba(231,76,60,.7);
    color:#fff; box-shadow:0 0 12px rgba(231,76,60,.3);
}

/* Bouton Connecter */
.th-hd-btn-connect {
    height:34px; padding:0 18px; border-radius:8px;
    border:1px solid rgba(46,204,113,.4); background:rgba(46,204,113,.1); color:#2ecc71;
    font-family:var(--font); font-size:11px; font-weight:800;
    text-transform:uppercase; letter-spacing:1px; cursor:pointer; white-space:nowrap;
    transition:all var(--ease);
}
.th-hd-btn-connect:hover {
    background:rgba(46,204,113,.2); border-color:rgba(46,204,113,.7);
    box-shadow:0 0 14px rgba(46,204,113,.2);
}
.th-hd-btn-connect:disabled { opacity:.5; cursor:not-allowed; }

/* ═══════════════ SUBHEADER VERTICAL ══════════════════════════════════════ */
#th-gate-nav {
    position:fixed;
    top:var(--hd-height);
    left:0;
    width:var(--sb-width-closed);
    height:calc(100vh - var(--hd-height));
    background:var(--sb-bg);
    border-right:1px solid var(--border);
    display:none;
    flex-direction:column;
    z-index:9990;
    overflow-y:auto; overflow-x:visible;
    scrollbar-width:none;
    font-family:var(--font);
    box-shadow:4px 0 30px rgba(0,0,0,.4);
    transition:width var(--ease);
    padding-top:6px;
}
/* Visible UNIQUEMENT si le wallet est connecté */
body.th-wallet-connected #th-gate-nav { display:flex; }
body.th-wallet-connected.th-sidebar-expanded #th-gate-nav { width:var(--sb-width-open); }
#th-gate-nav::-webkit-scrollbar { display:none; }

/* En-tête "Sanctuaire" cliquable */
.th-sb-header-link {
    display:flex; align-items:center; justify-content:center;
    gap:12px;
    padding:10px 8px 10px 8px;
    margin:0 6px 8px 6px;
    border-radius:8px;
    border:1px solid transparent;
    text-decoration:none !important;
    color:rgba(255,255,255,.65);
    min-height:42px;
    transition:all var(--ease);
}
.th-sb-header-link:hover {
    background:rgba(255,255,255,.04);
    border-color:rgba(255,255,255,.1);
    color:#fff;
}
.th-sb-header-icon {
    font-size:18px; line-height:1;
    flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
    width:22px; height:22px;
}
.th-sb-header-title {
    font-size:10px; font-weight:800;
    text-transform:uppercase; letter-spacing:2.5px;
    white-space:nowrap;
    display:none;
}
body.th-sidebar-expanded .th-sb-header-title { display:block; }
body.th-sidebar-expanded .th-sb-header-link { justify-content:flex-start; padding-left:14px; }

.th-sb-divider {
    height:1px; background:var(--border); margin:0 10px 8px 10px;
    flex-shrink:0;
}

/* Menu */
/* padding-bottom 80px : laisse de la respiration en bas du sidebar pour ne pas
   chevaucher l'icône CookieYes (positionnée bottom-left fixed par défaut). */
.th-sb-menu {
    list-style:none; margin:0; padding:0 6px 80px 6px;
    flex:1;
    overflow-y:auto; overflow-x:visible;  /* x:visible pour que popover déborde */
    scrollbar-width:none;
}
.th-sb-menu::-webkit-scrollbar { display:none; }
.th-sb-item { margin:3px 0; position:relative; }  /* anchor du popover */

/* Séparateur visuel entre groupes d'items (toggleable depuis Menu Sanctuaire admin) */
.th-sb-sep {
    list-style: none;
    height: 1px;
    background: var(--border);
    margin: 10px 14px;
    pointer-events: none;
}

/* Lien principal - flex centré verticalement + horizontalement en collapsed */
.th-sb-link {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    height:44px;
    border-radius:9px;
    text-decoration:none !important;
    color:var(--muted);
    font-size:11px; font-weight:700;
    text-transform:uppercase; letter-spacing:1px;
    border:1px solid transparent;
    padding:0;
}
body.th-sidebar-expanded .th-sb-link {
    justify-content:flex-start;
    padding:0 12px;
}
/* Transition fluide sur le halo */
.th-sb-link {
    transition:background var(--ease), color var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.th-sb-icon {
    font-size:18px;
    width:24px; height:24px;
    flex-shrink:0;
    display:inline-flex; align-items:center; justify-content:center;
    line-height:1;
    vertical-align:middle;
    margin-top:-2px;
}
/* En collapsed : label et chevron complètement retirés du flex */
.th-sb-label {
    flex:1;
    display:none;
    white-space:nowrap;
}
.th-sb-arrow {
    font-size:15px;
    display:none;
    line-height:1;
    transition:transform var(--ease), opacity var(--ease);
}
/* En expanded : ils réapparaissent */
body.th-sidebar-expanded .th-sb-label { display:block; opacity:1; }
body.th-sidebar-expanded .th-sb-arrow { display:block; opacity:.4; }

/* ── Couleurs par section avec effet halo ──────────────────────────────
   Hover et active : fond teinté + bordure + glow doux (box-shadow).
   Chaque section a son identité visuelle qui s'illumine au survol. */

/* Forge - vert */
.th-sb-link.th-sb-green:hover,
.th-sb-link.th-sb-green.active {
    color:var(--c-green);
    border-color:rgba(46,204,113,.4);
    background:rgba(46,204,113,.08);
    box-shadow:0 0 18px rgba(46,204,113,.15), inset 0 0 12px rgba(46,204,113,.05);
}

/* Atelier - pink/violet */
.th-sb-link.th-sb-pink:hover,
.th-sb-link.th-sb-pink.active {
    color:var(--c-pink);
    border-color:rgba(108,114,224,.4);
    background:rgba(108,114,224,.08);
    box-shadow:0 0 18px rgba(108,114,224,.18), inset 0 0 12px rgba(108,114,224,.06);
}

/* Reliques - cuivré */
.th-sb-link.th-sb-cyan:hover,
.th-sb-link.th-sb-cyan.active {
    color:var(--c-cyan);
    border-color:rgba(177,134,73,.4);
    background:rgba(177,134,73,.08);
    box-shadow:0 0 18px rgba(177,134,73,.18), inset 0 0 12px rgba(177,134,73,.05);
}

/* Transmutation - turquoise alchimique */
.th-sb-link.th-sb-transmutation:hover,
.th-sb-link.th-sb-transmutation.active,
.th-sb-link[data-color="transmutation"]:hover,
.th-sb-link[data-color="transmutation"].active {
    color:var(--c-transmutation);
    border-color:rgba(26,188,156,.4);
    background:rgba(26,188,156,.08);
    box-shadow:0 0 18px rgba(26,188,156,.2), inset 0 0 12px rgba(26,188,156,.05);
}

/* Rituels - violet */
.th-sb-link.th-sb-violet:hover,
.th-sb-link.th-sb-violet.active {
    color:var(--c-violet);
    border-color:rgba(155,89,182,.4);
    background:rgba(155,89,182,.08);
    box-shadow:0 0 18px rgba(155,89,182,.18), inset 0 0 12px rgba(155,89,182,.05);
}

/* Oracles - or */
.th-sb-link.th-sb-gold:hover,
.th-sb-link.th-sb-gold.active {
    color:var(--c-gold);
    border-color:rgba(241,196,15,.4);
    background:rgba(241,196,15,.08);
    box-shadow:0 0 18px rgba(241,196,15,.18), inset 0 0 12px rgba(241,196,15,.05);
}

/* Parchemins - rouge sombre */
.th-sb-link.th-sb-red:hover,
.th-sb-link.th-sb-red.active {
    color:#d94545;
    border-color:rgba(158,42,43,.5);
    background:rgba(158,42,43,.1);
    box-shadow:0 0 18px rgba(158,42,43,.22), inset 0 0 12px rgba(158,42,43,.06);
}

/* Agora - blanc effet halo */
.th-sb-link.th-sb-white:hover,
.th-sb-link.th-sb-white.active,
.th-sb-link[data-color="white"]:hover,
.th-sb-link[data-color="white"].active {
    color:#ffffff;
    border-color:rgba(255,255,255,.35);
    background:rgba(255,255,255,.06);
    box-shadow:0 0 20px rgba(255,255,255,.18), inset 0 0 14px rgba(255,255,255,.05);
}

/* Sanctum - or VIP */
.th-sb-link.th-sb-sanctum:hover,
.th-sb-link.th-sb-sanctum.active,
.th-sb-link[data-color="sanctum"]:hover,
.th-sb-link[data-color="sanctum"].active {
    color:var(--c-sanctum);
    border-color:rgba(241,196,15,.45);
    background:rgba(241,196,15,.08);
    box-shadow:0 0 20px rgba(241,196,15,.22), inset 0 0 12px rgba(241,196,15,.06);
}

/* Exposition - terracotta musée */
.th-sb-link.th-sb-exposition:hover,
.th-sb-link.th-sb-exposition.active,
.th-sb-link[data-color="exposition"]:hover,
.th-sb-link[data-color="exposition"].active {
    color:var(--c-exposition);
    border-color:rgba(217,126,43,.45);
    background:rgba(217,126,43,.08);
    box-shadow:0 0 20px rgba(217,126,43,.22), inset 0 0 12px rgba(217,126,43,.06);
}

/* Scanner - bleu */
.th-sb-link.th-sb-scanner:hover,
.th-sb-link.th-sb-scanner.active {
    color:var(--c-scanner);
    border-color:rgba(52,152,219,.4);
    background:rgba(52,152,219,.08);
    box-shadow:0 0 18px rgba(52,152,219,.2), inset 0 0 12px rgba(52,152,219,.05);
}

/* Multi-Send - orange */
.th-sb-link.th-sb-multisend:hover,
.th-sb-link.th-sb-multisend.active {
    color:var(--c-multi);
    border-color:rgba(230,126,34,.4);
    background:rgba(230,126,34,.08);
    box-shadow:0 0 18px rgba(230,126,34,.2), inset 0 0 12px rgba(230,126,34,.05);
}

/* Settings - gris neutre */
.th-sb-link.th-sb-settings:hover,
.th-sb-link.th-sb-settings.active {
    color:#fff;
    border-color:rgba(255,255,255,.25);
    background:rgba(255,255,255,.05);
    box-shadow:0 0 18px rgba(255,255,255,.08), inset 0 0 12px rgba(255,255,255,.04);
}

/* Hover générique (lien principal sans classe de couleur) */
.th-sb-link:hover {
    background:rgba(255,255,255,.04);
    color:var(--active);
}

.th-sb-link.locked { opacity:.3; cursor:not-allowed; filter:grayscale(1); }
.th-sb-link.locked:hover {
    background:transparent !important;
    border-color:transparent !important;
    color:var(--muted) !important;
}

#sb-item-scanner { margin-top:10px; padding-top:10px; border-top:1px solid var(--border); }
#sb-item-settings { margin-top:10px; padding-top:10px; border-top:1px solid var(--border); }

/* ── SOUS-MENUS : accordéon vertical ─────────────────────────────────────
   S'ouvre uniquement quand le subheader est déroulé (body.th-sidebar-expanded).
   En mode collapsed, les sous-menus restent fermés même si l'item a .open
   (évite les espaces vides). */
.th-sb-sub {
    list-style:none; margin:0; padding:0;
    max-height:0; opacity:0; overflow:hidden;
    transition:max-height .3s cubic-bezier(.4,0,.2,1), opacity .22s ease;
}

body.th-sidebar-expanded .th-sb-has-sub.open > .th-sb-sub {
    max-height:500px;
    opacity:1;
    padding:4px 0 6px 0;
}
/* Espace vide sous le dernier sous-item de Paramètres (Social) :
   Teiva veut visuellement un peu d'air avant la fin du sidebar. */
body.th-sidebar-expanded #sb-item-settings.open > .th-sb-sub {
    padding-bottom:24px;
}
body.th-sidebar-expanded .th-sb-has-sub.open > .th-sb-link .th-sb-arrow {
    transform:rotate(90deg);
    opacity:.8;
}
.th-sb-sub-link {
    display:block;
    padding:8px 14px 8px 46px;
    font-size:12px; font-weight:500;
    letter-spacing:.1px;
    color:rgba(255,255,255,.7);
    text-decoration:none !important;
    border-radius:6px;
    border:1px solid transparent;
    transition:color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* Sous-liens : héritent la couleur de leur section parente au hover */
#sb-item-forge    .th-sb-sub-link:hover { color:var(--c-green);   background:rgba(46,204,113,.08);  box-shadow:inset 0 0 10px rgba(46,204,113,.1); }
#sb-item-atelier  .th-sb-sub-link:hover { color:var(--c-pink);    background:rgba(108,114,224,.1); box-shadow:inset 0 0 10px rgba(108,114,224,.12); }
#sb-item-reliques .th-sb-sub-link:hover { color:var(--c-cyan);    background:rgba(177,134,73,.1);  box-shadow:inset 0 0 10px rgba(177,134,73,.1); }
#sb-item-oracles  .th-sb-sub-link:hover { color:var(--c-gold);    background:rgba(241,196,15,.1);  box-shadow:inset 0 0 10px rgba(241,196,15,.1); }

.th-sb-sub-link.active { color:#fff; background:rgba(255,255,255,.06); }
#sb-item-forge    .th-sb-sub-link.active { color:var(--c-green); }
#sb-item-atelier  .th-sb-sub-link.active { color:var(--c-pink); }
#sb-item-reliques .th-sb-sub-link.active { color:var(--c-cyan); }
#sb-item-oracles  .th-sb-sub-link.active { color:var(--c-gold); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width:1024px) {
    .th-hd-nav { display:none; }
    .th-hd-wallet-label { display:none; }
}
@media (max-width:768px) {
    /* Sur mobile : pas de marge gauche, subheader en slide-in */
    body.th-sidebar-open,
    body.th-sidebar-expanded { margin-left:0 !important; }
    #th-gate-nav {
        transform:translateX(-100%);
        transition:transform var(--ease), width var(--ease);
    }
    body.th-sidebar-expanded #th-gate-nav { transform:translateX(0); }
    /* Accordéon fonctionne sans th-sidebar-expanded (car subheader slide-in) */
    .th-sb-has-sub.open > .th-sb-sub {
        max-height:500px;
        opacity:1;
        padding:4px 0 6px 0;
    }
    .th-sb-has-sub.open > .th-sb-link .th-sb-arrow {
        transform:rotate(90deg);
        opacity:.8;
    }
}
@media (max-width:640px) {
    #th-site-header { padding:0 14px 0 8px; }
    .th-hd-site-name { display:none; }
}

/* ── WordPress admin bar ─────────────────────────────────────────────────── */
body.admin-bar #th-site-header { top:32px; }
body.admin-bar #th-gate-nav {
    top:calc(var(--hd-height) + 32px);
    height:calc(100vh - var(--hd-height) - 32px);
}
@media screen and (max-width:782px) {
    body.admin-bar #th-site-header { top:46px; }
    body.admin-bar #th-gate-nav {
        top:calc(var(--hd-height) + 46px);
        height:calc(100vh - var(--hd-height) - 46px);
    }
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
/* Force le footer en flow normal, indépendant de tout flex/grid parent.
   Sur les pages longues (Transmutation), l'ancien `margin-top: auto` épinglait
   le footer à viewport-bottom et les offres passaient par-dessous. Maintenant :
   - clear:both casse les float si présents
   - position:relative ancre dans le flow du document
   - flex/align-self resetés au cas où le parent serait flex column avec
     align-items spécifique
   - margin-top:0 explicite empêche tout `auto` hérité */
.gate-footer {
    width:100%; padding:40px 30px 20px 30px;
    position:relative; z-index:10;
    margin-top:0;
    align-self:auto;
    flex:0 0 auto;
    clear:both;
    font-family:var(--font); overflow:hidden; border-top:none;
}
.gate-footer-container {
    width:100%; max-width:1200px; margin:0 auto;
    display:flex; justify-content:space-between; align-items:center;
    gap:20px; position:relative; z-index:2;
}
.gate-footer::before {
    content:''; position:absolute; left:50%; transform:translateX(-50%);
    top:0; width:420px; height:1px;
    background:linear-gradient(90deg,transparent,rgba(245,247,250,.8),transparent);
    box-shadow:0 0 15px rgba(245,247,250,.5);
    animation:gateFlux 4.8s ease-in-out infinite; z-index:1;
}
@keyframes gateFlux {
    0%   { opacity:.2; width:150px; }
    50%  { opacity:1;  width:450px; box-shadow:0 0 20px rgba(245,247,250,.8); }
    100% { opacity:.2; width:150px; }
}
.gate-footer-brand { display:flex; align-items:center; gap:12px; }
.gate-footer-title {
    font-weight:800; letter-spacing:.1em; text-transform:uppercase;
    font-size:14px; color:#F5F7FA;
    text-shadow:0 0 10px rgba(245,247,250,.3);
}
.gate-footer-legal { color:rgba(255,255,255,.4); font-size:11px; }
.mobile-legal { display:none; }
.gate-footer-links { display:flex; align-items:center; gap:20px; }
.gate-footer-links a {
    color:rgba(255,255,255,.6); text-decoration:none;
    font-weight:600; font-size:11px;
    text-transform:uppercase; letter-spacing:.05em;
    transition:all .3s ease;
}
.gate-footer-links a:hover { color:#F5F7FA; text-shadow:0 0 8px rgba(245,247,250,.8); }
.gate-footer-separator {
    width:4px; height:4px; background-color:rgba(255,255,255,.2);
    border-radius:50%;
}
.gate-footer-socials { display:flex; gap:18px; align-items:center; }
.gate-footer-socials a {
    color:rgba(255,255,255,.6); transition:all .3s ease;
    display:flex; align-items:center; justify-content:center;
}
.gate-footer-socials a:hover {
    color:#F5F7FA; transform:scale(1.1);
    filter:drop-shadow(0 0 8px rgba(245,247,250,.8));
}
@media (max-width:900px) {
    .gate-footer-container { flex-direction:column; gap:25px; }
    .gate-footer-brand { flex-direction:column; gap:5px; order:1; }
    .gate-footer-links { order:2; flex-wrap:wrap; justify-content:center; line-height:1.8; }
    .gate-footer-socials { order:3; margin-top:10px; }
    .desktop-legal { display:none; }
    .mobile-legal {
        display:block; order:4; margin-top:20px; text-align:center;
        width:100%; border-top:1px solid rgba(255,255,255,.05); padding-top:15px;
    }
    .gate-footer-separator { display:none; }
}
