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

/* =========================================================
   TEHONO-GATE PUBLIC CSS - V2.7.5 (FINAL COMPILATION)
   ========================================================= */

/* =========================================
   1. TEHONO WALLET MODAL (White + Green Pulse)
   ========================================= */

/* Fond flouté */
.tehono-wallet-modal {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: none; z-index: 99999; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
}
.tehono-wallet-modal.open { display: flex; opacity: 1; }

/* Boîte principale */
.tehono-wallet-box {
  background: #0b0b0f; border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px; padding: 32px; width: 400px; max-width: calc(100vw - 40px);
  text-align: center; box-shadow: 0 25px 80px rgba(0, 0, 0, 0.95);
  transform: scale(0.95); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.tehono-wallet-modal.open .tehono-wallet-box { transform: scale(1); }

/* Titre */
.tehono-wallet-box h3 {
  margin: 0 0 28px; font-family: 'Orbitron', sans-serif; font-size: 20px;
  font-weight: 700; text-transform: uppercase; color: #ffffff !important; letter-spacing: 2px;
}
#tehono-wallet-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }

/* BOUTON WALLET */
.tehono-wallet-btn {
  display: flex; align-items: center; justify-content: flex-start; gap: 16px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px; padding: 16px 20px; font-size: 16px; font-weight: 500;
  color: #b0b0b0 !important; cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-align: left; position: relative; overflow: hidden;
}
.tehono-wallet-btn span { color: inherit !important; font-family: sans-serif; letter-spacing: 0.5px; }

/* ETAT SURVOL (HOVER) */
.tehono-wallet-btn:hover {
  background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.8) !important;
  color: #ffffff !important; text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  transform: translateY(-2px) scale(1.01); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}
.tehono-wallet-icon { width: 36px; height: 36px; border-radius: 8px; transition: transform 0.3s ease; }
.tehono-wallet-btn:hover .tehono-wallet-icon { transform: scale(1.1); }

/* Badge "Installé" */
.tehono-wallet-btn.installed::after {
  content: ''; width: 10px; height: 10px; background: #61ce70; border-radius: 50%;
  position: absolute; right: 20px; box-shadow: 0 0 10px #61ce70; animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0% { opacity: 0.6; box-shadow: 0 0 0 0 rgba(97, 206, 112, 0.4); }
  70% { opacity: 1; box-shadow: 0 0 0 8px rgba(97, 206, 112, 0); }
  100% { opacity: 0.6; box-shadow: 0 0 0 0 rgba(97, 206, 112, 0); }
}

/* Bouton Fermer */
.tehono-close {
  background: transparent; border: 1px solid transparent; color: #666 !important;
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; cursor: pointer;
  padding: 10px 24px; border-radius: 30px; transition: all 0.3s; margin-top: 8px;
}
.tehono-close:hover {
  color: #fff !important; border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.05);
}

/* =========================================================
   2. SHORTCODES (CARTES STANDARD)
   ========================================================= */

/* --- STRUCTURE GLOBALE --- */
.th-balance-display, 
.th-rank-display {
    display: inline-flex;       
    flex-direction: column;     
    justify-content: center;
    align-items: flex-start;    
    min-width: 220px; height: 100px; padding: 20px 25px; margin: 10px; box-sizing: border-box;
    background: transparent; border: 1px solid; border-radius: 16px;      
    font-family: 'Orbitron', sans-serif; font-size: 32px !important; font-weight: 700; line-height: 1.1;
    cursor: default; transition: none;
}

/* --- LÉGENDES (SOUS-TITRES) --- */
.th-balance-display::before, .th-rank-display::before { content: none !important; }
.th-balance-display::after, .th-rank-display::after {
    display: block; margin-top: 8px; font-family: sans-serif; font-size: 11px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8;
}

/* --- COULEURS SPÉCIFIQUES --- */

/* 1. CRÉDITS (VERT TOXIC) */
.game-credits {
    border-color: rgba(30, 193, 21, 0.5); color: #1EC115 !important;
    box-shadow: 0 0 15px rgba(30, 193, 21, 0.1);
}
.game-credits::after { content: "Runes"; color: #1EC115; }

/* 2. TĪTETI (OR) */
.titeti-count {
    border-color: rgba(255, 215, 0, 0.5); color: #ffd700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}
.titeti-count::after { content: "Tīteti"; color: #ffd700; }

/* 3. NFT TA'IARA (CYAN) */
.taiara-count {
    border-color: rgba(0, 242, 255, 0.5); color: #00f2ff !important;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}
.taiara-count::after { content: "NFTs Ta'iara"; color: #00f2ff; }

/* 4. RANG (VIOLET) - Base standard */
.user-rank {
    border-color: rgba(189, 0, 255, 0.5); color: #bd00ff !important;
    font-size: 24px !important; box-shadow: 0 0 15px rgba(189, 0, 255, 0.1);
}
.user-rank::after { content: "Rang Actuel"; color: #bd00ff; }

/* --- MISE EN PAGE GRILLE --- */
.th-dashboard-grid {
    display: flex; flex-wrap: wrap; gap: 15px; justify-content: flex-start; margin-bottom: 40px;
}
@media (max-width: 768px) {
    .th-balance-display, .th-rank-display { width: 100%; min-width: unset; margin: 0 0 15px 0; }
}

/* =========================================
   3. GALERIE NFT & LIGHTBOX
   ========================================= */
.th-gallery-wrapper { margin-top: 30px; }
.th-gallery-header {
    font-family: 'Orbitron', sans-serif; color: #fff; margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px;
}
.th-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.th-nft-card {
    background: #0a0a0a; border-radius: 16px;
    border: 1px solid #1f1f1f; transition: all 0.3s ease; text-align: center;
    position: relative; overflow: hidden; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex; flex-direction: column;
}
.th-nft-card:hover {
    transform: translateY(-3px); border-color: #333; box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
.th-nft-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-bottom: 1px solid #1a1a1a; background: #000; }
.th-nft-card video { width: 100%; aspect-ratio: 1; object-fit: cover; border-bottom: 1px solid #1a1a1a; background: #000; }
.th-nft-title { color: #fff; font-family: 'Orbitron', sans-serif; font-size: 11px; opacity: 0.8; }
.th-nft-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex;
    align-items: center; justify-content: center; font-size: 24px; opacity: 0;
    transition: opacity 0.3s ease; border-radius: 12px;
}
.th-nft-card:hover .th-nft-overlay { opacity: 1; }
.th-nft-card:hover img { transform: scale(1.05); transition: transform 0.3s ease; }
#tehono-nft-full-media img, #tehono-nft-full-media video { border: 1px solid rgba(255,255,255,0.2); }

/* === SÉCURITÉ DASHBOARD === */
#tehono-security-curtain { display: none; }
body.is-dashboard #tehono-security-curtain {
    display: flex; position: fixed; inset: 0; background-color: #050505; z-index: 999999;
    align-items: center; justify-content: center; flex-direction: column;
}
.th-loader-spinner {
    width: 50px; height: 50px; border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid #61ce70; border-radius: 50%; margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* === JEU DES COFFRES (Coffre sacré Ta'iara) === */
.th-game-wrapper { text-align: center; margin-top: 20px; font-family: 'Orbitron', sans-serif; }
.th-game-header h3 { color: #fff; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 5px; }
#th-game-message { height: 20px; margin: 10px 0; font-size: 14px; font-weight: bold; }

.th-chest-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    padding: 15px 5px;
}

.th-chest-item {
    width: 120px;
    height: 120px;
    position: relative;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: th-chest-float 5s ease-in-out infinite;
    perspective: 500px;
}
.th-chest-item:nth-child(1) { animation-delay: 0s; }
.th-chest-item:nth-child(2) { animation-delay: -1s; }
.th-chest-item:nth-child(3) { animation-delay: -2s; }
.th-chest-item:nth-child(4) { animation-delay: -3s; }
.th-chest-item:nth-child(5) { animation-delay: -4s; }

@keyframes th-chest-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.th-chest-item.disabled { pointer-events: none; }

/* Corps du coffre : bois sombre, coins arrondis, lueur dorée */
.th-chest-box {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 0 28px rgba(247, 201, 72, 0.22),
        0 15px 30px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(247, 201, 72, 0.3);
    transition: all 0.35s ease;
    z-index: 2;
}

/* Couvercle supérieur (36% haut) : bois + bande dorée + serrure losange */
.th-chest-lid {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 36%;
    background:
        repeating-linear-gradient(
            100deg,
            rgba(247, 201, 72, 0.05) 0px,
            rgba(247, 201, 72, 0.05) 1px,
            transparent 1px,
            transparent 6px),
        linear-gradient(180deg, #5a3820 0%, #3a2414 60%, #1f1208 100%);
    border-bottom: 2px solid rgba(247, 201, 72, 0.55);
    box-shadow:
        inset 0 2px 4px rgba(247, 201, 72, 0.35),
        inset 0 -10px 18px rgba(0, 0, 0, 0.55);
    transition: transform 0.4s ease;
}
/* Bandeau doré décoratif en haut du couvercle */
.th-chest-lid::before {
    content: '';
    position: absolute;
    top: 6px; left: 10%; right: 10%;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(247, 201, 72, 0.7) 50%,
        transparent 100%);
}
/* Symbole central scintillant ◉ (remplace l'ancienne serrure losange + la pierre de mana) */
.th-chest-lid::after {
    content: '◉';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    color: #f7c948;
    font-size: 26px;
    line-height: 1;
    text-shadow:
        0 0 8px rgba(247, 201, 72, 0.9),
        0 0 18px rgba(247, 201, 72, 0.55);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
    z-index: 4;
    animation: th-chest-gem-pulse 2.6s ease-in-out infinite;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Base du coffre : bois profond */
.th-chest-base {
    position: absolute;
    top: 36%; left: 0; right: 0; bottom: 0;
    background:
        repeating-linear-gradient(
            100deg,
            rgba(247, 201, 72, 0.04) 0px,
            rgba(247, 201, 72, 0.04) 1px,
            transparent 1px,
            transparent 6px),
        linear-gradient(180deg, #2a1810 0%, #1a0f08 55%, #0a0604 100%);
    box-shadow:
        inset 0 2px 4px rgba(247, 201, 72, 0.18),
        inset 0 -12px 24px rgba(0, 0, 0, 0.6);
}

@keyframes th-chest-gem-pulse {
    0%, 100% {
        text-shadow:
            0 0 6px rgba(247, 201, 72, 0.55),
            0 0 14px rgba(247, 201, 72, 0.3);
    }
    50% {
        text-shadow:
            0 0 14px rgba(247, 201, 72, 1),
            0 0 26px rgba(247, 201, 72, 0.7),
            0 0 40px rgba(46, 197, 193, 0.45);
    }
}

/* Hover : élévation + intensification lueur */
.th-chest-item:hover {
    animation-play-state: paused;
    transform: translateY(-8px) scale(1.03);
}
.th-chest-item:hover .th-chest-box {
    box-shadow:
        0 0 45px rgba(247, 201, 72, 0.45),
        0 20px 40px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(247, 201, 72, 0.55);
}
.th-chest-item:hover .th-chest-lid::after {
    transform: translateX(-50%) scale(1.15);
}

/* Résultat (après ouverture) */
.th-chest-result {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 5;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
    width: 100%;
    text-align: center;
    opacity: 0;
    transition: all 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* État : tremblement (ouverture en cours) */
.th-chest-item.shaking {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) infinite;
}
.th-chest-item.shaking .th-chest-box {
    box-shadow:
        0 0 40px rgba(255, 107, 91, 0.65),
        0 15px 30px rgba(0, 0, 0, 0.7),
        inset 0 0 0 1px rgba(255, 107, 91, 0.6);
}

/* État : ouvert - couvercle levé, coffre vidé */
.th-chest-item.open {
    animation: none;
}
.th-chest-item.open .th-chest-box {
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.8),
        0 10px 25px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.th-chest-item.open .th-chest-lid {
    transform: translateY(-6px) rotateX(55deg);
    transform-origin: top center;
    opacity: 0.5;
}
.th-chest-item.open .th-chest-lid::after {
    opacity: 0;
}
.th-chest-item.open .th-chest-result {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* État : non sélectionné (assombri via JS opacity) */
.th-chest-item.disabled:not(.selected):not(.open) {
    animation: none;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* BADGES ET CARTES SPÉCIALES */
.th-qty-badge {
    position: absolute; top: 10px; right: 10px; background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; font-family: 'Orbitron', sans-serif;
    font-size: 10px; padding: 2px 6px; border-radius: 4px; z-index: 5; box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.th-card-titeti {
    border-color: rgba(255, 215, 0, 0.3) !important; background: linear-gradient(to bottom, rgba(255, 215, 0, 0.05), rgba(0,0,0,0.2)) !important;
}
.th-card-titeti:hover {
    border-color: #ffd700 !important; box-shadow: 0 0 15px rgba(255, 215, 0, 0.2) !important; transform: translateY(-5px) scale(1.02);
}
.th-card-titeti .th-nft-title { color: #ffd700 !important; }

/* =========================================================
   STATION DE CHANGE (VERSION ROSE NÉON - TEXTE CORRIGÉ)
   ========================================================= */

/* 1. Conteneur Grille */
.th-dashboard-grid .th-bank-wrapper { display: inline-flex; margin: 0; width: auto; }

/* 2. La Carte */
.th-bank-module {
    min-width: 240px; height: 100px; padding: 10px 15px; margin: 10px; box-sizing: border-box;
    background: transparent; border: 1px solid rgba(255, 0, 153, 0.5);
    border-radius: 16px; box-shadow: 0 0 15px rgba(255, 0, 153, 0.1);
    display: flex; flex-direction: column; justify-content: space-evenly; align-items: center;
    position: relative; max-width: none;
}
.th-bank-module h3, .th-bank-subtitle { display: none; }

/* TITRE HAUT */
.th-bank-module::before {
    content: "⚡️ STATION DE CHANGE"; display: block; font-family: sans-serif;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: #ff0099; margin-bottom: 4px;
}

/* CONTRÔLES */
.th-bank-controls { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; width: 100%; }
.th-input-group input {
    background: rgba(255, 255, 255, 0.05) !important; border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important; font-family: 'Orbitron', sans-serif; font-size: 14px; font-weight: bold;
    width: 50px !important; height: 32px !important; text-align: center; border-radius: 6px;
    padding: 0 !important; transition: all 0.3s ease;
}
.th-input-group input:focus { border-color: #ff0099 !important; box-shadow: 0 0 10px rgba(255, 0, 153, 0.3); }
.th-input-label { display: none; }
.th-arrow { color: rgba(255, 255, 255, 0.6); font-size: 16px; line-height: 1; margin-top: -2px; }
#th-deposit-btn, #th-modal-deposit-btn,
button#th-deposit-btn, button#th-modal-deposit-btn,
.th-bank-module #th-deposit-btn, .th-bank-module #th-modal-deposit-btn,
.th-bar-v3 #th-deposit-btn, .th-bar-v3 #th-modal-deposit-btn,
.th9-converter #th-deposit-btn,
body #th-deposit-btn, body #th-modal-deposit-btn {
    background: transparent !important;
    border: 1px solid #ff0099 !important;
    color: #ff0099 !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 9px !important; font-weight: 800 !important;
    padding: 5px 12px !important;
    height: 28px !important; 
    border-radius: 6px !important; 
    cursor: pointer !important; 
    transition: all 0.25s ease !important;
    text-transform: uppercase !important; 
    letter-spacing: 0.8px !important;
    box-shadow: none !important;
    display: inline-flex !important; align-items: center !important; white-space: nowrap !important;
    line-height: 1 !important;
    text-decoration: none !important;
    opacity: 1 !important;
    min-height: 0 !important;
    width: auto !important;
}
#th-deposit-btn:hover, #th-modal-deposit-btn:hover,
button#th-deposit-btn:hover, button#th-modal-deposit-btn:hover,
body #th-deposit-btn:hover, body #th-modal-deposit-btn:hover {
    background: linear-gradient(135deg, #ff0099, #cc0077) !important;
    color: #fff !important;
    box-shadow: 0 5px 20px rgba(255,0,153,0.5) !important;
    border: 1px solid #ff0099 !important;
    transform: none !important;
    opacity: 1 !important;
}

/* TEXTE BAS (masqué - le subtitle s'en charge) */
.th-bank-module::after {
    content: none; display: none;
}
#th-bank-message {
    position: absolute; bottom: -25px; font-size: 9px; width: 240px; text-align: center;
    left: 50%; transform: translateX(-50%); white-space: nowrap; color: rgba(255, 255, 255, 0.7);
}

/* =========================================================
   VIGNETTE RANG : FORMAT "LONG RECTANGLE" (Horizontal)
   ========================================================= */

.th-dashboard-grid .user-rank {
    /* Format "Long Rectangle" */
    width: auto;
    min-width: 380px; /* Plus large */
    height: 100px;
    flex-grow: 1;
    
    /* Disposition "Ligne" */
    flex-direction: row-reverse; /* Grade à droite, Label à gauche */
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    padding: 0 30px;
    
    /* Style Violet */
    background: linear-gradient(90deg, rgba(189, 0, 255, 0.15), transparent);
    border: 1px solid #bd00ff;
    box-shadow: 0 0 15px rgba(189, 0, 255, 0.1);
}

/* Grade (ex: Tupuna) */
.th-dashboard-grid .user-rank {
    font-size: 28px !important;
    text-align: left;
    margin: 0;
    line-height: 1;
    text-shadow: 0 0 10px rgba(189, 0, 255, 0.6);
}

/* Label (ex: RANG ACTUEL) */
.th-dashboard-grid .user-rank::after {
    content: "RANG ACTUEL :";
    margin-top: 0 !important;
    font-size: 11px;
    font-weight: 600;
    color: #bd00ff;
    opacity: 0.8;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .th-dashboard-grid .user-rank { min-width: 100%; justify-content: space-between; }
}

/* =========================================
   GRILLE 4 COLONNES : CLASSES ISOLÉES (NO CONFLICT)
   ========================================= */

.tehono-grid-4-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    margin: 40px 0;
    box-sizing: border-box;
}

/* CARTE (ITEM) */
.tehono-card-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
    
    /* Fond Transparent */
    background: transparent !important; 
    
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    box-sizing: border-box;
}

/* Survol */
.tehono-card-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent); 
    /* Halo très doux et diffus */
    box-shadow: 0 10px 40px -20px var(--accent);
    background: transparent !important;
}

/* --- TYPO ET DETAILS --- */

.tehono-card-top {
    display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}

.tehono-card-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    flex-shrink: 0;
}

.tehono-card-title {
    font-family: 'Orbitron', sans-serif; 
    font-weight: 800;
    color: #ffffff;
    font-size: 14px;
    text-transform: uppercase; 
    letter-spacing: 1.5px;
    line-height: 1.2;
}

.tehono-card-text {
    font-family: sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85); /* Gris clair lisible */
    line-height: 1.6;
    margin-bottom: 25px; 
    flex-grow: 1;
}

.tehono-card-cta {
    font-family: 'Orbitron', sans-serif; 
    font-size: 11px; 
    font-weight: 800;
    color: var(--accent); 
    text-transform: uppercase; 
    letter-spacing: 1px;
    transition: transform 0.3s;
    display: inline-flex;
    align-items: center;
}

.tehono-card-item:hover .tehono-card-cta { 
    transform: translateX(5px); 
    text-shadow: 0 0 8px var(--accent);
}

/* --- RESPONSIVE --- */
@media (max-width: 1100px) {
    .tehono-grid-4-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .tehono-grid-4-cols { grid-template-columns: 1fr; }
}

/* =========================================
   BARRE D'ÉTAT (CONNECTÉ) - USER BAR
   ========================================= */

/* Le conteneur global */
.tehono-gate-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    padding: 0;
    border: none;
}

/* 0. CLOCHE DANS LE HEADER */
.tehono-gate-wrapper .th-nav-notifications {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    line-height: 1;
}
.tehono-gate-wrapper .th-bell-btn {
    padding: 2px !important;
    display: flex !important;
    align-items: center !important;
}

/* 1. INFO WALLET (Badge Vert Tech) */
#tehono-wallet-info {
    /* Override des styles PHP */
    display: inline-flex !important;
    align-items: center;
    background: rgba(30, 193, 21, 0.1) !important; /* Fond vert très léger */
    border: 1px solid rgba(30, 193, 21, 0.3) !important; /* Bordure verte fine */
    color: #FFF !important; /* Texte Vert Toxic */
    padding: 6px 14px !important;
    border-radius: 20px !important;
    
    /* Typo */
    font-family: 'Orbitron', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    opacity: 1 !important;
    box-shadow: 0 0 10px rgba(30, 193, 21, 0.05);
    cursor: default;
}

/* 2. BOUTON DASHBOARD (Bouton Principal) */
#tehono-dashboard-link {
    /* Override */
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
    
    /* Typo */
    font-family: 'Orbitron', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: all 0.3s ease;
    display: inline-flex !important;
    align-items: center;
}

/* Effet Hover Dashboard */
#tehono-dashboard-link:hover {
    background: #fff !important;
    color: #000 !important; /* Texte noir sur fond blanc */
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* 3. BOUTON DÉCONNEXION (Icône Power) */
#tehono-disconnect-button {
    /* Override pour en faire un cercle parfait */
    background: transparent !important;
    border: 1px solid rgba(255, 77, 77, 0.3) !important; /* Cercle rouge subtil */
    color: #ff4d4d !important; /* Icône rouge */
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    
    /* Centrage */
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    
    font-size: 14px !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Effet Hover Déconnexion */
#tehono-disconnect-button:hover {
    background: #ff4d4d !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.4);
    transform: rotate(90deg); /* Petite rotation fun */
}

/* =========================================
   TOOLTIP ADRESSE COMPLETE (Survol)
   ========================================= */

#tehono-wallet-info {
    position: relative; /* Nécessaire pour positionner l'infobulle */
}

/* L'Infobulle (créée dynamiquement via CSS) */
#tehono-wallet-info:hover::after {
    content: attr(data-tooltip); /* Récupère l'adresse du JS */
    
    position: absolute;
    top: 130%;       /* S'affiche juste en dessous du bouton */
    left: 50%;
    transform: translateX(-50%); /* Centré parfaitement */
    
    /* Style Cyber */
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid #1EC115;
    color: #fff;
    font-family: monospace; /* Police style "code" pour l'adresse */
    font-size: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    
    /* Petite animation d'apparition */
    animation: th-tooltip-fade 0.2s ease-out forwards;
}

/* Petite flèche en haut de l'infobulle (Optionnel, pour le style) */
#tehono-wallet-info:hover::before {
    content: '';
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #1EC115 transparent; /* Triangle vert */
    z-index: 1000;
    animation: th-tooltip-fade 0.2s ease-out forwards;
}

@keyframes th-tooltip-fade {
    from { opacity: 0; transform: translateX(-50%) translateY(-5px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* =========================================
   STYLES DES SOUS-PAGES (Missions, Alliance, etc.)
   ========================================= */

/* Conteneur Principal de la Page */
.th-subpage-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Orbitron', sans-serif; /* Par défaut pour les titres */
}

/* En-tête de la page */
.th-subpage-header {
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.th-subpage-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 15px var(--page-accent); /* Lueur de la couleur de la page */
}

/* Bouton Retour */
.th-back-btn {
    text-decoration: none;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
}
.th-back-btn:hover {
    color: #fff;
    border-color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Grille de contenu */
.th-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* Carte générique (Projet, Partenaire, Ressource) */
.th-content-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    transition: transform 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.th-content-card:hover {
    transform: translateY(-5px);
    border-color: var(--page-accent);
    box-shadow: 0 5px 20px -10px var(--page-accent);
}

.th-card-h3 {
    color: #fff;
    margin-top: 0;
    font-size: 18px;
    margin-bottom: 10px;
}

.th-card-p {
    font-family: sans-serif;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Bouton d'action dans la carte */
.th-card-btn {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--page-accent);
    color: var(--page-accent);
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.th-card-btn:hover {
    background: var(--page-accent);
    color: #000;
    box-shadow: 0 0 15px var(--page-accent);
}

/* Formulaires (Pour la page Contact) */
.th-form-group { margin-bottom: 20px; }
.th-input {
    width: 100%;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-family: sans-serif;
    box-sizing: border-box;
}
.th-input:focus {
    outline: none;
    border-color: var(--page-accent);
}

/* --- JEU RITUEL : STYLES DES CARTES --- */
.th-rituel-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Style de base d'une carte élément (Joueur & IA) */
.th-element-card {
    /* On définit une couleur par défaut (gris mystère) si la variable n'est pas là */
    --element-color: #a5b1c2; 
    
    width: 100px; 
    height: 120px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.1); /* Bordure discrète par défaut */
    background: rgba(255, 255, 255, 0.02);
}

/* Application de la couleur dynamique */
.th-element-card[style*="--element-color"] {
    border-color: var(--element-color);
    /* Astuce : un léger dégradé pour teinter le fond avec la couleur */
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(0,0,0,0.2));
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2), 0 0 10px var(--element-color); /* Lueur externe */
}

.th-element-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: inset 0 0 30px rgba(0,0,0,0.3), 0 0 20px var(--element-color), 0 0 40px var(--element-color) !important;
}

.th-elem-icon { font-size: 36px; margin-bottom: 8px; filter: drop-shadow(0 0 5px rgba(0,0,0,0.5)); }

.th-elem-name { 
    font-family: 'Orbitron', sans-serif; 
    font-size: 11px; 
    color: var(--element-color); /* Le texte prend la couleur */
    font-weight: 800; 
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    text-transform: uppercase;
}

/* La carte de l'IA (ne doit pas être cliquable) */
#th-ai-card { cursor: default; pointer-events: none; transform: scale(1.1); }

/* Animation Pulsing (Choix Joueur) */
.th-element-card.pulsing {
    animation: pulse-element 1s infinite alternate;
}
@keyframes pulse-element {
    from { box-shadow: 0 0 10px var(--element-color); }
    to { box-shadow: 0 0 30px var(--element-color), 0 0 50px var(--element-color); }
}

/* --- HEADER & BOUTONS --- */
.th-btn-connect {
    padding: 10px 20px;
    border-radius: 18px;
    font-size: 13px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    transition: all 0.3s;
}
.th-btn-connect:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

/* Le Badge Vert (Info Wallet) */
.th-wallet-badge {
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 12px;
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    background: rgba(30, 193, 21, 0.1); /* Fond vert très léger */
    border: 1px solid #1ec115; /* Bordure verte */
    display: flex;
    align-items: center;
    gap: 8px;
}

.th-btn-dash {
    padding: 10px 20px;
    border-radius: 18px;
    font-size: 12px;
    font-family: 'Orbitron', sans-serif;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff !important;
    transition: all 0.3s;
}

.th-wallet-badge-hover {
    transform: none !important;       /* Empêche l'effet de zoom */
    font-weight: normal !important;   /* Empêche le texte de devenir gras */
    border-width: 1px !important;     /* Garde la bordure identique */
    padding: 8px 16px !important;     /* Force le padding à rester fixe */
    cursor: default;                  /* Montre que ce n'est pas un bouton cliquable */
    background: #fff;
    color: #000 !important;
}

.th-btn-disconnect {
    background: none; border: none;
    color: #ff4d4d; font-size: 18px;
    cursor: pointer; padding: 0 5px;
    transition: transform 0.3s;
}
.th-btn-disconnect:hover { transform: scale(1.2); color: #ff0000; }

/* SÉCURITÉ MODALE */
#th-shipping-modal { display: none; z-index: 999999; }
#th-shipping-modal.open { display: flex !important; }
/* --- GALERIE NFT AVANCÉE --- */

.th-qty-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: #61ce70; /* Vert Néon */
    border: 1px solid #61ce70;
    border-radius: 50px;
    padding: 2px 8px;
    font-size: 11px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    z-index: 10;
}

.th-nft-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.3s;
}

.th-nft-card:hover .th-nft-overlay {
    opacity: 1;
}

.th-nft-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(97, 206, 112, 0.2);
}
/* =========================================================
   🌀 4. JEU ROULEAU DU MANA (Ambiance Polynésienne)
   ========================================================= */
.th-rouleau-wrapper {
    text-align: center; margin: 40px auto; max-width: 600px;
    background: rgba(255,255,255,0.02); padding: 30px; border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}
.th-rouleau-header h3 { font-family: 'Orbitron'; color: #fff; margin: 0; letter-spacing: 2px; }
.th-rouleau-cost { font-size: 12px; color: #888; margin-bottom: 30px; font-family: sans-serif; }

/* La Fenêtre - cadre doré + halo pulsant */
.th-rouleau-window {
    width: 340px;
    height: 170px;
    margin: 0 auto;
    background:
        radial-gradient(ellipse at center, rgba(46, 197, 193, 0.10), transparent 70%),
        #050a12;
    border: 2px solid rgba(247, 201, 72, 0.55);
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 0 45px rgba(0, 0, 0, 0.85),
        inset 0 0 0 1px rgba(247, 201, 72, 0.15),
        0 0 35px rgba(247, 201, 72, 0.22),
        0 15px 35px rgba(0, 0, 0, 0.6);
    animation: th-rouleau-breathe 3.5s ease-in-out infinite;
}
@keyframes th-rouleau-breathe {
    0%, 100% { box-shadow:
        inset 0 0 45px rgba(0, 0, 0, 0.85),
        inset 0 0 0 1px rgba(247, 201, 72, 0.15),
        0 0 30px rgba(247, 201, 72, 0.2),
        0 15px 35px rgba(0, 0, 0, 0.6); }
    50% { box-shadow:
        inset 0 0 45px rgba(0, 0, 0, 0.85),
        inset 0 0 0 1px rgba(247, 201, 72, 0.25),
        0 0 50px rgba(247, 201, 72, 0.35),
        0 15px 35px rgba(0, 0, 0, 0.6); }
}

/* Fades latéraux pour masquer les bords de la piste */
.th-rouleau-window::before,
.th-rouleau-window::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 45px;
    z-index: 15;
    pointer-events: none;
}
.th-rouleau-window::before {
    left: 0;
    background: linear-gradient(90deg, #050a12 0%, rgba(5, 10, 18, 0.6) 50%, transparent 100%);
}
.th-rouleau-window::after {
    right: 0;
    background: linear-gradient(-90deg, #050a12 0%, rgba(5, 10, 18, 0.6) 50%, transparent 100%);
}

/* La Flèche Centrale - or polynésien */
.th-rouleau-marker {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 2px; height: 100%;
    background: linear-gradient(to bottom,
        rgba(247, 201, 72, 0.9) 0%,
        rgba(247, 201, 72, 0.3) 50%,
        transparent 100%);
    z-index: 20; pointer-events: none;
    box-shadow: 0 0 8px rgba(247, 201, 72, 0.6);
}
.th-rouleau-marker::after {
    content: "▼";
    position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
    color: #f7c948;
    font-size: 22px;
    text-shadow:
        0 0 8px rgba(247, 201, 72, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.9);
}

/* La Piste */
.th-rouleau-track {
    display: flex; align-items: center; height: 100%;
    will-change: transform;
    /* CALIBRAGE : Fenêtre=340px, centre=170, carte=100, demi=50, offset=120 */
    padding-left: 120px;
}

/* LES CARTES (100x120, style Rituel) */
.th-rouleau-card {
    width: 100px; height: 120px; flex-shrink: 0; margin-right: 10px;
    border-radius: 12px;

    display: flex; flex-direction: column; align-items: center; justify-content: center;

    border: 2px solid var(--card-color, #444);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.5));
    box-shadow:
        inset 0 0 20px rgba(0, 0, 0, 0.6),
        0 0 12px var(--card-color, #444);

    color: #fff; font-family: 'Orbitron';
    position: relative;
    box-sizing: border-box;
}

/* Icônes et Textes */
.th-rc-icon { font-size: 36px; margin-bottom: 8px; filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.6)); }
.th-rc-val { font-size: 14px; font-weight: 800; display: none; }
.th-rc-label {
    font-size: 11px; font-weight: 800; text-transform: uppercase;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.9); letter-spacing: 1px;
}

/* Bouton Lancer - hérite de .th-game-action-btn (or polynésien) */
#th-spin-btn {
    margin-top: 28px;
}
#th-roue-msg { font-family: 'Orbitron'; font-size: 14px; margin-top: 20px; height: 20px; font-weight: bold; letter-spacing: 1px; }

/* =========================================================
   📦 MODALE D'EXPÉDITION (STYLE E-COMMERCE)
   ========================================================= */

/* FOND OBSCURI */
#th-shipping-modal {
    display: none; /* Géré par JS */
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 999999;
    align-items: center; justify-content: center;
    opacity: 0; animation: th-fade-in 0.3s forwards;
}

@keyframes th-fade-in { to { opacity: 1; } }

/* LA BOÎTE */
.th-modal-content {
    background: #151515;
    width: 90%; max-width: 500px;
    max-height: 90vh; /* Pour éviter que ça dépasse sur petits écrans */
    overflow-y: auto; /* Scroll si trop long */
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #a29bfe;
    box-shadow: 0 0 50px rgba(162, 155, 254, 0.2);
    position: relative;
    text-align: left; /* Important pour le formulaire */
    font-family: sans-serif;
}

/* Scrollbar personnalisée pour la modale */
.th-modal-content::-webkit-scrollbar { width: 6px; }
.th-modal-content::-webkit-scrollbar-track { background: #111; }
.th-modal-content::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

/* Bouton Fermer */
.th-modal-close {
    position: absolute; top: 15px; right: 15px;
    background: none; border: none; color: #888;
    font-size: 28px; line-height: 1; cursor: pointer;
    transition: color 0.2s;
}
.th-modal-close:hover { color: #fff; }

/* TITRES */
.th-modal-content h3 {
    font-family: 'Orbitron', sans-serif;
    color: #a29bfe; margin: 0 0 5px 0;
    font-size: 20px; text-transform: uppercase; letter-spacing: 1px;
    text-align: center;
}
.th-modal-content p {
    text-align: center; color: #aaa; font-size: 13px; margin-bottom: 25px;
}

/* --- ZONE 1 : LISTE DES LOTS (CHECKLIST) --- */
.th-prizes-list-container {
    background: rgba(162, 155, 254, 0.05);
    border: 1px solid rgba(162, 155, 254, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}

#th-prizes-checklist {
    max-height: 150px;
    overflow-y: auto;
    padding-right: 5px;
}

.th-prize-item {
    display: flex; align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.th-prize-item:last-child { border-bottom: none; }

.th-prize-item label {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; color: #fff; font-size: 13px; width: 100%;
}

.th-prize-item input[type="checkbox"] {
    accent-color: #a29bfe; /* Couleur native de la checkbox */
    width: 16px; height: 16px; cursor: pointer;
}

.th-prize-item small {
    color: #666; margin-left: auto; font-size: 11px;
}

/* =========================================================
   📦 MODALE D'EXPÉDITION (STYLE E-COMMERCE FINAL)
   ========================================================= */

/* --- 1. FOND ET CONTENEUR --- */
#th-shipping-modal {
    display: none; /* Géré par JS */
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 999999;
    align-items: center; justify-content: center;
    opacity: 0; animation: th-fade-in 0.3s forwards;
}

@keyframes th-fade-in { to { opacity: 1; } }

.th-modal-content {
    background: #151515;
    width: 90%; max-width: 500px;
    max-height: 90vh; /* Scroll si l'écran est petit */
    overflow-y: auto;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #a29bfe;
    box-shadow: 0 0 50px rgba(162, 155, 254, 0.2);
    position: relative;
    text-align: left;
    font-family: sans-serif;
    box-sizing: border-box;
}

/* Scrollbar stylisée */
.th-modal-content::-webkit-scrollbar { width: 6px; }
.th-modal-content::-webkit-scrollbar-track { background: #111; }
.th-modal-content::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

/* Bouton Fermer (Croix) */
.th-modal-close {
    position: absolute; top: 15px; right: 15px;
    background: none; border: none; color: #888;
    font-size: 28px; line-height: 1; cursor: pointer;
    transition: color 0.2s; z-index: 10;
}
.th-modal-close:hover { color: #fff; }

/* Titres */
.th-modal-content h3 {
    font-family: 'Orbitron', sans-serif;
    color: #a29bfe; margin: 0 0 5px 0;
    font-size: 20px; text-transform: uppercase; letter-spacing: 1px;
    text-align: center;
}
.th-modal-content p {
    text-align: center; color: #aaa; font-size: 13px; margin-bottom: 25px;
}

/* --- 2. LISTE DES LOTS (CHECKLIST) --- */
.th-prizes-list-container {
    background: rgba(162, 155, 254, 0.05);
    border: 1px solid rgba(162, 155, 254, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}

#th-prizes-checklist {
    max-height: 120px; /* Zone scrollable si beaucoup de lots */
    overflow-y: auto;
    padding-right: 5px;
}

.th-prize-item {
    display: flex; align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.th-prize-item:last-child { border-bottom: none; }

.th-prize-item label {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; color: #fff; font-size: 13px; width: 100%;
}

.th-prize-item input[type="checkbox"] {
    accent-color: #a29bfe; width: 16px; height: 16px; cursor: pointer;
}

.th-prize-item small {
    color: #666; margin-left: auto; font-size: 11px;
}

/* --- 3. FORMULAIRE ADRESSE (GRILLE CORRIGÉE) --- */
.th-address-form {
    display: flex; flex-direction: column; gap: 12px; width: 100%;
}

/* Ligne horizontale (ex: CP + Ville) */
.th-form-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* Styles de base des champs */
.th-input, .th-input-full, .th-input-small {
    background: #252525;
    border: 1px solid #444;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-family: sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Indispensable pour respecter les largeurs */
    height: 42px; /* Hauteur uniforme */
}

/* Effet Focus (Néon) */
.th-input:focus, .th-input-full:focus, .th-input-small:focus {
    outline: none;
    border-color: #a29bfe;
    box-shadow: 0 0 10px rgba(162, 155, 254, 0.2);
    background: #303030;
}

/* --- GESTION DES TAILLES (C'est ici que ça se joue) --- */

/* 1. Pleine largeur (Email, Rue, Pays) */
.th-input-full { width: 100%; display: block; }

/* 2. Petit Champ Fixe (Code Postal, Civilité) */
.th-input-small {
    width: 100px !important;
    min-width: 100px; /* Empêche l'écrasement */
    flex-shrink: 0;   /* Reste solide */
}

/* 3. Champ Flexible (Ville, Nom, Prénom) */
/* Il prendra TOUTE la place restante sur la ligne */
.th-input {
    flex-grow: 1; 
    width: 100%; 
    min-width: 0; /* Évite les débordements flex */
}

/* Style spécifique Select (Civilité) */
select.th-input-small {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23a29bfe%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    cursor: pointer;
    color: #a29bfe; font-weight: bold;
}

/* --- 4. BOUTON D'ACTION --- */
.th-submit-btn {
    margin-top: 25px;
    width: 100%;
    padding: 14px;
    border: none; border-radius: 50px;
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800; font-size: 14px; letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.th-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.6);
}

.th-submit-btn:disabled {
    background: #444; color: #888;
    cursor: not-allowed; transform: none; box-shadow: none;
}

/* Message de résultat sous le bouton */
#ship-result {
    text-align: center; font-weight: bold; margin-top: 15px; min-height: 20px;
}

/* Bouton Fermer (Croix) - Style Renforcé */
.th-modal-close {
    position: absolute; 
    top: 15px; 
    right: 15px;
    
    /* On force la transparence pour écraser le thème */
    background: transparent !important; 
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    
    color: #666 !important; /* Gris discret par défaut */
    font-size: 28px !important;
    line-height: 1 !important;
    padding: 0 !important;
    width: 30px !important;
    height: 30px !important;
    min-width: auto !important;
    
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

/* Au survol : Blanc + Lueur Violette + Rotation */
.th-modal-close:hover {
    color: #fff !important;
    background: transparent !important; /* S'assure que le fond reste vide */
    text-shadow: 0 0 10px #a29bfe;      /* Petit effet néon */
    transform: rotate(90deg);           /* Animation fluide */
}

/* --- BOUTON DE RÉCLAMATION (UX PREMIUM) --- */
.th-claims-wrapper {
    text-align: center;
    margin: 25px 0;
    min-height: 50px;
    perspective: 1000px;
}

.th-claim-button {
    display: none; /* Le JS l'affichera */
    position: relative;
    
    /* Gradient Or Riche & Dynamique */
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    background-size: 200% auto; /* Permet l'animation du fond */
    
    /* Typographie Lisible */
    color: #000000 !important; /* Noir forcé */
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255,255,255,0.4); /* Légère profondeur */
    
    /* Forme & Bordure */
    padding: 15px 40px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 165, 0, 0.3);
    
    /* Transitions fluides */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: th-claim-pulse 2s infinite; /* Pulsation au repos */
    
    z-index: 10;
    overflow: hidden; /* Pour contenir l'effet de brillance */
}

/* Effet de "Reflet" (Shine) qui passe */
.th-claim-button::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    transform: skewX(-20deg);
    transition: 0s;
    z-index: 1;
}

/* --- ÉTAT SURVOL (HOVER) - L'IMPORTANT EST ICI --- */
.th-claim-button:hover {
    /* 1. Lisibilité Maximale */
    color: #000000 !important; 
    
    /* 2. Changement de lumière (Fond défile) */
    background-position: right center; 
    
    /* 3. Bordure Blanche Éclatante */
    border-color: #ffffff !important;
    outline: none !important;
    
    /* 4. Effet de Lévitation 3D */
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 140, 0, 0.5), 0 0 60px rgba(255, 215, 0, 0.4);
    
    /* On arrête la pulsation pour focaliser l'attention */
    animation: none;
}

/* Déclenche le passage du reflet au survol */
.th-claim-button:hover::after {
    left: 150%;
    transition: 0.6s ease-in-out;
}
/* --- ÉTAT VIDE / DÉSACTIVÉ (0 Lot) --- */
.th-claim-button:disabled {
    background: transparent !important;
    color: #aaaaaa !important; /* Gris clair très lisible */
    border: 1px dashed rgba(255, 255, 255, 0.3) !important;
    box-shadow: none !important;
    animation: none !important;
    cursor: default !important;
    text-shadow: none !important;
    transform: none !important; /* Empêche le bouton de bouger */
}

/* Cache le reflet brillant quand le bouton est désactivé */
.th-claim-button:disabled::after {
    display: none !important;
}
/* Animation "Respiration" (Attire l'œil quand on ne bouge pas) */
@keyframes th-claim-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7); }
    70% { transform: scale(1.03); box-shadow: 0 0 0 15px rgba(255, 215, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

/* --- RESET BLEU WP/THÈME (focus, hover, outline, border) --- */
.th-game-container *:focus,
.th-game-container *:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-color: rgba(247, 201, 72, 0.5) !important;
}
.th-game-container button,
.th-game-container button:hover,
.th-game-container button:focus,
.th-game-container button:active {
    outline: none !important;
    border-color: inherit;
}
.th-game-container a,
.th-game-container a:hover,
.th-game-container a:focus,
.th-game-container a:visited {
    color: inherit;
    text-decoration: none;
    outline: none !important;
}
.th-rules-modal *:focus,
.th-rules-modal *:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* --- CONTAINER DE JEU UNIFIÉ (transparent, sans bordure) --- */
.th-game-container {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 28px 20px 36px;
    min-height: 440px;
    display: flex;
    flex-direction: column;
    text-align: center;
    position: relative;
    margin-bottom: 30px;
}

/* Zone de jeu (sous la topbar) - centrée verticalement pour harmoniser les 3 jeux */
.th-game-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

/* --- BARRE D'INFO (COÛT) --- */
.th-game-info-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(247, 201, 72, 0.10), rgba(46, 197, 193, 0.06));
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 11px;
    color: rgba(247, 201, 72, 0.95);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 25px;
    border: 1px solid rgba(247, 201, 72, 0.25);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(247, 201, 72, 0.15);
}
.th-game-info-bar::before {
    content: '◈';
    color: #f7c948;
    font-size: 13px;
    text-shadow: 0 0 8px rgba(247, 201, 72, 0.6);
}

.th-cost-val { color: #ff6b5b; font-weight: 900; margin-left: 4px; text-shadow: 0 0 8px rgba(255, 107, 91, 0.4); }
.th-gain-val { color: #2ec5c1; font-weight: 900; margin-left: 4px; text-shadow: 0 0 8px rgba(46, 197, 193, 0.4); }

/* --- PANNEAU RÈGLES & GAINS (<details>) --- */
.th-game-rules {
    max-width: 520px;
    margin: 0 auto 25px auto;
    background: rgba(247, 201, 72, 0.05);
    border: 1px solid rgba(247, 201, 72, 0.2);
    border-radius: 14px;
    text-align: left;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.th-game-rules:hover {
    border-color: rgba(247, 201, 72, 0.35);
    box-shadow: 0 0 20px rgba(247, 201, 72, 0.08);
}
.th-game-rules summary {
    cursor: pointer;
    padding: 12px 18px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(247, 201, 72, 0.95);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    gap: 10px;
}
.th-game-rules summary::-webkit-details-marker { display: none; }
.th-game-rules summary::after {
    content: '▾';
    font-size: 14px;
    color: rgba(247, 201, 72, 0.7);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}
.th-game-rules[open] summary::after {
    transform: rotate(180deg);
}
.th-game-rules-body {
    padding: 4px 20px 18px 20px;
    border-top: 1px solid rgba(247, 201, 72, 0.14);
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    line-height: 1.6;
    font-family: system-ui, -apple-system, sans-serif;
}
.th-rules-section {
    margin-top: 14px;
}
.th-rules-section h4 {
    margin: 0 0 8px 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(46, 197, 193, 0.95);
    text-shadow: 0 0 8px rgba(46, 197, 193, 0.3);
}
.th-rules-section ul {
    margin: 0;
    padding-left: 18px;
}
.th-rules-section li {
    margin-bottom: 5px;
}
.th-rules-section li::marker {
    color: rgba(247, 201, 72, 0.6);
}
.th-rules-section strong {
    color: #f7c948;
    font-weight: 800;
}
.th-rules-section .th-rules-win { color: #2ec5c1; font-weight: 800; }
.th-rules-section .th-rules-loss { color: #ff6b5b; font-weight: 800; }
.th-rules-section .th-rules-neutral { color: rgba(255,255,255,0.6); }

/* --- TOPBAR (COÛT GAUCHE + BOUTON RÈGLES DROITE) --- */
.th-game-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.th-game-cost {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(247, 201, 72, 0.08), rgba(46, 197, 193, 0.04));
    border: 1px solid rgba(247, 201, 72, 0.22);
    border-radius: 50px;
    box-shadow: inset 0 1px 0 rgba(247, 201, 72, 0.12);
}
.th-game-cost::before {
    content: '◉';
    color: #f7c948;
    font-size: 13px;
    text-shadow: 0 0 8px rgba(247, 201, 72, 0.6);
}
.th-game-cost strong {
    color: #f7c948;
    font-weight: 900;
    font-size: 12px;
    text-shadow: 0 0 8px rgba(247, 201, 72, 0.4);
}

.th-rules-btn {
    background: linear-gradient(135deg, rgba(46, 197, 193, 0.12), rgba(247, 201, 72, 0.08));
    border: 1px solid rgba(247, 201, 72, 0.35);
    color: #f7c948;
    padding: 8px 18px;
    border-radius: 50px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    cursor: pointer;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 0 rgba(247, 201, 72, 0.2);
}
.th-rules-btn:hover {
    background: linear-gradient(135deg, rgba(46, 197, 193, 0.2), rgba(247, 201, 72, 0.15));
    border-color: rgba(247, 201, 72, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(247, 201, 72, 0.25), inset 0 1px 0 rgba(247, 201, 72, 0.3);
}

/* --- MODALE RÈGLES --- */
.th-rules-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: th-rules-modal-fadein 0.25s ease;
}
.th-rules-modal.open { display: flex; }
@keyframes th-rules-modal-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

.th-rules-modal-box {
    background: #000;
    border: 1px solid rgba(247, 201, 72, 0.35);
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px 34px;
    position: relative;
    box-shadow: 0 0 40px rgba(247, 201, 72, 0.12);
    animation: th-rules-modal-slidein 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: left;
}
@keyframes th-rules-modal-slidein {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.th-rules-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 2;
}
.th-rules-modal-close:hover {
    background: rgba(255, 107, 91, 0.5);
    border-color: #ff6b5b;
    transform: rotate(90deg);
}

.th-rules-modal h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #f7c948;
    margin: 0 0 22px 0;
    padding-right: 44px;
    text-shadow: 0 0 14px rgba(247, 201, 72, 0.35);
}

.th-rules-modal-body {
    font-family: system-ui, -apple-system, sans-serif;
    color: #fff;
    font-size: 14px;
    line-height: 1.7;
}
.th-rules-modal-body h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #f7c948;
    margin: 22px 0 10px 0;
}
.th-rules-modal-body h4:first-child { margin-top: 0; }
.th-rules-modal-body ul {
    margin: 0;
    padding-left: 20px;
}
.th-rules-modal-body li {
    margin-bottom: 7px;
    color: #e0e0e0;
}
.th-rules-modal-body li::marker {
    color: #f7c948;
}
.th-rules-modal-body strong {
    color: #fff;
    font-weight: 800;
}
.th-rules-modal-body .th-rules-win { color: #5eeaa8; font-weight: 800; }
.th-rules-modal-body .th-rules-loss { color: #ff7b6b; font-weight: 800; }
.th-rules-modal-body .th-rules-neutral { color: #b0b0b0; }

/* Mobile : padding & taille ajustés */
@media (max-width: 480px) {
    .th-rules-modal-box {
        padding: 24px 22px;
        border-radius: 16px;
    }
    .th-rules-modal h3 { font-size: 14px; letter-spacing: 1.5px; }
    .th-rules-modal-body { font-size: 13px; }
    .th-game-topbar { gap: 10px; }
    .th-game-cost { font-size: 10px; padding: 7px 14px; }
    .th-rules-btn { font-size: 10px; padding: 7px 14px; }
}

/* --- MESSAGE DE STATUT --- */
.th-game-status-msg {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    min-height: 24px;
    margin: 15px 0;
    font-weight: 500;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
}

/* --- BOUTONS D'ACTION (Lancer, Rejouer) --- */
.th-game-action-btn {
    background: linear-gradient(135deg, #f7c948 0%, #e8a33d 50%, #c17a1f 100%);
    color: #1a0f08;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 14px 36px;
    border-radius: 50px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow:
        0 6px 20px rgba(247, 201, 72, 0.35),
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 4px rgba(120, 60, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
    margin-top: 10px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.th-game-action-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 30px rgba(247, 201, 72, 0.55),
        0 4px 10px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 4px rgba(120, 60, 0, 0.3);
}

.th-game-action-btn:disabled {
    background: linear-gradient(135deg, #2a1810, #1a0f08);
    color: rgba(247, 201, 72, 0.3);
    border-color: rgba(247, 201, 72, 0.1);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    text-shadow: none;
}

/* =========================================================
   VARIANTE V3 : Style Sanctuaire (KPI Cards + Convertisseur)
   Activée par la classe .th-bar-v3 sur le conteneur
   Usage Elementor : 
     <div class="th-bar-v3">[balance_titeti] [balance_credits]</div>
     <div class="th-bar-v3">[balance_titeti] [balance_credits] [tehono_banque]</div>
   ========================================================= */

/* --- Conteneur : ligne horizontale avec marges de sécurité --- */
.th-bar-v3 {
    display: flex; flex-wrap: wrap; align-items: stretch; gap: 20px;
    padding: 16px 24px;
    margin: 0 auto 24px auto;
    font-family: 'Outfit', 'Montserrat', sans-serif;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

/* --- KPI Cards --- */
.th-bar-v3 .th-balance-display,
.th-bar-v3 .th-rank-display {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1px !important;
    padding: 12px 20px !important; margin: 0;
    flex: 1 1 100px !important;
    min-width: 100px !important; height: auto !important;
    border: 1px solid !important;
    border-radius: 10px !important;
    font-family: 'JetBrains Mono', 'Outfit', monospace !important;
    font-size: 26px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.3px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Glow sur les chiffres (text-shadow) + box-shadow sur les cards */
.th-bar-v3 .titeti-count { 
    color: #FFD700 !important; background: rgba(255,215,0,0.08) !important; border-color: rgba(255,215,0,0.25) !important; 
    box-shadow: 0 0 15px rgba(255,215,0,0.15) !important;
    text-shadow: 0 0 12px rgba(255,215,0,0.5) !important;
}
.th-bar-v3 .titeti-count:hover { box-shadow: 0 0 25px rgba(255,215,0,0.3), inset 0 0 15px rgba(255,215,0,0.05) !important; }

.th-bar-v3 .game-credits { 
    color: #1EC115 !important; background: rgba(30,193,21,0.08) !important; border-color: rgba(30,193,21,0.25) !important; 
    box-shadow: 0 0 15px rgba(30,193,21,0.15) !important;
    text-shadow: 0 0 12px rgba(30,193,21,0.5) !important;
}
.th-bar-v3 .game-credits:hover { box-shadow: 0 0 25px rgba(30,193,21,0.3), inset 0 0 15px rgba(30,193,21,0.05) !important; }

.th-bar-v3 .taiara-count { 
    color: #00F2FF !important; background: rgba(0,242,255,0.08) !important; border-color: rgba(0,242,255,0.25) !important; 
    box-shadow: 0 0 15px rgba(0,242,255,0.15) !important;
    text-shadow: 0 0 12px rgba(0,242,255,0.5) !important;
}
.th-bar-v3 .taiara-count:hover { box-shadow: 0 0 25px rgba(0,242,255,0.3), inset 0 0 15px rgba(0,242,255,0.05) !important; }

.th-bar-v3 .user-rank { 
    color: #D455FF !important; font-size: 22px !important; background: rgba(212,85,255,0.08) !important; border-color: rgba(212,85,255,0.25) !important; 
    box-shadow: 0 0 15px rgba(212,85,255,0.15) !important;
    text-shadow: 0 0 12px rgba(212,85,255,0.5) !important;
}
.th-bar-v3 .user-rank:hover { box-shadow: 0 0 25px rgba(212,85,255,0.3), inset 0 0 15px rgba(212,85,255,0.05) !important; }

/* --- Séparateurs (désactivé - chaque card a ses propres bordures) --- */

/* --- Label au-dessus du chiffre (::before = tag) --- */
.th-bar-v3 .th-balance-display::before,
.th-bar-v3 .th-rank-display::before {
    display: block !important;
    order: -1 !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    line-height: 1 !important;
    margin: 0 0 2px 0 !important;
}

/* --- Cacher le ::after --- */
.th-bar-v3 .th-balance-display::after,
.th-bar-v3 .th-rank-display::after {
    content: none !important; display: none !important;
}

/* --- Labels ::before et ::after --- */
.th-bar-v3 .titeti-count::before { content: "Tīteti" !important; color: #FFD700 !important; }
.th-bar-v3 .titeti-count::after { content: none !important; display: none !important; }

.th-bar-v3 .game-credits::before { content: "Runes" !important; color: #1EC115 !important; }
.th-bar-v3 .game-credits::after { content: none !important; display: none !important; }

.th-bar-v3 .taiara-count::before { content: "NFTs Ta'iara" !important; color: #00F2FF !important; }
.th-bar-v3 .taiara-count::after { content: none !important; display: none !important; }

.th-bar-v3 .user-rank::before { content: "Rang" !important; color: #D455FF !important; }
.th-bar-v3 .user-rank::after { content: none !important; display: none !important; }

/* --- Convertisseur : compact, en ligne --- */
.th-bar-v3 .th-bank-wrapper {
    display: flex !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.th-bar-v3 .th-bank-module {
    width: 100% !important;
    min-width: unset !important; height: auto !important;
    padding: 8px 12px !important; margin: 0 !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;
    border-radius: 10px !important;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2), 0 0 12px rgba(255, 0, 153, 0.1) !important;
    display: flex !important; flex-direction: column !important;
    align-items: center !important; gap: 6px !important;
}

/* Titre caché - on affiche le subtitle */
.th-bar-v3 .th-bank-module h3 { display: none !important; }
.th-bar-v3 .th-bank-subtitle {
    display: block !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    color: rgba(255,255,255,0.85) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    text-align: center !important;
    margin: 0 !important; padding: 0 !important;
    white-space: nowrap !important;
}
.th-bar-v3 .th-bank-module::before { content: none !important; }
.th-bar-v3 .th-bank-module::after { content: none !important; }

/* Contrôles - stepper + bouton */
.th-bar-v3 .th-bank-controls {
    display: flex !important; align-items: center !important; justify-content: center !important;
    gap: 8px !important; margin: 0 !important; width: auto !important;
}

/* Stepper : boutons −/+ et input */
.th-bar-v3 .th-input-group {
    display: flex !important; align-items: center !important; height: 26px !important;
}
.th-bar-v3 .th-input-group .th-input-label { display: none !important; }
.th-bar-v3 .th-stepper-btn {
    width: 26px !important; height: 26px !important;
    background: rgba(255, 0, 153, 0.15) !important;
    border: 1px solid rgba(255, 0, 153, 0.4) !important;
    color: #ff0099 !important;
    font-size: 14px !important; font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    transition: all 0.2s !important;
    padding: 0 !important; line-height: 1 !important;
}
.th-bar-v3 .th-stepper-btn:first-child { border-radius: 6px 0 0 6px !important; }
.th-bar-v3 .th-stepper-btn:last-child { border-radius: 0 6px 6px 0 !important; }
.th-bar-v3 .th-stepper-btn:hover { background: rgba(255, 0, 153, 0.3) !important; }

.th-bar-v3 .th-input-group input {
    background: rgba(0,0,0,0.5) !important;
    border: 1px solid rgba(255, 0, 153, 0.3) !important;
    color: #FFFFFF !important;
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 13px !important; font-weight: 700 !important;
    width: 40px !important; height: 26px !important;
    text-align: center !important; border-radius: 0 !important;
    padding: 0 !important;
    border-left: none !important; border-right: none !important;
    -moz-appearance: textfield !important;
}
.th-bar-v3 .th-input-group input::-webkit-outer-spin-button,
.th-bar-v3 .th-input-group input::-webkit-inner-spin-button { -webkit-appearance: none !important; margin: 0 !important; }
.th-bar-v3 .th-input-group input:focus {
    border-color: #ff0099 !important; box-shadow: 0 0 8px rgba(255,0,153,0.3) !important; outline: none !important;
}

/* Flèche masquée */
.th-bar-v3 .th-arrow { display: none !important; }

/* Bouton CONVERTIR - transparent sans survol, rose en survol */
.th-bar-v3 #th-deposit-btn,
.th-bar-v3 #th-modal-deposit-btn,
.th-bar-v3 button#th-deposit-btn,
.th-bar-v3 button#th-modal-deposit-btn {
    padding: 5px 12px !important; border-radius: 6px !important;
    border: 1px solid #ff0099 !important;
    background: transparent !important;
    color: #ff0099 !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 !important; display: inline-flex !important; align-items: center !important; white-space: nowrap !important;
    line-height: 1 !important; text-decoration: none !important; opacity: 1 !important;
    min-height: 0 !important; width: auto !important;
}
.th-bar-v3 #th-deposit-btn:hover,
.th-bar-v3 #th-modal-deposit-btn:hover,
.th-bar-v3 button#th-deposit-btn:hover {
    background: linear-gradient(135deg, #ff0099, #cc0077) !important;
    color: #fff !important;
    box-shadow: 0 5px 20px rgba(255,0,153,0.5) !important;
    border: 1px solid #ff0099 !important;
    opacity: 1 !important;
}
    box-shadow: 0 5px 20px rgba(255,0,153,0.5) !important;
}

/* Message masqué (on utilise les toasts) */
.th-bar-v3 #th-bank-message { display: none !important; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .th-bar-v3 { 
        justify-content: center !important; 
        gap: 8px !important;
        padding: 12px 0; 
    }
    .th-bar-v3 .th-balance-display,
    .th-bar-v3 .th-rank-display { 
        margin: 0 !important;
        font-size: 20px !important;
        padding: 8px 4px !important;
    }
    .th-bar-v3 .th-balance-display::before,
    .th-bar-v3 .th-rank-display::before {
        font-size: 8px !important; 
    }
    .th-bar-v3 .th-bank-wrapper {
        width: 100% !important; 
        justify-content: center !important; 
    }
    .th-bar-v3 .th-bank-module {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* --- Mobile très étroit (ex: vieux iPhone) --- */
@media (max-width: 380px) {
    .th-bar-v3 .th-bank-controls {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
}
/* =========================================
   BOUTON FERMETURE MODALE - Style unifié rond
   ========================================= */
.th-modal-close,
button.th-modal-close {
    position: absolute !important;
    top: 15px !important; right: 15px !important;
    width: 32px !important; height: 32px !important;
    min-width: 32px !important; min-height: 32px !important;
    max-width: 32px !important; max-height: 32px !important;
    padding: 0 !important; margin: 0 !important;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 50% !important;
    color: #fff !important;
    font-size: 13px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    z-index: 50 !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    font-weight: 400 !important;
    box-shadow: none !important;
}
.th-modal-close:hover,
button.th-modal-close:hover {
    background: rgba(231,76,60,0.85) !important;
    border-color: #e74c3c !important;
    color: #fff !important;
}

/* ═══════════════════════════════════════════════
   🔧 RESPONSIVE PATCH - Ajouté sans toucher au desktop
   Breakpoints : 768px (tablette), 480px (mobile), 380px (petit mobile)
   ═══════════════════════════════════════════════ */

/* ── TABLETTE (≤ 768px) ── */
@media (max-width: 768px) {

    /* Wallet Modal - plein écran mobile */
    .tehono-wallet-box {
        width: calc(100vw - 32px) !important;
        padding: 24px 20px !important;
        border-radius: 20px !important;
    }
    .tehono-wallet-box h3 {
        font-size: 16px !important;
        letter-spacing: 1px !important;
        margin-bottom: 20px !important;
    }
    .tehono-wallet-btn {
        padding: 14px 16px !important;
        font-size: 14px !important;
        gap: 12px !important;
    }
    .tehono-wallet-icon {
        width: 30px !important;
        height: 30px !important;
    }

    /* Dashboard Grid - empiler */
    .th-dashboard-grid {
        gap: 10px !important;
    }

    /* Station de Change - pleine largeur */
    .th-bank-module {
        min-width: unset !important;
        width: 100% !important;
        margin: 0 !important;
    }
    .th-dashboard-grid .th-bank-wrapper {
        width: 100% !important;
    }

    /* Galerie NFT - 2 colonnes min */
    .th-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        gap: 10px !important;
    }

    /* Coffres - plus petits */
    .th-chest-grid {
        gap: 15px !important;
    }
    .th-chest-item {
        width: 95px !important;
        height: 95px !important;
    }
    .th-chest-lid::after {
        font-size: 22px !important;
        bottom: -14px !important;
    }

    /* Rouleau du Mana - adapté */
    .th-rouleau-wrapper {
        padding: 20px 15px !important;
        margin: 20px auto !important;
    }
    .th-rouleau-window {
        width: 280px !important;
        height: 140px !important;
    }
    .th-rouleau-track {
        padding-left: 90px !important;
    }
    .th-rouleau-card {
        width: 80px !important;
        height: 100px !important;
    }
    .th-rc-icon { font-size: 28px !important; }
    .th-rc-label { font-size: 9px !important; }
    #th-spin-btn {
        padding: 10px 35px !important;
        font-size: 14px !important;
    }

    /* Jeu Rituel - cartes plus petites */
    .th-element-card {
        width: 80px !important;
        height: 100px !important;
    }
    .th-elem-icon { font-size: 28px !important; }
    .th-elem-name { font-size: 9px !important; }

    /* Sous-pages */
    .th-subpage-header {
        flex-direction: column !important;
        gap: 12px !important;
        text-align: center !important;
    }
    .th-subpage-title {
        font-size: 22px !important;
    }
    .th-content-grid {
        grid-template-columns: 1fr !important;
    }

    /* Modale d'expédition */
    .th-modal-content {
        width: 95% !important;
        padding: 20px 16px !important;
    }
    .th-form-row {
        flex-direction: column !important;
    }
    .th-input-small {
        width: 100% !important;
        min-width: unset !important;
    }

    /* Game container */
    .th-game-container {
        padding: 20px 15px !important;
        border-radius: 18px !important;
    }

    /* Grille 4 cols → déjà géré (2 cols à 1100, 1 col à 600) */

    /* Barre état (header wallet) */
    .tehono-gate-wrapper {
        gap: 6px !important;
    }
    #tehono-wallet-info {
        font-size: 9px !important;
        padding: 5px 10px !important;
    }
    #tehono-dashboard-link {
        font-size: 9px !important;
        padding: 5px 12px !important;
    }
}

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

    /* Wallet Modal - encore plus compact */
    .tehono-wallet-box {
        padding: 20px 16px !important;
        border-radius: 16px !important;
    }
    .tehono-wallet-btn {
        padding: 12px 14px !important;
        font-size: 13px !important;
        border-radius: 12px !important;
    }

    /* KPI cards - texte plus petit */
    .th-balance-display,
    .th-rank-display {
        font-size: 24px !important;
        padding: 14px 18px !important;
        height: auto !important;
        min-height: 70px !important;
    }

    /* Rang - empiler */
    .th-dashboard-grid .user-rank {
        flex-direction: column !important;
        min-width: 100% !important;
        height: auto !important;
        padding: 14px !important;
        gap: 6px !important;
        text-align: center !important;
        align-items: center !important;
    }

    /* Galerie NFT - colonnes plus étroites */
    .th-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    /* Coffres - 3 par ligne */
    .th-chest-item {
        width: 82px !important;
        height: 82px !important;
    }
    .th-chest-lid::after {
        font-size: 19px !important;
        bottom: -12px !important;
    }
    .th-chest-grid {
        gap: 12px !important;
    }

    /* Rouleau encore plus petit */
    .th-rouleau-window {
        width: 240px !important;
        height: 120px !important;
    }
    .th-rouleau-track {
        padding-left: 70px !important;
    }
    .th-rouleau-card {
        width: 65px !important;
        height: 85px !important;
        margin-right: 8px !important;
    }
    .th-rc-icon { font-size: 22px !important; margin-bottom: 4px !important; }

    /* Jeu Rituel - compact */
    .th-rituel-grid {
        gap: 8px !important;
    }
    .th-element-card {
        width: 70px !important;
        height: 88px !important;
    }

    /* Claim button */
    .th-claim-button {
        padding: 12px 24px !important;
        font-size: 11px !important;
    }

    /* Tooltip wallet - caché sur mobile (pas de hover) */
    #tehono-wallet-info:hover::after,
    #tehono-wallet-info:hover::before {
        display: none !important;
    }
}

/* ── PETIT MOBILE (≤ 380px) ── */
@media (max-width: 380px) {

    .th-balance-display,
    .th-rank-display {
        font-size: 20px !important;
        padding: 12px 14px !important;
    }

    .th-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .th-rouleau-window {
        width: 220px !important;
    }
    .th-rouleau-track {
        padding-left: 60px !important;
    }
    .th-rouleau-card {
        width: 55px !important;
        height: 72px !important;
    }

    .th-chest-item {
        width: 72px !important;
        height: 72px !important;
    }
    .th-chest-lid::after {
        font-size: 17px !important;
        bottom: -11px !important;
    }
}
