/* Baccarat (Lightning / Speed) : salon onyx et or, table ovale en feutre nuit sous un spot, rail de cuir, cartes dessinées,
   cases imprimées en arc, jetons empilés, tableau des roads. Les formes de la table (rail, tapis, cases) sont tracées en SVG
   par ui.js à la taille réelle ; ici : matières, lumière, animations (transform / opacity uniquement en boucle). */
:root {
  --bg: #080705; --panel: #15120c; --panel-2: #100e09; --panel-3: #0b0a07; --border: #3a2f16; --border-light: #5c4a22;
  --muted: #c9b991; --accent: #d4af37; --gold: #d4af37; --gold-2: #f3dc8a; --gold-3: #8a6a1c; --gold-dim: rgba(212,175,55,.45);
  --blue: #2f6fff; --red: #e5193a; --green: #1fae5a; --ivory: #fbf8f0; --bolt: #ffe27a;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Didot, "Bodoni 72", "Bodoni MT", "Playfair Display", Georgia, "Times New Roman", serif;
}
body { font-family: var(--font); --page-bg:
    radial-gradient(125% 92% at 50% 40%, transparent 46%, rgba(0,0,0,.72) 100%),
    radial-gradient(46% 26% at 50% -4%, rgba(255,214,120,.2), rgba(255,190,90,.05) 60%, transparent 80%),
    linear-gradient(180deg, #171208 0%, #0b0906 40%, #070604 100%); }
.logo { color: #fff; font-style: normal; gap: 8px; }
.logo .live { background: #e5193a; color: #fff; font-size: 9px; font-weight: 900; padding: 2px 6px; border-radius: 6px; letter-spacing: 1px; }
.howto-btn { display: none; }
.balance { color: var(--gold-2); }
.room-banner { text-align: center; font-size: 12px; color: var(--gold); padding: 4px; background: #15120c; border-bottom: 1px solid var(--border); }
.bc-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic-bolt { width: 1em; height: 1em; fill: currentColor; flex: 0 0 auto; }

/* ===== ambiance de la salle : rayons qui tournent lentement, bokeh qui dérive (deux calques, transform seulement) ===== */
.amb { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.amb-rays { position: absolute; left: 50%; top: -30vmax; width: 150vmax; height: 150vmax; margin-left: -75vmax; opacity: .5;
  background: repeating-conic-gradient(from 0deg, rgba(212,175,55,.07) 0 1.4deg, transparent 1.4deg 8deg);
  -webkit-mask-image: radial-gradient(circle, #000 0, rgba(0,0,0,.5) 28%, transparent 58%); mask-image: radial-gradient(circle, #000 0, rgba(0,0,0,.5) 28%, transparent 58%);
  animation: ambSpin 240s linear infinite; }
.amb-bokeh { position: absolute; inset: -6%; opacity: .8; }
.amb-bokeh.a { background:
    radial-gradient(circle at 6% 18%, rgba(255,200,110,.16) 0, rgba(255,200,110,0) 34px),
    radial-gradient(circle at 93% 12%, rgba(255,200,110,.13) 0, rgba(255,200,110,0) 28px),
    radial-gradient(circle at 3% 62%, rgba(255,170,90,.1) 0, rgba(255,170,90,0) 46px),
    radial-gradient(circle at 97% 70%, rgba(255,170,90,.09) 0, rgba(255,170,90,0) 40px),
    radial-gradient(circle at 12% 90%, rgba(255,214,140,.07) 0, rgba(255,214,140,0) 30px);
  animation: ambDrift 26s ease-in-out infinite alternate; }
.amb-bokeh.b { background:
    radial-gradient(circle at 9% 40%, rgba(255,226,160,.09) 0, rgba(255,226,160,0) 22px),
    radial-gradient(circle at 90% 38%, rgba(255,226,160,.1) 0, rgba(255,226,160,0) 26px),
    radial-gradient(circle at 96% 92%, rgba(255,190,110,.08) 0, rgba(255,190,110,0) 52px),
    radial-gradient(circle at 1% 8%, rgba(255,190,110,.08) 0, rgba(255,190,110,0) 18px);
  animation: ambDrift 34s ease-in-out -9s infinite alternate-reverse; }
@keyframes ambSpin { to { transform: rotate(360deg); } }
@keyframes ambDrift { from { transform: translate3d(-14px, 8px, 0) scale(1); opacity: .55; } to { transform: translate3d(16px, -12px, 0) scale(1.05); opacity: .95; } }

/* ===== page : tableau des roads à gauche, table à droite, commandes sous la table ===== */
.bc { flex: 1; display: grid; grid-template-columns: 304px minmax(0, 1fr); grid-template-areas: "board tbl" "ctl ctl"; align-content: start; gap: 8px; padding: 8px; max-width: 1320px; width: 100%; margin: 0 auto; position: relative; }
.board { grid-area: board; } .tbl { grid-area: tbl; } .controls { grid-area: ctl; }

/* ===== la table ===== */
.tbl { --chrome: 146px; --wall-h: clamp(120px, calc(100vh - var(--chrome) - 514px), 196px); --rail: 22px; --cw: 64px; --ch: 91px; --gap: 6px; --g3: 10px; --pad-x: 40px; --felt-pad: 22px; --band: 118px; --mat-gap: 34px; --seat-h: 46px; --chip: 34px; --dx: 0px; --dh: calc(var(--wall-h) + 36px);
  position: relative; isolation: isolate; overflow: hidden; border-radius: 20px; min-width: 0;
  padding: calc(var(--wall-h) + var(--rail) + var(--felt-pad)) var(--pad-x) calc(var(--rail) + 12px);
  display: flex; flex-direction: column; align-items: center;
  border: 1px solid rgba(212,175,55,.5);
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 0, rgba(0,0,0,.55) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cg fill='none' stroke='%23d4af37' stroke-opacity='.13'%3E%3Cpath d='M22 0L44 22L22 44L0 22Z'/%3E%3Cpath d='M22 11L33 22L22 33L11 22Z' stroke-opacity='.07'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #17110a, #0c0906);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.6), inset 0 0 0 4px rgba(212,175,55,.22), 0 18px 40px rgba(0,0,0,.55); }

/* mur du salon : éventail Art déco derrière la croupière, appliques, bokeh, cône du spot */
.wall { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--wall-h) + 70px); z-index: 0; overflow: hidden;
  background:
    radial-gradient(42% 100% at 50% 100%, rgba(255,200,120,.2), rgba(255,200,120,0) 72%),
    repeating-linear-gradient(90deg, rgba(212,175,55,.09) 0 1px, transparent 1px 72px),
    linear-gradient(180deg, #0e0a06 0, #1d150b 62%, #120d07 100%); }
.wall::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 5px; border-top: 1px solid rgba(212,175,55,.5); border-bottom: 1px solid rgba(212,175,55,.22); }
.wall::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 130% at 50% 60%, transparent 40%, rgba(0,0,0,.6) 100%); }
.wall-fan { position: absolute; left: calc(50% + var(--dx)); bottom: 40px; width: 760px; height: 760px; margin: 0 0 -380px -380px; border-radius: 50%; opacity: .9;
  background: repeating-conic-gradient(from -1deg, rgba(232,196,90,.3) 0 1deg, transparent 1deg 7.5deg), repeating-conic-gradient(from 2.75deg, rgba(232,196,90,.12) 0 .5deg, transparent .5deg 7.5deg);
  -webkit-mask-image: radial-gradient(circle, transparent 0 17%, #000 17.5%, rgba(0,0,0,.6) 34%, transparent 50%); mask-image: radial-gradient(circle, transparent 0 17%, #000 17.5%, rgba(0,0,0,.6) 34%, transparent 50%);
  animation: fanTurn 90s linear infinite; }
@keyframes fanTurn { to { transform: rotate(360deg); } }
.wall-bokeh { position: absolute; inset: -10px -30px; }
.wall-bokeh.a { background:
    radial-gradient(circle at 7% 34%, rgba(255,205,120,.34) 0, rgba(255,205,120,.1) 9px, rgba(255,205,120,0) 22px),
    radial-gradient(circle at 21% 62%, rgba(255,180,100,.16) 0, rgba(255,180,100,0) 30px),
    radial-gradient(circle at 79% 58%, rgba(255,180,100,.16) 0, rgba(255,180,100,0) 34px),
    radial-gradient(circle at 93% 30%, rgba(255,205,120,.34) 0, rgba(255,205,120,.1) 9px, rgba(255,205,120,0) 22px);
  animation: ambDrift 19s ease-in-out infinite alternate; }
.wall-bokeh.b { background:
    radial-gradient(circle at 14% 22%, rgba(255,230,170,.2) 0, rgba(255,230,170,0) 14px),
    radial-gradient(circle at 30% 30%, rgba(255,230,170,.1) 0, rgba(255,230,170,0) 20px),
    radial-gradient(circle at 70% 26%, rgba(255,230,170,.12) 0, rgba(255,230,170,0) 18px),
    radial-gradient(circle at 86% 66%, rgba(255,230,170,.18) 0, rgba(255,230,170,0) 13px);
  animation: ambDrift 27s ease-in-out -6s infinite alternate-reverse; }
.wall-spot { position: absolute; left: calc(50% + var(--dx)); top: -30px; width: 520px; height: 340px; margin-left: -260px; background: conic-gradient(from 180deg at 50% 0, transparent 0 -26deg, rgba(255,226,160,.13) -14deg, rgba(255,226,160,.2) 0deg, rgba(255,226,160,.13) 14deg, transparent 26deg 360deg); -webkit-mask-image: linear-gradient(180deg, #000, transparent 92%); mask-image: linear-gradient(180deg, #000, transparent 92%); animation: spotSway 11s ease-in-out infinite alternate; transform-origin: 50% 0; }
@keyframes spotSway { from { transform: rotate(-1.6deg); opacity: .8; } to { transform: rotate(1.6deg); opacity: 1; } }

/* croupière : assise derrière le rail (le bas du buste passe sous la table), éclairée par le spot, elle respire */
.dealer-zone { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--wall-h) + 40px); z-index: 1; pointer-events: none; }
.dealer-art { position: absolute; left: calc(50% + var(--dx)); bottom: 0; width: calc(var(--dh) * .875); height: var(--dh); margin-left: calc(var(--dh) * -.4375); transform-origin: 50% 100%; transition: transform .35s cubic-bezier(.2,.9,.25,1.2); }
.dealer-art::before { content: ""; position: absolute; left: -24%; right: -24%; top: 4%; bottom: 8%; border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.5), rgba(0,0,0,0) 68%); }
.dealer-body { position: absolute; inset: 0; transform-origin: 50% 100%; animation: breathe 4.6s ease-in-out infinite; }
.dealer-body img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
.dealer-light, .dealer-flash { position: absolute; inset: 0; -webkit-mask: url(../assets/tables/dealer-baccarat.webp) 50% 0 / cover no-repeat; mask: url(../assets/tables/dealer-baccarat.webp) 50% 0 / cover no-repeat; }
.dealer-light { background: linear-gradient(180deg, rgba(255,214,150,.2) 0, rgba(255,214,150,.04) 32%, rgba(14,9,4,0) 58%, rgba(14,9,4,.62) 100%); }
.dealer-flash { background: linear-gradient(200deg, rgba(255,246,214,.75), rgba(255,226,122,.25) 55%, rgba(255,226,122,0)); opacity: 0; }
@keyframes breathe { 0%, 100% { transform: none; } 50% { transform: scale(1.009, 1.016) translateY(-.5px); } }
.dealer-art[data-mood="deal"] { transform: rotate(-1.6deg) translateY(2px); }
.dealer-art[data-mood="happy"], .dealer-art[data-mood="talk"] { animation: dealerCheer .7s ease-out; }
@keyframes dealerCheer { 0% { transform: none; } 35% { transform: translateY(-7px) scale(1.03); } 100% { transform: none; } }
.dealer-say { position: absolute; top: clamp(8px, calc(var(--wall-h) * .13), 26px); left: calc(50% + var(--dh) * .4); z-index: 6; background: #fffdf7; color: #221a0c; font-weight: 700; font-size: 12px; padding: 8px 12px; border-radius: 14px 14px 14px 2px; width: max-content; max-width: 196px; line-height: 1.3; box-shadow: 0 6px 20px rgba(0,0,0,.45), inset 0 -2px 0 rgba(212,175,55,.35); }
.dealer-say.pop { animation: pop .3s cubic-bezier(.3,1.5,.5,1); transform-origin: 0 100%; }
.dealer-say:empty, .tbl[data-phase="result"] .dealer-say { display: none; }
@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* la table dessinée (rail, feutre, impressions) passe devant la croupière */
.tbl-art { position: absolute; left: 0; top: var(--wall-h); width: 100%; height: calc(100% - var(--wall-h)); z-index: 2; pointer-events: none; overflow: visible; }
.tbl-art text { font-family: var(--serif); font-weight: 700; }
.veil { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(90% 80% at 50% 30%, rgba(4,6,14,.3), rgba(2,3,8,.78)); opacity: 0; transition: opacity .45s; }
.tbl.storm .veil { opacity: 1; }

/* ===== Lightning Cards : tableau accroché au mur ===== */
.lc-panel { --lw: 40px; --lh: 56px; position: absolute; left: 14px; top: 22px; z-index: 6; display: flex; flex-direction: column; gap: 7px; padding: 8px 10px 9px; border-radius: 12px; border: 1px solid rgba(212,175,55,.5);
  background: linear-gradient(180deg, rgba(22,17,9,.94), rgba(8,6,3,.94)); box-shadow: inset 0 0 0 2px rgba(0,0,0,.7), inset 0 0 0 3px rgba(212,175,55,.16), 0 10px 22px rgba(0,0,0,.55); }
.lc-title { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold-2); white-space: nowrap; }
.lc-title .ic-bolt { font-size: 13px; color: var(--bolt); }
.lc-cards { display: flex; gap: 7px; }
.lc { position: relative; width: var(--lw); padding-bottom: 19px; }
.lc-slot { position: relative; width: var(--lw); height: var(--lh); border-radius: 5px; border: 1px dashed rgba(212,175,55,.3); background: rgba(255,255,255,.02); display: flex; align-items: center; justify-content: center; color: rgba(212,175,55,.2); font-size: 16px; transition: opacity .4s, border-color .3s; }
.lc.spare .lc-slot { opacity: .35; }
.lc.on .lc-slot { border: 0; background: none; }
.lc.on .lc-slot > .ic-bolt { display: none; }
.lc-card { position: absolute; inset: 0; border-radius: 5px; background: linear-gradient(165deg, #fff 0, #fbf8f0 60%, #ebe5d6 100%); box-shadow: 0 0 0 1.5px #f3dc8a, 0 0 0 3px #a8811f, 0 0 14px rgba(255,210,80,.6), 0 4px 8px rgba(0,0,0,.5); animation: lcIn .5s cubic-bezier(.2,.9,.25,1.25) both; }
.lc-card svg { display: block; width: 100%; height: 100%; }
.lc-card.flat { animation: none; }
@keyframes lcIn { 0% { transform: scale(.25) rotate(-14deg); opacity: 0; filter: brightness(4); } 55% { transform: scale(1.16) rotate(2deg); opacity: 1; filter: brightness(2); } 100% { transform: none; filter: none; } }
/* arcs électriques autour d'une Lightning Card */
.lc-arcs { position: absolute; inset: -7px; width: calc(100% + 14px); height: calc(100% + 14px); overflow: visible; pointer-events: none; }
.lc-arcs path { fill: none; stroke: #fff3bf; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; animation: arcFlick 2.3s steps(1, end) infinite; }
.lc-arcs path:nth-child(2) { animation-delay: -.8s; animation-duration: 2.9s; } .lc-arcs path:nth-child(3) { animation-delay: -1.5s; animation-duration: 3.4s; }
@keyframes arcFlick { 0% { opacity: 0; } 4% { opacity: 1; } 8% { opacity: .2; } 11% { opacity: .9; } 16% { opacity: 0; } 100% { opacity: 0; } }
/* multiplicateur gravé sur une plaque de laiton */
.lc-m, .cm { display: flex; align-items: center; justify-content: center; font-weight: 900; color: #3a2500; font-variant-numeric: tabular-nums; text-shadow: 0 1px 0 rgba(255,244,200,.75);
  background: linear-gradient(180deg, #fff0b0 0, #e9c552 38%, #c2952a 62%, #e6c35a 100%); border: 1px solid #7a5a12; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 0 rgba(90,60,0,.5), 0 2px 5px rgba(0,0,0,.55); }
.lc-m { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); min-width: 30px; height: 16px; padding: 0 5px; border-radius: 3px; font-size: 11px; letter-spacing: .3px; animation: plateIn .35s .18s cubic-bezier(.3,1.6,.5,1) both; }
.lc.flatm .lc-m { animation: none; }
@keyframes plateIn { from { transform: translateX(-50%) scale(.3); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.lc.hit .lc-card { box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px #f3dc8a, 0 0 22px 5px rgba(255,220,90,.95), 0 4px 8px rgba(0,0,0,.5); }
.lc.hit::after { content: ""; position: absolute; left: -5px; right: -5px; top: -5px; height: calc(var(--lh) + 10px); border-radius: 9px; box-shadow: 0 0 0 2px rgba(255,235,150,.9), 0 0 18px 4px rgba(255,220,90,.8); animation: hitPulse 1.1s ease-in-out infinite; pointer-events: none; }
@keyframes hitPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.lc-off { display: none; font-size: 11px; font-weight: 700; color: var(--muted); max-width: 190px; line-height: 1.35; }
.lc-panel.off .lc-cards { display: none; } .lc-panel.off .lc-off { display: block; }
.lc-panel.off .lc-title .ic-bolt { color: #7b7466; }

/* ===== statut : anneau du compte à rebours, phase, sabot ===== */
.status-box { position: absolute; right: 16px; top: 20px; z-index: 6; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.timer-ring { position: relative; width: 66px; height: 66px; }
.timer-ring svg { width: 100%; height: 100%; display: block; }
.tr-face { fill: rgba(8,6,3,.82); stroke: #a8811f; stroke-width: 1.4; }
.tr-ticks { fill: none; stroke: rgba(243,220,138,.55); stroke-width: 3; stroke-dasharray: 1 13.4; transform: rotate(-90.5deg); transform-origin: 50% 50%; }
.tr-bg { fill: none; stroke: rgba(255,255,255,.1); stroke-width: 4; }
.tr-fg { fill: none; stroke: var(--gold); stroke-width: 4; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke .3s; }
.timer-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 21px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.timer-ring b.tk { animation: secTick .32s cubic-bezier(.3,1.5,.5,1); }
@keyframes secTick { 0% { transform: scale(1.5); opacity: .4; } 100% { transform: none; opacity: 1; } }
.tr-pulse { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #ff5a6e; opacity: 0; pointer-events: none; }
.timer-ring.late .tr-fg { stroke: #ff5a6e; }
.timer-ring.late .tr-face { stroke: #ff5a6e; }
.timer-ring.late b { color: #ffd9de; }
.timer-ring.late .tr-pulse { animation: latePulse 1s ease-out infinite; }
@keyframes latePulse { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.table-status { color: var(--gold-2); font-family: var(--serif); font-weight: 700; letter-spacing: 2px; font-size: 15px; text-transform: uppercase; text-align: right; min-height: 18px; text-shadow: 0 0 14px rgba(212,175,55,.5), 0 1px 2px rgba(0,0,0,.8); max-width: 230px; }
.tbl[data-late="1"] .table-status { color: #ffb3bd; }
.shoe-info { font-size: 11px; color: var(--muted); text-align: right; text-shadow: 0 1px 2px rgba(0,0,0,.8); }

/* ===== objets posés sur le tapis : râtelier de jetons, défausse, sabot ===== */
.tray { position: absolute; left: calc(50% + var(--dx)); top: calc(var(--wall-h) + 3px); z-index: 4; width: 218px; height: 30px; margin-left: -109px; padding: 4px 6px; display: flex; gap: 3px; border-radius: 6px; background: linear-gradient(180deg, #2a2a2e, #0c0c0e); border: 1px solid #a8811f; box-shadow: inset 0 2px 5px rgba(0,0,0,.9), 0 3px 8px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.6); }
.tray i { flex: 1; border-radius: 2px; --c: #c8102e; --e: #f4efe2; background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0) 26%, rgba(0,0,0,0) 64%, rgba(0,0,0,.5)), repeating-linear-gradient(90deg, var(--c) 0 2.5px, rgba(0,0,0,.45) 2.5px 3px), var(--c); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.6); position: relative; }
.tray i::after { content: ""; position: absolute; left: 0; right: 0; top: 38%; height: 24%; background: repeating-linear-gradient(90deg, var(--e) 0 2.5px, rgba(0,0,0,.35) 2.5px 3px); opacity: .85; }
.tray i:nth-child(1), .tray i:nth-child(7) { --c: #d9d6cc; --e: #3f6fd9; } .tray i:nth-child(2) { --c: #1e8e3e; } .tray i:nth-child(4) { --c: #17171b; --e: #d4af37; } .tray i:nth-child(5) { --c: #6a1b9a; } .tray i:nth-child(6) { --c: #1e8e3e; }
.shoe { position: absolute; right: calc(var(--pad-x) + 2px); top: calc(var(--wall-h) + var(--rail) + 34px); z-index: 4; width: 124px; }
.shoe-art svg, .discard svg { display: block; width: 100%; height: auto; overflow: visible; }
.shoe-count { position: absolute; left: 50%; bottom: -5px; transform: translateX(-42%); min-width: 38px; height: 17px; padding: 0 6px; display: flex; align-items: center; justify-content: center; border-radius: 3px; font-size: 11px; font-weight: 900; color: #3a2500; font-variant-numeric: tabular-nums; text-shadow: 0 1px 0 rgba(255,244,200,.7); background: linear-gradient(180deg, #fff0b0, #d9b243 55%, #b98f1f); border: 1px solid #7a5a12; box-shadow: 0 2px 5px rgba(0,0,0,.6); }
.shoe-count.tk { animation: countTick .3s ease-out; }
@keyframes countTick { 0% { transform: translateX(-42%) translateY(-4px) scale(1.12); } 100% { transform: translateX(-42%); } }
.discard { position: absolute; left: calc(var(--pad-x) + 4px); top: calc(var(--wall-h) + var(--rail) + 42px); z-index: 4; width: 96px; }

/* ===== mains : emplacements imprimés, cartes, totaux ===== */
.hands { position: relative; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; column-gap: 14px; width: 100%; max-width: 700px; }
.hand { position: relative; z-index: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0 6px 2px; min-width: 0; }
.hand-p { justify-self: end; } .hand-b { justify-self: start; }
.hand::before { content: ""; position: absolute; z-index: -1; left: -26px; right: -26px; top: -6px; bottom: -8px; border-radius: 46% / 50%; transition: opacity .4s; }
.hand-p::before { background: radial-gradient(ellipse at 50% 56%, rgba(47,111,255,.36), rgba(47,111,255,.12) 52%, rgba(47,111,255,0) 72%); }
.hand-b::before { background: radial-gradient(ellipse at 50% 56%, rgba(229,25,58,.34), rgba(229,25,58,.11) 52%, rgba(229,25,58,0) 72%); }
.hand-arc { display: block; width: 240px; height: 30px; overflow: visible; }
.hand-arc path { stroke: rgba(232,200,110,.55); stroke-width: 1; }
.hand-arc text { font: 700 21px var(--serif); letter-spacing: 10px; paint-order: stroke; stroke: rgba(0,0,0,.35); stroke-width: 2px; }
.hand-p .hand-arc text { fill: #c9d8ff; } .hand-b .hand-arc text { fill: #ffc0cb; }
.cards { position: relative; width: calc(var(--ch) + var(--g3) + var(--cw) * 2 + var(--gap)); height: var(--ch); }
.slot, .cardw { position: absolute; top: 0; width: var(--cw); height: var(--ch); }
.hand-p .s3, .hand-b .s3 { top: calc((var(--ch) - var(--cw)) / 2); width: var(--ch); height: var(--cw); }
.hand-p .s3 { left: 0; } .hand-p .s1 { left: calc(var(--ch) + var(--g3)); } .hand-p .s2 { left: calc(var(--ch) + var(--g3) + var(--cw) + var(--gap)); }
.hand-b .s1 { left: 0; } .hand-b .s2 { left: calc(var(--cw) + var(--gap)); } .hand-b .s3 { left: calc(var(--cw) * 2 + var(--gap) + var(--g3)); }
.slot { border-radius: 7px; border: 1px solid rgba(232,200,110,.5); box-shadow: inset 0 0 0 3px rgba(0,0,0,.14), inset 0 0 14px rgba(0,0,0,.25); }
.slot.s3 { border-style: dashed; border-color: rgba(232,200,110,.32); }
.halo { position: absolute; z-index: 0; left: -26px; right: -26px; top: -22px; bottom: -22px; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,222,120,.62), rgba(255,210,90,.2) 45%, rgba(255,210,90,0) 70%); opacity: 0; transition: opacity .45s; pointer-events: none; }
.hand.win .halo { opacity: 1; animation: haloPulse 1.7s ease-in-out infinite; }
.hand.tie .halo { opacity: .75; background: radial-gradient(ellipse, rgba(95,229,152,.5), rgba(95,229,152,.16) 45%, rgba(95,229,152,0) 70%); }
.hand.tie .hv { border-color: #5fe598; box-shadow: 0 0 0 2px rgba(95,229,152,.3), 0 0 16px rgba(95,229,152,.5), 0 3px 8px rgba(0,0,0,.5); }
@keyframes haloPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.hand.lose .cardw { filter: brightness(.62) saturate(.7); transition: filter .5s; }
.hand.lose::before { opacity: .35; }

/* carte : boîtier (ombre et épaisseur, jamais tourné), vol depuis le sabot, retournement 3D */
.cardw { z-index: 2; }
.cardw.s3 { z-index: 3; }
.cardw::before { content: ""; position: absolute; inset: 0; border-radius: 7px; box-shadow: 0 1px 0 #ded7c7, 0 2px 0 #9f9786, 0 3px 4px rgba(0,0,0,.5), 0 9px 13px -3px rgba(0,0,0,.55); opacity: 1; }
.cardw.in::before { animation: shadowIn .2s .32s ease-out both; }
@keyframes shadowIn { from { opacity: 0; } to { opacity: 1; } }
.cfly { position: absolute; left: 50%; top: 50%; width: var(--cw); height: var(--ch); margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2); transform: rotate(var(--rot, 0deg)); }
.cardw.in .cfly { animation: cardFly .36s cubic-bezier(.22,.7,.2,1) both; }
@keyframes cardFly { 0% { transform: translate(var(--fx, 200px), var(--fy, -80px)) rotate(var(--fr, -30deg)) scale(.78); opacity: 0; } 14% { opacity: 1; } 100% { transform: rotate(var(--rot, 0deg)); opacity: 1; } }
.cardw.out .cfly { animation: cardOut .42s cubic-bezier(.5,0,.8,.4) both; animation-delay: calc(var(--i, 0) * 45ms); }
.cardw.out::before { opacity: 0; }
@keyframes cardOut { 0% { transform: rotate(var(--rot, 0deg)); opacity: 1; } 100% { transform: translate(var(--fx, -200px), var(--fy, -60px)) rotate(-18deg) scale(.6); opacity: 0; } }
.card { position: absolute; inset: 0; border-radius: 7px; transform-style: preserve-3d; transform: perspective(520px) rotateY(0deg); }
.cardw.in .card { animation: cardFlip .3s .25s cubic-bezier(.4,0,.3,1) both; }
@keyframes cardFlip { 0% { transform: perspective(520px) rotateY(180deg) scale(1); } 50% { transform: perspective(520px) rotateY(90deg) scale(1.1); } 100% { transform: perspective(520px) rotateY(0deg) scale(1); } }
.card .cf, .card .cb { position: absolute; inset: 0; border-radius: inherit; -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; }
.card .cf { background: linear-gradient(160deg, #fff 0, #fcfaf4 55%, #ede7d8 100%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.card .cb { transform: rotateY(180deg); box-sizing: border-box; border: 3px solid #f6f1e2; box-shadow: inset 0 0 0 1px #c9a544;
  background: url(../assets/brand/p-logo.png) 50% 50% / 44% auto no-repeat,
    radial-gradient(circle calc(var(--cw) * .27) at 50% 50%, #1b0509 0 88%, #e4c35e 89% 99%, transparent 100%),
    repeating-linear-gradient(45deg, rgba(232,196,90,.42) 0 1px, transparent 1px 6px), repeating-linear-gradient(-45deg, rgba(232,196,90,.42) 0 1px, transparent 1px 6px),
    linear-gradient(160deg, #a3142a, #53060f); }
.cface { display: block; width: 100%; height: 100%; --k1: #20263a; --k2: #dbaa2b; --k3: #c8102e; --kh: #4a321c; color: #17171c; }
.cface.red { --k1: #c8102e; --k3: #20263a; --kh: #c9962a; color: #c8102e; }
.cface .pips, .cface .idx { fill: currentColor; }
.cface text { font: 700 21px Georgia, "Times New Roman", serif; text-anchor: middle; fill: currentColor; }
.cface .frame { fill: #fbf3dc; stroke: #b8922e; stroke-width: 1; }
.cface .mid { stroke: #b8922e; stroke-width: .8; }
.cface.mini text { font-size: 50px; }
/* Lightning Card dans une main : cadre électrique, arcs, multiplicateur gravé */
.cardw.ltg::after { content: ""; position: absolute; inset: -4px; border-radius: 10px; border: 2px solid #ffe27a; box-shadow: 0 0 0 1px rgba(255,255,255,.8), 0 0 18px 4px rgba(255,214,80,.8), inset 0 0 10px rgba(255,214,80,.55); pointer-events: none; animation: ltgFrame 1.3s ease-in-out infinite; }
@keyframes ltgFrame { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
.cardw .lc-arcs { z-index: 4; inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); }
.cm { position: absolute; z-index: 5; left: 50%; top: -11px; transform: translateX(-50%); min-width: 30px; height: 18px; padding: 0 5px; border-radius: 3px; font-size: 12px; animation: plateIn .35s cubic-bezier(.3,1.6,.5,1) both; }

/* total d'une main : pastille qui compte, naturel, couronne et ruban du gagnant */
.hand-foot { display: flex; align-items: center; justify-content: center; gap: 6px; height: 30px; margin-top: 4px; width: calc(var(--cw) * 2 + var(--gap)); white-space: nowrap; }
.hand-p .hand-foot { align-self: flex-end; } .hand-b .hand-foot { align-self: flex-start; }
.hv { min-width: 40px; height: 30px; padding: 0 12px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; font-weight: 900; font-size: 19px; color: #fff; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #262019, #0b0906); border: 1px solid rgba(212,175,55,.65); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 3px 8px rgba(0,0,0,.5); transition: background .3s, border-color .3s, color .3s, box-shadow .3s, opacity .3s; }
.hv:empty { visibility: hidden; }
.hv b { display: block; }
.hv b.tk { animation: hvTick .34s cubic-bezier(.3,1.4,.5,1); }
@keyframes hvTick { 0% { transform: translateY(105%); opacity: 0; } 100% { transform: none; opacity: 1; } }
.hv.natural { color: #3a2500; border-color: #fff0b0; background: linear-gradient(180deg, #fff0b0, #e3bd4a 50%, #c2952a); box-shadow: 0 0 0 2px rgba(255,226,122,.35), 0 0 18px rgba(255,214,80,.7), 0 3px 8px rgba(0,0,0,.5); }
.hand.win .hv { color: #3a2500; border-color: #fff0b0; background: linear-gradient(180deg, #fff0b0, #e3bd4a 50%, #c2952a); box-shadow: 0 0 0 2px rgba(255,226,122,.4), 0 0 22px rgba(255,214,80,.8), 0 3px 8px rgba(0,0,0,.5); animation: winPop .5s cubic-bezier(.3,1.7,.5,1); }
@keyframes winPop { 0% { transform: scale(.7); } 100% { transform: none; } }
.hand.lose .hv { opacity: .55; }
.crown { width: 0; height: 22px; overflow: hidden; display: flex; align-items: center; justify-content: center; transition: width .25s; }
.crown svg { width: 22px; height: 22px; flex: 0 0 auto; fill: #f3dc8a; stroke: #7a5a12; stroke-width: .8; stroke-linejoin: round; }
.hand.win .crown { width: 22px; overflow: visible; }
.hand.win .crown svg { animation: crownIn .55s cubic-bezier(.3,1.8,.5,1) both; }
@keyframes crownIn { 0% { transform: translateY(-16px) scale(.2) rotate(-25deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.hand-tag { font-family: var(--serif); font-weight: 700; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: #3a2500; white-space: nowrap; }
.hand-tag:empty { display: none; }
.hand-tag { position: relative; padding: 3px 10px 3px 8px; background: linear-gradient(180deg, #fff0b0, #d9b243); clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 50%, 100% 100%, 0 100%); animation: tagIn .35s ease-out both; }
@keyframes tagIn { from { transform: translateX(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
.emblem { align-self: center; width: 84px; height: 84px; margin-top: 18px; border-radius: 50%; position: relative; border: 1px solid rgba(212,175,55,.5); box-shadow: 0 0 0 4px rgba(0,0,0,.14), 0 0 0 5px rgba(212,175,55,.22); background: repeating-conic-gradient(from 0deg, rgba(212,175,55,.2) 0 2deg, transparent 2deg 15deg); }
.emblem i { position: absolute; inset: 16px; border-radius: 50%; background: url(../assets/brand/p-logo.png) 50% 46% / 78% auto no-repeat, radial-gradient(circle, #1a1410, #0a0806); border: 1px solid rgba(212,175,55,.7); box-shadow: inset 0 2px 6px rgba(0,0,0,.7); opacity: .92; }

/* ===== cases de mise imprimées (tracé SVG calculé par ui.js) ===== */
.mat { position: relative; z-index: 5; width: 100%; margin-top: var(--mat-gap); height: 150px; flex: 0 0 auto; }
.spot { position: absolute; display: block; padding: 0; color: #fff; pointer-events: none; user-select: none; -webkit-user-select: none; }
.spot .sec { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.sec-fill { pointer-events: auto; cursor: pointer; stroke: #d9b54a; stroke-width: 1.6; fill-opacity: .9; transition: fill-opacity .18s, stroke .18s, stroke-width .18s; }
.sec-key { fill: none; stroke: rgba(243,220,138,.42); stroke-width: .8; pointer-events: none; }
.sec-lit { fill: #fff; fill-opacity: 0; pointer-events: none; transition: fill-opacity .18s; }
.sec-glow { fill: none; stroke: #ffe27a; stroke-width: 5; opacity: 0; pointer-events: none; }
@media (hover: hover) { .mat:not(.locked) .spot:hover .sec-lit { fill-opacity: .1; } .mat:not(.locked) .spot:hover .sec-fill { stroke: #fff0b0; stroke-width: 2.2; } }
.mat:not(.locked) .spot:active .sec-lit { fill-opacity: .2; }
.spot:focus-visible { outline: none; } .spot:focus-visible .sec-fill { stroke: #fff; stroke-width: 2.6; }
.mat.locked .sec-fill { cursor: default; }
.mat.locked .spot:not(.win):not(.push) .sec-fill { fill-opacity: .62; }
.sp-txt { position: absolute; left: var(--lx, 50%); top: var(--ly, 10px); display: flex; flex-direction: column; align-items: center; gap: 1px; transform: translate(-50%, 0) rotate(var(--rot, 0deg)); transform-origin: 50% 0; pointer-events: none; text-align: center; }
.sp-label { font-family: var(--serif); font-size: 17px; font-weight: 700; letter-spacing: 3.5px; line-height: 1.1; text-shadow: 0 1px 2px rgba(0,0,0,.7); white-space: nowrap; padding-left: 3.5px; }
.sp-ppair .sp-label, .sp-bpair .sp-label { font-size: 11px; letter-spacing: 1.6px; white-space: normal; width: min-content; padding-left: 1.6px; }
.sp-pay { font-size: 12px; font-weight: 800; color: var(--gold-2); letter-spacing: 1px; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.spot.win .sec-fill { stroke: #fff0b0; stroke-width: 2.6; fill-opacity: 1; }
.spot.win .sec-lit { fill-opacity: .16; }
.spot.win .sec-glow { animation: secGlow 1.1s ease-in-out infinite; }
@keyframes secGlow { 0%, 100% { opacity: .25; } 50% { opacity: .95; } }
.spot.push .sec-fill { stroke: #fff; stroke-dasharray: 5 4; }
.sp-mult { position: absolute; z-index: 6; left: var(--lx, 50%); top: calc(var(--ly, 10px) - 25px); transform: translateX(-50%); min-width: 38px; height: 22px; padding: 0 7px; border-radius: 4px; display: flex; align-items: center; justify-content: center; gap: 3px; font-size: 13px; font-weight: 900; color: #3a2500; text-shadow: 0 1px 0 rgba(255,244,200,.75); background: linear-gradient(180deg, #fff0b0 0, #e9c552 38%, #c2952a 62%, #e6c35a 100%); border: 1px solid #7a5a12; box-shadow: 0 2px 6px rgba(0,0,0,.5), 0 0 14px rgba(255,200,60,.8); animation: plateIn .35s cubic-bezier(.3,1.6,.5,1) both; pointer-events: none; }
.sp-mult .ic-bolt { font-size: 12px; }

/* jetons : disque à incrustations, piles avec épaisseur, total sur une étiquette */
.chip { --c: #c8102e; --d: #7d0a1c; --e: #f7f3e8; --th: calc(var(--chip) * .09); position: relative; display: block; width: var(--chip); height: var(--chip); border-radius: 50%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.42)), repeating-linear-gradient(90deg, var(--d) 0 11%, var(--e) 11% 19%, var(--d) 19% 30%); box-shadow: 0 1px 0 rgba(0,0,0,.75); }
.chip::after { content: ""; position: absolute; inset: 0; border-radius: 50%; transform: translateY(calc(var(--th) * -1));
  background:
    radial-gradient(circle, rgba(255,255,255,.2) 0, rgba(255,255,255,.07) 40%, rgba(255,255,255,0) 41%),
    radial-gradient(circle, var(--c) 0 55%, rgba(0,0,0,.35) 56% 58.5%, var(--e) 59.5% 61.5%, transparent 62.5%),
    repeating-conic-gradient(from -11.25deg, var(--e) 0 22.5deg, var(--c) 22.5deg 45deg);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.42), inset 0 1.5px 1px rgba(255,255,255,.4); }
.chip.v1 { --c: #e3e0d7; --d: #8f8c82; --e: #3f6fd9; } .chip.v5 { --c: #c8102e; --d: #7d0a1c; } .chip.v25 { --c: #1e8e3e; --d: #0f5524; } .chip.v100 { --c: #1c1c21; --d: #000; --e: #d4af37; } .chip.v500 { --c: #6a1b9a; --d: #3d0e5c; --e: #f3dc8a; }
.chips { position: absolute; left: var(--cx, 50%); top: var(--cy, 66%); width: 0; height: 0; pointer-events: none; }
.stack { position: absolute; left: 0; top: 0; width: 0; height: 0; transform: translate(var(--x, 0px), var(--y, 0px)); }
.stack .chip { position: absolute; left: calc(var(--chip) / -2); top: calc(var(--chip) / -2 - var(--n, 0) * (var(--th) + .7px)); }
.stack .chip.drop { animation: chipDrop .36s cubic-bezier(.3,.7,.3,1) both; }
@keyframes chipDrop { 0% { transform: translateY(-26px) scale(1.14); opacity: 0; } 45% { transform: translateY(0) scale(1); opacity: 1; } 65% { transform: translateY(-5px); } 82% { transform: translateY(0); } 91% { transform: translateY(-1.5px); } 100% { transform: none; } }
.stack-lbl { position: absolute; z-index: 2; left: 0; top: calc(var(--chip) / 2 - 8px); transform: translateX(-50%); min-width: 26px; height: 16px; padding: 0 6px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; background: rgba(6,5,3,.86); border: 1px solid rgba(243,220,138,.75); box-shadow: 0 2px 5px rgba(0,0,0,.5); white-space: nowrap; }
.stack.mine { z-index: 3; }
.stack.mine::after { content: ""; position: absolute; left: calc(var(--chip) / -2 - 3px); top: calc(var(--chip) / -2 + 5px); width: calc(var(--chip) + 6px); height: calc(var(--chip) - 2px); border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.55), rgba(0,0,0,0) 70%); z-index: -1; }
.stack.bot { --chip: 20px; z-index: 1; }
.stack.bot .chip::after { box-shadow: inset 0 0 0 1px rgba(0,0,0,.42), 0 0 0 1.5px var(--pc, transparent); }
.stack.bot .stack-lbl { top: calc(var(--chip) / 2 + 1px); min-width: 0; height: 12px; padding: 0 4px; font-size: 8.5px; border-radius: 6px; border-color: rgba(255,255,255,.25); }
.stack.other { --chip: calc(var(--chip-o, 27px)); z-index: 2; }
.stack.other .chip::after { box-shadow: inset 0 0 0 1px rgba(0,0,0,.42), 0 0 0 2px var(--pc, transparent); }
.stack.other .stack-lbl { min-width: 0; height: 14px; padding: 0 5px; font-size: 10px; border-color: rgba(255,255,255,.35); }
.stack.pay { z-index: 4; }
.stack.pay .stack-lbl { color: #3a2500; background: linear-gradient(180deg, #fff0b0, #d9b243); border-color: #7a5a12; }
.stack.wait { opacity: 0; }
.stack.land { animation: stackLand .34s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes stackLand { 0% { transform: translate(var(--x, 0px), var(--y, 0px)) scale(1.25); opacity: .4; } 60% { transform: translate(var(--x, 0px), calc(var(--y, 0px) + 2px)) scale(.96); opacity: 1; } 100% { transform: translate(var(--x, 0px), var(--y, 0px)); opacity: 1; } }
.stack.won .chip:last-of-type::after { box-shadow: inset 0 0 0 1px rgba(0,0,0,.42), 0 0 0 2px #ffe27a, 0 0 12px 3px rgba(255,214,80,.9); }
.stack.swept { animation: stackSweep .6s cubic-bezier(.5,0,.7,.4) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes stackSweep { 0% { transform: translate(var(--x, 0px), var(--y, 0px)); opacity: 1; } 15% { opacity: .75; } 80% { opacity: .6; } 100% { transform: translate(var(--tx, 0px), var(--ty, -200px)) scale(.5); opacity: 0; } }
.stack.gone { display: none; }
/* jetons en vol (calque fixe au-dessus de la page) */
.fly-layer { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 60; pointer-events: none; --chip: 30px; }
.fly-layer .flyer { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform, opacity; }
.fly-layer .flyer .stack { transform: none; }

/* ===== sièges : joueurs de la table de part et d'autre de ma place ===== */
.seats { position: relative; z-index: 5; width: 100%; height: var(--seat-h); margin-top: 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 10px; align-items: start; }
.seat-group { display: flex; gap: 6px; min-width: 0; } .seat-group.left { justify-content: flex-end; }
.seat { position: relative; flex: 0 0 auto; display: grid; grid-template-columns: 28px auto; align-items: center; column-gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: linear-gradient(180deg, rgba(20,16,10,.92), rgba(6,5,3,.92)); border: 1px solid rgba(212,175,55,.3); box-shadow: 0 4px 10px rgba(0,0,0,.45); transform: translateY(var(--dy, 0px)); animation: seatIn .35s ease-out; transition: border-color .3s, box-shadow .3s; }
@keyframes seatIn { from { opacity: 0; } to { opacity: 1; } }
.seat .bav { display: block; width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 2px var(--c, #d4af37), 0 2px 6px rgba(0,0,0,.5); transition: opacity .3s, filter .3s; }
.binfo { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.bname { font-size: 11px; font-weight: 800; color: #fff; white-space: nowrap; }
.bamt { font-size: 10.5px; font-weight: 700; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bamt.pos { color: #6cf59a; } .bamt.neg { color: #ff8b98; }
.seat.win { border-color: #f3dc8a; box-shadow: 0 0 0 1px rgba(243,220,138,.5), 0 0 16px rgba(255,214,80,.5), 0 4px 10px rgba(0,0,0,.45); }
.seat.lose .bav { filter: grayscale(.5) brightness(.8); }
.seat.out .bav { opacity: .5; filter: grayscale(.7); }
.seat.out .bamt { opacity: .6; }
.bfloat { position: absolute; left: 50%; top: -6px; font-size: 13px; font-weight: 900; color: #6cf59a; text-shadow: 0 1px 3px rgba(0,0,0,.9); white-space: nowrap; pointer-events: none; animation: floatUp 1.5s ease-out both; }
@keyframes floatUp { 0% { transform: translate(-50%, 4px) scale(.6); opacity: 0; } 18% { transform: translate(-50%, -10px) scale(1.1); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -30px); opacity: 0; } }
.bsay { position: absolute; left: 20px; top: -13px; display: none; background: #fffdf7; color: #221a0c; font-size: 10px; font-weight: 800; line-height: 1; padding: 4px 7px; border-radius: 9px 9px 9px 2px; box-shadow: 0 3px 10px rgba(0,0,0,.5); white-space: nowrap; z-index: 2; pointer-events: none; }
.bsay.on { display: block; animation: pop .3s ease-out; }
.me-seat { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 3px 16px 3px 4px; border-radius: 999px; transform: translateY(var(--dy, 0px)); background: linear-gradient(180deg, #2c2414, #100c06); border: 1px solid #c9a544; box-shadow: inset 0 1px 0 rgba(255,236,170,.25), 0 0 0 3px rgba(0,0,0,.35), 0 6px 14px rgba(0,0,0,.5); }
.me-av { display: block; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #f3dc8a, 0 2px 6px rgba(0,0,0,.5); background: #222; }
.bet-sum { display: flex; align-items: baseline; gap: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bet-sum b { color: #fff; font-weight: 800; } .bet-sum .tot { font-size: 12px; } .bet-sum .tot b { color: var(--gold-2); font-size: 16px; font-weight: 900; } .bet-sum i { color: var(--gold-dim); font-style: normal; }

/* ===== annonce du résultat : plaque centrée devant le rail ===== */
.announce { --an-b: 40px; position: absolute; left: 50%; bottom: calc(100% - var(--wall-h) - var(--an-b)); z-index: 8; transform: translateX(-50%); pointer-events: none; }
.an-plaque { --ac: #7ea6ff; --ab: rgba(30,60,160,.5); position: relative; min-width: 290px; max-width: min(92vw, 470px); padding: 10px 34px 11px; text-align: center; border-radius: 6px; border: 1px solid #f3dc8a;
  background: linear-gradient(180deg, var(--ab), rgba(0,0,0,0) 60%), linear-gradient(180deg, rgba(20,15,8,.96), rgba(5,4,2,.97));
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.6), inset 0 0 0 4px rgba(212,175,55,.5), 0 18px 40px rgba(0,0,0,.7), 0 0 40px var(--ab);
  animation: plaqueIn .55s cubic-bezier(.2,1.3,.3,1) both; }
.an-plaque.B { --ac: #ff7f95; --ab: rgba(170,20,45,.5); } .an-plaque.T { --ac: #5fe598; --ab: rgba(20,130,70,.45); }
.an-plaque::before, .an-plaque::after { content: ""; position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; background: linear-gradient(135deg, #fff0b0, #c2952a); transform: rotate(45deg); border: 1px solid #7a5a12; box-shadow: 0 0 12px rgba(255,214,80,.6); }
.an-plaque::before { left: -12px; } .an-plaque::after { right: -12px; }
@keyframes plaqueIn { 0% { transform: scale(.4, .1); opacity: 0; } 60% { transform: scale(1.06, 1.06); opacity: 1; } 100% { transform: none; opacity: 1; } }
.an-rays { position: absolute; z-index: -1; left: 50%; top: 50%; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, var(--ab) 0 6deg, transparent 6deg 18deg); -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 62%); mask-image: radial-gradient(circle, #000 12%, transparent 62%); animation: raysIn .6s ease-out both, ambSpin 26s linear infinite; }
@keyframes raysIn { from { opacity: 0; } to { opacity: 1; } }
.an-shine { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.an-shine::before { content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 34%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.3) 50%, transparent); transform: translateX(-140%) skewX(-18deg); animation: shineX 1.1s .35s ease-in-out both; }
@keyframes shineX { to { transform: translateX(420%) skewX(-18deg); } }
.an-title { position: relative; font-family: var(--serif); font-size: 34px; font-weight: 700; letter-spacing: 5px; line-height: 1.05; padding-left: 5px; color: var(--ac); text-shadow: 0 2px 0 rgba(0,0,0,.7), 0 0 22px var(--ab); white-space: nowrap; }
.an-score { position: relative; margin-top: 5px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-weight: 900; color: #fff; }
.an-score .sc { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 1.5px; color: var(--muted); }
.an-score .sc b { min-width: 26px; height: 26px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: #fff; letter-spacing: 0; }
.an-score .sc.p b { background: #2456d6; } .an-score .sc.b b { background: #c8102e; }
.an-score .sc.w b { box-shadow: 0 0 0 2px #f3dc8a, 0 0 12px rgba(255,214,80,.8); }
.an-score em { font-style: normal; color: var(--gold); font-family: var(--serif); font-size: 15px; }
.an-score small { font-size: 9px; letter-spacing: 1px; padding: 3px 7px; border-radius: 3px; background: rgba(255,255,255,.1); font-weight: 800; }
.an-score small.pp { color: #a9c1ff; } .an-score small.bp { color: #ff9aab; } .an-score small.nat { color: #3a2500; background: linear-gradient(180deg, #fff0b0, #d9b243); }
.an-win { position: relative; margin-top: 7px; padding-top: 6px; border-top: 1px solid rgba(212,175,55,.3); font-size: 13px; font-weight: 700; color: #fff; animation: tagIn .4s .45s ease-out both; }
.an-win b { color: #6cf59a; font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; } .an-win em { font-style: normal; color: #ffd54a; font-weight: 900; }
.an-win.push, .an-win.lose { color: var(--muted); } .an-win b.neg { color: #ff8b98; font-size: 14px; }

/* ===== orage (Lightning Round) : ciel qui flashe, éclairs tracés vers les cartes frappées ===== */
.storm-fx { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.storm-sky { position: absolute; inset: 0; background: radial-gradient(ellipse 75% 60% at 50% 12%, rgba(255,240,190,.5), rgba(255,214,100,.12) 46%, transparent 76%); opacity: 0; }
.tbl.storm .storm-sky { animation: skyFlash 1.45s steps(1, end) infinite; }
@keyframes skyFlash { 0% { opacity: 0; } 5% { opacity: 1; } 9% { opacity: .15; } 13% { opacity: .7; } 19% { opacity: 0; } 61% { opacity: 0; } 64% { opacity: .55; } 69% { opacity: 0; } 100% { opacity: 0; } }
.tbl.storm .dealer-flash { animation: skyFlash 1.45s steps(1, end) infinite; }
.tbl::after { content: ""; position: absolute; inset: 0; z-index: 9; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(255,236,160,.9), inset 0 0 46px rgba(255,214,80,.5); opacity: 0; }
.tbl.storm::after { animation: skyFlash 1.45s steps(1, end) infinite; }
.tbl.storm .table-status { color: #fff6d0; text-shadow: 0 0 16px #ffd54a, 0 0 4px #fff; }
.bolts { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.bolt path { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.bolt .g2 { stroke: rgba(255,200,60,.22); stroke-width: 11; } .bolt .g1 { stroke: rgba(255,226,122,.55); stroke-width: 5; } .bolt .g0 { stroke: #fffbe6; stroke-width: 2; }
.bolt { animation: boltLife .52s ease-out both; }
.bolt path { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); animation: boltDraw .1s linear forwards; }
@keyframes boltDraw { to { stroke-dashoffset: 0; } }
@keyframes boltLife { 0% { opacity: 1; } 22% { opacity: 1; } 30% { opacity: .35; } 38% { opacity: .95; } 100% { opacity: 0; } }
.bolt-hit { fill: #fff6d0; animation: hitFlash .45s ease-out both; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes hitFlash { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
.tbl.shake { animation: tblShake .34s linear; }
@keyframes tblShake { 0%, 100% { transform: none; } 20% { transform: translate(2px, -1px); } 40% { transform: translate(-2px, 1px); } 60% { transform: translate(1px, 1px); } 80% { transform: translate(-1px, -1px); } }

/* ===== commandes : jetons, actions, bascule Lightning ===== */
.controls { display: grid; grid-template-columns: 286px 1fr auto auto 1fr; align-items: center; column-gap: 18px; padding: 8px 14px; border-radius: 16px; border: 1px solid rgba(212,175,55,.34);
  background: linear-gradient(180deg, rgba(255,236,170,.06), rgba(255,236,170,0) 30%), linear-gradient(180deg, #1c170d, #0c0a06); box-shadow: inset 0 1px 0 rgba(255,236,170,.12), inset 0 0 0 3px rgba(0,0,0,.35), 0 10px 26px rgba(0,0,0,.45); }
.chip-tray { --chip: 46px; grid-column: 3; grid-row: 1; display: flex; gap: 9px; padding: 5px 12px 7px; border-radius: 999px; background: linear-gradient(180deg, #060504, #15110a); box-shadow: inset 0 2px 6px rgba(0,0,0,.9), 0 1px 0 rgba(255,236,170,.12); transition: opacity .25s; }
.chip-tray.dim { opacity: .45; pointer-events: none; }
.chip-btn { position: relative; width: var(--chip); height: var(--chip); border-radius: 50%; flex: 0 0 auto; transition: transform .16s cubic-bezier(.3,1.5,.5,1); }
.chip-btn .chip { box-shadow: 0 1px 0 rgba(0,0,0,.75), 0 7px 9px rgba(0,0,0,.55); }
.chip-btn b { position: absolute; inset: 0; transform: translateY(calc(var(--chip) * -.09)); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); font-variant-numeric: tabular-nums; }
.chip-btn.c1 b { color: #222; text-shadow: none; }
@media (hover: hover) { .chip-btn:hover { transform: translateY(-4px); } }
.chip-btn.active { transform: translateY(-7px) scale(1.1); }
.chip-btn.active::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #f3dc8a; box-shadow: 0 0 12px rgba(255,214,80,.7); }
.chip-btn.active::before { content: ""; position: absolute; left: 50%; bottom: -13px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #f3dc8a; box-shadow: 0 0 8px rgba(255,214,80,.9); }
.ctrl-group { grid-column: 4; grid-row: 1; display: flex; gap: 6px; align-items: stretch; flex-wrap: wrap; justify-content: center; }
.ctl { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 14px; border-radius: 11px; color: #f5ecd2; font-weight: 800; font-size: 12px; letter-spacing: .2px; white-space: nowrap;
  background: linear-gradient(180deg, #2b2314, #130f08); border: 1px solid #6b5626; box-shadow: inset 0 1px 0 rgba(255,236,170,.16), inset 0 -2px 0 rgba(0,0,0,.4), 0 3px 0 rgba(0,0,0,.45), 0 6px 10px rgba(0,0,0,.3); transition: border-color .15s, transform .08s, box-shadow .08s, color .15s; }
.ctl svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--gold-2); }
@media (hover: hover) { .ctl:hover { border-color: #f3dc8a; color: #fff; } }
.ctl:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,236,170,.1), inset 0 2px 4px rgba(0,0,0,.5), 0 1px 0 rgba(0,0,0,.45); }
.ctl:disabled { opacity: .38; pointer-events: none; }
.ctl:focus-visible, .chip-btn:focus-visible, .ltg-toggle:focus-visible, .road-tabs button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ctl.primary { min-width: 104px; padding: 0 18px; font-size: 13px; letter-spacing: 1px; color: #2a1a00; text-shadow: 0 1px 0 rgba(255,255,255,.4); border-color: #fff0b0;
  background: linear-gradient(180deg, #fff0b0 0, #ecc955 30%, #c79a26 70%, #dcb445 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -3px 0 rgba(122,82,0,.4), 0 3px 0 #6b4c0a, 0 8px 18px rgba(212,175,55,.3); }
.ctl.primary svg { color: #2a1a00; }
.ctl.primary:active { box-shadow: inset 0 2px 5px rgba(90,60,0,.6), 0 1px 0 #6b4c0a; }
.ltg-toggle { grid-column: 1; grid-row: 1; justify-self: center; display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 4px 8px 4px 10px; border-radius: 12px; border: 1px solid #5c4a22; background: linear-gradient(180deg, #19140b, #0a0805); color: #fff; text-align: left; box-shadow: inset 0 1px 0 rgba(255,236,170,.1), 0 3px 0 rgba(0,0,0,.4); transition: border-color .2s, box-shadow .2s; }
.ltg-toggle.on { border-color: #e4c35e; box-shadow: inset 0 1px 0 rgba(255,236,170,.16), 0 3px 0 rgba(0,0,0,.4), 0 0 18px rgba(255,200,60,.28); }
.ltg-toggle:disabled { opacity: .6; cursor: default; }
.ltg-ic { display: flex; font-size: 19px; color: #7b7466; transition: color .2s; }
.ltg-toggle.on .ltg-ic { color: var(--bolt); }
.ltg-txt { display: flex; flex-direction: column; line-height: 1.2; }
.ltg-txt b { font-size: 12px; letter-spacing: .5px; } .ltg-txt small { font-size: 10px; color: var(--muted); white-space: nowrap; }
.ltg-sw { position: relative; width: 40px; height: 22px; border-radius: 11px; flex: 0 0 auto; background: #050403; border: 1px solid #5c4a22; box-shadow: inset 0 2px 4px rgba(0,0,0,.9); transition: background .2s, border-color .2s; }
.ltg-sw i { position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d8d2c2, #7b7466); box-shadow: 0 1px 3px rgba(0,0,0,.7); transition: transform .22s cubic-bezier(.3,1.5,.5,1), background .2s; }
.ltg-toggle.on .ltg-sw { background: linear-gradient(180deg, #6b4c0a, #c79a26); border-color: #f3dc8a; }
.ltg-toggle.on .ltg-sw i { transform: translateX(18px); background: radial-gradient(circle at 35% 30%, #fffbe6, #f3dc8a); box-shadow: 0 1px 3px rgba(0,0,0,.7), 0 0 8px rgba(255,226,122,.9); }
.toasts { position: fixed; bottom: 80px; left: 0; right: 0; z-index: 30; }

/* ===== tableau des roads ===== */
.board { --cs-bead: 20; --cs-big: 18; --cs-der: 9; display: flex; flex-direction: column; gap: 7px; padding: 10px 10px 12px; border-radius: 16px; min-width: 0; border: 1px solid rgba(212,175,55,.38);
  background: linear-gradient(180deg, rgba(255,236,170,.05), rgba(255,236,170,0) 90px), linear-gradient(180deg, #17130b, #0a0806); box-shadow: inset 0 1px 0 rgba(255,236,170,.1), inset 0 0 0 3px rgba(0,0,0,.4), 0 10px 26px rgba(0,0,0,.45); }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.board-head b { font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: 1px; color: var(--gold-2); }
.board-shoe { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.shoe-stats { display: flex; flex-direction: column; gap: 6px; }
.ss-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,.07); box-shadow: inset 0 1px 2px rgba(0,0,0,.7); }
.ss-bar i { display: block; height: 100%; flex: 0 0 auto; transition: flex-basis .5s cubic-bezier(.3,.8,.3,1); min-width: 0; }
.ss-bar .P { background: linear-gradient(180deg, #5b8cff, #2456d6); } .ss-bar .T { background: linear-gradient(180deg, #4fe08a, #17914a); margin: 0 1px; } .ss-bar .B { background: linear-gradient(180deg, #ff6b85, #c8102e); }
.ss-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ss { display: flex; flex-direction: column; gap: 1px; padding: 5px 8px 6px; border-radius: 8px; background: rgba(255,255,255,.04); border-top: 2px solid var(--k); min-width: 0; }
.ss.P { --k: #4b7dff; } .ss.B { --k: #e5193a; } .ss.T { --k: #1fae5a; }
.ss span { font-size: 10px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.ss b { font-size: 19px; font-weight: 900; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.ss b small { font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.ss-pairs { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ss-pairs span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; } .ss-pairs b { color: #fff; }
.ss-pairs i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px #fff; } .ss-pairs .pp i { background: #5b8cff; } .ss-pairs .bp i { background: #ff5a6e; }
.road-block { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.road-cap { font-size: 10px; font-weight: 700; letter-spacing: .4px; color: var(--muted); }
.road { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: 6px; background: linear-gradient(180deg, #0a0907, #100e0a); border: 1px solid rgba(212,175,55,.24); box-shadow: inset 0 2px 6px rgba(0,0,0,.8); }
.road::-webkit-scrollbar { display: none; }
.road svg { display: block; }
.road .last { transform-box: fill-box; transform-origin: 50% 50%; animation: beadIn .5s cubic-bezier(.3,1.7,.5,1) both; }
@keyframes beadIn { 0% { transform: scale(0); opacity: 0; } 100% { transform: none; opacity: 1; } }
.road .ping { fill: none; stroke: #fff; stroke-width: 1.4; transform-box: fill-box; transform-origin: 50% 50%; animation: beadPing 1.4s ease-out 3 both; }
@keyframes beadPing { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.road-tabs { display: none; gap: 3px; }
.road-tabs button { font-size: 10px; font-weight: 800; letter-spacing: .3px; color: var(--muted); padding: 5px 9px; border-radius: 8px; border: 1px solid transparent; }
.road-tabs button.active { color: #fff; border-color: var(--gold-dim); background: rgba(212,175,55,.14); }
.road-next { display: grid; grid-template-columns: auto 1fr 1fr; align-items: center; gap: 6px 8px; margin-top: 2px; padding-top: 8px; border-top: 1px solid rgba(212,175,55,.2); font-size: 11px; color: var(--muted); }
.road-next .nx { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; background: rgba(255,255,255,.04); }
.road-next .nx b { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; color: #fff; flex: 0 0 auto; }
.road-next .nx.P b { background: #2456d6; } .road-next .nx.B b { background: #c8102e; }
.road-next svg { display: block; }

/* modales : historique */
.bc-hist td { white-space: nowrap; }
.bc-hist .cards-col { font-size: 11px; letter-spacing: .3px; }
.rtag { display: inline-block; padding: 1px 7px; border-radius: 8px; font-weight: 800; font-size: 11px; color: #fff; }
.rtag.P { background: var(--blue); } .rtag.B { background: var(--red); } .rtag.T { background: var(--green); }
.lcm { display: inline-block; padding: 0 5px; border-radius: 6px; background: rgba(212,175,55,.2); color: var(--gold-2); font-weight: 800; font-size: 10px; }
.round-detail { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.rd-hands { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rd-hand { background: var(--panel-2); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.rd-hand b { font-size: 12px; letter-spacing: 2px; } .rd-hand.P b { color: #7ea6ff; } .rd-hand.B b { color: #ff6b85; }
.rd-hand div { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.mcard { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 52px; border-radius: 5px; background: #fff; color: #111; font-weight: 800; font-size: 13px; }
.mcard.red { color: #c8102e; }
.mcard.ltg { box-shadow: 0 0 0 2px var(--gold), 0 0 10px rgba(255,200,60,.7); }
.mcard b { position: absolute; right: -6px; top: -7px; font-size: 9px; padding: 1px 4px; border-radius: 7px; background: #d9ad2c; color: #2a1a00; }
.rd-line b.pos { color: #6cf59a; } .rd-line b.neg { color: #ff8b98; }
.hint { color: var(--muted); font-size: 12px; }

/* deux colonnes : la hauteur de la rangée vient de la table ; le tableau des roads s'y cale et défile s'il est plus long */
@media (min-width: 1101px) {
  .board { contain: size; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(212,175,55,.4) transparent; }
  .board > * { flex: 0 0 auto; }
}

/* grands écrans : cartes, cases et croupière plus grandes */
@media (min-width: 1560px) and (min-height: 960px) {
  .bc { max-width: 1540px; grid-template-columns: 336px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .tbl { --chrome: 160px; --wall-h: clamp(200px, calc(100vh - var(--chrome) - 600px), 300px); --rail: 24px; --cw: 76px; --ch: 108px; --gap: 7px; --g3: 12px; --pad-x: 46px; --felt-pad: 26px; --band: 140px; --mat-gap: 40px; --seat-h: 50px; --chip: 40px; }
  .board { --cs-bead: 22; --cs-big: 20; --cs-der: 10; padding: 12px 12px 14px; gap: 8px; }
  .hand-arc { width: 284px; height: 35px; }
  .hands { max-width: 820px; column-gap: 18px; }
  .emblem { width: 98px; height: 98px; margin-top: 22px; } .emblem i { inset: 18px; }
  .hand-foot { height: 34px; } .hv { height: 34px; min-width: 46px; font-size: 22px; border-radius: 17px; } .hand-tag { font-size: 12px; }
  .shoe { width: 148px; } .discard { width: 114px; } .shoe-count { height: 19px; font-size: 12px; min-width: 42px; }
  .tray { width: 258px; height: 34px; margin-left: -129px; }
  .lc-panel { --lw: 46px; --lh: 65px; padding: 10px 12px 11px; } .lc-title { font-size: 11px; } .lc-m { font-size: 12px; height: 18px; min-width: 34px; } .lc { padding-bottom: 22px; }
  .timer-ring { width: 76px; height: 76px; } .timer-ring b { font-size: 24px; } .table-status { font-size: 17px; max-width: 280px; } .shoe-info { font-size: 12px; }
  .sp-label { font-size: 20px; letter-spacing: 4px; } .sp-ppair .sp-label, .sp-bpair .sp-label { font-size: 13px; } .sp-pay { font-size: 14px; }
  .stack.bot { --chip: 24px; } .stack-lbl { font-size: 12px; height: 18px; }
  .seat { grid-template-columns: 32px auto; padding: 3px 12px 3px 4px; } .seat .bav { width: 32px; height: 32px; } .bname { font-size: 12px; } .bamt { font-size: 11.5px; }
  .me-seat { min-height: 44px; } .me-av { width: 34px; height: 34px; } .bet-sum { font-size: 12px; } .bet-sum .tot { font-size: 13px; } .bet-sum .tot b { font-size: 18px; }
  .an-plaque { min-width: 340px; padding: 12px 40px 13px; } .an-title { font-size: 40px; } .announce { --an-b: 46px; }
  .dealer-say { font-size: 13px; max-width: 220px; }
  .controls { grid-template-columns: 316px 1fr auto auto 1fr; padding: 10px 16px; }
  .chip-tray { --chip: 52px; gap: 11px; } .chip-btn b { font-size: 15px; }
  .ctl { min-height: 46px; padding: 0 16px; font-size: 13px; } .ctl.primary { min-width: 120px; font-size: 14px; }
}

/* fenêtres peu hautes (portables) : la table se tasse par paliers avant de faire défiler la page */
@media (min-width: 701px) and (max-height: 800px) {
  .tbl { --wall-h: clamp(110px, calc(100vh - var(--chrome) - 474px), 196px); --cw: 60px; --ch: 85px; --felt-pad: 12px; --band: 108px; --mat-gap: 28px; --seat-h: 42px; }
  .board { --cs-bead: 17; --cs-big: 15; --cs-der: 8; gap: 5px; }
  .announce { --an-b: 65px; }
}
@media (min-width: 701px) and (max-height: 730px) {
  .tbl { --wall-h: clamp(96px, calc(100vh - var(--chrome) - 438px), 170px); --cw: 56px; --ch: 80px; --felt-pad: 8px; --band: 98px; --mat-gap: 24px; --seat-h: 40px; --chip: 30px; }
  .lc-panel { --lw: 34px; --lh: 48px; top: 10px; padding: 6px 9px 7px; gap: 5px; }
  .status-box { top: 10px; gap: 4px; } .timer-ring { width: 54px; height: 54px; } .timer-ring b { font-size: 18px; } .shoe-info { display: none; }
  .hand-arc { width: 216px; height: 26px; } .hand-foot { height: 26px; margin-top: 2px; } .hv { height: 26px; font-size: 17px; }
  .emblem { width: 72px; height: 72px; margin-top: 16px; } .emblem i { inset: 13px; }
  .shoe { width: 108px; } .discard { width: 84px; }
  .announce { --an-b: 58px; }
  .an-plaque { padding: 7px 30px 8px; } .an-title { font-size: 28px; } .an-win { margin-top: 5px; padding-top: 4px; }
  .sp-label { font-size: 15px; } .sp-ppair .sp-label, .sp-bpair .sp-label { font-size: 10px; }
}

/* ===== écrans moyens : le tableau des roads passe sous la table ===== */
@media (max-width: 1100px) {
  .bc { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tbl" "ctl" "board"; }
  .tbl { --chrome: 196px; }
  .controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; }
  .rd-small, .rd-roach { display: none; }
  .board[data-road="small"] .rd-eye, .board[data-road="roach"] .rd-eye { display: none; }
  .board[data-road="small"] .rd-small, .board[data-road="roach"] .rd-roach { display: flex; }
  .road-tabs { display: flex; }
  .rd-eye .road-cap, .rd-small .road-cap, .rd-roach .road-cap { display: none; }
}

/* tablette en portrait : le sabot et la défausse montent dans les coins, les mains passent dessous */
@media (min-width: 701px) and (max-width: 940px) {
  .tbl { --felt-pad: 58px; --pad-x: 30px; }
  .announce { --an-b: 86px; }
  .shoe { width: 104px; top: calc(var(--wall-h) + var(--rail) + 6px); }
  .discard { width: 84px; top: calc(var(--wall-h) + var(--rail) + 12px); }
}

/* ===== téléphone en portrait ===== */
@media (max-width: 700px) {
  .amb { display: none; }
  .bc { padding: 6px; gap: 6px; }
  .tbl { --wall-h: 134px; --dh: 160px; --mat-gap: 12px; --rail: 14px; --cw: 43px; --ch: 61px; --gap: 4px; --g3: 5px; --pad-x: 17px; --felt-pad: 16px; --band: 84px; --seat-h: 46px; --chip: 28px; --dx: 30px; border-radius: 16px; padding-bottom: calc(var(--rail) + 8px); }
  .wall-fan { width: 520px; height: 520px; margin: 0 0 -260px -260px; bottom: 36px; }
  .wall-spot { width: 320px; margin-left: -160px; height: 250px; }
  .dealer-zone { height: calc(var(--wall-h) + 30px); }
  .dealer-say { top: 87px; left: 8px; font-size: 10.5px; max-width: 142px; padding: 5px 9px; border-radius: 12px 12px 2px 12px; }
  .dealer-say.pop { transform-origin: 100% 100%; }
  .lc-panel { --lw: 24px; --lh: 34px; left: 8px; top: 9px; padding: 6px 7px 6px; gap: 5px; border-radius: 10px; }
  .lc-title { font-size: 8.5px; letter-spacing: .8px; }
  .lc-cards { gap: 4px; }
  .lc { padding-bottom: 14px; }
  .lc-m { min-width: 0; width: 100%; height: 12px; font-size: 9.5px; padding: 0; border-radius: 2px; }
  .lc-slot, .lc-card { border-radius: 3px; } .lc-slot { font-size: 10px; }
  .lc-off { max-width: 132px; font-size: 10px; }
  .status-box { right: 8px; top: 9px; gap: 3px; }
  .timer-ring { width: 46px; height: 46px; } .timer-ring b { font-size: 15px; }
  .table-status { font-size: 10.5px; letter-spacing: 1px; max-width: 92px; min-height: 0; line-height: 1.15; }
  .shoe-info { display: none; }
  .tray { width: 116px; height: 19px; margin-left: -58px; padding: 3px 4px; gap: 2px; top: calc(var(--wall-h) + 2px); }
  .shoe { width: 60px; right: 15px; top: calc(var(--wall-h) + var(--rail) + 1px); }
  .shoe-count { min-width: 28px; height: 13px; font-size: 9px; bottom: -4px; padding: 0 4px; }
  .discard { width: 46px; left: 19px; top: calc(var(--wall-h) + var(--rail) + 4px); }
  .hands { column-gap: 2px; grid-template-columns: 1fr 0 1fr; }
  .hand { padding: 0 2px; gap: 3px; }
  .hand::before { left: -8px; right: -8px; }
  .emblem { display: none; }
  .hand-arc { width: 108px; height: 17px; } .hand-arc text { font-size: 33px; letter-spacing: 13px; stroke-width: 3px; }
  .hand-p .hand-arc { align-self: flex-end; } .hand-b .hand-arc { align-self: flex-start; }
  .slot, .cardw::before, .card { border-radius: 5px; }
  .card .cb { border-width: 2px; }
  .cm { min-width: 24px; height: 15px; font-size: 10px; top: -9px; }
  .hand-foot { height: 24px; margin-top: 2px; gap: 4px; }
  .hv { min-width: 34px; height: 24px; font-size: 15px; padding: 0 9px; }
  .hand-tag { font-size: 9px; letter-spacing: 1px; padding: 2px 8px 2px 6px; }
  .crown, .crown svg { height: 18px; } .crown svg { width: 18px; } .hand.win .crown { width: 18px; }
  .sp-label { font-size: 13px; letter-spacing: 2px; padding-left: 2px; }
  .sp-ppair .sp-label, .sp-bpair .sp-label { font-size: 8.5px; letter-spacing: .5px; padding-left: .5px; }
  .sp-pay { font-size: 10.5px; letter-spacing: .5px; }
  .stack-lbl { font-size: 10px; height: 14px; padding: 0 5px; min-width: 22px; }
  .stack.bot { --chip: 15px; } .stack.bot .stack-lbl { display: none; }
  .stack.other { --chip-o: 21px; }
  .seats { column-gap: 5px; margin-top: 5px; }
  .seat-group { gap: 4px; }
  .seat { grid-template-columns: 22px; grid-template-rows: 22px auto; justify-items: center; row-gap: 1px; padding: 3px 4px 2px; border-radius: 13px; min-width: 32px; }
  .seat .bav { width: 22px; height: 22px; }
  .bname { display: none; } .bamt { font-size: 9px; }
  .bsay { left: 4px; }
  .me-seat { padding: 3px 11px 3px 3px; gap: 6px; min-height: 34px; }
  .me-av { width: 26px; height: 26px; }
  .bet-sum { font-size: 10px; gap: 4px; } .bet-sum .tot { font-size: 10px; } .bet-sum .tot b { font-size: 14px; }
  .announce { --an-b: 50px; }
  .an-plaque { min-width: 218px; padding: 6px 20px 7px; }
  .an-title { font-size: 21px; letter-spacing: 3px; padding-left: 3px; }
  .an-score { margin-top: 4px; gap: 6px; } .an-score .sc { font-size: 9.5px; letter-spacing: 1px; gap: 5px; } .an-score .sc b { min-width: 23px; height: 23px; font-size: 14px; }
  .an-plaque::before, .an-plaque::after { width: 16px; height: 16px; margin-top: -8px; } .an-plaque::before { left: -9px; } .an-plaque::after { right: -9px; }
  .an-rays { width: 400px; height: 400px; margin: -200px 0 0 -200px; }
  .an-win { font-size: 12px; margin-top: 4px; padding-top: 4px; } .an-win b { font-size: 15px; }
  .controls { gap: 8px 10px; padding: 8px 6px; border-radius: 14px; }
  .chip-tray { --chip: 42px; gap: 8px; padding: 5px 10px 7px; }
  .ctrl-group { gap: 5px; flex-wrap: nowrap; width: 100%; }
  .ctl { flex: 1 1 0; flex-direction: column; gap: 2px; min-height: 46px; padding: 4px 2px; font-size: 10px; min-width: 0; border-radius: 10px; }
  .ctl svg { width: 15px; height: 15px; }
  .ctl.primary { flex: 1.5 1 0; min-width: 0; padding: 4px 4px; font-size: 10.5px; letter-spacing: .4px; }
  .ltg-toggle { min-height: 38px; }
  .toasts { bottom: 70px; }
  .board { padding: 8px 8px 10px; border-radius: 14px; }
}
@media (max-width: 380px) {
  .tbl { --cw: 40px; --ch: 57px; --pad-x: 14px; --dx: 26px; --dh: 150px; }
  .lc-panel { --lw: 22px; --lh: 31px; }
  .chip-tray { --chip: 39px; gap: 6px; }
  .hand-arc { width: 98px; }
}

@media (max-width: 700px) and (max-height: 700px) and (orientation: portrait) {
  .tbl { --wall-h: 114px; --dh: 140px; --band: 78px; --mat-gap: 10px; --seat-h: 42px; --felt-pad: 14px; }
  .dealer-say { top: 80px; max-width: 130px; padding: 4px 8px; }
  .announce { --an-b: 46px; }
  .status-box { top: 6px; } .lc-panel { top: 6px; }
  .controls { gap: 6px 10px; padding: 6px; }
}

/* ===== téléphone en paysage : la table à gauche sur toute la hauteur, commandes puis roads à droite ===== */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --topbar-h: 40px; }
  .topbar { padding: 0 8px; }
  .logo { font-size: 16px; }
  .balance { font-size: 13px; }
  .icon-btn, .friends-btn, .avatar-btn { width: 30px; height: 30px; }
  .room-banner, .amb { display: none; }
  .bc { grid-template-columns: minmax(0, 1.42fr) minmax(280px, 1fr); grid-template-areas: "tbl ctl" "tbl board"; grid-template-rows: auto 1fr; gap: 4px; padding: 4px 4px 0; max-width: none; }
  .controls { display: flex; flex-wrap: wrap; justify-content: center; }
  .tbl { --wall-h: 42px; --mat-gap: 6px; --rail: 10px; --cw: 41px; --ch: 58px; --gap: 4px; --g3: 5px; --pad-x: 16px; --felt-pad: 13px; --band: 70px; --seat-h: 34px; --chip: 25px; --dx: 0px; border-radius: 12px; padding-bottom: calc(var(--rail) + 4px); align-self: start; }
  .wall { height: calc(var(--wall-h) + 30px); }
  .wall-fan, .wall-spot, .dealer-zone, .dealer-say, .tray, .emblem, .shoe-info, .lc-title span { display: none; }
  .lc-panel { --lw: 20px; --lh: 28px; left: 6px; top: 4px; padding: 3px 6px 3px; flex-direction: row; align-items: center; gap: 6px; border-radius: 8px; }
  .lc-cards { gap: 5px; }
  .lc { padding-bottom: 0; }
  .lc-m { left: auto; right: -5px; bottom: -3px; transform: none; min-width: 0; height: 11px; padding: 0 2px; font-size: 8px; animation-name: pop; }
  .lc-slot { font-size: 9px; border-radius: 3px; } .lc-card { border-radius: 3px; }
  .lc-off { max-width: none; font-size: 10px; white-space: nowrap; }
  .status-box { right: 8px; top: 3px; flex-direction: row-reverse; align-items: center; gap: 7px; }
  .timer-ring { width: 34px; height: 34px; } .timer-ring b { font-size: 12px; }
  .table-status { font-size: 10.5px; letter-spacing: 1px; max-width: none; min-height: 0; white-space: nowrap; }
  .shoe { width: 64px; right: 14px; top: calc(var(--wall-h) + var(--rail) + 14px); }
  .shoe-count { min-width: 26px; height: 12px; font-size: 8.5px; bottom: -4px; padding: 0 3px; }
  .discard { width: 50px; left: 16px; top: calc(var(--wall-h) + var(--rail) + 18px); }
  .hands { column-gap: 14px; grid-template-columns: 1fr 0 1fr; max-width: 360px; }
  .hand { padding: 0 2px; gap: 2px; }
  .hand::before { left: -10px; right: -10px; top: -2px; bottom: -4px; }
  .hand-arc { width: 100px; height: 13px; } .hand-arc text { font-size: 30px; letter-spacing: 13px; stroke-width: 3px; }
  .slot, .cardw::before, .card { border-radius: 4px; }
  .card .cb { border-width: 2px; }
  .cm { min-width: 22px; height: 14px; font-size: 9.5px; top: -8px; }
  .hand-foot { height: 20px; margin-top: 1px; gap: 4px; }
  .hv { min-width: 30px; height: 20px; font-size: 13px; padding: 0 8px; }
  .hand-tag { font-size: 8.5px; letter-spacing: .8px; padding: 2px 7px 2px 5px; }
  .crown, .crown svg { height: 16px; } .crown svg { width: 16px; } .hand.win .crown { width: 16px; }
  .sp-label { font-size: 12px; letter-spacing: 2px; padding-left: 2px; }
  .sp-ppair .sp-label, .sp-bpair .sp-label { font-size: 8px; letter-spacing: .4px; padding-left: .4px; }
  .sp-pay { font-size: 9.5px; letter-spacing: .4px; }
  .stack-lbl { font-size: 9px; height: 13px; padding: 0 4px; min-width: 20px; }
  .stack.bot { --chip: 13px; } .stack.bot .stack-lbl { display: none; }
  .stack.other { --chip-o: 19px; }
  .seats { margin-top: 3px; column-gap: 5px; }
  .seat-group { gap: 4px; }
  .seat { grid-template-columns: 18px auto; column-gap: 3px; padding: 2px 6px 2px 2px; }
  .seat .bav { width: 18px; height: 18px; }
  .bname { display: none; } .bamt { font-size: 9px; }
  .bsay { left: 10px; }
  .me-seat { min-height: 26px; padding: 2px 9px 2px 2px; gap: 5px; }
  .me-av { width: 20px; height: 20px; }
  .bet-sum { font-size: 9.5px; gap: 4px; } .bet-sum .tot { font-size: 9.5px; } .bet-sum .tot b { font-size: 12px; }
  .announce { top: 4px; bottom: auto; left: auto; right: 12px; transform: none; }
  .an-plaque { min-width: 0; max-width: 296px; padding: 2px 15px 3px; display: grid; grid-template-columns: auto auto; align-items: center; justify-content: center; column-gap: 8px; row-gap: 0; }
  .tbl[data-phase="result"] .status-box { display: none; }
  .an-title { font-size: 15px; letter-spacing: 1.5px; padding-left: 1.5px; line-height: 22px; }
  .an-score { margin-top: 0; gap: 4px; flex-wrap: nowrap; } .an-score .sc { font-size: 0; gap: 0; } .an-score .sc b { min-width: 19px; height: 19px; font-size: 12px; } .an-score small { display: none; } .an-score em { font-size: 11px; }
  .an-win { grid-column: 1 / -1; margin-top: 0; padding-top: 0; border-top: 0; font-size: 10px; line-height: 14px; white-space: nowrap; } .an-win b { font-size: 12px; } .an-win b.neg { font-size: 10.5px; }
  .an-plaque::before, .an-plaque::after { width: 12px; height: 12px; margin-top: -6px; } .an-plaque::before { left: -7px; } .an-plaque::after { right: -7px; }
  .an-rays { display: none; }
  .controls { gap: 5px 8px; padding: 5px 6px; border-radius: 12px; align-self: start; }
  .chip-tray { --chip: 34px; gap: 6px; padding: 4px 8px 6px; }
  .chip-btn b { font-size: 11px; }
  .chip-btn.active { transform: translateY(-4px) scale(1.08); }
  .chip-btn.active::before { bottom: -10px; width: 5px; height: 5px; }
  .ctrl-group { gap: 4px; flex-wrap: nowrap; width: 100%; }
  .ctl { flex: 1 1 0; flex-direction: column; gap: 1px; min-height: 36px; padding: 3px 2px; font-size: 9px; min-width: 0; border-radius: 8px; }
  .ctl svg { width: 13px; height: 13px; }
  .ctl.primary { flex: 1.5 1 0; min-width: 0; padding: 3px; font-size: 9.5px; letter-spacing: .3px; }
  .ltg-toggle { min-height: 30px; padding: 2px 6px 2px 8px; gap: 6px; border-radius: 10px; } .ltg-ic { font-size: 15px; } .ltg-txt small { display: none; }
  .ltg-sw { width: 34px; height: 18px; } .ltg-sw i { width: 12px; height: 12px; } .ltg-toggle.on .ltg-sw i { transform: translateX(16px); }
  .board { --cs-bead: 11; --cs-big: 10; padding: 5px 7px 6px; gap: 4px; border-radius: 12px; align-self: start; }
  .board-head, .road-tabs, .rd-eye, .rd-small, .rd-roach, .road-next, .road-cap, .ss-row, .ss-pairs { display: none !important; }
  .shoe-stats { gap: 0; }
  .toasts { bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .amb-rays, .amb-bokeh, .wall-fan, .wall-bokeh, .wall-spot, .dealer-body, .lc-arcs path, .cardw.ltg::after, .hand.win .halo, .spot.win .sec-glow, .lc.hit::after, .an-rays, .timer-ring.late .tr-pulse, .tbl.storm .storm-sky, .tbl.storm .dealer-flash, .tbl.storm::after, .road .ping { animation: none !important; }
  .lc-arcs path { opacity: .7; } .spot.win .sec-glow { opacity: .8; }
  .cardw.in .cfly, .cardw.in .card, .cardw.in::before, .cardw.out .cfly, .stack .chip.drop, .stack.land, .stack.swept, .an-plaque, .lc-card, .tbl.shake { animation-duration: .01s !important; animation-delay: 0s !important; }
  .stack.swept { opacity: 0; }
}
