/* Bito : drap anthracite, cartes ivoire, un seul accent vert acide pour ce qui est jouable.
   Contrainte : pas de cartes d'interface arrondies, des filets ; l'arrondi est réservé aux cartes à jouer. */
:root {
  --bg: #1c1d21;
  --bg2: #24262b;
  --felt: #2a2c31;
  --felt2: #1f2024;
  --ink: #f2efe8;
  --muted: #a4a29c;
  --line: #3a3c42;
  --accent: #c8e64a;
  --accent-ink: #1a1c10;
  --red: #c4302b;
  --blk: #1c1c22;
  --paper: #fbf8f1;
  --team0: #5ab0ff;
  --team1: #ff8a5c;
  --coin: #e9c46a;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Charter, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  --cw: clamp(46px, min(16.5vw, 10.5dvh), 100px);
  --ch: calc(var(--cw) * 1.4);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--ink); font: 17px/1.5 var(--sans);
  padding: var(--sat) var(--sar) var(--sab) var(--sal);
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
  overscroll-behavior: none; overflow-x: hidden;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }
.muted { color: var(--muted); }

/* Barre */
.bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px; border-bottom: 1px solid var(--line); min-height: 56px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 6px 2px; min-height: 44px; font: 600 22px/1 var(--serif); }
.brand-mark { width: 18px; height: 25px; border-radius: 3px; background: var(--paper); box-shadow: 5px -3px 0 -1px var(--accent); transform: rotate(-8deg); }
.bar-right { display: flex; align-items: center; gap: 10px; }
.net-dot { width: 9px; height: 9px; border-radius: 50%; background: #6b6d73; }
.net-dot.open { background: var(--accent); }
.net-dot.connecting { background: var(--coin); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.coins { display: flex; align-items: center; gap: 7px; background: none; border: 1px solid var(--line); min-height: 40px; padding: 0 12px; font-variant-numeric: tabular-nums; }
.coin { display: inline-block; width: .9em; height: .9em; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fbe7a6, var(--coin) 55%, #a8812c); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .25); vertical-align: -.1em; margin-right: .3em; }
.coin.big { width: 30px; height: 30px; margin: 0; }
.icon-btn { width: 44px; height: 44px; background: none; border: 1px solid var(--line); display: grid; place-items: center; }
.icon-btn svg, .back svg, .tb-btn svg, .menu-item svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

main { max-width: 720px; margin: 0 auto; padding: 0 16px 40px; }

/* Accueil */
.home { padding-top: 18px; }
.home-top { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding: 18px 0 26px; border-bottom: 1px solid var(--line); }
.hero-fan { position: relative; width: 150px; height: 130px; --cw: 70px; }
.hero-fan .card { position: absolute; left: 40px; top: 12px; transform-origin: 50% 110%; }
.hero-fan .f0 { transform: rotate(-16deg) translateX(-14px); }
.hero-fan .f1 { transform: rotate(0deg) translateY(-6px); z-index: 2; }
.hero-fan .f2 { transform: rotate(16deg) translateX(14px); z-index: 3; }
.title { font-size: clamp(46px, 12vw, 72px); letter-spacing: -.02em; line-height: 1; }
.tagline { color: var(--muted); margin: 8px 0 0; max-width: 30ch; }
.me-strip { display: flex; align-items: center; gap: 14px; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 16px 0; text-align: left; }
.me-txt { flex: 1; display: flex; flex-direction: column; }
.me-txt small { color: var(--muted); }
.me-coins { font-variant-numeric: tabular-nums; font-weight: 600; }
.av-wrap { display: inline-block; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: none; background: var(--bg2); }
.av-wrap .av { width: 100%; height: 100%; display: block; }
.av-wrap.sm { width: 30px; height: 30px; }
.av-wrap.lg { width: 64px; height: 64px; }
.av-wrap.xl { width: 88px; height: 88px; }
.av-wrap.ph { border: 1.5px dashed var(--line); background: none; }
.daily { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 14px; padding: 14px 16px; background: var(--bg2); border: 1px solid var(--coin); text-align: left; }
.daily span:last-child { display: flex; flex-direction: column; }
.daily small { color: var(--muted); }
.menu { margin-top: 10px; }
.menu-item { display: flex; align-items: center; width: 100%; gap: 12px; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 20px 0; text-align: left; }
.menu-item span { flex: 1; display: flex; flex-direction: column; }
.menu-item b { font: 600 25px/1.2 var(--serif); }
.menu-item small { color: var(--muted); font-size: 15px; }
.menu-item.primary b { color: var(--accent); }
.menu-small { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 20px 0; }
.menu-small button { background: none; border: 0; padding: 8px 0; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; min-height: 44px; }

/* Écrans */
.scr { padding-top: 8px; padding-bottom: 90px; }
.scr-head { display: flex; align-items: center; gap: 8px; padding: 14px 0 12px; }
.scr-head h1 { font-size: 30px; }
.back { width: 44px; height: 44px; margin-left: -10px; background: none; border: 0; display: grid; place-items: center; }
.block { border-top: 1px solid var(--line); padding: 16px 0 18px; }
.block h2 { font-size: 21px; margin-bottom: 12px; }
.h-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.h-row h2 { margin: 0; }
.field-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 8px 0; }
.lbl { color: var(--muted); font-size: 15px; }
.seg { display: inline-flex; border: 1px solid var(--line); flex-wrap: wrap; max-width: 100%; }
.seg button { min-height: 42px; min-width: 44px; padding: 0 13px; background: none; border: 0; border-right: 1px solid var(--line); font-size: 15px; }
.seg button:last-child { border-right: 0; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); font-weight: 600; }
.help { color: var(--muted); font-size: 15px; margin: 4px 0 8px; max-width: 62ch; }
.help.small { font-size: 13px; }
.center { text-align: center; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check span { display: flex; flex-direction: column; }
.check small { color: var(--muted); font-size: 14px; }
.check.sw { justify-content: space-between; flex-direction: row-reverse; align-items: center; border-bottom: 1px solid var(--line); }
.sel { background: var(--bg2); border: 1px solid var(--line); min-height: 44px; padding: 0 10px; }
.btn { min-height: 48px; padding: 0 20px; background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 650; letter-spacing: .01em; }
.btn.ghost { background: none; color: var(--ink); border: 1px solid var(--line); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn.big { width: 100%; min-height: 56px; font-size: 18px; margin-top: 12px; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + var(--sab)); background: linear-gradient(transparent, var(--bg) 35%); }
.sticky-cta .btn { max-width: 688px; margin: 0 auto; display: block; }
details.opts { border-top: 1px dashed var(--line); margin-top: 8px; }
details.opts summary { padding: 12px 0; cursor: pointer; }
details.opts summary small { color: var(--muted); display: block; font-size: 14px; }
.notice { border: 1px solid var(--coin); padding: 12px 14px; margin: 6px 0 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.notice p { margin: 0; }
.lobby-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lr-av { display: flex; }
.lr-av .av-wrap { margin-right: -8px; border: 2px solid var(--bg); }
.lr-txt { flex: 1; display: flex; flex-direction: column; padding-left: 8px; min-width: 0; }
.lr-txt small { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); }
.code-row { display: flex; gap: 8px; margin-top: 12px; }
.code-row input, .txt { flex: 1; min-width: 0; min-height: 48px; background: var(--bg2); border: 1px solid var(--line); padding: 0 12px; letter-spacing: .12em; font-weight: 600; -webkit-user-select: text; user-select: text; }
.txt { width: 100%; letter-spacing: 0; }
.code-box { display: flex; align-items: center; gap: 14px; margin-top: 10px; padding: 12px 0; border-top: 1px dashed var(--line); }
.code-box span { color: var(--muted); }
.code-box b { flex: 1; font: 600 30px/1 var(--serif); letter-spacing: .14em; }
.sum { margin: 0; font-weight: 600; }
.seats { list-style: none; margin: 0; padding: 0; }
.seat { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.seat.empty { color: var(--muted); }
.seat-txt { display: flex; flex-direction: column; }
.seat-txt small { color: var(--muted); }
.seat.team0 { box-shadow: inset 3px 0 0 var(--team0); padding-left: 10px; }
.seat.team1 { box-shadow: inset 3px 0 0 var(--team1); padding-left: 10px; }
.seat.mine b { color: var(--accent); }
.m-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.m-row .btn { flex: 1; }
.m-col { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.prof-head { display: flex; gap: 18px; align-items: center; padding: 8px 0 18px; }
.prof-head h2 { font-size: 26px; }
.prof-head p { margin: 4px 0 8px; }
.xpbar { height: 5px; background: var(--line); width: 200px; max-width: 100%; margin-bottom: 10px; }
.xpbar i { display: block; height: 100%; background: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0; margin: 0; }
.stats div { border-bottom: 1px solid var(--line); padding: 8px 0; }
.stats dt { color: var(--muted); font-size: 14px; }
.stats dd { margin: 0; font: 600 24px/1.2 var(--serif); font-variant-numeric: tabular-nums; }
.achs { list-style: none; margin: 0; padding: 0; }
.achs li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.achs li span:last-child { display: flex; flex-direction: column; }
.achs li small { font-size: 14px; }
.achs li.on { color: var(--ink); }
.ach-mark { width: 14px; height: 20px; margin-top: 3px; border: 1.5px solid var(--line); border-radius: 2px; flex: none; transform: rotate(-6deg); }
.on .ach-mark, .ach-mark.on { background: var(--accent); border-color: var(--accent); display: inline-block; vertical-align: -3px; margin-right: 6px; }
.pid code { font-size: 20px; letter-spacing: .08em; -webkit-user-select: text; user-select: text; }
.ranks { list-style: none; margin: 0; padding: 0; }
.ranks li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ranks .rk { width: 28px; font: 600 20px/1 var(--serif); color: var(--muted); }
.ranks .rn { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ranks .rn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranks .rn small { color: var(--muted); }
.ranks .rs { font-variant-numeric: tabular-nums; font-weight: 600; }
.ranks li.mine .rn b { color: var(--accent); }
.me-rank { font-weight: 600; margin-top: 16px; }
.links { display: flex; gap: 22px; padding: 12px 0; }

/* Modale et toast */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(10, 10, 12, .62); display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(16px + var(--sab)); }
.sheet { background: var(--bg); border: 1px solid var(--line); width: 100%; max-width: 520px; max-height: calc(100dvh - 32px - var(--sat)); overflow: auto; padding: 22px 20px; transform: translateY(20px); opacity: 0; transition: transform .25s, opacity .25s; }
.modal.on .sheet { transform: none; opacity: 1; }
@media (min-width: 700px), (orientation: landscape) { .modal { align-items: center; } }
.sheet h2 { font-size: 22px; margin: 4px 0 12px; }
.m-text { margin: 4px 0; }
.av-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.av-pick { aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 50%; overflow: hidden; background: none; }
.av-pick .av { width: 100%; height: 100%; display: block; }
.av-pick[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--bg) inset; }
.emotes { display: flex; flex-wrap: wrap; gap: 8px; }
.emo { border: 1px solid var(--line); background: none; padding: 10px 14px; min-height: 44px; }
.ps-head { display: flex; gap: 14px; align-items: center; }
.end { text-align: center; padding: 6px 0 4px; }
.end-title { font-size: 34px; }
.end.good .end-title { color: var(--accent); }
.end.bad .end-title { color: var(--team1); }
.end-sub { color: var(--muted); margin: 6px 0 0; }
.gains { display: flex; justify-content: center; gap: 26px; margin: 18px 0 6px; font: 600 24px/1 var(--serif); font-variant-numeric: tabular-nums; }
.gains .plus { color: var(--accent); }
.gains .minus { color: var(--team1); }
.new-ach { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; text-align: left; }
.new-ach h3 { font-size: 17px; margin-bottom: 6px; }
.new-ach p { margin: 4px 0; font-size: 15px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--sab)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 11px 16px; max-width: calc(100vw - 32px); opacity: 0; pointer-events: none; transition: .25s; z-index: 60; font-size: 15px; font-weight: 550; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Cartes à jouer ---------- */
.card {
  --w: var(--cw);
  position: relative; width: var(--w); height: calc(var(--w) * 1.4); border-radius: calc(var(--w) * .085);
  background: var(--paper); color: var(--blk);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 3px 10px rgba(0, 0, 0, .28); flex: none;
  font-family: var(--serif);
}
.card.red { color: var(--red); }
.card svg { fill: currentColor; display: block; }
.card .ix { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; width: calc(var(--w) * .26); }
.card .ix b { font-size: calc(var(--w) * .27); font-weight: 700; letter-spacing: -.04em; }
.card .ix-s { width: calc(var(--w) * .2); height: calc(var(--w) * .2); margin-top: calc(var(--w) * .02); }
.card .tl { left: calc(var(--w) * .03); top: calc(var(--w) * .06); }
.card .br { right: calc(var(--w) * .03); bottom: calc(var(--w) * .06); transform: rotate(180deg); }
.card .pips { position: absolute; inset: 14% 22% 14% 22%; }
.card .pips i { position: absolute; width: calc(var(--w) * .2); height: calc(var(--w) * .2); transform: translate(-50%, -50%); }
.card .pips i.dn { transform: translate(-50%, -50%) rotate(180deg); }
.card .pips .pip { width: 100%; height: 100%; }
.card .ace { position: absolute; inset: 0; display: grid; place-items: center; }
.card .ace .big { width: 46%; height: 46%; }
.card .face { position: absolute; inset: 17% 21%; border: 1.5px solid currentColor; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4%; border-radius: 2px;
  background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(0, 0, 0, .045) 5px 6px); }
.card .face b { font-size: calc(var(--w) * .42); line-height: .9; font-weight: 600; }
.card .face .fs { width: 34%; height: auto; aspect-ratio: 1; }
.card.trump::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px rgba(200, 230, 74, .0); pointer-events: none; }
.card .tmark { position: absolute; top: 0; right: 18%; width: calc(var(--w) * .13); height: calc(var(--w) * .17); background: var(--accent-ink); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
.card .tmark::after { content: ''; position: absolute; inset: 0 2px 4px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
.card.back { background: #3b4a7a; overflow: hidden; }
.card.back .bk { position: absolute; inset: 6%; border: 1.5px solid rgba(251, 248, 241, .7); border-radius: 3px;
  background:
    repeating-linear-gradient(45deg, rgba(251, 248, 241, .18) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(251, 248, 241, .18) 0 2px, transparent 2px 9px), #2c3a66; }
.card.back .bk::after { content: ''; position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 5/7; transform: translate(-50%, -50%) rotate(-8deg); background: var(--paper); border-radius: 2px; box-shadow: 4px -2px 0 -1px var(--accent); }

/* ---------- Table ---------- */
.table {
  position: fixed; inset: 0; z-index: 10; overflow: hidden; touch-action: none;
  background: radial-gradient(120% 80% at 50% 45%, var(--felt) 0, var(--felt2) 75%);
  display: grid; grid-template-rows: auto 1fr auto auto auto;
  padding: var(--sat) var(--sar) var(--sab) var(--sal);
}
.tb-top { display: flex; align-items: flex-start; gap: 6px; padding: 8px 10px 0; }
.tb-btn { width: 44px; height: 44px; flex: none; background: rgba(0, 0, 0, .2); border: 1px solid var(--line); display: grid; place-items: center; }
.tb-btn.ph { visibility: hidden; }
.opps { flex: 1; display: flex; justify-content: space-evenly; gap: 4px; min-width: 0; }
.pod { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; max-width: 120px; flex: 1; padding: 2px 0 4px; }
.pod-av { position: relative; width: 48px; height: 48px; }
.pod-av .av-wrap { position: absolute; inset: 4px; width: auto; height: auto; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); fill: none; }
.ring circle { stroke: transparent; stroke-width: 2.5; stroke-dasharray: 116.2; stroke-dashoffset: 0; }
.pod.is-turn .ring circle { stroke: var(--ink); }
.pod.is-turn .ring.low circle { stroke: var(--team1); }
.teams .pod.team0 .pod-av .av-wrap { box-shadow: 0 0 0 2px var(--team0); }
.teams .pod.team1 .pod-av .av-wrap { box-shadow: 0 0 0 2px var(--team1); }
.pod-info { display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 100%; }
.pod-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bot-tag { font-weight: 400; color: var(--muted); margin-left: 4px; font-size: 11px; }
.pod-cards { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini { position: relative; display: inline-block; width: 34px; height: 18px; }
.mini i { position: absolute; left: calc(var(--i) * 3.5px); top: 0; width: 12px; height: 17px; border-radius: 2px; background: #2c3a66; border: 1px solid rgba(251, 248, 241, .6); transform: rotate(calc((var(--i) - var(--n) / 2) * 5deg)); }
.pod-tag { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pod.is-att .pod-tag { color: var(--ink); }
.pod.is-def .pod-tag { color: var(--team1); }
.teams .pod.is-def .pod-tag { color: var(--ink); }
.pod.is-out { opacity: .45; }
.pod.is-away .pod-av { opacity: .5; }
.pod[role="button"] { cursor: pointer; }
.bubble { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: var(--paper); color: var(--blk); padding: 6px 10px; font-size: 14px; font-weight: 600; white-space: nowrap; z-index: 6; transition: opacity .4s; }
.bubble::before { content: ''; position: absolute; top: -6px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--paper); }
.bubble.off { opacity: 0; }
.tb-actions .bubble { top: auto; bottom: 100%; }

.tb-mid { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; grid-template-areas: "stock discard" "field field"; align-items: center; gap: 6px; padding: 8px 14px; min-height: 0; }
.stock { grid-area: stock; justify-self: start; width: calc(var(--cw) * 1.85); }
.discard { grid-area: discard; justify-self: end; width: calc(var(--cw) * 1.5); }
.field { grid-area: field; }
.stock, .discard { position: relative; height: calc(var(--ch) * 1.08); }
.stock .trump-card { position: absolute; left: calc(var(--cw) * .58); top: 0; transform: rotate(90deg); transform-origin: 50% 50%; }
.stock .stack { position: absolute; left: 0; top: 0; box-shadow: 2px 2px 0 #1b2443, 4px 4px 0 #16203d, 0 6px 14px rgba(0, 0, 0, .4); }
.stock .count, .discard .count { position: absolute; left: 4px; bottom: -4px; font-size: 13px; font-weight: 700; background: var(--bg); padding: 1px 6px; font-variant-numeric: tabular-nums; z-index: 3; }
.discard .count { left: auto; right: 0; }
.trump-badge { position: absolute; right: -6px; top: -8px; width: 28px; height: 28px; background: var(--paper); border-radius: 50%; display: grid; place-items: center; z-index: 4; box-shadow: 0 0 0 2px var(--accent); }
.trump-badge .tb { width: 16px; height: 16px; fill: var(--blk); }
.trump-badge.s-H .tb, .trump-badge.s-D .tb { fill: var(--red); }
.discard .card { position: absolute; right: 10%; top: 4%; }
.discard .d1 { transform: rotate(-14deg); }
.discard .d2 { transform: rotate(9deg); }
.disc-empty { position: absolute; right: 0; top: 10%; width: var(--cw); height: var(--ch); border: 1.5px dashed rgba(255, 255, 255, .12); border-radius: calc(var(--cw) * .085); }
.field { align-self: stretch; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: calc(var(--cw) * .12) calc(var(--cw) * .2); padding: 6px; min-height: calc(var(--ch) * 1.3); border: 1.5px dashed transparent; transition: border-color .2s, background .2s; }
.field.can-drop { border-color: rgba(200, 230, 74, .5); background: rgba(200, 230, 74, .04); }
.field.drop-hover { background: rgba(200, 230, 74, .1); }
.pair { position: relative; width: calc(var(--cw) * 1.28); height: calc(var(--ch) * 1.18); }
.pair > .card { position: absolute; left: 0; top: 0; }
.pair > .card.def { left: calc(var(--cw) * .26); top: calc(var(--ch) * .17); transform: rotate(9deg); }
.pair.can-drop > .card:first-child { box-shadow: 0 0 0 3px var(--accent), 0 3px 10px rgba(0, 0, 0, .3); }
.pair.drop-hover > .card:first-child { transform: scale(1.05); }
.tb-status { text-align: center; min-height: 26px; font-size: 15px; color: var(--muted); padding: 0 12px; display: flex; justify-content: center; gap: 10px; align-items: center; }
.my-turn .tb-status { color: var(--ink); font-weight: 600; }
.reco { color: var(--coin); }
.tb-actions { display: flex; align-items: center; gap: 10px; padding: 4px 12px; min-height: 58px; }
.tb-actions .pod { flex: none; flex-direction: row; max-width: 46%; gap: 8px; }
.tb-actions .pod .pod-info { align-items: flex-start; }
.btns { flex: 1; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.act { min-height: 48px; padding: 0 18px; border: 0; font-weight: 700; font-size: 16px; }
.act.take { background: var(--team1); color: #2a1408; }
.act.bito { background: var(--accent); color: var(--accent-ink); }
.act.transfer { background: var(--ink); color: var(--bg); }
.act.transfer.hot { box-shadow: 0 0 0 3px var(--accent); }
.act.catch { background: none; color: var(--ink); border: 1.5px solid var(--ink); }
.hand { position: relative; height: calc(var(--ch) + 30px); margin: 0 10px 6px; }
.hand .card { position: absolute; top: 12px; transform-origin: 50% 120%; transition: transform .18s ease, filter .18s; cursor: grab; touch-action: none; }
.hand .card.ok { box-shadow: 0 0 0 2.5px var(--accent), 0 4px 12px rgba(0, 0, 0, .35); }
.hand .card.dim { filter: brightness(.72) saturate(.7); }
.hand .card.sel { box-shadow: 0 0 0 3px var(--accent), 0 10px 20px rgba(0, 0, 0, .45); }
.hand .card.dragging { transition: none; z-index: 100 !important; cursor: grabbing; pointer-events: none; }
.flyer { position: fixed; z-index: 40; pointer-events: none; }
.flyer .card { position: absolute; left: 0; top: 0; }
.tip { position: absolute; left: 50%; bottom: calc(var(--ch) + 100px + var(--sab)); transform: translateX(-50%); width: min(440px, calc(100% - 32px)); background: var(--paper); color: var(--blk); padding: 14px 16px; z-index: 30; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.tip p { margin: 0 0 10px; font-size: 16px; line-height: 1.45; }
.tip .tip-k { font: 600 13px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: #6a6a66; margin-bottom: 8px; }
.tip .btn { background: var(--blk); color: var(--paper); }
.tip-trump .stock { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Paysage et écrans bas */
@media (orientation: landscape) {
  .tb-mid { grid-template-columns: calc(var(--cw) * 1.9) 1fr calc(var(--cw) * 1.5); grid-template-rows: 1fr; grid-template-areas: "stock field discard"; }
  :root { --cw: clamp(46px, min(9vw, 14dvh), 100px); }
}
@media (orientation: landscape) and (max-height: 560px) {
  :root { --cw: clamp(40px, 15dvh, 74px); }
  .table { grid-template-columns: 1fr; }
  .tb-top { padding-top: 4px; }
  .pod-av { width: 38px; height: 38px; }
  .pod { flex-direction: row; gap: 6px; }
  .pod-info { align-items: flex-start; }
  .tb-mid { padding: 0 8px; }
  .field { min-height: calc(var(--ch) * 1.15); }
  .hand { margin-bottom: 4px; }
  .tb-actions { min-height: 48px; padding: 0 12px; }
  .act { min-height: 42px; }
  .tip { bottom: auto; top: 30%; }
  .home-top { grid-template-columns: auto 1fr; }
}
@media (min-width: 760px) and (min-height: 700px) {
  :root { --cw: clamp(60px, min(12vw, 11dvh), 110px); }
  .pod-av { width: 60px; height: 60px; }
  .pod-name { font-size: 15px; }
  .pod { max-width: 160px; }
  .act { min-height: 54px; padding: 0 26px; font-size: 18px; }
}
@media (max-width: 380px) {
  .home-top { grid-template-columns: 1fr; }
  .hero-fan { margin: 0 auto; }
  .act { padding: 0 12px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
