/* ==========================================================================
   Fool! — feuille de style
   Palette : vert forêt, vert acide, papier ivoire, rouge d'imprimerie.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo Black";
  src: url("/fonts/archivo-black-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #071b10;
  --bg-2: #0a2416;
  --panel: #0d2b1a;
  --panel-2: #113722;
  --panel-3: #16452c;
  --line: rgba(226, 246, 195, 0.16);
  --line-strong: rgba(226, 246, 195, 0.44);
  --ink: #f4f0da;
  --ink-soft: #dbe6c8;
  --muted: #a8bb9a;
  --muted-2: #71866d;
  --gold: #d7f25c;
  --gold-2: #efffa8;
  --gold-3: #8fa63a;
  --cream: #f7f0d6;
  --card: #f7f0d6;
  --vert: #39b56a;
  --jaune: #e8bd3f;
  --rouge: #e95438;
  --bleu: #4a8fd4;
  --danger: #f05a3a;
  --good: #b7f26a;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --poster: "Archivo Black", "Arial Black", "Helvetica Neue", sans-serif;
  --shadow: 8px 8px 0 rgba(0, 0, 0, 0.38);
  --radius: 2px;
  --topbar-h: 66px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1100px 700px at 72% -12%, rgba(215, 242, 92, 0.11), transparent 62%),
    radial-gradient(900px 700px at -8% 105%, rgba(57, 181, 106, 0.09), transparent 60%),
    radial-gradient(700px 500px at 100% 70%, rgba(233, 84, 56, 0.045), transparent 65%),
    var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

::selection { background: rgba(215, 242, 92, 0.28); color: var(--cream); }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
img, svg { display: block; max-width: 100%; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.08; letter-spacing: -0.02em; }
ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--gold-2);
  color: #0a140c;
  border-radius: 6px;
  font-weight: 700;
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: currentColor;
}
.icon.stroke { fill: none; stroke: currentColor; }

/* --------------------------------------------------------------------------
   Barre haute
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--topbar-h);
  padding: 0 clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 27, 16, 0.92), rgba(7, 27, 16, 0.74));
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--gold);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(215, 242, 92, 0.18), transparent 70%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.3s;
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.04); color: var(--gold-2); }
.brand-mark .icon { width: 21px; height: 21px; }
.brand-word {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1;
}
.brand-bang { color: var(--gold-2); }

.topnav { display: flex; align-items: center; gap: clamp(10px, 2vw, 22px); }
.navlink {
  position: relative;
  border: 0;
  background: none;
  padding: 6px 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.navlink::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}
.navlink:hover { color: var(--gold-2); }
.navlink:hover::after { transform: scaleX(1); }

.iconbtn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.iconbtn:hover { color: var(--gold-2); border-color: var(--line-strong); background: rgba(215, 242, 92, 0.06); }
.iconbtn .icon { width: 17px; height: 17px; }
.iconbtn.muted { color: var(--muted-2); }

.latency {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}
.latency-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px rgba(183, 242, 106, 0.6);
}
.latency.warn .latency-dot { background: var(--jaune); box-shadow: 0 0 8px rgba(217, 173, 74, 0.6); }
.latency.bad .latency-dot { background: var(--danger); box-shadow: 0 0 8px rgba(240, 90, 58, 0.6); }

/* --------------------------------------------------------------------------
   Structure
   -------------------------------------------------------------------------- */
#main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}
.screen { animation: screen-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.section { padding: clamp(26px, 4vw, 46px) 0; border-top: 1px solid var(--line); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 450;
  letter-spacing: -0.035em;
  margin-top: 3px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.eyebrow-rule { width: 30px; height: 1px; background: var(--gold); opacity: 0.7; }

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s, filter 0.2s;
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { border-color: var(--gold); background: rgba(215, 242, 92, 0.08); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  border-color: var(--gold-2);
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #0a140c;
  box-shadow: 0 8px 24px rgba(215, 242, 92, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn.primary:hover { filter: brightness(1.05); background: linear-gradient(180deg, #f6dda3, var(--gold)); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.btn.danger { border-color: rgba(240, 90, 58, 0.4); color: #ff9a80; }
.btn.danger:hover { background: rgba(240, 90, 58, 0.1); border-color: var(--danger); }
.btn.tiny { min-height: 32px; padding: 6px 10px; font-size: 11px; border-radius: 5px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.38; cursor: not-allowed; transform: none; }
.btn:disabled:hover { border-color: var(--line-strong); background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)); }
.btn.primary:disabled { opacity: 1; border-color: var(--line-strong); background: rgba(215, 242, 92, 0.07); color: var(--muted); box-shadow: none; }

/* --------------------------------------------------------------------------
   Accueil — héros
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(30px, 6vw, 74px) 0 clamp(34px, 5vw, 62px);
}
.hero-copy { max-width: 640px; }
.wordmark {
  margin: 12px 0 16px;
  font-family: var(--serif);
  font-size: clamp(78px, 12vw, 156px);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: -0.065em;
  color: var(--cream);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.04);
}
.wordmark span {
  display: inline-block;
  color: var(--gold-2);
  font-style: italic;
  transform: translateY(-0.04em) rotate(3deg);
  text-shadow: 0 0 38px rgba(239, 255, 168, 0.2);
}
.lede {
  max-width: 47ch;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.name-row {
  display: grid;
  grid-template-columns: auto minmax(0, 280px) 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.name-row label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.name-row input {
  width: 100%;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s;
}
.name-row input::placeholder { color: var(--muted-2); }
.name-row input:focus { outline: none; border-color: var(--gold); background: rgba(215, 242, 92, 0.04); }
.name-hint { color: var(--muted-2); font-size: 10.5px; }

.hero-art {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.hero-halo {
  position: absolute;
  width: min(92%, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(215, 242, 92, 0.16);
  background:
    radial-gradient(circle at 50% 45%, rgba(215, 242, 92, 0.12), transparent 58%),
    repeating-radial-gradient(circle at 50% 50%, transparent 0 54px, rgba(215, 242, 92, 0.05) 55px 56px);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.4);
}
.hero-halo::before,
.hero-halo::after {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  border: 1px solid rgba(215, 242, 92, 0.1);
}
.hero-halo::after { inset: 20%; border-style: dashed; opacity: 0.7; }
.hero-fan {
  position: relative;
  width: 290px;
  height: 300px;
  z-index: 2;
}
.hero-fan .card {
  --cw: 88px;
  --ch: 126px;
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform-origin: 50% 120%;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.45);
  animation: gentle-float 7s ease-in-out infinite;
}
.hero-fan .card:nth-child(1) { transform: translateX(-50%) rotate(-17deg) translate(-58px, 10px); animation-delay: -1.2s; }
.hero-fan .card:nth-child(2) { transform: translateX(-50%) rotate(-2deg) translateY(-18px); z-index: 2; }
.hero-fan .card:nth-child(3) { transform: translateX(-50%) rotate(15deg) translate(62px, 8px); animation-delay: -3.6s; }
@keyframes gentle-float {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -10px; }
}
.hero-token {
  position: absolute;
  right: clamp(8px, 5vw, 34px);
  bottom: 46px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 88px;
  padding: 12px 8px 9px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 35% 28%, rgba(239, 255, 168, 0.2), transparent 58%),
    linear-gradient(160deg, #113722, #0a2416);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), inset 0 0 0 4px rgba(215, 242, 92, 0.06);
  color: var(--gold-2);
  transform: rotate(-6deg);
}
.hero-token .icon { width: 32px; height: 32px; }
.hero-token span {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.hero-caption {
  position: absolute;
  left: 0;
  bottom: 6px;
  max-width: 210px;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
}
.hero-caption::before {
  content: "";
  display: block;
  width: 26px;
  height: 1px;
  margin-bottom: 8px;
  background: var(--gold-3);
}

/* --------------------------------------------------------------------------
   Cartes à jouer
   -------------------------------------------------------------------------- */
.card {
  --cw: 66px;
  --ch: 94px;
  --suit: var(--gold);
  position: relative;
  flex: none;
  width: var(--cw);
  height: var(--ch);
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(76, 56, 24, 0.26);
  border-radius: 9px;
  background:
    radial-gradient(120% 90% at 18% 0%, #fffdf7 0%, rgba(255, 253, 247, 0) 58%),
    linear-gradient(155deg, #fbf7ea 0%, #f3ead7 52%, #e9dec7 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(110, 85, 40, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.28);
  color: var(--suit);
  overflow: hidden;
  object-fit: cover;
  text-align: left;
  user-select: none;
  -webkit-user-drag: none;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--suit);
  opacity: 0.95;
}
.card::after {
  content: "";
  position: absolute;
  inset: 9px 5px 5px;
  border: 1px solid rgba(76, 56, 24, 0.12);
  border-radius: 5px;
  pointer-events: none;
}
.card .rank {
  position: absolute;
  top: 10px;
  left: 9px;
  font-family: var(--serif);
  font-size: calc(var(--cw) * 0.37);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--suit);
}
.card .suit-sm {
  position: absolute;
  top: calc(10px + var(--cw) * 0.38);
  left: 10px;
  width: calc(var(--cw) * 0.17);
  height: calc(var(--cw) * 0.17);
  color: var(--suit);
  opacity: 0.82;
}
.card .suit-lg {
  position: absolute;
  right: 5px;
  bottom: 4px;
  width: calc(var(--cw) * 0.38);
  height: calc(var(--cw) * 0.38);
  color: var(--suit);
  opacity: 0.16;
}
.card .card-mid {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--suit);
  opacity: 0.82;
}
.card .card-mid .icon { width: calc(var(--cw) * 0.3); height: calc(var(--cw) * 0.3); }
.card.joker .card-mid .icon { width: calc(var(--cw) * 0.4); height: calc(var(--cw) * 0.4); }
.card.c-vert { --suit: var(--vert); }
.card.c-jaune { --suit: var(--jaune); }
.card.c-rouge { --suit: var(--rouge); }
.card.c-bleu { --suit: var(--bleu); }
.card.joker {
  --suit: var(--gold);
  background:
    radial-gradient(120% 90% at 25% 0%, rgba(239, 255, 168, 0.12), transparent 60%),
    linear-gradient(155deg, #16452c 0%, #171c16 55%, #071b10 100%);
  border-color: rgba(215, 242, 92, 0.46);
  box-shadow: inset 0 1px 0 rgba(239, 255, 168, 0.14), 0 8px 18px rgba(0, 0, 0, 0.36);
}
.card.joker::before {
  background: linear-gradient(90deg, var(--vert), var(--gold), var(--rouge), var(--bleu));
  opacity: 0.9;
}
.card.joker::after { border-color: rgba(215, 242, 92, 0.2); }
.card.joker .rank { color: var(--gold-2); }
.card.joker .suit-sm, .card.joker .suit-lg, .card.joker .card-mid { color: var(--gold); }
.card.joker .suit-lg { opacity: 0.14; }
.card.joker .joker-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  color: var(--gold-2);
  font-size: calc(var(--cw) * 0.105);
  font-weight: 700;
  letter-spacing: 0.22em;
  opacity: 0.8;
}
.card.back {
  background:
    linear-gradient(135deg, rgba(215, 242, 92, 0.08) 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(225deg, rgba(215, 242, 92, 0.08) 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(155deg, #16452c, #0a2416);
  border-color: rgba(215, 242, 92, 0.3);
}
.card.back::before { background: rgba(215, 242, 92, 0.22); }
.card.back::after {
  border-color: rgba(215, 242, 92, 0.16);
  background:
    radial-gradient(circle at 50% 50%, rgba(215, 242, 92, 0.18) 0 13%, transparent 14%),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(215, 242, 92, 0.07) 8px 9px);
}

/* --------------------------------------------------------------------------
   Tables ouvertes + comment jouer
   -------------------------------------------------------------------------- */
.section-tools { display: flex; align-items: center; gap: 8px; }
.tables-list { display: grid; gap: 8px; min-height: 72px; }
.table-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.005));
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.table-row:hover { border-color: var(--line-strong); background: rgba(215, 242, 92, 0.045); transform: translateY(-1px); }
.table-code {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.12em;
  color: var(--gold-2);
}
.table-host { min-width: 0; flex: 1; }
.table-host b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.table-host small { color: var(--muted); font-size: 11px; }
.table-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11.5px; }
.table-meta .icon { width: 14px; height: 14px; color: var(--gold); }
.empty-state {
  display: grid;
  place-items: center;
  min-height: 94px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.empty-state .icon { width: 28px; height: 28px; color: var(--gold-3); margin-bottom: 8px; opacity: 0.7; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.how-card {
  position: relative;
  padding: 20px 20px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.027), rgba(255, 255, 255, 0.006));
  overflow: hidden;
}
.how-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 242, 92, 0.08), transparent 70%);
}
.how-num {
  position: absolute;
  top: 14px;
  right: 16px;
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.how-suits { display: flex; gap: 6px; margin-bottom: 16px; height: 26px; align-items: center; }
.suit {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.9;
}
.suit .icon { width: 14px; height: 14px; }
.suit.vert { color: var(--vert); }
.suit.jaune { color: var(--jaune); }
.suit.rouge { color: var(--rouge); }
.suit.bleu { color: var(--bleu); }
.token-mini {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: var(--gold-2);
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 35% 28%, rgba(239, 255, 168, 0.2), transparent 60%);
}
.token-mini .icon { width: 16px; height: 16px; }
.how-card h3 { margin-bottom: 7px; font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: 0; }
.how-card p { color: var(--muted); font-size: 12.5px; line-height: 1.6; }

/* --------------------------------------------------------------------------
   Salon
   -------------------------------------------------------------------------- */
#screen-lobby { padding: clamp(24px, 4vw, 48px) 0 60px; }
.lobby-shell { max-width: 1000px; margin: 0 auto; }
.lobby-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.lobby-title { font-family: var(--serif); font-size: clamp(30px, 4vw, 46px); font-weight: 450; letter-spacing: -0.04em; margin-top: 4px; }
.room-code-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.room-code {
  padding: 2px 0;
  border: 0;
  border-bottom: 1px dashed var(--line-strong);
  background: none;
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.room-code:hover { color: var(--cream); border-color: var(--gold); }
.room-code small { display: block; margin-top: 6px; color: var(--muted-2); font-family: var(--sans); font-size: 9px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.lobby-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  margin-top: 22px;
  align-items: start;
}
.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.004)),
    var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h3 { font-family: var(--serif); font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.panel-head .tag { color: var(--muted); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.panel-body { padding: 14px 18px 18px; }
.lobby-seats { display: grid; gap: 8px; }
.lobby-seat {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}
.lobby-seat.empty { border-style: dashed; background: transparent; color: var(--muted-2); }
.lobby-seat.you { border-color: rgba(215, 242, 92, 0.34); background: rgba(215, 242, 92, 0.045); }
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.14), transparent 55%),
    linear-gradient(145deg, #16452c, #0a2416);
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  text-transform: uppercase;
}
.avatar.bot { color: var(--muted); background: linear-gradient(145deg, #113722, #0a2416); }
.avatar.offline { opacity: 0.45; }
.lobby-seat .who { min-width: 0; flex: 1; }
.lobby-seat .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; }
.lobby-seat .who small { color: var(--muted); font-size: 10.5px; }
.seat-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag.gold { color: var(--gold-2); border-color: var(--line-strong); background: rgba(215, 242, 92, 0.06); }
.tag.green { color: var(--good); border-color: rgba(183, 242, 106, 0.25); }
.tag.red { color: #ff9a80; border-color: rgba(240, 90, 58, 0.3); }
.lobby-actions { display: flex; flex-direction: column; gap: 9px; }
.lobby-actions .btn { width: 100%; }
.lobby-note { min-height: 18px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.invite-box {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.16);
}
.invite-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  outline: none;
}
.invite-box .btn { flex: none; }
.setup-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.setup-table th, .setup-table td { padding: 7px 5px; border-bottom: 1px solid var(--line); text-align: left; }
.setup-table th { color: var(--muted-2); font-size: 9px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.setup-table td { color: var(--ink-soft); }
.setup-table tr:last-child td { border-bottom: 0; }
.setup-table .num { text-align: right; }
.setup-note { margin-top: 9px; color: var(--muted-2); font-size: 10.5px; line-height: 1.55; }

/* --------------------------------------------------------------------------
   Jeu
   -------------------------------------------------------------------------- */
.screen-game { padding: 12px 0 20px; }
.game-shell { max-width: 1040px; margin: 0 auto; }
.game-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 10px;
}
.hud-left, .hud-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.round-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(215, 242, 92, 0.06);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.round-pill .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-2); }
.hud-note { color: var(--muted); font-size: 10.5px; }
.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.hud-btn:hover { color: var(--gold-2); border-color: var(--line-strong); background: rgba(215, 242, 92, 0.06); }
.hud-btn .icon { width: 13px; height: 13px; }

.opponents-rail {
  display: none;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: none;
}
.opponents-rail::-webkit-scrollbar { display: none; }
.rail-seat {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  min-width: 0;
}
.rail-seat.active { border-color: var(--gold); background: rgba(215, 242, 92, 0.09); color: var(--ink); }
.rail-seat.fool { border-color: rgba(240, 90, 58, 0.45); }
.rail-seat .avatar { width: 27px; height: 27px; font-size: 12px; }
.rail-seat .rail-name { max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; font-weight: 650; }
.rail-seat .rail-meta { color: var(--muted); font-size: 9.5px; }
.rail-seat > span:not(.avatar):not(.rail-token) { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.rail-seat .rail-token { color: var(--gold-2); display: grid; place-items: center; }
.rail-seat .rail-token .icon { width: 12px; height: 12px; }

.table-stage {
  position: relative;
  width: 100%;
  min-height: clamp(430px, 54vh, 590px);
  margin: 0 auto;
  isolation: isolate;
}
.table-felt {
  position: absolute;
  inset: 5% 7% 2%;
  border-radius: 46% / 43%;
  background:
    repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.018) 0 5px, transparent 5px 11px),
    radial-gradient(ellipse at 50% 36%, #217048 0%, #175536 46%, #0c3521 100%);
  border: 2px solid #082417;
  box-shadow:
    inset 0 0 0 7px rgba(7, 27, 16, 0.28),
    inset 0 0 80px rgba(0, 0, 0, 0.38),
    10px 12px 0 rgba(0, 0, 0, 0.32);
}
.table-felt::before {
  content: "";
  position: absolute;
  inset: 5%;
  border-radius: inherit;
  border: 1px dashed rgba(239, 255, 168, 0.24);
}
.table-felt::after {
  content: "FOOL!";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-4deg);
  color: rgba(7, 27, 16, 0.2);
  font-family: var(--poster);
  font-size: clamp(64px, 12vw, 132px);
  font-weight: 400;
  letter-spacing: -0.04em;
  pointer-events: none;
}

.seats { position: absolute; inset: 0; z-index: 3; }
.seat {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 118px;
  padding: 3px 6px 5px;
  border: 1px solid rgba(226, 246, 195, 0.26);
  border-radius: 2px;
  background: rgba(6, 25, 14, 0.86);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: opacity 0.25s, border-color 0.2s, background 0.2s;
}
.seat.self { border-color: var(--gold); background: rgba(7, 27, 16, 0.96); }
.seat.active { border-color: var(--gold); box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.38), 0 0 0 2px var(--gold); }
.seat.fool {
  border-color: var(--danger);
  background:
    repeating-linear-gradient(135deg, rgba(240, 90, 58, 0.16) 0 6px, rgba(6, 25, 14, 0.94) 6px 12px);
}
.seat.ending:not(.fool) { border-color: var(--gold); box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.38), 0 0 0 2px var(--gold); }
.seat .avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 2px;
  font-size: 16px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.32);
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
}
.seat.active .avatar {
  transform: translateY(-1px) scale(1.06);
  border-color: var(--gold-2);
  box-shadow: 2px 2px 0 #000, 0 0 0 2px var(--gold);
}
.seat.winner .avatar { border-color: var(--good); box-shadow: 2px 2px 0 #000, 0 0 0 2px var(--good); }
.seat.fool .avatar { border-color: var(--danger); }
.seat.offline { opacity: 0.42; }
.seat .s-name {
  max-width: 108px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.15;
}
.host-mark {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 3px;
  color: var(--gold);
  vertical-align: -1px;
}
.seat .s-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
}
.bot-tag {
  display: inline-block;
  margin-left: 3px;
  padding: 0 3px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  vertical-align: 1px;
}
.seat .s-meta b { color: var(--ink-soft); font-weight: 700; }
.count-badge.low {
  padding: 0 4px;
  border: 1px solid var(--danger);
  background: rgba(240, 90, 58, 0.18);
  color: #ffb09e;
  font-weight: 800;
}
.count-badge.low small { color: inherit; }
.seat .fool-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 1px;
  padding: 2px 6px;
  border: 1px solid #0a140c;
  border-radius: 1px;
  color: #0a140c;
  background: var(--danger);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.seat .fool-chip .icon { width: 10px; height: 10px; }
.seat .ending-flag {
  position: absolute;
  right: -5px;
  top: -8px;
  padding: 1px 5px;
  border: 1px solid #0a140c;
  background: var(--gold);
  color: #0a140c;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(3deg);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.32);
}
.self-tag {
  position: absolute;
  left: 50%;
  top: -9px;
  transform: translateX(-50%) rotate(-2deg);
  padding: 1px 5px;
  border: 1px solid #0a140c;
  background: var(--gold);
  color: #0a140c;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.token-pin {
  position: absolute;
  right: -7px;
  top: -7px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 2px solid #0a140c;
  border-radius: 50%;
  background: var(--danger);
  color: #0a140c;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}
.token-pin .icon { width: 11px; height: 11px; }
.avatar .turn-ring {
  position: absolute;
  inset: -5px;
  border-radius: 3px;
  border: 2px solid var(--gold);
  opacity: 0;
  transform: scale(0.96);
  animation: none;
}
.seat.active .turn-ring { opacity: 1; animation: turn-pulse 1.5s ease-in-out infinite; }
@keyframes turn-pulse {
  0%, 100% { opacity: 0.28; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.trick-zone {
  position: absolute;
  left: 50%;
  top: 51%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: min(52%, 400px);
  padding: 7px 12px;
  border: 1px solid rgba(226, 246, 195, 0.22);
  border-radius: 2px;
  background: rgba(7, 27, 16, 0.76);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.24);
  text-align: center;
}
.lead-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: rgba(7, 27, 16, 0.6);
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lead-pill .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--suit, var(--gold));
}
.lead-pill .chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.chip.vert { --suit: var(--vert); color: var(--vert); }
.chip.jaune { --suit: var(--jaune); color: var(--jaune); }
.chip.rouge { --suit: var(--rouge); color: var(--rouge); }
.chip.bleu { --suit: var(--bleu); color: var(--bleu); }
.chip.joker { color: var(--gold); }

.trick-cards { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.trick-placeholder {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.trick-play {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transform: translate(-50%, -50%);
  animation: card-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.trick-card { transform: rotate(var(--rot, 0deg)); transition: transform 0.2s; }
.trick-play .card { --cw: 52px; --ch: 74px; }
.trick-play .owner {
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 1px 5px;
  border: 1px solid rgba(226, 246, 195, 0.24);
  background: rgba(7, 27, 16, 0.94);
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.trick-play.winner .card {
  border-color: var(--gold);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5), 0 0 0 2px var(--gold);
}
.trick-play.winner .owner { color: var(--gold); border-color: var(--gold); }
.trick-play.fool .card {
  border-color: var(--danger);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5), 0 0 0 2px var(--danger);
}
.trick-play.fool .owner { color: #ffb09e; border-color: var(--danger); }
.fool-stamp {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border: 2px solid #0a140c;
  background: var(--danger);
  color: #0a140c;
  font-family: var(--poster);
  font-size: 11px;
  letter-spacing: 0.04em;
  transform: translate(-50%, -50%) rotate(-12deg);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
}
.fool-stamp .icon { width: 11px; height: 11px; }
@keyframes card-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.86); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.trick-play.winner .trick-card { animation: winner-pop 0.4s 0.05s both; }
@keyframes winner-pop {
  0% { transform: rotate(var(--rot, 0deg)) scale(1); }
  50% { transform: rotate(var(--rot, 0deg)) scale(1.08); }
  100% { transform: rotate(var(--rot, 0deg)) scale(1); }
}

.turn-line {
  max-width: 44ch;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}
.turn-line strong {
  display: block;
  color: var(--gold);
  font-family: var(--poster);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.turn-line .sub { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; letter-spacing: 0.02em; }
.turn-timer {
  width: min(110px, 40%);
  height: 3px;
  margin: 1px auto 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s;
}
.turn-timer.on { opacity: 1; }
.turn-timer span {
  display: block;
  height: 100%;
  width: var(--left, 100%);
  background: var(--gold);
  transition: width 0.25s linear, background 0.3s;
}
.turn-timer.low span { background: var(--danger); }

.dist-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 10px;
  margin: 0 0 7px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.dist-label {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.dist-suit { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; }
.dist-suit .icon { width: 10px; height: 10px; }
.dist-suit.vert { color: var(--vert); }
.dist-suit.jaune { color: var(--jaune); }
.dist-suit.rouge { color: var(--rouge); }
.dist-suit.bleu { color: var(--bleu); }
.dist-extra { margin-left: auto; color: var(--muted); }

.table-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.alert {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.alert b { font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; }
.alert .icon { width: 12px; height: 12px; }
.alert.fool { border-color: var(--danger); background: rgba(240, 90, 58, 0.14); color: #ffb09e; }
.alert.fool b { color: var(--danger); }
.alert.low { border-color: var(--gold); background: rgba(215, 242, 92, 0.1); color: var(--gold-2); }
.alert.low b { color: var(--gold); }
.hand-low {
  padding: 1px 5px;
  border: 1px solid var(--danger);
  color: #ffb09e;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hand-stats b.low { color: var(--danger); }

.hand-zone {
  position: relative;
  z-index: 6;
  margin-top: 2px;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.005)),
    rgba(19, 24, 18, 0.92);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}
.hand-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 2px;
}
.hand-title { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.hand-title .eyebrow { font-size: 9px; }
.hand-name { font-family: var(--serif); font-size: 19px; letter-spacing: -0.02em; }
.hand-stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 10.5px; }
.hand-stats b { color: var(--ink); font-weight: 650; }
.hand-stats .token-badge { color: var(--gold-2); }
.hand-scroll {
  overflow: visible;
  padding: 4px 2px 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.hand {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 108px;
  padding: 12px 18px 2px;
}
.hand .card {
  --cw: 64px;
  --ch: 90px;
  margin-left: -11px;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s, opacity 0.18s, border-color 0.18s;
  cursor: default;
}
.hand .card:first-child { margin-left: 0; }
.hand.dense .card { margin-left: -19px; }
.hand.dense-2 .card { margin-left: -25px; }
.hand .card.playable { cursor: pointer; border-color: rgba(215, 242, 92, 0.55); }
.hand .card.playable:hover { transform: translateY(-13px) scale(1.03); z-index: 8; box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(215, 242, 92, 0.5); }
.hand .card.playable:focus-visible { transform: translateY(-10px); }
.hand .card.dim { opacity: 0.34; filter: saturate(0.55); }
.hand .card.dim:hover { transform: none; }
.hand .card.sent { opacity: 0.15; transform: translateY(-18px); }
.hand-empty {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100px;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
}
.hand-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 18px;
  padding: 2px 4px 0;
  color: var(--muted);
  font-size: 10.5px;
}
.hand-hint .follow { color: var(--gold-2); }
.hand-hint .warn { color: #ff9a80; }

.game-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 2px 0;
  color: var(--muted-2);
  font-size: 10px;
}
.game-log { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-log b { color: var(--ink-soft); font-weight: 650; }

/* --------------------------------------------------------------------------
   Overlay / modales
   -------------------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 7, 5, 0.74);
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
  overflow-y: auto;
  animation: overlay-in 0.2s ease-out both;
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative;
  width: min(100%, 700px);
  max-height: min(92dvh, 900px);
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background:
    radial-gradient(120% 80% at 50% -20%, rgba(215, 242, 92, 0.1), transparent 55%),
    linear-gradient(180deg, #0d2b1a 0%, #071b10 100%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: modal-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.modal.narrow { width: min(100%, 480px); }
.modal.wide { width: min(100%, 860px); }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 0;
}
.modal-head h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 450;
  letter-spacing: -0.035em;
}
.modal-head p { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.modal-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.modal-close:hover { color: var(--ink); border-color: var(--line-strong); }
.modal-close .icon { width: 15px; height: 15px; }
.modal-body { padding: 18px 24px 24px; }
.modal-body > p { color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.modal-actions.split { justify-content: space-between; }
.modal-actions .btn { min-width: 110px; }

.form-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.form-field label { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.form-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--ink);
  font-size: 16px;
  letter-spacing: 0.06em;
  transition: border-color 0.2s;
}
.form-field input:focus { outline: none; border-color: var(--gold); }
.form-field input.code-input { text-transform: uppercase; letter-spacing: 0.22em; font-family: var(--serif); font-size: 28px; text-align: center; }
.form-field .hint { color: var(--muted-2); font-size: 10.5px; }

.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  flex: 1 1 42px;
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 18px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.segmented label:hover { border-color: var(--line-strong); color: var(--ink); }
.segmented input:checked + label { border-color: var(--gold); background: rgba(215, 242, 92, 0.1); color: var(--gold-2); }
.segmented input:focus-visible + label { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.choice-row { display: flex; gap: 8px; flex-wrap: wrap; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
}
.choice input { accent-color: var(--gold); }
.choice:has(input:checked) { border-color: var(--gold); color: var(--gold-2); background: rgba(215, 242, 92, 0.07); }

.rule-sections { display: grid; gap: 20px; }
.rule-section h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.rule-section h3 .num {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
}
.rule-section p { color: var(--ink-soft); font-size: 12.5px; line-height: 1.68; }
.rule-section p + p { margin-top: 6px; }
.rule-section b { color: var(--ink); font-weight: 650; }
.rule-section em { color: var(--gold-2); font-style: normal; }
.rules-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 11.5px;
}
.rules-table th, .rules-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.rules-table th:first-child, .rules-table td:first-child { text-align: left; }
.rules-table th { color: var(--muted-2); font-size: 8.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.rules-table td { color: var(--ink-soft); }
.rules-table tbody tr:hover td { background: rgba(215, 242, 92, 0.035); }
.rules-table .c-vert { color: var(--vert); }
.rules-table .c-jaune { color: var(--jaune); }
.rules-table .c-rouge { color: var(--rouge); }
.rules-table .c-bleu { color: var(--bleu); }
.rules-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.55; }

/* Scores / résumé */
.score-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.score-table th, .score-table td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: right; }
.score-table th:first-child, .score-table td:first-child { text-align: left; }
.score-table th { color: var(--muted-2); font-size: 8.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.score-table td { color: var(--ink-soft); }
.score-table tr.you td { color: var(--ink); }
.score-table tr.you td:first-child { color: var(--gold-2); }
.score-table .pts { font-family: var(--serif); font-size: 15px; }
.score-table .neg { color: #ff9a80; }
.score-table .pos { color: var(--good); }
.coin {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 35% 28%, rgba(239, 255, 168, 0.28), transparent 60%);
  color: var(--gold-2);
  font-family: var(--serif);
  font-size: 10px;
}
.medals { display: inline-flex; gap: 3px; }
.medals .coin { width: 15px; height: 15px; font-size: 8px; }

.round-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(215, 242, 92, 0.06);
  margin-bottom: 14px;
}
.round-banner .icon { width: 22px; height: 22px; color: var(--gold-2); }
.round-banner b { display: block; font-size: 12.5px; }
.round-banner small { color: var(--muted); font-size: 10.5px; }
.ready-line { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: var(--muted); font-size: 10.5px; flex-wrap: wrap; }
.ready-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.ready-dot.on { background: var(--good); box-shadow: 0 0 8px rgba(183, 242, 106, 0.5); }

/* Podium */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; margin: 8px 0 18px; }
.podium-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
  text-align: center;
}
.podium-place.first { border-color: var(--line-strong); background: linear-gradient(180deg, rgba(215, 242, 92, 0.11), transparent); padding-top: 22px; }
.podium-place .place { color: var(--muted-2); font-family: var(--serif); font-size: 11px; letter-spacing: 0.12em; }
.podium-place .avatar { width: 44px; height: 44px; margin: 4px 0; }
.podium-place b { font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-place .score { color: var(--gold-2); font-family: var(--serif); font-size: 20px; }
.podium-place.first .score { font-size: 26px; }

/* Toasts / netbar */
.toaster {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
  pointer-events: none;
  width: min(92vw, 440px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(13, 43, 26, 0.96);
  color: var(--ink-soft);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  font-size: 12px;
  animation: toast-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.toast .icon { width: 14px; height: 14px; color: var(--gold-2); }
.toast.error { border-color: rgba(240, 90, 58, 0.5); }
.toast.error .icon { color: #ff9a80; }
.toast.leave { animation: toast-out 0.3s ease-in both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

.netbar {
  position: fixed;
  left: 50%;
  top: calc(var(--topbar-h) + 10px);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border: 1px solid rgba(240, 90, 58, 0.38);
  border-radius: 999px;
  background: rgba(43, 20, 13, 0.96);
  color: #ffb09e;
  font-size: 11.5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.spinner {
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(232, 178, 166, 0.25);
  border-top-color: #ffb09e;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

/* Confettis */
.confetti {
  position: fixed;
  top: -10px;
  z-index: 75;
  width: 7px;
  height: 11px;
  pointer-events: none;
  animation: confetti-fall var(--dur, 3s) linear forwards;
  opacity: 0.9;
}
@keyframes confetti-fall {
  to { transform: translate3d(var(--dx, 0), 105vh, 0) rotate(var(--rot, 720deg)); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 40px) 30px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10.5px;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--gold-2); }
.footer-right { display: inline-flex; align-items: center; gap: 8px; }
.footer-dot { opacity: 0.5; }
body[data-screen="game"] .footer,
body[data-screen="lobby"] .footer { display: none; }
body.modal-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   Page APK
   -------------------------------------------------------------------------- */
.apk-page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 70px) clamp(16px, 4vw, 40px) 30px;
}
.apk-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr); gap: clamp(22px, 5vw, 56px); align-items: center; }
.apk-title { font-family: var(--serif); font-size: clamp(40px, 7vw, 76px); font-weight: 450; letter-spacing: -0.05em; line-height: 0.98; margin: 10px 0 16px; }
.apk-title span { color: var(--gold-2); font-style: italic; }
.apk-card {
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: radial-gradient(120% 100% at 50% 0%, rgba(215, 242, 92, 0.1), transparent 60%), var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}
.apk-icon {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 32% 24%, rgba(239, 255, 168, 0.2), transparent 55%), linear-gradient(145deg, #16452c, #0a2416);
  display: grid;
  place-items: center;
  color: var(--gold-2);
}
.apk-icon .icon { width: 52px; height: 52px; }
.apk-version { color: var(--gold-2); font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.apk-meta { margin: 8px 0 18px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.apk-meta code { color: var(--ink-soft); font-size: 10px; word-break: break-all; }
.apk-steps { display: grid; gap: 9px; margin-top: 18px; text-align: left; }
.apk-step { display: flex; gap: 10px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.apk-step b { flex: none; color: var(--gold); font-family: var(--serif); font-size: 13px; }
.apk-note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 10.5px; line-height: 1.6; text-align: left; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { max-width: 720px; }
  .hero-art { min-height: 360px; order: 2; }
  .hero-caption { left: 4%; }
  .apk-grid { grid-template-columns: 1fr; }
  .apk-card { max-width: 440px; }
}

@media (max-width: 760px) {
  :root { --topbar-h: 58px; }
  .topnav { gap: 10px; }
  .latency { display: none; }
  .brand-word { font-size: 22px; }
  .hero { padding-top: 26px; }
  .wordmark { font-size: clamp(74px, 20vw, 112px); }
  .name-row { grid-template-columns: 1fr; gap: 6px; }
  .name-row label { margin-top: 2px; }
  .name-hint { font-size: 10px; }
  .how-grid { grid-template-columns: 1fr; }
  .how-card { padding: 17px; }
  .lobby-grid { grid-template-columns: 1fr; }
  .lobby-top { align-items: flex-start; }
  .room-code { font-size: clamp(40px, 12vw, 62px); }
  .lobby-seats { grid-template-columns: 1fr 1fr; gap: 6px; }
  .lobby-seat { min-height: 54px; padding: 7px 8px; gap: 8px; }
  .lobby-seat .avatar { width: 32px; height: 32px; font-size: 14px; }
  .lobby-seat .who b { font-size: 11.5px; }
  .lobby-seat .who small { font-size: 9.5px; }
  .lobby-seat .seat-tags { gap: 3px; }
  .table-row { gap: 10px; padding: 12px; }
  .table-code { font-size: 16px; }
  .table-meta { gap: 8px; font-size: 10.5px; }
  .table-host small { display: none; }

  .screen-game { padding-top: 8px; }
  .screen-game { min-height: calc(100dvh - var(--topbar-h)); display: flex; flex-direction: column; min-width: 0; }
  .game-shell { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; width: 100%; }
  .table-stage { flex: 1 1 auto; min-width: 0; }
  .opponents-rail { min-width: 0; max-width: 100%; }
  .hand-zone { min-width: 0; }
  .hand-scroll { min-width: 0; }
  .game-hud { align-items: flex-start; }
  .hud-left { gap: 5px; }
  .hud-note { display: none; }
  .hud-btn span { display: none; }
  .hud-btn { min-width: 30px; justify-content: center; }
  .opponents-rail { display: flex; flex-wrap: wrap; gap: 6px; overflow: visible; }
  .table-stage { min-height: 268px; margin-top: 2px; }
  .table-felt { inset: 2% 1% 2%; border-radius: 16px; }
  .table-felt::before { border-radius: 12px; }
  .table-felt::after { font-size: 76px; opacity: 0.7; }
  .seats { display: none; }
  .trick-zone { width: 94%; top: 50%; gap: 8px; }
  .trick-cards { min-height: 78px; gap: 6px; }
  .trick-play .card { --cw: 46px; --ch: 66px; }
  .trick-play .owner { font-size: 8px; max-width: 60px; }
  .turn-line { font-size: 15px; }
  .hand-zone { margin-top: 6px; padding: 8px 8px 10px; }
  .hand-head { align-items: center; }
  .hand-name { font-size: 16px; }
  .hand-stats { font-size: 9.5px; gap: 6px; }
  .hand-scroll { overflow: visible; padding: 0; }
  .hand { flex-wrap: wrap; justify-content: center; gap: 5px; min-height: 0; padding: 6px 2px 0; }
  .hand .card { --cw: 50px; --ch: 72px; margin-left: 0; }
  .hand.dense .card, .hand.dense-2 .card { margin-left: 0; }
  .hand .card.playable:hover { transform: translateY(-4px) scale(1.02); }
  .hand-hint { font-size: 9.5px; }
  .game-foot { font-size: 9px; }
  .footer { font-size: 9.5px; }
  .modal-head { padding: 18px 18px 0; }
  .modal-body { padding: 14px 18px 20px; }
  .modal-actions { margin-top: 18px; }
  .modal-actions .btn { min-width: 0; flex: 1 1 auto; }
  .rules-table { font-size: 10px; }
  .rules-table th, .rules-table td { padding: 6px 3px; }
  .rules-table th { font-size: 7.5px; letter-spacing: 0.05em; }
  .segmented label { flex-basis: 36px; min-height: 38px; font-size: 16px; }
  .podium { gap: 5px; }
  .podium-place { padding: 10px 5px 8px; }
  .podium-place .avatar { width: 34px; height: 34px; font-size: 14px; }
}

@media (max-width: 420px) {
  .brand-mark { width: 30px; height: 30px; }
  .brand-mark .icon { width: 18px; height: 18px; }
  .navlink { font-size: 11.5px; }
  .hero-actions .btn { flex: 1 1 46%; }
  .hero-actions .btn.primary { flex-basis: 100%; }
  .hero-art { min-height: 310px; }
  .hero-fan { transform: scale(0.82); }
  .hero-token { right: 0; bottom: 26px; width: 74px; }
  .hero-token .icon { width: 26px; height: 26px; }
  .hero-caption { display: none; }
  .section-head { align-items: flex-start; }
  .room-code { letter-spacing: 0.08em; }
  .lobby-actions .btn { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Thème « République du Fou »
   Vert forêt, affiches, bords francs, zéro verre dépoli.
   ========================================================================== */

body {
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(215, 242, 92, 0.014) 22px 23px),
    linear-gradient(180deg, rgba(215, 242, 92, 0.05), transparent 26%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--danger) 0 5px, transparent 5px) left top / 100% 100% no-repeat;
  opacity: 0.55;
}
.topbar {
  border-bottom: 2px solid var(--line-strong);
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.brand-mark {
  border-radius: 2px;
  border: 2px solid #0a140c;
  background: var(--gold);
  color: #0a140c;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.55);
  transform: rotate(-4deg);
}
.brand:hover .brand-mark { transform: rotate(2deg) scale(1.03); color: #0a140c; }
.brand-word {
  font-family: var(--poster);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.brand-bang { color: var(--danger); }
.navlink {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.navlink::after { height: 2px; background: var(--gold); }
.navlink:hover { color: var(--gold); }
.iconbtn {
  border-radius: 2px;
  border: 2px solid var(--line);
  color: var(--ink-soft);
}
.iconbtn:hover { color: #0a140c; border-color: #0a140c; background: var(--gold); }
.latency-dot { box-shadow: none; }

.eyebrow {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.2em;
}
.eyebrow-rule { height: 2px; background: var(--danger); opacity: 1; }
.section-head h2,
.lobby-title,
.modal-head h2,
.apk-title {
  font-family: var(--poster);
  font-weight: 400;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.section-head h2 { font-size: clamp(24px, 3vw, 36px); }
.wordmark {
  font-family: var(--poster);
  font-size: clamp(84px, 13vw, 168px);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.82;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 6px 6px 0 rgba(0, 0, 0, 0.32);
}
.wordmark span {
  color: var(--danger);
  font-style: normal;
  transform: translateY(-0.02em) rotate(3deg);
  text-shadow: none;
}
.lede { color: var(--ink-soft); }
.hero-halo {
  border-radius: 2px;
  transform: rotate(45deg);
  border: 2px solid var(--line-strong);
  background: transparent;
  box-shadow: 14px 14px 0 rgba(0, 0, 0, 0.3);
}
.hero-halo::before, .hero-halo::after {
  border-radius: 2px;
  border-color: var(--gold);
  opacity: 0.45;
}
.hero-halo::after { border-color: var(--danger); border-style: dashed; opacity: 0.55; }
.hero-token {
  border-radius: 2px;
  border: 2px solid #0a140c;
  background: var(--panel-2);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.55);
  color: var(--gold);
}
.hero-token span { color: var(--gold); }
.hero-caption {
  font-family: var(--sans);
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-caption::before { height: 2px; background: var(--danger); }

.btn {
  border-radius: 2px;
  border: 2px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.34);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.btn:hover {
  transform: translate(-1px, -1px);
  border-color: var(--gold);
  background: var(--panel-2);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
}
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4); }
.btn.primary {
  border-color: #0a140c;
  background: var(--gold);
  color: #0a140c;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.55);
}
.btn.primary:hover { background: var(--gold-2); filter: none; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { border-color: var(--line); background: var(--panel); }
.btn.danger { border-color: var(--danger); color: #ffb09e; }
.btn.tiny { border-radius: 1px; }
.btn:disabled:hover { transform: none; box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.34); }
.btn.primary:disabled { border-color: var(--line); background: var(--panel-2); color: var(--muted); box-shadow: none; }

.card {
  border-radius: 3px;
  border: 1.5px solid #0a140c;
  background:
    linear-gradient(155deg, #fffaf0 0%, #f7f0d6 55%, #e9dfc2 100%);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}
.card::before { height: 8px; }
.card::after { border-radius: 1px; border-color: rgba(10, 20, 12, 0.2); }
.card .rank { font-family: var(--poster); font-weight: 400; letter-spacing: -0.05em; }
.card.joker {
  border-color: var(--gold);
  background: var(--panel-2);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
}
.card.joker .rank { color: var(--gold); }
.card.joker .suit-sm, .card.joker .suit-lg, .card.joker .card-mid { color: var(--gold); }
.card.joker .joker-label { font-family: var(--poster); color: var(--gold); letter-spacing: 0.18em; }
.card.back {
  border-color: var(--gold);
  background:
    repeating-linear-gradient(45deg, #16452c 0 6px, #0f3a24 6px 12px);
}
.card.back::before { background: var(--gold); opacity: 0.5; }

.panel, .how-card, .table-row, .lobby-seat, .invite-box, .round-banner,
.podium-place, .apk-card {
  border-radius: 2px;
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.28);
}
.panel { background: var(--panel); }
.panel-head { border-bottom: 2px solid var(--line); }
.panel-head h3 { font-family: var(--poster); font-weight: 400; text-transform: uppercase; letter-spacing: -0.02em; }
.how-card::after { display: none; }
.how-num { font-family: var(--poster); font-size: 22px; color: var(--danger); opacity: 0.8; }
.how-card h3 { font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 12px; }
.suit, .token-mini { border-radius: 2px; }
.tables-list { gap: 10px; }
.table-row { border-left: 5px solid var(--gold); }
.table-row:hover { border-color: var(--gold); background: var(--panel-2); transform: translate(-1px, -1px); }
.table-code { font-family: var(--poster); letter-spacing: 0.06em; color: var(--gold); }
.empty-state { border-radius: 2px; border: 2px dashed var(--line-strong); background: var(--panel); }

.overlay { background: rgba(4, 15, 9, 0.82); backdrop-filter: none; -webkit-backdrop-filter: none; }
.modal {
  border-radius: 2px;
  border: 2px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.45);
  max-width: calc(100vw - 24px);
}
.modal::before {
  content: "";
  display: block;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 20px, var(--danger) 20px 40px, var(--panel-2) 40px 60px);
}
.modal-head { padding-top: 18px; }
.modal-close { border-radius: 2px; border: 2px solid var(--line); }
.modal-close:hover { color: #0a140c; background: var(--gold); border-color: #0a140c; }
.form-field label { font-weight: 800; letter-spacing: 0.14em; }
.form-field input, .form-field select, .name-row input, .invite-box {
  border-radius: 2px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
.form-field select { width: 100%; min-height: 48px; padding: 10px 13px; font-size: 13px; }
.form-field input:focus, .form-field select:focus, .name-row input:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--bg-2);
}
.segmented label {
  border-radius: 2px;
  border: 2px solid var(--line);
  font-family: var(--poster);
  font-size: 15px;
}
.segmented label:hover { border-color: var(--gold); color: var(--ink); }
.segmented input:checked + label {
  border-color: #0a140c;
  background: var(--gold);
  color: #0a140c;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}
.segmented input:disabled + label { opacity: 0.4; cursor: not-allowed; }
.choice { border-radius: 2px; border: 2px solid var(--line); }
.choice:has(input:checked) { border-color: var(--gold); background: rgba(215, 242, 92, 0.12); color: var(--gold-2); }
.toggle-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 14px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  background: var(--bg);
  cursor: pointer;
}
.toggle-line input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); }
.toggle-line b { display: block; font-size: 12px; }
.toggle-line small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.options-note { margin-top: 6px; color: var(--muted); font-size: 10.5px; }

.lobby-seat.you { border-color: var(--gold); background: rgba(215, 242, 92, 0.08); }
.room-code {
  border: 2px solid var(--line-strong);
  border-bottom: 2px solid var(--line-strong);
  background: var(--panel);
  padding: 4px 10px;
  color: var(--gold);
  font-family: var(--poster);
  letter-spacing: 0.05em;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.32);
}
.room-code:hover { color: var(--cream); border-color: var(--gold); }
.avatar {
  border-radius: 2px;
  background: var(--panel-2);
  color: var(--gold);
}
.avatar.bot { color: var(--muted); background: var(--panel); }
.tag { border-radius: 0; }
.tag.gold { color: #0a140c; background: var(--gold); border-color: #0a140c; }
.tag.green { color: var(--good); border-color: var(--good); }
.tag.red { color: #ffb09e; border-color: var(--danger); }
.setup-table th { font-weight: 800; }
.setup-table td { border-bottom: 1px solid var(--line); }

.round-pill {
  border-radius: 0;
  border: 2px solid var(--line-strong);
  background: var(--panel);
  color: var(--gold);
  font-weight: 800;
}
.round-pill .dot { background: var(--danger); border-radius: 0; }
.hud-btn {
  border-radius: 1px;
  border: 2px solid var(--line);
  font-weight: 800;
  letter-spacing: 0.04em;
}
.hud-btn:hover { color: #0a140c; border-color: #0a140c; background: var(--gold); }
.opponents-rail { padding-bottom: 8px; }
.rail-seat {
  border-radius: 2px;
  border: 2px solid var(--line);
  background: var(--panel);
  color: var(--muted);
}
.rail-seat.active { border-color: var(--gold); background: rgba(215, 242, 92, 0.12); color: var(--cream); }
.rail-seat.fool { border-color: var(--danger); background: rgba(240, 90, 58, 0.14); }
.rail-seat.ending:not(.fool) { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.rail-seat .rail-name { font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.rail-seat .rail-meta b.low { color: var(--danger); }
.rail-token { color: var(--danger); display: inline-flex !important; align-items: center; gap: 3px; font-size: 8px; font-weight: 800; }
.rail-token b { font-size: 8px; letter-spacing: 0.08em; }
.rail-ending {
  padding: 1px 4px;
  border: 1px solid #0a140c;
  background: var(--gold);
  color: #0a140c;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.continue-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 8px 0 0;
  padding: 7px 12px;
  border: 2px solid #0a140c;
  background: var(--gold);
  color: #0a140c;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.36);
  text-align: left;
  cursor: pointer;
  animation: continue-pulse 1.7s ease-in-out infinite;
}
.continue-bar .icon { width: 22px; height: 22px; flex: none; }
.continue-bar b { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.continue-bar small { display: block; margin-top: 1px; font-size: 9px; font-weight: 600; opacity: 0.72; }
.continue-bar:hover { background: var(--gold-2); }
.continue-bar.waiting {
  border-color: var(--line-strong);
  background: var(--panel-2);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
  animation: none;
}
@keyframes continue-pulse {
  0%, 100% { box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.36); }
  50% { box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.36), 0 0 0 5px rgba(215, 242, 92, 0.16); }
}

.hand-zone {
  border-radius: 2px;
  border: 2px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.3);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.hand-name { font-family: var(--poster); font-weight: 400; text-transform: uppercase; }
.hand .card.playable {
  border-color: var(--gold);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35), 0 0 0 2px var(--gold);
}
.hand .card.playable:hover {
  transform: translateY(-13px) scale(1.03);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.45), 0 0 0 2px var(--gold);
}
.hand .card.dim { opacity: 0.28; filter: grayscale(0.5) saturate(0.4); }
.token-badge {
  padding: 1px 5px;
  border: 1px solid var(--danger);
  background: rgba(240, 90, 58, 0.16);
  color: #ffb09e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hand-hint .follow { color: var(--gold); }
.game-foot { font-weight: 700; letter-spacing: 0.03em; }

.toast {
  border-radius: 2px;
  border: 2px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4);
}
.toast .icon { color: var(--gold); }
.netbar { border-radius: 2px; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.4); }
.footer a:hover { color: var(--gold); }

/* Table et cartes jouées */
@media (max-width: 760px) {
  body[data-screen="game"] .brand,
  body[data-screen="game"] .topnav .navlink { display: none; }
  body[data-screen="game"] .topbar { height: 40px; justify-content: flex-end; padding-right: 12px; }
  body[data-screen="game"] .topnav { margin-left: auto; }
  .seats { display: block; }
  .opponents-rail { display: none; }
  .screen-game { min-height: calc(100dvh - var(--topbar-h)); }
  .table-stage { min-height: clamp(330px, 46vh, 430px); }
  .table-felt {
    inset: 1% 0 0;
    border-radius: 16% / 11%;
    box-shadow:
      inset 0 0 0 5px rgba(7, 27, 16, 0.3),
      inset 0 0 50px rgba(0, 0, 0, 0.38),
      5px 6px 0 rgba(0, 0, 0, 0.28);
  }
  .table-felt::after { font-size: 58px; }
  .seat { width: 66px; padding: 2px 3px 3px; gap: 1px; box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3); }
  .seat .avatar { width: 28px; height: 28px; font-size: 12px; }
  .seat .s-name { max-width: 62px; font-size: 7.5px; letter-spacing: 0; }
  .seat .s-meta { font-size: 7px; gap: 2px; }
  .seat .fool-chip { font-size: 6px; padding: 1px 3px; gap: 2px; }
  .seat .fool-chip .icon { width: 7px; height: 7px; }
  .seat .ending-flag { display: none; }
  .self-tag { top: -7px; font-size: 6px; padding: 1px 3px; }
  .token-pin { width: 15px; height: 15px; right: -5px; top: -5px; border-width: 1px; }
  .token-pin .icon { width: 9px; height: 9px; }
  .trick-zone { width: min(66%, 230px); padding: 3px 6px; gap: 3px; }
  .trick-zone .turn-line { display: none; }
  .trick-zone .trick-placeholder { font-size: 7px; }
  .trick-zone .turn-timer { width: 80px; }
  .trick-play .card { --cw: 38px; --ch: 54px; }
  .trick-play .owner { font-size: 6px; padding: 0 3px; max-width: 48px; }
  .fool-stamp { font-size: 8px; padding: 1px 4px; border-width: 1px; }
  .fool-stamp .icon { width: 8px; height: 8px; }
  .dist-bar { gap: 2px 7px; padding: 4px 6px; margin-bottom: 6px; font-size: 8px; }
  .dist-label { font-size: 7px; }
  .dist-suit .icon { width: 9px; height: 9px; }
  .dist-extra { margin-left: 0; }
  .table-alerts { gap: 4px; margin-bottom: 6px; }
  .alert { padding: 3px 5px; font-size: 8px; }
  .alert .icon { width: 10px; height: 10px; }
  .continue-bar { margin-top: 6px; padding: 6px 8px; gap: 7px; }
  .continue-bar .icon { width: 18px; height: 18px; }
  .continue-bar b { font-size: 9.5px; }
  .continue-bar small { font-size: 8px; }
  .hand-zone { padding: 8px 8px 9px; border-width: 2px; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.26); }
  .hand .card { --cw: 48px; --ch: 68px; }
  .hand .card.playable:hover { transform: translateY(-5px) scale(1.02); }
  .hand-head { gap: 6px; }
  .hand-stats { gap: 5px; }
  .game-foot { font-size: 8px; }
  .wordmark { font-size: clamp(68px, 20vw, 112px); text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.32); }
  .hero-halo { box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.3); }
  .topnav { gap: 7px; }
}

@media (max-width: 420px) {
  .seat { width: 60px; }
  .seat .avatar { width: 25px; height: 25px; font-size: 11px; }
  .seat .s-name { max-width: 56px; font-size: 7px; }
  .trick-zone { width: min(70%, 210px); }
  .trick-play .card { --cw: 35px; --ch: 50px; }
}

/* ==========================================================================
   Pied de page complet
   ========================================================================== */

.site-footer {
  display: block;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 38px clamp(16px, 4vw, 40px) 26px;
  border-top: 2px solid var(--line-strong);
  color: var(--muted);
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(230px, 1.05fr) minmax(0, 2fr);
  gap: clamp(26px, 5vw, 64px);
  align-items: start;
}
.footer-brand-link { display: inline-flex; }
.footer-brand-link .brand-mark { width: 32px; height: 32px; }
.footer-brand-link .brand-word { font-size: 22px; }
.footer-tagline {
  max-width: 34ch;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}
.footer-disclaimer {
  max-width: 42ch;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.6;
}
.footer-disclaimer b { color: var(--muted); }
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 15px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-status .dot { width: 7px; height: 7px; background: var(--good); }
.footer-status.off { border-color: var(--danger); color: #ffb09e; }
.footer-status.off .dot { background: var(--danger); }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.footer-col h2 {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: var(--poster);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer-col a,
.footer-version,
.footer-lang {
  display: block;
  padding: 3px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.footer-col a:hover { color: var(--gold); }
.footer-version, .footer-lang { color: var(--muted-2); }
.footer-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9.5px;
}
.footer-legal { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.footer-legal a { color: var(--muted); }
.footer-legal a:hover { color: var(--gold); }

@media (max-width: 980px) {
  .footer-main { grid-template-columns: 1fr; gap: 26px; }
  .footer-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .site-footer { padding-top: 28px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 18px 14px; }
  .footer-bottom { display: block; }
  .footer-legal { margin-top: 8px; }
}

/* Pages éditoriales : aide, mentions, confidentialité */
.legal-page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(30px, 6vw, 66px) clamp(16px, 4vw, 40px) 50px;
}
.legal-hero { max-width: 720px; margin-bottom: 28px; }
.legal-hero h1 {
  margin: 10px 0 12px;
  font-family: var(--poster);
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.94;
  text-transform: uppercase;
  color: var(--cream);
}
.legal-hero .lede { font-size: 14px; line-height: 1.65; }
.legal-meta { margin-top: 14px; color: var(--muted-2); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.legal-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.legal-card {
  padding: 20px 22px;
  border: 2px solid var(--line);
  border-left: 5px solid var(--gold);
  background: var(--panel);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.26);
}
.legal-card h2 {
  margin: 0 0 9px;
  font-family: var(--poster);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--gold);
}
.legal-card h3 {
  margin: 15px 0 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.legal-card p, .legal-card li {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.7;
}
.legal-card p + p { margin-top: 8px; }
.legal-card ul { margin: 7px 0 0; padding-left: 18px; }
.legal-card li { margin-bottom: 5px; }
.legal-card a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.legal-card b { color: var(--ink); }
.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}
.legal-toc a {
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.legal-toc a:hover { color: #0a140c; background: var(--gold); border-color: #0a140c; }
.legal-note {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
@media (min-width: 820px) {
  .legal-grid.two { grid-template-columns: 1fr 1fr; }
}
