/* ═══════════════════════════════════════════════════════════════
   BELOTE COINCHÉE — Photo Casino Base
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:    #D4AF37;
  --felt:    #1a7a40;
  --felt-dk: #115530;
  --dark:    rgba(0,0,0,0.78);
  --panel:   rgba(8,5,15,0.88);
}

html, body { width:100%; height:100%; overflow:hidden; background:#0a0608; }

/* ── APP ─────────────────────────────────────────────────────── */
#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: Georgia, serif;
  user-select: none;
}

/* ── PHOTO DE FOND ───────────────────────────────────────────── */
#bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}

/* ── OVERLAY (léger assombrissement du bas pour contraste cartes) */
#table-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 35%;
  z-index: 5;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0)    0%,
    rgba(0,0,0,0.35) 60%,
    rgba(0,0,0,0.55) 100%
  );
}

/* ── LABELS PERSONNAGES ──────────────────────────────────────── */
.char-label {
  position: absolute;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

/* Positions des joueurs */
#cl-0 { top: 4%;  left: 50%; transform: translateX(-50%); align-items: center; }
#cl-3 { top: 36%; left: 3%;  align-items: center; }
#cl-1 { top: 36%; right: 3%; align-items: center; }
#cl-2 { align-items: center; z-index: 70; /* position gérée par JS renderHand */ }

/* ── Wrapper badge + anneau minuteur ────────────────────────── */
.badge-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.timer-ring {
  position: absolute;
  inset: -7px;
  width: calc(100% + 14px);
  height: calc(100% + 14px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.timer-ring.active { opacity: 1; }

#timer-arc {
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

/* ── Badges joueur — style casino sombre ─────────────────────── */
.badge-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(212,175,55,0.4);
  box-shadow: 0 4px 18px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.badge-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Fallback gradient + initiale pour le joueur humain */
.av-0 { background: linear-gradient(145deg, #2c1654, #6b21a8); }
.av-1 { background: linear-gradient(145deg, #0f2744, #1d4ed8); }
.av-3 { background: linear-gradient(145deg, #0a2e1f, #15803d); }
.av-2 {
  background: linear-gradient(145deg, #3b1f08, #b45309);
  font-size: 34px; font-weight: 900; color: #fff;
  font-family: system-ui, -apple-system, sans-serif;
}

.char-label.active .badge-avatar {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.25), 0 0 20px rgba(212,175,55,0.4), 0 4px 18px rgba(0,0,0,0.6);
  transform: scale(1.06);
}

.badge-name {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  background: rgba(6,4,14,0.85);
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212,175,55,0.2);
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  font-family: system-ui, -apple-system, sans-serif;
}

.char-label.active .badge-name {
  border-color: rgba(212,175,55,0.5);
  color: var(--gold);
}

.badge-count {
  background: rgba(6,4,14,0.88);
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-weight: 700;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212,175,55,0.25);
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  font-family: 'Courier New', monospace;
}

/* ── Bulles de parole ─────────────────────────────────────────── */
.char-info {
  display: none;
  color: #111;
  font-size: 22px;
  font-weight: 900;
  background: #f5f0e0;
  border-radius: 14px;
  padding: 8px 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
  position: relative;
  font-family: system-ui, -apple-system, sans-serif;
}
.char-info:not(:empty) { display: block; }

/* Queue bulle vers le bas (Fabienne) */
.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #f5f0e0;
}
/* Queue bulle vers la droite (Linda, côté gauche → bulle à droite) */
.speech-right::after {
  bottom: auto;
  left: auto;
  top: 50%;
  right: -11px;
  transform: translateY(-50%);
  border-top-color: transparent;
  border-left-color: #f5f0e0;
}
/* Queue bulle vers la gauche (Serge, côté droite → bulle à gauche) */
.speech-left::after {
  bottom: auto;
  left: -11px;
  top: 50%;
  transform: translateY(-50%);
  border-top-color: transparent;
  border-right-color: #f5f0e0;
}

.card-count { display: none; } /* remplacé par .badge-count */

.thinking {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}
.thinking span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: dot 1.2s ease-in-out infinite;
}
.thinking span:nth-child(2) { animation-delay: 0.2s; }
.thinking span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot {
  0%,100% { transform:translateY(0); opacity:0.4; }
  50%      { transform:translateY(-5px); opacity:1; }
}

/* ── TEXTE SUR LE FEUTRE ────────────────────────────────────── */
#felt-text {
  position: absolute;
  top: 35%; left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.06);
  font-size: clamp(10px,1.4vw,18px);
  letter-spacing: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 8;
}

/* ── ZONE PLI (cartes jouées sur la table) ───────────────────── */
#trick-zone {
  position: absolute;
  top: 36%;
  left: 50%;
  width: 380px;
  height: 280px;
  z-index: 20;
  transform: translateX(-50%) perspective(700px) rotateX(22deg);
  transform-origin: center 60%;
}

#trick-counter {
  position: absolute;
  top: 42%;
  right: 27%;
  z-index: 22;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  background: rgba(0,0,0,0.6);
  padding: 4px 12px;
  border-radius: 10px;
  letter-spacing: 1px;
}

/* ── CARTES SUR LA TABLE (SVG) ────────────────────────────────── */
.trick-card {
  position: absolute;
  width: 115px;
  height: 161px;
  border-radius: 9px;
  background: #fff;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.5),
    0 4px 14px rgba(0,0,0,0.3),
    0 0 18px rgba(28,90,55,0.35);   /* reflet vert du feutre */
  overflow: hidden;
  filter: sepia(0.12) brightness(0.94) drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* Voile chaud des lustres posé sur chaque carte */
.trick-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background: rgba(190,145,60,0.07);
  pointer-events: none;
  mix-blend-mode: overlay;
}

.trick-card img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  pointer-events: none;
}

@keyframes card-drop {
  from { transform: scale(0.5) translateY(-20px); opacity:0; }
  to   { transform: scale(1); opacity:1; }
}

/* ── ZONE JOUEUR ─────────────────────────────────────────────── */
#player-zone {
  position: absolute;
  bottom: -85px; left: 0; right: 0;
  height: 19.6vw;
  max-height: 34vh;
  z-index: 60;
  overflow: visible;
}

/* Photo de la main — très discrète, juste pour donner l'ambiance */
#hand-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  z-index: 61;
  opacity: 0.18;
  -webkit-mask-image: linear-gradient(to bottom,
    transparent   0%,
    rgba(0,0,0,0.4) 30%,
    black         60%);
  mask-image: linear-gradient(to bottom,
    transparent   0%,
    rgba(0,0,0,0.4) 30%,
    black         60%);
}

/* Cartes interactives SVG — superposées sur la photo de main */
#human-cards {
  position: absolute;
  inset: 0;
  z-index: 62;
}

/* Pastille tour du joueur */
#turn-pill {
  position: absolute;
  top: -44px; left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #000;
  font-size: 11px;
  font-weight: bold;
  padding: 5px 20px;
  border-radius: 20px;
  letter-spacing: 2px;
  white-space: nowrap;
  z-index: 65;
  animation: pill 1s ease-in-out infinite;
}

@keyframes pill { 0%,100%{opacity:1} 50%{opacity:0.7} }

/* ── CARTES SVG EN MAIN ──────────────────────────────────────── */
.hand-card {
  position: absolute;
  border-radius: 6px;
  box-shadow: 2px 6px 20px rgba(0,0,0,0.75), 0 1px 3px rgba(0,0,0,0.5);
  cursor: pointer;
  transform-origin: center bottom;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  overflow: hidden;
  /* outline doré quand jouable */
}

.hand-card img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 6px;
}

.hand-card.playable {
  outline: 2px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, outline 0.1s ease;
}

.hand-card.playable:hover {
  box-shadow: 3px 16px 36px rgba(0,0,0,0.95), 0 0 14px rgba(212,175,55,0.6);
  outline: 2px solid rgba(212,175,55,0.9);
  z-index: 99 !important;
}

.hand-card.dim {
  filter: brightness(0.52) saturate(0.25);
  cursor: default;
}

/* ── SCORE ───────────────────────────────────────────────────── */
#score-panel {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 100;
  background: rgba(6,3,12,0.90);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 160px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.7);
}

.score-logo {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 8px;
  font-family: 'Courier New', monospace;
}

.score-goal {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 10px;
  color: rgba(212,175,55,0.7);
  text-align: center;
  letter-spacing: 0.5px;
  margin: -4px 0 6px;
  min-height: 14px;
}
.score-row { display:grid; grid-template-columns:1fr 1fr; gap:4px; margin-bottom:2px; }
.slbl { color:rgba(255,255,255,0.55); font-size:11px; font-weight:700; text-align:center; letter-spacing:1px; }
.snum { color:#fff; font-size:32px; font-weight:900; font-family:'Courier New',monospace; text-align:center; }
.score-sub { display:none; }

/* ── POINTS MANCHE EN COURS ──────────────────────────────────── */
#hand-tally {
  margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
#ht-nos { color: #3DC37A; font-size: 20px; font-weight: 900; font-family: 'Courier New', monospace; min-width: 32px; text-align: right; }
#ht-eux { color: #FF6060; font-size: 20px; font-weight: 900; font-family: 'Courier New', monospace; min-width: 32px; text-align: left; }
.ht-sep { color: rgba(255,255,255,0.3); font-size: 14px; }

/* ── ATOUT ───────────────────────────────────────────────────── */
#trump-badge {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--panel);
  border: 1px solid var(--gold);
  border-radius: 22px;
  padding: 6px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  backdrop-filter: blur(12px);
}

.trump-lbl { color:var(--gold); font-size:10px; letter-spacing:2px; font-weight:bold; }
#trump-suit-icon { font-size:24px; }
#trump-pts-val { color:rgba(255,255,255,0.7); font-size:14px; font-family:monospace; }
.suit-red { color:#d32f2f; }

/* ── HORLOGE ─────────────────────────────────────────────────── */
#clock {
  display: none;
}

/* ── ENCHERES ────────────────────────────────────────────────── */
#bid-panel {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  background: rgba(6,3,12,0.96);
  border: 1.5px solid var(--gold);
  border-radius: 20px;
  padding: 22px 28px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.95), 0 0 40px rgba(212,175,55,0.08);
  backdrop-filter: blur(16px);
}

.bid-amount-row { display:flex; align-items:center; justify-content:center; gap:16px; }

.circle-btn {
  width:48px; height:48px;
  border-radius:50%;
  border: none;
  background: #c0392b;
  color: #fff;
  font-size:28px; line-height:1;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition: background 0.18s, transform 0.12s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}
.circle-btn:hover { background:#e74c3c; transform:scale(1.08); }
.red-btn { background:#c0392b; }

#bid-value {
  color:#fff;
  font-size:48px;
  font-weight:900;
  min-width:100px;
  text-align:center;
  font-family:'Courier New',monospace;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 12px;
  padding: 4px 16px;
}

.suit-row { display:flex; gap:10px; justify-content:center; }

.suit-btn {
  width:62px; height:62px;
  border-radius:10px;
  border: 3px solid rgba(255,255,255,0.3);
  background:#f0ece0;
  color:#111;
  font-size:32px;
  cursor:pointer;
  transition:all 0.18s;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.suit-btn.red   { color:#d32f2f; }
.suit-btn:hover { border-color:#fff; transform:scale(1.08); }
.suit-btn.selected {
  border-color:#fff;
  background:#fff;
  transform:scale(1.12);
  box-shadow:0 0 18px rgba(255,255,255,0.6);
}

/* Bouton Capot */
.capot-btn {
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  border: 2px solid rgba(212,175,55,0.4);
  background: rgba(212,175,55,0.1);
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.18s;
  font-family: system-ui, -apple-system, sans-serif;
}
.capot-btn:hover, .capot-btn.selected {
  background: rgba(212,175,55,0.25);
  border-color: var(--gold);
}

/* Bouton Prendre */
.prendre-btn {
  width: 100%;
  padding: 14px;
  border-radius: 30px;
  border: none;
  background: #5a6a70;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  font-family: Georgia, serif;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.18s;
  box-shadow: 0 3px 12px rgba(0,0,0,0.4);
}
.prendre-btn:hover:not(:disabled) { background: #6a8090; }
.prendre-btn:disabled { background: #3a4a50; color: rgba(255,255,255,0.35); cursor:default; }

/* Barre timer */
#bid-timer-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  overflow: hidden;
}
#bid-timer-fill {
  width: 100%;
  height: 100%;
  background: #e74c3c;
  border-radius: 3px;
}

.bid-btns { display:flex; gap:10px; justify-content:center; }

/* Bouton Passer */
.passer-btn {
  flex:1;
  padding: 12px 20px;
  border-radius: 30px;
  border: none;
  background: #c0392b;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: background 0.18s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.passer-btn:hover { background:#e74c3c; }

/* Bouton Contre */
.contre-btn {
  flex:1;
  padding: 12px 20px;
  border-radius: 30px;
  border: none;
  background: #5a6a70;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: background 0.18s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.contre-btn:hover { background:#6a8090; }

/* ── BOUTONS génériques ───────────────────────────────────────── */
.act-btn {
  padding:10px 22px;
  border-radius:9px;
  border:1px solid rgba(255,255,255,0.2);
  background:rgba(255,255,255,0.08);
  color:#fff;
  font-size:14px;
  font-family:Georgia,serif;
  cursor:pointer;
  transition:all 0.18s;
}
.act-btn:hover { background:rgba(255,255,255,0.18); }
.act-btn.green { background:#1e7d42; border-color:#2eaa58; font-weight:bold; }
.act-btn.green:hover { background:#25a050; }
.act-btn.green:disabled { background:rgba(30,125,66,0.28); border-color:rgba(46,170,88,0.28); color:rgba(255,255,255,0.32); cursor:default; }
.act-btn.purple { background:rgba(95,18,145,0.35); border-color:#9c27b0; }
.act-btn.purple:hover { background:rgba(95,18,145,0.65); }

/* ── FIN MANCHE ─────────────────────────────────────────────── */
#scoring-panel {
  position:absolute; top:50%; left:50%;
  transform:translate(-50%,-50%);
  z-index:200;
  background:rgba(5,3,8,0.97);
  border:1px solid var(--gold);
  border-radius:18px;
  padding:30px 44px;
  min-width:300px;
  display:flex; flex-direction:column; gap:18px;
  align-items:center; text-align:center;
  box-shadow:0 24px 70px rgba(0,0,0,1);
}

.sc-header        { font-size:22px; font-weight:bold; }
.sc-header.green  { color:#3DC37A; }
.sc-header.red    { color:#FF4444; }
.sc-line          { font-size:16px; font-weight:700; }
.sc-line.green    { color:#3DC37A; }
.sc-line.red      { color:#FF4444; }
.sc-win           { color:var(--gold); font-size:20px; font-weight:bold; margin-top:4px; }

/* ── DERNIER PLI ─────────────────────────────────────────────── */
#last-trick-panel {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 100;
  background: rgba(6,3,12,0.92);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.8);
}

#last-trick-label {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

#last-trick-cards {
  display: flex;
  gap: 6px;
}

#last-trick-cards img {
  width: 62px;
  height: 87px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,0.7);
}

#last-trick-winner {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* ── FLASH ───────────────────────────────────────────────────── */
#announce {
  position:absolute; top:42%; left:50%;
  transform:translate(-50%,-50%);
  z-index:300;
  color:var(--gold);
  font-size:52px; font-weight:bold;
  text-shadow:0 0 40px rgba(212,175,55,0.9), 2px 2px 12px rgba(0,0,0,0.95);
  pointer-events:none; white-space:nowrap;
  animation:flash-out 2.2s ease-out forwards;
}

@keyframes flash-out {
  0%  { opacity:0; transform:translate(-50%,-60%) scale(0.4); }
  18% { opacity:1; transform:translate(-50%,-50%) scale(1.1); }
  70% { opacity:1; transform:translate(-50%,-50%) scale(1); }
  100%{ opacity:0; transform:translate(-50%,-44%) scale(0.92); }
}

/* ── UTILITAIRE ──────────────────────────────────────────────── */
.hidden { display:none !important; }

/* ═══════════════════════════════════════════════════════════════
   HOME SCREEN — Style PokerStars
   ═══════════════════════════════════════════════════════════════ */

#home-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #1A1A1A;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  transition: opacity 0.4s ease, transform 0.4s ease;
  overflow: hidden;
}
#home-screen.fade-out {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

/* ── Top Navigation (style PokerStars) ───────────────────────── */
#top-nav {
  flex-shrink: 0;
  background: #0A0A14;
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

/* Rangée 1 : logo + balance */
#tn-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 8px;
}

.tn-logo {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #D4AF37;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tn-logo span { color: #fff; }

#tn-balance {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.28);
  border-radius: 18px;
  padding: 4px 12px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #D4AF37;
  letter-spacing: 0.3px;
}
.tn-coin { font-size: 12px; }

/* Rangée 2 : modes à gauche, utils à droite */
#tn-row2 {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.05);
}

#tn-modes { display: flex; }
#tn-utils { display: flex; }

/* Boutons communs */
.tn-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.9px;
  color: rgba(255,255,255,0.38);
  padding: 9px 13px 7px;
  position: relative;
  transition: color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.tn-btn:active { opacity: 0.6; }

/* Mode actif : couleur spécifique par variante */
.tn-mode.active[data-mode="classique"] {
  color: #3DC37A;
  border-bottom-color: #3DC37A;
}
.tn-mode.active[data-mode="coinche"] {
  color: #FF6080;
  border-bottom-color: #FF6080;
}
.tn-mode.active[data-mode="contree"] {
  color: #6090FF;
  border-bottom-color: #6090FF;
}

/* Séparateur vertical entre modes */
#tn-modes .tn-btn + .tn-btn::before {
  content: '';
  position: absolute;
  left: 0; top: 25%; bottom: 25%;
  width: 1px;
  background: rgba(255,255,255,0.07);
}

/* Utils actifs : or */
.tn-util.active {
  color: #D4AF37;
  border-bottom-color: #D4AF37;
}
/* Séparateur avant BOUTIQUE */
#tn-utils .tn-btn:first-child::before {
  content: '';
  position: absolute;
  left: 0; top: 25%; bottom: 25%;
  width: 1px;
  background: rgba(255,255,255,0.07);
}

/* ── Pages ───────────────────────────────────────────────────── */
#ps-pages {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.ps-page {
  display: none;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ps-page.active { display: block; }

/* ── Hero Banner ─────────────────────────────────────────────── */
#ps-hero {
  position: relative;
  margin: 8px 12px 0;
  height: 180px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}
#ps-hero canvas,
.mc-canvas,
.ec-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.75) 100%);
}
.hero-content {
  position: absolute;
  left: 20px;
  bottom: 18px;
}
.hero-title {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  line-height: 1.0;
  letter-spacing: -0.5px;
}
.hero-pill {
  display: inline-block;
  margin-top: 8px;
  background: #3DC37A;
  color: #1A1A1A;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 5px 10px;
  border-radius: 6px;
}
.hero-play {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #3DC37A;
  box-shadow: 0 0 24px rgba(61,195,122,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #1A1A1A;
  padding-left: 3px;
}

/* ── Section title ───────────────────────────────────────────── */
.ps-section-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  padding: 20px 16px 12px;
}

/* ── Mode Cards (horizontal scroll) ─────────────────────────── */
#ps-modes {
  display: flex;
  gap: 10px;
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}
#ps-modes::-webkit-scrollbar { display: none; }

.mode-card {
  position: relative;
  width: 148px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mode-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.7);
}
.mc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.8) 100%);
}
.mc-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 3px 7px;
  border-radius: 4px;
  color: #1A1A1A;
  z-index: 2;
}
.mc-badge.green { background: #3DC37A; }
.mc-info {
  position: absolute;
  left: 12px;
  bottom: 12px;
  right: 8px;
  z-index: 2;
}
.mc-title {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  line-height: 1.0;
  letter-spacing: -0.3px;
}
.mc-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

/* ── Event Cards (vertical stack) ───────────────────────────── */
#ps-events {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 12px;
}
.event-card {
  position: relative;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  transition: transform 0.18s ease;
}
.event-card:hover { transform: translateY(-2px); }

.ec-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, transparent 60%);
}
.ec-label {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 8px;
  border-radius: 4px;
  color: #fff;
  z-index: 2;
}
.ec-info {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
}
.ec-title {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  line-height: 1.0;
  letter-spacing: -0.5px;
}
.ec-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-top: 5px;
}
.ec-arrow {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  z-index: 2;
}

/* ── Stats Page ──────────────────────────────────────────────── */
.tab-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  padding: 20px 16px 16px;
}
.tab-sub-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  padding: 20px 16px 12px;
}

.big-stats-row {
  display: flex;
  gap: 10px;
  padding: 0 16px;
}
.big-stat-card {
  flex: 1;
  background: #242424;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px 8px;
  text-align: center;
}
.big-stat-card.green-border { border-color: rgba(61,195,122,0.3); }
.big-stat-card.red-border   { border-color: rgba(255,80,112,0.3); }

.bsc-val {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.bsc-val.green { color: #3DC37A; }
.bsc-val.red   { color: #FF5070; }
.bsc-lbl {
  font-size: 8px;
  font-weight: 600;
  color: #ccc;
  letter-spacing: 1px;
  margin-top: 4px;
}

.diff-row {
  display: flex;
  gap: 8px;
  padding: 0 16px;
}
.diff-opt {
  flex: 1;
  background: #242424;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #888;
  padding: 14px 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
}
.diff-opt.active {
  background: rgba(61,195,122,0.1);
  border-color: #3DC37A;
  color: #3DC37A;
}
.diff-dot { font-size: 16px; margin-bottom: 4px; }
.diff-name { font-size: 10px; font-weight: 700; letter-spacing: 1px; }

/* ── Options Page ────────────────────────────────────────────── */
.variant-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.variant-tile {
  background: #242424;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.18s;
}
.variant-tile.active {
  border-color: rgba(255,80,112,0.5);
  background: rgba(255,80,112,0.08);
}
.vt-suit { font-size: 22px; }
.vt-name {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.vt-check { font-size: 18px; color: #3DC37A; }

#btn-nouvelle-partie {
  margin: 16px;
  width: calc(100% - 32px);
  padding: 16px;
  background: rgba(255,80,80,0.06);
  border: 1px solid rgba(255,80,80,0.35);
  border-radius: 12px;
  color: #FF4444;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
}
#btn-nouvelle-partie:hover {
  background: rgba(255,80,80,0.14);
}

/* ── Bottom Nav ──────────────────────────────────────────────── */
/* (ancien footer nav supprimé — remplacé par #top-nav) */

/* ── Bouton retour menu (dans le jeu) ────────────────────────── */
#btn-home {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: rgba(255,255,255,0.75);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 6px 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  backdrop-filter: blur(6px);
}
#btn-home:active {
  background: rgba(0,0,0,0.75);
  color: #fff;
}

/* ── MODAL QUITTER ─────────────────────────────────────────────── */
#quit-modal {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
#quit-modal.hidden { display: none; }

#quit-panel {
  background: #120e1e;
  border: 1px solid rgba(255,80,112,0.3);
  border-radius: 20px;
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.8);
  animation: tsmSlideUp 0.22s cubic-bezier(0.22,0.61,0.36,1);
}
#quit-icon { margin-bottom: 4px; }
#quit-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}
#quit-sub {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
}
#quit-btns {
  display: flex;
  gap: 10px;
  width: 100%;
}
#btn-quit-cancel {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.7);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
#btn-quit-cancel:hover { background: rgba(255,255,255,0.13); color: #fff; }
#btn-quit-confirm {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #FF5070;
  color: #fff;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s;
}
#btn-quit-confirm:hover { background: #ff3050; }

/* Scoring btns row */
#scoring-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── CARTE RETOURNÉE (Belote classique) ──────────────────────── */
#retournee-card {
  position: absolute;
  top: 44%;
  left: 50%;
  width: 115px;
  height: 161px;
  transform: translate(-50%, -50%) rotate(15deg);
  z-index: 30;
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 0 0 2px rgba(212,175,55,0.6),
    0 0 24px rgba(212,175,55,0.45),
    0 8px 24px rgba(0,0,0,0.6);
}
#retournee-card.hidden { display: none; }
#retournee-card img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  pointer-events: none;
}

/* ── PANEL SÉLECTION ATOUT (Belote classique) ─────────────────── */
#atout-panel {
  position: absolute;
  bottom: 230px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(8,5,15,0.92);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 16px;
  padding: 18px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
}
#atout-panel.hidden { display: none; }
#atout-round-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-transform: uppercase;
}
#atout-proposed { line-height: 1; }
#atout-r1-btns, #atout-r2-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
#atout-r2-btns.hidden, #atout-r1-btns.hidden { display: none; }

/* (compteur jetons déplacé dans #tn-balance) */

/* ── MODAL SÉLECTION TABLE ───────────────────────────────────── */
#tsm-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0.65);
}
#tsm-overlay.hidden { display: none; }

#tsm-panel {
  width: 100%;
  max-width: 480px;
  background: #120e1e;
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 28px;
  animation: tsmSlideUp 0.28s cubic-bezier(0.22,0.61,0.36,1);
}
@keyframes tsmSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

#tsm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
#tsm-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
}
#tsm-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.7);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
#tsm-close:hover { background: rgba(255,255,255,0.2); color: #fff; }

#tsm-list {
  padding: 10px 14px 0;
}

.tsm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.tsm-row-left { display: flex; flex-direction: column; gap: 3px; }
.tsm-stake {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 800;
}
.tsm-stake-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 10px;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.5px;
}

.tsm-row-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tsm-players {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}
.tsm-join-btn {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: transform 0.1s, opacity 0.15s;
}
.tsm-join-btn:not(:disabled):hover  { transform: scale(1.05); }
.tsm-join-btn:not(:disabled):active { transform: scale(0.97); }
.tsm-join-btn:disabled { cursor: not-allowed; opacity: 0.45; }

/* Résultat jetons fin de partie */
.sc-tokens {
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 10px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.5px;
}
.sc-tokens.gain {
  background: rgba(61,195,122,0.15);
  border: 1px solid rgba(61,195,122,0.35);
  color: #3DC37A;
}
.sc-tokens.loss {
  background: rgba(255,80,112,0.12);
  border: 1px solid rgba(255,80,112,0.3);
  color: #FF5070;
}

.tsm-tokens-info {
  text-align: center;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  padding: 6px 0 0;
}
.tsm-event-info {
  padding: 8px 0 4px;
}
.tsm-event-desc {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
}
.tsm-event-balance {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}
.tsm-event-btn {
  border-radius: 10px;
  padding: 12px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: opacity 0.18s;
}
.tsm-event-btn:hover { opacity: 0.88; }

/* ── BOUTIQUE ─────────────────────────────────────────────────── */

/* Carte du Jour */
.shop-card-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 14px 10px;
  background: linear-gradient(160deg, #1A0E28 0%, #0E0A1A 100%);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 16px;
  margin: 0 14px 20px;
}
.shop-card-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #D4AF37;
  margin-bottom: 4px;
}
.shop-card-sub {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 12px;
  text-align: center;
}

/* 3D Flip card */
.shop-card-scene {
  perspective: 700px;
  width: 90px;
  height: 126px;
  margin-bottom: 12px;
  cursor: pointer;
}
.shop-card-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0.0, 0.2, 1);
}
.shop-card-3d.flipped {
  transform: rotateY(180deg);
}
.card-face {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.card-back {
  background: radial-gradient(ellipse at 40% 40%, #5A0010, #2A0008);
  border: 2px solid rgba(212,175,55,0.5);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}
/* Motif damier discret sur le dos */
.card-back::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 4px;
  background-image:
    repeating-linear-gradient(45deg,
      rgba(212,175,55,0.06) 0px, rgba(212,175,55,0.06) 2px,
      transparent 2px, transparent 8px);
}
.card-front {
  transform: rotateY(180deg);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(212,175,55,0.6);
  box-shadow: 0 4px 20px rgba(212,175,55,0.25);
}
.card-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Résultat carte */
#daily-card-result {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: #D4AF37;
  margin-bottom: 10px;
  animation: pop-in 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}
@keyframes pop-in {
  0%   { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

/* Bouton tourner */
.shop-spin-btn {
  background: linear-gradient(135deg, #C49A22, #D4AF37, #C49A22);
  color: #111;
  border: none;
  border-radius: 10px;
  padding: 11px 28px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-bottom: 8px;
}
.shop-spin-btn:hover:not(:disabled) { opacity: 0.9; transform: scale(1.02); }
.shop-spin-btn:disabled {
  background: #2A2A2A;
  color: #555;
  cursor: default;
  transform: none;
}
#daily-card-cooldown {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  min-height: 16px;
}

/* ── TEASER CARTE DU JOUR (boutique) ─────────────────────────── */
.dcm-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #1E0C30 0%, #0C0818 100%);
  border: 1px solid rgba(212,175,55,0.28);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 14px 20px;
  gap: 12px;
}
.dcm-teaser-left { flex: 1; }
.dcm-teaser-suits {
  font-size: 13px;
  color: rgba(212,175,55,0.5);
  letter-spacing: 4px;
  margin-bottom: 4px;
}
.dcm-teaser-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #D4AF37;
}
.dcm-teaser-sub {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 2px;
}
.dcm-teaser-btn {
  background: #D4AF37;
  color: #0A0610;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.dcm-teaser-btn:hover { opacity: 0.88; }
.dcm-teaser-btn:disabled {
  background: #2A2A2A;
  color: #555;
  cursor: default;
}

/* ── MODAL CARTE DU JOUR ──────────────────────────────────────── */
#daily-card-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8000;
}
#daily-card-modal.hidden { display: none; }
#dcm-panel {
  background: linear-gradient(160deg, #1A0E2A 0%, #0A0614 100%);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 20px;
  padding: 24px 20px 22px;
  width: min(360px, 94vw);
  text-align: center;
  box-shadow: 0 12px 60px rgba(0,0,0,0.8), 0 0 40px rgba(212,175,55,0.05);
  position: relative;
}
#dcm-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
#dcm-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #D4AF37;
  margin-bottom: 4px;
}
#dcm-sub {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}

/* Rangée de 4 cartes */
#dcm-cards-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.dcm-card-wrap {
  width: 70px;
  height: 98px;
  perspective: 600px;
  cursor: pointer;
  flex-shrink: 0;
}
.dcm-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}
.dcm-card-inner.flipped { transform: rotateY(180deg); }
.dcm-card-face {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.dcm-card-back {
  background: radial-gradient(ellipse at 38% 35%, #5A0010, #260006);
  border: 1.5px solid rgba(212,175,55,0.45);
}
.dcm-card-back::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 3px;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(212,175,55,0.05) 0px, rgba(212,175,55,0.05) 2px,
    transparent 2px, transparent 7px
  );
}
.dcm-card-front {
  transform: rotateY(180deg);
  background: #fff;
  border-radius: 7px;
  overflow: hidden;
  border: 1.5px solid rgba(212,175,55,0.5);
}
.dcm-card-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* Survol carte non retournée */
.dcm-card-wrap:not(.picked):not(.revealed) .dcm-card-inner {
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1), translateY 0.2s;
}
.dcm-card-wrap:not(.picked):not(.revealed):hover .dcm-card-inner {
  transform: translateY(-10px);
  box-shadow: 0 8px 24px rgba(212,175,55,0.3);
}

/* Résultat */
#dcm-result {
  margin: 0 0 16px;
  animation: dcm-pop 0.45s cubic-bezier(0.175,0.885,0.32,1.275);
}
@keyframes dcm-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}
#dcm-amount {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #D4AF37;
  line-height: 1;
}
#dcm-msg {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}
#dcm-continue {
  background: #D4AF37;
  color: #0A0610;
  border: none;
  border-radius: 10px;
  padding: 11px 32px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 8px;
}
#dcm-cooldown {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  min-height: 16px;
}

/* Grille packs */
.shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 14px;
  margin-bottom: 16px;
}
.shop-pack {
  position: relative;
  border-radius: 14px;
  padding: 16px 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 1px solid transparent;
  overflow: hidden;
}
.pack-starter  { background: linear-gradient(160deg,#0E3A20,#061A10); border-color: rgba(61,195,122,0.25); }
.pack-popular  { background: linear-gradient(160deg,#102070,#060C28); border-color: rgba(96,160,255,0.35); }
.pack-pro      { background: linear-gradient(160deg,#4A3408,#1E1404); border-color: rgba(212,175,55,0.40); }
.pack-champion { background: linear-gradient(160deg,#600010,#280008); border-color: rgba(255,80,112,0.35); }

.pack-badge {
  position: absolute;
  top: 0; right: 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 0 14px 0 8px;
}
.pack-badge.blue  { background: #2050D0; color: #fff; }
.pack-badge.gold  { background: #D4AF37; color: #111; }

.pack-coins {
  font-size: 22px;
  color: #D4AF37;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.pack-amount {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.pack-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.pack-price {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #D4AF37;
  margin-bottom: 10px;
}
.pack-btn {
  width: 100%;
  background: rgba(212,175,55,0.18);
  color: #D4AF37;
  border: 1px solid rgba(212,175,55,0.4);
  border-radius: 8px;
  padding: 7px 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s;
}
.pack-btn:hover { background: rgba(212,175,55,0.32); }

/* Note bas de page */
.shop-note {
  text-align: center;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  padding: 0 14px;
}

/* Modal confirmation achat */
#shop-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}
#shop-modal.hidden { display: none; }
#shop-modal-panel {
  background: #14101E;
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 18px;
  padding: 28px 28px 22px;
  width: 300px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7);
}
.shop-modal-icon {
  font-size: 36px;
  color: #D4AF37;
  margin-bottom: 10px;
}
#shop-modal-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}
#shop-modal-amount {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: #D4AF37;
  line-height: 1;
}
#shop-modal-price {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin: 6px 0 20px;
}
#shop-modal-btns {
  display: flex;
  gap: 10px;
}
#shop-modal-btns button {
  flex: 1;
  padding: 10px 0;
  border-radius: 10px;
  border: none;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
#btn-shop-cancel  { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); }
#btn-shop-confirm { background: #D4AF37; color: #111; }

/* ── Event cards verrouillées ──────────────────────────────────── */
.ec-locked-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 14px;
}
.ec-lock-icon {
  font-size: 26px;
  line-height: 1;
}
.ec-lock-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.7);
}
.event-locked { cursor: not-allowed; }
.event-locked .ec-arrow { opacity: 0.25; }

/* ── Quêtes ────────────────────────────────────────────────────── */
.quest-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}
.quest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 10px 12px;
}
.quest-row.quest-done {
  background: rgba(61,195,122,0.07);
  border-color: rgba(61,195,122,0.2);
}
.quest-info { flex: 1; min-width: 0; }
.quest-label {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quest-check { color: #3DC37A; margin-left: 4px; }
.quest-desc {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}
.quest-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}
.quest-progress-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.quest-bar {
  width: 72px;
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.quest-fill {
  height: 100%;
  background: linear-gradient(90deg,#D4AF37,#FDD835);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.quest-progress-txt {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
}
.quest-reward {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #D4AF37;
  opacity: 0.7;
}
.quest-reward-done {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #3DC37A;
}

/* ── Classement ────────────────────────────────────────────────── */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 4px;
}
.lb-row {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
}
.lb-row:last-child { border-bottom: none; }
.lb-header {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.35);
  padding: 7px 12px;
  background: rgba(255,255,255,0.03);
}
.lb-rank { width: 22px; text-align: center; font-weight: 700; color: rgba(255,255,255,0.4); flex-shrink:0; }
.lb-gold   { color: #D4AF37; }
.lb-silver { color: #B0B8C1; }
.lb-bronze { color: #CD7F32; }
.lb-name { flex: 1; font-weight: 600; color: rgba(255,255,255,0.85); }
.lb-wins { width: 28px; text-align: center; color: #3DC37A; font-weight: 700; flex-shrink:0; }
.lb-tokens { width: 68px; text-align: right; color: #D4AF37; font-weight: 600; font-size:12px; flex-shrink:0; }
.lb-you { background: rgba(212,175,55,0.07); border-color: rgba(212,175,55,0.15) !important; }
.lb-you .lb-name { color: #D4AF37; }
.lb-separator { height: 1px; background: rgba(212,175,55,0.2); }

/* ── Bonus quotidien (série 7 jours) ──────────────────────────── */
#daily-bonus-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8500;
}
#daily-bonus-modal.hidden { display: none; }
#dbm-panel {
  background: linear-gradient(160deg, #1A0E2A 0%, #0A0614 100%);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 20px;
  padding: 26px 20px 22px;
  width: min(380px, 94vw);
  text-align: center;
  box-shadow: 0 12px 60px rgba(0,0,0,0.8), 0 0 40px rgba(212,175,55,0.05);
  animation: tsmSlideUp 0.22s cubic-bezier(0.22,0.61,0.36,1);
}
#dbm-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #D4AF37;
}
#dbm-sub {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin: 6px 0 16px;
}
#dbm-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 18px;
}
.dbm-day {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.dbm-day-num {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
}
.dbm-day-coin { font-size: 13px; color: rgba(212,175,55,0.55); }
.dbm-day-amt {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
}
.dbm-past {
  opacity: 0.45;
  background: rgba(61,195,122,0.08);
  border-color: rgba(61,195,122,0.25);
}
.dbm-today {
  background: rgba(212,175,55,0.12);
  border-color: rgba(212,175,55,0.55);
  box-shadow: 0 0 14px rgba(212,175,55,0.25);
  transform: scale(1.08);
}
.dbm-today .dbm-day-num { color: #D4AF37; }
.dbm-today .dbm-day-coin { color: #D4AF37; }
.dbm-today .dbm-day-amt { color: #fff; }
#dbm-claim {
  width: 100%;
  padding: 13px 0;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #D4AF37, #FDD835);
  color: #111;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(212,175,55,0.35);
}
#dbm-claim:active { transform: scale(0.97); }

/* ── Recharge gratuite (filet de sécurité) ────────────────────── */
#rescue-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 14px 18px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(61,195,122,0.12), rgba(61,195,122,0.04));
  border: 1px solid rgba(61,195,122,0.35);
  border-radius: 14px;
}
#rescue-banner.hidden { display: none; }
.rescue-txt {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255,255,255,0.75);
}
.rescue-txt b { color: #3DC37A; }
.rescue-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: #3DC37A;
  color: #0A1A10;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(61,195,122,0.35);
}
.rescue-btn:active { transform: scale(0.97); }
.rescue-btn.rescue-wait {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.45);
  box-shadow: none;
  cursor: default;
}
.tsm-rescue-btn {
  width: 100%;
  margin-top: 8px;
  background: #3DC37A !important;
  color: #0A1A10 !important;
}
.tsm-rescue-btn:disabled {
  background: rgba(255,255,255,0.08) !important;
  color: rgba(255,255,255,0.4) !important;
}

/* ── Quête bonus "journée parfaite" ───────────────────────────── */
.quest-bonus {
  border-color: rgba(212,175,55,0.3);
  background: rgba(212,175,55,0.05);
}
.quest-bonus .quest-label { color: #D4AF37; }

/* ═══════════════════════════════════════════════════════════════
   THÈME LUXE 2026 — Best Belote
   Couche de surcharge : or champagne, verre dépoli, Cinzel/Inter
   ═══════════════════════════════════════════════════════════════ */
:root {
  --gold-light: #F4E5B0;
  --gold:       #D4AF37;
  --gold-deep:  #8E6F1E;
  --bg-deep:    #07070C;
  --glass:      rgba(255,255,255,0.035);
  --hairline:   rgba(212,175,55,0.20);
  --font-lux:   'Cinzel', Georgia, serif;
  --font-ui:    'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Fond profond avec halos lumineux ─────────────────────────── */
#home-screen {
  background:
    radial-gradient(1100px 600px at 50% -180px, rgba(212,175,55,0.10), transparent 62%),
    radial-gradient(900px 540px at 108% 108%, rgba(110,80,220,0.06), transparent 58%),
    radial-gradient(700px 420px at -8% 92%, rgba(212,175,55,0.04), transparent 55%),
    var(--bg-deep);
  font-family: var(--font-ui);
}

/* ── Navigation verre dépoli ──────────────────────────────────── */
#top-nav {
  background: rgba(9,9,15,0.78);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid var(--hairline);
}

/* Logo — serif prestige, or champagne dégradé */
.tn-logo {
  font-family: var(--font-lux);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold);
}
.tn-logo span {
  background: linear-gradient(180deg, #FAF0CE 0%, #E8C95C 45%, #B89230 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Solde — pastille or satinée */
#tn-balance {
  background: linear-gradient(135deg, rgba(212,175,55,0.16), rgba(212,175,55,0.06));
  border: 1px solid rgba(212,175,55,0.38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 2px 12px rgba(212,175,55,0.10);
  font-family: var(--font-ui);
}

.tn-btn { font-family: var(--font-ui); letter-spacing: 1.4px; }

/* ── Titres de section — serif + filet d'or ───────────────────── */
.ps-section-title, .tab-sub-title {
  font-family: var(--font-lux);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  gap: 12px;
}
.ps-section-title::after, .tab-sub-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(212,175,55,0.38), transparent);
  margin-right: 16px;
}

/* ── Hero — cadre or, titre prestige ──────────────────────────── */
#ps-hero {
  border-radius: 18px;
  border: 1px solid var(--hairline);
  box-shadow: 0 10px 40px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#ps-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 48px rgba(0,0,0,0.6), 0 0 32px rgba(212,175,55,0.12), inset 0 1px 0 rgba(255,255,255,0.06);
}
.hero-title {
  font-family: var(--font-lux);
  font-weight: 900;
  letter-spacing: 1.5px;
  background: linear-gradient(180deg, #FFFFFF 30%, #E8C95C 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Cartes de mode — écrin ───────────────────────────────────── */
.mode-card {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.mode-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212,175,55,0.45);
  box-shadow: 0 12px 36px rgba(0,0,0,0.6), 0 0 24px rgba(212,175,55,0.14);
}
.mc-title { font-family: var(--font-lux); letter-spacing: 1px; }

/* ── Cartes événement ─────────────────────────────────────────── */
.event-card {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.event-card:not(.event-locked):hover {
  transform: translateY(-3px);
  border-color: rgba(212,175,55,0.4);
  box-shadow: 0 10px 32px rgba(0,0,0,0.55), 0 0 20px rgba(212,175,55,0.12);
}
.ec-title { font-family: var(--font-lux); letter-spacing: 0.8px; }

/* ── Boutique — coffrets verre & or ───────────────────────────── */
.shop-pack {
  background: linear-gradient(165deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)) !important;
  border: 1px solid rgba(212,175,55,0.18) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.shop-pack:hover {
  transform: translateY(-3px);
  border-color: rgba(212,175,55,0.5) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 22px rgba(212,175,55,0.12);
}
.pack-amount { font-family: var(--font-lux); }
.pack-btn {
  background: linear-gradient(135deg, #E8C95C, #C49A2E) !important;
  color: #15100A !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 14px rgba(212,175,55,0.28);
}

/* ── Statistiques — verre ─────────────────────────────────────── */
.big-stat-card {
  background: linear-gradient(165deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  backdrop-filter: blur(8px);
  border-radius: 14px;
}
.bsc-val { font-family: var(--font-lux); }

/* ── Boutons principaux — or satiné ───────────────────────────── */
#btn-nouvelle-partie, #dbm-claim, #btn-shop-confirm {
  background: linear-gradient(135deg, #F0DA92 0%, #D4AF37 45%, #A8842C 100%);
  color: #15100A;
  font-family: var(--font-ui);
  font-weight: 900;
  letter-spacing: 0.6px;
  border: none;
  box-shadow: 0 4px 20px rgba(212,175,55,0.30), inset 0 1px 0 rgba(255,255,255,0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#btn-nouvelle-partie:hover, #dbm-claim:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(212,175,55,0.42), inset 0 1px 0 rgba(255,255,255,0.45);
}

/* ── Listes (quêtes, classement) — hairline d'or au survol ────── */
.quest-row, .lb-row, .tsm-row {
  transition: border-color 0.18s ease, background 0.18s ease;
}
.quest-row:hover { border-color: rgba(212,175,55,0.3); }

/* ── Modals — verre profond ───────────────────────────────────── */
#dbm-panel, #dcm-panel, #shop-modal-panel, #tsm-panel, #quit-panel {
  background: linear-gradient(165deg, rgba(22,18,32,0.92), rgba(8,6,14,0.96));
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(212,175,55,0.26);
}
#dbm-title, #dcm-title { font-family: var(--font-lux); letter-spacing: 3px; }

/* ── Scrollbar discrète ───────────────────────────────────────── */
.ps-page::-webkit-scrollbar { width: 4px; }
.ps-page::-webkit-scrollbar-track { background: transparent; }
.ps-page::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.25); border-radius: 2px; }

::selection { background: rgba(212,175,55,0.35); color: #fff; }

/* ── Apparition douce des pages ───────────────────────────────── */
@keyframes pageReveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ps-page.active { animation: pageReveal 0.32s ease; }

/* ── Côté table de jeu : police UI cohérente ──────────────────── */
.badge-name, #turn-pill { font-family: var(--font-ui); }
.score-logo { font-family: var(--font-lux); letter-spacing: 1.5px; }

/* ── Desktop : colonne centrée élégante ───────────────────────── */
.ps-page > * { max-width: 720px; margin-left: auto !important; margin-right: auto !important; }
.ps-page > .ps-section-title,
.ps-page > .tab-sub-title { padding-left: 16px; }
#ps-hero { max-width: 696px; }   /* compense ses marges latérales 12px */
#rescue-banner, .dcm-teaser { max-width: 692px; }
#tn-row1, #tn-row2 { max-width: 720px; margin: 0 auto; }
@media (max-width: 760px) {
  #ps-hero, #rescue-banner, .dcm-teaser { max-width: none; }
}

/* ═══════════════════════════════════════════════════════════════
   TABLE DE JEU — LUXE 2026
   ═══════════════════════════════════════════════════════════════ */

/* Avatars monogrammes (plus de photos externes) */
.av-mono {
  font-family: var(--font-lux);
  font-size: 36px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.av-0.av-mono { background: radial-gradient(circle at 30% 25%, #4A2580, #1E0E38 75%); }
.av-1.av-mono { background: radial-gradient(circle at 30% 25%, #1D4ED8, #0A1830 75%); }
.av-3.av-mono { background: radial-gradient(circle at 30% 25%, #15803D, #07210F 75%); }
.av-2 {
  font-family: var(--font-lux);
  background: radial-gradient(circle at 30% 25%, #C49A2E, #4A350C 75%);
}

/* Panneau de score — verre profond, filet d'or */
#score-panel {
  background: linear-gradient(165deg, rgba(18,14,28,0.88), rgba(6,4,12,0.94));
  border: 1px solid var(--hairline);
  border-radius: 16px;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.07);
}

/* Badge atout */
#trump-badge {
  background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.06));
  border: 1px solid rgba(212,175,55,0.55);
  box-shadow: 0 4px 20px rgba(0,0,0,0.6), 0 0 18px rgba(212,175,55,0.15), inset 0 1px 0 rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
}

/* Dernier pli */
#last-trick-panel {
  background: linear-gradient(165deg, rgba(18,14,28,0.88), rgba(6,4,12,0.94));
  border: 1px solid var(--hairline);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Panneaux enchères / atout / scoring — verre luxe */
#bid-panel, #atout-panel, #scoring-panel {
  background: linear-gradient(165deg, rgba(20,15,30,0.94), rgba(7,5,12,0.97));
  border: 1px solid rgba(212,175,55,0.45);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: 0 28px 70px rgba(0,0,0,0.9), 0 0 50px rgba(212,175,55,0.07), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Boutons d'action — or satiné & rouge bordeaux */
.prendre-btn {
  font-family: var(--font-ui);
  font-size: 17px;
  letter-spacing: 1.2px;
  background: linear-gradient(135deg, #F0DA92 0%, #D4AF37 45%, #A8842C 100%);
  color: #15100A;
  box-shadow: 0 4px 20px rgba(212,175,55,0.30), inset 0 1px 0 rgba(255,255,255,0.45);
}
.prendre-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #F6E4A6 0%, #E0BC48 45%, #B8923A 100%);
  transform: translateY(-1px);
}
.prendre-btn:disabled {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.30);
  box-shadow: none;
}
.passer-btn {
  font-family: var(--font-ui);
  font-size: 16px;
  background: linear-gradient(135deg, #7A1E2B, #4A1019);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 3px 14px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
}
.passer-btn:hover { background: linear-gradient(135deg, #96283A, #5C1620); }
.contre-btn {
  font-family: var(--font-ui);
  background: linear-gradient(135deg, #2E4A6E, #16243A);
  border: 1px solid rgba(255,255,255,0.10);
}
.act-btn { font-family: var(--font-ui); border-radius: 12px; }

/* Pill "à toi de jouer" */
#turn-pill {
  font-family: var(--font-ui);
  background: linear-gradient(135deg, #F0DA92, #D4AF37);
  box-shadow: 0 4px 18px rgba(212,175,55,0.45);
}

/* Bouton menu */
#btn-home {
  background: rgba(10,8,16,0.72);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  backdrop-filter: blur(12px);
}
#btn-home:hover { border-color: rgba(212,175,55,0.5); color: var(--gold-light); }

/* Vignette d'ambiance sur la photo de table */
#table-overlay {
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,0.42) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.55) 100%);
  height: 100%;
  top: 0;
}

/* ── Carte profil (niveau & XP) ────────────────────────────────── */
#profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 16px 4px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(212,175,55,0.10), rgba(255,255,255,0.025));
  border: 1px solid rgba(212,175,55,0.30);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 6px 24px rgba(0,0,0,0.35);
  position: relative;
  max-width: 688px;
}
#pc-avatar {
  width: 58px; height: 58px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-lux);
  font-size: 24px; font-weight: 700;
  color: #fff;
  background: radial-gradient(circle at 30% 25%, #C49A2E, #4A350C 75%);
  border: 2px solid rgba(212,175,55,0.5);
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}
#pc-info { flex: 1; min-width: 0; }
#pc-name {
  font-family: var(--font-ui);
  font-size: 15px; font-weight: 800; color: #fff;
}
#pc-title {
  font-family: var(--font-lux);
  font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin: 2px 0 8px;
  text-transform: uppercase;
}
#pc-bar {
  height: 7px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
#pc-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #D4AF37, #F4E5B0);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(212,175,55,0.4);
  transition: width 0.6s cubic-bezier(0.22,0.61,0.36,1);
}
#pc-xp {
  font-family: var(--font-ui);
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  margin-top: 5px;
}
#pc-level-badge {
  position: absolute;
  top: -10px; right: 14px;
  min-width: 28px; height: 28px;
  padding: 0 8px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-lux);
  font-size: 14px; font-weight: 900;
  color: #15100A;
  background: linear-gradient(135deg, #F0DA92, #C49A2E);
  box-shadow: 0 3px 12px rgba(212,175,55,0.45);
}

/* ── Page Guide ────────────────────────────────────────────────── */
.guide-block {
  margin: 0 16px;
  padding: 16px 18px;
  background: linear-gradient(165deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,0.72);
  max-width: 688px;
}
.guide-block p + p { margin-top: 10px; }
.guide-block b { color: rgba(255,255,255,0.95); }
.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.guide-table th {
  font-family: var(--font-lux);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  text-align: left;
  padding: 4px 8px 8px;
  border-bottom: 1px solid rgba(212,175,55,0.25);
}
.guide-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.75);
}
.guide-table tr:last-child td { border-bottom: none; }
.gt-gold { color: var(--gold) !important; font-weight: 800; }
.guide-note {
  margin-top: 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION 2026 — gros logo + barre du bas
   ═══════════════════════════════════════════════════════════════ */

/* Logo — grand, prestige, intégré */
#tn-row1 { padding: 14px 18px 12px; }
.tn-logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 4px;
  gap: 10px;
}
.tn-logo span { font-size: 24px; }

/* Solde plus présent */
#tn-balance {
  font-size: 15px;
  padding: 7px 16px;
  border-radius: 22px;
}

/* ── Barre de navigation du bas — grande et claire ────────────── */
#bottom-nav {
  flex-shrink: 0;
  display: flex;
  background: rgba(9,9,15,0.85);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border-top: 1px solid var(--hairline);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
}
.bn-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  border-radius: 12px;
  padding: 8px 4px 7px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.bn-ico {
  font-size: 22px;
  line-height: 1;
  color: rgba(255,255,255,0.35);
  transition: color 0.18s ease, transform 0.18s ease, text-shadow 0.18s ease;
}
.bn-lbl {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.40);
  transition: color 0.18s ease;
}
.bn-btn.active { background: rgba(212,175,55,0.10); }
.bn-btn.active .bn-ico {
  color: var(--gold);
  transform: translateY(-1px) scale(1.12);
  text-shadow: 0 0 14px rgba(212,175,55,0.55);
}
.bn-btn.active .bn-lbl { color: var(--gold-light); }
.bn-btn:active { transform: scale(0.96); }

/* ── Carte Boutique du lobby ──────────────────────────────────── */
#shop-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(212,175,55,0.16), rgba(212,175,55,0.04) 60%);
  border: 1px solid rgba(212,175,55,0.40);
  border-radius: 16px;
  cursor: pointer;
  max-width: 692px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 6px 24px rgba(0,0,0,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
#shop-banner:hover {
  transform: translateY(-2px);
  border-color: rgba(212,175,55,0.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 10px 32px rgba(0,0,0,0.45), 0 0 24px rgba(212,175,55,0.15);
}
.sb-coins {
  width: 46px; height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: #15100A;
  background: linear-gradient(135deg, #F0DA92, #C49A2E);
  box-shadow: 0 4px 16px rgba(212,175,55,0.40);
}
.sb-info { flex: 1; }
.sb-title {
  font-family: var(--font-lux);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
}
.sb-sub {
  font-family: var(--font-ui);
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-top: 3px;
}
.sb-cta {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--gold);
  white-space: nowrap;
}

/* Barre du bas centrée sur desktop */
#bottom-nav { justify-content: center; }
.bn-btn { max-width: 180px; }

/* Carte Boutique dans la rangée des modes */
.mc-badge.gold-badge {
  background: linear-gradient(135deg, #F0DA92, #C49A2E);
  color: #15100A;
}
.mode-card-shop { border-color: rgba(212,175,55,0.40); }
.mode-card-shop:hover {
  border-color: rgba(212,175,55,0.70);
  box-shadow: 0 12px 36px rgba(0,0,0,0.6), 0 0 30px rgba(212,175,55,0.22);
}

/* 2e tour d'atout : couleur refusée grisée */
.suit-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

/* ═══════════════════════════════════════════════════════════════
   PAGE MODE DÉDIÉE + TABLES REDESSINÉES + GRILLE 4 CARTES
   ═══════════════════════════════════════════════════════════════ */

/* ── 4 cartes de mode : pleine largeur, équilibrées ───────────── */
#ps-modes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 14px;
  overflow: visible;
  max-width: 720px;
}
.mode-card { width: auto; height: 200px; }
@media (max-width: 620px) {
  #ps-modes { grid-template-columns: repeat(2, 1fr); }
  .mode-card { height: 170px; }
}

/* ═══════════════════════════════════════════════════════════════
   PLATEAU DE JEU — ADAPTATION PORTRAIT / MOBILE
   (la main était poussée hors écran + cartes minuscules ; on ré-ancre)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 620px) {
  /* Main du joueur : ancrée en bas, hauteur réelle, entièrement visible */
  #player-zone { bottom: 0; height: 150px; max-height: 30vh; }
  #hand-bg     { display: none; }            /* photo de main étirée → masquée */
  #turn-pill   { top: -28px; font-size: 10px; padding: 4px 16px; }
  #cl-2        { display: none; }            /* badge "Vous" (placé par JS) inutile ici */

  /* Avatars adversaires plus compacts et collés aux bords */
  .badge-avatar      { width: 60px; height: 60px; }
  .av-mono           { font-size: 26px; }
  .badge-name        { font-size: 13px; padding: 3px 10px; }
  #cl-0 { top: 5%; }
  #cl-3 { top: 30%; left: 1%; }
  #cl-1 { top: 30%; right: 1%; }

  /* Panneau de score compact */
  #score-panel { top: 8px; right: 8px; min-width: 112px; padding: 6px 10px; }
  .score-logo  { font-size: 12px; padding-bottom: 4px; margin-bottom: 5px; }
  .score-goal  { font-size: 9px; margin: -2px 0 4px; }
  .snum        { font-size: 22px; }
  .slbl        { font-size: 10px; }
  #ht-nos, #ht-eux { font-size: 15px; }

  /* Bouton menu + badge atout empilés en haut à gauche (libère le centre) */
  #btn-home    { top: 8px; left: 8px; }
  #trump-badge { top: 44px; left: 8px; transform: none; padding: 5px 13px; }

  /* Zone de pli resserrée pour rester dans l'écran */
  #trick-zone  { width: 300px; }
}

/* ── Sélecteur de mode (haut gauche, style belote.com) ────────── */
#mode-switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 0;
  max-width: 720px;
  margin: 0 auto;
}
#mode-back {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  font-size: 17px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}
#mode-back:hover { border-color: rgba(212,175,55,0.5); color: var(--gold-light); }
#mode-switch {
  display: flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  padding: 4px;
  gap: 2px;
}
.ms-btn {
  border: none;
  background: none;
  border-radius: 9px;
  padding: 8px 14px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.18s, color 0.18s;
}
.ms-suit { font-size: 13px; }
.ms-btn.active {
  background: rgba(255,255,255,0.09);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 2px 8px rgba(0,0,0,0.35);
}
.ms-btn.active .ms-suit { color: var(--mc); text-shadow: 0 0 10px var(--mc); }

/* ── Bandeau du mode ──────────────────────────────────────────── */
#mode-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px 14px 0;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 36px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.07);
  max-width: 692px;
}
#mh-suit {
  font-size: 44px;
  line-height: 1;
  filter: drop-shadow(0 0 14px currentColor);
}
#mh-title {
  font-family: var(--font-lux);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: #fff;
}
#mh-sub {
  font-family: var(--font-ui);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 3px;
}

/* ── Tables (tiers de mise) ───────────────────────────────────── */
#mode-tables {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 14px;
  max-width: 692px;
}
.table-tier {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.09);
  border-left: 3px solid var(--tc);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.table-tier:not(.tt-locked):hover {
  transform: translateX(3px);
  border-color: rgba(255,255,255,0.18);
  border-left-color: var(--tc);
  box-shadow: 0 8px 26px rgba(0,0,0,0.45);
}
.tt-stake {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 76px;
  flex-shrink: 0;
}
.tt-num {
  font-family: var(--font-lux);
  font-size: 22px;
  font-weight: 900;
  color: var(--tc);
  line-height: 1;
  text-shadow: 0 0 16px color-mix(in srgb, var(--tc) 40%, transparent);
}
.tt-cur {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-top: 3px;
}
.tt-mid { flex: 1; min-width: 0; }
.tt-chip {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(212,175,55,0.14);
  border: 1px solid rgba(212,175,55,0.35);
  color: var(--gold-light);
}
.tt-gain {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 5px;
}
.tt-join {
  flex-shrink: 0;
  border: none;
  border-radius: 12px;
  padding: 11px 22px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #15100A;
  background: linear-gradient(135deg, #F0DA92 0%, #D4AF37 45%, #A8842C 100%);
  box-shadow: 0 3px 14px rgba(212,175,55,0.30), inset 0 1px 0 rgba(255,255,255,0.45);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tt-join:hover { transform: translateY(-1px); box-shadow: 0 5px 20px rgba(212,175,55,0.42), inset 0 1px 0 rgba(255,255,255,0.45); }
.tt-join:active { transform: scale(0.96); }
.tt-locked { opacity: 0.55; }
.tt-lock { font-size: 18px; padding: 0 14px; }
.tt-rescue {
  border: 1px solid rgba(61,195,122,0.4);
  border-radius: 14px;
  padding: 13px;
  background: linear-gradient(135deg, rgba(61,195,122,0.14), rgba(61,195,122,0.04));
  color: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  cursor: pointer;
}
.tt-rescue b { color: #3DC37A; }
.tt-rescue:disabled { opacity: 0.5; cursor: default; }
.tt-balance {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  padding: 6px 0 2px;
}

/* ── Événements du mode ───────────────────────────────────────── */
#mode-events {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 14px;
  max-width: 692px;
}
.mode-event-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  border: 1px solid rgba(255,255,255,0.09);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.mode-event-row:not(.mer-locked):hover { transform: translateX(3px); border-color: rgba(212,175,55,0.4); }
.mer-locked { opacity: 0.55; cursor: default; }
.mer-label {
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.10);
  color: #15100A;
}
.mer-locked .mer-label { color: rgba(255,255,255,0.6); }
.mer-info { flex: 1; }
.mer-title {
  font-family: var(--font-lux);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #fff;
}
.mer-sub {
  font-family: var(--font-ui);
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 3px;
}
.mer-arrow {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gold);
}

/* ── Bandeau "CONTRÉ !" dans le panneau d'enchères ────────────── */
#bid-lock-info {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
}
#bid-lock-info.hidden { display: none; }
.bli-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, #96283A, #5C1620);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  margin-right: 6px;
}

/* Retour accueil — pastille (remplace le sélecteur de mode supprimé) */
#mode-back {
  width: auto;
  padding: 0 18px;
  height: 38px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

/* ═══════════════════════════════════════════════════════════════
   (ancien essai "épuré premium" — sélecteurs conservés mais inutilisés)
   ═══════════════════════════════════════════════════════════════ */

/* Salutation */
#lobby-greeting {
  padding: 42px 24px 6px;
  max-width: 720px;
}
#lg-hello {
  font-family: var(--font-lux);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #FFFFFF 40%, #D8C27A 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
#lg-sub {
  font-family: var(--font-ui);
  font-size: 14px;
  color: rgba(255,255,255,0.42);
  margin-top: 8px;
  letter-spacing: 0.2px;
}

/* Bouton Reprendre / Jouer */
#resume-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 48px);
  max-width: 672px;
  margin: 26px 24px 6px;
  padding: 19px 22px;
  border-radius: 16px;
  border: 1px solid rgba(212,175,55,0.45);
  background: linear-gradient(135deg, rgba(212,175,55,0.13), rgba(212,175,55,0.04) 65%);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
#resume-btn:hover {
  border-color: rgba(212,175,55,0.75);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 26px rgba(212,175,55,0.14);
  transform: translateY(-1px);
}
#resume-btn:active { transform: scale(0.985); }
#rb-label {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: #fff;
}
#rb-mode {
  font-family: var(--font-lux);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold);
}
.rb-arrow {
  margin-left: auto;
  font-size: 18px;
  color: var(--gold);
}

/* Labels de section — discrets, tout en retenue */
.lobby-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.30);
  padding: 30px 26px 10px;
  max-width: 720px;
}

/* Listes minimales */
.lobby-list {
  margin: 0 24px;
  max-width: 672px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.015);
}
.lm-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 17px 20px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.055);
  cursor: pointer;
  text-align: left;
  transition: background 0.16s ease;
}
.lm-row:last-child { border-bottom: none; }
.lm-row:hover { background: rgba(255,255,255,0.035); }
.lm-row:active { background: rgba(255,255,255,0.06); }
.lm-suit {
  font-size: 19px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}
.lm-gold {
  background: linear-gradient(180deg, #F4E5B0, #C49A2E);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lm-name {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.2px;
}
.lm-note {
  font-family: var(--font-ui);
  font-size: 11px;
  color: rgba(255,255,255,0.34);
  margin-left: auto;
}
.lm-chev {
  font-size: 20px;
  color: rgba(212,175,55,0.7);
  line-height: 1;
  flex-shrink: 0;
}
.lm-locked { cursor: default; }
.lm-locked:hover { background: none; }
.lm-locked .lm-name { color: rgba(255,255,255,0.45); }
.lm-soon {
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.5px;
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid rgba(212,175,55,0.30);
  color: rgba(212,175,55,0.75);
}


/* ═══════════════════════════════════════════════════════════════
   PAGE MODE — bandeau visuel style accueil + aide débutant
   ═══════════════════════════════════════════════════════════════ */
#mode-hero-card {
  position: relative;
  height: 150px;
  margin: 14px 14px 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 36px rgba(0,0,0,0.5);
  max-width: 692px;
}
#mh-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#mh-content {
  position: absolute;
  left: 20px; bottom: 16px;
  z-index: 10;
}
#mh-title {
  font-family: var(--font-lux);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2.5px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
#mh-sub {
  font-family: var(--font-ui);
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin-top: 4px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}
#mh-help {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 10;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 20px;
  padding: 7px 14px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
#mh-help:hover { background: rgba(0,0,0,0.55); border-color: var(--gold); color: var(--gold-light); }

/* Phrase d'explication pour débutants */
.mode-hint {
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255,255,255,0.50);
  margin: -4px 16px 12px;
  max-width: 688px;
}
.mode-hint b { color: var(--gold-light); }

/* Événements de la page mode : cartes visuelles comme l'accueil */
#mode-events .event-card { max-width: 692px; }

/* Contrats spéciaux SA / TA dans le panneau d'enchères */
.suit-btn.suit-special {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--gold-light);
}
