:root {
  --bg: #0a0b0f;
  --bg-2: #0e1016;
  --surface: #13161d;
  --surface-2: #191d26;
  --surface-3: #202532;
  --line: rgba(255, 255, 255, 0.065);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #ebe7de;
  --muted: #8b909c;
  --dim: #5a5f6b;
  --gold: #d8b36a;
  --gold-2: #f2d796;
  --gold-dim: rgba(216, 179, 106, 0.14);
  --green: #5ccf95;
  --red: #e5605b;
  --blue: #7aa7ff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --cw: clamp(44px, 5.4vw, 70px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(216, 179, 106, 0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(122, 167, 255, 0.04), transparent 60%);
}
#app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: #111; }

/* ---------- elements de base ---------- */

.btn {
  --b: var(--surface-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--b);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.2s, border-color 0.2s, opacity 0.2s, box-shadow 0.2s;
  user-select: none;
  white-space: nowrap;
}
.btn:hover { border-color: rgba(255, 255, 255, 0.22); background: #262c3a; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:disabled { opacity: 0.38; cursor: not-allowed; transform: none; }
.btn.gold {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1b1508;
  border-color: rgba(255, 230, 170, 0.5);
  box-shadow: 0 8px 24px -10px rgba(216, 179, 106, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn.gold:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.04); }
.btn.danger { color: #ffb4b0; border-color: rgba(229, 96, 91, 0.35); background: rgba(229, 96, 91, 0.08); }
.btn.danger:hover { background: rgba(229, 96, 91, 0.16); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 26px; font-size: 14px; border-radius: 12px; }
.btn.block { width: 100%; }

.input, select.input, textarea.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.25);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
textarea.input { height: auto; padding: 10px 14px; resize: vertical; }
.input:focus { border-color: rgba(216, 179, 106, 0.6); box-shadow: 0 0 0 4px var(--gold-dim); background: rgba(0, 0, 0, 0.35); }
.input::placeholder { color: var(--dim); }
select.input { color-scheme: dark; background-color: #181b23; }
select.input option { color: #f2eee6; background-color: #181b23; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.pos { color: var(--green); }
.neg { color: var(--red); }
.gold-t { color: var(--gold); }
.mono { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); font-weight: 400; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.card-ui {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.005)), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.badge.green { color: var(--green); background: rgba(92, 207, 149, 0.08); border-color: rgba(92, 207, 149, 0.2); }
.badge.red { color: var(--red); background: rgba(229, 96, 91, 0.08); border-color: rgba(229, 96, 91, 0.2); }
.badge.gold { color: var(--gold); background: var(--gold-dim); border-color: rgba(216, 179, 106, 0.25); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.live { box-shadow: 0 0 0 0 currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(92, 207, 149, 0.6); } 70% { box-shadow: 0 0 0 7px rgba(92, 207, 149, 0); } 100% { box-shadow: 0 0 0 0 rgba(92, 207, 149, 0); } }

.coin {
  display: inline-grid;
  place-items: center;
  width: 1.25em;
  height: 1.25em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-2), var(--gold) 60%, #9c7a37);
  color: #2a1f08;
  font: 800 0.62em/1 var(--sans);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.25);
  vertical-align: -0.2em;
  flex: none;
}

/* ---------- barre du haut ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
  padding: 0 max(20px, env(safe-area-inset-left));
  background: rgba(10, 11, 15, 0.78);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.22em; font-size: 13px; }
.logo .mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-2), var(--gold) 55%, #8d6c2e);
  display: grid; place-items: center;
  color: #1a1307; font: 400 18px/1 var(--serif);
  box-shadow: 0 0 0 3px rgba(216, 179, 106, 0.12), inset 0 0 0 2px rgba(0, 0, 0, 0.18);
}
.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 13px;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav a.active { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.topbar .spacer { flex: 1; }
.balance-pill {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 6px 0 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  font-weight: 800; font-size: 15px;
}
.balance-pill .amount { transition: color 0.4s; }
.balance-pill .amount.up { color: var(--green); }
.balance-pill .amount.down { color: var(--red); }
.balance-pill .plus {
  width: 28px; height: 28px; border-radius: 8px; border: 0; cursor: pointer;
  background: var(--gold-dim); color: var(--gold); font-size: 18px; line-height: 1; display: grid; place-items: center;
}
.balance-pill .plus:hover { background: rgba(216, 179, 106, 0.24); }
.user-chip {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 3px; border-radius: 99px;
  border: 1px solid transparent; background: transparent; cursor: pointer; font-weight: 700; transition: all 0.2s;
}
.user-chip:hover, .user-chip.open { background: var(--surface); border-color: var(--line-2); }
.user-chip .caret { display: inline-grid; width: 14px; height: 14px; color: var(--muted); transition: transform 0.2s; }
.user-chip .caret svg { width: 14px; height: 14px; }
.user-chip.open .caret { transform: rotate(180deg); }
.logo .word b { color: var(--gold); font-weight: 800; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: #111;
  flex: none;
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: transparent;
  display: grid; place-items: center; cursor: pointer; color: var(--muted); transition: all 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, 0.03); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.on { color: var(--gold); border-color: rgba(216, 179, 106, 0.4); background: var(--gold-dim); }
.ic { display: inline-grid; width: 15px; height: 15px; flex: none; }
.ic svg { width: 100%; height: 100%; }

.page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 36px 24px 60px; }

/* ---------- auth ---------- */

.auth {
  flex: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}
.auth-art {
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(700px 500px at 30% 20%, rgba(216, 179, 106, 0.10), transparent 60%),
    linear-gradient(160deg, #0f1118, #08090c);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px;
}
.auth-art h1 {
  font: 400 clamp(46px, 5.6vw, 84px)/0.95 var(--serif);
  margin: 0;
  letter-spacing: -0.01em;
  max-width: 9ch;
}
.auth-art h1 em { color: var(--gold); }
.auth-art p { color: var(--muted); max-width: 40ch; font-size: 15px; }
.floating-cards { position: absolute; right: -40px; top: 18%; width: 420px; height: 420px; pointer-events: none; }
.floating-cards .pcard { position: absolute; --cw: 120px; animation: floaty 7s ease-in-out infinite; }
.floating-cards .pcard:nth-child(1) { left: 60px; top: 40px; transform: rotate(-14deg); animation-delay: -1s; }
.floating-cards .pcard:nth-child(2) { left: 170px; top: 70px; transform: rotate(8deg); animation-delay: -3s; }
.floating-cards .pcard:nth-child(3) { left: 110px; top: 220px; transform: rotate(-4deg); animation-delay: -5s; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.auth-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h2 { font: 400 38px/1.1 var(--serif); margin: 0 0 6px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin: 26px 0 22px; }
.tabs button { flex: 1; height: 36px; border: 0; background: transparent; border-radius: 9px; font-weight: 700; color: var(--muted); cursor: pointer; transition: all 0.2s; }
.tabs button.active { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.form { display: flex; flex-direction: column; gap: 14px; }
.form-error { color: #ffb4b0; font-size: 13px; min-height: 18px; }
.legal { font-size: 12px; color: var(--dim); margin-top: 18px; }

/* ---------- lobby ---------- */

.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.hero h1 { font: 400 clamp(38px, 4.4vw, 58px)/1 var(--serif); margin: 8px 0 0; }
.hero h1 em { color: var(--gold); }
.games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 42px; }
.game-tile {
  position: relative; overflow: hidden; min-height: 170px; padding: 22px;
  border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  cursor: pointer; transition: transform 0.35s var(--ease), border-color 0.3s;
}
.game-tile:hover { transform: translateY(-3px); border-color: var(--line-2); }
.game-tile.active { border-color: rgba(216, 179, 106, 0.4); box-shadow: 0 0 0 1px rgba(216, 179, 106, 0.15), var(--shadow); }
.game-tile.soon { cursor: default; opacity: 0.6; }
.game-tile.soon:hover { transform: none; }
.game-tile h3 { margin: 0; font: 400 30px/1 var(--serif); position: relative; }
.game-tile p { margin: 0; color: var(--muted); font-size: 13px; position: relative; }
.game-tile .art { position: absolute; inset: 0; pointer-events: none; }
.game-tile .badge { position: absolute; top: 18px; left: 22px; }
.art-bj { background: radial-gradient(300px 160px at 85% 20%, rgba(216, 179, 106, 0.18), transparent 70%); }
.art-bj .pcard { position: absolute; --cw: 62px; }
.art-bj .pcard:nth-child(1) { right: 70px; top: 26px; transform: rotate(-12deg); }
.art-bj .pcard:nth-child(2) { right: 30px; top: 30px; transform: rotate(9deg); }
.art-roulette { background: radial-gradient(260px 160px at 85% 25%, rgba(229, 96, 91, 0.16), transparent 70%); }
.art-roulette .wheel {
  position: absolute; right: -30px; top: -30px; width: 170px; height: 170px; border-radius: 50%;
  /* 37 cases : le zero vert a part, puis 36 cases rouge / noir (un motif repete sur 37 ne boucle pas) */
  background:
    conic-gradient(#1e8a4f 0 9.7297deg, transparent 9.7297deg),
    repeating-conic-gradient(from 9.7297deg, #b8403b 0 9.7297deg, #16181e 9.7297deg 19.4595deg);
  mask: radial-gradient(circle, transparent 38%, #000 39%, #000 70%, transparent 71%);
  opacity: 0.55; animation: spin 40s linear infinite;
}
.art-slots { background: radial-gradient(260px 160px at 85% 25%, rgba(92, 207, 149, 0.16), transparent 70%); }
/* symboles de la machine Noctis (planche de sprites 3 x 3) */
.art-slots .nx-sym {
  position: absolute; width: 86px; height: 86px;
  background: url('/noctis/assets/symbols.webp') no-repeat; background-size: 300% 300%; mix-blend-mode: screen;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.6)); transition: transform 0.35s var(--ease);
}
.art-slots .nx-sym:nth-child(1) { right: 150px; top: 28px; transform: rotate(-12deg) scale(0.86); }
.art-slots .nx-sym:nth-child(2) { right: 70px; top: 6px; width: 104px; height: 104px; }
.art-slots .nx-sym:nth-child(3) { right: 8px; top: 30px; transform: rotate(10deg) scale(0.86); }
.game-tile:hover .art-slots .nx-sym:nth-child(2) { transform: translateY(-4px); }
@keyframes spin { to { transform: rotate(360deg); } }

.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.table-card {
  padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px; transition: border-color 0.2s, transform 0.3s var(--ease);
  animation: rise 0.5s var(--ease) both;
}
.table-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.table-card .name { font-size: 16px; font-weight: 800; }
.table-card .limits { font-size: 13px; color: var(--muted); }
.seat-dots { display: flex; gap: 6px; }
.seat-dots i { width: 26px; height: 26px; border-radius: 50%; border: 1px dashed var(--line-2); display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 800; color: #111; }
.seat-dots i.on { border: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 16px; }

/* ---------- modales et toasts ---------- */

.modal-back {
  position: fixed; inset: 0; z-index: 100; background: rgba(4, 5, 8, 0.7); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  animation: fade 0.2s ease both;
}
.modal {
  width: 100%; max-width: 440px; padding: 26px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 40px 80px -30px #000;
  animation: pop 0.3s var(--ease) both;
}
.modal h3 { margin: 0 0 4px; font: 400 30px/1.1 var(--serif); }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.97); } }

#toasts { position: fixed; z-index: 200; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  padding: 11px 16px; border-radius: 11px; background: #1e2330; border: 1px solid var(--line-2);
  font-weight: 600; font-size: 13px; box-shadow: 0 16px 40px -12px #000;
  animation: toastIn 0.35s var(--ease) both;
}
.toast.error { border-color: rgba(229, 96, 91, 0.4); color: #ffc9c6; }
.toast.success { border-color: rgba(92, 207, 149, 0.35); color: #c5f3dc; }
.toast.out { animation: toastOut 0.3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* ---------- cartes a jouer ---------- */

.pcard {
  width: var(--cw);
  height: calc(var(--cw) * 1.4);
  perspective: 700px;
  flex: none;
}
.pcard .inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s var(--ease);
}
.pcard.down .inner { transform: rotateY(180deg); }
.pcard .face, .pcard .back {
  position: absolute; inset: 0; border-radius: calc(var(--cw) * 0.1);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.pcard .face {
  background: linear-gradient(160deg, #fbf8f1, #ece6d9);
  color: #17181c;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.pcard.red .face { color: #b8322c; }
.pcard .corner {
  position: absolute; display: flex; flex-direction: column; align-items: center;
  font-weight: 800; line-height: 0.95; font-size: calc(var(--cw) * 0.25); letter-spacing: -0.04em;
}
.pcard .corner small { font-size: calc(var(--cw) * 0.2); line-height: 1; margin-top: 1px; }
.pcard .corner.tl { top: calc(var(--cw) * 0.07); left: calc(var(--cw) * 0.08); }
.pcard .corner.br { bottom: calc(var(--cw) * 0.07); right: calc(var(--cw) * 0.08); transform: rotate(180deg); }
.pcard .pip {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: calc(var(--cw) * 0.56); line-height: 1;
}
.pcard .pip.face-card {
  font: 400 calc(var(--cw) * 0.62)/1 var(--serif);
  inset: calc(var(--cw) * 0.22);
  border: 1px solid currentColor; border-radius: calc(var(--cw) * 0.05);
  opacity: 0.9;
  background: repeating-linear-gradient(45deg, transparent 0 4px, rgba(0, 0, 0, 0.035) 4px 5px);
}
.pcard .back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 50%, rgba(216, 179, 106, 0.35) 0 12%, transparent 13%),
    repeating-linear-gradient(45deg, rgba(216, 179, 106, 0.18) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgba(216, 179, 106, 0.12) 0 2px, transparent 2px 7px),
    linear-gradient(160deg, #1d2130, #10131b);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.7), inset 0 0 0 calc(var(--cw) * 0.05) #151924, inset 0 0 0 calc(var(--cw) * 0.065) rgba(216, 179, 106, 0.45);
}

/* ---------- jetons ---------- */

.chip {
  --c: #d9d4c7; --t: #1a1a1a; --s: 44px;
  width: var(--s); height: var(--s); border-radius: 50%;
  position: relative; display: grid; place-items: center; flex: none;
  background:
    radial-gradient(circle, var(--c) 0 55%, transparent 56%),
    repeating-conic-gradient(var(--c) 0 22.5deg, rgba(255, 255, 255, 0.92) 22.5deg 30deg, var(--c) 30deg 45deg);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), 0 6px 14px -4px rgba(0, 0, 0, 0.7), inset 0 0 0 2px rgba(0, 0, 0, 0.18);
  color: var(--t);
  font-weight: 800;
  font-size: calc(var(--s) * 0.27);
  letter-spacing: -0.03em;
  user-select: none;
}
.chip::before {
  content: ''; position: absolute; inset: 18%; border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.55);
}
.chip span { position: relative; }
.chip[data-v='1'] { --c: #e2ddd0; --t: #2a2a2a; }
.chip[data-v='5'] { --c: #c8453d; --t: #fff; }
.chip[data-v='25'] { --c: #2f8f5b; --t: #fff; }
.chip[data-v='100'] { --c: #23262e; --t: #f2d796; }
.chip[data-v='500'] { --c: #7150c4; --t: #fff; }
.chip[data-v='1000'] { --c: #d8b36a; --t: #2a1f08; }
.chip[data-v='5000'] { --c: #3a7bd5; --t: #fff; }
.chip[data-v='25000'] { --c: #d0567f; --t: #fff; }
.chip[data-v='100000'] { --c: #0f9b9b; --t: #fff; }

/* ---------- table de blackjack ---------- */

.bj-page { flex: 1; display: grid; grid-template-columns: 1fr 320px; min-height: calc(100vh - 64px); }
.bj-main { position: relative; display: flex; flex-direction: column; min-width: 0; }
.felt {
  position: relative; flex: 1; min-height: 540px; overflow: hidden;
  background:
    radial-gradient(900px 480px at 50% -8%, rgba(216, 179, 106, 0.11), transparent 62%),
    radial-gradient(1200px 700px at 50% 120%, rgba(0, 0, 0, 0.6), transparent 60%),
    #0c0e13;
}
.felt::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}
.felt-arc { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.felt-arc path.line { fill: none; stroke: rgba(216, 179, 106, 0.22); stroke-width: 1; }
.felt-arc text { fill: rgba(216, 179, 106, 0.42); font: 700 11px var(--sans); letter-spacing: 0.32em; }

.table-head {
  position: absolute; top: 16px; left: 20px; right: 20px; z-index: 5;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; pointer-events: none;
}
.table-head > * { pointer-events: auto; }
.table-title .name { font: 400 28px/1 var(--serif); }
.table-title .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.history { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 280px; }
.history span {
  min-width: 26px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--muted);
}
.history span.bust { color: var(--green); border-color: rgba(92, 207, 149, 0.25); }
.history span.bj { color: var(--gold); border-color: rgba(216, 179, 106, 0.3); }
.history span.preview { color: #c7a3ff; border-color: rgba(174, 124, 255, .55); background: rgba(110, 70, 170, .16); }
.act.suggest { position: relative; }
.act.suggest::after { content: ''; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: #ae7cff; box-shadow: 0 0 7px #ae7cff; }
.round-number { display: inline-block; border-radius: 4px; outline: 1px solid transparent; outline-offset: 3px; }

.dealer-zone {
  position: absolute; top: 11%; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 3;
}
.dealer-label { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.hand-cards { display: flex; min-height: calc(var(--cw) * 1.4); }
.hand-cards .pcard + .pcard { margin-left: calc(var(--cw) * -0.58); }
.dealer-zone .hand-cards .pcard + .pcard { margin-left: calc(var(--cw) * -0.3); }
.value-tag {
  min-width: 34px; height: 26px; padding: 0 9px; border-radius: 99px;
  display: inline-grid; place-items: center;
  background: rgba(8, 9, 12, 0.85); border: 1px solid var(--line-2);
  font-weight: 800; font-size: 13px; backdrop-filter: blur(4px);
  transition: all 0.3s;
}
.value-tag.bust { color: var(--red); border-color: rgba(229, 96, 91, 0.45); }
.value-tag.bj { color: #1b1508; background: var(--gold); border-color: var(--gold); }
.value-tag.win { color: var(--green); border-color: rgba(92, 207, 149, 0.5); }

.shoe {
  position: absolute; top: 9%; right: 6%; z-index: 3;
  width: 86px; height: 96px;
}
.shoe .box {
  position: absolute; inset: 0; border-radius: 10px 10px 14px 14px;
  background: linear-gradient(170deg, #20242f, #12151c);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  transform: perspective(300px) rotateX(18deg);
}
.shoe .slot {
  position: absolute; left: 10px; right: 10px; bottom: 16px; height: 14px;
  border-radius: 3px; background: #06070a; box-shadow: inset 0 2px 4px #000;
}
.shoe .fill { position: absolute; left: 10px; right: 10px; bottom: 36px; height: 30px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.04); }
.shoe .fill i { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(90deg, #d7d0bf 0 2px, #b4ad9c 2px 3px); transition: width 0.6s var(--ease); }
.shoe .fill b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--red); box-shadow: 0 0 6px var(--red); }
.shoe .lbl { position: absolute; left: 0; right: 0; bottom: -22px; text-align: center; font-size: 10px; color: var(--dim); font-weight: 700; letter-spacing: 0.1em; }
.discard { position: absolute; top: 10%; left: 6%; width: 60px; height: 84px; z-index: 2; }
.discard i { position: absolute; inset: 0; border-radius: 7px; background: linear-gradient(160deg, #1d2130, #10131b); border: 1px solid rgba(216, 179, 106, 0.2); }
.discard .lbl { position: absolute; left: -10px; right: -10px; bottom: -22px; text-align: center; font-size: 10px; color: var(--dim); font-weight: 700; letter-spacing: 0.1em; }

.status-line {
  margin-top: 4px; min-height: 48px;
  font: 400 22px/1.2 var(--serif); color: var(--text); text-align: center; pointer-events: none;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
  transition: opacity 0.3s;
  white-space: nowrap;
}
.status-line small { display: block; font: 600 11px var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

.seats { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.seat {
  position: absolute; width: 150px; margin-left: -75px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: auto;
  transition: opacity 0.3s;
}
.seat .hands { display: flex; gap: 10px; align-items: flex-end; justify-content: center; min-height: calc(var(--cw) * 1.4 + 30px); }
.seat .hand { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; transition: transform 0.3s var(--ease), opacity 0.3s; }
.seat .hand.dim { opacity: 0.45; }
.seat .hand.active .hand-cards { filter: drop-shadow(0 0 14px rgba(216, 179, 106, 0.45)); }
.seat .hands.multi { --cw: clamp(34px, 3.6vw, 50px); }
.seat .hand .result {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 5;
  padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; white-space: nowrap;
  background: #0b0c10; border: 1px solid var(--line-2);
  animation: pop 0.35s var(--ease) both;
}
.result.win { color: var(--green); border-color: rgba(92, 207, 149, 0.5) !important; }
.result.lose, .result.bust { color: var(--red); border-color: rgba(229, 96, 91, 0.4) !important; }
.result.bj { color: #1b1508; background: var(--gold) !important; border-color: var(--gold) !important; }
.result.push, .result.surrender { color: var(--muted); }

.bet-spot {
  position: relative; width: 74px; height: 74px; border-radius: 50%;
  border: 1.5px solid rgba(216, 179, 106, 0.28);
  display: grid; place-items: center;
  background: radial-gradient(circle, rgba(216, 179, 106, 0.05), transparent 70%);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.bet-spot::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 1px dashed rgba(216, 179, 106, 0.16); }
.seat.me .bet-spot { border-color: rgba(216, 179, 106, 0.6); }
.seat.turn .bet-spot { box-shadow: 0 0 0 6px rgba(216, 179, 106, 0.08), 0 0 30px rgba(216, 179, 106, 0.25); }
.bet-spot .ring { position: absolute; inset: -6px; border-radius: 50%; pointer-events: none; }
.chip-stack { position: relative; width: 44px; height: 44px; }
.chip-stack .chip { position: absolute; left: 0; --s: 44px; }
.bet-amount {
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  padding: 1px 8px; border-radius: 99px; background: #0b0c10; border: 1px solid var(--line-2);
  font-size: 11px; font-weight: 800; white-space: nowrap; z-index: 6;
}
.insurance-spot {
  position: absolute; top: -8px; right: -18px; z-index: 6;
  padding: 1px 7px; border-radius: 6px; font-size: 10px; font-weight: 800;
  background: rgba(122, 167, 255, 0.12); border: 1px solid rgba(122, 167, 255, 0.35); color: var(--blue);
}
.seat .who { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; max-width: 150px; cursor: pointer; border-radius: 99px; padding: 2px 6px 2px 2px; transition: background 0.2s; }
.seat .who:hover { background: rgba(255, 255, 255, 0.05); }
.seat .who:empty { display: none; }
.seat .who .avatar { width: 24px; height: 24px; font-size: 10px; }
.seat .who .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .who .off { color: var(--dim); font-weight: 600; }
.seat .sit-btn {
  width: 74px; height: 74px; border-radius: 50%; border: 1.5px dashed var(--line-2); background: rgba(255, 255, 255, 0.015);
  color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; transition: all 0.25s;
}
.seat .sit-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.seat .sit-btn:disabled { opacity: 0.35; cursor: default; }
.seat .sit-btn:disabled:hover { border-color: var(--line-2); color: var(--muted); background: transparent; }
.seat .net { font-size: 12px; font-weight: 800; animation: pop 0.4s var(--ease) both; }
.seat.win-small .bet-spot { animation: win-glow 1.3s ease-out 1; }
.seat.win-major .bet-spot, .seat.win-legend .bet-spot { animation: win-glow 1s ease-out 2; }
.seat.win-major .who, .seat.win-legend .who { color: var(--gold); }
.big-win { position: absolute; z-index: 8; left: 50%; top: 43%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 30px); padding: 14px 24px; border: 1px solid var(--gold); border-radius: 18px; background: rgba(14, 13, 17, .94); box-shadow: 0 0 75px rgba(216, 179, 106, .5); color: var(--gold); font: 400 clamp(25px, 4vw, 45px)/1.1 var(--serif); text-align: center; pointer-events: none; animation: pop .45s var(--ease) both; }
.big-win[hidden] { display: none; }
@keyframes win-glow { 0% { box-shadow: 0 0 0 rgba(216, 179, 106, 0); } 35% { box-shadow: 0 0 30px 12px rgba(216, 179, 106, .65); } 100% { box-shadow: 0 0 0 rgba(216, 179, 106, 0); } }

.fly { position: fixed; z-index: 90; pointer-events: none; }

/* ---------- barre de controle ---------- */

.controls {
  position: relative; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(14, 16, 22, 0.9), #0c0d12);
  border-top: 1px solid var(--line);
  min-height: 86px;
  flex-wrap: wrap;
}
.controls .group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip-tray { display: flex; gap: 8px; }
.chip-tray .chip { --s: 50px; cursor: pointer; transition: transform 0.18s var(--ease), box-shadow 0.2s; border: 0; padding: 0; }
.chip-tray .chip:hover { transform: translateY(-4px); }
.chip-tray .chip:active { transform: translateY(-1px) scale(0.95); }
.chip-tray .chip:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }
.timer-bar { position: absolute; left: 0; top: -1px; height: 3px; background: var(--gold); transform-origin: left; box-shadow: 0 0 10px var(--gold); }
.actions-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.act {
  height: 52px; min-width: 96px; padding: 0 18px; border-radius: 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 1px solid var(--line-2); background: var(--surface-2);
  font-weight: 800; font-size: 14px;
  transition: transform 0.12s var(--ease), background 0.2s, border-color 0.2s, opacity 0.2s;
  animation: rise 0.3s var(--ease) both;
}
.act small { font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.act:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, 0.24); }
.act:active { transform: scale(0.97); }
.act:disabled { opacity: 0.3; cursor: not-allowed; }
.act.hit { border-color: rgba(92, 207, 149, 0.4); }
.act.hit:hover { background: rgba(92, 207, 149, 0.1); }
.act.stand { border-color: rgba(229, 96, 91, 0.4); }
.act.stand:hover { background: rgba(229, 96, 91, 0.1); }
.act.double, .act.primary { border-color: rgba(216, 179, 106, 0.5); }
.act.double:hover, .act.primary:hover { background: var(--gold-dim); }
.act.primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b1508; border-color: transparent; }
.act.primary small { color: rgba(27, 21, 8, 0.65); }
.act.primary:hover { filter: brightness(1.05); background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.hint { font-size: 12px; color: var(--muted); }
.kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 4px; border: 1px solid var(--line-2); font-size: 10px; color: var(--muted); }

/* ---------- panneau lateral ---------- */

.side { border-left: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 64px); position: sticky; top: 64px; }
.side-sec { padding: 18px; border-bottom: 1px solid var(--line); }
.side-sec h4 { margin: 0 0 12px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 12.5px; }
.rules li { display: flex; justify-content: space-between; gap: 10px; }
.rules li span:first-child { color: var(--muted); }
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.chat-msg { font-size: 13px; line-height: 1.45; word-wrap: break-word; animation: rise 0.25s var(--ease) both; }
.chat-msg .chat-name {
  font-weight: 800; margin-right: 6px; cursor: pointer;
  display: inline-block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
.chat-msg .chat-name:hover { text-decoration: underline; }
.chat-admin { font-size: 9px; font-weight: 800; letter-spacing: 0.08em; color: #1b1508; background: var(--gold); border-radius: 4px; padding: 1px 4px; margin-right: 5px; vertical-align: 1px; }
.chat-form .input:disabled { opacity: 0.6; cursor: not-allowed; }
.chat-msg.sys { color: var(--dim); font-size: 12px; }
.chat-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.chat-form .input { height: 38px; }

.side-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.side-btns .btn { flex: 1; }

/* ---------- portefeuille ---------- */

.wallet-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.big-balance { padding: 30px; position: relative; overflow: hidden; }
.big-balance .num { font: 400 clamp(46px, 6vw, 72px)/1 var(--serif); margin: 12px 0 4px; display: flex; align-items: baseline; gap: 12px; }
.big-balance .num small { font: 700 16px var(--sans); color: var(--gold); letter-spacing: 0.1em; }
.big-balance::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 179, 106, 0.16), transparent 70%);
}
.redeem { padding: 26px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.stat { padding: 16px 18px; }
.stat .v { font-size: 22px; font-weight: 800; margin-top: 6px; }
.stat .l { font-size: 12px; color: var(--muted); font-weight: 600; }

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background 0.15s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.tbl tr.click { cursor: pointer; }
.tbl .r { text-align: right; }

/* ---------- admin ---------- */

.admin { display: grid; grid-template-columns: 220px 1fr; gap: 28px; }
.admin-nav { position: sticky; top: 88px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.admin-nav button {
  text-align: left; height: 38px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent;
  color: var(--muted); font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.admin-nav button:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.admin-nav button.active { color: var(--text); background: var(--surface-2); box-shadow: inset 2px 0 0 var(--gold); }
.admin-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.admin h2 { font: 400 36px/1 var(--serif); margin: 0 0 20px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.panel { padding: 20px; margin-bottom: 18px; }
.panel h3 { margin: 0 0 14px; font-size: 14px; font-weight: 800; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.bars .b i { width: 100%; max-width: 34px; border-radius: 5px 5px 2px 2px; background: var(--gold); opacity: 0.85; min-height: 2px; transition: height 0.6s var(--ease); }
.bars .b i.neg { background: var(--red); }
.bars .b span { font-size: 10px; color: var(--dim); white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.code-txt { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 700; letter-spacing: 0.05em; }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .bj-page { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--line); }
  .chat-log { max-height: 260px; }
  .kpis, .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 260px; padding: 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .floating-cards { transform: scale(0.55); transform-origin: top right; right: -20px; top: 10px; }
  .games { grid-template-columns: 1fr; }
  .wallet-grid, .split-2 { grid-template-columns: 1fr; }
  .admin { grid-template-columns: 1fr; }
  .admin-nav { position: static; flex-direction: row; overflow-x: auto; }
  .admin-nav button { white-space: nowrap; }
  .nav { display: none; }
  .topbar { gap: 12px; }
  .user-chip .nm { display: none; }
}
@media (max-width: 700px) {
  :root { --cw: 40px; }
  .logo > span:last-child { display: none; }
  .topbar { gap: 8px; padding: 0 12px; }
  .balance-pill { font-size: 14px; }
  .felt { min-height: 520px; }
  .seat { width: 88px; margin-left: -44px; }
  .bet-spot, .seat .sit-btn { width: 54px; height: 54px; }
  .chip-stack, .chip-stack .chip { --s: 34px; width: 34px; height: 34px; }
  .seat .who { font-size: 11px; max-width: 88px; }
  .seat .who .avatar { display: none; }
  .seat .hands.multi { --cw: 30px; }
  .shoe { transform: scale(0.7); transform-origin: top right; right: 3%; }
  .discard { display: none; }
  .history { display: none; }
  .table-title .name { font-size: 22px; }
  .chip-tray .chip { --s: 42px; }
  .act { min-width: 72px; height: 48px; padding: 0 12px; font-size: 13px; }
  .controls { padding: 12px; gap: 10px; justify-content: center; }
  .page { padding: 24px 16px 50px; }
  .kpis, .stats-row { grid-template-columns: 1fr 1fr; }
  .status-line { font-size: 17px; min-height: 40px; }
  .dealer-zone { top: 15%; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- modales : variantes ---------- */

.modal { position: relative; max-height: calc(100vh - 40px); overflow-y: auto; }
.modal.wide { max-width: 760px; }
.modal-x {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer;
}
.modal-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.help-modal h3 { padding-right: 44px; }
.alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2); }
.alert.red { background: rgba(229, 96, 91, 0.08); border-color: rgba(229, 96, 91, 0.3); color: #ffc9c6; }

/* ---------- menu contextuel, carte joueur ---------- */

.ctx-menu, .popover {
  position: fixed; z-index: 150; min-width: 210px; max-width: 280px; padding: 6px;
  background: #171a22; border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 24px 50px -16px #000; animation: pop 0.16s var(--ease) both;
}
.ctx-menu button, .ucard-actions button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent;
  font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; color: var(--text);
}
.ctx-menu button:hover, .ucard-actions button:hover { background: rgba(255, 255, 255, 0.06); }
.ctx-menu button.danger, .ucard-actions button.danger { color: #ff9f9a; }
.ctx-menu button.danger:hover, .ucard-actions button.danger:hover { background: rgba(229, 96, 91, 0.12); }
.ctx-menu small, .ucard-actions small { color: var(--dim); font-size: 11px; font-weight: 600; }
.ctx-menu .sep, .ucard-actions .sep { height: 1px; background: var(--line); margin: 5px 4px; }
.ctx-menu .ttl { padding: 6px 10px 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.popover { padding: 12px; min-width: 230px; }
.ucard .nm { font-weight: 800; font-size: 15px; word-break: break-all; }
.ucard-actions { margin: 10px -6px -6px; padding: 6px 6px 0; border-top: 1px solid var(--line); }

/* ---------- salon : creation / code ---------- */

.seg { display: flex; gap: 4px; padding: 4px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line-2); border-radius: 11px; }
.seg button {
  flex: 1; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: all 0.2s;
}
.seg button.active { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.input.static { display: flex; align-items: center; color: var(--muted); background: rgba(255, 255, 255, 0.02); }
.code-input { text-transform: uppercase; letter-spacing: 0.3em; font-weight: 800; font-size: 20px; text-align: center; height: 54px; }
.table-card .row .dim { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- table : badges, compte a rebours ---------- */

.table-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.table-tags:empty { display: none; }
.tag-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700; color: var(--muted); background: rgba(8, 9, 12, 0.6); border: 1px solid var(--line-2);
}
.tag-pill.gold { color: var(--gold); border-color: rgba(216, 179, 106, 0.35); cursor: pointer; }
.tag-pill.gold:hover { background: var(--gold-dim); }
.tag-pill b { letter-spacing: 0.12em; }
.tag-pill .ic { width: 12px; height: 12px; }
.countdown { display: flex; flex-direction: column; align-items: center; line-height: 1.1; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }
.countdown .cd { font-size: 22px; font-weight: 800; color: var(--gold); letter-spacing: 0; min-width: 44px; text-align: center; }

/* ---------- aide blackjack ---------- */

.help-modal .tabs { margin: 16px 0 18px; }
.help-remember { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--muted); font-size: 13px; cursor: pointer; }
.help-remember input { accent-color: var(--gold); }
.help-content { min-height: 360px; }
.help-page > .eyebrow { text-align: center; }
.help-page h4 { font: 400 28px/1.1 var(--serif); margin: 6px 0 12px; text-align: center; }
.help-cards { display: flex; justify-content: center; gap: 8px; margin: 14px 0 22px; --cw: 54px; }
.help-text { font-size: 14px; line-height: 1.6; color: var(--text); }
.help-text p { margin: 0 0 10px; }
.help-text strong { color: var(--text); }
.help-text ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.help-actions, .help-pay { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.help-actions li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); }
.help-actions .kbd { min-width: 26px; height: 26px; font-size: 12px; font-weight: 800; color: var(--gold); border-color: rgba(216, 179, 106, 0.4); }
.help-pay li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); }
.help-pay small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.help-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.help-dots { display: flex; gap: 6px; }
.help-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: var(--line-2); cursor: pointer; transition: all 0.25s var(--ease); }
.help-dots button.on { width: 22px; background: var(--gold); }
.rules.big { font-size: 14px; gap: 0; }
.rules.big li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.rules.big li:last-child { border-bottom: 0; }
.rules.big li span:last-child { text-align: right; }
.tw-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; }
.tw-row + .tw-row { border-top: 1px solid var(--line); }
.tw-row .rk { width: 22px; text-align: center; font-weight: 800; color: var(--dim); }
.tw-row.top1 .rk { color: var(--gold); }
.tw-row.top2 .rk { color: #c9ccd4; }
.tw-row.top3 .rk { color: #c98b56; }
.tw-row.top1 { background: var(--gold-dim); }
.tw-row .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-row b { font-size: 15px; }

/* ---------- widget de session ---------- */

.session-widget {
  position: fixed; z-index: 80; width: 300px;
  background: rgba(19, 22, 29, 0.96); backdrop-filter: blur(12px);
  border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 30px 60px -20px #000;
  animation: pop 0.25s var(--ease) both; user-select: none;
}
.session-widget.drag { box-shadow: 0 40px 80px -20px #000, 0 0 0 1px rgba(216, 179, 106, 0.3); }
.sw-head { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 12px; cursor: grab; border-bottom: 1px solid var(--line); touch-action: none; }
.session-widget.drag .sw-head { cursor: grabbing; }
.session-widget.min .sw-head { border-bottom: 0; }
.session-widget.min .sw-body { display: none; }
.sw-title { width: 16px; height: 16px; color: var(--gold); display: inline-grid; }
.sw-title svg { width: 16px; height: 16px; }
.sw-name { font-weight: 800; font-size: 13px; }
.sw-head-profit { font-size: 12px; font-weight: 800; display: none; }
.session-widget.min .sw-head-profit { display: inline; }
.sw-btn { width: 28px; height: 28px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.sw-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.sw-btn svg { width: 14px; height: 14px; }
.sw-body { padding: 12px 14px 14px; }
.sw-label { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.sw-profit { font-size: 26px; font-weight: 800; margin: 2px 0 8px; }
.sw-chart-box { height: 96px; border-radius: 9px; background: rgba(0, 0, 0, 0.25); overflow: hidden; }
.sw-chart { width: 100%; height: 100%; display: block; }
.sw-chart .zero { stroke: rgba(255, 255, 255, 0.14); stroke-dasharray: 3 3; }
.sw-chart .area.up { fill: rgba(92, 207, 149, 0.16); }
.sw-chart .area.dn { fill: rgba(229, 96, 91, 0.16); }
.sw-chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sw-chart .ln.up { stroke: var(--green); }
.sw-chart .ln.dn { stroke: var(--red); }
.sw-empty { height: 100%; display: grid; place-items: center; font-size: 12px; color: var(--dim); padding: 0 16px; text-align: center; }
.sw-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.sw-stats div { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.03); font-size: 12px; }
.sw-stats span { color: var(--muted); }

/* ---------- parametres ---------- */

.settings { max-width: 760px; }

@media (max-width: 700px) {
  .session-widget { width: calc(100vw - 16px); max-width: 320px; }
  .help-content { min-height: 0; }
  .user-chip .caret { display: none; }
}

/* badges de table privee : on decale ce qui est dessous */
.felt:has(.table-tags:not(:empty)) .discard { top: calc(10% + 64px); }
@media (max-width: 700px) {
  .felt:has(.table-tags:not(:empty)) .dealer-zone { top: calc(15% + 34px); }
  .table-tags .tag-pill:not(.gold) { display: none; }
}

/* ---------- roulette ---------- */

.chip[data-v='2'] { --c: #8fb8de; --t: #10202e; }
.chip[data-v='10'] { --c: #3f7fd0; --t: #fff; }
.chip[data-v='50'] { --c: #e08a2e; --t: #1f1305; }
.chip[data-v='250'] { --c: #b04a8f; --t: #fff; }
.chip[data-v='2500'] { --c: #5a9e3c; --t: #fff; }
.chip[data-v='10000'] { --c: #7a2f2f; --t: #ffd9a8; }

.rt-num {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 6px;
  font-size: 11px; font-weight: 800; color: #fff; flex: none;
}
.rt-num.red { background: #b3302b; }
.rt-num.black { background: #1b1e25; box-shadow: inset 0 0 0 1px var(--line-2); }
.rt-num.green { background: #1e8a4f; }

/* salon */
/* derniers tirages : une seule ligne, ce qui depasse est coupe */
.rt-card .rt-last { display: flex; gap: 4px; flex-wrap: nowrap; align-items: center; overflow: hidden; min-width: 0; mask: linear-gradient(90deg, #000 85%, transparent); }
.game-tile.active .wheel { opacity: 0.8; }

/* page */
.rt-felt {
  position: relative; flex: 1; min-height: 560px; overflow: hidden;
  background:
    radial-gradient(900px 480px at 40% -10%, rgba(30, 138, 79, 0.10), transparent 62%),
    radial-gradient(1200px 700px at 50% 120%, rgba(0, 0, 0, 0.6), transparent 60%),
    #0b0e0f;
}
.rt-head {
  position: absolute; top: 16px; left: 20px; right: 20px; z-index: 6;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.rt-history { display: flex; gap: 4px; align-items: center; max-width: 52%; overflow: hidden; flex-wrap: nowrap; mask: linear-gradient(90deg, #000 85%, transparent); }

.rt-stage {
  display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 30px; align-items: start;
  padding: 92px 28px 30px;
}
.rt-wheel-col { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 34px; }
.rt-wheel-wrap {
  position: relative; z-index: 5; width: 100%; max-width: 290px; aspect-ratio: 1;
  perspective: 900px; transition: transform 0.75s var(--ease);
}
.rt-wheel-tilt { width: 100%; height: 100%; transform: rotateX(34deg); filter: drop-shadow(0 26px 26px rgba(0, 0, 0, 0.65)); }
.rt-wheel-svg { width: 100%; height: 100%; display: block; }
.rt-wheel-svg .num { fill: #fff; font: 800 12px var(--sans); text-anchor: middle; dominant-baseline: central; }
.rt-felt.zoom .rt-wheel-wrap { transform: translate(var(--zx, 0), var(--zy, 0)) scale(var(--zs, 1)); }
.rt-dim { position: absolute; inset: 0; z-index: 4; background: rgba(4, 5, 8, 0.72); opacity: 0; pointer-events: none; transition: opacity 0.6s; }
.rt-felt.zoom .rt-dim { opacity: 1; }
.rt-result {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  font: 400 30px/1 var(--serif); color: #fff; border: 2px solid var(--gold-2);
  box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.35), 0 0 36px rgba(242, 215, 150, 0.55);
  animation: pop 0.45s var(--ease) both;
}
.rt-result.red { background: #b3302b; }
.rt-result.black { background: #15171c; }
.rt-result.green { background: #1e8a4f; }
.rt-status { text-align: center; min-height: 54px; }
.rt-status-main { font: 400 26px/1.15 var(--serif); }
.rt-status-main.red { color: #ff8b85; }
.rt-status-main.green { color: #6fe0a5; }
.rt-status-small { font: 600 11px var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* tapis */
.rt-board-col { min-width: 0; }
.rt-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.rt-tool, .rt-nb {
  height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02);
  color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.rt-tool:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.24); }
.rt-tool.on { color: var(--gold); border-color: rgba(216, 179, 106, 0.45); background: var(--gold-dim); }
.rt-nb { cursor: default; padding: 0 4px 0 11px; }
.rt-nb b { min-width: 14px; text-align: center; color: var(--text); }
.rt-nb button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.06); color: var(--text); cursor: pointer; font-weight: 800; }
.rt-nb button:hover { background: var(--gold-dim); color: var(--gold); }

.rt-board-scroll { position: relative; }
.rt-board {
  --u: 50px;
  position: relative; width: 100%; aspect-ratio: 14 / 5.65; user-select: none;
  background: linear-gradient(180deg, #11402b, #0c2f20); border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(216, 179, 106, 0.35), 0 24px 50px -20px #000, inset 0 0 60px rgba(0, 0, 0, 0.35);
}
.rt-cells, .rt-zones, .rt-chips { position: absolute; inset: 0; }
/* chaque couche a son propre empilement : une case en surbrillance ne doit jamais passer devant les zones cliquables */
.rt-cells { z-index: 1; }
.rt-zones { z-index: 2; }
.rt-chips { z-index: 3; }
.rt-chips { pointer-events: none; }
.rt-board .cell {
  position: absolute; display: grid; place-items: center;
  border: 1px solid rgba(216, 179, 106, 0.4); color: #fff;
  font: 400 calc(var(--u) * 0.42) / 1 var(--serif);
  transition: filter 0.15s, box-shadow 0.15s, background 0.2s;
}
.rt-board .cell.num.red { background: linear-gradient(180deg, #bd3a33, #9d2a25); }
.rt-board .cell.num.black { background: linear-gradient(180deg, #20232b, #14161b); }
.rt-board .cell.num.green { background: linear-gradient(180deg, #23965a, #1a7445); clip-path: polygon(34% 0, 100% 0, 100% 100%, 34% 100%, 0 50%); font-size: calc(var(--u) * 0.55); }
.rt-board .cell.out { font: 700 calc(var(--u) * 0.2) / 1 var(--sans); letter-spacing: 0.08em; color: #e9f3ec; background: rgba(255, 255, 255, 0.015); }
.rt-board .cell.col { font-size: calc(var(--u) * 0.18); }
.rt-board .diamond { width: calc(var(--u) * 0.5); height: calc(var(--u) * 0.32); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.rt-board .diamond.red { background: #c9362f; }
.rt-board .diamond.black { background: #111317; box-shadow: inset 0 0 0 1px #555; }
.rt-board .cell.hl { filter: brightness(1.35); box-shadow: inset 0 0 0 2px var(--gold-2), 0 0 18px rgba(242, 215, 150, 0.45); z-index: 1; }
.rt-board .cell.out.hl { background: rgba(242, 215, 150, 0.14); }
.rt-board .cell.win { animation: rtWin 0.9s ease-in-out infinite alternate; z-index: 2; }
@keyframes rtWin { from { box-shadow: inset 0 0 0 2px #fff, 0 0 10px rgba(255, 255, 255, 0.5); filter: brightness(1.2); } to { box-shadow: inset 0 0 0 3px var(--gold-2), 0 0 34px rgba(242, 215, 150, 0.9); filter: brightness(1.6); } }
.rt-board .cell.hot::after, .rt-board .cell.cold::after {
  content: ''; position: absolute; top: 12%; right: 12%; width: calc(var(--u) * 0.14); height: calc(var(--u) * 0.14); border-radius: 50%;
}
.rt-board .cell.hot::after { background: #ff9a3c; box-shadow: 0 0 8px #ff7b1c; }
.rt-board .cell.cold::after { background: #8fd3ff; box-shadow: 0 0 8px #59b8ff; }
.rt-board.pulse-marks .cell.hot, .rt-board.pulse-marks .cell.cold { animation: rtMark 0.6s ease-in-out 3; }
@keyframes rtMark { 50% { filter: brightness(1.7); transform: scale(1.04); } }

.rt-zones .zone { position: absolute; cursor: pointer; border-radius: 4px; }
.rt-zones .z-line { z-index: 2; }
.rt-zones .z-line:hover { background: radial-gradient(circle, rgba(242, 215, 150, 0.85) 0 22%, rgba(242, 215, 150, 0.2) 24%, transparent 60%); }
.rt-board.closed .rt-zones .zone { cursor: not-allowed; }
.rt-board.closed .rt-zones .z-line:hover { background: none; }

.rt-chipbox { position: absolute; transform: translate(-50%, -50%); width: 0; height: 0; transition: opacity 0.3s; }
.rt-chip { --s: calc(var(--u) * 0.6); position: absolute; left: calc(var(--s) / -2); top: calc(var(--s) / -2); }
.rt-chip.other { --s: calc(var(--u) * 0.44); left: calc(var(--u) * 0.02); top: calc(var(--u) * -0.5); opacity: 0.8; box-shadow: 0 0 0 2px rgba(122, 167, 255, 0.8), 0 4px 10px -2px #000; }
.rt-chipbox.won .rt-chip.mine { animation: rtChipWin 0.8s ease-in-out infinite alternate; }
@keyframes rtChipWin { to { box-shadow: 0 0 0 3px var(--gold-2), 0 0 22px rgba(242, 215, 150, 0.9); transform: scale(1.08); } }
.rt-chipbox.lost { opacity: 0.3; }
.rt-chip.fly { position: fixed; z-index: 95; pointer-events: none; --s: 36px; left: 0; top: 0; }

.rt-tip {
  position: absolute; z-index: 20; transform: translate(-50%, calc(-100% - 6px)); pointer-events: none;
  display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 9px; white-space: nowrap;
  background: rgba(10, 11, 15, 0.95); border: 1px solid var(--line-2); box-shadow: 0 10px 30px -8px #000; font-size: 12px;
}
.rt-tip b { font-size: 12.5px; }
.rt-tip span { color: var(--muted); }
.rt-tip .gain { color: var(--gold); font-weight: 700; }

/* hippodrome */
.rt-track-wrap { margin-top: 14px; }
.rt-track { width: 100%; max-height: 160px; display: block; user-select: none; }
.rt-track .bg { fill: #0e2a1d; stroke: rgba(216, 179, 106, 0.4); stroke-width: 1.2; }
.rt-track .sec { cursor: pointer; }
.rt-track .sec rect { fill: rgba(255, 255, 255, 0.02); stroke: rgba(216, 179, 106, 0.28); transition: fill 0.2s; }
.rt-track .sec text { fill: rgba(233, 243, 236, 0.75); font: 700 10.5px var(--sans); letter-spacing: 0.14em; text-anchor: middle; pointer-events: none; }
.rt-track .sec.on rect, .rt-track .sec:hover rect { fill: rgba(242, 215, 150, 0.16); }
.rt-track .cell { cursor: pointer; }
.rt-track .cell circle { stroke: rgba(216, 179, 106, 0.55); stroke-width: 1; transition: all 0.15s; }
.rt-track .cell.red circle { fill: #b3302b; }
.rt-track .cell.black circle { fill: #181a20; }
.rt-track .cell.green circle { fill: #1e8a4f; }
.rt-track .cell text { fill: #fff; font: 800 11px var(--sans); text-anchor: middle; pointer-events: none; }
.rt-track .cell:hover circle, .rt-track .cell.hl circle { stroke: var(--gold-2); stroke-width: 2.5; filter: brightness(1.35); }
.rt-track .cell.win circle { stroke: #fff; stroke-width: 3; filter: drop-shadow(0 0 6px rgba(242, 215, 150, 0.9)); }

/* annonces du tour */
.rt-banner {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 9; pointer-events: none;
  padding: 16px 30px; border-radius: 16px; background: rgba(8, 9, 12, 0.88); border: 1px solid rgba(216, 179, 106, 0.5);
  font: 400 clamp(26px, 3.4vw, 40px)/1 var(--serif); color: var(--gold); white-space: nowrap; box-shadow: 0 30px 60px -20px #000;
}
.rt-outcome {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 9; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 26px; border-radius: 16px;
  background: rgba(8, 9, 12, 0.9); border: 1px solid var(--line-2); animation: pop 0.4s var(--ease) both;
}
.rt-outcome small { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.rt-outcome b { font: 400 30px/1.1 var(--serif); }
.rt-outcome.lose b { color: #ff9a95; font-size: 24px; }
.rt-outcome.win b { color: var(--green); }
.rt-outcome.w1 { border-color: rgba(92, 207, 149, 0.45); box-shadow: 0 0 30px rgba(92, 207, 149, 0.2); }
.rt-outcome.w2 { border-color: var(--gold); box-shadow: 0 0 50px rgba(216, 179, 106, 0.4); }
.rt-outcome.w2 b { color: var(--gold-2); font-size: 38px; }
.rt-outcome.w3 { border-color: var(--gold-2); box-shadow: 0 0 80px rgba(242, 215, 150, 0.6); padding: 16px 34px; }
.rt-outcome.w3 b { color: var(--gold-2); font-size: 46px; }

/* fil des gagnants */
.rt-feed {
  position: absolute; left: 16px; bottom: 16px; z-index: 7; width: 240px; pointer-events: none;
  opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.4s;
}
.rt-feed.on { opacity: 1; transform: none; }
.rt-feed-title { font-size: 10px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin: 0 0 6px 4px; }
.rt-feed-view { max-height: 170px; overflow: hidden; mask: linear-gradient(180deg, #000 80%, transparent); }
.rt-feed-list { display: flex; flex-direction: column; gap: 4px; transition: transform 4s linear; }
.rt-feed-row {
  display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 9px;
  background: rgba(10, 12, 14, 0.85); border: 1px solid var(--line); font-size: 12.5px;
  animation: rtFeedIn 0.35s var(--ease) both;
}
.rt-feed-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.rt-feed-row b { color: var(--green); }
.rt-feed-row.first { font-size: 14px; background: rgba(28, 24, 14, 0.9); border-color: rgba(216, 179, 106, 0.35); }
.rt-feed-row.first b { color: var(--gold-2); }
.rt-feed-row.me { border-color: rgba(92, 207, 149, 0.45); }
@keyframes rtFeedIn { from { opacity: 0; transform: translateX(-14px); } }

/* barre de controle */
.rt-tray .chip.sel { transform: translateY(-7px); box-shadow: 0 0 0 3px var(--gold-2), 0 10px 20px -6px #000; }
.rt-controls .group { gap: 22px; }

/* panneau lateral */
.rt-side .side-sec:first-child .rules { gap: 5px; }
.rt-tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); }
.rt-tabs button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px;
  border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-weight: 700; font-size: 12.5px; cursor: pointer;
}
.rt-tabs button:hover { color: var(--text); }
.rt-tabs button.active { color: var(--text); border-bottom-color: var(--gold); }
.rt-tab-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--gold-dim); color: var(--gold); font-size: 10.5px; display: inline-grid; place-items: center; }
.rt-tab-count:empty { display: none; }
.rt-pane-box { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rt-pane-box > .chat { flex: 1; }
.rt-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px; }
.rt-pane-head { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.rt-pane-head:empty { display: none; }
.rt-pane .rt-bettors { max-height: none; }
.rt-bar-wrap { margin-top: 12px; }
.rt-bar-title { font-size: 11px; color: var(--dim); font-weight: 700; margin-bottom: 4px; }
.rt-locked {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 26px; border-radius: 14px;
  background: rgba(8, 9, 12, 0.86); border: 1px solid rgba(216, 179, 106, 0.55); box-shadow: 0 20px 50px -16px #000;
  animation: pop 0.3s var(--ease) both;
}
.rt-locked b { font: 400 24px/1.1 var(--serif); color: var(--gold); }
.rt-locked span { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.rt-wheel-wrap { cursor: zoom-in; }
.rt-felt.zoom .rt-wheel-wrap { cursor: zoom-out; }
.rt-felt.zoom .rt-dim { pointer-events: auto; cursor: zoom-out; }
.rt-stats h4 { margin-bottom: 10px; }
.rt-hotcold { display: grid; gap: 8px; margin-bottom: 12px; }
.rt-hotcold > div { display: flex; align-items: center; gap: 10px; }
.rt-hotcold .lbl { width: 48px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.rt-hotcold .lbl.hot { color: #ff9a3c; }
.rt-hotcold .lbl.cold { color: #8fd3ff; }
.rt-hotcold > div > div { display: flex; gap: 5px; flex-wrap: wrap; }
.rt-hotcold .hc { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; }
.rt-hotcold .hc small { font-size: 9.5px; color: var(--dim); font-weight: 700; }
.rt-bar { display: flex; height: 18px; border-radius: 6px; overflow: hidden; margin-top: 6px; gap: 2px; }
.rt-bar i { display: grid; place-items: center; font: 800 9.5px var(--sans); font-style: normal; color: #fff; min-width: 4px; }
.rt-bar .red { background: #b3302b; }
.rt-bar .black { background: #2a2e37; }
.rt-bar .green { background: #1e8a4f; }
.rt-bar .n1, .rt-bar .d1 { background: #3b4454; }
.rt-bar .n2, .rt-bar .d2 { background: #4b566a; }
.rt-bar .n3, .rt-bar .d3 { background: #5d6a80; }
.rt-bar .n4 { background: #6f7d95; }
.rt-bettors { display: flex; flex-direction: column; gap: 4px; max-height: 176px; overflow-y: auto; }
.rt-bettor { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; font-size: 12.5px; cursor: pointer; }
.rt-bettor:hover { background: rgba(255, 255, 255, 0.04); }
.rt-bettor .avatar { width: 22px; height: 22px; font-size: 9px; }
.rt-bettor .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.rt-bettor .ok { color: var(--green); font-weight: 800; }
.rt-bettor.me .nm { color: var(--gold); }

/* aide */
.help-balls { display: flex; justify-content: center; gap: 10px; margin: 14px 0 22px; }
.help-balls .rt-num { min-width: 46px; height: 46px; border-radius: 50%; font: 400 22px/1 var(--serif); }
.help-pay li span small { color: var(--dim); font-size: 12px; font-weight: 500; }

/* widget : detail par jeu */
.sw-games { display: grid; gap: 4px; margin-top: 8px; }
.sw-games > div { display: flex; align-items: baseline; gap: 8px; padding: 5px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.03); font-size: 12px; }
.sw-games span { flex: 1; color: var(--muted); }
.sw-games small { color: var(--dim); font-size: 11px; }

@media (max-width: 1100px) {
  .rt-pane-box { min-height: 320px; }
}
@media (max-width: 860px) {
  .rt-stage { grid-template-columns: 1fr; padding: 84px 14px 20px; gap: 14px; }
  .rt-wheel-wrap { max-width: 220px; }
  .rt-board-scroll { overflow-x: auto; padding-top: 70px; margin-top: -70px; }
  .rt-board { min-width: 640px; }
  .rt-history { max-width: 40%; }
  .rt-feed { width: 190px; }
}

/* ---------- noctis (machine a sous, affichee en iframe) ---------- */

.noctis-page { flex: 1; display: flex; min-height: calc(100vh - 64px); background: #071719; }
.noctis-frame { flex: 1; width: 100%; height: calc(100vh - 64px); border: 0; display: block; }
