/*!
 * 4-2-1 — "La Table entre Potes" — design façon comptoir de bar
 */
:root {
  --wood-dark: #2b1810;
  --wood: #4a2c1c;
  --wood-light: #6b4028;
  --felt: #0f5c3a;
  --felt-dark: #0a3f28;
  --brass: #c9a24b;
  --brass-light: #e8c876;
  --parchment: #ecdcb3;
  --parchment-dark: #d8c495;
  --ink: #2a1c10;
  --red: #a4231f;
  --cream: #f7ecd2;
  --shadow: 0 12px 28px rgba(0,0,0,0.5);
  font-size: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.08) 0 3px, transparent 3px 26px),
    linear-gradient(160deg, var(--wood-light), var(--wood) 55%, var(--wood-dark));
}

a { color: inherit; }

/* ---------- Header + menu hamburger ---------- */
.bar-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  background: rgba(0,0,0,0.28);
  border-bottom: 3px solid var(--brass);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; min-width: 0; }
.brand img { width: 42px; height: 36px; display: block; flex: none; }
.brand__name { font-size: 1.4rem; font-weight: 700; color: var(--brass-light); }
.brand__tagline { display: block; font-size: 0.7rem; font-weight: 400; opacity: 0.85; white-space: nowrap; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  padding: 0;
  flex: none;
}
.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--brass-light);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle--active .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle--active .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle--active .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: absolute;
  top: 100%;
  right: 1.2rem;
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 190px;
  background: var(--wood-dark);
  border: 1px solid var(--brass);
  border-radius: 10px;
  padding: 0.5rem;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 30;
}
.nav--open { opacity: 1; visibility: visible; transform: translateY(0); }
.nav a {
  text-decoration: none;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--cream);
  border: 1px solid transparent;
}
.nav a:hover { background: rgba(255,255,255,0.08); }
.nav__link--active { border-color: var(--brass); background: rgba(201,162,75,0.18); color: var(--brass-light); }

main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.6rem 1.2rem 3rem;
}

.footer {
  text-align: center;
  padding: 1rem 1rem calc(1.4rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.78rem;
  color: rgba(247,236,210,0.55);
  border-top: 1px solid rgba(201,162,75,0.2);
}

/* ---------- Boutons ---------- */
.btn {
  font: inherit;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.5rem;
  min-height: 44px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn--primary { background: linear-gradient(135deg, var(--brass-light), var(--brass)); color: #2a1c07; }
.btn--secondary { background: rgba(255,255,255,0.12); color: var(--cream); border: 1px solid rgba(255,255,255,0.3); }
.btn--ghost { background: transparent; color: var(--cream); border: 1px solid rgba(255,255,255,0.35); box-shadow: none; }
.btn--danger { background: linear-gradient(135deg, #c0392b, var(--red)); color: var(--cream); }

/* ---------- Setup ---------- */
.setup-card {
  background: rgba(0,0,0,0.28);
  border: 2px solid var(--brass);
  border-radius: 16px;
  padding: 1.6rem;
  max-width: 620px;
  margin: 0 auto;
}
.setup-card h2 { color: var(--brass-light); margin-top: 0; }
.stepper {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  justify-content: center;
  margin: 1rem 0 1.4rem;
}
.stepper button {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--brass);
  background: transparent;
  color: var(--brass-light);
  font-size: 1.3rem;
  cursor: pointer;
}
.stepper__count { font-size: 1.6rem; font-weight: 800; color: var(--cream); min-width: 2.4ch; text-align: center; }

.seat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1.4rem;
}
.seat-row {
  display: flex;
  gap: 0.5rem;
}
.seat-row .seat-name {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--brass);
  background: var(--parchment);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  min-height: 44px;
}
.seat-type-toggle {
  flex: none;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: var(--cream);
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  min-height: 44px;
  white-space: nowrap;
}
.seat-type-toggle--ai {
  border-color: var(--brass);
  background: rgba(201,162,75,0.22);
  color: var(--brass-light);
}

/* ---------- Table ovale vue du dessus, sièges tout autour ---------- */
.table-arena {
  position: relative;
  width: 100%;
  max-width: 760px;
  margin: 1rem auto 2.6rem;
  aspect-ratio: 16 / 11;
}

.felt-oval {
  position: absolute;
  inset: 20% 13% 16% 13%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 38% 30%, rgba(255,255,255,0.07), transparent 55%),
    radial-gradient(ellipse at center, var(--felt) 0%, var(--felt-dark) 100%);
  border: 8px solid var(--brass);
  box-shadow: inset 0 0 34px rgba(0,0,0,0.6), var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tray {
  width: 100%;
  max-width: 260px;
  text-align: center;
}
.tray__label-unused {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass-light);
  opacity: 0.85;
  margin-bottom: 0.5rem;
}

/* Couche des sièges, positionnés en absolu tout autour de l'ellipse */
.seats-layer {
  position: absolute;
  inset: 2.4rem 0 2rem 0;
  pointer-events: none;
}

.seat {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 88px;
  text-align: center;
  opacity: 0.6;
  filter: grayscale(35%);
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease;
  z-index: 2;
}

.seat__avatar {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--seat-color, var(--parchment));
  border: 3px solid var(--parchment-dark);
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  box-shadow: 0 5px 12px rgba(0,0,0,0.5);
}

.seat__beer {
  position: absolute;
  bottom: -8px;
  right: -10px;
  width: 24px;
  height: auto;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.5));
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.seat__ai-tag,
.seat__first-loser {
  position: absolute;
  top: -8px;
  font-size: 0.85rem;
  background: var(--wood-dark);
  border-radius: 50%;
  padding: 1px 3px;
  line-height: 1;
}
.seat__ai-tag { left: -8px; }
.seat__first-loser { right: -8px; }

.seat__name {
  margin-top: 0.4rem;
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat__matches {
  display: flex;
  gap: 2px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.2rem;
  min-height: 16px;
}
.match {
  width: 4px;
  height: 16px;
  border-radius: 2px 2px 1px 1px;
  background: linear-gradient(#e0b98a, #b98550);
  position: relative;
  flex: none;
}
.match::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -1.5px;
  width: 7px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.seat__flag {
  position: absolute;
  top: -1.9rem;
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  background: var(--brass);
  color: #2a1c07;
  font-weight: 800;
  font-size: 0.68rem;
  white-space: nowrap;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Sièges du bas de la table : la bulle pointe vers le bas, loin des boutons centraux */
.seat--flag-below .seat__flag {
  top: auto;
  bottom: -1.9rem;
}

/* ---------- Siège actif : le point focal de la table ---------- */
.seat--active {
  opacity: 1;
  filter: none;
  transform: translate(-50%, -50%) scale(1.22);
  z-index: 6;
}
.seat--active .seat__avatar {
  border-color: var(--brass-light);
  box-shadow: 0 0 0 5px rgba(201,162,75,0.55), 0 8px 20px rgba(0,0,0,0.55);
  animation: seatPulse 1.5s ease-in-out infinite;
}
.seat--active .seat__name { color: var(--brass-light); }
.seat--active .seat__flag { opacity: 1; transform: translateX(-50%) scale(1); }
.seat--active .seat__beer { transform: scale(1.15); }

@keyframes seatPulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(201,162,75,0.55), 0 8px 20px rgba(0,0,0,0.55); }
  50% { box-shadow: 0 0 0 9px rgba(201,162,75,0.3), 0 8px 20px rgba(0,0,0,0.55); }
}

.seat--eliminated { opacity: 0.28; filter: grayscale(100%); }

.seat__beer--clink { animation: beerClink 0.6s ease; }
@keyframes beerClink {
  0% { transform: scale(1.15) rotate(0deg); }
  25% { transform: scale(1.3) rotate(-10deg); }
  50% { transform: scale(1.22) rotate(8deg); }
  75% { transform: scale(1.25) rotate(-4deg); }
  100% { transform: scale(1.15) rotate(0deg); }
}
.dice-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  min-height: 76px;
  perspective: 700px;
}

.die {
  position: relative;
  width: 66px;
  height: 66px;
  border-radius: 10px;
  background: var(--cream);
  border: 2px solid #b98a4d;
  box-shadow: 0 4px 10px rgba(0,0,0,0.45);
  padding: 0;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}
button.die { cursor: pointer; }
button.die:hover { border-color: var(--brass-light); transform: translateY(-2px); }

/* Dé gardé par le joueur : nettement mis en évidence (surélevé, halo pulsant, badge ✔) */
.die--held {
  border-color: var(--brass-light);
  transform: translateY(-7px) scale(1.08);
  box-shadow: 0 0 0 4px rgba(201,162,75,0.85), 0 10px 18px rgba(0,0,0,0.5);
  animation: heldPulse 1.6s ease-in-out infinite;
}
button.die--held:hover { transform: translateY(-7px) scale(1.1); }
@keyframes heldPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(201,162,75,0.85), 0 10px 18px rgba(0,0,0,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(201,162,75,0.45), 0 10px 18px rgba(0,0,0,0.5); }
}
.die__held-pin {
  position: absolute;
  top: -10px;
  right: -9px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brass);
  color: #2a1c07;
  font-size: 0.68rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Dé en train de rouler : la rotation 3D est appliquée en inline par dice.js */
.die--rolling { box-shadow: 0 6px 14px rgba(0,0,0,0.5); }
.die--settle { animation: dieSettle 0.28s ease; }
@keyframes dieSettle {
  0% { transform: scale(1.2) rotate(0deg); }
  55% { transform: scale(0.9) rotate(-4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.die__face {
  width: 50px; height: 50px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 4px;
}
.pip { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); align-self: center; justify-self: center; }
.pip--tl { grid-area: 1/1; } .pip--tr { grid-area: 1/3; } .pip--ml { grid-area: 2/1; }
.pip--mid { grid-area: 2/2; } .pip--mr { grid-area: 2/3; } .pip--bl { grid-area: 3/1; } .pip--br { grid-area: 3/3; }

.hand-label {
  min-height: 1.4rem;
  margin-top: 0.9rem;
  font-weight: 700;
  color: var(--brass-light);
}
.throws-info { font-size: 0.8rem; opacity: 0.8; margin-top: 0.4rem; color: var(--parchment); }
.controls { display: flex; gap: 0.8rem; justify-content: center; margin-top: 1.1rem; flex-wrap: wrap; }
.ai-controls {
  margin-top: 1.1rem;
  font-weight: 700;
  color: var(--brass-light);
  opacity: 0.9;
  font-style: italic;
}

/* ---------- Reveal ---------- */
.reveal-table { margin-top: 1.2rem; }
.reveal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  background: rgba(0,0,0,0.25);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.5rem;
  border-left: 5px solid var(--brass);
}
.reveal-row--loser { border-left-color: var(--red); background: rgba(164,35,31,0.22); }
.reveal-row--winner { border-left-color: #4caf50; background: rgba(76,175,80,0.14); }
.reveal-title {
  text-align: center;
  color: var(--brass-light);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1.4rem 0 0;
}

/* Petits dés (détail des mains en fin de manche) */
.dice-row--mini { min-height: 0; gap: 0.3rem; perspective: none; justify-content: flex-start; flex: none; }
.dice-row--mini .die { width: 30px; height: 30px; border-radius: 6px; border-width: 1px; box-shadow: 0 2px 4px rgba(0,0,0,0.4); }
.dice-row--mini .die__face { width: 24px; height: 24px; padding: 2px; }
.dice-row--mini .pip { width: 5px; height: 5px; }

/* Récap de fin de manche, posé sur la table */
.round-recap { text-align: center; font-size: 0.85rem; line-height: 1.35; }
.round-recap p { margin: 0 0 0.55rem; }
.round-recap__winner { font-weight: 800; font-size: 0.98rem; color: var(--brass-light); }
.round-recap__why { color: var(--cream); opacity: 0.95; }
.round-recap__loser { color: #ffb9a8; }
#nextControls { margin-top: 0.8rem; }
#nextControls .btn { min-width: 0; width: 100%; padding-left: 0.6rem; padding-right: 0.6rem; }
.reveal-row__name { font-weight: 800; min-width: 120px; }
.reveal-row__hand { flex: 1; text-align: right; opacity: 0.95; }

.tournee-banner {
  text-align: center;
  background: linear-gradient(135deg, rgba(201,162,75,0.25), rgba(164,35,31,0.25));
  border: 2px dashed var(--brass);
  border-radius: 14px;
  padding: 1.2rem;
  margin: 1.2rem 0;
}
.tournee-banner h2 { color: var(--brass-light); margin: 0.2rem 0; }

/* ---------- Modal victoire ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; z-index: 20;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: linear-gradient(160deg, var(--wood-light), var(--wood-dark));
  border: 3px solid var(--brass);
  border-radius: 16px;
  padding: 2rem;
  max-width: 420px;
  text-align: center;
  box-shadow: var(--shadow);
}
.modal h2 { color: var(--brass-light); margin-top: 0; }

[hidden] { display: none !important; }

@media (max-width: 720px) {
  main { padding: 1.2rem 0.9rem 2.2rem; }
  .setup-card { padding: 1.2rem; }
}

@media (max-width: 620px) {
  .bar-header { padding: 0.8rem 0.9rem; gap: 0.5rem; }
  .brand__tagline { display: none; }
  .table-arena { aspect-ratio: 3 / 5.4; max-width: 420px; margin-top: 0.6rem; }
  .felt-oval { inset: 17% 16% 16% 16%; border-radius: 50% / 32%; }
  .seat { width: 60px; }
  /* Sièges du haut : nom + allumettes AU-DESSUS de l'avatar, l'avatar touche la table */
  .seat--top { display: flex; flex-direction: column-reverse; }
  .seat--top .seat__name { margin-top: 0; margin-bottom: 0.3rem; }
  .seat--top .seat__matches { margin-top: 0; margin-bottom: 0.15rem; }
  .seat__avatar { width: 42px; height: 42px; font-size: 1.15rem; }
  .seat__beer { width: 16px; bottom: -5px; right: -6px; }
  .seat__name { font-size: 0.62rem; }
  .seat__matches { min-height: 12px; }
  .seat__matches .match { width: 3px; height: 12px; }
  .seat__flag { font-size: 0.58rem; padding: 0.15rem 0.4rem; top: -1.5rem; }
  .seat--flag-below .seat__flag { top: auto; bottom: -1.5rem; }
  .die { width: 54px; height: 54px; }
  .die__face { width: 40px; height: 40px; }
  .tray { padding: 0 0.4rem; }
  .controls { flex-direction: column; }
  .controls .btn { width: 100%; }
  .seat-grid { grid-template-columns: 1fr; }
  .seat-row { flex-wrap: wrap; }
  .seat-row .seat-name { min-width: 140px; }
  .reveal-row { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .reveal-row__hand { text-align: left; }
  .modal { padding: 1.4rem; }
}

@media (max-width: 380px) {
  .die { width: 46px; height: 46px; }
  .die__face { width: 34px; height: 34px; }
  .pip { width: 7px; height: 7px; }
  .table-arena { aspect-ratio: 3 / 6; }
  .felt-oval { inset: 17% 16% 16% 16%; border-radius: 50% / 32%; }
  .seat { width: 52px; }
  .seat__avatar { width: 36px; height: 36px; font-size: 1rem; }
  .seat__name { font-size: 0.58rem; }
}

/* ===== Aide : rappel des combinaisons ===== */
.help-fab { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 15; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--brass-light); background: linear-gradient(135deg, var(--brass-light), var(--brass)); color: #2a1c07; font: 800 1.4rem Georgia, serif; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,0.5); }
.help-fab:active { transform: scale(0.95); }
.help-modal { max-width: 460px; max-height: 90vh; overflow-y: auto; text-align: left; }
.help-modal h2, .help-modal__sub { text-align: center; }
.help-modal__sub { margin: -0.4rem 0 0.6rem; opacity: 0.8; font-size: 0.85rem; }
.help-modal__note { font-size: 0.85rem; opacity: 0.9; }
.help-modal .btn { display: block; margin: 0.8rem auto 0; }
.help-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.help-list li { display: flex; align-items: center; gap: 0.7rem; padding: 0.4rem 0.5rem; border-radius: 10px; background: rgba(255,255,255,0.06); }
.help-list__bad { background: rgba(164,35,31,0.25) !important; }
.help-list .dice-row { flex: none; min-height: 0; gap: 0.25rem; }
.help-list__text { display: flex; flex-direction: column; font-size: 0.82rem; line-height: 1.25; min-width: 0; }
.help-list__text strong { color: var(--brass-light); font-size: 0.92rem; }

/* ===== Combinaison à battre ===== */
.beat-info { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0.2rem auto 0.4rem; padding: 0.25rem 0.6rem; max-width: 100%; background: rgba(0,0,0,0.35); border: 1px solid rgba(232,200,118,0.5); border-radius: 12px; font-size: 0.68rem; line-height: 1.15; white-space: normal; text-align: center; color: var(--parchment); }
.beat-info .dice-row--mini { flex: none; }
.beat-info .dice-row--mini .die { width: 22px; height: 22px; border-radius: 4px; }
.beat-info .dice-row--mini .die__face { width: 18px; height: 18px; padding: 1px; }
.beat-info .pip { width: 4px; height: 4px; }
.beat-info__text { overflow: hidden; text-overflow: ellipsis; display: flex; flex-direction: column; text-align: left; min-width: 0; }
.beat-info__text strong { color: var(--brass-light); }
.beat-info[hidden] { display: none; }
@media (max-width: 620px) {
  .beat-info { flex-direction: column; gap: 0.15rem; padding: 0.25rem 0.5rem; white-space: normal; }
  .beat-info__text { text-align: center; align-items: center; overflow: visible; }
}
@media (min-width: 621px) {
  .beat-info { margin: 0 auto 0.25rem; padding: 0.1rem 0.5rem; }
  .tray__label { margin-bottom: 0.3rem; }
}

.seat__more { font-size: 0.62rem; font-weight: 800; color: var(--brass-light); margin-left: 3px; align-self: center; text-shadow: 0 1px 2px #000; }

.pot-choice { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; margin: 1rem 0 0.6rem; }
.pot-choice label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; }
.pot-choice select { min-height: 44px; padding: 0.4rem 0.8rem; border-radius: 8px; border: 1px solid var(--brass); background: var(--parchment); color: var(--ink); font: inherit; font-weight: 700; max-width: 100%; }

.pot-choice__stepper { margin: 0; }
.pot-choice__input { width: 4.2rem; min-height: 44px; text-align: center; font: 800 1.3rem Georgia, serif; border-radius: 8px; border: 1px solid var(--brass); background: var(--parchment); color: var(--ink); -moz-appearance: textfield; }
.pot-choice__input::-webkit-outer-spin-button, .pot-choice__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pot-choice__presets { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; }
.pot-choice__presets .btn { min-height: 36px; padding: 0.3rem 0.8rem; font-size: 0.82rem; }
.pot-choice__hint { margin: 0; font-size: 0.75rem; opacity: 0.75; }
main { padding-bottom: 5rem; }

/* ===== Pastilles latérales : manche + pot ===== */
.hud { position: absolute; top: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; min-width: 64px; padding: 0.35rem 0.55rem; background: rgba(0,0,0,0.4); border: 1px solid rgba(232,200,118,0.55); border-radius: 12px; color: var(--parchment); pointer-events: none; }
.hud--round { left: 0; }
.hud--pot { right: 0; }
.hud__k { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.hud__v { font: 800 1.5rem/1 Georgia, serif; color: var(--brass-light); }
.hud__sub { font-size: 0.62rem; opacity: 0.85; text-transform: lowercase; text-align: center; }
.pot__sticks { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-end; gap: 1px; width: 50px; min-height: 22px; max-height: 40px; overflow: hidden; margin-bottom: 0.15rem; }
.pot__sticks .match { width: 3px; height: 14px; }
.hud--empty { opacity: 0.55; }
@media (max-width: 620px) {
  .hud { min-width: 54px; padding: 0.25rem 0.4rem; }
  .hud__v { font-size: 1.2rem; }
  .pot__sticks { width: 42px; }
}

/* ===== CTA de la table : même largeur, même style, sans surlignage ===== */
.tray .controls { flex-direction: column; align-items: stretch; gap: 0.5rem; width: 100%; }
.tray .controls .btn,
#nextControls .btn { width: 100%; min-width: 0; flex: none; box-sizing: border-box; }
.tray .btn--primary,
.tray .btn--secondary {
  background: rgba(0,0,0,0.35);
  color: var(--cream);
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: none;
}
.tray .btn--primary:hover:not(:disabled),
.tray .btn--secondary:hover:not(:disabled) { background: rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.55); }
.tray .controls { margin-top: 0.6rem; }
.tray .controls .btn { padding-top: 0.55rem; padding-bottom: 0.55rem; min-height: 40px; }
.tray .controls .btn, #nextControls .btn { font-size: 0.82rem; line-height: 1.2; }

/* ===== Plateau : dés toujours centrés, textes aérés ===== */
.felt-oval { align-items: stretch; }
.tray { display: grid; grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; justify-items: center; height: 100%; row-gap: 0.9rem; }
.tray .beat-info { align-self: end; margin: 0; }
.tray .dice-row { align-self: center; }
.tray__below { width: 100%; align-self: start; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; }
.tray__below > * { margin: 0 !important; }
.tray__below .controls { width: 100%; }
.tray--reveal { grid-template-rows: 1fr; }
.tray--reveal .tray__below { align-self: center; }
.tray .beat-info { padding: 0.35rem 0.7rem; line-height: 1.35; }
.beat-info__text { gap: 0.15rem; }
.hand-label { line-height: 1.35; }
.throws-info { line-height: 1.45; }
.round-recap p { margin: 0 0 0.7rem; line-height: 1.45; }
/* Noms des joueurs affichés en entier */
.seat__name { white-space: normal; overflow: visible; text-overflow: clip; text-align: center; line-height: 1.15; max-width: 92px; overflow-wrap: anywhere; }
@media (max-width: 620px) { .seat__name { max-width: 78px; } }
.hand-label:empty { display: none; min-height: 0; }
.tray .throws-info { font-size: 0.74rem; }

/* Bloc "Tu ouvres" plus éloigné des dés (le dé gardé se soulève) ; CTA plus discrets */
.tray .beat-info { margin-bottom: 1.1rem; }
.tray .controls .btn, #nextControls .btn { font-size: 0.72rem; letter-spacing: 0.01em; padding-top: 0.5rem; padding-bottom: 0.5rem; min-height: 36px; }

.ai-controls { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; width: 100%; }
.ai-controls[hidden] { display: none; }
#btnSkipAI { width: 100%; font-size: 0.72rem; min-height: 36px; padding: 0.5rem 0.6rem; }
