/* =====================================================================
   Le Salon — design system partagé (landing, salon d'attente, cartes, dés, jetons, sièges)
   ===================================================================== */
:root {
  --bg: #070b14;
  --bg2: #0d1526;
  --panel: rgba(15, 24, 44, .9);
  --panel2: rgba(255, 255, 255, .04);
  --line: rgba(255, 255, 255, .09);
  --line2: rgba(255, 255, 255, .17);
  --text: #eef2f8;
  --muted: #8d9bb4;
  --gold: #f2c14e;
  --gold2: #c8932a;
  --green: #4cd964;
  --red: #ff5a4e;
  --blue: #3a8dff;
  --accent: #f2c14e;
  --radius: 18px;
  --cw: clamp(34px, 4.6vw, 58px);
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-ui: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 700px at 50% -10%, #1c3463 0%, transparent 60%),
    radial-gradient(900px 600px at 100% 100%, #10264a 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.45 var(--font-ui);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
::selection { background: rgba(242, 193, 78, .35); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------ barre du haut */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(20, 34, 62, .96), rgba(10, 18, 34, .9));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.logo { display: flex; align-items: center; gap: 10px; font: 700 21px/1 var(--font-display); letter-spacing: .2px; background: none; border: 0; padding: 4px 6px 4px 0; border-radius: 10px; }
.logo em { font-style: italic; color: var(--gold); }
.logo-ico { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: repeating-conic-gradient(var(--red) 0 30deg, #fff 30deg 60deg);
  box-shadow: inset 0 0 0 5px var(--red), inset 0 0 0 7px #fff, 0 3px 8px #0009; position: relative; }
.logo-ico::after { content: "♠"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 13px; text-shadow: 0 1px 2px #0008; }
.room-info { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; position: relative; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  font-size: 13px; color: var(--muted); white-space: nowrap;
}
.pill b { color: var(--text); font-weight: 700; }
.pill.code { cursor: pointer; transition: background .15s; }
.pill.code:hover { background: rgba(255,255,255,.11); }
.pill.code b { color: var(--gold); letter-spacing: 2px; font-family: var(--font-mono); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .05); font-size: 16px; position: relative;
  display: inline-grid; place-items: center; transition: background .15s, transform .1s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .11); }
.icon-btn:active { transform: scale(.94); }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; z-index: 40;
  background: #121c33; border: 1px solid var(--line2); border-radius: 14px; padding: 6px;
  box-shadow: 0 20px 50px rgba(0,0,0,.6); animation: pop .15s ease-out;
}
.menu button { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border: 0; background: none; border-radius: 9px; }
.menu button:hover { background: rgba(255,255,255,.08); }
.menu button.danger { color: #ffb3ac; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }

/* ------------------------------------------------------------ boutons & champs */
.btn {
  border: 0; border-radius: 13px; padding: 12px 20px;
  font-weight: 700; letter-spacing: .2px; color: var(--text);
  background: linear-gradient(180deg, #34415c, #232d42);
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 4px 14px rgba(0,0,0,.35);
  transition: transform .08s, filter .15s, box-shadow .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .42; cursor: not-allowed; filter: none; transform: none; }
.btn.green { background: linear-gradient(180deg, #5be06f, #1f9e3d); color: #04220c; }
.btn.gold { background: linear-gradient(180deg, #ffd875, #d39a2b); color: #2a1a00; }
.btn.red { background: linear-gradient(180deg, #ff7468, #c9372d); color: #2a0503; }
.btn.blue { background: linear-gradient(180deg, #62a6ff, #2463d8); color: #fff; }
.btn.violet { background: linear-gradient(180deg, #b98af0, #7a43c4); color: #fff; }
.btn.accent { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent)); color: #10131a; }
.btn.ghost { background: transparent; border: 1px solid var(--line2); box-shadow: none; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.big { padding: 15px 26px; font-size: 17px; border-radius: 15px; }
.btn .kbd { font-size: 10px; opacity: .6; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; margin-left: 2px; }

label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 5px; }
.input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  background: rgba(0,0,0,.32); border: 1px solid var(--line); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.input option { background: #101a30; }
.input:focus { border-color: var(--gold2); box-shadow: 0 0 0 3px rgba(242,193,78,.16); }
.input.code-input { text-transform: uppercase; letter-spacing: 8px; font-size: 26px; text-align: center; font-family: var(--font-mono); font-weight: 700; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.panel {
  background: linear-gradient(180deg, rgba(22, 34, 60, .93), rgba(12, 20, 38, .93));
  border: 1px solid var(--line); border-radius: 20px; padding: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.05);
}
.panel h2 { margin: 0 0 4px; font: 700 22px/1.2 var(--font-display); }
.panel .sub { color: var(--muted); margin: 0 0 16px; font-size: 14px; }

/* ------------------------------------------------------------ accueil */
.screen { padding: 0 16px 56px; }
.home { max-width: 1120px; margin: 0 auto; }
.hero { position: relative; text-align: center; padding: 54px 10px 26px; isolation: isolate; }
.hero h1 {
  font: 700 clamp(38px, 7vw, 76px)/1.02 var(--font-display); margin: 0 0 14px; letter-spacing: -1px;
  background: linear-gradient(180deg, #fff 30%, #c9d3e6); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 em { font-style: italic; background: linear-gradient(180deg, #ffe39a, #e0a62e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #aab6cc; margin: 0 auto; max-width: 560px; font-size: clamp(15px, 2vw, 18px); }
.hero .cta { display: flex; justify-content: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.float-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.float-art .card, .float-art .die, .float-art .chip { position: absolute; animation: floaty 9s ease-in-out infinite; opacity: .9; }
.float-art > * { filter: drop-shadow(0 14px 22px rgba(0,0,0,.45)); }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -16px; } }

.resume { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 4px 0 0; }
.resume button {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(76,217,100,.16), rgba(76,217,100,.07)); border: 1px solid rgba(76,217,100,.4); color: var(--text);
  transition: transform .12s, background .15s; text-align: left;
}
.resume button:hover { transform: translateY(-2px); background: rgba(76,217,100,.2); }
.resume small { color: #a8e3b3; display: block; font-size: 12px; }
.resume b { font-size: 14px; }
.resume .rd { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 1.4s infinite; }

.sect-title { text-align: center; margin: 34px 0 18px; font: 700 clamp(22px, 3.2vw, 30px)/1.2 var(--font-display); }
.sect-title small { display: block; font: 600 12px var(--font-ui); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.gcard {
  --accent: #f2c14e;
  position: relative; display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; cursor: pointer;
  background: linear-gradient(180deg, rgba(24, 37, 66, .95), rgba(11, 18, 34, .98));
  border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.4);
  transition: transform .22s cubic-bezier(.2,.8,.25,1), border-color .2s, box-shadow .2s;
  text-align: left; padding: 0; color: var(--text);
}
.gcard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 220px at 50% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%); opacity: .55; transition: opacity .25s; pointer-events: none; }
.gcard:hover, .gcard:focus-visible { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.gcard:hover::before { opacity: 1; }
.gcard .art { position: relative; height: 178px; display: grid; place-items: center; overflow: hidden; }
.gcard .art .stage-art { position: relative; width: 240px; height: 150px; transition: transform .35s cubic-bezier(.2,.8,.25,1); }
.gcard:hover .stage-art { transform: scale(1.06) rotate(-1deg); }
.gcard .body { position: relative; padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.gcard h3 { margin: 0; font: 700 25px/1.1 var(--font-display); }
.gcard .tag { color: var(--accent); font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; font-weight: 700; }
.gcard p { margin: 0; color: #aab6cc; font-size: 14px; flex: 1; }
.gcard .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.gcard .meta span { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.07); color: #cbd5e6; }
.gcard .acts { display: flex; gap: 8px; margin-top: 10px; }
.gcard .acts .btn { flex: 1; }
.gcard .acts .btn.ghost { flex: 0 0 auto; }

.join-strip { display: grid; grid-template-columns: 1fr; max-width: 560px; margin: 34px auto 0; }
.join-strip .panel { text-align: center; }
.join-line { display: flex; gap: 10px; margin-top: 4px; }
.join-line .input { flex: 1; }
.peek { min-height: 22px; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.peek.ok { color: #9be6ab; }
.peek.bad { color: #ffb3ac; }
.note { color: var(--muted); font-size: 13px; text-align: center; margin-top: 26px; }
.foot { color: #5f6d86; font-size: 12px; text-align: center; margin-top: 8px; }

/* ------------------------------------------------------------ modales */
.modal-back {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px;
  background: rgba(3, 7, 15, .72); backdrop-filter: blur(5px); animation: fade .18s;
}
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; animation: pop .22s cubic-bezier(.2,.8,.25,1); }
.modal.wide { width: min(680px, 100%); }
.modal .mh { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.modal .mh .mi { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.modal .mh h2 { margin: 0; flex: 1; }
.modal .mh .x { margin-left: auto; }
.modal .btns { display: flex; gap: 10px; margin-top: 8px; }
.modal .btns .btn { flex: 1; }
.rules { margin: 0; padding-left: 20px; color: #c7d1e3; display: grid; gap: 9px; font-size: 14.5px; }
.rules b { color: #fff; }
details.more { margin: 2px 0 14px; color: var(--muted); }
details.more summary { cursor: pointer; font-size: 13px; padding: 6px 0; }
details.more[open] summary { margin-bottom: 8px; }

/* ------------------------------------------------------------ salon d'attente */
.lobby { max-width: 780px; margin: 0 auto; padding-top: 22px; }
.lobby-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.lobby-head .gi { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.lobby-head h2 { margin: 0; font: 700 26px/1.1 var(--font-display); }
.lobby-head small { color: var(--muted); }
.bigcode { text-align: center; padding: 8px 0 18px; }
.bigcode .lbl { color: var(--muted); text-transform: uppercase; letter-spacing: 2px; font-size: 12px; }
.bigcode .val {
  font: 800 clamp(44px, 9vw, 76px)/1.1 var(--font-mono); letter-spacing: 12px;
  color: var(--gold); text-shadow: 0 4px 30px rgba(242,193,78,.35); margin: 6px 0 12px; padding-left: 12px; cursor: pointer;
}
.bigcode .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.plist { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.plist li {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); animation: pop .25s ease-out;
}
.plist .avatar { width: 38px; height: 38px; font-size: 15px; }
.plist .grow { flex: 1; min-width: 0; }
.plist .meta { color: var(--muted); font-size: 12px; }
.lobby-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.lobby-actions .btn { flex: 1; }
.settings-ro { color: var(--muted); font-size: 14px; line-height: 1.8; }
.settings-ro b { color: var(--text); }
.hint { color: var(--muted); text-align: center; padding: 10px; flex: 1; font-size: 14px; }

/* ------------------------------------------------------------ table (cadre commun) */
.game { display: grid; grid-template-columns: 1fr 320px; gap: 16px; max-width: 1500px; margin: 0 auto; padding: 14px; }
.stage { position: relative; min-width: 0; }
.actionbar {
  max-width: 1040px; margin: 6px auto 0; min-height: 88px; position: relative;
  background: linear-gradient(180deg, rgba(22, 34, 60, .93), rgba(12, 20, 38, .93)); border: 1px solid var(--line); border-radius: 20px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
.actionbar .waiting { color: var(--muted); display: flex; align-items: center; gap: 10px; text-align: center; }
.actionbar .waiting .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 1s infinite; }
.act-main { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.act-main .btn { min-width: 128px; font-size: 16px; padding: 14px 18px; }
.act-title { width: 100%; text-align: center; font: 600 13px var(--font-ui); letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.timer { position: absolute; left: 14%; right: 14%; bottom: -5px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--gold); width: 100%; transform-origin: left; }
.timer.wide { left: 18px; right: 18px; bottom: 6px; }

.side { display: flex; flex-direction: column; height: calc(100vh - 90px); position: sticky; top: 70px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; padding: 11px; background: none; border: 0; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--text); border-color: var(--gold); }
.feed { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.feed .msg b { color: var(--gold); }
.feed .msg.sys { color: var(--muted); }
.feed .logl { color: #b9c4d8; }
.feed .logl.sep { color: var(--gold); font-weight: 700; margin-top: 6px; }
.chatform { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chatform .input { padding: 9px 11px; }
.chatform .btn { padding: 9px 12px; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; margin-left: 5px; line-height: 18px; text-align: center; }
.icon-btn .badge { position: absolute; top: -5px; right: -5px; margin: 0; }

.react-dock { position: fixed; left: 14px; bottom: calc(14px + var(--safe-b)); z-index: 35; }
.react-dock .rb { width: 46px; height: 46px; border-radius: 50%; background: rgba(18, 28, 51, .95); border: 1px solid var(--line2); font-size: 22px; box-shadow: 0 10px 26px rgba(0,0,0,.5); }
.react-dock .rpop { position: absolute; left: 0; bottom: 56px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 8px; background: #121c33; border: 1px solid var(--line2); border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.6); animation: pop .15s; }
.react-dock .rpop button { width: 42px; height: 42px; border-radius: 12px; border: 0; background: none; font-size: 24px; transition: transform .1s, background .15s; }
.react-dock .rpop button:hover { background: rgba(255,255,255,.1); transform: scale(1.18); }
.fly-react { position: fixed; z-index: 80; font-size: 34px; pointer-events: none; animation: flyr 2.6s cubic-bezier(.2,.7,.3,1) forwards; filter: drop-shadow(0 6px 10px #000a); }
.fly-react small { display: block; font: 700 11px var(--font-ui); text-align: center; color: #fff; text-shadow: 0 1px 4px #000; margin-top: -2px; }
@keyframes flyr { 0% { opacity: 0; transform: translate(-50%, 0) scale(.3); } 12% { opacity: 1; transform: translate(-50%, -14px) scale(1.25); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -150px) scale(1); } }

/* ------------------------------------------------------------ fin de partie */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(3, 7, 15, .78); backdrop-filter: blur(5px); padding: 16px; animation: fade .3s; overflow: auto; }
.overlay .panel { max-width: 500px; width: 100%; text-align: center; animation: pop .35s cubic-bezier(.2,.8,.25,1); margin: auto; }
.overlay .trophy { font-size: 70px; line-height: 1; filter: drop-shadow(0 10px 20px rgba(242,193,78,.45)); animation: bob 2.4s ease-in-out infinite; }
.rank { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 8px; text-align: left; }
.rank li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); animation: pop .35s both; }
.rank li:first-child { background: linear-gradient(90deg, rgba(242,193,78,.2), rgba(242,193,78,.05)); border-color: rgba(242,193,78,.5); }
.rank .pos { width: 28px; text-align: center; font: 800 18px var(--font-display); color: var(--muted); }
.rank .grow { flex: 1; min-width: 0; }
.rank .nm { font-weight: 700; }
.rank .sb { color: var(--muted); font-size: 12px; }
.rank .val { font: 800 18px var(--font-display); color: var(--gold); text-align: right; line-height: 1.1; }
.rank .val small { display: block; font: 600 11px var(--font-ui); color: var(--muted); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 55; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); } }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 90;
  background: #1b2742; border: 1px solid var(--line2); padding: 10px 18px; border-radius: 12px;
  box-shadow: 0 10px 30px #0009; font-weight: 600; animation: pop .2s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.err { border-color: var(--red); color: #ffd3cf; }

/* ------------------------------------------------------------ sièges (commun) */
.seat {
  position: absolute; transform: translate(-50%, -50%); z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: clamp(92px, 12vw, 150px); transition: opacity .3s;
}
.plate {
  position: relative; width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 6px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(28, 40, 66, .97), rgba(12, 19, 34, .97));
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 6px 18px rgba(0,0,0,.5);
  transition: box-shadow .25s, border-color .25s;
}
.avatar {
  width: clamp(28px, 3vw, 38px); aspect-ratio: 1; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 60%, #fff), var(--c) 60%, color-mix(in srgb, var(--c) 60%, #000));
  display: grid; place-items: center; font-weight: 900; color: #0b0f19; font-size: clamp(12px, 1.3vw, 16px); position: relative;
}
.avatar .off { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: #777; border: 2px solid #0c1424; }
.plate .info { min-width: 0; line-height: 1.15; }
.plate .name { font-weight: 700; font-size: clamp(11px, 1.1vw, 14px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate .stack { color: var(--gold); font-weight: 800; font-size: clamp(11px, 1.1vw, 14px); }
.seat .tag {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: -12px;
  font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: #2c3a57; color: #dfe7f5; white-space: nowrap; z-index: 2;
}
.seat.top .tag { bottom: auto; top: -12px; }
.tag.t-fold { background: #4a4f5b; color: #c3c8d2; }
.tag.t-raise, .tag.t-bet { background: var(--gold); color: #2a1a00; }
.tag.t-allin { background: var(--red); color: #fff; }
.tag.t-call { background: var(--blue); color: #fff; }
.tag.t-check { background: #3f6a52; color: #e6ffef; }
.seat.toact .plate { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242,193,78,.5), 0 0 26px rgba(242,193,78,.45); }
.seat.me .plate { border-color: rgba(255,255,255,.3); }
.seat.out, .seat.gone { opacity: .35; }
.seat.winner .plate { border-color: var(--green); box-shadow: 0 0 0 2px rgba(76,217,100,.6), 0 0 30px rgba(76,217,100,.5); }
.seat .won {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  color: var(--green); font-weight: 900; font-size: 16px; text-shadow: 0 2px 6px #000; animation: rise 1.8s ease-out forwards; white-space: nowrap; z-index: 6;
}
.seat .bubble {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: #fff; color: #111; padding: 6px 10px; border-radius: 12px; font-size: 12px; max-width: 180px; width: max-content;
  box-shadow: 0 6px 16px #0007; z-index: 8; animation: pop .25s ease-out;
}
.seat.top .bubble { bottom: auto; top: calc(100% + 6px); }

/* ------------------------------------------------------------ cartes */
.card {
  position: relative; width: var(--cw); aspect-ratio: 5 / 7; flex: 0 0 auto; font-size: var(--cw);
  border-radius: .1em;
  background: linear-gradient(160deg, #ffffff 0%, #f1f0ea 100%);
  box-shadow: 0 2px 6px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.12);
  color: #15171c; user-select: none; -webkit-user-select: none;
  transition: transform .25s, filter .25s, box-shadow .25s, opacity .25s;
}
.card.red { color: #d0191b; }
.card .cr { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.card .cr b { font: 800 .3em/1 var(--font-ui); letter-spacing: -.06em; }
.card .cr i { font-style: normal; font-size: .21em; margin-top: .03em; }
.card .tl { left: .07em; top: .05em; }
.card .br { right: .07em; bottom: .05em; transform: rotate(180deg); }
.card .pips { position: absolute; left: .2em; right: .2em; top: .17em; bottom: .17em; }
.card .pips i { position: absolute; transform: translate(-50%, -50%); font-style: normal; font-size: .26em; line-height: 1; }
.card .pips i.f { transform: translate(-50%, -50%) rotate(180deg); }
.card .ace { position: absolute; inset: 0; display: grid; place-items: center; font-size: .68em; line-height: 1; padding-top: .02em; }
.card .court {
  position: absolute; left: .17em; right: .17em; top: .15em; bottom: .15em; border-radius: .05em;
  border: .012em solid color-mix(in srgb, currentColor 45%, transparent);
  background:
    repeating-linear-gradient(135deg, color-mix(in srgb, currentColor 7%, transparent) 0 .018em, transparent .018em .05em),
    linear-gradient(160deg, color-mix(in srgb, currentColor 10%, #fff), #fff 60%);
  display: grid; place-items: center;
}
.card .court b { font: 700 .62em/1 var(--font-display); }
.card .court i { position: absolute; font-style: normal; font-size: .2em; line-height: 1; }
.card .court i:nth-of-type(1) { left: .035em; top: .03em; }
.card .court i:nth-of-type(2) { right: .035em; bottom: .03em; transform: rotate(180deg); }
.card.back {
  background:
    radial-gradient(circle at 50% 50%, rgba(242,193,78,.95) 0 .075em, transparent .08em),
    repeating-linear-gradient(45deg, rgba(255,255,255,.1) 0 .03em, transparent .03em .07em),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.1) 0 .03em, transparent .03em .07em),
    linear-gradient(160deg, #2453b8, #0f2a6b);
  box-shadow: 0 2px 6px rgba(0,0,0,.45), inset 0 0 0 .05em #f4f4f0, inset 0 0 0 .066em var(--gold2);
}
.card.back::after { content: "♠"; position: absolute; inset: 0; display: grid; place-items: center; font-size: .12em; color: #3a2400; line-height: 1; font-size: calc(var(--cw) * .12); }
.card.deal { animation: deal .42s cubic-bezier(.2,.8,.25,1.1) both; animation-delay: var(--d, 0s); }
.card.flip { animation: flip .5s ease-out both; }
.card.win { box-shadow: 0 0 0 3px var(--green), 0 0 18px rgba(76,217,100,.8); translate: 0 -6px; }
.card.dim { filter: brightness(.55) saturate(.6); }
@keyframes deal { from { opacity: 0; transform: translate(0, -60px) rotate(-20deg) scale(.6); } }
@keyframes flip { 0% { transform: rotateY(90deg); } 100% { transform: rotateY(0); } }
@keyframes rise { 0% { opacity: 0; transform: translate(-50%, 8px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -30px); } }
@keyframes pop { from { scale: .6; opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pulse { 50% { opacity: .5; } }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ------------------------------------------------------------ jetons */
.chip {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  background: repeating-conic-gradient(var(--chip, var(--red)) 0 30deg, #fff 30deg 60deg);
  box-shadow: inset 0 0 0 3px var(--chip, var(--red)), inset 0 0 0 4px rgba(255,255,255,.9), 0 1px 2px #000a;
  flex: 0 0 auto;
}
.cstack { position: relative; display: inline-block; width: 22px; height: 22px; flex: 0 0 auto; }
.cstack .chip { position: absolute; left: 1px; width: 20px; height: 20px; }
.chipb {
  --chip: var(--red); position: relative; width: 62px; height: 62px; border-radius: 50%; border: 0; padding: 0;
  background: repeating-conic-gradient(var(--chip) 0 22.5deg, #fff 22.5deg 45deg);
  box-shadow: inset 0 0 0 9px var(--chip), inset 0 0 0 11px rgba(255,255,255,.85), 0 6px 14px rgba(0,0,0,.5), 0 2px 0 rgba(0,0,0,.35);
  color: #fff; font: 800 15px var(--font-ui); text-shadow: 0 1px 3px #000c;
  transition: transform .14s cubic-bezier(.2,.8,.25,1), filter .15s;
}
.chipb::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 1px dashed rgba(255,255,255,.45); pointer-events: none; }
.chipb span { position: relative; z-index: 1; background: rgba(0,0,0,.6); padding: 1px 6px; border-radius: 9px; }
.chipb:hover:not(:disabled) { transform: translateY(-6px) rotate(8deg); }
.chipb:active:not(:disabled) { transform: translateY(-2px) scale(.94); }
.chipb:disabled { filter: grayscale(.8) brightness(.55); cursor: not-allowed; }

/* ------------------------------------------------------------ dés */
.die {
  --ds: 56px; --dc: #333;
  position: relative; width: var(--ds); height: var(--ds); border-radius: calc(var(--ds) * .2); flex: 0 0 auto;
  background: linear-gradient(145deg, #fffefb, #e8e3d4);
  box-shadow: inset 0 calc(var(--ds) * -.07) 0 rgba(0,0,0,.12), inset 0 2px 0 #fff, 0 6px 14px rgba(0,0,0,.45);
  display: grid; place-items: center; color: var(--dc);
  font: 800 calc(var(--ds) * .5)/1 var(--font-display); transition: transform .2s, box-shadow .2s;
  border: 0; padding: 0;
}
.die[data-f="0"] { --dc: #55627d; }
.die[data-f="1"] { --dc: #2f7be0; }
.die[data-f="2"] { --dc: #2a9a58; }
.die[data-f="3"] { --dc: #9455d0; }
.die[data-f="4"] { --dc: #e07a1f; }
.die[data-f="5"] { --dc: #d9332c; }
.die[data-f="1"] { font-size: calc(var(--ds) * .42); letter-spacing: -.06em; }
.die.sel { transform: translateY(-10px); box-shadow: 0 0 0 3px var(--gold), 0 14px 22px rgba(0,0,0,.5); }
.die.hid { background: linear-gradient(145deg, #3b2a1b, #24190f); color: transparent; box-shadow: inset 0 2px 0 rgba(255,255,255,.12), 0 6px 14px rgba(0,0,0,.45); }
.die.roll { animation: roll .75s cubic-bezier(.2,.8,.25,1) both; animation-delay: var(--d, 0s); }
@keyframes roll {
  0% { transform: translate(-30px, -50px) rotate(-260deg) scale(.5); opacity: 0; }
  55% { transform: translate(6px, 8px) rotate(30deg) scale(1.1); opacity: 1; }
  100% { transform: none; }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1150px) {
  .game { grid-template-columns: 1fr; }
  .side { position: fixed; right: 10px; top: 64px; bottom: 10px; width: min(340px, calc(100vw - 20px)); height: auto; z-index: 40; transform: translateX(110%); transition: transform .25s; box-shadow: 0 20px 60px #000b; }
  .side.open { transform: none; }
}
@media (max-width: 760px) {
  :root { --cw: clamp(30px, 9.5vw, 46px); }
  .topbar { padding: 8px 10px; gap: 8px; }
  .room-info { flex-wrap: nowrap; gap: 5px; }
  .icon-btn { width: 34px; height: 34px; font-size: 14px; }
  .logo span.txt { display: none; }
  .pill { padding: 4px 8px; font-size: 12px; }
  .pill.hide-sm, .pill .hide-sm { display: none; }
  .game { padding: 6px; }
  .act-main .btn { min-width: 0; flex: 1; padding: 13px 10px; font-size: 15px; }
  .act-main { width: 100%; }
  .btn .kbd { display: none; }
  .seat { width: clamp(74px, 23vw, 104px); }
  .plate { padding: 4px 7px 4px 4px; gap: 5px; }
  .hero { padding-top: 34px; }
  .row2 { grid-template-columns: 1fr; }
  .rpop { grid-template-columns: repeat(5, 1fr); }
}
