:root {
  /* Palette pastel : sable, menthe d'eau, ambre doux. Fond clair, encre vert-ardoise. */
  --felt-deep: #f1eee5; /* fond de page */
  --felt: #ffffff; /* surface de panneau */
  --felt-hi: #fbf8f1; /* haut de panneau */
  --edge: #ded5c4; /* filets */
  --sunken: #efe9dc; /* champs et fonds creux */
  --line-soft: rgba(59, 74, 68, 0.09);

  --bone: #3b4a44; /* encre principale */
  --bone-dim: #5d6c65;
  --chalk: #8a9791; /* encre secondaire */
  --paper: #ffffff; /* carton des cartes à jouer */

  --brass: #cf9a54; /* accent ambre */
  --brass-hi: #eec894;
  --brass-ink: #6d4a15; /* texte sur ambre */
  --rouge: #c8706f; /* cœurs, carreaux, alertes */
  --rouge-soft: #f6e3e2;

  --tapis: #8fbda6; /* tapis pastel, teinte soutenue */
  --tapis-hi: #a6cdb8;
  --tapis-low: #74a68e;
  --rail: #dccdb2; /* rail de table */

  --ticket: #ffffff;
  --ticket-hi: #fdfbf6;
  --ink: #3b4a44;
  --ink-soft: #6b7a73;

  --font-display: 'Oswald', 'Haettenschweiler', 'Arial Narrow', 'Impact', sans-serif;
  --font-body: 'Instrument Sans', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;

  --r-sm: 6px;
  --r: 12px;
  --r-lg: 20px;
  --gut: 14px;
  --shadow: 0 6px 18px rgba(59, 74, 68, 0.12);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

/* Sans cette règle, l'attribut `hidden` du navigateur reste sans effet sur tout
   élément qui déclare un display : .gate (grid) et .shell (flex) restaient donc
   visibles ensemble après la connexion, et il fallait faire défiler la page
   pour atteindre la table. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(120% 80% at 50% -12%, #e6efe8 0%, transparent 62%),
    var(--felt-deep);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
}

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

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

.mono,
.num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--chalk);
}

/* ------------------------------------------------------------ éléments communs */

.panel {
  background: var(--felt);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  padding: var(--gut);
}

.sheet {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--r);
  padding: var(--gut);
}

.btn {
  box-shadow: 0 1px 0 rgba(59, 74, 68, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--edge);
  border-radius: var(--r-sm);
  background: var(--felt-hi);
  color: var(--bone);
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover:not(:disabled) {
  background: var(--sunken);
}
.btn:active:not(:disabled) {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn--primary {
  background: var(--brass-hi);
  border-color: var(--brass);
  color: var(--brass-ink);
  font-weight: 500;
}
.btn--primary:hover:not(:disabled) {
  background: #f7d5a9;
}
.btn--danger {
  border-color: #e0b3b2;
  color: #a94f4e;
  background: var(--rouge-soft);
}
.btn--ghost {
  background: transparent;
}
.btn--block {
  width: 100%;
}
.btn--sm {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.85rem;
}

.field {
  display: block;
  margin-bottom: 12px;
}
.field__label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chalk);
  margin-bottom: 5px;
}
.field__help {
  display: block;
  margin-top: 5px;
  font-size: 0.8rem;
  color: var(--chalk);
}
.field input,
.field select,
select.input,
input.input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  background: var(--sunken);
  border: 1px solid var(--edge);
  border-radius: var(--r-sm);
  color: var(--bone);
}
.field input::placeholder {
  color: #a5b0aa;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.row > * {
  flex: 1 1 auto;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ------------------------------------------------------------ écran d'entrée
   La porte du club : un carton d'inscription posé sur le feutre. Le seul endroit
   de l'application où le papier prend le dessus sur le tapis. */

.gate {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 18px calc(28px + var(--safe-b));
  overflow: hidden;
}

/* le feutre : vignette, trame tissée, et l'arc du rail de table en bas */
.gate__felt {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(62% 44% at 50% 108%, #dcebe1 0%, transparent 72%),
    radial-gradient(110% 75% at 50% -12%, #e9f1ea 0%, transparent 64%),
    var(--felt-deep);
}
.gate__felt::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -58vw;
  width: 150vw;
  height: 110vw;
  transform: translateX(-50%);
  border-radius: 50%;
  border-top: 2px solid rgba(207, 154, 84, 0.3);
  box-shadow: 0 -10px 40px rgba(59, 74, 68, 0.06);
}

.gate__inner {
  position: relative;
  width: 100%;
  max-width: 430px;
}

/* ---- le sigle : deux cartes en éventail, face cachée ---- */

.mark {
  text-align: center;
  margin-bottom: 20px;
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.mark__logo {
  display: block;
  max-width: 190px;
  max-height: 88px;
  margin: 0 auto 14px;
  object-fit: contain;
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.mark__fan {
  position: relative;
  height: 62px;
  margin-bottom: 14px;
}
.mark__card {
  position: absolute;
  left: 50%;
  top: 0;
  width: 44px;
  height: 62px;
  border-radius: 5px;
  background: repeating-linear-gradient(45deg, #c6dbe8 0 4px, #b7d0e0 4px 8px);
  box-shadow:
    inset 0 0 0 2px #ffffff,
    inset 0 0 0 3px rgba(59, 74, 68, 0.1),
    0 4px 12px rgba(59, 74, 68, 0.14);
}
.mark__card--left {
  transform: translateX(-92%) rotate(-11deg);
  animation: fan-left 0.7s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
.mark__card--right {
  transform: translateX(-8%) rotate(8deg);
  animation: fan-right 0.7s cubic-bezier(0.2, 0.9, 0.3, 1) 0.06s both;
}
@keyframes fan-left {
  from {
    transform: translateX(-50%) rotate(0deg) translateY(-26px);
    opacity: 0;
  }
}
@keyframes fan-right {
  from {
    transform: translateX(-50%) rotate(0deg) translateY(-26px);
    opacity: 0;
  }
}
.mark__club {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--brass);
}
.mark__title {
  color: var(--ink);
  margin: 4px 0 2px;
  font-size: clamp(2.7rem, 15vw, 3.9rem);
  font-weight: 700;
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--bone);
  text-shadow: 0 2px 0 var(--sunken);
}
.mark__sub {
  margin: 0;
  font-size: 0.84rem;
  color: var(--chalk);
}

/* ---- le carton d'inscription ---- */

.ticket {
  position: relative;
  padding: 0 18px 16px;
  background: linear-gradient(178deg, var(--ticket-hi), var(--ticket));
  color: var(--ink);
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 10px 28px rgba(59, 74, 68, 0.14),
    0 2px 0 var(--sunken);
  animation: deal-in 0.62s cubic-bezier(0.2, 0.85, 0.3, 1) 0.1s both;
}
/* encoches de déchirure sur les côtés */
.ticket::before,
.ticket::after {
  content: '';
  position: absolute;
  top: 44px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--felt-deep);
  box-shadow: inset 0 0 0 1px var(--edge);
}
.ticket::before {
  left: -6px;
}
.ticket::after {
  right: -6px;
}

.ticket__stub {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0 11px;
  margin-bottom: 14px;
  border-bottom: 2px dashed rgba(31, 43, 40, 0.28);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
}
.ticket__seat {
  color: rgba(31, 43, 40, 0.42);
  letter-spacing: 0.14em;
}

.ticket .switch {
  background: rgba(31, 43, 40, 0.06);
  border-color: rgba(31, 43, 40, 0.16);
  margin-bottom: 16px;
}
.ticket .switch__btn {
  color: var(--ink-soft);
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.ticket .switch__btn.is-on {
  background: var(--tapis);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--tapis-low);
}

.field--ticket .field__label {
  color: var(--ink-soft);
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  font-size: 0.7rem;
}
.field--ticket .field__help {
  color: rgba(31, 43, 40, 0.5);
}
.field--ticket input {
  background: var(--ticket-hi);
  border: 1px solid rgba(31, 43, 40, 0.22);
  border-bottom-width: 2px;
  border-radius: 3px;
  color: var(--ink);
}
.field--ticket input::placeholder {
  color: rgba(31, 43, 40, 0.32);
}
.field--ticket input:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(200, 149, 47, 0.22);
}

/* ---- le code de la partie, composé case par case ---- */

.stamp {
  position: relative;
}
.stamp__cells {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}
.stamp__cells span {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  border: 1px dashed rgba(31, 43, 40, 0.3);
  border-radius: 3px;
  background: var(--ticket-hi);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 5.4vw, 1.5rem);
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.stamp__cells span.is-filled {
  border-style: solid;
  border-color: rgba(31, 43, 40, 0.55);
  background: #fff;
}
.stamp__cells span.is-next {
  border-color: var(--brass);
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(200, 149, 47, 0.22);
}
.stamp__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px; /* évite le zoom automatique sur iOS */
  text-align: center;
  letter-spacing: 0;
}
.stamp__input:focus {
  outline: none;
}

.gate__form .btn--block + .btn--block {
  margin-top: 8px;
}
.gate__form .btn--primary {
  margin-top: 4px;
  min-height: 52px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.btn--quiet {
  background: transparent;
  border-color: rgba(31, 43, 40, 0.2);
  color: var(--ink-soft);
}
.btn--quiet:hover:not(:disabled) {
  background: rgba(31, 43, 40, 0.05);
}

/* Toute connexion refusée doit se lire ici, sur le formulaire lui-même : une
   notification flottante au bas de l'écran passe inaperçue. */
.gate__error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--rouge-soft);
  border: 1px solid #e0b3b2;
  color: #9a4443;
  font-size: 0.86rem;
  line-height: 1.35;
}

.ticket__fine {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(31, 43, 40, 0.24);
  font-size: 0.72rem;
  line-height: 1.4;
  color: rgba(31, 43, 40, 0.55);
  text-align: center;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
@keyframes deal-in {
  from {
    opacity: 0;
    transform: translateY(-26px) rotate(-2.2deg);
  }
}

@media (min-width: 720px) {
  .gate__felt::after {
    bottom: -46vw;
    width: 120vw;
    height: 86vw;
  }
}

/* ------------------------------------------------------------ ossature */

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.main {
  flex: 1;
  padding: var(--gut) var(--gut) 0;
  max-width: 1340px;
  width: 100%;
  margin: 0 auto;
}
.view {
  padding-bottom: 18px;
}

.tabs {
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  gap: 2px;
  padding: 6px 6px calc(6px + var(--safe-b));
  margin-top: 12px;
  background: rgba(251, 248, 241, 0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--edge);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 50px;
  padding: 6px 2px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--chalk);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-display);
  cursor: pointer;
}
.tab span {
  font-size: 1.1rem;
  line-height: 1;
}
.tab.is-on {
  color: var(--brass-ink);
  background: #f8ecd8;
}

/* ------------------------------------------------------------ horloge (signature) */

.clock {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px var(--gut) 0;
  max-width: 1340px;
  width: 100%;
  margin: 0 auto;
}
.plaque {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 12px;
  background: #dcebe1;
  border: 1px solid var(--edge);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.plaque__level {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brass-hi);
  color: var(--brass-ink);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 0 0 3px #ffffff, 0 0 0 1px var(--brass);
}
.plaque__level small {
  display: block;
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  font-weight: 500;
}
.plaque__level b {
  font-size: 1.15rem;
}
.plaque__blinds {
  min-width: 0;
}
.plaque__blinds b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 7vw, 2.1rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plaque__next {
  font-size: 0.72rem;
  color: var(--chalk);
  letter-spacing: 0.04em;
}
.plaque__time {
  text-align: right;
}
.plaque__time b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 7vw, 2.1rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.plaque__rule {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: var(--brass);
  transition: width 1s linear;
}
.plaque.is-break {
  background: #f6ead4;
}
.plaque.is-paused .plaque__time b {
  color: var(--brass-hi);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

.stats {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stats::-webkit-scrollbar {
  display: none;
}
.stat {
  flex: 0 0 auto;
  padding: 5px 10px;
  background: var(--sunken);
  border: 1px solid var(--edge);
  border-radius: 999px;
  font-size: 0.74rem;
  color: var(--bone-dim);
  white-space: nowrap;
}
.stat b {
  font-family: var(--font-display);
  color: var(--bone);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ table de jeu */

.felt {
  /* Anneau au-delà de 46 % : les pastilles chevauchent le bord et les noms
     se lisent sur le rail, plus sur le feutre où se posent les cartes.
     Les marges ménagent la place nécessaire à ce débordement. */
  --rx: 48%;
  --ry: 46%;
  --cy: 47%;
  /* Le tapis ne doit jamais dépasser la hauteur disponible : sa largeur est
     bornée par ce que la fenêtre laisse en hauteur, et il reste centré. */
  margin: 14px 22px 54px; /* marge basse élargie : votre place déborde sous le feutre */
  /* Réserve verticale : plaque 66 + statistiques 30 + marges 30 + socle 175
     + onglets 56 + marges de page 28. Le tapis prend ce qui reste. */
  max-width: calc((100dvh - 380px) * 1.35);
  min-width: 220px;
  position: relative;
  /* Pas de `width: 100%` ici : additionnée aux marges latérales, elle rendait le
     tapis plus large que sa colonne. Il débordait alors de la largeur de ces
     marges et se décalait vers la droite — d'où les pastilles coupées au bord
     de l'écran et le chevauchement du bandeau de droite. La largeur automatique
     occupe exactement la place restante. */
  aspect-ratio: 1.35 / 1;
  border-radius: 50%;
  background: radial-gradient(70% 76% at 50% 40%, var(--tapis-hi) 0%, var(--tapis) 58%, var(--tapis-low) 100%);
  border: 9px solid var(--rail);
  box-shadow:
    inset 0 0 0 2px #ffffff,
    0 6px 18px rgba(59, 74, 68, 0.14);
}
@media (min-width: 720px) {
  .felt {
    --rx: 48%;
    --ry: 46%;
    aspect-ratio: 1.9 / 1;
    border-width: 12px;
    /* 80 px de chaque côté : la moitié d'une pastille, qui déborde sur le rail */
    margin: 22px 82px 54px; /* idem : place au débordement de votre pastille */
    /* plaque 72 + statistiques 34 + marges 46 + socle 240 + onglets 56 + 28 */
    max-width: calc((100dvh - 476px) * 1.9);
  }
}

.felt__center {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  width: 88%;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.board {
  display: flex;
  gap: 4px;
  justify-content: center;
  min-height: 74px;
}

.pot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #ffffffcc;
  border: 1px solid var(--edge);
  font-size: 0.8rem;
  color: var(--bone-dim);
}
.pot .jeton {
  margin-right: 2px;
}
.pot b {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--brass-ink);
  font-variant-numeric: tabular-nums;
}

.street {
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--chalk);
}

/* sièges */
.seat {
  position: absolute;
  width: 86px;
  z-index: 2;
  left: calc(50% + var(--rx) * var(--cos));
  top: calc(var(--cy) + var(--ry) * var(--sin));
  transform: translate(-50%, -50%);
  text-align: center;
}
@media (min-width: 900px) {
  .card {
    width: 62px;
    height: 87px;
    border-radius: 6px;
  }
  .card b {
    font-size: 1.95rem;
  }
  .card i {
    font-size: 1.6rem;
  }
  .card--mini {
    width: 26px;
    height: 36px;
    border-radius: 4px;
  }
  .card--mini b {
    font-size: 0.92rem;
  }
  .card--mini i {
    font-size: 0.76rem;
  }
  .card--big {
    width: 104px;
    height: 146px;
  }
  .card--big b {
    font-size: 3.1rem;
  }
  .card--big i {
    font-size: 2.5rem;
  }
  .board {
    gap: 8px;
    min-height: 104px;
  }
  .hand__stack {
    font-size: 2.1rem;
  }
}

@media (min-width: 720px) {
  /* Pastille resserrée : la marge du tapis suit sa demi-largeur, la table
     commence donc plus à gauche et gagne d'autant. */
  .seat {
    width: 176px;
  }
  .seat__card {
    padding: 5px 6px 6px;
  }
  .seat__name {
    font-size: 0.98rem;
  }
  .seat__stack {
    font-size: 1.28rem;
  }
  .seat__bb {
    font-size: 0.8rem;
  }
  .seat__mini {
    min-height: 45px;
  }
}
/* Anneau de compte à rebours : un dégradé conique derrière la pastille, qui se
   vide dans le sens des aiguilles. La forme suit celle de la pastille. */
.seat__ring {
  padding: 3px;
  border-radius: 999px;
  background: transparent;
}
.seat.is-turn .seat__ring {
  background: conic-gradient(
    from -90deg,
    var(--brass) calc(var(--timer, 100) * 1%),
    rgba(59, 74, 68, 0.14) 0
  );
  box-shadow: 0 1px 4px rgba(59, 74, 68, 0.18);
}
.seat.is-turn.is-low .seat__ring {
  background: conic-gradient(from -90deg, var(--rouge) calc(var(--timer, 100) * 1%), rgba(59, 74, 68, 0.14) 0);
}

.seat__card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 5px;
  padding: 4px 6px 4px 4px;
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(59, 74, 68, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.seat__body {
  min-width: 0;
  text-align: left;
}
.seat__name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seat__stack {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--brass-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
/* Le tapis exprimé en grosses blindes : la seule mesure qui compte en tournoi.
   Réservé aux écrans larges, faute de place sur une pastille de téléphone. */
.seat__bb {
  display: none;
  font-style: normal;
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--chalk);
  letter-spacing: 0.04em;
}
@media (min-width: 900px) {
  .seat__bb {
    display: block;
  }
}
.hand__bb {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--chalk);
  letter-spacing: 0.04em;
}
.seat__mini {
  display: flex;
  gap: 2px;
  min-height: 36px;
}
.seat.is-folded .seat__card {
  opacity: 0.4;
}
.seat.is-turn .seat__card {
  border-color: var(--brass);
}
.seat.is-winner .seat__card {
  border-color: var(--brass);
  background: #fbeed7;
}
.seat.is-offline .seat__name::after {
  content: ' ⦸';
  color: var(--rouge);
}
.seat__badges {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}
/* Le bouton donneur : un vrai jeton blanc cerclé de laiton, lisible d'un coup d'œil. */
.dealer {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--brass);
  color: var(--brass-ink);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(59, 74, 68, 0.28), inset 0 0 0 1px #fff;
}
@media (min-width: 900px) {
  .dealer {
    width: 30px;
    height: 30px;
    font-size: 1.05rem;
  }
  .seat__badges {
    top: -16px;
  }
}

/* Petite et grosse blinde, affichées au préflop. */
.tagblind {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--edge);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(59, 74, 68, 0.14);
}
.tagblind--bb {
  background: var(--brass-hi);
  border-color: var(--brass);
  color: var(--brass-ink);
}
.hand__badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 2px;
  min-height: 25px;
}
.hand__badges:empty {
  display: none;
}
.tagact {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--edge);
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(59, 74, 68, 0.14);
}
@media (min-width: 900px) {
  .tagact {
    padding: 3px 12px;
    font-size: 0.92rem;
  }
  .tagblind {
    font-size: 0.82rem;
    padding: 3px 10px;
  }
  .seat__badges {
    gap: 6px;
  }
}
.tagact.is-allin {
  background: var(--rouge);
  border-color: var(--rouge);
  color: #ffffff;
}
/* La mise ne fait plus partie de la pastille : elle est posée sur le tapis,
   entre le joueur et le pot, ce qui laisse la pastille compacte. */
.betchip {
  position: absolute;
  z-index: 2;
  left: calc(50% + var(--rx) * var(--cos) * 0.6);
  top: calc(var(--cy) + var(--ry) * var(--sin) * 0.6);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 5px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--edge);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  color: var(--brass-ink);
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(59, 74, 68, 0.18);
}
@media (min-width: 900px) {
  .betchip {
    font-size: 0.95rem;
    padding: 3px 11px 3px 7px;
  }
}
/* Pile de jetons en volume : des disques empilés, vus de trois quarts. La couleur
   dit la valeur, la hauteur dit la quantité — comme sur une vraie table. */
.pile {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 17px;
  height: 21px;
  vertical-align: -6px;
}
.pile i {
  position: absolute;
  left: 0;
  width: 17px;
  height: 7px;
  border-radius: 50%;
  background: var(--jeton, #c8952f);
  box-shadow:
    inset 0 -2px 0 rgba(59, 74, 68, 0.18),
    inset 0 0 0 1.4px rgba(255, 255, 255, 0.85),
    0 1px 1px rgba(59, 74, 68, 0.22);
}
.pile i:nth-child(1) {
  bottom: 0;
}
/* Décalage paramétrable : les piles posées sur le feutre sont plus épaisses,
   la valeur par défaut reste celle des petites piles. */
.pile i:nth-child(2) {
  bottom: calc(var(--ep, 3.5px) * 1);
}
.pile i:nth-child(3) {
  bottom: calc(var(--ep, 3.5px) * 2);
}
.pile i:nth-child(4) {
  bottom: calc(var(--ep, 3.5px) * 3);
}
.pile i:nth-child(5) {
  bottom: calc(var(--ep, 3.5px) * 4);
}
.pile i:nth-child(6) {
  bottom: calc(var(--ep, 3.5px) * 5);
}
@media (min-width: 900px) {
  .pile {
    width: 21px;
    height: 25px;
    vertical-align: -7px;
  }
  .pile i {
    width: 21px;
    height: 8px;
  }
}
/* variante réduite, pour les légendes */
.pile--mini {
  width: 13px;
  height: 15px;
  vertical-align: -4px;
}
.pile--mini i {
  width: 13px;
  height: 6px;
}

/* Emplacements des cartes communes, dessinés à même le tapis : on voit d'avance
   où se posent le flop, le turn et la river. */
.card--slot {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 0 0 1px rgba(59, 74, 68, 0.08);
}
.card--slot::after {
  content: '';
  width: 34%;
  height: 34%;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.5);
}

/* Les jetons misés rejoignent le pot à la fin de chaque tour d'enchères, et le
   pot rejoint le gagnant à la fin de la main. */
.chipfly {
  position: absolute;
  z-index: 3;
  left: calc(50% + var(--rx) * var(--cos, 0));
  top: calc(var(--cy) + var(--ry) * var(--sin, 0));
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(59, 74, 68, 0.14);
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--brass-ink);
  white-space: nowrap;
  pointer-events: none;
  animation: vers-le-pot 0.5s cubic-bezier(0.4, 0, 0.7, 1) forwards;
}
.chipfly--mine {
  left: 50%;
  top: 76%;
}
.chipfly--pot {
  left: 50%;
  top: 44%;
  animation: vers-le-gagnant 0.6s cubic-bezier(0.3, 0, 0.6, 1) forwards;
}
@keyframes vers-le-pot {
  to {
    left: 50%;
    top: 44%;
    opacity: 0;
  }
}
@keyframes vers-le-gagnant {
  to {
    left: calc(50% + var(--rx) * var(--cos, 0));
    top: calc(var(--cy) + var(--ry) * var(--sin, 0));
    opacity: 0;
  }
}

/* Votre propre mise, posée sur le tapis devant votre place : sans elle, on ne
   voit pas ce qu'on vient d'engager. */
.mybet {
  position: absolute;
  left: 50%;
  top: 76%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(59, 74, 68, 0.14);
  white-space: nowrap;
}
.mybet b {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  color: var(--brass-ink);
}
.mybet .tagact {
  margin-left: 2px;
}
@media (min-width: 900px) {
  .mybet {
    padding: 6px 16px;
  }
  .mybet b {
    font-size: 1.35rem;
  }
}

/* cartes */
.card {
  display: inline-grid;
  place-items: center;
  align-content: center;
  width: 43px;
  height: 60px;
  border-radius: 4px;
  background: var(--paper);
  border: 1px solid var(--edge);
  color: var(--ink);
  font-family: var(--font-display);
  line-height: 0.95;
  box-shadow: 0 1px 3px rgba(59, 74, 68, 0.14);
  user-select: none;
}
.card b {
  font-size: 1.32rem;
  font-weight: 600;
}
.card i {
  font-style: normal;
  font-size: 1.1rem;
}
.card--red {
  color: var(--rouge);
}
/* Jeu à quatre couleurs : carreau bleu, trèfle vert. Plus lisible sur petit écran. */
body.deck4 .card--d {
  color: #3d7fa8;
}
body.deck4 .card--c {
  color: #3f8a63;
}
.card--back {
  background: repeating-linear-gradient(45deg, #c6dbe8 0 4px, #b7d0e0 4px 8px);
  border: 1px solid #a9c3d6;
  box-shadow: inset 0 0 0 2px #ffffff, 0 1px 3px rgba(59, 74, 68, 0.12);
}
.card--mini {
  width: 26px;
  height: 36px;
  border-radius: 3px;
}
.card--mini b {
  font-size: 0.92rem;
}
.card--mini i {
  font-size: 0.76rem;
}
.card--big {
  width: 76px;
  height: 107px;
}
.card--big b {
  font-size: 2.25rem;
}
.card--big i {
  font-size: 1.85rem;
}
.card--best {
  box-shadow: 0 0 0 2px var(--brass), 0 1px 3px rgba(59, 74, 68, 0.14);
}
.deal {
  animation: deal 0.32s cubic-bezier(0.2, 0.9, 0.3, 1) backwards;
}
@keyframes deal {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.86);
  }
}

/* votre main */
/* Socle : vos cartes et vos boutons ne doivent jamais sortir de l'écran.
   Il colle au bas de la fenêtre tant que la table est visible. */
.dock {
  position: sticky;
  bottom: 0;
  z-index: 16;
  padding-bottom: 4px;
  background: linear-gradient(to top, var(--felt-deep) 78%, transparent);
}

.hand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--felt);
  border: 1px solid var(--edge);
  border-radius: var(--r);
}
.hand__cards {
  display: flex;
  gap: 5px;
}
.hand__meta .eyebrow {
  display: block;
}
.hand__stack {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.hand__label {
  font-size: 0.8rem;
  color: var(--brass-ink);
}

/* barre d'action */
.actions {
  padding: 8px 0 0;
}
.actions__timer {
  height: 4px;
  border-radius: 999px;
  background: var(--sunken);
  overflow: hidden;
  margin-bottom: 8px;
}
.actions__timer i {
  display: block;
  height: 100%;
  background: var(--brass);
  transition: width 0.25s linear;
}
.actions__timer.is-low i {
  background: var(--rouge);
}
.actions__main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.actions__main .btn {
  min-height: 54px;
  font-size: 0.96rem;
  flex-direction: column;
  gap: 1px;
  line-height: 1.1;
}
.actions__main .btn small {
  font-family: var(--font-display);
  font-size: 0.8rem;
  opacity: 0.8;
}
.raise {
  margin-bottom: 8px;
  padding: 10px 12px;
  background: var(--sunken);
  border: 1px solid var(--edge);
  border-radius: var(--r);
}
.raise__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.raise__value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--brass-ink);
  font-variant-numeric: tabular-nums;
}
.raise input[type='range'] {
  width: 100%;
  margin: 8px 0 6px;
  accent-color: var(--brass);
}
.raise__presets {
  display: flex;
  gap: 5px;
}
.raise__presets .btn {
  flex: 1;
  min-height: 34px;
  font-size: 0.8rem;
}

.waiting {
  padding: 12px;
  text-align: center;
  color: var(--chalk);
  font-size: 0.88rem;
}

/* résultat de main */
.showdown {
  margin-top: 10px;
}
.showdown__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}
.showdown__row:last-child {
  border-bottom: 0;
}
.showdown__name {
  flex: 1;
  min-width: 0;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.showdown__gain {
  font-family: var(--font-display);
  color: var(--brass-ink);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ listes & tableaux */

.card-list {
  display: grid;
  gap: 10px;
}

.tabular {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.tabular th {
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chalk);
  font-weight: 500;
  padding: 0 8px 6px;
  border-bottom: 1px solid var(--edge);
}
.tabular td {
  padding: 8px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.tabular tr:last-child td {
  border-bottom: 0;
}
.tabular .r {
  text-align: right;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}
.rank {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sunken);
  border: 1px solid var(--edge);
  font-family: var(--font-display);
  font-size: 0.82rem;
}
.rank--1 {
  background: #f2d69b;
  border-color: var(--brass);
  color: var(--brass-ink);
}
.rank--2 {
  background: #dfe3e0;
  border-color: #b9c1bd;
  color: #4a5551;
}
.rank--3 {
  background: #e8cdb6;
  border-color: #cba98c;
  color: #7a5334;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  padding: 4px 10px;
  background: var(--sunken);
  border: 1px solid var(--edge);
  border-radius: 999px;
  font-size: 0.82rem;
}
.chip--out {
  opacity: 0.55;
  text-decoration: line-through;
}
.chip button {
  margin-left: 6px;
  border: 0;
  background: none;
  color: var(--rouge);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

.code-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 14px;
  background: var(--sunken);
  border: 1px dashed var(--brass);
  border-radius: var(--r-sm);
}
.code-badge b {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.24em;
  color: var(--brass-ink);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--edge);
  color: var(--chalk);
}
.badge--live {
  border-color: var(--rouge);
  color: #a94f4e;
  background: var(--rouge-soft);
}
.badge--open {
  border-color: var(--brass);
  color: var(--brass-ink);
  background: #fbeed7;
}

.feed {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: var(--bone-dim);
  max-height: 240px;
  overflow-y: auto;
}
.feed li {
  padding: 5px 0;
  border-bottom: 1px solid var(--line-soft);
}
.feed time {
  color: var(--chalk);
  font-family: var(--font-display);
  margin-right: 6px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 8px;
}
.section-title h2 {
  font-size: 1.12rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.empty {
  padding: 22px 14px;
  text-align: center;
  color: var(--chalk);
  border: 1px dashed var(--edge);
  border-radius: var(--r);
}

.logo-slot {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px dashed var(--edge);
  border-radius: var(--r);
  background: var(--felt-hi);
  text-align: center;
}
.logo-slot img {
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
}
.logo-slot p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--chalk);
}
input[type='file'] {
  width: 100%;
  padding: 10px;
  font-size: 0.85rem;
  background: var(--sunken);
  border: 1px solid var(--edge);
  border-radius: var(--r-sm);
}
input[type='color'] {
  width: 54px;
  height: 46px;
  padding: 3px;
  background: var(--sunken);
  border: 1px solid var(--edge);
  border-radius: var(--r-sm);
  flex: 0 0 auto;
}

details.fold {
  border: 1px solid var(--edge);
  border-radius: var(--r);
  padding: 10px 12px;
  background: var(--felt-hi);
}
details.fold + .logo-slot {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px dashed var(--edge);
  border-radius: var(--r);
  background: var(--felt-hi);
  text-align: center;
}
.logo-slot img {
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
}
.logo-slot p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--chalk);
}
input[type='file'] {
  width: 100%;
  padding: 10px;
  font-size: 0.85rem;
  background: var(--sunken);
  border: 1px solid var(--edge);
  border-radius: var(--r-sm);
}
input[type='color'] {
  width: 54px;
  height: 46px;
  padding: 3px;
  background: var(--sunken);
  border: 1px solid var(--edge);
  border-radius: var(--r-sm);
  flex: 0 0 auto;
}

details.fold {
  margin-top: 8px;
}
details.fold > summary {
  cursor: pointer;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--bone-dim);
}
details.fold[open] > summary {
  margin-bottom: 10px;
  color: var(--bone);
}

/* ------------------------------------------------------------ notifications */

.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(84px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  gap: 6px;
  width: min(460px, calc(100vw - 24px));
  pointer-events: none;
}
.toast {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--felt);
  color: var(--ink);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  animation: pop 0.2s ease;
}
.toast--error {
  background: var(--rouge-soft);
  border-color: #e0b3b2;
}
.toast--success {
  background: #e2f0e6;
  border-color: #b6d6bf;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.linkstate {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  padding: 5px;
  text-align: center;
  background: var(--rouge-soft);
  color: #9a4443;
  border-bottom: 1px solid #e0b3b2;
  font-size: 0.8rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Mode plein tapis : le panneau latéral passe sous la table, qui prend toute
   la largeur. Utile pour projeter la partie ou jouer sur un petit écran. */
body.plein-tapis .layout {
  grid-template-columns: minmax(0, 1fr);
}
/* Les compteurs et les onglets restent visibles : le plein tapis élargit la
   table sans amputer les repères de la partie. */
body.plein-tapis .felt {
  /* Les onglets restant affichés, la réserve verticale est la même qu'en mode
     normal : seul le bandeau latéral libère de la largeur. */
  max-width: calc((100dvh - 476px) * 1.9);
}
@media (max-width: 719px) {
  body.plein-tapis .felt {
    max-width: calc((100dvh - 380px) * 1.35);
  }
}

.fullbtn {
  flex: 0 0 auto;
  min-height: 0;
  padding: 5px 12px;
  font-size: 0.74rem;
  border-radius: 999px;
  background: var(--felt);
  border: 1px solid var(--edge);
  color: var(--bone-dim);
  cursor: pointer;
  white-space: nowrap;
}
.fullbtn:hover {
  background: var(--sunken);
}
.fullbtn.is-on {
  background: var(--brass-hi);
  border-color: var(--brass);
  color: var(--brass-ink);
}

/* Panneau latéral replié : la table récupère toute la largeur. Le bouton de la
   barre supérieure le fait revenir. */
body.panneau-ferme .layout > div:last-child {
  display: none;
}
@media (min-width: 900px) {
  body.panneau-ferme .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* La table comme écran dédié : la fenêtre est verrouillée à sa hauteur, plus
   aucun défilement de page. Le panneau latéral défile pour son propre compte.
   Les autres onglets (journées, classement, console) défilent normalement. */
@media (min-width: 900px) {
  body.vue-table {
    overflow: hidden;
  }
  body.vue-table .shell {
    height: 100dvh;
  }
  body.vue-table .main {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  body.vue-table #view-table,
  body.vue-table #view-table .layout {
    height: 100%;
    padding-bottom: 0;
  }
  body.vue-table .layout > div:first-child {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  body.vue-table .layout > div:first-child .felt {
    flex: 0 0 auto;
  }
  body.vue-table .layout > div:last-child {
    max-height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
  }
  /* le socle se cale au bas de la colonne plutôt que de coller au défilement */
  body.vue-table .dock {
    position: static;
    margin-top: auto;
    background: none;
  }
}

/* écran large : la table et le panneau latéral cohabitent */
@media (min-width: 900px) {
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 14px;
    align-items: start;
  }
  /* le panneau latéral se contente du strict nécessaire */
  .layout > div:last-child .tabular {
    font-size: 0.8rem;
  }
  .layout > div:last-child .tabular td {
    padding: 5px 6px;
  }
  .layout > div:last-child .section-title {
    margin: 12px 0 6px;
  }
  .layout > div:last-child .feed {
    font-size: 0.78rem;
    max-height: 300px;
  }
}
@media (min-width: 1400px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 220px;
  }
}


/* ==========================================================================
   Éléments ajoutés : position, discussion, boutons de montant, jetons de tapis.
   Aucune règle ci-dessous ne modifie les dimensions existantes.
   ========================================================================== */

/* --- Ma position ------------------------------------------------------- */
.position {
  text-align: center;
}
.position__rang {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  font-family: var(--font-display);
  color: var(--brass-ink);
  line-height: 1;
}
.position__rang b {
  font-size: 2.4rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.position__rang span {
  font-size: 1.05rem;
}
.position__sur {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: var(--bone-dim);
}
.position__tapis {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
}
.position__tapis i {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--chalk);
}
.position--out .position__rang {
  color: var(--chalk);
}

/* --- Discussion -------------------------------------------------------- */
.chat {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: none;
  font-size: 0.84rem;
  line-height: 1.35;
}
.chat::-webkit-scrollbar {
  display: none;
}
.chat li {
  padding: 3px 0;
  color: var(--bone-dim);
  overflow-wrap: anywhere;
}
.chat li b {
  color: var(--bone);
  font-weight: 600;
}
.chat li b.chat__orga,
.chat li.chat__moi b {
  color: var(--brass-ink);
}
.chat li.chat__sys {
  color: var(--chalk);
  font-style: italic;
}
body.chat-ferme .chat-bloc {
  display: none;
}

/* --- Montants de relance ------------------------------------------------
   Des boutons francs à la place du curseur : faire glisser une poignée en
   soixante secondes est intenable, surtout au doigt. */
.raise__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 8px;
}
@media (min-width: 640px) {
  .raise__grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}
.btn.mise {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 56px;
  padding: 6px 10px;
  line-height: 1.1;
}
.btn.mise small {
  font-size: 0.74rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.btn.mise b {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  color: var(--brass-ink);
}
.btn.mise--tapis {
  background: var(--brass-hi);
  border-color: var(--brass);
}
.btn.mise--tapis small,
.btn.mise--tapis b {
  color: var(--brass-ink);
}
@media (min-width: 900px) {
  .btn.mise {
    min-height: 64px;
  }
  .btn.mise b {
    font-size: 1.45rem;
  }
}

/* --- Absent ------------------------------------------------------------- */
.tagact.is-absent {
  background: var(--sunken);
  border-color: var(--edge);
  color: var(--ink-soft);
}
.seat.is-absent .seat__card {
  opacity: 0.62;
  border-style: dashed;
}

/* --- Jetons du tapis, posés sur le feutre ------------------------------
   Réservés aux écrans larges : sur un feutre de téléphone, sept tapis, sept
   mises et les cartes communes ne tiennent pas ensemble. */
.stackchip {
  display: none;
  position: absolute;
  z-index: 1;
  left: calc(50% + var(--rx) * var(--cos) * 0.9);
  top: calc(var(--cy) + var(--ry) * var(--sin) * 0.9);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
@media (min-width: 720px) {
  .stackchip {
    display: block;
  }
}
.pile--table {
  --ep: 5px;
  width: 24px;
  height: 30px;
  vertical-align: 0;
}
.pile--table i {
  width: 24px;
  height: 9px;
}
@media (min-width: 900px) {
  .pile--table {
    --ep: 6px;
    width: 30px;
    height: 36px;
  }
  .pile--table i {
    width: 30px;
    height: 11px;
  }
}

/* --- Votre place, posée en bas du tapis ---------------------------------
   Elle reprend la pastille des autres joueurs, avec vos cartes en grand. Les
   dimensions suivent celles déjà en place pour les sièges. */
.seat--moi {
  width: 186px;
  z-index: 4;
  /* abaissée sous la couronne : sinon elle heurte les sièges du bas */
  top: calc(var(--cy) + var(--ry) * 1.2);
}
.seat--moi .seat__card {
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 18px;
}
.seat--moi .hand__cards {
  display: flex;
  gap: 4px;
}
.seat--moi .card--big {
  width: 52px;
  height: 73px;
}
.seat--moi .card--big b {
  font-size: 1.5rem;
}
.seat--moi .card--big i {
  font-size: 1.22rem;
}
.seat--moi .seat__name {
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.seat--moi .hand__label {
  font-size: 0.78rem;
  color: var(--brass-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 900px) {
  .seat--moi {
    width: 236px;
    top: calc(var(--cy) + var(--ry) * 1);
  }
  .seat--moi .seat__card {
    gap: 12px;
    padding: 8px 14px 8px 8px;
    border-radius: 24px;
  }
  .seat--moi .card--big {
    width: 64px;
    height: 90px;
  }
  .seat--moi .card--big b {
    font-size: 1.9rem;
  }
  .seat--moi .card--big i {
    font-size: 1.55rem;
  }
  .seat--moi .seat__name {
    font-size: 0.84rem;
  }
}




/* ==========================================================================
   Profils d'affichage choisis à la connexion. Ils reprennent mot pour mot les
   règles des paliers automatiques, mais s'appliquent quelle que soit la largeur
   détectée : une tablette en paysage ressemble à un petit ordinateur, et la
   seule largeur ne suffit pas à trancher.
     · Tablette   = le palier intermédiaire (≥ 720 px)
     · Ordinateur = ce même palier, complété par celui des grands écrans
   ========================================================================== */

body.profil-tablette .gate__felt::after {
    bottom: -46vw;
    width: 120vw;
    height: 86vw;
  }

body.profil-ordi .gate__felt::after {
    bottom: -46vw;
    width: 120vw;
    height: 86vw;
  }

body.profil-tablette .felt {
    --rx: 48%;
    --ry: 46%;
    aspect-ratio: 1.9 / 1;
    border-width: 12px;
    /* 80 px de chaque côté : la moitié d'une pastille, qui déborde sur le rail */
    margin: 22px 82px 54px; /* idem : place au débordement de votre pastille */
    /* plaque 72 + statistiques 34 + marges 46 + socle 240 + onglets 56 + 28 */
    max-width: calc((100dvh - 476px) * 1.9);
  }

body.profil-ordi .felt {
    --rx: 48%;
    --ry: 46%;
    aspect-ratio: 1.9 / 1;
    border-width: 12px;
    /* 80 px de chaque côté : la moitié d'une pastille, qui déborde sur le rail */
    margin: 22px 82px 54px; /* idem : place au débordement de votre pastille */
    /* plaque 72 + statistiques 34 + marges 46 + socle 240 + onglets 56 + 28 */
    max-width: calc((100dvh - 476px) * 1.9);
  }

body.profil-tablette .seat {
    width: 176px;
  }
body.profil-tablette .seat__card {
    padding: 5px 6px 6px;
  }
body.profil-tablette .seat__name {
    font-size: 0.98rem;
  }
body.profil-tablette .seat__stack {
    font-size: 1.28rem;
  }
body.profil-tablette .seat__bb {
    font-size: 0.8rem;
  }
body.profil-tablette .seat__mini {
    min-height: 45px;
  }

body.profil-ordi .seat {
    width: 176px;
  }
body.profil-ordi .seat__card {
    padding: 5px 6px 6px;
  }
body.profil-ordi .seat__name {
    font-size: 0.98rem;
  }
body.profil-ordi .seat__stack {
    font-size: 1.28rem;
  }
body.profil-ordi .seat__bb {
    font-size: 0.8rem;
  }
body.profil-ordi .seat__mini {
    min-height: 45px;
  }

body.profil-tablette .stackchip {
    display: block;
  }

body.profil-ordi .stackchip {
    display: block;
  }

body.profil-ordi .card {
    width: 62px;
    height: 87px;
    border-radius: 6px;
  }
body.profil-ordi .card b {
    font-size: 1.95rem;
  }
body.profil-ordi .card i {
    font-size: 1.6rem;
  }
body.profil-ordi .card--mini {
    width: 26px;
    height: 36px;
    border-radius: 4px;
  }
body.profil-ordi .card--mini b {
    font-size: 0.92rem;
  }
body.profil-ordi .card--mini i {
    font-size: 0.76rem;
  }
body.profil-ordi .card--big {
    width: 104px;
    height: 146px;
  }
body.profil-ordi .card--big b {
    font-size: 3.1rem;
  }
body.profil-ordi .card--big i {
    font-size: 2.5rem;
  }
body.profil-ordi .board {
    gap: 8px;
    min-height: 104px;
  }
body.profil-ordi .hand__stack {
    font-size: 2.1rem;
  }

body.profil-ordi .seat__bb {
    display: block;
  }

body.profil-ordi .dealer {
    width: 30px;
    height: 30px;
    font-size: 1.05rem;
  }
body.profil-ordi .seat__badges {
    top: -16px;
  }

body.profil-ordi .tagact {
    padding: 3px 12px;
    font-size: 0.92rem;
  }
body.profil-ordi .tagblind {
    font-size: 0.82rem;
    padding: 3px 10px;
  }
body.profil-ordi .seat__badges {
    gap: 6px;
  }

body.profil-ordi .betchip {
    font-size: 0.95rem;
    padding: 3px 11px 3px 7px;
  }

body.profil-ordi .pile {
    width: 21px;
    height: 25px;
    vertical-align: -7px;
  }
body.profil-ordi .pile i {
    width: 21px;
    height: 8px;
  }

body.profil-ordi .mybet {
    padding: 6px 16px;
  }
body.profil-ordi .mybet b {
    font-size: 1.35rem;
  }

body.profil-ordi.panneau-ferme .layout {
    grid-template-columns: minmax(0, 1fr);
  }

body.profil-ordi.vue-table {
    overflow: hidden;
  }
body.profil-ordi.vue-table .shell {
    height: 100dvh;
  }
body.profil-ordi.vue-table .main {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
body.profil-ordi.vue-table #view-table,
body.profil-ordi.vue-table #view-table .layout {
    height: 100%;
    padding-bottom: 0;
  }
body.profil-ordi.vue-table .layout > div:first-child {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
body.profil-ordi.vue-table .layout > div:first-child .felt {
    flex: 0 0 auto;
  }
body.profil-ordi.vue-table .layout > div:last-child {
    max-height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
  }
body.profil-ordi.vue-table .dock {
    position: static;
    margin-top: auto;
    background: none;
  }

body.profil-ordi .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 14px;
    align-items: start;
  }
body.profil-ordi .layout > div:last-child .tabular {
    font-size: 0.8rem;
  }
body.profil-ordi .layout > div:last-child .tabular td {
    padding: 5px 6px;
  }
body.profil-ordi .layout > div:last-child .section-title {
    margin: 12px 0 6px;
  }
body.profil-ordi .layout > div:last-child .feed {
    font-size: 0.78rem;
    max-height: 300px;
  }

body.profil-ordi .btn.mise {
    min-height: 64px;
  }
body.profil-ordi .btn.mise b {
    font-size: 1.45rem;
  }

body.profil-ordi .pile--table {
    --ep: 6px;
    width: 30px;
    height: 36px;
  }
body.profil-ordi .pile--table i {
    width: 30px;
    height: 11px;
  }

body.profil-ordi .seat--moi {
    width: 236px;
    top: calc(var(--cy) + var(--ry) * 1);
  }
body.profil-ordi .seat--moi .seat__card {
    gap: 12px;
    padding: 8px 14px 8px 8px;
    border-radius: 24px;
  }
body.profil-ordi .seat--moi .card--big {
    width: 64px;
    height: 90px;
  }
body.profil-ordi .seat--moi .card--big b {
    font-size: 1.9rem;
  }
body.profil-ordi .seat--moi .card--big i {
    font-size: 1.55rem;
  }
body.profil-ordi .seat--moi .seat__name {
    font-size: 0.84rem;
  }

/* Cibles tactiles du profil tablette : le doigt demande plus de surface que la
   souris, et le survol n'a aucun sens sur un écran qu'on touche. */
body.profil-tablette .actions__main .btn {
  min-height: 68px;
  font-size: 1.05rem;
}
body.profil-tablette .btn.mise {
  min-height: 74px;
}
body.profil-tablette .tab {
  min-height: 62px;
}
body.profil-tablette .btn--sm {
  min-height: 42px;
}
body.profil-tablette .btn:hover:not(:disabled),
body.profil-tablette .fullbtn:hover {
  background: inherit;
}


/* --- Frise de réglage de la mise ---------------------------------------
   Les boutons couvrent les montants courants ; la frise sert à ajuster ce
   qu'ils ne proposent pas. Elle part du minimum et monte jusqu'au tapis. */
.frise {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.frise input[type='range'] {
  flex: 3 1 120px;
  min-width: 0;
  margin: 0;
  accent-color: var(--brass);
  height: 34px;
}
.frise__ok {
  flex: 1 1 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 52px;
  line-height: 1.1;
}
.frise__ok small {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  opacity: 0.8;
}
.frise__ok b {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 900px) {
  .frise input[type='range'] {
    height: 40px;
  }
  .frise__ok {
    min-height: 60px;
  }
  .frise__ok b {
    font-size: 1.4rem;
  }
}

/* --- Omaha : quatre cartes au lieu de deux -----------------------------
   Les pastilles et votre place gardent leur largeur : ce sont les cartes qui
   se resserrent, uniquement quand il y en a quatre. Le hold'em n'est pas
   touché par ces règles. */
.seat__mini--quatre {
  gap: 1px;
}
.seat__mini--quatre .card--mini {
  width: 21px;
  height: 29px;
  border-radius: 3px;
}
.seat__mini--quatre .card--mini b {
  font-size: 0.74rem;
}
.seat__mini--quatre .card--mini i {
  font-size: 0.6rem;
}
@media (min-width: 720px) {
  .seat__mini--quatre .card--mini {
    width: 30px;
    height: 42px;
    border-radius: 4px;
  }
  .seat__mini--quatre .card--mini b {
    font-size: 1.05rem;
  }
  .seat__mini--quatre .card--mini i {
    font-size: 0.86rem;
  }
}

.hand__cards--quatre {
  gap: 3px;
}
.seat--moi .hand__cards--quatre .card--big {
  width: 38px;
  height: 53px;
}
.seat--moi .hand__cards--quatre .card--big b {
  font-size: 1.1rem;
}
.seat--moi .hand__cards--quatre .card--big i {
  font-size: 0.9rem;
}
@media (min-width: 900px) {
  .seat--moi .hand__cards--quatre .card--big {
    width: 48px;
    height: 67px;
  }
  .seat--moi .hand__cards--quatre .card--big b {
    font-size: 1.4rem;
  }
  .seat--moi .hand__cards--quatre .card--big i {
    font-size: 1.15rem;
  }
}

/* Champ compact des pénalités, dans la console. */
.input--mini {
  padding: 4px 6px;
  min-height: 32px;
  font-size: 0.86rem;
  text-align: right;
}
