/*
 * CashKash — styles.
 * Fond noir #0a0a0a, bordures #27272a, un seul accent #faff00.
 * Geist Mono (texte) et Tomorrow (titres). Rayons : 6 px boutons, 12 px cartes.
 * Thème « néon d'arcade » à la fin du fichier (remplace l'ancienne règle « ni ombres ni dégradés »).
 */
:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --line: #27272a;
  --text: #fafafa;
  --muted: #a1a1aa;
  --accent: #faff00;
  --on-accent: #0a0a0a;

  --radius-btn: 6px;
  --radius-card: 12px;

  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: 'Tomorrow', 'Geist Mono', ui-monospace, monospace;

  --card-w: 40px; /* cartes des bots */
  --hero-card-w: 60px; /* vos cartes */
  --board-card-w: clamp(48px, 15vw, 60px);

  /* Agrandissement du site selon l'écran (voir « Taille d'écran » plus bas). */
  --zoom: 1;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

button,
input,
output { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* La mention « jetons fictifs sans valeur monétaire » est dans le pied de chaque page
   (le bandeau collant du haut a été retiré à la demande de l'utilisateur). */

/* ---------- Taille d'écran ----------
   Téléphones et tablettes : mises en page dédiées (media queries plus bas). Grands écrans :
   la même mise en page grandit avec l'écran au lieu de rester une colonne étroite au milieu.
   « zoom » agrandit aussi les unités dvh : on les divise par --zoom là où elles servent. */
@media (min-width: 1600px) { :root { zoom: 1.15; --zoom: 1.15; } }
@media (min-width: 1920px) { :root { zoom: 1.3; --zoom: 1.3; } }
@media (min-width: 2400px) { :root { zoom: 1.6; --zoom: 1.6; } }
@media (min-width: 3200px) { :root { zoom: 2; --zoom: 2; } }

/* ---------- Mise en page ---------- */

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- En-tête commun ---------- */

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "brand wallets user"
    "nav nav nav";
  align-items: center;
  gap: 10px 12px;
  padding-top: 12px;
  min-height: 52px;
}

.brand {
  grid-area: brand;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
}

.brand span { color: var(--accent); }

.wallets {
  grid-area: wallets;
  justify-self: end;
  display: flex;
  gap: 12px;
}

.wallet {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
}

.wallet-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.wallet-label {
  font-size: 11px;
  color: var(--muted);
}

.user {
  grid-area: user;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-avatar {
  display: block;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  overflow: hidden;
}

.user-avatar:hover { border-color: var(--text); }

/* Personnage de l'en-tête et sa barre d'expérience, juste dessous. */
/* La barre fait exactement la largeur de l'icône, juste dessous et alignée sur elle ;
   le niveau est une pastille posée sur le coin de l'icône. */
.user-who { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; width: 40px; }
.user-xp { display: block; width: 100%; text-decoration: none; color: var(--text); }
.user-xp-level {
  position: absolute;
  right: -5px;
  top: 28px;
  padding: 0 3px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--bg);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  line-height: 12px;
  color: var(--accent);
  white-space: nowrap;
  pointer-events: none;
}
.user-xp-bar { display: block; width: 100%; height: 5px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: var(--bg); box-sizing: border-box; }
.user-xp-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.6s ease-out; }

.nav {
  grid-area: nav;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.nav a,
.nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.nav a:hover,
.nav button:hover { border-color: var(--text); }

.nav a[aria-current="page"] {
  border-color: var(--accent);
  color: var(--accent);
}

/* Personnage en pixel art : pixels nets, jamais lissés. */
.pixel svg {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

/* ---------- Table de poker : tapis, croupier, joueurs autour ---------- */
/* Le tapis vert, le bois de la table et les cartes blanches sont les seules
   couleurs ajoutées à la palette : elles servent l'ambiance de la table. */

.app--wide { max-width: 1180px; }

.table-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.table-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.table-title strong { font-family: var(--font-display); }

.stage {
  --seat-w: 116px;
  --avatar-w: 56px;
  --pcard-w: 36px; /* +5 % */
  --you-card-w: 50px;
  --board-w: clamp(42px, 5.9vw, 67px);
  position: relative;
  /* La table tient dans la hauteur de l'écran, commandes comprises. */
  width: min(100%, calc((100dvh / var(--zoom) - 330px) * 1.6));
  aspect-ratio: 16 / 10;
  margin: 6px auto 34px;
  user-select: none;
}

.felt {
  position: absolute;
  inset: 12% 9% 14%;
  border-radius: 9999px;
  background: #0d2e20;
  border: 12px solid #3a2414;
  outline: 2px solid var(--line);
}

.felt-line {
  position: absolute;
  inset: 8% 6%;
  border-radius: 9999px;
  border: 2px solid rgba(250, 255, 0, 0.26);
}

.felt-logo {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(12px, 2.2vw, 24px);
  letter-spacing: 0.35em;
  color: #17482f;
  white-space: nowrap;
}

.dealer {
  position: absolute;
  left: 50%;
  top: 35%;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.dealer-pic {
  width: clamp(44px, 5.6vw, 64px);
  aspect-ratio: 1;
  border: 2px solid #3a2414;
  border-radius: var(--radius-btn);
  background: var(--bg);
  overflow: hidden;
}

.dealer-name {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8fbfa4;
}

.pboard {
  position: absolute;
  left: 50%;
  top: 53%;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 6px;
}

.pslot {
  width: var(--board-w);
  aspect-ratio: 5 / 7;
  border-radius: min(12px, calc(var(--board-w) * 0.2));
  border: 1px dashed rgba(250, 255, 0, 0.18);
}

.pslot .pcard { --w: var(--board-w); }

.ppot {
  position: absolute;
  left: 50%;
  top: 67%;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--bg);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.2s;
}

.ppot.is-shown { opacity: 1; }

/* Cartes à jouer : « gros index », lisibles à toutes les tailles (js/ui/card-face.js).
   Grande valeur en haut à gauche, couleur dessous, grand symbole en bas à droite.
   Tout est en unités de la carte (cqw) : la même carte sert de 20 à 120 px de large. */
.pcard {
  --w: var(--pcard-w);
  --suit: #15121c;
  position: relative;
  flex: none;
  width: var(--w);
  aspect-ratio: 5 / 7;
  border-radius: max(3px, min(10px, calc(var(--w) * 0.12)));
  background: #fbfaf6;
  color: var(--suit);
  border: 1px solid rgba(0, 0, 0, 0.55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  line-height: 1;
  container-type: inline-size;
  overflow: hidden;
  transition: translate 0.25s, filter 0.25s, box-shadow 0.25s;
}

.pcard.is-red { --suit: #d0182b; }
/* Jeu à 4 couleurs (réglage de la table) : carreau bleu, trèfle vert. */
.cards-4c .pcard.suit-d { --suit: #1b5fd6; }
.cards-4c .pcard.suit-c { --suit: #138a3c; }

/* Valeur et couleur, en haut à gauche et (retournées) en bas à droite. */
.pc-index {
  position: absolute;
  width: 26cqw;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pc-tl { left: 3cqw; top: 4cqw; }
.pc-br { right: 3cqw; bottom: 4cqw; rotate: 180deg; }
.pc-rank {
  font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  font-size: 36cqw;
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.pc-rank.is-ten { font-size: 29cqw; letter-spacing: -0.12em; text-indent: -0.12em; }
.pc-suit { width: 20cqw; height: 20cqw; margin-top: 2cqw; fill: currentColor; }

/* Symboles comptés (2 à 10) : colonnes et rangées posées par --x et --y (0 à 1). */
.pc-pips { position: absolute; left: 38cqw; right: 38cqw; top: 22cqw; bottom: 22cqw; }
.pc-pip {
  position: absolute;
  left: calc(var(--x) * 100%);
  top: calc(var(--y) * 100%);
  width: 16cqw;
  height: 16cqw;
  translate: -50% -50%;
  fill: currentColor;
}
.pc-pip.is-down { rotate: 180deg; }
.pc-ace { position: absolute; left: 50%; top: 50%; width: 46cqw; height: 46cqw; translate: -50% -50%; fill: currentColor; }

/* Figures : portrait encadré d'or (couronne, lettre, symbole), propre à CashKash. */
.pc-figure {
  position: absolute;
  left: 30cqw;
  right: 30cqw;
  top: 9cqw;
  bottom: 9cqw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4cqw;
  border: max(1px, 2cqw) solid #c89b2c;
  border-radius: 6cqw;
  background-color: #f3e9cf;
  background-image:
    repeating-linear-gradient(45deg, rgba(200, 155, 44, 0.2) 0 2cqw, transparent 2cqw 6cqw),
    repeating-linear-gradient(-45deg, rgba(200, 155, 44, 0.2) 0 2cqw, transparent 2cqw 6cqw);
}
.pc-crown {
  width: 30cqw;
  height: 9cqw;
  background: #c89b2c;
  -webkit-mask: var(--crown) center / contain no-repeat;
  mask: var(--crown) center / contain no-repeat;
}
.pc-figure-letter { font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif; font-weight: 700; font-size: 32cqw; line-height: 0.9; }
.pc-figure-suit { width: 20cqw; height: 20cqw; fill: currentColor; }
.pc-figure--J { --crown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 7'%3E%3Cpath d='M1 7h24L22 2l-3 3-6-5-6 5-3-3z'/%3E%3C/svg%3E"); }
.pc-figure--Q { --crown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 7'%3E%3Cpath d='M1 7h24l-2-6-4 3-3-4-3 4-3-4-3 4-4-3z'/%3E%3C/svg%3E"); }
.pc-figure--K { --crown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 7'%3E%3Cpath d='M1 7h24V1l-4 3-4-4-4 4-4-4-4 4-4-3z'/%3E%3C/svg%3E"); }

/* Dos de cartes : par défaut, puis ceux de la boutique. */
.pcard--back {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #7a1f2a;
  background-image:
    repeating-linear-gradient(45deg, rgba(244, 241, 234, 0.12) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgba(244, 241, 234, 0.12) 0 2px, transparent 2px 7px);
}

.pcard--back::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid #f4f1ea;
  border-radius: min(9px, calc(var(--w) * 0.14));
}

.pcard-mark {
  position: relative;
  padding: 0 3px;
  border-radius: 3px;
  background: #0a0a0a;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: calc(var(--w) * 0.26);
  color: var(--accent);
}

.back-dos-saloon {
  background-color: #3b2414;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M0 0h20v1H0zM0 10h20v1H0z' fill='%23281709'/%3E%3Cpath d='M2 3h7v5H2zM11 3h7v5h-7zM2 13h7v5H2zM11 13h7v5h-7z' fill='none' stroke='%23d9a441' stroke-opacity='.35'/%3E%3C/svg%3E");
}
.back-dos-saloon::before { border-color: #d9a441; }

.back-dos-fer {
  background-color: #1d3a2b;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Cpath d='M5 15V8a4 4 0 0 1 8 0v7' fill='none' stroke='%23c9ccd2' stroke-width='2.2'/%3E%3Ccircle cx='5' cy='13' r='.6' fill='%231d3a2b'/%3E%3Ccircle cx='13' cy='13' r='.6' fill='%231d3a2b'/%3E%3C/svg%3E");
  background-size: 14px 14px;
}
.back-dos-fer::before { border-color: #c9ccd2; }

.back-dos-etoile {
  background-color: #141c3a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M8 2l1.6 3.9 4.2.3-3.2 2.7 1 4.1L8 10.8 4.4 13l1-4.1L2.2 6.2l4.2-.3z' fill='%23e6b93a'/%3E%3C/svg%3E");
  background-size: 12px 12px;
}
.back-dos-etoile::before { border-color: #e6b93a; }

/* Passe Poker : lanternes de mine et pépites sur fond de roche. */
.back-dos-mine {
  background-color: #2a2220;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M7 4h6v2H7z' fill='%2355555e'/%3E%3Cpath d='M7.5 6h5v7h-5z' fill='%23e6b93a' fill-opacity='.9'/%3E%3Cpath d='M9 8h2v3H9z' fill='%23fff4a0'/%3E%3Cpath d='M7 13h6v1.5H7z' fill='%2355555e'/%3E%3Ccircle cx='3' cy='17' r='1.2' fill='%23e6c050'/%3E%3Ccircle cx='17' cy='3' r='.9' fill='%23e6c050'/%3E%3C/svg%3E");
  background-size: 16px 16px;
}
.back-dos-mine::before { border-color: #e6b93a; }

.back-dos-or {
  background-color: #b8902c;
  background-image:
    repeating-linear-gradient(45deg, #e6c45a 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, #8a6a1c 0 1px, transparent 1px 5px);
}
.back-dos-or::before { border-color: #0a0a0a; }

.pcard.is-hidden { visibility: hidden; }

/* Joueurs autour de la table */
.seats-layer,
.bets-layer,
.fly-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bets-layer { z-index: 2; }
.seats-layer { z-index: 3; }
.fly-layer { z-index: 6; }

.fly-layer > * {
  position: absolute;
  left: 0;
  top: 0;
}

/* Un siège : personnage et cartes côte à côte (cartes du côté du centre),
   plaque nom + tapis dessous. */
.pseat {
  position: absolute;
  width: max-content;
  min-width: var(--seat-w);
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "avatar cards"
    "plate plate"
    "tag tag"
    "timer timer";
  justify-content: center;
  justify-items: center;
  align-items: center;
  column-gap: 2px;
  row-gap: 2px;
  transition: left 0.4s, top 0.4s;
}

.pseat[data-side="right"] { grid-template-areas: "cards avatar" "plate plate" "tag tag" "timer timer"; }
.pseat-avatar { grid-area: avatar; }
.pseat-plate { grid-area: plate; }
.pseat-tag { grid-area: tag; }
.pseat-timer { grid-area: timer; }

.pseat-cards {
  grid-area: cards;
  display: flex;
  gap: 1px;
  min-width: calc(var(--pcard-w) * 2);
  height: calc(var(--pcard-w) * 1.4);
}

.pseat-cards.is-shown .pcard { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Choix après un coup gagné sans abattage. */
.show-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-card);
}

.show-question { flex: 1 1 220px; font-size: 13px; }
.show-box .btn { flex: 1 1 120px; }

.pseat-cards .pcard:first-child { rotate: -6deg; }
.pseat-cards .pcard:last-child { rotate: 6deg; }

.pseat-avatar {
  width: var(--avatar-w);
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--bg);
  overflow: hidden;
}

.pseat-plate {
  min-width: 84px;
  max-width: 100%;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pseat-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 12px;
}

.pseat-stack {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pseat-tag {
  min-height: 1.3em;
  max-width: 140%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
}

.pseat-timer {
  width: 84px;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
  visibility: hidden;
}

.pseat-timer.is-on { visibility: visible; }
.pseat-timer span { display: block; width: 100%; height: 100%; background: var(--accent); }

.pseat.is-you { --pcard-w: var(--you-card-w); }
.pseat.is-you .pseat-avatar { width: calc(var(--avatar-w) + 10px); }

.pseat.is-turn .pseat-avatar { border-color: var(--accent); }
.pseat.is-turn .pseat-name { color: var(--accent); }
.pseat.is-winner .pseat-avatar { border-color: var(--accent); }
.pseat.is-winner .pseat-tag { color: var(--accent); font-weight: 700; }

.pseat.is-folded .pseat-avatar,
.pseat.is-out .pseat-avatar,
.pseat.is-away .pseat-avatar { opacity: 0.45; }

.pseat.is-folded .pseat-cards { opacity: 0.4; }
.pseat.is-empty { opacity: 0.45; }
.pseat.is-empty .pseat-avatar { border-style: dashed; }

/* Mises, jetons, bouton du donneur */
.pbet {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 3px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--bg);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.15s, left 0.4s, top 0.4s;
}

.pbet.is-shown { opacity: 1; }

/* Jeton : couleur selon le montant, liseré à encoches et cœur clair. */
.chip {
  --chip: var(--accent);
  --edge: #0a0a0a;
  flex: none;
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--chip) 0 34%, var(--edge) 34% 40%, transparent 40%),
    conic-gradient(var(--chip) 0 30deg, #f4f1ea 30deg 60deg, var(--chip) 60deg 120deg, #f4f1ea 120deg 150deg,
      var(--chip) 150deg 210deg, #f4f1ea 210deg 240deg, var(--chip) 240deg 300deg, #f4f1ea 300deg 330deg, var(--chip) 330deg);
  border: 1px solid var(--edge);
}

.chip--w { --chip: #e9e6dd; --edge: #3a3a40; }
.chip--w { background:
    radial-gradient(circle, #e9e6dd 0 34%, #3a3a40 34% 40%, transparent 40%),
    conic-gradient(#e9e6dd 0 30deg, #2f5bd3 30deg 60deg, #e9e6dd 60deg 120deg, #2f5bd3 120deg 150deg,
      #e9e6dd 150deg 210deg, #2f5bd3 210deg 240deg, #e9e6dd 240deg 300deg, #2f5bd3 300deg 330deg, #e9e6dd 330deg); }
.chip--r { --chip: #c0262d; }
.chip--g { --chip: #1f8a4c; }
.chip--k { --chip: #18181b; --edge: #b8902c; }

.chip--fly { width: 14px; height: 14px; }

/* Pile du pot : deux tranches de jetons sous le jeton du dessus. */
.chip--stack { margin-top: -4px; }
.chip--stack::before,
.chip--stack::after {
  content: '';
  position: absolute;
  left: -1px;
  right: -1px;
  height: 4px;
  border: 1px solid var(--edge);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  background: var(--chip);
  z-index: -1;
}
.chip--stack::before { top: 9px; }
.chip--stack::after { top: 12px; background: #f4f1ea; }

.dbutton {
  position: absolute;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: #fafafa;
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s, left 0.5s, top 0.5s;
}

.dbutton.is-shown { opacity: 1; }

/* Actions sous la table */
.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.rebuy { display: flex; gap: 6px; }
.input--small { min-height: 32px; width: 120px; }

.tour-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tour-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tour-stat strong { font-size: 13px; overflow-wrap: anywhere; }

.ranking {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.ranking li { display: grid; grid-template-columns: 4ch minmax(0, 1fr) auto; gap: 8px; color: var(--muted); }
.ranking li.is-paid { color: var(--text); }
.rank-prize { color: var(--accent); font-weight: 700; }

/* Table en 3D (voxels) : le canevas dessine la salle, la table et les joueurs ;
   cartes, jetons et noms sont posés par-dessus. */
.scene3d {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-card);
}

.stage.is-3d .felt,
.stage.is-3d .dealer,
.stage.is-3d .pseat-avatar { display: none; }

.stage.is-3d .pseat {
  grid-template-columns: auto;
  grid-template-areas: "plate" "tag" "timer";
  min-width: 0;
}

.stage.is-3d .pseat-plate { min-width: 72px; padding: 1px 8px; }
.stage.is-3d .pseat.is-turn .pseat-plate { border-color: var(--accent); }
.stage.is-3d .pseat.is-winner .pseat-plate { border-color: var(--accent); }
.stage.is-3d .pseat-tag { padding: 0 4px; border-radius: var(--radius-btn); background: var(--bg); }
.stage.is-3d .pseat-tag:empty { visibility: hidden; }
.stage.is-3d .pboard { gap: 4px; }

.cards-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.pcards-float {
  position: absolute;
  transform: translate(-50%, -50%);
}

.pcards-float .pseat-cards { min-width: 0; }
.pcards-float.is-you { --pcard-w: var(--you-card-w); }

/* Tailles selon le nombre de places et l'écran */
.stage[data-size="9"] { --seat-w: 100px; --avatar-w: 46px; --pcard-w: 32px; }

@media (max-width: 559px) {
  .page-table .wallets { display: none; }
  .page-table .topbar { grid-template-areas: "brand user" "nav nav"; }
}

@media (max-width: 700px) {
  .stage {
    aspect-ratio: 5 / 6;
    --seat-w: 84px;
    --avatar-w: 40px;
    --pcard-w: 25px;
    --you-card-w: 42px;
    --board-w: clamp(36px, 11.5vw, 53px);
  }
  .stage[data-size="9"] { --seat-w: 70px; --avatar-w: 32px; --pcard-w: 21px; }
  .stage { width: 100%; }
  .felt { inset: 10% 11% 12%; border-width: 8px; }
  .dealer { top: 33%; }
  .pseat-plate { min-width: 0; width: 100%; padding: 1px 4px; }
  .pseat-name,
  .pseat-stack { font-size: 11px; }
  .pseat-tag { font-size: 10px; }
  .pseat-timer { width: 60px; }
  .tour-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.motion-on) .pseat,
  html:not(.motion-on) .pbet,
  html:not(.motion-on) .dbutton,
  html:not(.motion-on) .ppot { transition: none; }
}

/* ---------- Lobby du poker ---------- */

.lobby {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lobby-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.lobby-tabs .btn { padding: 0 4px; }

.lobby-tabs .btn[aria-selected="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.lobby-split {
  display: grid;
  gap: 12px;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.level-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.level-card:hover { border-color: var(--text); }
.level-card[aria-pressed="true"] { border-color: var(--accent); }
.level-card[aria-pressed="true"] .level-blinds { color: var(--accent); }
.level-card.is-short { opacity: 0.5; }

.level-blinds {
  font-family: var(--font-display);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.buyin {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.buyin-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.buyin-head strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.bot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
}

.room-list,
.tour-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.room-item,
.tour-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 10px 12px;
}

.room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Tables publiques : portraits des vrais joueurs assis. */
.public-list { margin-top: 12px; }
.public-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.public-faces { display: flex; gap: 4px; flex-wrap: wrap; }
.public-faces .pixel { width: 28px; height: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-btn); }
.choice-badge {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  margin-left: 6px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.tour-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tour-item .hint { margin: 0; }

.tour-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.tour-time {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--accent);
}

.tour-name { font-weight: 500; }

.tour-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-ok {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.code-input {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-family: var(--font-display);
  font-size: 20px;
}

.queue-box { display: flex; flex-direction: column; gap: 8px; }

.blink { animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

@media (min-width: 768px) {
  .lobby-split { grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (max-width: 559px) {
  .lobby-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lobby-tabs .btn { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.motion-on) .blink { animation: none; }
}

/* ---------- Statut et commandes ---------- */

.status {
  margin: 0;
  min-height: 1.4em;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.status.is-you { color: var(--accent); }
.status.is-urgent { color: #ff5c5c; animation: thinking-pulse 0.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { html:not(.motion-on) .status.is-urgent { animation: none; } }

.controls {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  touch-action: manipulation;
}

.btn:hover:not(:disabled) { border-color: var(--text); }

.btn:disabled {
  color: var(--muted);
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover:not(:disabled) { border-color: var(--accent); }

.btn--primary:disabled {
  background: var(--bg);
  border-color: var(--line);
}

.btn--small {
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.raise-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.presets {
  display: flex;
  gap: 4px;
}

input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
}

input[type="range"]:disabled { opacity: 0.45; }

output {
  min-width: 6ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Journal ---------- */

.log {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 8px 12px;
}

.log summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}

.log ol {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.log li { color: var(--muted); }
.log li.kind-hand { color: var(--text); margin-top: 6px; }
.log li.kind-result { color: var(--text); }
.log li.kind-memory { color: var(--accent); } /* mémoire des bots : bluff démasqué, méfiance */

.footer {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 8px 0;
}

/* ---------- Boutique ---------- */

.dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh / var(--zoom) - 32px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--text);
}

.dialog::backdrop { background: rgba(10, 10, 10, 0.85); }

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
}

.dialog-head form { margin: 0; }

.dialog-note,
.dialog-legal {
  font-size: 12px;
  color: var(--muted);
}

.dialog-note strong { color: var(--accent); font-weight: 500; }
.dialog-legal { margin-bottom: 0; }

.shop { display: flex; flex-direction: column; gap: 16px; }

.shop-layout { display: grid; gap: 16px; }

@media (min-width: 860px) {
  .shop-layout { grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
  .fitting { position: sticky; top: 52px; }
  .fitting-pair { flex-direction: column; }
  .fitting-3d { width: 100%; }
}

.fitting { display: flex; flex-direction: column; gap: 8px; }
.fitting h2 { margin: 0; }
.fitting-pair { display: flex; gap: 8px; }
.fitting-2d { width: 120px; aspect-ratio: 1 / 2; /* personnage en pied : proportions réalistes */ border: 1px solid var(--line); border-radius: var(--radius-card); background: #120d0a; }
.fitting-3d { width: 150px; }
.fitting-cards { display: flex; gap: 4px; flex-wrap: wrap; }
.fitting .hint { margin: 0; }

.shop-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.shop-main .lobby-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.pay-with { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pay-with .choice[aria-checked="true"] { border-color: var(--accent); color: var(--accent); }

.shop-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

/* Une carte d'article. La rareté se lit à la pastille et au liseré du haut. */
.shop-card {
  --rarity: #a1a1aa;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--rarity);
  border-radius: var(--radius-card);
  background: var(--bg);
}

.rarity-rare { --rarity: #4f8bd6; }
.rarity-epique { --rarity: #a15ad6; }
.rarity-legendaire { --rarity: #e6c050; }
.shop-card.is-owned { border-color: var(--accent); border-top-color: var(--rarity); }

.shop-card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }

.rarity {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rarity, var(--muted));
}

.rarity::before { content: ''; width: 7px; height: 7px; border-radius: 1px; background: var(--rarity, var(--muted)); rotate: 45deg; }

.price {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.price .chip { width: 13px; height: 13px; }
.price--eur { color: var(--muted); font-weight: 500; }
.price--pass { font-size: 11px; color: var(--accent); font-weight: 500; white-space: nowrap; }
.shop-card-head { min-height: 20px; }
.shop-card-head .rarity { white-space: nowrap; }

.shop-preview {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: #120d0a;
  background-image: repeating-linear-gradient(90deg, rgba(255, 244, 208, 0.03) 0 6px, transparent 6px 12px);
  overflow: hidden;
}

/* Tous les aperçus du personnage : même marge, centrés dans leur cadre. */
.shop-preview.pixel svg { display: block; width: auto; height: calc(100% - 10px); max-width: calc(100% - 10px); margin: auto; }
.shop-preview--outfit.pixel svg { height: calc(100% - 6px); }
/* Miniatures 3D suréchantillonnées (jusqu'à 4 × la taille affichée) : réduction lissée. */
.shop-preview img { max-width: 100%; max-height: 100%; width: auto; height: 100%; object-fit: contain; image-rendering: auto; }
.shop-preview .emote--face .emote-char { width: 92px; height: 92px; }
/* Deux dos de cartes en éventail, centrés ensemble. */
.shop-preview--cardback { gap: 0; }
.shop-preview--cardback .pcard:first-child { rotate: -6deg; translate: 6px 0; }
.shop-preview--cardback .pcard:last-child { rotate: 6deg; translate: -6px 0; }

.shop-card-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.shop-name { font-family: var(--font-display); font-weight: 500; }
.shop-desc { font-size: 12px; color: var(--muted); }

.shop-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: stretch; }
.shop-actions .btn { flex: 1; min-height: 36px; height: auto; padding-block: 4px; line-height: 1.2; }
.shop-actions .btn:disabled { opacity: 0.6; cursor: not-allowed; }
.shop-owned { font-size: 12px; color: var(--accent); }

/* Passe Poker */
.pass-head { display: grid; gap: 10px; }
.pass-head h2 { margin: 0 0 4px; }
.pass-progress { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.pass-premium {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-style: dashed;
}

.pass-premium > div { display: flex; flex-direction: column; gap: 2px; }
.pass-premium .btn:disabled { opacity: 0.6; cursor: not-allowed; }

.pass-track {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}

.tier {
  flex: none;
  width: 104px;
  display: grid;
  grid-template-rows: auto 150px 150px;
  gap: 6px;
  scroll-snap-align: start;
}

.tier--legend { width: 64px; position: sticky; left: 0; z-index: 1; background: var(--bg); }
.track-label { display: flex; align-items: center; font-size: 11px; color: var(--muted); writing-mode: vertical-rl; rotate: 180deg; justify-self: center; }

.tier-num {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 2px 0;
  border-bottom: 3px solid var(--line);
  color: var(--muted);
}

.tier.is-reached .tier-num { border-color: var(--accent); color: var(--text); }
.tier.is-current .tier-num { color: var(--accent); }
/* Grands paliers (tous les 10) : cadre doré et léger halo. */
.tier.is-milestone .tier-num { color: #e6c050; border-bottom-color: #e6c050; }
.tier.is-milestone .reward { border-color: #e6c050; box-shadow: 0 0 0 1px rgb(230 192 80 / 0.25), inset 0 0 18px rgb(230 192 80 / 0.12); }
.pass-next { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pass-next[hidden] { display: none; }
.pass-next .reward { flex-direction: row; min-height: 0; padding: 6px 10px; }
#pass-claim-all { justify-self: start; }

.reward {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  text-align: center;
  font-size: 11px;
}

.reward.is-empty { border-style: dashed; opacity: 0.35; }
.reward--premium { border-style: dashed; color: var(--muted); }
.reward--premium > *:not(.reward-state) { opacity: 0.7; }
.tier.is-reached .reward:not(.reward--premium):not(.is-empty) { border-color: var(--accent); }
.reward.is-claimed { opacity: 0.55; }
.reward-chips { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.reward-name { line-height: 1.2; }
.reward-state { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.reward--premium .reward-state { color: #e6c050; }
.reward-pic { width: 48px; height: 48px; }
.reward-pic--boots, .reward-pic--seat { width: 58px; height: 48px; }
.reward-pic svg { display: block; width: 100%; height: 100%; }
.reward img { image-rendering: auto; object-fit: contain; }

/* Bouton de qualité du rendu 3D. */
.reward .emote { scale: 0.75; }
.reward .emote--face { scale: 0.62; margin: -12px 0; }

/* Packs (maquettes) */
.pack-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.pack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.pack .rarity { --rarity: var(--accent); }
.pack-art {
  height: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  padding-bottom: 14px;
  border-radius: var(--radius-btn);
  background: #120d0a;
}

.pack-art { height: 120px; padding-bottom: 10px; gap: 4px; }
.pack-pile { display: flex; flex-direction: column-reverse; align-items: center; }
/* Chaque jeton recouvre le précédent : on ne voit que sa tranche, le dernier montre sa face. */
.pack-pile .chip { width: 26px; height: 12px; border-radius: 50%; margin-top: -8px; }
.pack-pile .chip:first-child { margin-top: 0; }
.pack-pile .chip:last-child { height: 14px; }
.pack-amount { margin: 0; }
.pack-amount strong { font-family: var(--font-display); font-size: 20px; }
.pack-extra { font-size: 12px; color: var(--accent); }
.pack .btn:disabled { opacity: 0.6; cursor: not-allowed; margin-top: auto; }

/* Caisse (interface seulement, aucun paiement) */
.checkout { width: min(620px, calc(100vw - 32px)); }
.checkout[open] { display: flex; flex-direction: column; gap: 12px; }

.checkout-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  counter-reset: step;
}

.checkout-steps li {
  counter-increment: step;
  padding-top: 6px;
  border-top: 3px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.checkout-steps li::before { content: counter(step) '. '; }
.checkout-steps li.is-done { border-color: var(--text); color: var(--text); }
.checkout-steps li.is-current { border-color: var(--accent); color: var(--accent); }

.checkout-order {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

@media (max-width: 480px) {
  .checkout-order { grid-template-columns: 1fr; }
}

.checkout-art > * { height: 120px; }
.checkout-art .shop-preview { margin: 0; }
.checkout-detail { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.checkout-lines { margin: 0; padding-left: 18px; font-size: 12px; color: var(--muted); }

.checkout-total {
  margin: auto 0 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.checkout-total strong { font-family: var(--font-display); font-size: 24px; }
.checkout-h { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--muted); }

.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; }

.pay-method {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.pay-method span { font-size: 11px; color: var(--muted); }
.pay-method[aria-checked="true"] { border-color: var(--accent); }
.pay-method[aria-checked="true"] strong { color: var(--accent); }

.checkout-legal { margin: 0; padding-left: 18px; font-size: 11px; color: var(--muted); display: grid; gap: 2px; }
.checkout-legal strong { color: var(--text); font-weight: 500; }
.checkout #co-pay:disabled { opacity: 0.55; cursor: not-allowed; }
.checkout .notice { margin: 0; }

.checkout-pass {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 3px solid #e6c050;
  border-radius: var(--radius-card);
  background: #120d0a;
  font-family: var(--font-display);
}

.checkout-pass strong { font-size: 26px; color: #e6c050; letter-spacing: 0.1em; }
.checkout-pass span { font-size: 14px; letter-spacing: 0.2em; }
.checkout-pass-season { color: var(--muted); font-size: 11px !important; letter-spacing: 0.04em !important; }

/* ---------- Emotes ---------- */

/* Une emote : bulle (icône ou visage + texte), particules autour. */
.emote {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  isolation: isolate;
}

.emote-icon svg { display: block; }

/* Texte en bulle de bande dessinée, avec sa pointe vers le joueur. */
.emote-text {
  position: relative;
  padding: 2px 8px;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: #fffdf2;
  color: #141018;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.emote-text::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  translate: -50% 0;
  border: 6px solid transparent;
  border-top-color: var(--accent);
  border-bottom: 0;
}

/* Animations fluides (courbes d'accélération) plutôt que saccadées. */
.emote--yeehaw .emote-icon { animation: emote-hat-toss 1.1s cubic-bezier(.3, 1.4, .5, 1) infinite; transform-origin: 50% 100%; }
.emote--chapeau .emote-icon { animation: emote-tip 1.5s ease-in-out infinite; transform-origin: 15% 100%; }
.emote--lasso .emote-icon { animation: emote-lasso 1.3s linear infinite; }
.emote--pepites .emote-icon { animation: emote-bounce 0.9s cubic-bezier(.3, 1.6, .5, 1) infinite; }
.emote--tumbleweed .emote-icon { animation: emote-roll 2.2s ease-in-out infinite; }
.emote .emote-text { animation: emote-bubble 2.4s ease-in-out infinite; }

@keyframes emote-hat-toss {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  35% { translate: 0 -16px; rotate: -18deg; }
  55% { translate: 0 -18px; rotate: 14deg; }
  80% { translate: 0 0; rotate: 0deg; }
}
@keyframes emote-tip { 0%, 60%, 100% { rotate: 0deg; translate: 0 0; } 25% { rotate: -28deg; translate: 0 -4px; } 40% { rotate: -22deg; translate: 0 -4px; } }
@keyframes emote-lasso { from { rotate: 0deg; scale: 1 0.8; } 50% { scale: 1.1 0.9; } to { rotate: 360deg; scale: 1 0.8; } }
@keyframes emote-bounce { 0%, 100% { translate: 0 0; scale: 1 1; } 40% { translate: 0 -10px; scale: 0.95 1.05; } 70% { translate: 0 0; scale: 1.1 0.9; } }
@keyframes emote-roll { 0% { translate: -26px 0; rotate: 0deg; } 50% { translate: 26px -4px; rotate: 360deg; } 100% { translate: -26px 0; rotate: 720deg; } }
@keyframes emote-bubble { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2px; } }

/* Emotes à l'effigie du personnage : buste + expression animée par-dessus, anneau qui pulse. */
.emote-char {
  position: relative;
  display: block;
  width: 56px;
  height: 56px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: #120d0a;
  overflow: hidden;
  animation: emote-ring 1.2s ease-in-out infinite;
}

@keyframes emote-ring { 0%, 100% { border-color: var(--accent); } 50% { border-color: #fffdf2; } }

.emote-face,
.emote-fx { position: absolute; inset: 0; }
.emote-fx svg g { transform-box: fill-box; transform-origin: center; }

.emote--rire .emote-char { animation: emote-ring 1.2s ease-in-out infinite, emote-laugh 0.32s ease-in-out infinite; }
.emote--rire .fx-drip { animation: emote-drip 0.9s ease-in infinite; }
.emote--clin .fx-blink { animation: emote-blink 1.6s steps(1) infinite; }
.emote--clin .fx-spark { animation: emote-spark 0.9s ease-in-out infinite; }
.emote--choc .emote-char { animation: emote-ring 0.6s ease-in-out infinite, emote-jolt 0.8s cubic-bezier(.3, 1.6, .5, 1) infinite; }
.emote--choc .fx-bang { animation: emote-spark 0.5s ease-in-out infinite; }
.emote--pouce .fx-thumb { animation: emote-pop 1.4s cubic-bezier(.3, 1.6, .5, 1) infinite; transform-origin: bottom; }
.emote--larmes .fx-tear { animation: emote-tear 1.1s ease-in infinite; }
.emote--larmes .fx-tear--2 { animation-delay: -0.55s; }
.emote--larmes .emote-char { animation: emote-ring 2s ease-in-out infinite, emote-sob 0.7s ease-in-out infinite; }
.emote--colere .emote-char { animation: emote-ring-red 0.5s ease-in-out infinite, emote-shake 0.18s linear infinite; }
.emote--colere .fx-flush { animation: emote-flush 0.9s ease-in-out infinite; }
.emote--colere .fx-steam { animation: emote-steam 1s ease-out infinite; }
.emote--colere .fx-vein { animation: emote-spark 0.6s ease-in-out infinite; }
.emote--lunettes .fx-shades { animation: emote-shades 2.4s cubic-bezier(.5, 0, .3, 1.5) infinite; }
.emote--bisou .fx-heart { animation: emote-heart 1.5s ease-out infinite; }

@keyframes emote-laugh { 0%, 100% { translate: 0 0; rotate: -2deg; } 50% { translate: 0 -3px; rotate: 2deg; } }
@keyframes emote-jolt { 0%, 100% { translate: 0 0; scale: 1; } 30% { translate: 0 -10px; scale: 1.08; } }
@keyframes emote-ring-red { 0%, 100% { border-color: #e02a2a; } 50% { border-color: var(--accent); } }
@keyframes emote-drip { 0% { translate: 0 0; opacity: 1; } 100% { translate: 0 8px; opacity: 0; } }
@keyframes emote-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes emote-spark { 0%, 100% { scale: 0.6; opacity: 0.6; } 50% { scale: 1.25; opacity: 1; } }
@keyframes emote-pop { 0% { scale: 0; } 25%, 85% { scale: 1; } 50% { scale: 1.18; } 100% { scale: 1; } }
@keyframes emote-tear { 0% { translate: 0 0; opacity: 1; } 100% { translate: 0 12px; opacity: 0; } }
@keyframes emote-sob { 0%, 100% { translate: 0 0; } 50% { translate: 0 2px; } }
@keyframes emote-shake { 0%, 100% { translate: 0 0; } 25% { translate: -2px 1px; } 75% { translate: 2px -1px; } }
@keyframes emote-flush { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
@keyframes emote-steam { 0% { translate: 0 2px; opacity: 1; scale: 0.8; } 100% { translate: 0 -8px; opacity: 0; scale: 1.3; } }
@keyframes emote-shades { 0% { translate: 0 -28px; } 30%, 100% { translate: 0 0; } }
@keyframes emote-heart { 0% { translate: 0 0; opacity: 1; scale: 0.6; } 100% { translate: 5px -20px; opacity: 0; scale: 1.3; } }

/* Particules autour de l'emote. */
.emote-particles {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 0;
  height: 0;
  z-index: -1;
  pointer-events: none;
}

.ptc {
  position: absolute;
  left: -7px;
  top: -7px;
  width: 14px;
  height: 14px;
  opacity: 0;
  animation: ptc-burst 1.4s cubic-bezier(.2, .8, .3, 1) var(--d) infinite;
}

.ptc svg { display: block; width: 100%; height: 100%; }

.ptc--text {
  width: auto;
  height: auto;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  -webkit-text-stroke: 1px #141018;
}

.ptc-path--rain .ptc { animation-name: ptc-rain; animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
.ptc-path--float .ptc { animation-name: ptc-float; animation-timing-function: ease-out; animation-duration: 1.8s; }
.ptc-path--ring .ptc { animation-name: ptc-twinkle; animation-timing-function: ease-in-out; }
.ptc-path--ground .ptc { animation-name: ptc-dust; animation-timing-function: ease-out; }

@keyframes ptc-burst {
  0% { transform: translate(0, 0) scale(0.2) rotate(0deg); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(var(--s)) rotate(var(--r)); opacity: 0; }
}
@keyframes ptc-rain {
  0% { transform: translate(var(--dx), -38px) rotate(0deg); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
}
@keyframes ptc-float {
  0% { transform: translate(calc(var(--dx) * 0.4), 8px) scale(0.5); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(var(--s)); opacity: 0; }
}
@keyframes ptc-twinkle {
  0%, 100% { transform: translate(var(--dx), var(--dy)) scale(0) rotate(0deg); opacity: 0; }
  50% { transform: translate(var(--dx), var(--dy)) scale(var(--s)) rotate(45deg); opacity: 1; }
}
@keyframes ptc-dust {
  0% { transform: translate(0, var(--dy)) scale(0.4); opacity: 0; }
  25% { opacity: 0.9; }
  100% { transform: translate(var(--dx), calc(var(--dy) - 10px)) scale(var(--s)); opacity: 0; }
}

/* À la table : l'emote surgit, vit trois secondes, puis s'envole. */
.pseat-emote .emote { animation: emote-in 0.45s cubic-bezier(.3, 1.6, .5, 1) both; scale: 1.1; }
.pseat-emote.is-leaving .emote { animation: emote-out 0.4s ease-in forwards; }
@keyframes emote-in { 0% { transform: scale(0.1) rotate(-12deg); opacity: 0; } 70% { transform: scale(1.12) rotate(3deg); opacity: 1; } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }
@keyframes emote-out { to { transform: translateY(-24px) scale(0.8); opacity: 0; } }

/* Animations réduites (réglage du système) : on les coupe, sauf dans les aperçus de la
   boutique (.motion-on), où l'on doit pouvoir voir l'animation avant l'achat (bouton pause). */
@media (prefers-reduced-motion: reduce) {
  .emote:not(.motion-on *) .emote-icon,
  .emote:not(.motion-on *) .emote-char,
  .emote:not(.motion-on *) .emote-text,
  .emote-fx:not(.motion-on *) svg g,
  .pseat-emote:not(.motion-on *) .emote,
  .pseat-emote.is-leaving:not(.motion-on *) .emote { animation: none; }
  .emote-particles:not(.motion-on *) { display: none; }
}
.motion-on.is-paused *,
.motion-on.is-paused *::before,
.motion-on.is-paused *::after { animation-play-state: paused !important; }

/* Animations de la table : pièces d'or, bandeau, tapis. */
.coin {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e6c050;
  border: 2px solid #8a6a1c;
  pointer-events: none;
}

.coin:nth-child(3n) { background: #fff4a0; }

.table-banner {
  position: absolute;
  left: 50%;
  top: 40%;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 18px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-card);
  background: var(--bg);
  pointer-events: none;
  white-space: nowrap;
}

.table-banner strong {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 34px);
  letter-spacing: 0.06em;
  color: var(--accent);
}

.table-banner span { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.table-banner--big { border-color: #e6c050; border-width: 3px; }
.table-banner--big strong { color: #e6c050; }

.allin-flash {
  z-index: 7;
  padding: 2px 8px;
  border: 2px solid var(--bg);
  border-radius: var(--radius-btn);
  background: #c0262d;
  color: #fafafa;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
}

/* Emote affichée au-dessus d'un joueur, à la table. */
.pseat-emote {
  position: absolute;
  left: 50%;
  bottom: 100%;
  translate: -50% -6px;
  z-index: 5;
  pointer-events: none;
}

.emote-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.emote-bar .choice { min-height: 30px; padding: 0 6px; }
.emote-bar .emote { scale: 0.6; margin: -10px -14px; }
.emote-bar .emote--face { scale: 0.5; margin: -14px -14px; }
.emote-bar .emote-text { display: none; }


@media (max-width: 400px) {
  .action-row .btn { padding: 0 4px; font-size: 12px; line-height: 1.2; }
}

/* ---------- Écrans larges : en-tête sur une ligne ---------- */

@media (min-width: 860px) {
  .topbar {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "brand nav wallets user";
  }
  .nav { display: flex; }
}

/* Téléphone : les soldes passent sur leur propre ligne. */
@media (max-width: 559px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand user"
      "nav nav"
      "wallets wallets";
  }
  .wallets {
    justify-self: stretch;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: var(--radius-btn);
    padding: 6px 10px;
  }
  .wallet {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
  }
  .nav a,
  .nav button { padding: 0 4px; font-size: 11px; }
}


/* ---------- Titres, panneaux, formulaires ---------- */

.page-title {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
}

.page-lead {
  margin: 0;
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.panel h2,
.panel h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#auth form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

ul.hint {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label,
.field-label {
  font-size: 12px;
  color: var(--muted);
}

.input {
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.input:focus { border-color: var(--text); outline: none; }
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hint { margin: 0; font-size: 12px; color: var(--muted); }

.notice {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  font-size: 13px;
}

.notice--ok { border-color: var(--accent); }
.notice--ok strong { color: var(--accent); font-weight: 500; }
.notice--error { border-color: var(--text); }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.tabs .btn[aria-selected="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
}

.btn--block { width: 100%; }

a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* ---------- Accueil ---------- */

.hero {
  display: grid;
  gap: 16px;
}

.hero-cast {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  max-width: 420px;
}

.hero-cast .pixel {
  aspect-ratio: 1 / 2; /* personnage en pied : proportions réalistes */
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 4px;
}

.hub {
  display: grid;
  gap: 12px;
}

.profile-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.profile-card .pixel {
  aspect-ratio: 1 / 2; /* personnage en pied : proportions réalistes */
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 6px;
}

.profile-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.game-cards {
  display: grid;
  gap: 12px;
}

.game-card .big-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.history li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  color: var(--muted);
}

.history .plus { color: var(--accent); }

@media (min-width: 768px) {
  .hero { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .game-cards { grid-template-columns: 1fr 1fr; }
}

/* ---------- Éditeur de personnage ---------- */

.editor {
  display: grid;
  gap: 12px;
}

.editor-preview {
  position: sticky;
  top: 44px;
  z-index: 2;
  background: var(--bg);
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
}

.editor-preview .pixel {
  width: 96px;
  aspect-ratio: 1 / 2; /* personnage en pied : proportions réalistes */
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 6px;
  flex: none;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.option-group legend {
  padding: 0;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.choice {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.choice:hover { border-color: var(--text); }

.choice[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.swatch {
  width: 36px;
  height: 36px;
  padding: 4px;
}

.swatch span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
}

.editor-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px;
}

.preview-pair {
  display: flex;
  flex-wrap: wrap; /* le bouton « 3D » passe dessous sur les petits écrans */
  gap: 8px;
  flex: none;
  max-width: 100%;
}

.editor-preview { flex-wrap: wrap; }

.viewer3d {
  position: relative;
  width: 160px;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #120c08;
  cursor: grab;
}

/* Après la règle de base : sinon les 160 px l'emportent et la page déborde sur téléphone. */
@media (max-width: 767px) {
  .viewer3d { width: 120px; }
}

.viewer3d canvas { display: block; width: 100%; height: 100%; }

.viewer-hint {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  pointer-events: none;
}

.level-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.level-badge {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--accent);
}

.xp-bar {
  flex: 1;
  min-width: 140px;
  height: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  overflow: hidden;
}

.xp-bar span { display: block; height: 100%; width: 0; background: var(--accent); }

.seat-gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}

.seat-chip {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.seat-chip span { font-size: 11px; color: var(--muted); }
.seat-chip.is-locked { opacity: 0.5; }
.choice.is-locked { opacity: 0.45; border-style: dashed; cursor: not-allowed; }
.choice.is-locked:hover { border-color: var(--line); }
.seat-chip[aria-pressed="true"] { border-color: var(--accent); }
.seat-chip[aria-pressed="true"] strong { color: var(--accent); }

@media (min-width: 768px) {
  .editor { grid-template-columns: 240px minmax(0, 1fr); align-items: start; }
  .preview-pair { flex-direction: column; }
  .viewer3d { width: 100%; }
  .editor-preview { flex-direction: column; align-items: stretch; top: 52px; }
  .editor-preview .pixel { width: 100%; }
}

/* ---------- Échecs ---------- */

.chess-layout {
  display: grid;
  gap: 12px;
}

.board-wrap {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.chess-board {
  --sq-light: #3f3f46;
  --sq-dark: #27272a;
  --board-frame: #27272a;
  --sq-coord: #a1a1aa;
  --sq-mark: #faff00;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  aspect-ratio: 1;
  border: 6px solid var(--board-frame);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.sq {
  position: relative;
  aspect-ratio: 1;
  padding: 8%;
  border: 0;
  background: var(--sq-dark);
  cursor: pointer;
  min-width: 0;
}

.sq.light { background: var(--sq-light); }
.sq.last::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sq-mark);
  opacity: 0.22;
}

.sq.selected { outline: 2px solid var(--sq-mark); outline-offset: -2px; }
.sq.check { outline: 2px solid var(--text); outline-offset: -2px; }

.sq.target::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  height: 22%;
  transform: translate(-50%, -50%);
  background: var(--sq-mark);
  border-radius: 2px;
}

.sq.target.capture::after {
  width: 100%;
  height: 100%;
  background: none;
  border: 3px solid var(--sq-mark);
  border-radius: 0;
}

.sq .piece {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.sq .piece svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sq .coord {
  position: absolute;
  z-index: 1;
  font-size: 9px;
  line-height: 1;
  color: var(--sq-coord);
  pointer-events: none;
}

.sq .coord.file { right: 3px; bottom: 2px; }
.sq .coord.rank { left: 3px; top: 2px; }

.chess-board.locked .sq { cursor: default; }

/* Skins d'échecs : cadre et effets propres à chacun. */
.chess-board[data-theme="echecs-cartoon"] { border-width: 8px; border-radius: 18px; }
.chess-board[data-theme="echecs-legendes"] { border-style: double; border-color: #d8b040; background: var(--board-frame); }
.chess-board[data-theme="echecs-energie"] { border-color: var(--board-frame); outline: 2px solid #ffe94a; outline-offset: -8px; }
.chess-board[data-theme="echecs-energie"] .piece .aura { animation: aura-crackle 0.5s steps(2) infinite; }
.chess-board[data-theme="echecs-cartoon"] .sq.selected .piece { animation: cartoon-hop 0.5s steps(4) infinite; }
@keyframes aura-crackle { 0% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes cartoon-hop { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8%; } }

@media (prefers-reduced-motion: reduce) {
  .chess-board:not(.motion-on *) .piece .aura,
  .chess-board:not(.motion-on *) .sq.selected .piece { animation: none; }
}

/* Choix du thème de l'échiquier : chaque bouton montre le jeu complet du thème. */
.theme-picker { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }
.theme-picker .choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.theme-choice {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-height: 0;
  padding: 6px;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}
.theme-choice .mini-board { width: 100%; }
.theme-choice.is-locked { cursor: pointer; }
.theme-choice.is-locked .mini-board { opacity: 0.55; }

/* Échiquier d'aperçu complet (8 × 8, les 32 pièces). */
.mini-board {
  width: 124px;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border-width: 3px;
  border-radius: var(--radius-btn);
}

.mini-board .sq { cursor: default; padding: 4%; }
.mini-board .sq .coord { display: none; }
.mini-board--tiny { width: 64px; border-width: 2px; }
.mini-board--tiny .sq { padding: 0; }
#fit-board .mini-board { width: 100%; max-width: 200px; }
.shop-preview--chesstheme .mini-board { width: auto; height: 122px; aspect-ratio: 1; }

.player-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.player-strip .pixel {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  overflow: hidden;
  flex: none;
}

.player-strip .who { min-width: 0; flex: 1; }
.player-strip .who strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-weight: 500; }
.player-strip .who > span { display: block; font-size: 12px; color: var(--muted); }
.player-strip.is-turn .pixel { border-color: var(--accent); }

/* Pseudo et, juste à sa droite, les pièces mangées pendant la partie. */
.who-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.who-line strong { flex: 0 1 auto; }
.captured { display: flex; align-items: center; flex-wrap: wrap; gap: 0; min-width: 0; }
.captured-piece { display: block; width: 18px; height: 18px; margin-right: -5px; }
.captured-piece svg { display: block; width: 100%; height: 100%; }
.captured-adv { margin-left: 9px; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Pendule des parties en ligne. */
.chess-clock {
  flex: none;
  min-width: 64px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  font-family: var(--font-mono);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--muted);
}
.chess-clock.is-running { border-color: var(--accent); color: var(--text); }
.chess-clock.is-running.is-low { background: var(--accent); color: var(--on-accent); }

/* Le Reflet : votre personnage, vu dans le miroir. */
.pixel--reflet { position: relative; }
.pixel--reflet svg { transform: scaleX(-1); filter: saturate(0.75) brightness(1.08); }
.pixel--reflet::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 35%, rgb(255 255 255 / 0.18) 50%, transparent 65%);
  pointer-events: none;
}
.pixel--empty { display: grid; place-items: center; font-family: var(--font-display); color: var(--muted); }

.stake-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.moves {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 3ch 1fr 1fr;
  gap: 2px 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.moves .num { color: var(--muted); }

.promo {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.promo .btn { padding: 6px; height: 56px; }
.promo .btn svg { width: 100%; height: 100%; }

.level-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.level-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.level-choice .pixel { width: 40px; height: 40px; flex: none; overflow: hidden; border-radius: var(--radius-btn); }
.level-choice[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.level-text { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; text-align: center; }
.level-text strong { font-family: var(--font-display); font-weight: 500; }
.level-meta { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Le Reflet occupe toute une ligne : portrait à gauche, profil à droite. */
.level-choice--reflet { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 8px 10px; }
.level-choice--reflet .pixel { width: 48px; height: 48px; }
.level-choice--reflet .level-text { align-items: flex-start; text-align: left; }

.form-chips { display: flex; gap: 3px; }
.form-chip {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 10px;
  color: var(--muted);
}
.form-chip--V { border-color: var(--accent); color: var(--accent); }

/* Réflexion du bot ou de l'adversaire : points de suspension animés. */
.status.is-thinking { animation: thinking-pulse 1.2s ease-in-out infinite; }
@keyframes thinking-pulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { html:not(.motion-on) .status.is-thinking { animation: none; } }

/* Échecs en ligne. */
.chess-modes { margin-bottom: 8px; }
.online-stakes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.online-stakes .choice { justify-content: center; text-align: center; padding-inline: 4px; }
.online-stakes .choice:first-child { grid-column: 1 / -1; }
.online-stakes .choice:disabled { opacity: 0.4; cursor: not-allowed; }
.queue-box, .private-box, .draw-box { display: flex; flex-direction: column; gap: 6px; }
.private-box { padding-top: 10px; border-top: 1px solid var(--line); }
.join-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.join-row .input { text-transform: uppercase; letter-spacing: 0.15em; font-family: var(--font-mono); }
.private-code {
  margin: 0;
  padding: 10px;
  border: 1px dashed var(--accent);
  border-radius: var(--radius-btn);
  font-family: var(--font-mono);
  font-size: 28px;
  letter-spacing: 0.3em;
  text-align: center;
  color: var(--accent);
  user-select: all;
}
.draw-offer { margin: 0; font-size: 13px; text-align: center; color: var(--accent); }
.board-wrap .promo { margin-top: 6px; }

.stake-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (min-width: 860px) {
  .chess-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
}

/* ---------- Portraits 3D du personnage (js/ui/avatar-3d.js) ---------- */
/* Photo du modèle 3D : elle remplit son cadre, sans déformation. */
.a3d-img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.pixel--reflet .a3d-img { transform: scaleX(-1); filter: saturate(0.75) brightness(1.08); }
/* En attendant la photo : une silhouette discrète. */
.a3d-loading { background: radial-gradient(ellipse 34% 40% at 50% 45%, #2a211b 0%, transparent 72%); }
html.motion-on .a3d-loading { animation: a3d-wait 1.2s ease-in-out infinite; }
@keyframes a3d-wait { 50% { opacity: 0.55; } }
/* Scène WebGL cachée qui prend les photos (elle doit garder une taille pour être rendue). */
.a3d-stage { position: fixed; left: -10000px; top: 0; pointer-events: none; }
/* Le dessin 2D a laissé sa place : sur téléphone, la vue 3D seule prend plus de largeur
   (Personnage et cabine d'essayage). */
@media (max-width: 767px) {
  .preview-pair .viewer3d { width: min(100%, 260px); }
  .fitting-3d { width: min(100%, 240px); }
}

/* Emotes prioritaires : pendant qu'un joueur fait une emote, son siège passe devant les
   autres sièges (pseudos, tapis) et la couche des sièges passe devant les cartes et les
   jetons. L'emote n'est jamais cachée par le pseudo d'un voisin. */
.pseat:has(.pseat-emote) { z-index: 20; }
.seats-layer:has(.pseat-emote) { z-index: 7; }

/* =====================================================================
   Thème « néon d'arcade » (26/11/2026, choix de l'utilisateur)
   Mur de briques sombre, éléments dessinés en tubes de néon multicolores,
   titres en police d'enseigne western (Rye), texte en Outfit, petits titres
   et chiffres en Tilt Neon. Remplace l'ancienne règle « ni ombres ni dégradés ».
   - Boutique : l'aperçu des articles reste neutre, sans effet (vrai rendu 3D).
   - Table de poker : la zone de jeu garde l'ancien style et ses interactions
     (voir « Table de poker » en bas) ; seuls le fond et l'en-tête sont néon.
   ===================================================================== */
:root {
  --bg: #0d0b1a;
  --line: #2e2852;
  --text: #f3f0ff;
  --muted: #a8a2c9;
  --accent: #ffe45c;
  --on-accent: #1a1400;
  --neon-cyan: #3ff2ff;
  --neon-pink: #ff4fb4;
  --neon-yellow: #ffe45c;
  --neon-orange: #ff8a3d;
  --neon-violet: #a46bff;
  --neon-green: #6dff8f;
  --font-mono: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Tilt Neon', 'Outfit', system-ui, sans-serif;
  --font-sign: 'Rye', 'Tilt Neon', Georgia, serif;
  /* Halo d'un tube de néon de couleur --c (contour + lueur intérieure). */
  --tube: 0 0 3px var(--c), 0 0 14px color-mix(in srgb, var(--c) 65%, transparent), inset 0 0 10px color-mix(in srgb, var(--c) 30%, transparent);
}

body {
  background-color: #0d0b1a;
  background-image:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(164, 107, 255, 0.22), transparent 70%),
    linear-gradient(180deg, rgba(13, 11, 26, 0) 0%, rgba(8, 7, 19, 0.7) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='68'%3E%3Crect width='96' height='68' fill='%23080713'/%3E%3Crect x='1.5' y='1.5' width='93' height='31' rx='2' fill='%23171433'/%3E%3Crect x='-46.5' y='35.5' width='93' height='31' rx='2' fill='%23131029'/%3E%3Crect x='49.5' y='35.5' width='93' height='31' rx='2' fill='%23141130'/%3E%3C/svg%3E");
  background-size: 100% 100%, 100% 100%, 96px 68px;
  background-attachment: fixed, fixed, scroll;
  font-size: 15px;
}

/* En-tête : une enseigne dans un tube violet. */
.topbar {
  --c: var(--neon-violet);
  margin-top: 12px;
  padding: 10px 12px;
  border: 2px solid var(--c);
  border-radius: 14px;
  background: rgba(8, 7, 19, 0.78);
  box-shadow: var(--tube);
}
.brand { font-family: var(--font-sign); font-weight: 400; letter-spacing: 0.03em; font-size: 22px; color: #ffd6ec; text-shadow: 0 0 2px #fff, 0 0 8px var(--neon-pink), 0 0 20px var(--neon-pink); }
.brand span { color: #d4fbff; text-shadow: 0 0 2px #fff, 0 0 8px var(--neon-cyan), 0 0 20px var(--neon-cyan); }
.wallet-amount { font-family: var(--font-display); font-weight: 400; font-size: 17px; color: #fff6c2; text-shadow: 0 0 8px var(--neon-yellow); }
.wallet:nth-child(2) .wallet-amount { color: #d4fbff; text-shadow: 0 0 8px var(--neon-cyan); }
.wallet-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; }
.nav a,
.nav button { --c: var(--neon-violet); border: 2px solid color-mix(in srgb, var(--c) 55%, transparent); border-radius: 999px; background: rgba(8, 7, 19, 0.7); font-family: var(--font-display); font-size: 14px; font-weight: 400; }
.nav a:hover,
.nav button:hover { border-color: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 55%, transparent); }
.nav a[aria-current="page"] { --c: var(--neon-yellow); border-color: var(--c); color: #fff6c2; box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); text-shadow: 0 0 8px var(--c); }
.user-avatar { border-radius: 10px; }

/* Titres : enseigne western éclairée. */
.page-title { font-family: var(--font-sign); font-weight: 400; font-size: 30px; letter-spacing: 0.01em; color: #ffd6ec; text-shadow: 0 0 2px #fff, 0 0 10px var(--neon-pink), 0 0 26px var(--neon-pink); }
.panel h2 { font-family: var(--font-display); font-weight: 400; font-size: 21px; color: #d4fbff; text-shadow: 0 0 8px var(--neon-cyan); }

/* Panneaux : tubes de néon ; la couleur tourne d'un panneau à l'autre. */
.panel { --c: var(--neon-violet); border: 2px solid var(--c); border-radius: 14px; background: rgba(8, 7, 19, 0.78); box-shadow: var(--tube); }
.panel:nth-of-type(4n + 2) { --c: var(--neon-cyan); }
.panel:nth-of-type(4n + 3) { --c: var(--neon-pink); }
.panel:nth-of-type(4n + 4) { --c: var(--neon-orange); }

/* Boutons : tubes cyan ; bouton principal en jaune. */
.btn { --c: var(--neon-cyan); border: 2px solid color-mix(in srgb, var(--c) 70%, transparent); border-radius: 999px; background: rgba(8, 7, 19, 0.82); font-family: var(--font-display); font-size: 14px; font-weight: 400; }
.btn:hover:not(:disabled) { border-color: var(--c); box-shadow: 0 0 12px color-mix(in srgb, var(--c) 60%, transparent); }
.btn--primary { --c: var(--neon-yellow); background: rgba(8, 7, 19, 0.82); border-color: var(--c); color: #fff6c2; text-shadow: 0 0 8px var(--c); box-shadow: var(--tube); }
.btn--primary:hover:not(:disabled) { border-color: var(--c); box-shadow: 0 0 6px var(--c), 0 0 24px var(--c), inset 0 0 12px color-mix(in srgb, var(--c) 40%, transparent); }
.btn--primary:disabled { box-shadow: none; text-shadow: none; color: var(--muted); }
.lobby-tabs .btn[aria-selected="true"],
.tabs .btn[aria-selected="true"] { --c: var(--neon-pink); border-color: var(--c); color: #ffd6ec; box-shadow: var(--tube); text-shadow: 0 0 8px var(--c); }
.choice { border-radius: 999px; background: rgba(8, 7, 19, 0.75); }
.choice[aria-pressed="true"] { --c: var(--neon-yellow); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 55%, transparent); }
.input { border-radius: 10px; background: rgba(8, 7, 19, 0.8); }
.input:focus { border-color: var(--neon-cyan); box-shadow: 0 0 10px rgba(63, 242, 255, 0.45); }

/* Boutique : cadre néon à la couleur de la rareté ; l'aperçu de l'article reste neutre (vrai rendu). */
.shop-card { --c: color-mix(in srgb, var(--rarity) 85%, #fff); border: 2px solid var(--c); border-radius: 14px; background: rgba(8, 7, 19, 0.82); box-shadow: 0 0 3px var(--c), 0 0 12px color-mix(in srgb, var(--c) 45%, transparent); }
.shop-card.is-owned { border-color: var(--c); box-shadow: 0 0 3px var(--accent), 0 0 14px color-mix(in srgb, var(--accent) 50%, transparent); }
.shop-preview { border-radius: 10px; background: radial-gradient(ellipse at 50% 38%, #2a1f17 0%, #120d0a 78%); }

/* Pied de page : texte un peu plus grand. */
.footer { font-size: 12px; }

/* ---------- Table de poker : l'ancien style et ses interactions, inchangés ----------
   Seuls le fond en briques et l'en-tête néon s'appliquent ; la zone de jeu reprend
   les couleurs, les polices et les boutons d'avant. */
.page-table main {
  --bg: #0a0a0a;
  --line: #27272a;
  --text: #fafafa;
  --muted: #a1a1aa;
  --accent: #faff00;
  --on-accent: #0a0a0a;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: 'Tomorrow', 'Geist Mono', ui-monospace, monospace;
  font-family: var(--font-mono);
  font-size: 14px;
}
.page-table main .btn { border: 1px solid var(--line); border-radius: var(--radius-btn); background: var(--bg); font-family: inherit; font-size: 13px; font-weight: 500; box-shadow: none; text-shadow: none; }
.page-table main .btn:hover:not(:disabled) { border-color: var(--text); box-shadow: none; }
.page-table main .btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.page-table main .btn--primary:disabled { background: var(--bg); border-color: var(--line); color: var(--muted); }
.page-table main .btn--small { font-size: 12px; }
.page-table main .panel { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--bg); box-shadow: none; }
.page-table main .panel h2 { font-family: var(--font-display); font-weight: 700; font-size: inherit; color: var(--text); text-shadow: none; }
.page-table main .choice { border-radius: var(--radius-btn); background: var(--bg); box-shadow: none; }
.page-table main .input { border-radius: var(--radius-btn); background: var(--bg); box-shadow: none; }

/* Boutique : cases « Possédés » / « Non possédés », avec le nombre d'articles de chaque groupe. */
.own-filter { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin: 0; padding: 0; border: 0; min-width: 0; }
.own-filter legend { float: left; margin-right: 4px; padding: 0; }
.own-check { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border: 2px solid var(--line); border-radius: 999px; background: rgba(8, 7, 19, 0.75); cursor: pointer; font-family: var(--font-display); font-size: 14px; }
.own-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--neon-green); cursor: pointer; }
.own-check:has(input:checked) { --c: var(--neon-green); border-color: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 50%, transparent); }
.own-check:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.own-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.shop-empty { text-align: center; padding: 24px 0; }

/* Boutique : cartes 3 % plus grandes, et un état impossible à confondre, en thèmes à deux couleurs.
   Non possédé = noir / blanc ; possédé = jaune / noir ; porté ou équipé = rouge / noir.
   L'aperçu de l'article reste neutre (vrai rendu 3D). */
.shop-items { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.shop-preview { height: 134px; }
.shop-card { position: relative; padding: 0 10px 10px; overflow: hidden; }
.own-banner {
  margin: 0 -10px 2px;
  padding: 5px 10px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}
/* Non possédé : noir et blanc. */
.shop-card.is-not-owned { --c: #f4f4f4; border: 2px solid #f4f4f4; background: #050505; box-shadow: 0 0 0 1px #050505, 0 0 10px rgba(255, 255, 255, 0.18); }
.shop-card.is-not-owned .own-banner { background: #050505; color: #f4f4f4; border-bottom: 2px solid #f4f4f4; }
/* Possédé : jaune et noir, bandeau rayé comme une enseigne de chantier. */
.shop-card.is-owned { --c: #ffd60a; border: 3px solid #ffd60a; background: #0a0800; box-shadow: 0 0 4px #ffd60a, 0 0 18px rgba(255, 214, 10, 0.5); }
.shop-card.is-owned .own-banner {
  background: repeating-linear-gradient(-45deg, #ffd60a 0 14px, #ffcc00 14px 16px, #111 16px 22px, #ffd60a 22px 36px);
  color: #0a0a0a;
  font-weight: 700;
  text-shadow: 0 0 6px #ffd60a, 0 0 2px #ffd60a;
}
/* Porté ou équipé : rouge et noir. */
.shop-card.is-worn { --c: #ff2a3d; border: 3px solid #ff2a3d; background: #0a0203; box-shadow: 0 0 4px #ff2a3d, 0 0 20px rgba(255, 42, 61, 0.55); }
.shop-card.is-worn .own-banner { background: #ff2a3d; color: #0a0203; font-weight: 700; text-shadow: none; }
.shop-card.is-worn .own-banner::after { content: " · sur vous"; font-size: 11px; letter-spacing: 0.06em; }

/* ---------- Fumée : cigarettes et cigares (js/ui/smoke-fx.js) ----------
   La braise rougeoie, la fumée monte en volutes ; dans la boutique, un briquet vient allumer
   le bout toutes les 7 secondes. --tip-x / --tip-y : position du bout incandescent. */
.smoke-stage { position: relative; display: block; height: 100%; aspect-ratio: 1; max-width: 100%; margin: 0 auto; container-type: inline-size; }
.smoke-pic { position: absolute; inset: 0; display: block; }
.smoke-fx { --tip-x: 79%; --tip-y: 67%; --puff: 8cqw; --u: 1cqw; position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.smoke-fx--cigarette { --tip-x: 85%; --tip-y: 73%; } /* bout de la cigarette sur le portrait (cadrage « face ») */
.smoke-fx--cigare { --puff: 11cqw; --tip-x: 89%; --tip-y: 74.5%; }
.smoke-fx--mini { --puff: 6px; --u: 0.6px; inset: auto; width: 0; height: 0; --tip-x: 0; --tip-y: 0; }
.smoke-fx--mini.smoke-fx--cigare { --puff: 8px; }

.smoke-ember {
  position: absolute; left: var(--tip-x); top: var(--tip-y);
  width: calc(var(--u) * 3.6); height: calc(var(--u) * 3.6); margin: calc(var(--u) * -1.8) 0 0 calc(var(--u) * -1.8); border-radius: 50%;
  background: #ffb347; box-shadow: 0 0 4px 1px #ff7a1f, 0 0 10px 2px rgba(255, 90, 20, 0.6);
}
.smoke-fx--mini .smoke-ember { width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; }

.smoke-puff {
  position: absolute; left: var(--tip-x); top: var(--tip-y);
  width: var(--puff); height: var(--puff); margin: calc(var(--puff) / -2) 0 0 calc(var(--puff) / -2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 236, 230, 0.9) 0%, rgba(214, 210, 204, 0.45) 45%, transparent 70%);
  opacity: 0;
  filter: blur(0.5px);
}
.smoke-fx--cigare .smoke-puff { background: radial-gradient(circle, rgba(244, 240, 232, 0.95) 0%, rgba(218, 212, 202, 0.55) 45%, transparent 72%); }

/* Main du personnage qui tient le briquet (SVG pixel art 16 × 22, 1 case = --u) ; la flamme sort
   du briquet, juste sous le bout de la cigarette. */
.smoke-hand {
  position: absolute; left: var(--tip-x); top: var(--tip-y);
  width: calc(var(--u) * 19); height: calc(var(--u) * 26);
  margin: calc(var(--u) * 5) 0 0 calc(var(--u) * -8.9); /* la flamme arrive pile sur le bout */
  opacity: 0;
  filter: drop-shadow(0 calc(var(--u) * 0.6) calc(var(--u) * 1.2) rgba(0, 0, 0, 0.45));
}
.smoke-hand svg { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.lighter-flame {
  position: absolute; left: calc(var(--u) * 6); top: calc(var(--u) * -8); width: calc(var(--u) * 6); height: calc(var(--u) * 9);
  border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  background: radial-gradient(ellipse at 50% 75%, #fff8d0 0%, #ffd23f 35%, #ff7a1f 70%, transparent 76%);
  box-shadow: 0 0 calc(var(--u) * 6) calc(var(--u) * 2) rgba(255, 150, 40, 0.6);
  transform-origin: 50% 100%;
  transform: scale(0);
}

/* Animations : actives avec « Animations du jeu » (et toujours dans la boutique). */
.motion-on .smoke-puff { animation: smoke-rise 3.4s ease-out infinite; }
.motion-on .smoke-fx--cigare .smoke-puff { animation-duration: 4.2s; }
.motion-on .smoke-puff--2 { animation-delay: 0.7s; }
.motion-on .smoke-puff--3 { animation-delay: 1.4s; }
.motion-on .smoke-puff--4 { animation-delay: 2.1s; }
.motion-on .smoke-puff--5 { animation-delay: 2.8s; }
.motion-on .smoke-ember { animation: smoke-ember 2.4s ease-in-out infinite; }
.motion-on .smoke-hand { animation: lighter-come 7s ease-in-out infinite; }
.motion-on .lighter-flame { animation: lighter-flame 7s linear infinite; }
.motion-on .smoke-fx:has(.smoke-hand) .smoke-ember { animation: smoke-ember-lit 7s ease-in-out infinite; }

@keyframes smoke-rise {
  0% { transform: translate(0, 0) scale(0.35); opacity: 0; }
  12% { opacity: 0.85; }
  55% { transform: translate(calc(var(--puff) * -0.9), calc(var(--puff) * -3.6)) scale(1.6); opacity: 0.5; }
  100% { transform: translate(calc(var(--puff) * 0.4), calc(var(--puff) * -7.5)) scale(3); opacity: 0; }
}
@keyframes smoke-ember { 50% { box-shadow: 0 0 6px 2px #ff7a1f, 0 0 16px 4px rgba(255, 90, 20, 0.7); background: #ffd27a; } }
@keyframes smoke-ember-lit {
  0%, 16% { background: #9a4a2a; box-shadow: none; }
  24%, 40% { background: #fff0a8; box-shadow: 0 0 8px 3px #ff9a2f, 0 0 22px 6px rgba(255, 110, 20, 0.8); }
  60%, 100% { background: #ffb347; box-shadow: 0 0 4px 1px #ff7a1f, 0 0 10px 2px rgba(255, 90, 20, 0.6); }
}
/* La main monte le briquet jusqu'au bout, l'allume, puis repart. */
@keyframes lighter-come {
  0% { transform: translate(calc(var(--u) * 18), calc(var(--u) * 30)) rotate(12deg); opacity: 0; }
  10% { transform: translate(calc(var(--u) * 10), calc(var(--u) * 14)) rotate(6deg); opacity: 1; }
  18%, 36% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  46% { transform: translate(calc(var(--u) * 13), calc(var(--u) * 26)) rotate(10deg); opacity: 0; }
  100% { transform: translate(calc(var(--u) * 18), calc(var(--u) * 30)) rotate(12deg); opacity: 0; }
}
@keyframes lighter-flame {
  0%, 15% { transform: scale(0); }
  17% { transform: scale(1.15, 1.05); }
  20% { transform: scale(0.9, 1.15); }
  23% { transform: scale(1.1, 0.95); }
  26% { transform: scale(0.95, 1.2); }
  29% { transform: scale(1.05, 1); }
  32% { transform: scale(0.9, 1.1); }
  36% { transform: scale(1, 1); }
  38%, 100% { transform: scale(0); }
}
/* Sans animations : un léger voile de fumée immobile, pas de briquet. */
.smoke-fx:not(.motion-on *) .smoke-puff--1 { opacity: 0.45; transform: translate(-3px, calc(var(--puff) * -2)) scale(1.4); }
.smoke-fx:not(.motion-on *) .smoke-hand { display: none; }

/* Table de poker : la fumée part de la bouche de chaque fumeur. */
.smoke-layer { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.smoke-layer .smoke-fx { position: absolute; }
/* Consommables : temps de jeu restant sur la carte de la boutique. */
.shop-burn { font-size: 12px; color: var(--neon-orange); }

/* =====================================================================
   Notes de test du 26/11/2026 : cartes lisibles, zone de jeu agrandie,
   combinaison du joueur, abattage mis en scène, chat des parties.
   ===================================================================== */

/* Cartes plus grandes (table 2D ; en 3D, la scène donne la taille du tableau et des adversaires). */
.stage {
  --pcard-w: 44px;
  --you-card-w: 76px;
  --board-w: clamp(50px, 6.6vw, 84px);
}
.stage[data-size="9"] { --pcard-w: 38px; }
@media (max-width: 700px) {
  .stage { --pcard-w: 31px; --you-card-w: 58px; --board-w: clamp(44px, 13.5vw, 62px); }
  .stage[data-size="9"] { --pcard-w: 27px; }
}
.pseat-cards { gap: 2px; }
.pcards-float.is-you .pseat-cards { gap: 6px; }
.pcards-float.is-you .pcard:first-child { rotate: -4deg; }
.pcards-float.is-you .pcard:last-child { rotate: 4deg; }

/* Zone de jeu plus grande : page plus large, moins de place réservée sous la table. */
.page-table .app--wide { max-width: 1640px; }
.page-table .stage {
  width: min(100%, calc((100dvh / var(--zoom) - 236px) * 1.6));
  margin: 2px auto 26px;
}
.table-head { gap: 8px; }
.table-prefs { display: flex; gap: 6px; flex-wrap: wrap; }
.table-dock { display: grid; gap: 12px; align-items: start; }
.table-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (min-width: 1000px) {
  .table-dock { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); }
}

/* Cartes mises en valeur : votre combinaison pendant le coup, la main gagnante à l'abattage. */
.pcard.is-made { box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgba(250, 255, 0, 0.5); }
.pcard.is-win { translate: 0 -8%; box-shadow: 0 0 0 2px var(--accent), 0 0 18px rgba(250, 255, 0, 0.85); }
.pcard.is-dim { filter: brightness(0.45) saturate(0.5); }

/* Votre combinaison, au-dessus de vos cartes. */
.hand-hint {
  position: absolute;
  z-index: 6;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 3px 12px 4px;
  border: 1px solid var(--accent);
  border-radius: 9999px;
  background: rgba(10, 10, 10, 0.92);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.15;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.hand-hint.is-shown { opacity: 1; }
.hand-hint.is-strong { background: var(--accent); color: var(--on-accent); }
.hand-hint-draw { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: #8fe3ff; }
.hand-hint.is-strong .hand-hint-draw { color: #1d3b8a; }
.hand-hint-draw:empty { display: none; }

/* Abattage : la main gagnante au-dessus du tableau. */
.showdown-plate {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px); /* sous le tableau : les cartes adverses, au-dessus, restent visibles */
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 16px 6px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  background: rgba(10, 10, 10, 0.92);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) scale(0.8);
  transition: opacity 0.25s, transform 0.25s;
}
.showdown-plate.is-shown { opacity: 1; transform: translateX(-50%) scale(1); }
.showdown-who { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.showdown-plate.is-you .showdown-who { color: var(--accent); }
.showdown-hand { font-family: var(--font-display); font-weight: 700; font-size: clamp(15px, 1.6vw, 22px); color: var(--accent); }

/* Gain du pot, au-dessus de la plaque du joueur. */
.pseat-win {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -110%);
  padding: 1px 8px;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.pseat-win:empty { display: none; }
.motion-on .pseat-win:not(:empty) { animation: win-pop 0.5s cubic-bezier(.2, .8, .25, 1.4); }
@keyframes win-pop {
  from { transform: translate(-50%, -60%) scale(0.4); opacity: 0; }
  to { transform: translate(-50%, -110%) scale(1); opacity: 1; }
}

/* Joueur à tapis : plaque rouge pendant le coup. */
.pseat.is-allin .pseat-plate { border-color: #ff5c5c; box-shadow: 0 0 10px rgba(255, 92, 92, 0.6); }
.allin-flash { font-size: 22px; }

/* ---------- Chat des parties (poker et échecs) ---------- */
.chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
  overflow: hidden;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.chat-head::after { content: '▾'; margin-left: auto; color: var(--muted); }
.chat.is-closed .chat-head::after { content: '▸'; }
.chat-unread {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  text-align: center;
}
.chat-body { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 10px; }
.chat.is-closed .chat-body { display: none; }
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 210px;
  margin: 0;
  padding: 6px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  font-size: 13px;
}
.chat-msg { overflow-wrap: anywhere; }
.chat-from {
  margin: 0 6px 0 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: #8fe3ff;
}
button.chat-from { cursor: pointer; }
button.chat-from:hover { text-decoration: line-through; }
.chat-msg.is-you .chat-from { color: var(--accent); }
.chat-msg.kind-bot .chat-from { color: #ffb36b; }
.chat-msg.kind-system { color: var(--muted); font-style: italic; }
.chat-empty { color: var(--muted); }
.chat-quick { display: flex; flex-wrap: wrap; gap: 4px; }
.chat-chip {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}
.chat-chip:hover:not(:disabled) { border-color: var(--text); }
.chat-chip:disabled { opacity: 0.5; cursor: default; }
.chat-form { display: flex; gap: 6px; }
.chat-input { flex: 1; min-width: 0; }
.chat-note,
.chat-error { margin: 0; font-size: 11px; color: var(--muted); }
.chat-error { color: #ff7a7a; }
.chat-error:empty { display: none; }
.chat.is-disabled .chat-log { opacity: 0.7; }
@media (max-width: 999px) { .chat-log { height: 160px; } }

/* Échecs : le chat prend le style néon des panneaux. */
.chess-chat .chat { --c: var(--neon-cyan); border: 2px solid var(--c); border-radius: 14px; background: rgba(8, 7, 19, 0.78); box-shadow: var(--tube); }
.chess-chat .chat-log { border-color: var(--line); background: rgba(8, 7, 19, 0.6); }

/* Accueil : mot de passe oublié. */
.auth-links { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Écran large : la table occupe toute la hauteur à gauche, les commandes et le chat
   passent dans une colonne à droite (la zone de jeu grandit d'environ 25 %). */
@media (min-width: 1100px) {
  .page-table .table-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 380px);
    grid-template-areas: "head head" "stage dock";
    column-gap: 14px;
    row-gap: 8px;
    align-items: start;
  }
  .page-table .table-head { grid-area: head; }
  .page-table .stage {
    grid-area: stage;
    width: min(100%, calc((100dvh / var(--zoom) - 132px) * 1.6));
    margin: 0 auto 10px;
  }
  .page-table .table-dock { grid-area: dock; grid-template-columns: minmax(0, 1fr); }
  .page-table .controls { position: static; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 10px; }
  .page-table .action-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-table .action-row .btn { min-height: 44px; }
  .page-table .raise-row { grid-template-columns: minmax(0, 1fr) auto; }
  .page-table .raise-row .presets { grid-column: 1 / -1; }
  .page-table .presets .btn { flex: 1; }
  .page-table .status { min-height: 2.6em; margin: 0; }
  .page-table .tour-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-table .chat-log { height: clamp(140px, calc(100dvh / var(--zoom) - 600px), 320px); }
}
.stage.is-3d { margin-bottom: 10px; }
/* Bandeau « GROS POT ! » : en haut de la table, il ne cache plus la main gagnante. */
.stage .table-banner { top: 22%; }
/* Table très étroite : vos cartes restent grandes sans recouvrir les voisins. */
@media (max-width: 420px) { .stage { --you-card-w: clamp(44px, 15vw, 58px); } }

/* ---------- Échecs : pièces réalistes, pré-coups, revue, mat, classement ---------- */
/* Pièces Staunton : elles remplissent mieux la case. */
.sq:has(.piece-svg--staunton) { padding: 3%; }
.captured-piece .piece-svg--staunton,
.mini-board .piece-svg--staunton { width: 100%; height: 100%; }
.motion-on .sq .piece { transition: transform 0.12s; }
.motion-on .chess-board:not(.locked) .sq:hover .piece { transform: translateY(-3%); }

/* Coup joué à l'avance : cases teintées de rouge, comme sur les grands sites. */
.sq.premove::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #e0443e;
  opacity: 0.5;
}
.chess-board.is-premove .sq.selected { outline-color: #ff7a6b; }

/* Échec et mat : le roi vaincu bascule sur le côté, le roi vainqueur brille. */
.sq.mated { background-image: radial-gradient(circle, rgba(255, 60, 60, 0.75) 0%, rgba(255, 60, 60, 0) 72%); }
.sq.mated .piece { transform: rotate(90deg) translate(14%, 0); transform-origin: 50% 85%; }
.sq.mate-winner { background-image: radial-gradient(circle, rgba(255, 220, 90, 0.7) 0%, rgba(255, 220, 90, 0) 72%); }
.motion-on .chess-board.is-mate .sq.mated .piece { animation: king-topple 0.9s cubic-bezier(.5, -0.2, .7, 1.3) both; }
.motion-on .chess-board.is-mate .sq.mate-winner .piece { animation: king-glory 1.2s ease-in-out 2; }
@keyframes king-topple {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-12deg); }
  45% { transform: rotate(8deg); }
  100% { transform: rotate(90deg) translate(14%, 0); }
}
@keyframes king-glory {
  0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 0 #ffd75a); }
  50% { transform: translateY(-8%) scale(1.12); filter: drop-shadow(0 0 8px #ffd75a); }
}

.board-wrap { position: relative; }
.mate-banner {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 26px;
  border: 3px solid var(--neon-yellow);
  border-radius: 16px;
  background: rgba(8, 7, 19, 0.92);
  box-shadow: 0 0 6px var(--neon-yellow), 0 0 30px color-mix(in srgb, var(--neon-yellow) 55%, transparent);
  transform: translate(-50%, -50%);
  pointer-events: none;
  white-space: nowrap;
}
.mate-banner strong { font-family: var(--font-sign); font-weight: 400; font-size: clamp(26px, 6vw, 40px); color: #fff6c2; text-shadow: 0 0 10px var(--neon-yellow); }
.mate-banner span { font-family: var(--font-display); font-size: 16px; color: var(--text); }
.mate-banner.is-loss { border-color: var(--neon-pink); box-shadow: 0 0 6px var(--neon-pink), 0 0 30px color-mix(in srgb, var(--neon-pink) 55%, transparent); }
.mate-banner.is-loss strong { color: #ffd6ec; text-shadow: 0 0 10px var(--neon-pink); }
.mate-banner.is-leaving { opacity: 0; transition: opacity 0.6s; }
.motion-on .mate-banner { animation: mate-in 0.7s cubic-bezier(.2, .8, .25, 1.3) both; }
@keyframes mate-in {
  from { transform: translate(-50%, -50%) scale(0.2) rotate(-8deg); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}
.mate-spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--neon-yellow);
  opacity: 0;
}
.mate-banner.is-loss .mate-spark { background: var(--neon-pink); }
.motion-on .mate-spark { animation: mate-spark 1.1s ease-out var(--t) 2 both; }
@keyframes mate-spark {
  0% { transform: rotate(var(--a)) translateX(0) scale(1); opacity: 1; }
  100% { transform: rotate(var(--a)) translateX(var(--d)) scale(0.3) rotate(180deg); opacity: 0; }
}

/* Revoir les coups (sur votre écran seulement). */
.review-bar { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.review-bar .btn { min-width: 40px; }
.review-label { flex: 1; text-align: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.review-bar.is-reviewing .review-label { color: var(--neon-cyan); }
.board-wrap:has(.review-bar.is-reviewing) .chess-board { box-shadow: 0 0 0 3px var(--neon-cyan); }
.moves li.move { cursor: pointer; border-radius: 4px; padding: 0 3px; }
.moves li.move:hover { background: rgba(255, 255, 255, 0.08); }
.moves li.is-current { background: color-mix(in srgb, var(--neon-yellow) 25%, transparent); color: #fff6c2; }

/* Classement en ligne. */
.ranking-box { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.ranking-head { display: flex; flex-direction: column; gap: 2px; }
.ranking-me { font-family: var(--font-display); font-weight: 400; color: #d4fbff; text-shadow: 0 0 8px var(--neon-cyan); }
.ranking-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.ranking-list li { display: grid; grid-template-columns: 2.2ch minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 3px 8px; border-radius: 8px; background: rgba(8, 7, 19, 0.55); }
.ranking-list li.is-you { outline: 1px solid var(--neon-yellow); color: #fff6c2; }
.ranking-list .ranking-empty { display: block; color: var(--muted); }
.ranking-rank { color: var(--muted); font-variant-numeric: tabular-nums; }
.ranking-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-record { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.ranking-points { font-family: var(--font-display); font-weight: 400; font-variant-numeric: tabular-nums; }
.chess-chat { margin-top: 12px; }

/* =====================================================================
   Table de poker en rendu réaliste (js/ui/poker-scene.js) : le décor,
   puis une photo détourée par personnage, posée à sa place.
   ===================================================================== */
.scene-real { overflow: hidden; background: #06050c; }
.scene-back { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.scene-actors { position: absolute; inset: 0; }
.scene-actor { position: absolute; opacity: 0; }
.scene-actor.is-ready { opacity: 1; }
.scene-actor canvas { display: block; width: 100%; height: 100%; }
.scene-actor.is-away { filter: brightness(0.45) saturate(0.6); }
.scene-actor.is-folded { filter: brightness(0.66); }
.scene-actor.is-out { opacity: 0; translate: 0 6%; }
html.motion-on .scene-actor { transition: opacity 0.5s ease, translate 0.9s ease, filter 0.3s ease; }

/* Repère du joueur qui doit parler : un losange au-dessus de sa tête. */
.scene-marker {
  position: absolute;
  z-index: 2000;
  width: 12px;
  height: 12px;
  translate: -50% -50%;
  rotate: 45deg;
  background: #faff00;
  box-shadow: 0 0 10px rgba(250, 255, 0, 0.8);
}
.scene-marker[hidden] { display: none; }
html.motion-on .scene-marker { animation: scene-marker 0.9s ease-in-out infinite; }
@keyframes scene-marker { 50% { translate: -50% -85%; } }

/* Moteurs 3D de la table : hors de l'écran, la scène affichée en est une copie. */
.scene-engine { position: fixed; left: -10000px; top: 0; width: 900px; height: 600px; pointer-events: none; }
.scene-engine--studio { width: 300px; height: 356px; }

/* =====================================================================
   Page Personnage : réglage de la taille
   ===================================================================== */
.height-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.height-line input[type="range"] { flex: 1 1 180px; min-width: 0; accent-color: var(--neon-yellow, #ffe45c); }
.height-value { min-width: 9.5em; font-family: var(--font-display); font-size: 18px; color: var(--neon-yellow, #ffe45c); }
/* Trois silhouettes à la même échelle, pieds sur la même ligne. */
.height-compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding: 10px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}
.height-fig { display: grid; grid-template-rows: 124px auto auto; justify-items: center; align-items: end; text-align: center; }
.height-fig svg { display: block; width: auto; max-width: 100%; align-self: end; fill: #6f6a78; }
.height-fig--me svg { fill: var(--neon-cyan, #3ff2ff); filter: drop-shadow(0 0 5px rgba(63, 242, 255, 0.55)); }
.height-fig strong { margin-top: 6px; font-family: var(--font-display); font-size: 15px; }
.height-fig span { font-size: 11px; line-height: 1.25; color: var(--muted); }
.height-fig--me strong { color: var(--neon-cyan, #3ff2ff); }
html.motion-on .height-fig svg { transition: height 0.15s ease; }

/* ---------- Emotes en rendu réaliste ---------- */
/* Emote de visage : le film du vrai personnage remplace le portrait dès qu'il est photographié. */
.emote-char--real { width: 72px; height: 72px; }
.emote-reel { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* C'est le visage qui rit : plus de tremblement plaqué sur le cadre. */
.emote--real .emote-char { animation: emote-ring 1.2s ease-in-out infinite; }
/* Emote d'objet : la même animation qu'à la table, sur un coin de feutre. */
.emote-stage { display: block; width: 116px; height: 92px; }
.emote-bar .emote--real.emote--object { scale: 0.42; margin: -24px -30px; }
/* Objets des emotes dans la scène de poker : par-dessus les joueurs, sous les cartes et les pseudos. */
.scene-fx { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
