/* POKER DES HYÈNES — casino de la savane, la nuit : feutre émeraude, or, cuir tacheté */
:root {
  --bg: #06110d;
  --bg2: #0b1d16;
  --panel: rgba(12, 28, 21, .88);
  --line: rgba(226, 181, 90, .28);
  --gold: #e2b55a;
  --gold2: #f5d78e;
  --cream: #f6efe1;
  --txt: #f2ede2;
  --muted: #9fb2a6;
  --red: #e0453d;
  --green: #4fd07a;
  --blue: #3fa3e0;
  --felt1: #13775a;
  --felt2: #0a4434;
  --cw: clamp(36px, 5.4vw, 74px);
  --hc: clamp(30px, 3.3vw, 44px);
  --sw: clamp(76px, 8.6vw, 112px);
  --av: clamp(44px, 5.2vw, 66px);
  --title: "Playfair Display", Georgia, serif;
  --ui: "Outfit", "Segoe UI", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--txt); font-family: var(--ui); }
body { overflow: hidden; overscroll-behavior: none; }
button { font-family: inherit; cursor: pointer; color: inherit; }
input { font-family: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.gold { color: var(--gold2); }

/* ---------------- boutons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(#1d3329, #12241c); border: 1.5px solid var(--line); color: var(--txt); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .1s, border-color .2s, background .2s; }
.btn:hover { border-color: var(--gold); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.gold { background: linear-gradient(180deg, #f5d78e, #d39f3c); color: #241605; border-color: #f9e2a4; font-weight: 800; box-shadow: 0 4px 16px rgba(226, 181, 90, .25); }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(224, 69, 61, .6); color: #ffb4ae; }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.wide { display: flex; width: 100%; margin: 8px 0; }
.icon { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; height: 38px; min-width: 38px; padding: 0 10px; font-size: 17px; display: inline-flex; align-items: center; gap: 6px; position: relative; }
.icon span { font-size: 13px; font-weight: 600; }
.icon:hover { border-color: var(--line); }
.icon.off { opacity: .55; }
.icon.on { border-color: var(--green); box-shadow: 0 0 0 2px rgba(79, 208, 122, .25) inset; }
.badge { position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
kbd { font-family: var(--ui); font-size: 10px; opacity: .55; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; margin-left: 8px; }
@media (pointer: coarse) { kbd { display: none; } }

/* ---------------- accueil ---------------- */
.screen { position: fixed; inset: 0; }
#home { overflow-y: auto; padding: 16px 16px 40px; }
.home-bg { position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 240, 200, .95) 0 38px, rgba(255, 230, 170, .25) 40px, transparent 130px),
    radial-gradient(ellipse at 50% 120%, #164f3b 0%, transparent 60%),
    linear-gradient(180deg, #050c14 0%, #0a1d24 45%, #0c2a1f 100%); }
.home-bg::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 10% 20%, #fff8, transparent), radial-gradient(1px 1px at 30% 8%, #fff9, transparent), radial-gradient(1.5px 1.5px at 55% 25%, #fffa, transparent), radial-gradient(1px 1px at 68% 40%, #fff7, transparent), radial-gradient(1px 1px at 88% 30%, #fff8, transparent), radial-gradient(1px 1px at 20% 45%, #fff6, transparent), radial-gradient(1.5px 1.5px at 42% 12%, #fff9, transparent); }
.home-bg::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; background: no-repeat bottom / 100% 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 180' preserveAspectRatio='none'%3E%3Cpath d='M0 140 Q150 120 300 135 T600 130 T900 138 T1200 128 V180 H0Z' fill='%23040a07'/%3E%3Cpath d='M905 136 L912 70 L918 136Z M880 72 Q915 50 960 70 Q990 62 1010 74 Q960 86 915 80 Q890 82 880 72Z' fill='%23040a07'/%3E%3Cpath d='M190 132 L195 92 L200 132Z M160 94 Q195 78 232 92 Q205 102 160 94Z' fill='%23040a07'/%3E%3C/svg%3E"); }
.home-head { max-width: 1040px; margin: 0 auto; position: relative; }
.back { color: var(--muted); text-decoration: none; font-size: 14px; }
.logo { text-align: center; margin: 12px 0 26px; }
.logo-emblem { width: 96px; height: 96px; margin: 0 auto -4px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .6)); animation: bob 2.6s ease-in-out infinite; }
.logo-emblem .hy-jaw { animation: jaw .18s infinite alternate; transform-box: fill-box; transform-origin: 50% 0; }
.logo h1 { font-family: var(--title); font-weight: 900; font-size: clamp(38px, 7vw, 72px); margin: 0; line-height: 1; letter-spacing: .5px; background: linear-gradient(180deg, #fff6dc, #e2b55a 60%, #a8742a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .55)); }
.logo h1 em { font-style: italic; font-size: .62em; }
.logo p { color: var(--muted); margin: 10px 0 0; }
.home-grid { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.1fr; gap: 18px; }
@media (max-width: 820px) { .home-grid { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 20px; backdrop-filter: blur(8px); box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.panel h2 { font-family: var(--title); font-weight: 900; color: var(--gold2); margin: 0 0 14px; font-size: 26px; }
.lbl { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin: 16px 0 6px; }
input[type=text], input:not([type]), input[type=number] { width: 100%; background: rgba(0, 0, 0, .35); border: 1.5px solid var(--line); color: var(--txt); border-radius: 12px; padding: 11px 13px; font-size: 16px; outline: none; }
input:focus { border-color: var(--gold); }
.face-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.face-grid.small { grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 12px 0; }
.face { position: relative; aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .12); background: #0a1510; padding: 0; overflow: visible; transition: transform .2s, border-color .2s, box-shadow .2s; }
.face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.face .mask { position: absolute; inset: -12% -4% 0; width: 108%; height: 108%; pointer-events: none; transition: opacity .25s, transform .25s; }
.face:hover .mask, .face.on .mask { opacity: 0; transform: translateY(-14px) scale(.8); }
.face:hover { transform: translateY(-3px); }
.face.on { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(226, 181, 90, .25), 0 10px 26px rgba(0, 0, 0, .5); transform: scale(1.05); }
.guest-card { border-style: dashed; display: grid; place-items: center; font-weight: 800; color: var(--muted); font-size: 14px; }
.guest-card.on { color: var(--gold2); }
.guest-box { margin-top: 14px; }
.guest-photo { display: flex; align-items: center; gap: 14px; }
.guest-preview { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 2px solid #c9ced6; flex: none; }
.guest-preview img { width: 100%; height: 100%; object-fit: cover; }
.initial { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--title); font-weight: 900; font-size: 1.6em; background: linear-gradient(135deg, #3b5a6e, #233645); color: #fff; }
.guest-photo-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 13px; }
.invited { background: linear-gradient(90deg, rgba(226, 181, 90, .18), transparent); border: 1px solid var(--gold); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.invited .btn { margin-left: auto; }
.table-list { display: flex; flex-direction: column; gap: 10px; }
.tbl { display: flex; align-items: center; gap: 14px; text-align: left; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; padding: 12px; transition: border-color .2s, transform .15s; }
.tbl:hover { border-color: var(--gold); transform: translateY(-2px); }
.tbl.main { background: linear-gradient(90deg, rgba(19, 119, 90, .3), rgba(255, 255, 255, .02)); }
.tbl-felt { width: 54px; height: 40px; border-radius: 50%; background: radial-gradient(ellipse, var(--felt1), var(--felt2)); border: 3px solid #5a3a20; display: grid; place-items: center; font-size: 18px; flex: none; }
.tbl-info { flex: 1; min-width: 0; }
.tbl-info b { font-family: var(--title); font-size: 18px; display: block; }
.tbl-info small { color: var(--muted); }
.tbl-faces { display: flex; margin-top: 5px; }
.tbl-faces img, .tbl-faces span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #0b1d16; margin-left: -5px; object-fit: cover; background: #2b4252; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.tbl-faces > :first-child { margin-left: 0; }
.tbl-go { font-weight: 800; color: var(--gold2); font-size: 14px; }
.create { margin-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; }
.create summary { cursor: pointer; font-weight: 700; color: var(--gold2); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.seg button { flex: 1; background: rgba(0, 0, 0, .3); border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 6px; font-weight: 700; }
.seg button.on { background: var(--gold); color: #241605; border-color: var(--gold2); }
.home-foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 26px; }

/* ---------------- table : structure ---------------- */
#game { display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 40%, #12291f 0%, #050d0a 75%); }
.topbar { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(6px + var(--safe-t)) 12px 6px; border-bottom: 1px solid rgba(226, 181, 90, .14); background: rgba(3, 9, 7, .6); }
.tinfo { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.topbar > .icon { flex: none; }
.tinfo b { font-family: var(--title); font-size: 18px; color: var(--gold2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tinfo span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tfair { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .05); color: var(--muted); white-space: nowrap; }
.tfair.ok { color: var(--green); background: rgba(79, 208, 122, .1); }
.tfair.ko { color: var(--red); background: rgba(224, 69, 61, .12); }
.spacer { flex: 1; }
.main { flex: 1; display: flex; min-height: 0; }
#stage { flex: 1; position: relative; min-width: 0; overflow: hidden; }

/* le feutre */
#felt { position: absolute; left: 10%; right: 10%; top: 15%; bottom: 15%; border-radius: 50%; }
#stage.portrait #felt { left: 15%; right: 15%; top: 11%; bottom: 13%; }
.rail { position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 12% 30%, #2a170b 0 5px, transparent 6px), radial-gradient(circle at 30% 8%, #2a170b 0 4px, transparent 5px),
    radial-gradient(circle at 70% 6%, #2a170b 0 5px, transparent 6px), radial-gradient(circle at 90% 34%, #2a170b 0 4px, transparent 5px),
    radial-gradient(circle at 88% 74%, #2a170b 0 5px, transparent 6px), radial-gradient(circle at 60% 95%, #2a170b 0 4px, transparent 5px),
    radial-gradient(circle at 25% 92%, #2a170b 0 5px, transparent 6px), radial-gradient(circle at 6% 66%, #2a170b 0 4px, transparent 5px),
    linear-gradient(160deg, #8a5a2c, #5c3818 45%, #3a2210);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), inset 0 3px 2px rgba(255, 220, 160, .35), inset 0 -6px 10px rgba(0, 0, 0, .5); }
.cloth { position: absolute; inset: clamp(10px, 2.4%, 22px); border-radius: 50%; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 255, 255, .1), transparent 60%),
    radial-gradient(circle at 20% 30%, rgba(0, 0, 0, .08) 0 9px, transparent 10px) 0 0 / 90px 70px,
    radial-gradient(circle at 70% 70%, rgba(0, 0, 0, .07) 0 6px, transparent 7px) 0 0 / 90px 70px,
    radial-gradient(ellipse at 50% 50%, var(--felt1), var(--felt2) 80%);
  box-shadow: inset 0 0 0 2px rgba(226, 181, 90, .6), inset 0 0 0 9px rgba(0, 0, 0, .18), inset 0 0 0 10px rgba(226, 181, 90, .25), inset 0 0 60px rgba(0, 0, 0, .55); }
.felt-logo { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); text-align: center; opacity: .16; pointer-events: none; }
.felt-emblem { width: clamp(60px, 9vw, 120px); margin: 0 auto; }
.felt-emblem svg { width: 100%; fill: #cfe9dc; display: block; }
.felt-name { font-family: var(--title); font-weight: 900; letter-spacing: 6px; font-size: clamp(14px, 2vw, 26px); color: #cfe9dc; }
#stage.portrait .felt-logo { top: 66%; }

#board { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; gap: calc(var(--cw) * .1); z-index: 2; }
.slot { width: var(--cw); aspect-ratio: .7; border-radius: calc(var(--cw) * .08); border: 1.5px dashed rgba(255, 255, 255, .1); }
#stage.portrait { --cw: clamp(34px, 11vw, 60px); }
#pot { position: absolute; left: 50%; top: calc(50% - var(--cw) * .78); transform: translate(-50%, -100%); display: none; flex-direction: column; align-items: center; gap: 3px; z-index: 2; }
#pot.on { display: flex; }
.pamt { background: rgba(0, 0, 0, .55); border: 1px solid var(--line); color: var(--gold2); font-weight: 800; font-size: 14px; padding: 2px 12px; border-radius: 999px; white-space: nowrap; }
.pside { display: flex; gap: 6px; font-size: 11px; color: var(--cream); }
.pside span { background: rgba(0, 0, 0, .4); border-radius: 8px; padding: 1px 6px; }
#dealer { position: absolute; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e8dfcc); color: #241605; font-weight: 900; font-family: var(--title); display: none; place-items: center; transform: translate(-50%, -50%); box-shadow: 0 3px 0 #9d8c6c, 0 6px 10px rgba(0, 0, 0, .5); transition: left .7s cubic-bezier(.5, 0, .3, 1), top .7s cubic-bezier(.5, 0, .3, 1); z-index: 3; font-size: 14px; }
#dealer.on { display: grid; }
#status { position: absolute; left: 50%; top: calc(50% + var(--cw) * .9); transform: translateX(-50%); background: rgba(0, 0, 0, .5); color: var(--cream); padding: 6px 16px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .3s; pointer-events: none; white-space: nowrap; z-index: 2; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
#status.on { opacity: 1; }
#status.warn { color: #ffcf8a; }

/* ---------------- cartes ---------------- */
.card { position: relative; width: var(--cw); aspect-ratio: .7; perspective: 600px; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, .7, .3, 1.2), filter .3s; transform: rotateY(180deg); flex: none; }
.card.up { transform: rotateY(0deg); }
.card .face { position: absolute; inset: 0; border-radius: 8%; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); overflow: hidden; }
.card .back { transform: rotateY(180deg); }
.card .back svg { width: 100%; height: 100%; display: block; }
.card .front { background: linear-gradient(160deg, #fffdf6, #efe6d2); color: #16110c; container-type: inline-size; }
.front .idx { position: absolute; left: 7%; top: 4%; display: flex; flex-direction: column; align-items: center; line-height: .9; }
.front .idx b { font-family: var(--title); font-weight: 900; font-size: 36cqw; letter-spacing: -1px; }
.front .idx i { font-style: normal; font-size: 28cqw; }
.front .idx.br { left: auto; top: auto; right: 7%; bottom: 4%; transform: rotate(180deg); }
.front .pip { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); font-size: 62cqw; line-height: 1; }
.front.s-h, .front.s-d { color: #c8102e; }
body.four .front.s-d { color: #1565c0; }
body.four .front.s-c { color: #1b7f3b; }
.card.win { transform: translateY(-10%); filter: drop-shadow(0 0 8px rgba(245, 215, 142, .95)); }
.card.dim { filter: brightness(.5) saturate(.6); }
.card.deal-hide { visibility: hidden; }

/* ---------------- places ---------------- */
#seats, #bets { position: absolute; inset: 0; pointer-events: none; }
.seat { position: absolute; width: var(--sw); transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; pointer-events: auto; z-index: 4; }
#stage.portrait { --sw: clamp(64px, 19vw, 92px); --av: clamp(40px, 12vw, 56px); --hc: clamp(26px, 8vw, 36px); }
.seat .hole { position: absolute; bottom: calc(100% - var(--av) * .55); display: flex; justify-content: center; pointer-events: none; z-index: 0; }
.seat .hole .card { width: var(--hc); margin: 0 calc(var(--hc) * -.14); }
.seat .hole .card:first-child { transform: rotate(-8deg) rotateY(180deg); }
.seat .hole .card:last-child { transform: rotate(8deg) rotateY(180deg); }
.seat .hole .card.up:first-child { transform: rotate(-8deg); }
.seat .hole .card.up:last-child { transform: rotate(8deg); }
.seat .hole .card.win.up:first-child { transform: rotate(-8deg) translateY(-14%); }
.seat .hole .card.win.up:last-child { transform: rotate(8deg) translateY(-14%); }
.seat.top .hole { bottom: auto; top: calc(100% + 2px); }
.seat.mine .hole { --hc: clamp(48px, 5.4vw, 78px); bottom: calc(100% - var(--av) * .25); }
#stage.portrait .seat.mine .hole { --hc: clamp(44px, 14vw, 66px); }
.seat.mine.folded .hole .card { filter: brightness(.45); }
.av-wrap { position: relative; width: var(--av); height: var(--av); z-index: 1; cursor: pointer; }
.av { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 3px solid #b8c0c8; background: #0a1510; box-shadow: 0 6px 16px rgba(0, 0, 0, .6); transition: box-shadow .2s, filter .3s, opacity .3s; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av .hyena { width: 100%; height: 100%; background: radial-gradient(circle, #2d4a3a, #10221a); }
.seat.hyene .av { border-color: var(--gold); box-shadow: 0 0 0 2px #5c3818, 0 6px 18px rgba(0, 0, 0, .6), 0 0 14px rgba(226, 181, 90, .35); }
.seat.is-bot .av { border-color: #a0754a; }
.crown { position: absolute; left: -8%; right: -8%; top: -30%; pointer-events: none; }
.crown .ears { width: 100%; display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); transition: transform .3s; }
.seat.acting .crown .ears, .seat.winner .crown .ears { animation: ears .5s ease-in-out infinite alternate; }
.guest-tag { position: absolute; left: 50%; top: calc(var(--av) * 1.05); transform: translateX(-50%); font-size: 9px; text-transform: uppercase; letter-spacing: 1px; background: #c9ced6; color: #1b232b; padding: 0 5px; border-radius: 4px; font-weight: 800; }
.ring { position: absolute; inset: -7px; width: calc(100% + 14px); height: calc(100% + 14px); transform: rotate(-90deg); pointer-events: none; }
.ring circle { fill: none; stroke-width: 5; }
.ring .track { stroke: transparent; }
.seat.acting .ring .track { stroke: rgba(0, 0, 0, .45); }
.ring .prog { stroke-dasharray: 100; stroke-linecap: round; opacity: 0; transition: stroke .3s; filter: drop-shadow(0 0 4px currentColor); }
.flags { position: absolute; right: -8px; bottom: -4px; font-size: 13px; display: flex; gap: 1px; }
.plate { margin-top: -9px; position: relative; z-index: 2; background: linear-gradient(#21160e, #0d0907); border: 1.5px solid rgba(226, 181, 90, .55); border-radius: 10px; padding: 2px 8px 3px; min-width: 84%; max-width: 100%; text-align: center; box-shadow: 0 4px 10px rgba(0, 0, 0, .55); }
.plate .nm { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cream); }
.plate .stk { font-size: 14px; font-weight: 800; color: var(--gold2); font-variant-numeric: tabular-nums; }
.plate .stk.up { animation: stkup .9s ease-out; }
.seat.guest .plate { border-color: rgba(201, 206, 214, .5); }
.tag { position: absolute; top: calc(var(--av) * -.05); left: calc(50% + var(--av) * .42); font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #34433b; color: #fff; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s cubic-bezier(.3, .7, .3, 1.5); white-space: nowrap; z-index: 3; box-shadow: 0 3px 8px rgba(0, 0, 0, .4); }
.tag.on { opacity: 1; transform: scale(1); }
.tag.t-suit { background: #2b74b5; }
.tag.t-relance, .tag.t-mise { background: #d27b1e; }
.tag.t-tapis { background: var(--red); animation: pulse .8s infinite; }
.tag.t-couch { background: #1b1b1b; color: #999; }
.tag.t-sb, .tag.t-bb { background: #46544c; }
.tag.t-gagne { background: linear-gradient(#f5d78e, #d39f3c); color: #241605; }
.best { margin-top: 3px; font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, .7); color: var(--gold2); padding: 1px 7px; border-radius: 8px; white-space: nowrap; opacity: 0; transition: opacity .3s; z-index: 2; }
.best.on { opacity: 1; }
.eq { position: absolute; top: calc(var(--av) * .3); right: calc(50% + var(--av) * .55); font-size: 12px; font-weight: 800; background: #fff; color: #10221a; padding: 1px 6px; border-radius: 8px; opacity: 0; transition: opacity .3s; z-index: 3; }
.eq.on { opacity: 1; }
.seat.folded .av { filter: grayscale(.9) brightness(.55); }
.seat.folded .plate { opacity: .7; }
.seat.out .av { filter: grayscale(.6) brightness(.7); }
.seat.acting .av { box-shadow: 0 0 0 3px rgba(245, 215, 142, .9), 0 0 26px rgba(245, 215, 142, .6); }
.seat.winner .av { box-shadow: 0 0 0 4px #f5d78e, 0 0 40px rgba(245, 215, 142, .9); animation: winpulse 1s ease-in-out infinite alternate; }
.seat.speaking .av { box-shadow: 0 0 0 4px var(--green), 0 0 22px rgba(79, 208, 122, .8); }
.seat.allin .plate { border-color: var(--red); }
.seat.dc .av { opacity: .55; }
.sit-btn { display: none; width: var(--av); height: var(--av); border-radius: 50%; border: 2px dashed rgba(226, 181, 90, .55); background: rgba(0, 0, 0, .35); color: var(--gold2); flex-direction: column; align-items: center; justify-content: center; line-height: 1; transition: transform .15s, background .2s; }
.sit-btn span { font-size: 22px; font-weight: 300; }
.sit-btn small { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.sit-btn:hover { transform: scale(1.08); background: rgba(226, 181, 90, .15); }
.seat.empty > :not(.sit-btn) { display: none; }
.seat.empty .sit-btn { display: flex; }
#stage.seated .seat.empty { display: none; }

/* mises et jetons */
.bet { position: absolute; transform: translate(-50%, -50%); display: none; flex-direction: column; align-items: center; gap: 2px; z-index: 3; }
.bet.on { display: flex; }
.bet.arriving { visibility: hidden; }
.bamt { background: rgba(0, 0, 0, .6); color: var(--cream); font-weight: 700; font-size: 12px; padding: 0 7px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.chips { display: flex; gap: 2px; align-items: flex-end; }
.chips .col { display: flex; flex-direction: column-reverse; }
.chip { width: var(--cs); height: var(--cs); display: block; margin-top: calc(var(--cs) * -.84); filter: drop-shadow(0 1.5px 0 rgba(0, 0, 0, .55)); }
.chips .col .chip:first-child { margin-top: 0; }

/* ---------------- effets ---------------- */
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.flying { position: absolute; left: 0; top: 0; will-change: transform; }
.fly-card { width: var(--w, var(--hc)); }
.fly-card .card { width: 100%; }
#banner { position: absolute; left: 50%; top: calc(50% - var(--cw) * .75); transform: translate(-50%, calc(-100% - 20px)); background: linear-gradient(180deg, rgba(20, 12, 4, .92), rgba(8, 5, 2, .92)); border: 1.5px solid var(--gold); color: var(--cream); padding: 10px 22px; border-radius: 16px; font-size: 18px; text-align: center; opacity: 0; transition: opacity .3s, transform .4s cubic-bezier(.3, .7, .3, 1.4); pointer-events: none; z-index: 21; max-width: 92%; box-shadow: 0 12px 40px rgba(0, 0, 0, .6); }
#banner.show { opacity: 1; transform: translate(-50%, -100%); }
#banner b { font-family: var(--title); font-size: 1.1em; }
#banner .gold { font-weight: 800; }
#banner small { display: block; color: var(--gold2); font-size: 13px; margin-top: 2px; letter-spacing: .5px; }
.stamp { position: absolute; transform: translate(-50%, -50%) rotate(-12deg); font-family: var(--title); font-weight: 900; font-style: italic; font-size: 34px; color: var(--red); border: 4px solid var(--red); border-radius: 10px; padding: 0 12px; background: rgba(255, 255, 255, .08); text-shadow: 0 2px 0 rgba(0, 0, 0, .4); animation: stamp 1.8s ease-out forwards; white-space: nowrap; }
.stamp.big { font-size: 54px; }
.stamp.bluff { color: #c48bff; border-color: #c48bff; }
.confetto { position: absolute; width: 7px; height: 11px; border-radius: 2px; }
.float-emo { position: absolute; font-size: 34px; }
.say { position: absolute; transform: translate(-50%, -100%); background: var(--cream); color: #1a120a; padding: 6px 10px; border-radius: 12px; font-size: 13px; max-width: 180px; box-shadow: 0 6px 16px rgba(0, 0, 0, .5); transition: opacity .4s; animation: pop .3s cubic-bezier(.3, .7, .3, 1.5); }
.say::after { content: ""; position: absolute; left: 50%; bottom: -6px; border: 6px solid transparent; border-top-color: var(--cream); border-bottom: 0; transform: translateX(-50%); }
.say .gif, .say .hygif { width: 120px; }
.say.out { opacity: 0; }
.laugh-pop { position: absolute; width: 130px; transform: translate(-50%, -105%); animation: pop .45s cubic-bezier(.3, .7, .3, 1.5); transition: opacity .5s, transform .5s; z-index: 22; }
.laugh-pop.big { width: 190px; }
.laugh-pop.out { opacity: 0; transform: translate(-50%, -140%) scale(.8); }
.laugh-pop .gif { width: 100%; border-radius: 14px; border: 3px solid #1a0e06; box-shadow: 0 10px 26px rgba(0, 0, 0, .6); display: block; background: #000; }
.laugh-pop.labeled .hytxt { display: none; }
.laugh-label { margin-top: 4px; text-align: center; font-family: var(--title); font-weight: 900; font-style: italic; color: var(--gold2); text-shadow: 0 2px 0 #000, 0 0 10px #000; font-size: 18px; }

/* hyènes animées maison */
.hygif { position: relative; width: 100%; aspect-ratio: 1; }
.hygif .hyena { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.hy-jaw, .hy-ear, .hy-head { transform-box: fill-box; }
.hy-jaw { transform-origin: 50% 0; animation: jaw .15s ease-in-out infinite alternate; }
.hy-ear-l { transform-origin: 80% 100%; animation: earl .4s ease-in-out infinite alternate; }
.hy-ear-r { transform-origin: 20% 100%; animation: earr .4s ease-in-out infinite alternate; }
.hy-tears { opacity: 0; }
.hytxt { position: absolute; left: 50%; bottom: -4%; transform: translateX(-50%) rotate(-6deg); font-family: var(--title); font-weight: 900; font-style: italic; font-size: clamp(14px, 1.6vw, 22px); color: #ffd23f; -webkit-text-stroke: 1.5px #1a0e06; paint-order: stroke fill; white-space: nowrap; text-shadow: 0 3px 0 #1a0e06; animation: txt .3s ease-in-out infinite alternate; }
.v-laugh .hyena { animation: bob .28s ease-in-out infinite alternate; }
.v-roll .hyena { animation: roll 1s linear infinite; }
.v-cry .hyena { animation: shake .12s linear infinite; }
.v-cry .hy-tears { opacity: 1; }
.v-point .hyena { animation: lean .5s ease-in-out infinite alternate; }
.v-bounce .hyena { animation: bounce .45s cubic-bezier(.3, 0, .6, 1) infinite alternate; }
.v-spin .hyena { animation: spiny 1.2s linear infinite; }
.tear { position: absolute; width: 9%; height: 12%; background: #7fd3ff; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; top: 44%; opacity: 0; }
.tear.t1 { left: 22%; animation: tearl 0.7s ease-in infinite; }
.tear.t2 { left: 22%; animation: tearl 0.7s ease-in .35s infinite; }
.tear.t3 { right: 22%; animation: tearr 0.7s ease-in .15s infinite; }
.tear.t4 { right: 22%; animation: tearr 0.7s ease-in .5s infinite; }

.storm { position: fixed; inset: 0; z-index: 60; background: radial-gradient(circle, rgba(40, 8, 8, .65), rgba(0, 0, 0, .85)); display: grid; place-items: center; animation: fadein .3s; transition: opacity .6s; cursor: pointer; }
.storm.out { opacity: 0; }
.storm-card { text-align: center; animation: pop .5s cubic-bezier(.3, .7, .3, 1.5); max-width: 92vw; }
.storm-face { width: 110px; height: 110px; margin: 0 auto -20px; border-radius: 50%; overflow: hidden; border: 4px solid var(--red); position: relative; z-index: 2; animation: shake .15s linear infinite; filter: grayscale(.4); }
.storm-face > * { width: 100%; height: 100%; object-fit: cover; }
.storm-gif { width: min(280px, 70vw); margin: 0 auto; }
.storm-gif .gif { width: 100%; border-radius: 18px; border: 4px solid #000; box-shadow: 0 20px 60px rgba(0, 0, 0, .8); }
.storm-title { font-family: var(--title); font-weight: 900; font-style: italic; font-size: clamp(42px, 9vw, 86px); color: var(--red); -webkit-text-stroke: 2px #ffd23f; paint-order: stroke fill; text-shadow: 0 6px 0 #000; line-height: 1; margin-top: 8px; animation: txt .25s ease-in-out infinite alternate; }
.storm-sub { color: var(--cream); font-size: 18px; margin-top: 8px; }
.pack { position: absolute; width: clamp(80px, 12vw, 140px); }
.pack .hytxt, .storm-gif .hytxt { display: none; }
.pack.p0 { left: 3%; top: 8%; transform: rotate(-12deg); } .pack.p1 { right: 4%; top: 6%; transform: rotate(10deg); }
.pack.p2 { left: 6%; bottom: 10%; transform: rotate(8deg); } .pack.p3 { right: 6%; bottom: 8%; transform: rotate(-10deg); }
.pack.p4 { left: 42%; top: 2%; } .pack.p5 { left: 18%; top: 42%; } .pack.p6 { right: 16%; top: 40%; }
body.shake #game { animation: screenshake .6s; }

/* ---------------- chat ---------------- */
#chat { width: 320px; flex: none; display: flex; flex-direction: column; background: rgba(4, 11, 8, .82); border-left: 1px solid rgba(226, 181, 90, .14); min-height: 0; }
.chat-toggle, .only-mobile { display: none; }
.chat-head { padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .06); display: flex; align-items: flex-start; gap: 8px; }
.watchers { flex: 1; min-width: 0; }
.watchers small { color: var(--muted); font-size: 11px; }
.w-list { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.w { position: relative; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; border: 2px solid rgba(255, 255, 255, .15); display: grid; place-items: center; background: #2b4252; font-size: 12px; font-weight: 800; transition: box-shadow .15s; }
.w.seated { border-color: var(--gold); }
.w img { width: 100%; height: 100%; object-fit: cover; }
.w i { position: absolute; right: -2px; bottom: -3px; font-size: 10px; font-style: normal; }
.w.speaking { box-shadow: 0 0 0 3px var(--green); }
#chat-log { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.msg { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.msg.sys { color: var(--muted); font-size: 12px; font-style: italic; padding-left: 4px; border-left: 2px solid rgba(226, 181, 90, .3); }
.m-av { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex: none; background: #2b4252; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.m-av img { width: 100%; height: 100%; object-fit: cover; }
.m-body { min-width: 0; }
.m-body b { font-size: 12px; color: var(--gold2); }
.msg.guest .m-body b { color: #c9ced6; }
.m-body p { margin: 1px 0 0; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.me .m-body p { color: #dff5e7; }
.m-gif { width: 150px; margin-top: 3px; }
.m-gif .gif { width: 100%; border-radius: 10px; display: block; }
.reacts { display: flex; gap: 4px; padding: 6px 10px; border-top: 1px solid rgba(255, 255, 255, .06); }
.reacts button { background: rgba(255, 255, 255, .05); border: 0; border-radius: 8px; font-size: 18px; padding: 4px 6px; flex: 1; transition: transform .1s; }
.reacts button:active { transform: scale(1.3); }
.gif-btn { font-size: 12px !important; font-weight: 900; color: var(--gold2); }
.gif-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 10px; max-height: 260px; overflow-y: auto; border-top: 1px solid rgba(255, 255, 255, .06); }
.gif-picker button { background: rgba(255, 255, 255, .04); border: 1px solid transparent; border-radius: 10px; padding: 4px; aspect-ratio: 1; overflow: hidden; }
.gif-picker button:hover { border-color: var(--gold); }
.gif-picker .gif { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.gif-picker .hytxt { font-size: 10px; -webkit-text-stroke: 1px #1a0e06; }
.gif-picker p { grid-column: 1 / -1; margin: 4px 0 0; }
#chat-form { display: flex; gap: 6px; padding: 8px 10px calc(10px + var(--safe-b)); }
#chat-form input { flex: 1; padding: 9px 12px; font-size: 15px; }

/* ---------------- barre d'action ---------------- */
#actionbar { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 14px calc(10px + var(--safe-b)); min-height: 74px; background: linear-gradient(180deg, rgba(3, 9, 7, .2), rgba(3, 9, 7, .95)); border-top: 1px solid rgba(226, 181, 90, .14); transition: box-shadow .3s; }
body.my-turn #actionbar { box-shadow: 0 -10px 40px rgba(226, 181, 90, .18); border-top-color: var(--gold); }
.bar-row { flex: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 15px; }
.chk { display: inline-flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); padding: 9px 12px; border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 14px; }
.chk input { accent-color: var(--gold); width: 17px; height: 17px; }
.chk:has(input:checked) { border-color: var(--gold); background: rgba(226, 181, 90, .12); }
#bar-act { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; }
.raise-box { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.presets { display: flex; gap: 5px; flex-wrap: wrap; }
.presets button { flex: 1; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 9px; padding: 5px 4px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.presets button.on, .presets button:hover { border-color: var(--gold); color: var(--gold2); }
.slider-row { display: flex; align-items: center; gap: 6px; }
.step { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); font-size: 18px; flex: none; }
#raise-range { flex: 1; accent-color: var(--gold); min-width: 0; height: 28px; }
#raise-in { width: 96px; padding: 6px 8px; font-size: 15px; text-align: right; flex: none; }
.act-btns { display: flex; gap: 8px; flex: none; }
.act { min-width: 118px; height: 54px; border-radius: 14px; border: 0; font-weight: 800; font-size: 16px; padding: 0 14px; color: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .08s, filter .2s; white-space: nowrap; }
.act:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .45); }
.act:hover { filter: brightness(1.1); }
.act.fold { background: linear-gradient(#8e2a25, #5e1814); }
.act.call { background: linear-gradient(#2d8a5e, #1b5c3d); }
.act.call.check { background: linear-gradient(#3b6f8f, #23485e); }
.act.raise { background: linear-gradient(#f5d78e, #c98f2c); color: #241605; }
.act.raise.allin { background: linear-gradient(#ff6b5a, #b8261d); color: #fff; animation: pulse .9s infinite; }
.bar-side { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.laugh-btn { background: radial-gradient(circle at 40% 30%, #ffd98a, #c98f2c); border: 2px solid #1a0e06; width: 54px; height: 54px; border-radius: 50%; font-size: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 4px 0 #1a0e06; transition: transform .1s; }
.laugh-btn span { font-size: 9px; font-weight: 800; color: #241605; text-transform: uppercase; margin-top: 1px; }
.laugh-btn:active { transform: translateY(3px) rotate(-10deg); box-shadow: 0 1px 0 #1a0e06; }

/* ---------------- fenêtres ---------------- */
.modal { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fadein .2s; }
.sheet { position: relative; background: linear-gradient(180deg, #13281f, #0b1813); border: 1.5px solid var(--line); border-radius: 20px; padding: 22px; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); animation: pop .3s cubic-bezier(.3, .7, .3, 1.3); }
.modal[data-kind=hist] .sheet, .modal[data-kind=ledger] .sheet { max-width: 620px; }
.sheet .close { position: absolute; top: 12px; right: 12px; background: none; border: 0; font-size: 18px; color: var(--muted); }
.sheet h3 { font-family: var(--title); font-weight: 900; color: var(--gold2); font-size: 24px; margin: 0 0 8px; padding-right: 26px; }
.sheet h4 { font-family: var(--title); color: var(--gold2); margin: 18px 0 6px; }
.sheet p { line-height: 1.45; }
.buy-amt { font-family: var(--title); font-weight: 900; font-size: 46px; text-align: center; color: var(--gold2); margin: 8px 0; }
.buy-amt small { display: block; font-family: var(--ui); font-size: 15px; color: var(--muted); font-weight: 600; }
.sheet input[type=range] { width: 100%; accent-color: var(--gold); margin: 6px 0 12px; }
.sheet .presets { margin-bottom: 12px; }
.pl-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.pl-av { width: 70px; height: 70px; border-radius: 50%; overflow: hidden; border: 3px solid #c9ced6; flex: none; }
.pl-av.hyene { border-color: var(--gold); }
.pl-av img, .pl-av svg, .pl-av .initial { width: 100%; height: 100%; object-fit: cover; }
.pl-head h3 { margin: 0; }
.pl-head p { margin: 2px 0 0; color: var(--muted); }
.invite-link { display: flex; gap: 8px; margin: 12px 0; }
.invite-link input { font-size: 14px; }
.invite-share .btn { margin: 6px 0; }
.code { font-family: monospace; letter-spacing: 3px; color: var(--gold2); font-size: 16px; }
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
.ledger th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.ledger td { padding: 7px 4px; border-bottom: 1px solid rgba(255, 255, 255, .05); font-variant-numeric: tabular-nums; }
.ledger td img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; display: block; }
.ledger tr.pos td:last-child { color: var(--green); }
.ledger tr.neg td:last-child { color: #ff8a80; }
.settle { padding-left: 18px; line-height: 1.8; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.form label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.form label.full { grid-column: 1 / -1; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.row .btn { flex: 1; }
.fair-box { background: rgba(79, 208, 122, .07); border: 1px solid rgba(79, 208, 122, .3); border-radius: 14px; padding: 12px 14px; margin: 10px 0 14px; font-size: 13px; }
.fair-box p { margin: 6px 0 0; color: #cfe3d6; }
.hist { border-top: 1px solid rgba(255, 255, 255, .07); padding: 10px 0; font-size: 13px; }
.hist-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hist-top .board { margin-left: auto; }
.hist .ok { color: var(--green); } .hist .ko { color: var(--red); }
.hist-pl { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.hist-pl .pos b { color: var(--green); } .hist-pl .neg b { color: #ff8a80; }
.hist details { margin-top: 6px; color: var(--muted); }
.hist code { display: block; font-size: 10px; word-break: break-all; margin-top: 4px; color: #9fb2a6; }
.mini { display: inline-block; background: var(--cream); color: #111; border-radius: 4px; padding: 0 3px; margin: 0 1px; font-weight: 800; font-size: 12px; }
.mini.s-h, .mini.s-d { color: #c8102e; }

#toast { position: fixed; left: 50%; bottom: 110px; transform: translate(-50%, 20px); background: rgba(10, 20, 15, .95); border: 1px solid var(--gold); color: var(--cream); padding: 10px 18px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 80; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- téléphone ---------------- */
@media (max-width: 900px) {
  .chat-toggle, .only-mobile { display: inline-flex; }
  #chat { position: fixed; right: 0; top: 0; bottom: 0; width: min(340px, 88vw); z-index: 50; transform: translateX(105%); transition: transform .3s cubic-bezier(.3, .7, .3, 1); box-shadow: -20px 0 60px rgba(0, 0, 0, .6); padding-top: var(--safe-t); background: rgba(4, 11, 8, .97); }
  body.chat-open #chat { transform: none; }
  .icon span { display: none; }
  .topbar { gap: 5px; padding-left: 8px; padding-right: 8px; }
  .icon { height: 34px; min-width: 34px; padding: 0 7px; font-size: 15px; }
  .tfair { display: none; }
  .tinfo b { font-size: 15px; }
}
@media (max-width: 520px) {
  .spacer { flex: 0; }
  .tinfo { flex: 1 1 auto; }
  .tinfo span { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
  #btn-hist, #btn-sound { display: none; }
  .icon { height: 32px; min-width: 32px; padding: 0 5px; font-size: 14px; border-radius: 10px; }
  .topbar { gap: 4px; }
}
@media (max-width: 640px) {
  #actionbar { flex-wrap: wrap; gap: 8px; padding: 8px 10px calc(8px + var(--safe-b)); }
  #bar-act { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
  .act-btns { width: 100%; }
  .act { flex: 1; min-width: 0; height: 50px; font-size: 14px; padding: 0 6px; }
  .bar-side { position: absolute; right: 10px; bottom: calc(100% + 10px); }
  #actionbar { position: relative; }
  .laugh-btn { width: 48px; height: 48px; font-size: 21px; }
  #btn-me { display: none; }
  #raise-in { width: 78px; }
  .chk { padding: 8px 10px; font-size: 13px; }
  #banner { font-size: 15px; padding: 8px 14px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .topbar { padding-top: 3px; padding-bottom: 3px; }
  #actionbar { min-height: 0; padding-top: 6px; padding-bottom: calc(6px + var(--safe-b)); }
  .act { height: 44px; }
  .presets button { padding: 3px; }
  #felt { top: 17%; bottom: 17%; }
}

/* ---------------- animations ---------------- */
@keyframes jaw { from { transform: scaleY(.45); } to { transform: scaleY(1.15); } }
@keyframes earl { from { transform: rotate(-6deg); } to { transform: rotate(8deg); } }
@keyframes earr { from { transform: rotate(6deg); } to { transform: rotate(-8deg); } }
@keyframes ears { from { transform: translateY(0) scaleY(1); } to { transform: translateY(-3px) scaleY(1.08); } }
@keyframes bob { from { transform: translateY(0) rotate(-5deg); } to { transform: translateY(-6%) rotate(5deg); } }
@keyframes roll { from { transform: translateX(-10%) rotate(0); } 50% { transform: translateX(10%) rotate(180deg); } to { transform: translateX(-10%) rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-3%, 1%); } 75% { transform: translate(3%, -1%); } }
@keyframes lean { from { transform: rotate(-14deg) translateX(-6%); } to { transform: rotate(10deg) translateX(6%) scale(1.06); } }
@keyframes bounce { from { transform: translateY(0) scale(1.08, .9); } to { transform: translateY(-18%) scale(.95, 1.06); } }
@keyframes spiny { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
@keyframes txt { from { transform: translateX(-50%) rotate(-6deg) scale(1); } to { transform: translateX(-50%) rotate(-2deg) scale(1.1); } }
@keyframes tearl { 0% { opacity: 1; transform: translate(0, 0); } 100% { opacity: 0; transform: translate(-160%, 220%); } }
@keyframes tearr { 0% { opacity: 1; transform: translate(0, 0); } 100% { opacity: 0; transform: translate(160%, 220%); } }
@keyframes pop { from { transform: translate(-50%, -105%) scale(.3); opacity: 0; } }
.storm-card, .sheet { --x: 0; }
.storm-card { animation-name: pop2; } .sheet { animation-name: pop2; }
@keyframes pop2 { from { transform: scale(.6); opacity: 0; } }
.say { animation-name: popsay; }
@keyframes popsay { from { transform: translate(-50%, -100%) scale(.4); opacity: 0; } }
@keyframes fadein { from { opacity: 0; } }
@keyframes stamp { 0% { transform: translate(-50%, -50%) rotate(-12deg) scale(3); opacity: 0; } 12% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(1.05); } }
@keyframes pulse { 50% { filter: brightness(1.3); transform: scale(1.04); } }
@keyframes winpulse { from { filter: brightness(1); } to { filter: brightness(1.2); } }
@keyframes stkup { 0% { color: #fff; transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes screenshake { 0%, 100% { transform: none; } 20% { transform: translate(-8px, 4px); } 40% { transform: translate(7px, -5px); } 60% { transform: translate(-5px, 3px); } 80% { transform: translate(4px, -2px); } }
@media (prefers-reduced-motion: reduce) { .hyena, .hy-jaw, .hytxt { animation-duration: 1.5s !important; } body.shake #game { animation: none; } }

.btn.demo { margin: 0 0 12px; font-size: 16px; padding: 14px; }

/* ---------------- salle d'attente, éliminés, fin de partie ---------------- */
#stage:not(.lobby) .seat.empty { display: none; }
.seat.elim .av { filter: grayscale(1) brightness(.5); }
.seat.elim .plate { opacity: .75; border-color: rgba(255, 255, 255, .2); }
.seat.elim .plate .stk { color: #ff9b94; font-size: 12px; }
.lobby { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; width: min(430px, 78%); background: rgba(5, 14, 10, .82); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px 14px; text-align: center; box-shadow: 0 16px 50px rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.lobby h3 { font-family: var(--title); font-weight: 900; color: var(--gold2); margin: 0 0 8px; font-size: 22px; }
.lb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.lb-grid > div { background: rgba(255, 255, 255, .05); border-radius: 12px; padding: 7px 8px; }
.lb-grid small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.lb-grid b { font-size: 17px; color: var(--cream); }
.lb-grid i { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.lb-who { margin: 4px 0 10px; color: var(--cream); }
.lb-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.lb-btns .go { flex: 1 1 100%; font-size: 17px; padding: 12px; }
.lb-btns .btn:disabled { opacity: .45; }
#stage.portrait .lobby { top: 46%; width: 86%; padding: 10px 12px; }
#stage.portrait .lb-grid b { font-size: 15px; }
.ladder { font-size: 11px; color: var(--muted); margin: 0 0 8px; line-height: 1.5; }
.over-head { text-align: center; margin-bottom: 10px; }
.over-head .trophy { font-size: 54px; animation: bob .9s ease-in-out infinite alternate; display: inline-block; }
.podium { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.pod { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .05); border-radius: 12px; padding: 7px 10px; }
.pod.first { background: linear-gradient(90deg, rgba(245, 215, 142, .28), rgba(255, 255, 255, .04)); border: 1px solid var(--gold); }
.pod .rk { width: 38px; font-family: var(--title); font-weight: 900; font-size: 18px; color: var(--gold2); }
.pod .pa { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: none; background: #2b4252; display: grid; place-items: center; font-weight: 800; }
.pod .pa img { width: 100%; height: 100%; object-fit: cover; }
.pod .pn { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .pg { font-weight: 800; }
.pod .pg.pos { color: var(--green); } .pod .pg.neg { color: #ff8a80; }
.pod small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.sheet .seg-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.sheet .seg-row button { flex: 1; background: rgba(0, 0, 0, .3); border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 4px; font-weight: 700; font-size: 13px; }
.sheet .seg-row button:hover { border-color: var(--gold); }
.sheet select { width: 100%; background: rgba(0, 0, 0, .35); border: 1.5px solid var(--line); color: var(--txt); border-radius: 12px; padding: 10px 12px; font-size: 15px; font-family: inherit; }
.sheet input:disabled, .sheet select:disabled { opacity: .45; }
.form .full small, .sheet .note { color: var(--muted); font-size: 12px; }
