/* ═══════════════════════════════════════════════
   SANCTUAIRE DASHBOARD v9.0 - Full-Viewport
   Prefix: th9- (zéro conflit avec ancien th7/th8)
   ═══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --th9-rank: #8b5cf6;
    --th9-bg: rgba(255,255,255,0.05);
    --th9-border: rgba(255,255,255,0.12);
    --th9-cyan: #00f2ff;
    --th9-gold: #ffd700;
    --th9-green: #1ec115;
    --th9-pink: #ff0099;
    --th9-purple: #8b5cf6;
    --th9-orange: #f39c12;
    --th9-blue: #3b82f6;
}

/* Kill external ::after / ::before on KPI spans */
.th9 .taiara-count::after, .th9 .taiara-count::before,
.th9 .titeti-count::after, .th9 .titeti-count::before,
.th9 .game-credits::after, .th9 .game-credits::before {
    content: none !important; display: none !important;
}

@keyframes th9shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
@keyframes th9fadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }
@keyframes th9slideIn { from{transform:translateX(120px);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes th9slideOut { from{transform:translateX(0);opacity:1} to{transform:translateX(120px);opacity:0} }

/* ═══ Layout ═══ */
/* Empeche la viewport de changer de largeur quand la scrollbar verticale
   apparait/disparait. Approche multi-couches pour compat max (Brave inclus) :
   1. scrollbar-gutter: stable (Firefox, Chrome 94+, Safari 18.2+)
   2. overflow-y: scroll force la scrollbar toujours rendue
   3. min-height: 101vh garantit qu'il y a TOUJOURS du scroll vertical
   4. !important pour battre les UA stylesheets et le theme Astra. */
html {
    scrollbar-gutter: stable !important;
    overflow-y: scroll !important;
}
body {
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    min-height: 101vh !important;
}

/* Stabilisation des panels d'onglet (Emporium / Sanctum / Observatoire / PRO) :
   - hauteur minimum partagee : panel toujours 240px tall, page ne change pas de
     hauteur au switch d'onglet
   - width 100% verrouille pour ne jamais propager un debordement
   - grid auto-fill remplace le flex-row : avec flex-row + min-width:120px sur
     les cartes, le contenu force le parent a etre au moins 6*120=770px,
     ce qui peut faire fluctuer la largeur visible sur Brave/Chromium.
     auto-fill avec minmax(110px, 1fr) adapte le nb de colonnes a l'espace
     dispo, donc la largeur du conteneur reste stable. */
.th9-feed-panel {
    min-height: 120px !important;
    max-height: 140px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden;
    box-sizing: border-box !important;
    contain: layout;
}
.th9-feed {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    contain: layout;
}
.th9-feed-scroll:not(#th9-pro-grid) {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)) !important;
    gap: 12px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    scroll-snap-type: none !important;
    align-content: start;
    /* Place reservee pour 10 cartes max dans les 3 onglets (Emporium / Sanctum /
       Observatoire) : hauteur constante = pas de reflow du dashboard quand on
       switch d'onglet. Calcul : 3 rows x 115px + 2 gaps x 12px = 369px
       (hypothese 4 colonnes/row, qui couvre 12 cards). Au-dela, scroll vertical. */
    min-height: 370px !important;
    max-height: 370px !important;
}
.th9-feed-scroll:not(#th9-pro-grid) > .th9-mini-card {
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
    flex-shrink: 1 !important;
    aspect-ratio: 1 / 1 !important;
}

.th9 {
    width: 100%;
    max-width: 100%;
    min-width: 0;           /* permet aux grid items enfants de ne pas deborder */
    box-sizing: border-box;
    font-family: 'Outfit','Montserrat',sans-serif;
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 16px;
    padding-bottom: 16px;
    overflow-x: hidden;      /* le contenu du feed Ta'iara-PRO (inline-block min-width) ne doit jamais pousser le layout global */
}
/* V2 : 4 rows (profile+KPI / stats hero / converter+rituels / tabs) */
.th9.th9-v2 {
    grid-template-rows: auto auto auto auto;
    gap: 14px;
}

/* Chaque grid item = min-width: 0 pour respecter les colonnes 1fr 1fr meme
   avec un contenu enfant etendu (cards inline-block min-width:240px dans le feed). */
.th9 > .th9-row-top > *,
.th9 > .th9-row-stats > *,
.th9 > .th9-row-mid > *,
.th9 > .th9-row-bot > * {
    min-width: 0;
}
.th9-row-top, .th9-row-stats, .th9-row-mid, .th9-row-bot { min-width: 0; }
.th9-row-stats { display: grid; grid-template-columns: 1fr; }

/* ═══ Card ═══ */
.th9-card {
    background: var(--th9-bg);
    border: 1px solid var(--th9-border);
    border-radius: 14px;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: box-shadow .3s ease;
}

/* ═══════════════════════════════════
   ROW 1 : Profil + KPIs
   ═══════════════════════════════════ */
.th9-row-top { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Profile */
.th9-rank-accent { display: none !important; }

/* Épaissir la bordure de la carte Profil avec la couleur dynamique du rang */
.th9-profile {
    border-width: 2px !important;
    border-color: color-mix(in srgb, var(--th9-rank) 40%, transparent) !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--th9-rank) 15%, transparent), rgba(0,0,0,0.6)) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 0 15px color-mix(in srgb, var(--th9-rank) 5%, transparent);
    display: flex;
    align-items: center;
}

.th9-profile-inner { 
    width: 100%;
    padding: 20px 24px; /* Marges internes plus généreuses */
    display: flex; 
    align-items: center; 
    gap: 24px; /* On écarte l'avatar, le texte et le NFT */
}

/* Avatar (Correction : Carré parfait pour un cercle parfait) */
.th9-avatar-wrap { 
    position: relative; 
    width: 76px; /* Identique à la hauteur */
    height: 76px; 
    flex-shrink: 0; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.th9-avatar-label { 
    display: block; 
    width: 100%; 
    height: 100%; 
    border-radius: 50%; 
    cursor: pointer; 
    overflow: hidden; 
}

.th9-avatar {
    width: 100% !important; 
    height: 100% !important; 
    border-radius: 50% !important; 
    /* 💡 Le "cover" remplit tout le cercle sans déformer l'image */
    object-fit: cover !important; 
    background: transparent !important;
    border: 2px solid color-mix(in srgb, var(--th9-rank) 30%, transparent) !important;
    transition: transform .3s, border-color .3s, box-shadow .3s;
    display: block !important;
    margin: 0 !important;
}

/* Effets au survol */
.th9-avatar-wrap:hover .th9-avatar { 
    border-color: var(--th9-rank) !important; 
    transform: scale(1.05); 
    box-shadow: 0 0 14px color-mix(in srgb, var(--th9-rank) 35%, transparent); 
}

/* Badge d'édition (Crayon) */
.th9-avatar-badge {
    position: absolute; 
    top: 2px; /* Ajusté pour le nouveau cercle */
    right: 2px; 
    width: 22px; 
    height: 22px;
    border-radius: 50%; 
    background: var(--th9-rank); 
    border: 2px solid #0a0a12;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 10px; 
    color: #fff; 
    opacity: 0; 
    transition: opacity .25s; 
    cursor: pointer;
    z-index: 3;
}
.th9-avatar-wrap:hover .th9-avatar-badge { opacity: 1; }

/* Point de statut en ligne */
.th9-avatar-online {
    position: absolute; 
    bottom: 4px; /* Ajusté pour le nouveau cercle */
    right: 4px; 
    width: 14px; 
    height: 14px;
    border-radius: 50%; 
    background: var(--th9-green); 
    border: 2px solid #0a0a12;
    box-shadow: 0 0 8px rgba(30,193,21,0.4);
    z-index: 3;
}
/* Profile info */
.th9-profile-info { 
    flex: 1; 
    min-width: 0; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

/* Pseudo */
.th9-pseudo-zone { height: 26px; position: relative; margin: 0; }
.th9-pseudo-row { display: flex; align-items: center; gap: 6px; position: absolute; top: 0; left: 0; right: 0; height: 26px; }
.th9-pseudo-edit-wrap { position: absolute; top: 0; left: 0; right: 0; height: 26px; align-items: center; gap: 4px; }
.th9-pseudo { font-size: 14px; font-weight: 900; color: #fff; text-transform: uppercase; letter-spacing: -0.3px; }
.th9-pseudo-edit-btn { 
    background: transparent !important; 
    border: none !important; 
    color: rgba(255,255,255,0.35) !important; 
    cursor: pointer; 
    padding: 2px; 
    transition: color 0.2s, transform 0.2s; 
    outline: none !important;
    box-shadow: none !important;
}
.th9-pseudo-edit-btn:hover { 
    color: var(--th9-rank) !important; /* Force la couleur dynamique de ton rang */
    background: transparent !important;
    transform: scale(1.1); /* Petit effet de zoom sympa */
}.th9-pseudo-input {
    background: rgba(0,0,0,0.5) !important; border: 1px solid var(--th9-rank) !important;
    color: #fff !important; padding: 3px 8px !important; border-radius: 6px !important;
    font-size: 13px; font-family: 'Outfit',sans-serif; width: 130px; outline: none; height: 24px;
}
.th9-pseudo-btn { padding: 3px 8px; border: none; border-radius: 5px; font-weight: 800; cursor: pointer; font-size: 11px; font-family: 'Outfit',sans-serif; height: 24px; }
.th9-pseudo-btn.save { background: #2ecc71; color: #000; }
.th9-pseudo-btn.cancel { background: rgba(255,255,255,0.08); color: #fff; }

/* ═══ Groupe Rang (Tahitien + Français) ═══ */
.th9-rank-group {
    display: flex;
    flex-direction: column;
    gap: 2px; /* Petit espacement vertical entre le tahitien et le français */
    margin-bottom: 2px;
}

.th9-rank-line { 
    display: flex; 
    align-items: center; 
    gap: 6px; /* Espace entre l'emoji et le nom tahitien */
    margin: 0; 
}

.th9-rank-emoji { 
    font-size: 13px; 
}

.th9-rank-tah { 
    font-size: 11px; 
    font-weight: 800; 
    color: var(--th9-rank); 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    text-shadow: 0 0 10px color-mix(in srgb, var(--th9-rank) 35%, transparent); 
}

/* Le sous-titre en français et le niveau */
.th9-rank-fr { 
    font-size: 9px; 
    color: rgba(255, 255, 255, 0.6); 
    font-weight: 700; 
    text-transform: uppercase; /* En majuscule, c'est plus technique/gaming */
    letter-spacing: 0.5px; 
    margin: 0; 
}.th9-rank-desc { 
    font-size: 11px; /* Retour à la petite taille ! */
    color: rgba(255,255,255,0.85); 
    font-weight: 500; 
    line-height: 1.3; 
    font-style: italic; /* Petit bonus : en italique ça fait plus "citation" */
}
/* Mana */
.th9-mana { margin-top: 4px; width: 100%; }
.th9-mana-labels { display: flex; justify-content: space-between; font-size: 8px; font-weight: 700; margin-bottom: 3px; }
.th9-mana-labels span:first-child { color: rgba(255,255,255,0.7); letter-spacing: 1.5px; }
.th9-mana-labels span:last-child { color: var(--th9-rank); }
.th9-mana-bar { position: relative; background: rgba(0,0,0,0.4); height: 5px; border-radius: 3px; border: 1px solid color-mix(in srgb, var(--th9-rank) 18%, transparent); overflow: hidden; }
.th9-mana-fill { position: absolute; top: 0; left: 0; height: 100%; border-radius: 3px; width: 0%; background: var(--th9-rank); transition: width 1.5s cubic-bezier(.16,1,.3,1); box-shadow: 0 0 8px var(--th9-rank); overflow: hidden; }
.th9-mana-shimmer { position: absolute; top: 0; left: 0; height: 100%; width: 100%; border-radius: 3px; background: linear-gradient(90deg,transparent,rgba(255,255,255,0.25),transparent); background-size: 200% 100%; animation: th9shimmer 2.5s infinite; }

/* NFT Artisan */
.th9-nft-artisan { flex-shrink: 0; }
.th9-nft-artisan-link { display: block; border-radius: 8px; overflow: hidden; max-width: 52px; transition: transform .3s, box-shadow .3s; }
.th9-nft-artisan-link:hover { transform: scale(1.05); box-shadow: 0 0 16px color-mix(in srgb, var(--th9-rank) 30%, transparent); }
.th9-nft-artisan-link img { width: 100%; height: auto; border-radius: 8px; display: block; }

/* - KPIs - */
.th9-overview { padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; }
.th9-overview-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 18px; }
.th9-kpi { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 10px; border: 1px solid; gap: 1px; }
.th9-kpi-num {
    font-family: 'JetBrains Mono',monospace !important; font-size: 28px !important; font-weight: 900 !important;
    line-height: 1.1 !important; margin: 0 !important; padding: 0 !important;
    border: none !important; background: transparent !important; box-shadow: none !important; display: block !important;
}
.th9-kpi-gold { background: rgba(255,215,0,0.08); border-color: rgba(255,215,0,0.25) !important; }
.th9-kpi-gold .th9-kpi-tag { color: var(--th9-gold); }
.th9-kpi-gold .th9-kpi-num { color: var(--th9-gold) !important; }
.th9-kpi-green { background: rgba(30,193,21,0.08); border-color: rgba(30,193,21,0.25) !important; }
.th9-kpi-green .th9-kpi-tag { color: var(--th9-green); }
.th9-kpi-green .th9-kpi-num { color: var(--th9-green) !important; }
.th9-kpi-cyan { background: rgba(0,242,255,0.08); border-color: rgba(0,242,255,0.25) !important; }
.th9-kpi-cyan .th9-kpi-tag { color: var(--th9-cyan); }
.th9-kpi-cyan .th9-kpi-num { color: var(--th9-cyan) !important; }

/* ═══ Converter Widget (Nouveau Layout) ═══ */
.th9-converter { 
    background: linear-gradient(135deg, rgba(255, 0, 153, 0.1), rgba(0, 0, 0, 0.6)); 
    border: 1px solid rgba(255, 0, 153, 0.3); 
    border-radius: 10px; 
    padding: 12px 14px; /* Un peu plus d'espace vertical */
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2), 0 4px 15px rgba(255, 0, 153, 0.05);
    margin-top: 4px; 
    display: flex;
    flex-direction: column; /* Empile le titre et les actions */
    align-items: center; /* Centre le contenu */
    gap: 8px; /* Sépare le texte des boutons */
}

.th9-converter-label {
    font-size: 10px; 
    font-weight: 800; 
    color: rgba(255,255,255,0.85); 
    text-transform: uppercase; 
    letter-spacing: 0.8px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    width: 100%;
}

.th9-converter-row { 
    display: flex; 
    align-items: center; 
    justify-content: center; /* Centre parfaitement les boutons */
    gap: 12px; 
    width: 100%;
    height: auto;
}

/* ═══ Stepper Convertisseur (Tailles harmonisées) ═══ */
.th9-stepper { 
    display: flex; 
    align-items: center; 
    height: 28px; 
    margin-left: 0; /* On retire la marge qui poussait à droite */
}

.th9-stepper-btn {
    width: 28px; 
    height: 28px !important; /* Force la hauteur */
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06) !important; 
    border: 1px solid rgba(255,0,153,0.3) !important;
    cursor: pointer; 
    color: var(--th9-pink) !important; 
    font-size: 16px !important; 
    font-weight: 700;
    transition: all .2s; 
    font-family: 'Outfit',sans-serif;
    box-sizing: border-box !important; /* Empêche les débordements */
    padding: 0 !important; 
    margin: 0 !important;
    line-height: 1 !important;
}
.th9-stepper-btn:first-child { border-radius: 6px 0 0 6px !important; }
.th9-stepper-btn:last-child { border-radius: 0 6px 6px 0 !important; }
.th9-stepper-btn:hover { 
    background: rgba(255,0,153,0.2) !important; 
    color: #fff !important; 
}
.th9-stepper-val {
    width: 36px; 
    height: 28px !important; /* Même hauteur exacte que les boutons */
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.5) !important; 
    border-top: 1px solid rgba(255,0,153,0.3) !important; 
    border-bottom: 1px solid rgba(255,0,153,0.3) !important;
    border-left: none !important; 
    border-right: none !important;
    font-family: 'JetBrains Mono',monospace; 
    font-size: 13px !important; 
    font-weight: 700; 
    color: #fff !important;
    box-sizing: border-box !important; /* Empêche les débordements */
    padding: 0 !important; 
    margin: 0 !important;
}.th9-cta-convert {
    padding: 5px 12px !important; border-radius: 6px !important;
    border: 1px solid var(--th9-pink) !important;
    background: transparent !important;
    color: var(--th9-pink) !important; font-size: 9px !important; font-weight: 800 !important;
    font-family: 'Outfit',sans-serif !important; text-transform: uppercase !important;
    letter-spacing: 0.8px !important; cursor: pointer !important; transition: all .25s !important;
    box-shadow: none !important;
    height: 28px; display: flex; align-items: center; white-space: nowrap;
}
.th9-cta-convert:hover { 
    background: linear-gradient(135deg, var(--th9-pink), #cc0077) !important;
    color: #fff !important;
    box-shadow: 0 5px 20px rgba(255,0,153,0.5) !important; 
}
.th9-convert-msg { font-size: 9px; color: rgba(255,255,255,0.4); min-height: 0; }

/* ═══════════════════════════════════
   ROW 2 : Stats horizontal + Progression
   ═══════════════════════════════════ */
.th9-row-mid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.th9-activity { padding: 14px 16px; display: flex; align-items: center; }
.th9-activity-row { display: grid; grid-template-columns: repeat(5,1fr); gap: 5px; width: 100%; }
.th9-stat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.th9-stat-num { font-family: 'JetBrains Mono',monospace; font-size: 24px; font-weight: 900; line-height: 1.15; }
.th9-stat-forged .th9-stat-num { color: #ffffff; }
.th9-stat-sold .th9-stat-num { color: #ffffff; }
.th9-stat-published .th9-stat-num { color: #ffffff; }
.th9-stat-unlocked .th9-stat-num { color: #ffffff; }
.th9-stat-followers .th9-stat-num { color: #ffffff; }


/* Progression */
.th9-progression { padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; }
.th9-streak-group { margin-bottom: 10px; }
.th9-streak-group:last-child { margin-bottom: 0; }
.th9-streak-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.th9-streak-val { font-family: 'JetBrains Mono',monospace; font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.95); }
.th9-bar-bg { height: 6px; border-radius: 4px; background: rgba(255,255,255,0.06); overflow: hidden; }
.th9-bar-fill { height: 100%; border-radius: 4px; width: 0%; transition: width 1.2s cubic-bezier(.16,1,.3,1); }
.th9-bar-orange { background: linear-gradient(90deg,#f39c12,#e67e22); box-shadow: 0 0 8px rgba(243,156,18,0.35); }
.th9-bar-blue { background: linear-gradient(90deg,#3b82f6,#8b5cf6); box-shadow: 0 0 8px rgba(59,130,246,0.35); }

/* ═══════════════════════════════════
   AMÉLIORATION DE LA LISIBILITÉ (Fonds dégradés)
   ═══════════════════════════════════ */
.th9-kpi-tag, .th9-stat-name, .th9-streak-label, .th9-converter-label {
    font-size: 10px; 
    font-weight: 600;
    text-transform: uppercase; 
    letter-spacing: 0.2px;
    color: rgba(255,255,255,0.75); 
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.th9-kpi-tag { font-size: 9px; }
.th9-streak-label { font-size: 11px; text-transform: none; }

/* Renforcement des gros chiffres pour qu'ils "pop" davantage */
.th9-kpi-num, .th9-stat-num {
    text-shadow: 0 2px 10px rgba(0,0,0,0.5), 0 0 14px currentColor !important;
}

/* ═══════════════════════════════════
   ROW 3 : Feed (Emporium / Observatoire)
   ═══════════════════════════════════ */
.th9-row-bot { }

/* Fonds dynamiques selon l'onglet */
.th9-feed { 
    padding: 14px 16px; 
    overflow: visible; 
    transition: background 0.4s ease, border-color 0.4s ease;
}

.th9-feed.theme-emporium {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(0, 0, 0, 0.6)) !important;
    border-color: rgba(34, 197, 94, 0.35) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 4px 20px rgba(34, 197, 94, 0.05);
}

.th9-feed.theme-observatoire {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(0, 0, 0, 0.6)) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 4px 20px rgba(59, 130, 246, 0.05);
}
.th9-feed-head { display: flex; align-items: center; margin-bottom: 10px; }

/* Onglets (Boutons) - Plus contrastés */
.th9-feed-tab {
    background: rgba(0, 0, 0, 0.5) !important; 
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px; padding: 5px 14px;
    font-family: 'Outfit',sans-serif; font-size: 11px; font-weight: 700;
    color: rgba(255,255,255,0.6) !important; cursor: pointer; transition: all .25s;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.th9-feed-tab:hover { background: rgba(255,255,255,0.1) !important; color: #fff !important; }

.th9-feed-tab.tab-emporium.active { 
    background: rgba(34, 197, 94, 0.2) !important; 
    border-color: rgba(34, 197, 94, 0.6) !important; 
    color: #22C55e !important; 
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}
.th9-feed-tab.tab-observatoire.active { 
    background: rgba(59, 130, 246, 0.2) !important; 
    border-color: rgba(59, 130, 246, 0.6) !important; 
    color: #60a5fa !important; 
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

/* Fix Hauteur */
.th9-feed-panel {
    overflow: hidden;        /* empeche les cards Ta'iara-PRO (inline-block) de pousser le layout parent */
    min-width: 0;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Feed scroll */
.th9-feed-scroll {
    display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 6px; scroll-snap-type: x mandatory;
    width: 100%;
    min-width: 0;            /* contraint par le parent, le scroll horizontal prend le relais */
}

/* ═══════════════════════════════════════════════════════════
   Onglet Ta'iara-PRO : structure verticale (3 sections + stats)
   Override du flex-row par defaut pour permettre un layout block.
   ═══════════════════════════════════════════════════════════ */
#th9-pro-grid.th9-feed-scroll {
    display: block;
    overflow-x: visible;
    overflow-y: visible;
    padding: 4px 2px;
}

/* Bandeau Stats (4 KPI compacts alignes horizontalement) */
.thpro-stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
.thpro-stat {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    transition: border-color .2s, transform .2s;
}
.thpro-stat span {
    display: block;
    margin-top: 4px;
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(255,255,255,0.55);
}
.thpro-stat-offres     { color: #3498DB; border-color: rgba(52,152,219,0.30); }
.thpro-stat-employers  { color: #2ecc71; border-color: rgba(46,204,113,0.30); }
.thpro-stat-candidats  { color: #E74C3C; border-color: rgba(231,76,60,0.30); }
.thpro-stat-holders    { color: #9B59B6; border-color: rgba(155,89,182,0.30); }

/* Section generique (Offres / Candidats / Entreprises) */
.thpro-section { margin-bottom: 18px; }
.thpro-section:last-child { margin-bottom: 0; }

.thpro-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 2px;
}
.thpro-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.thpro-section-cta {
    font-size: 11px;
    font-weight: 600;
    color: #C17817;
    text-decoration: none;
    transition: color .2s;
    white-space: nowrap;
}
.thpro-section-cta:hover { color: #e6a035; }

/* Scroll horizontal des cards d'une section */
.thpro-section-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 0 8px;
    scroll-snap-type: x mandatory;
    min-width: 0;
}
.thpro-section-scroll::-webkit-scrollbar { height: 3px; }
.thpro-section-scroll::-webkit-scrollbar-track { background: transparent; }
.thpro-section-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

/* Card generique (offre / candidat / entreprise) */
.thpro-card {
    flex: 0 0 auto;
    min-width: 240px;
    max-width: 280px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px;
    scroll-snap-align: start;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
.thpro-card:hover {
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.thpro-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.3;
}
.thpro-card-sub { font-size: 11px; font-weight: 600; margin-bottom: 6px; }
.thpro-card-meta { font-size: 10px; color: #888; margin-bottom: 8px; }
.thpro-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.thpro-card-tag { font-size: 9px; padding: 2px 6px; border-radius: 8px; white-space: nowrap; }

/* Variante Offre (orange PRO) */
.thpro-card-job { cursor: pointer; }
.thpro-card-job.featured { border-color: rgba(193,120,23,0.35); }
.thpro-card-job .thpro-card-sub { color: #C17817; }
.thpro-card-job .thpro-card-tag { background: rgba(193,120,23,0.12); color: #C17817; }

/* Variante Candidat (violet) */
.thpro-card-cand .thpro-card-ref { font-size: 9px; color: #666; font-family: monospace; margin-bottom: 2px; }
.thpro-card-cand .thpro-card-sub { color: #9B59B6; }
.thpro-card-cand .thpro-card-tag { background: rgba(155,89,182,0.12); color: #9B59B6; }
.thpro-card-cand-cta {
    display: block;
    margin-top: 10px;
    font-size: 10px;
    color: #9B59B6;
    font-weight: 600;
    text-decoration: none;
}
.thpro-card-cand-cta:hover { color: #b77bc7; }
.thpro-card-cand-anon { font-size: 9px; color: #555; margin-top: 4px; }

/* Variante Entreprise (vert) */
.thpro-card-emp.featured { border-color: rgba(193,120,23,0.35); }
.thpro-card-emp .thpro-card-sub { color: #2ecc71; }
.thpro-card-emp .thpro-card-tag { background: rgba(46,204,113,0.12); color: #2ecc71; }

/* Etat vide / erreur */
.thpro-empty {
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    width: 100%;
}

/* Responsive mobile : stats en 2 colonnes */
@media (max-width: 640px) {
    .thpro-stats-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .thpro-stat { font-size: 18px; padding: 10px 6px; }
    .thpro-card { min-width: 200px; max-width: 240px; padding: 12px; }
}
.th9-feed-scroll::-webkit-scrollbar { height: 3px; }
.th9-feed-scroll::-webkit-scrollbar-track { background: transparent; }
.th9-feed-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
.th9-feed-loading, .th9-feed-empty { text-align: center; padding: 20px; font-size: 12px; color: rgba(255,255,255,0.3); width: 100%; }
.th9-feed-empty a { color: var(--th9-purple); text-decoration: none; font-weight: 700; }
.th9-feed-empty a:hover { text-decoration: underline; }

/* Mini Cards */
.th9-mini-card {
    min-width: 120px; max-width: 120px; flex-shrink: 0;
    scroll-snap-align: start;
    display: flex; flex-direction: column; align-items: center;
    padding: 14px 10px; border-radius: 10px; cursor: pointer;
    gap: 8px;
    background: #0d0d12 !important; border: 1px solid rgba(255,255,255,0.08);
    transition: all .3s cubic-bezier(.16,1,.3,1);
    text-align: center; gap: 4px;
}
.th9-mini-card:hover {
    transform: translateY(-3px); border-color: rgba(255,255,255,0.25);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.th9-mini-nft:hover { border-color: #22C55e; box-shadow: 0 8px 20px rgba(0,0,0,0.4), 0 0 12px rgba(34,197,94,0.2); }

/* Artisan avatar */
.th9-mini-avatar-wrap { position: relative; width: 44px; height: 44px; }
.th9-mini-avatar {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(255,255,255,0.12); transition: border-color .3s, box-shadow .3s;
}
.th9-mini-card:hover .th9-mini-avatar { border-color: #181d72; box-shadow: 0 0 10px rgba(24,29,114,0.5); }

/* Image ou Vidéo NFT */
.th9-mini-nft-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    margin-bottom: 2px;
    overflow: hidden;
    border-radius: 8px;
    flex-shrink: 0;
}

.th9-mini-nft-img {
    width: 44px;
    height: 44px;
    border-radius: 8px; 
    object-fit: cover; 
    object-position: center;
    background: #0d0d12; 
    border: 2px solid rgba(255, 255, 255, 0.12);
    transition: border-color .3s, box-shadow .3s;
    display: block;
    flex-shrink: 0;
}

.th9-nft-placeholder {
    background: linear-gradient(135deg, rgba(243,156,18,0.15), rgba(0,242,255,0.08));
}

.th9-mini-nft:hover .th9-mini-nft-img {
    border-color: #22C55e; 
    box-shadow: 0 0 10px rgba(34,197,94,0.3);
}

.th9-mini-badge {
    position: absolute; 
    top: 1px; 
    right: 1px; 
    padding: 2px 4px; 
    border-radius: 4px;
    font-size: 7px; 
    font-weight: 800; 
    text-transform: uppercase;
    background: rgba(0,0,0,0.8); 
    color: #22C55e; 
    border: 1px solid rgba(34,197,94,0.5);
    z-index: 2;
}

.th9-mini-name {
    font-size: 10px; font-weight: 700; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 95px;
}
.th9-mini-sub { font-size: 8px; color: rgba(255,255,255,0.5); font-weight: 600; }

/* Bubble NEW : aligne sur .th9-mini-badge (top:1px, right:1px) pour que le
   badge "NEW" des cards Artisan soit place au meme endroit que le badge
   "Relique" des cards NFT. Couleurs/contenu restent distincts. */
.th9-card-bubble {
    position: absolute;
    top: 1px;
    right: 1px;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(0,0,0,0.8);
    color: var(--th9-pink);
    border: 1px solid rgba(255,0,153,0.5);
    box-shadow: 0 0 8px rgba(255,0,153,0.3);
    z-index: 2;
    animation: th9fadeIn .4s ease;
}

/* Legacy KPI */
.kpi-num { font-family: 'JetBrains Mono',monospace !important; font-size: 28px !important; font-weight: 900 !important; line-height: 1 !important; }
.kpi-label { display: none !important; }

/* Toast */
#th9-toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 99999; display: flex; flex-direction: column-reverse; gap: 10px; pointer-events: none; }
.th9-toast { pointer-events: auto; background: rgba(10,10,18,.92); backdrop-filter: blur(20px); border: 1px solid; border-radius: 12px; padding: 14px 18px; min-width: 280px; max-width: 380px; display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.5); font-family: 'Outfit',sans-serif; }
.th9-toast-in { animation: th9slideIn .35s cubic-bezier(.16,1,.3,1) forwards; }
.th9-toast-out { animation: th9slideOut .4s ease forwards; }
.th9-toast-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.th9-toast-body { flex: 1; }
.th9-toast-title { font-size: 13px; font-weight: 700; color: #fff; }
.th9-toast-msg { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; }
.th9-toast-close { background: none; border: none; color: rgba(255,255,255,.25); cursor: pointer; font-size: 18px; padding: 0 0 0 8px; line-height: 1; }

/* Fonds dégradés thématiques pour les sections */
.th9-overview { background: linear-gradient(135deg, rgba(0, 242, 255, 0.05) 0%, rgba(255, 215, 0, 0.03) 50%, rgba(30, 193, 21, 0.05) 100%) !important; }
.th9-activity { background: linear-gradient(135deg, rgba(0, 242, 255, 0.05) 0%, rgba(243, 156, 18, 0.03) 33%, rgba(139, 92, 246, 0.03) 66%, rgba(30, 193, 21, 0.05) 100%) !important; }
.th9-progression { background: linear-gradient(135deg, rgba(243, 156, 18, 0.06) 0%, rgba(59, 130, 246, 0.06) 100%) !important; }

/* Responsive */
@media (max-width: 1024px) {
    .th9-row-top, .th9-row-mid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .th9-profile-inner { flex-wrap: wrap; gap: 10px; }
    .th9-activity-row { grid-template-columns: repeat(2,1fr); }
    .th9-kpi-num { font-size: 22px !important; }
    .th9-stat-num { font-size: 20px; }
}
@media (max-width: 480px) {
    .th9-overview-grid { gap: 6px; }
    .th9-kpi { padding: 8px 4px; }
    .th9-kpi-num { font-size: 18px !important; }
    .th9-activity-row { grid-template-columns: repeat(2,1fr); }
    .th9-mini-card { min-width: 95px; max-width: 95px; }
}

/* ═══ Badge VIP Artisan (Blanc Lumineux) ═══ */
.th9-artisan-badge {
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: #ffffff !important; /* Force le blanc */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s, color 0.3s;
    cursor: pointer;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6)); /* Halo blanc diffus */
    margin-top: 2px;
    text-decoration: none !important; /* Sécurité contre les soulignements */
}
.th9-artisan-badge svg { 
    width: 16px; 
    height: 16px; 
}
.th9-artisan-badge:hover {
    color: #ffffff !important; /* Empêche le bleu par défaut du site au survol */
    transform: scale(1.2) rotate(15deg);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9)); /* Halo blanc très lumineux au survol */
}

/* ═══ Slot d'équipement NFT (Dashboard Profil) - Grille 2x2 ═══ */
.th9-equipped-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}
.th9-equipped-slot {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 4px;
}
.th9-equipped-label {
    font-size: 8px; 
    font-weight: 800; 
    text-transform: uppercase; 
    color: rgba(255,255,255,0.5); 
    letter-spacing: 0.5px;
}
.th9-equipped-link {
    width: 64px; 
    height: 64px; 
    border-radius: 8px; 
    border: 1px solid rgba(255, 255, 255, 0.3); /* Bordure blanche discrète */
    background: #0d0d12;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1); /* Ombre blanche douce */
    overflow: hidden; 
    display: block;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.th9-equipped-link:hover {
    transform: scale(1.05); 
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6); /* Effet néon blanc vif au survol */
    border-color: #ffffff; /* Bordure blanche pure */
}
.th9-equipped-link img {
    width: 100%; 
    height: 100%; 
    object-fit: cover;
}
/* Sanctum tab */
.th9-feed.theme-sanctum {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.15), rgba(0, 0, 0, 0.6)) !important;
    border-color: rgba(241, 196, 15, 0.35) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 4px 20px rgba(241, 196, 15, 0.05);
}
.th9-feed-tab.tab-sanctum.active {
    background: rgba(241, 196, 15, 0.2) !important;
    border-color: rgba(241, 196, 15, 0.6) !important;
    color: #f1c40f !important;
    box-shadow: 0 0 12px rgba(241, 196, 15, 0.3);
}
#th9-sanctum-grid .th9-mini-badge {
    color: #f1c40f;
    border-color: rgba(241, 196, 15, 0.5);
}
#th9-sanctum-grid .th9-mini-nft:hover {
    border-color: #f1c40f;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4), 0 0 12px rgba(241, 196, 15, 0.2);
}
#th9-sanctum-grid .th9-mini-nft:hover .th9-mini-nft-img {
    border-color: #f1c40f;
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}
#th9-obs-grid .th9-mini-card:hover {
    border-color: #60a5fa;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4), 0 0 12px rgba(59, 130, 246, 0.2);
}
#th9-obs-grid .th9-mini-card:hover .th9-mini-avatar {
    border-color: #60a5fa;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* ═══════════════════════════════════════════════
   🔧 RESPONSIVE PATCH - Sanctuaire Dashboard v9
   ═══════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   🔧 RESPONSIVE V3 - Sanctuaire Dashboard
   Layout mobile : rectangles horizontaux empilés
   ═══════════════════════════════════════════════ */

/* Anti-débordement global - clip au lieu de hidden pour permettre le scroll des enfants */
.th9, .th9 * { box-sizing: border-box; }
.th9 { max-width: 100%; overflow-x: clip; }

/* ═══ TABLETTE ≤ 1024px ═══ */
@media (max-width: 1024px) {
    .th9-row-top, .th9-row-mid { grid-template-columns: 1fr; }

    /* Éclater les contraintes Elementor */
    .th9 {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    /* Forcer le conteneur parent Elementor à lâcher le contenu */
    .elementor-widget-container:has(.th9),
    .elementor-element:has(.th9),
    .e-con:has(.th9),
    .e-con-inner:has(.th9) {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow-x: clip !important;
    }
}

/* ═══ MOBILE ≤ 768px - Refonte complète ═══ */
@media (max-width: 768px) {

    /* Éclater Elementor - conteneurs parents */
    .elementor-widget-container:has(.th9),
    .elementor-element:has(.th9),
    .e-con:has(.th9),
    .e-con-inner:has(.th9),
    .elementor-widget-shortcode:has(.th9) {
        max-width: 100vw !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-x: clip !important;
    }

    /* Le dashboard lui-même */
    .th9 {
        padding: 0 6px 16px !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    .th9-card {
        border-radius: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* ── ROW TOP → 1 colonne, forcer la largeur ── */
    .th9-row-top, .th9-row-mid, .th9-row-bot {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ══════════════════════════════════
       PROFIL → Rectangle horizontal compact
       ══════════════════════════════════ */
    .th9-profile {
        padding: 0 !important;
    }
    .th9-profile-inner {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        padding: 12px !important;
        gap: 12px !important;
        width: 100% !important;
        overflow-x: clip !important;
    }

    /* Avatar petit et rond */
    .th9-avatar-wrap {
        width: 50px !important;
        height: 50px !important;
        flex-shrink: 0 !important;
    }
    .th9-avatar {
        width: 50px !important;
        height: 50px !important;
    }
    .th9-avatar-badge { display: none !important; }
    .th9-avatar-online {
        width: 10px !important;
        height: 10px !important;
        bottom: 2px !important;
        right: 2px !important;
    }

    /* Info profil : compact, aligné à gauche */
    .th9-profile-info {
        flex: 1 !important;
        min-width: 0 !important;
        gap: 4px !important;
        align-items: flex-start !important;
        text-align: left !important;
    }
    .th9-pseudo-zone { height: 20px !important; }
    .th9-pseudo { font-size: 12px !important; }
    .th9-pseudo-edit-btn svg { width: 9px !important; height: 9px !important; }
    .th9-rank-group { gap: 1px !important; }
    .th9-rank-emoji { font-size: 11px !important; }
    .th9-rank-tah { font-size: 10px !important; }
    .th9-rank-fr { font-size: 8px !important; }
    .th9-rank-desc { font-size: 9px !important; display: none !important; }

    /* Barre mana compacte */
    .th9-mana { margin-top: 2px !important; width: 100% !important; }
    .th9-mana-labels span { font-size: 7px !important; }
    .th9-mana-bar { height: 4px !important; }

    /* Slots équipement → cachés en mobile (gain de place) */
    .th9-equipped-slots { display: none !important; }

    /* Artisan badge → petit */
    .th9-artisan-badge svg { width: 12px !important; height: 12px !important; }

    /* ══════════════════════════════════
       KPIs → Rectangle horizontal, 3 en ligne
       ══════════════════════════════════ */
    .th9-overview {
        padding: 10px 8px !important;
    }
    .th9-overview-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }
    .th9-kpi {
        padding: 8px 4px !important;
        border-radius: 8px !important;
    }
    .th9-kpi-num {
        font-size: 22px !important;
    }
    .th9-kpi-tag {
        font-size: 7px !important;
        letter-spacing: 0.3px !important;
    }

    /* Convertisseur compact */
    .th9-converter {
        padding: 8px 10px !important;
        margin-top: 6px !important;
    }
    .th9-converter-label { font-size: 9px !important; }
    .th9-converter-row {
        gap: 8px !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
    }
    .th9-stepper-btn { width: 26px !important; height: 26px !important; }
    .th9-stepper-val { width: 34px !important; height: 26px !important; font-size: 12px !important; }
    .th9-cta-convert { font-size: 9px !important; height: 26px !important; padding: 4px 10px !important; }

    /* ══════════════════════════════════
       STATS → Rectangle horizontal, 5 en ligne (compact)
       ══════════════════════════════════ */
    .th9-activity {
        padding: 10px 6px !important;
    }
    .th9-activity-row {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 2px !important;
    }
    .th9-stat-num {
        font-size: 18px !important;
    }
    .th9-stat-name {
        font-size: 7px !important;
        letter-spacing: 0 !important;
        line-height: 1.2 !important;
    }

    /* ══════════════════════════════════
       PROGRESSION → Rectangle horizontal
       ══════════════════════════════════ */
    .th9-progression {
        padding: 10px 12px !important;
    }
    .th9-streak-label { font-size: 10px !important; }
    .th9-streak-val { font-size: 10px !important; }

    /* ══════════════════════════════════
       FEED → Onglets scrollables + cartes défilantes
       ══════════════════════════════════ */
    .th9-feed {
        padding: 10px 8px !important;
        overflow: hidden !important;
    }
    .th9-feed-panel {
        overflow: visible !important;
        overflow-x: clip !important;
    }
    .th9-feed-head {
        margin-bottom: 8px !important;
        overflow-x: auto !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap !important;
    }
    .th9-feed-head::-webkit-scrollbar { display: none; }
    .th9-feed-tabs {
        display: flex !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
    }
    .th9-feed-tab {
        font-size: 10px !important;
        padding: 5px 12px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    /* Feed scroll horizontal - LE scroll qui compte */
    .th9-feed-scroll {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: scroll !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 8px !important;
        padding: 4px 20px 12px 2px !important;
        scrollbar-width: thin;
        scroll-snap-type: x mandatory;
        width: 100% !important;
        max-width: 100% !important;
    }
    .th9-feed-scroll::-webkit-scrollbar { height: 3px; }
    .th9-feed-scroll::-webkit-scrollbar-track { background: transparent; }
    .th9-feed-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

    .th9-mini-card {
        min-width: 95px !important;
        max-width: 95px !important;
        padding: 10px 6px !important;
    }
    .th9-mini-nft-wrap,
    .th9-mini-nft-img { width: 38px !important; height: 38px !important; }
    .th9-mini-avatar { width: 38px !important; height: 38px !important; }
    .th9-mini-name { font-size: 8px !important; max-width: 85px !important; }
    .th9-mini-sub { font-size: 7px !important; }
    .th9-mini-badge { font-size: 6px !important; padding: 1px 3px !important; }

    /* Toast pleine largeur */
    #th9-toast-wrap {
        right: 8px !important;
        left: 8px !important;
        bottom: 10px !important;
    }
    .th9-toast {
        min-width: unset !important;
        max-width: 100% !important;
        padding: 10px 14px !important;
        font-size: 12px !important;
    }

    /* Modale profil */
    #th-profile-modal > div {
        max-width: 95vw !important;
        padding: 20px 16px !important;
    }
}

/* ═══ PETIT MOBILE ≤ 480px ═══ */
@media (max-width: 480px) {

    .th9 {
        padding: 0 4px 12px !important;
        gap: 8px !important;
    }

    /* Profil encore plus compact */
    .th9-profile-inner {
        padding: 10px !important;
        gap: 10px !important;
    }
    .th9-avatar-wrap { width: 44px !important; height: 44px !important; }
    .th9-avatar { width: 44px !important; height: 44px !important; }
    .th9-pseudo { font-size: 11px !important; }
    .th9-rank-tah { font-size: 9px !important; }

    /* KPIs */
    .th9-kpi-num { font-size: 20px !important; }
    .th9-kpi-tag { font-size: 6px !important; }
    .th9-kpi { padding: 6px 3px !important; }

    /* Stats : 3 colonnes (les 2 dernières wrappent) */
    .th9-activity-row {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 3px !important;
    }
    .th9-stat-num { font-size: 16px !important; }
    .th9-stat-name { font-size: 6px !important; }

    /* Feed */
    .th9-feed-tab { font-size: 9px !important; padding: 4px 9px !important; }
    .th9-mini-card { min-width: 85px !important; max-width: 85px !important; }
    .th9-mini-nft-wrap, .th9-mini-nft-img, .th9-mini-avatar {
        width: 34px !important; height: 34px !important;
    }
    .th9-mini-name { font-size: 7px !important; }

    /* Convertisseur */
    .th9-stepper-btn { width: 24px !important; height: 24px !important; }
    .th9-stepper-val { width: 30px !important; height: 24px !important; font-size: 11px !important; }
    .th9-cta-convert { font-size: 8px !important; padding: 3px 8px !important; height: 24px !important; }
}

/* ═══ TRÈS PETIT ≤ 380px ═══ */
@media (max-width: 380px) {
    .th9-kpi-num { font-size: 18px !important; }
    .th9-activity-row { grid-template-columns: repeat(2, 1fr) !important; }
    .th9-mini-card { min-width: 78px !important; max-width: 78px !important; padding: 6px 4px !important; }
    .th9-mini-nft-wrap, .th9-mini-nft-img, .th9-mini-avatar { width: 30px !important; height: 30px !important; }
}

/* ═════════════════════════════════════════════════════════════════════
   DESIGN SYSTEM V2 — scopé sous .th9.th9-v2
   Layout : Profil large (2/3) + colonne droite (KPIs+convert+rituels)
   puis 5 stats horizontaux, puis Vault avec onglets pills.
   Couleurs reprises de V1 (cyan/gold/green/orange/blue/pink),
   structure inspirée du prototype Tailwind.
   ═════════════════════════════════════════════════════════════════════ */
.th9.th9-v2 {
    /* Tokens couleur — repris du système V1 (transparent + glass) */
    --thv2-bg-page: transparent;
    --thv2-bg-card: rgba(255, 255, 255, 0.05);
    --thv2-bg-card-deep: rgba(0, 0, 0, 0.35);
    --thv2-bg-deep: rgba(11, 11, 15, 0.95);
    --thv2-border: rgba(255, 255, 255, 0.12);
    --thv2-border-soft: rgba(255, 255, 255, 0.05);
    --thv2-border-strong: rgba(255, 255, 255, 0.18);
    --thv2-text-0: #f5f6fa;
    --thv2-text-1: #c9c4b3;
    --thv2-text-2: rgba(255, 255, 255, 0.55);
    --thv2-text-3: rgba(255, 255, 255, 0.35);
    /* Couleurs des KPI alignées V1 */
    --thv2-cyan: #00f2ff;       /* Reliques Ta'iara */
    --thv2-gold: #ffd700;       /* Tīteti / Mana / convert btn */
    --thv2-green: #1ec115;      /* Runes */
    --thv2-orange: #f39c12;     /* Rituel hebdo */
    --thv2-purple: #8b5cf6;     /* Légende mensuelle / rang */
    --thv2-magenta: #ff0099;    /* Convertisseur action */
    /* Couleurs thématiques onglets vault (V1) */
    --thv2-emporium: #22C55e;       /* Emporium = vert */
    --thv2-sanctum: #f1c40f;        /* Sanctum = or */
    --thv2-observatoire: #3b82f6;   /* Observatoire = bleu */
    --thv2-pro: #8b5cf6;            /* Ta'iara-PRO = violet */
    --thv2-radius-card: 16px;
    --thv2-radius-inner: 12px;
    --thv2-pad: 22px;
    --thv2-gap: 24px;

    /* Reset du grid hérité de .th9 : V2 = stack vertical de sections */
    display: block !important;
    grid-template-rows: none !important;
    gap: 0 !important;
    padding-bottom: 16px;
    font-family: 'Montserrat', sans-serif;
    color: var(--thv2-text-0);
    overflow: visible;
}
.th9.th9-v2 > * { position: relative; z-index: 1; }

/* Carte générique V2 — style V1 transparent + glass */
.th9.th9-v2 .thv2-card {
    background: var(--thv2-bg-card) !important;
    border: 1px solid var(--thv2-border) !important;
    border-radius: var(--thv2-radius-card) !important;
    padding: var(--thv2-pad) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    margin-bottom: var(--thv2-gap);
    position: relative;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════
   ROW 1 : Grid 2/3 + 1/3
   align-items: start → la colonne droite ne stretch pas la colonne profil.
   ═══════════════════════════════════════════════════ */
.th9.th9-v2 .thv2-top-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--thv2-gap);
    margin-bottom: var(--thv2-gap);
    align-items: start;
}

/* ─── CARTE PROFIL (gauche, large) ─── */
/* Hauteur fixe matchant exactement la colonne droite (290px) */
.th9.th9-v2 .thv2-profile-card {
    padding: 22px 28px !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 28px !important;
    height: 320px !important;
    box-sizing: border-box !important;
    border: 2px solid color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 45%, transparent) !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 16%, transparent), rgba(0, 0, 0, 0.6)) !important;
    box-shadow:
        0 8px 32px color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 18%, transparent),
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 0 20px color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 8%, transparent) !important;
    transition: border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}
/* Glow halo qui matche le rang (remplace le glow doré statique) */
.th9.th9-v2 .thv2-profile-glow {
    background: color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 12%, transparent) !important;
}
/* Bordure de la séparation verticale (entre profil et clés) en couleur du rang aussi */
.th9.th9-v2 .thv2-keys {
    border-left-color: color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 25%, transparent) !important;
}
.th9.th9-v2 .thv2-profile-glow {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 256px;
    height: 256px;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 50%;
    filter: blur(48px);
    pointer-events: none;
}
.th9.th9-v2 .thv2-profile-info {
    flex: 1;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 8px 0;
    z-index: 1;
}
.th9.th9-v2 .thv2-profile-top {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    margin-bottom: 20px;
}
.th9.th9-v2 .thv2-avatar-ring {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    background: transparent !important;
    padding: 0 !important;
    flex-shrink: 0;
    box-shadow: none !important;
    border: 0 !important;
    overflow: visible;
}
.th9.th9-v2 .thv2-avatar-ring img.thv2-avatar {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    display: block !important;
}
.th9.th9-v2 .thv2-avatar-status {
    background: var(--thv2-green) !important;
    box-shadow: 0 0 8px var(--thv2-green) !important;
    border-color: var(--thv2-bg-card) !important;
}
.th9.th9-v2 .thv2-profile-meta {
    flex: 1;
    height: auto !important;
    padding: 0 !important;
}
.th9.th9-v2 .thv2-pseudo-zone {
    height: auto !important;
    margin-bottom: 4px;
}
.th9.th9-v2 .thv2-pseudo-row {
    position: static !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.th9.th9-v2 .thv2-pseudo {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.1;
}
/* Badge Artisan de la Forge : blanc avec halo blanc, halo plus marqué au survol */
.th9.th9-v2 .thv2-verified {
    color: #ffffff !important;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6)) !important;
    transition: filter 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.th9.th9-v2 .thv2-verified:hover {
    color: #ffffff !important;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 4px rgba(255, 255, 255, 0.6)) !important;
    transform: scale(1.15);
}
.th9.th9-v2 .thv2-verified svg { width: 14px; height: 14px; }
.th9.th9-v2 .thv2-edit-btn {
    color: var(--thv2-text-2) !important;
    transition: color 0.2s;
}
.th9.th9-v2 .thv2-edit-btn:hover { color: var(--thv2-text-0) !important; }
/* Rang sur 2 lignes : tahitien en haut, francais en dessous lisible */
.th9.th9-v2 .thv2-rank-block {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    margin-top: 4px;
}
.th9.th9-v2 .thv2-rank-tah-line {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
}
.th9.th9-v2 .thv2-rank-emoji {
    font-size: 16px !important;
}
.th9.th9-v2 .thv2-rank-tah {
    color: var(--th9-rank, var(--thv2-purple)) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    text-shadow: 0 0 10px color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 30%, transparent) !important;
}
.th9.th9-v2 .thv2-rank-fr {
    color: var(--thv2-text-1) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    margin-left: 0 !important;
}
.th9.th9-v2 .thv2-quote {
    color: var(--thv2-text-2) !important;
    font-size: 14px !important;
    font-style: italic !important;
    line-height: 1.6 !important;
    padding: 0 0 0 12px !important;
    border-left: 2px solid var(--thv2-border) !important;
    margin: 0 0 24px 0 !important;
    background: none !important;
}

/* MANA en bas du profile (V2) */
.th9.th9-v2 .thv2-mana {
    margin-top: auto;
    padding-top: 0;
    border-top: 0;
}
.th9.th9-v2 .thv2-mana-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
    font-size: 11px;
}
.th9.th9-v2 .thv2-mana-label {
    color: var(--thv2-text-2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
/* Couleur du Mana = couleur dynamique du rang (--th9-rank, mise à jour par le JS) */
.th9.th9-v2 .thv2-mana-amount {
    color: var(--th9-rank, var(--thv2-purple)) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    background: none !important;
    text-shadow: 0 0 8px color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 25%, transparent);
}
.th9.th9-v2 .thv2-mana-bar {
    height: 8px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border-radius: 100px !important;
    overflow: hidden;
}
.th9.th9-v2 .thv2-mana-fill {
    height: 100% !important;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 70%, #000),
        var(--th9-rank, var(--thv2-purple))
    ) !important;
    border-radius: 100px !important;
    box-shadow: 0 0 10px color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 35%, transparent) !important;
}

/* ─── BLOC CLES D'ACCES (droite du profile) ─── */
.th9.th9-v2 .thv2-keys {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding-left: 32px;
    flex-shrink: 0;
    z-index: 1;
}
/* Mêmes specs que les .thv2-stat-label (Reliques forgées, etc.) pour cohérence visuelle */
.th9.th9-v2 .thv2-keys-label {
    font-size: 10px !important;
    color: var(--thv2-text-2) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.16em !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    text-align: center;
    margin-bottom: 18px;
}
.th9.th9-v2 .thv2-keys-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    width: auto !important;
    margin: 0 !important;
}

/* Cellule clé : conteneur stack pour superposer placeholder verrouillé + slot réel */
.th9.th9-v2 .thv2-key-cell {
    position: relative;
    width: 92px;
    height: 92px;
    border-radius: 12px;
    overflow: hidden;
}

/* Placeholder verrouillé : image floutée + overlay "À débloquer" */
.th9.th9-v2 .thv2-key-locked-placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 35%, transparent);
    border-radius: 12px;
    overflow: hidden;
    display: block;
    transition: border-color 0.3s ease, transform 0.3s ease;
}
.th9.th9-v2 .thv2-locked-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Image visible mais noircie : grayscale partiel + forte baisse de luminosité */
    filter: grayscale(0.7) brightness(0.32) contrast(0.95);
    transition: filter 0.3s ease;
}
.th9.th9-v2 .thv2-locked-img:not([src]),
.th9.th9-v2 .thv2-locked-img[src=""] {
    /* Pas encore d'image config : fond uni pour ne pas afficher d'icone "image cassee" */
    background: rgba(255, 255, 255, 0.04);
}
.th9.th9-v2 .thv2-locked-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #ffffff;
    /* Voile sombre supplementaire pour forcer la lisibilite du texte */
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.3s ease;
}
.th9.th9-v2 .thv2-key-cell:hover .thv2-locked-placeholder,
.th9.th9-v2 .thv2-key-cell:hover .thv2-key-locked-placeholder {
    border-color: rgba(255, 255, 255, 0.35);
}
.th9.th9-v2 .thv2-key-cell:hover .thv2-locked-img {
    /* Au survol : un peu plus clair pour donner un teaser de l'image */
    filter: grayscale(0.4) brightness(0.5) contrast(0.95);
}
.th9.th9-v2 .thv2-key-cell:hover .thv2-locked-overlay {
    background: rgba(0, 0, 0, 0.25);
}
.th9.th9-v2 .thv2-lock-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    color: #ffffff;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
}
.th9.th9-v2 .thv2-lock-icon svg {
    width: 100%;
    height: 100%;
}
.th9.th9-v2 .thv2-lock-label {
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    text-align: center;
    padding: 0 4px;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.75);
}

/* Slot réel : se superpose au placeholder quand JS met display:block (ou flex).
   Bordure dans la couleur dynamique du rang (--th9-rank, mise à jour par le JS).
   IMPORTANT : pas de display:flex !important ici, sinon ça écrase le
   style="display:none" inline du HTML et le slot s'affiche par-dessus le
   placeholder même quand l'utilisateur ne possède pas le NFT (-> double bordure). */
.th9.th9-v2 .thv2-key-slot {
    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;
    width: auto !important;
    height: auto !important;
    background: var(--thv2-bg-deep) !important;
    border-radius: 12px !important;
    border: 1px solid color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 35%, transparent) !important;
    box-shadow: none !important;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    padding: 0 !important;
    align-items: center;
    justify-content: center;
}
.th9.th9-v2 .thv2-key-slot:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4),
                0 0 12px color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 25%, transparent) !important;
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 60%, transparent) !important;
}
/* Reset très agressif des bordures / outlines / décorations natives WP/Astra
   sur TOUS les enfants de .thv2-keys (cellule, link, img, figure, span, etc.).
   On ne garde que les 2 bordures intentionnelles : .thv2-key-locked-placeholder
   et .thv2-key-slot, qui re-déclarent leur propre border explicitement. */
.th9.th9-v2 .thv2-keys *,
.th9.th9-v2 .thv2-keys *::before,
.th9.th9-v2 .thv2-keys *::after,
.th9.th9-v2 .thv2-keys a,
.th9.th9-v2 .thv2-keys a:hover,
.th9.th9-v2 .thv2-keys a:focus,
.th9.th9-v2 .thv2-keys a:active,
.th9.th9-v2 .thv2-keys a:visited,
.th9.th9-v2 .thv2-keys a:focus-visible,
.th9.th9-v2 .thv2-keys img,
.th9.th9-v2 .thv2-keys figure,
.th9.th9-v2 .thv2-keys picture {
    border: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
/* Maintenant on ré-applique UNIQUEMENT les 2 bordures que l'on veut afficher */
.th9.th9-v2 .thv2-keys .thv2-key-locked-placeholder {
    border: 1px solid color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 35%, transparent) !important;
}
.th9.th9-v2 .thv2-keys .thv2-key-slot {
    border: 1px solid color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 35%, transparent) !important;
}
.th9.th9-v2 .thv2-keys .thv2-key-slot:hover {
    border-color: color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 60%, transparent) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4),
                0 0 12px color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 25%, transparent) !important;
}
.th9.th9-v2 .thv2-keys .thv2-key-cell:hover .thv2-key-locked-placeholder,
.th9.th9-v2 .thv2-keys .thv2-key-cell:hover .thv2-locked-placeholder {
    border-color: color-mix(in srgb, var(--th9-rank, var(--thv2-purple)) 55%, transparent) !important;
}
.th9.th9-v2 .thv2-key-slot .th9-equipped-link {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    background: transparent !important;
}
.th9.th9-v2 .thv2-key-slot .th9-equipped-link img,
.th9.th9-v2 .thv2-locked-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* ─── COLONNE DROITE : KPI mini + convert + rituels
   Rituels prend plus d'espace (1.4fr) pour aerer les 2 bandes de progression. */
/* Right-col en flex-column avec space-between :
   KPIs en haut, rituels en bas, converter centre avec espaces egaux au-dessus
   et en-dessous (l'espace libre est distribue equitablement entre les 3 sections). */
.th9.th9-v2 .thv2-right-col {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 320px;
    min-height: 0;
    gap: 0 !important;
}
.th9.th9-v2 .thv2-right-col > .thv2-kpis-row,
.th9.th9-v2 .thv2-right-col > .thv2-converter-card,
.th9.th9-v2 .thv2-right-col > .thv2-rituals-card {
    flex: 0 0 auto;
    margin: 0 !important;
}

/* 3 KPI compacts en row — la row prend une rangée du grid right-col,
   donc sa hauteur est exactement égale à celle de la station de change. */
.th9.th9-v2 .thv2-kpis-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    min-height: 0;
}
.th9.th9-v2 .thv2-kpi-mini {
    border-radius: 12px;
    padding: 12px 10px;
    display: grid !important;
    grid-template-rows: 30px 1fr !important;  /* label en haut (zone fixe 30px), num en dessous */
    justify-items: center;
    align-items: center;
    text-align: center;
    gap: 4px;
    height: 100%;
    /* Pas de backdrop-filter, pas d'inset shadow : élimine tout artefact rectangulaire */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid;
    position: relative;
    overflow: visible;
}
/* Le grid parent reserve 30px pour le label (rangee 1) et le reste pour
   le num (rangee 2). Resultat : meme baseline pour les 3 chiffres meme
   si les labels font 1 ou 2 lignes. */
.th9.th9-v2 .thv2-kpi-mini-label {
    grid-row: 1;
    width: 100%;
    text-align: center !important;
    align-self: center !important;
    justify-self: center !important;
}
.th9.th9-v2 .thv2-kpi-mini-num {
    grid-row: 2;
    width: 100%;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    justify-self: center !important;
}
.th9.th9-v2 .thv2-kpi-cyan  .thv2-kpi-mini-num {
    color: var(--thv2-cyan) !important;
    text-shadow: 0 0 18px rgba(0, 242, 255, 0.6);
}
.th9.th9-v2 .thv2-kpi-gold  .thv2-kpi-mini-num {
    color: var(--thv2-gold) !important;
    text-shadow: 0 0 18px rgba(255, 215, 0, 0.6);
}
.th9.th9-v2 .thv2-kpi-green .thv2-kpi-mini-num {
    color: var(--thv2-green) !important;
    text-shadow: 0 0 18px rgba(30, 193, 21, 0.6);
}
/* Neutralise les box-shadow + border + background hérités de tehono-public.css
   sur les spans .taiara-count, .titeti-count, .game-credits qui créaient un
   "rectangle" coloré derrière les chiffres dans les cartes KPI V2. */
.th9.th9-v2 .taiara-count,
.th9.th9-v2 .titeti-count,
.th9.th9-v2 .game-credits {
    box-shadow: none !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    min-width: 0 !important;
    height: auto !important;
}
/* Fonds V1 : tinte légère par couleur de KPI (cyan / gold / green) */
.th9.th9-v2 .thv2-kpi-cyan {
    background: rgba(0, 242, 255, 0.08) !important;
    border-color: rgba(0, 242, 255, 0.25) !important;
}
.th9.th9-v2 .thv2-kpi-cyan:hover { box-shadow: 0 0 20px rgba(0, 242, 255, 0.2); }
.th9.th9-v2 .thv2-kpi-gold {
    background: rgba(255, 215, 0, 0.08) !important;
    border-color: rgba(255, 215, 0, 0.25) !important;
}
.th9.th9-v2 .thv2-kpi-gold:hover { box-shadow: 0 0 20px rgba(255, 215, 0, 0.2); }
.th9.th9-v2 .thv2-kpi-green {
    background: rgba(30, 193, 21, 0.08) !important;
    border-color: rgba(30, 193, 21, 0.25) !important;
}
.th9.th9-v2 .thv2-kpi-green:hover { box-shadow: 0 0 20px rgba(30, 193, 21, 0.2); }
/* Tag (label) prend la couleur du KPI pour cohérence V1 */
.th9.th9-v2 .thv2-kpi-cyan .thv2-kpi-mini-label  { color: var(--thv2-cyan) !important; }
.th9.th9-v2 .thv2-kpi-gold .thv2-kpi-mini-label  { color: var(--thv2-gold) !important; }
.th9.th9-v2 .thv2-kpi-green .thv2-kpi-mini-label { color: var(--thv2-green) !important; }
.th9.th9-v2 .thv2-kpi-mini-label {
    font-size: 10px;
    color: var(--thv2-text-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    line-height: 1.15;
    display: flex;
    align-items: center;
    justify-content: center;
}
.th9.th9-v2 .thv2-kpi-mini-num {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    text-align: center !important;
}
.th9.th9-v2 .thv2-kpi-cyan .thv2-kpi-mini-num { color: var(--thv2-cyan); }
.th9.th9-v2 .thv2-kpi-gold .thv2-kpi-mini-num { color: var(--thv2-gold); }
.th9.th9-v2 .thv2-kpi-green .thv2-kpi-mini-num { color: var(--thv2-green); }

/* Carte convertisseur — fond V1 magenta, aérée */
.th9.th9-v2 .thv2-converter-card {
    margin: 0 !important;
    padding: 14px 18px !important;
    min-height: 0;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    background: linear-gradient(135deg, rgba(255, 0, 153, 0.1), rgba(0, 0, 0, 0.6)) !important;
    border: 1px solid rgba(255, 0, 153, 0.3) !important;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2), 0 4px 15px rgba(255, 0, 153, 0.05) !important;
}
.th9.th9-v2 .thv2-converter-label {
    font-size: 10px;
    color: var(--thv2-text-1);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    margin-bottom: 0;
}
.th9.th9-v2 .thv2-converter-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100%;
}
/* Hauteur de référence partagée entre stepper et bouton CONVERTIR (38px exact) */
.th9.th9-v2 .thv2-stepper,
.th9.th9-v2 .thv2-convert-btn {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    box-sizing: border-box !important;
}
.th9.th9-v2 .thv2-stepper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: var(--thv2-bg-deep) !important;
    border: 1px solid var(--thv2-border) !important;
    border-radius: 10px !important;
    overflow: hidden;
    padding: 0 !important;
    width: 100% !important;       /* prend toute la largeur de sa colonne grid */
    box-sizing: border-box !important;
}
.th9.th9-v2 .thv2-stepper-btn {
    background: transparent !important;
    border: 0 !important;
    color: var(--thv2-text-1) !important;
    width: 36px !important;
    height: 100% !important;
    padding: 0 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.th9.th9-v2 .thv2-stepper-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.06) !important;
}
.th9.th9-v2 .thv2-stepper-btn-plus {
    color: var(--thv2-magenta) !important;
}
.th9.th9-v2 .thv2-stepper-btn-plus:hover {
    color: #ff5cb4 !important;
    background: rgba(255, 0, 153, 0.12) !important;
}
.th9.th9-v2 .thv2-stepper-val {
    width: 48px !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    background: transparent !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 17px !important;
    text-align: center !important;
    padding: 0 !important;
    line-height: 38px !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    font-family: 'Montserrat', sans-serif !important;
    -moz-appearance: textfield;
    appearance: textfield;
}
.th9.th9-v2 input.thv2-stepper-val::-webkit-outer-spin-button,
.th9.th9-v2 input.thv2-stepper-val::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.th9.th9-v2 input.thv2-stepper-val:focus {
    outline: 0 !important;
    box-shadow: inset 0 0 0 1px var(--thv2-magenta) !important;
    border-radius: 6px !important;
}
/* Bouton CONVERTIR :
   - Default : outline magenta (transparent + border + texte magenta)
   - Hover   : magenta plein (gradient + texte blanc)
   Spécificité forte (ID + class) pour battre TOUTES les règles V1. */
.th9.th9-v2 #th-deposit-btn.thv2-convert-btn,
.th9.th9-v2 button#th-deposit-btn,
.th9.th9-v2 .thv2-convert-btn {
    background: transparent !important;
    border: 1.5px solid var(--thv2-magenta) !important;
    color: var(--thv2-magenta) !important;
    padding: 0 16px !important;
    border-radius: 10px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
    width: 100% !important;
    box-shadow: 0 0 0 0 rgba(255, 0, 153, 0) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}
.th9.th9-v2 #th-deposit-btn.thv2-convert-btn:hover,
.th9.th9-v2 button#th-deposit-btn:hover,
.th9.th9-v2 .thv2-convert-btn:hover {
    background: linear-gradient(135deg, var(--thv2-magenta), #cc0077) !important;
    color: #ffffff !important;
    border-color: var(--thv2-magenta) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 0, 153, 0.4) !important;
}
.th9.th9-v2 #th-deposit-btn.thv2-convert-btn:active,
.th9.th9-v2 .thv2-convert-btn:active {
    transform: translateY(0);
}
.th9.th9-v2 .thv2-convert-msg {
    width: 100%;
    font-size: 12px;
    text-align: center;
    margin-top: 0;
    color: var(--thv2-text-1);
    min-height: 1.2em;
}

/* Carte rituels — padding accru pour aerer les bandes de progression
   (les contenus ne doivent pas toucher les bords sup/inf) */
.th9.th9-v2 .thv2-rituals-card {
    margin: 0 !important;
    padding: 14px 18px !important;
    flex: 1;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 14px !important;
}
/* Texte des rituels plus compact pour laisser plus de respiration */
.th9.th9-v2 .thv2-ritual-name {
    font-size: 11px !important;
}
.th9.th9-v2 .thv2-ritual-progress {
    font-size: 11px !important;
}
.th9.th9-v2 .thv2-ritual-bar {
    height: 5px !important;
}
.th9.th9-v2 .thv2-ritual {
    margin: 0 !important;
    padding: 0;
}
.th9.th9-v2 .thv2-ritual-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
    font-size: 12px;
}
.th9.th9-v2 .thv2-ritual-name {
    color: var(--thv2-text-1) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
.th9.th9-v2 .thv2-gain {
    color: var(--thv2-text-3) !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    margin-left: 4px;
}
.th9.th9-v2 .thv2-ritual-progress {
    color: var(--thv2-text-1) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    font-family: 'Montserrat', sans-serif !important;
}
.th9.th9-v2 .thv2-ritual-bar {
    height: 6px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 100px !important;
    overflow: hidden;
}
.th9.th9-v2 .thv2-ritual-fill-orange {
    background: var(--thv2-orange) !important;
    height: 100% !important;
    border-radius: 100px !important;
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.4) !important;
}
.th9.th9-v2 .thv2-ritual-fill-purple {
    background: var(--thv2-purple) !important;
    height: 100% !important;
    border-radius: 100px !important;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4) !important;
}

/* ═══════════════════════════════════════════════════
   ROW 2 : 5 stats horizontaux dans une carte avec dividers
   ═══════════════════════════════════════════════════ */
/* Rythme vertical : top-grid → stats reduit (12px) car la profile-card a
   une box-shadow glow qui bleed ~30px vers le bas, donc avec 24px de margin
   ca paraissait beaucoup plus grand que stats → vault (24px). */
.th9.th9-v2 .thv2-stats-card {
    padding: 22px !important;
    margin-top: 0 !important;
    margin-bottom: var(--thv2-gap) !important;
}
.th9.th9-v2 .thv2-top-grid {
    margin-top: 0 !important;
    margin-bottom: 18px !important;
}
.th9.th9-v2 .thv2-vault-card {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
.th9.th9-v2 .thv2-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.th9.th9-v2 .thv2-stat {
    display: grid !important;
    grid-template-rows: 26px auto !important;
    justify-items: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 4px 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    gap: 0 !important;
    position: relative;
}
.th9.th9-v2 .thv2-stat + .thv2-stat {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.th9.th9-v2 .thv2-stat-label {
    font-size: 10px !important;
    color: var(--thv2-text-2) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.16em !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.th9.th9-v2 .thv2-stat-num {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1 !important;
    font-family: 'Montserrat', sans-serif !important;
    align-self: end !important;
}

/* ═══════════════════════════════════════════════════
   ROW 3 : Inventaire (vault) avec onglets pills
   ═══════════════════════════════════════════════════ */
/* Vault : background dynamique selon l'onglet actif (themes V1) */
.th9.th9-v2 .thv2-vault-card {
    padding: 22px !important;
    margin-bottom: 0 !important;
    transition: background 0.4s ease, border-color 0.4s ease;
}
.th9.th9-v2 .thv2-vault-card.theme-emporium {
    background: linear-gradient(135deg, color-mix(in srgb, var(--thv2-emporium) 15%, transparent), rgba(0, 0, 0, 0.5)) !important;
    border-color: color-mix(in srgb, var(--thv2-emporium) 35%, transparent) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 20px color-mix(in srgb, var(--thv2-emporium) 6%, transparent) !important;
}
.th9.th9-v2 .thv2-vault-card.theme-sanctum {
    background: linear-gradient(135deg, color-mix(in srgb, var(--thv2-sanctum) 15%, transparent), rgba(0, 0, 0, 0.5)) !important;
    border-color: color-mix(in srgb, var(--thv2-sanctum) 35%, transparent) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 20px color-mix(in srgb, var(--thv2-sanctum) 6%, transparent) !important;
}
.th9.th9-v2 .thv2-vault-card.theme-observatoire {
    background: linear-gradient(135deg, color-mix(in srgb, var(--thv2-observatoire) 15%, transparent), rgba(0, 0, 0, 0.5)) !important;
    border-color: color-mix(in srgb, var(--thv2-observatoire) 35%, transparent) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 20px color-mix(in srgb, var(--thv2-observatoire) 6%, transparent) !important;
}
.th9.th9-v2 .thv2-vault-card.theme-taiara-pro {
    background: linear-gradient(135deg, color-mix(in srgb, var(--thv2-pro) 15%, transparent), rgba(0, 0, 0, 0.5)) !important;
    border-color: color-mix(in srgb, var(--thv2-pro) 35%, transparent) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 20px color-mix(in srgb, var(--thv2-pro) 6%, transparent) !important;
}
.th9.th9-v2 .thv2-vault-head {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 14px;
    margin-bottom: 18px !important;
    display: block !important;
}
.th9.th9-v2 .thv2-vault-tabs {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap;
}
.th9.th9-v2 .thv2-vault-tab {
    padding: 8px 20px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border-radius: 100px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: none !important;
}
.th9.th9-v2 .thv2-vault-tab:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}
/* Tabs actives — couleur thématique V1 par onglet */
.th9.th9-v2 .thv2-vault-tab.tab-emporium.active {
    background: color-mix(in srgb, var(--thv2-emporium) 20%, transparent) !important;
    border-color: color-mix(in srgb, var(--thv2-emporium) 60%, transparent) !important;
    color: var(--thv2-emporium) !important;
    box-shadow: 0 0 12px color-mix(in srgb, var(--thv2-emporium) 30%, transparent) !important;
}
.th9.th9-v2 .thv2-vault-tab.tab-sanctum.active {
    background: color-mix(in srgb, var(--thv2-sanctum) 20%, transparent) !important;
    border-color: color-mix(in srgb, var(--thv2-sanctum) 60%, transparent) !important;
    color: var(--thv2-sanctum) !important;
    box-shadow: 0 0 12px color-mix(in srgb, var(--thv2-sanctum) 30%, transparent) !important;
}
.th9.th9-v2 .thv2-vault-tab.tab-observatoire.active {
    background: color-mix(in srgb, var(--thv2-observatoire) 20%, transparent) !important;
    border-color: color-mix(in srgb, var(--thv2-observatoire) 60%, transparent) !important;
    color: var(--thv2-observatoire) !important;
    box-shadow: 0 0 12px color-mix(in srgb, var(--thv2-observatoire) 30%, transparent) !important;
}
.th9.th9-v2 .thv2-vault-tab.tab-taiara-pro.active {
    background: color-mix(in srgb, var(--thv2-pro) 20%, transparent) !important;
    border-color: color-mix(in srgb, var(--thv2-pro) 60%, transparent) !important;
    color: var(--thv2-pro) !important;
    box-shadow: 0 0 12px color-mix(in srgb, var(--thv2-pro) 30%, transparent) !important;
}
.th9.th9-v2 .th9-feed-panel { padding: 0; }

/* Section onglets V2 : taille figee a tous les niveaux (vault-card + panel +
   scroll). Plus aucun mouvement quand on switch d'onglet, peu importe le
   nombre de cards ou l'etat de chargement. */
.th9.th9-v2 .thv2-vault-card {
    min-height: 220px !important;
    max-height: 220px !important;
    height: 220px !important;
    overflow: hidden !important;
}
.th9.th9-v2 .th9-feed-panel {
    min-height: 110px !important;
    max-height: 110px !important;
    height: 110px !important;
}
.th9.th9-v2 .th9-feed-scroll:not(#th9-pro-grid) {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
    gap: 10px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 4px 4px 8px !important;
    min-height: 110px !important;
    max-height: 110px !important;
    height: 110px !important;
}
.th9.th9-v2 .th9-feed-scroll:not(#th9-pro-grid) > .th9-mini-card {
    background: rgba(0, 0, 0, 0.45) !important;
    border: 1px solid var(--thv2-border) !important;
    border-radius: 10px !important;
}
/* Cards V2 : pas de nom/titre en overlay (Reliques + Artisans) */
.th9.th9-v2 .th9-feed-scroll:not(#th9-pro-grid) > .th9-mini-card .th9-mini-name {
    display: none !important;
}
/* Etat vide : message centre sur toute la largeur du flex (au lieu d'un
   tout petit element collé a gauche). */
.th9.th9-v2 .th9-feed-scroll:not(#th9-pro-grid) > .th9-feed-empty,
.th9.th9-v2 .th9-feed-scroll:not(#th9-pro-grid) > .th9-feed-loading {
    flex: 1 1 100% !important;
    width: 100% !important;
}
/* Hover thématique : couleur de l'onglet actif (Emporium / Sanctum / Observatoire) */
.th9.th9-v2 #th9-emp-grid > .th9-mini-card:hover {
    border-color: color-mix(in srgb, var(--thv2-emporium) 60%, transparent) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 12px color-mix(in srgb, var(--thv2-emporium) 22%, transparent) !important;
}
.th9.th9-v2 #th9-sanctum-grid > .th9-mini-card:hover {
    border-color: color-mix(in srgb, var(--thv2-sanctum) 60%, transparent) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 12px color-mix(in srgb, var(--thv2-sanctum) 22%, transparent) !important;
}
.th9.th9-v2 #th9-obs-grid > .th9-mini-card:hover {
    border-color: color-mix(in srgb, var(--thv2-observatoire) 60%, transparent) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 12px color-mix(in srgb, var(--thv2-observatoire) 22%, transparent) !important;
}
/* Le nom en overlay bas devient plus compact pour matcher la carte plus petite */
.th9.th9-v2 .th9-feed-scroll:not(#th9-pro-grid) > .th9-mini-card .th9-mini-name {
    font-size: 9px !important;
    padding: 14px 6px 5px !important;
}
.th9.th9-v2 .th9-feed-scroll:not(#th9-pro-grid) > .th9-mini-card .th9-mini-badge {
    font-size: 7px !important;
    padding: 1px 5px !important;
}


/* ═══════════════════════════════════════════════════
   FOOTER DASHBOARD V2 : signature minimaliste
   - rangée d'actions secondaires (parchemins, reliques, préférences, refresh)
   - citation discrète
   - séparé du site footer en dessous par juste l'air naturel
   ═══════════════════════════════════════════════════ */
.th9.th9-v2 .thv2-dash-footer {
    margin-top: var(--thv2-gap);
    padding: 16px 4px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.th9.th9-v2 .thv2-dash-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 24px;
}
.th9.th9-v2 .thv2-dash-footer-link {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    color: var(--thv2-text-2) !important;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none !important;
    background: transparent !important;
    border: 0 !important;
    padding: 4px 0 !important;
    cursor: pointer;
    transition: color 0.2s ease;
    box-shadow: none !important;
}
.th9.th9-v2 .thv2-dash-footer-link:hover {
    color: var(--thv2-text-0) !important;
}
.th9.th9-v2 .thv2-dash-footer-link svg {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.th9.th9-v2 .thv2-dash-footer-link:hover svg {
    opacity: 1;
}
.th9.th9-v2 .thv2-dash-footer-refresh {
    cursor: pointer;
}
.th9.th9-v2 .thv2-dash-footer-motto {
    font-size: 11px;
    font-style: italic;
    color: var(--thv2-text-3);
    text-align: center;
    letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .th9.th9-v2 .thv2-top-grid { grid-template-columns: 1fr !important; }
    .th9.th9-v2 .thv2-profile-card { flex-direction: column !important; }
    .th9.th9-v2 .thv2-keys {
        border-left: 0 !important;
        padding-left: 0 !important;
        padding-top: 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%;
    }
    .th9.th9-v2 .thv2-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .th9.th9-v2 .thv2-stat + .thv2-stat { border-left: 0; }
}
@media (max-width: 640px) {
    .th9.th9-v2 .thv2-profile-card { padding: 20px !important; }
    .th9.th9-v2 .thv2-stats-grid { grid-template-columns: 1fr !important; }
    .th9.th9-v2 .thv2-kpis-row { grid-template-columns: 1fr !important; }
    .th9.th9-v2 .thv2-pseudo { font-size: 22px !important; }
}

/* ═════════════════════════════════════════════════════════════════
   CARTES D'ONGLETS CARRES + GRILLE
   Avant : flex-row scroll horizontal, mini-card 120x110, image 44x44.
   Maintenant : grille auto-fill, carte carree (aspect-ratio:1),
   image plein cadre, nom en overlay bas leger.
   ═════════════════════════════════════════════════════════════════ */
.th9-feed-scroll:not(#th9-pro-grid) {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 4px 4px 8px;
    scroll-snap-type: none;
    align-content: start;
}

/* Override de la mini-card pour le contexte feed grille (Emporium /
   Sanctum / Observatoire). On force l'aspect carre et on remplit avec
   l'image. La carte garde sa version "rectangulaire compacte" sur les
   contextes hors feed (au cas ou elle serait reutilisee). */
.th9-feed-scroll:not(#th9-pro-grid) > .th9-mini-card {
    min-width: 0;
    max-width: none;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    gap: 0;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    align-items: stretch;
}
.th9-feed-scroll:not(#th9-pro-grid) > .th9-mini-card .th9-mini-nft-wrap,
.th9-feed-scroll:not(#th9-pro-grid) > .th9-mini-card .th9-mini-avatar-wrap {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    aspect-ratio: auto;
}
.th9-feed-scroll:not(#th9-pro-grid) > .th9-mini-card .th9-mini-nft-img,
.th9-feed-scroll:not(#th9-pro-grid) > .th9-mini-card .th9-mini-avatar {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    object-fit: cover;
}
/* Nom en overlay bas, lisible avec un degrade noir partiel */
.th9-feed-scroll:not(#th9-pro-grid) > .th9-mini-card .th9-mini-name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 6px 6px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.2px;
    line-height: 1.15;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    text-transform: uppercase;
    pointer-events: none;
}
/* Le badge "Relique" reste en haut a droite, plus discret */
.th9-feed-scroll:not(#th9-pro-grid) > .th9-mini-card .th9-mini-badge {
    top: 6px;
    right: 6px;
    font-size: 8px;
    padding: 2px 6px;
}

/* Mobile : 3-4 cartes par ligne au lieu d'auto-fill 110px */
@media (max-width: 640px) {
    .th9-feed-scroll:not(#th9-pro-grid) {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

