:root {
  --felt: #0b3d2e;
  --felt-2: #062a20;
  --felt-3: #041c15;
  --gold: #e0b84c;
  --gold-2: #f4d77d;
  --cream: #f6f1e3;
  --muted: #9fb8ac;
  --card: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .13);
  --danger: #e5484d;
  --warn: #f5a524;
  --radius: 18px;
}

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

html { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--cream);
  background: radial-gradient(ellipse at 50% 0%, var(--felt) 0%, var(--felt-2) 55%, var(--felt-3) 100%) fixed;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

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

/* ---------- Barre du haut ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px clamp(12px, 3vw, 28px);
  padding-top: calc(12px + env(safe-area-inset-top));
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { border-radius: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.brand-name {
  font-size: 1.4rem; font-weight: 800; letter-spacing: .02em;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.btn {
  border: 1px solid var(--line); background: rgba(255, 255, 255, .1);
  padding: .55em 1em; border-radius: 999px; font-weight: 600;
  transition: background .15s, transform .05s;
}
.btn:hover { background: rgba(255, 255, 255, .18); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; }
.btn.small { font-size: .85rem; padding: .4em .85em; }
.btn.primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b2a12; border-color: transparent; }
.btn.danger { border-color: rgba(229, 72, 77, .6); color: #ff9a9d; background: transparent; }
.btn.danger:hover { background: rgba(229, 72, 77, .15); }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }

/* ---------- Mise en page ---------- */
.layout {
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
  padding: 0 clamp(12px, 3vw, 28px) 12px;
  max-width: 1400px; margin: 0 auto;
  width: 100%; flex: 1 0 auto; align-content: start;
}
@media (min-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
}

.stage {
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
  border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(16px, 3vw, 34px) clamp(12px, 3vw, 30px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
  transition: box-shadow .3s, border-color .3s;
}
.t-name { margin: 0; color: var(--muted); font-size: clamp(.9rem, 1.6vw, 1.1rem); letter-spacing: .08em; text-transform: uppercase; }
.level-tag {
  display: inline-block; margin: 10px 0 0; padding: .3em 1.1em; border-radius: 999px;
  background: rgba(224, 184, 76, .16); color: var(--gold-2); font-weight: 800;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
}
.is-break .level-tag { background: rgba(80, 200, 160, .18); color: #7be3c1; }
.caption { margin: 14px 0 0; color: var(--muted); font-size: clamp(.95rem, 1.8vw, 1.25rem); }

.clock {
  font-weight: 800; line-height: 1.05; letter-spacing: .01em;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
  font-size: clamp(4rem, min(21vw, 34vh), 15rem);
  margin: .05em 0 .1em;
  text-shadow: 0 6px 30px rgba(0, 0, 0, .45);
}
.clock.warn { color: var(--warn); }
.clock.danger { color: var(--danger); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.progress { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; margin: 6px auto 22px; max-width: 820px; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .3s linear; }
.is-break .progress > div { background: linear-gradient(90deg, #35b48f, #7be3c1); }

.blinds-label { margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; }
.blinds { display: flex; flex-wrap: nowrap; justify-content: center; gap: 10px; }
.blind-box {
  flex: 1 1 0; min-width: 0; max-width: 240px; padding: 12px 8px; border-radius: var(--radius);
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px;
}
.blind-box .k { color: var(--muted); font-size: .85rem; }
.blind-box .v { font-size: clamp(1.8rem, 5vw, 3.4rem); font-weight: 800; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.next-info { margin: 16px 0 0; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.3rem); min-height: 1.5em; }
.next-info b { color: var(--cream); }

/* Tous les boutons de contrôle sur une seule ligne */
.controls { display: flex; justify-content: center; align-items: center; gap: clamp(4px, 1.6vw, 10px); margin-top: 22px; flex-wrap: nowrap; }
.round {
  flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: clamp(38px, 11.5vw, 58px); height: clamp(38px, 11.5vw, 58px); padding: 0; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .1);
  font-size: clamp(.78rem, 3vw, 1.05rem); font-weight: 800; line-height: 1;
  transition: background .15s, transform .05s;
}
.round svg { width: 44%; height: 44%; fill: currentColor; display: block; }
.round small { font-size: .6em; font-weight: 700; opacity: .8; }
.round:hover { background: rgba(255, 255, 255, .2); }
.round:active { transform: scale(.96); }
.round.primary {
  width: clamp(56px, 17vw, 84px); height: clamp(56px, 17vw, 84px);
  background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b2a12; border-color: transparent;
  box-shadow: 0 8px 24px rgba(224, 184, 76, .35);
}
.round.primary svg { width: 42%; height: 42%; }
.round.stop { color: #ff9a9d; border-color: rgba(229, 72, 77, .5); }

.stage.flash { animation: flash 1.6s ease-out; }
@keyframes flash {
  0% { box-shadow: 0 0 0 0 rgba(244, 215, 125, .9), 0 20px 50px rgba(0, 0, 0, .35); border-color: var(--gold-2); }
  100% { box-shadow: 0 0 0 40px rgba(244, 215, 125, 0), 0 20px 50px rgba(0, 0, 0, .35); }
}

/* ---------- Colonne de droite ---------- */
.side { display: grid; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h2 { margin: 0 0 10px; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.counter { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.counter + .counter { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.c-val { text-align: center; }
.c-val b { display: block; font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.c-val small { color: var(--muted); }
.mini { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .1); font-size: 1.4rem; font-weight: 700; }
.mini:hover { background: rgba(255, 255, 255, .2); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stats small { display: block; color: var(--muted); font-size: .75rem; margin-bottom: 4px; }
.stats b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }

.upcoming { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.upcoming li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .2); font-size: .95rem; }
.upcoming li b { color: var(--gold-2); font-variant-numeric: tabular-nums; }
.upcoming li small { color: var(--muted); font-weight: 400; }
.upcoming li span:last-child { color: var(--muted); }
.upcoming li.brk { background: rgba(80, 200, 160, .12); color: #7be3c1; grid-template-columns: 1fr auto; }
.upcoming li.muted { color: var(--muted); grid-template-columns: 1fr; }

/* ---------- Réglages (dialog) ---------- */
dialog {
  width: min(820px, calc(100% - 20px)); max-height: calc(100dvh - 20px);
  padding: 0; border: 1px solid var(--line); border-radius: 22px;
  background: #0d3226; color: var(--cream); box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
dialog::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(3px); }
dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 20px); }
.dlg-head, .dlg-foot { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.dlg-head { justify-content: space-between; border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; font-size: 1.2rem; }
.dlg-foot { border-top: 1px solid var(--line); flex-wrap: wrap; }
.dlg-foot .spacer { flex: 1; }
.dlg-body { padding: 16px 18px; overflow: auto; }
.icon-btn { border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; padding: 6px 10px; border-radius: 8px; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); color: var(--cream); }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-items: end; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.grid .wide { grid-column: 1 / -1; }
/* Réglages généraux : tous les champs sur une même ligne (grand écran), alignés par le bas */
@media (min-width: 720px) {
  .grid.general { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)) 1.5fr; gap: 10px; }
  .grid.general .wide { grid-column: auto; }
}
label { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; color: var(--muted); }
input[type="text"], input[type="password"], input[type="number"], input[type="time"], select {
  width: 100%; min-height: 2.6em; padding: .55em .7em; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, .3); color: var(--cream);
  color-scheme: dark; -webkit-appearance: none; appearance: none;
}
input[type="time"] { font-variant-numeric: tabular-nums; text-align: left; }
.time-row { display: flex; gap: 6px; align-items: stretch; }
.time-row input { flex: 1; min-width: 0; }
.time-row .btn { flex: 0 0 auto; padding: 0 .7em; }
input:disabled { opacity: .35; }

.struct-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 20px 0 8px; flex-wrap: wrap; }
.struct-head h3 { margin: 0; font-size: 1rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.struct { width: 100%; border-collapse: collapse; min-width: 560px; }
.struct th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 600; padding: 8px; background: rgba(0, 0, 0, .25); }
.struct td { padding: 4px 6px; border-top: 1px solid var(--line); }
.struct td.n { width: 40px; text-align: center; color: var(--muted); }
.struct input, .struct select { padding: .4em .5em; }
.struct tr.is-break td { background: rgba(80, 200, 160, .08); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Onglets Facile / Sur mesure ---------- */
.section-title { margin: 22px 0 10px; font-size: 1rem; }
.tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.tab { border: 0; background: transparent; color: var(--muted); padding: .5em 1.3em; border-radius: 999px; font-weight: 700; }
.tab:hover { color: var(--cream); }
.tab[aria-selected="true"] { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b2a12; }
.hint { margin: 8px 0 12px; color: var(--muted); font-size: .85rem; }

.choices { border: 1px solid var(--line); border-radius: 14px; margin: 14px 0 0; padding: 10px 14px 14px; display: grid; gap: 8px; }
.choices legend { padding: 0 8px; color: var(--muted); font-size: .85rem; }
label.choice {
  flex-direction: row; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .2); color: var(--cream); cursor: pointer;
}
label.choice:has(input:checked) { border-color: var(--gold); background: rgba(224, 184, 76, .12); }
label.choice input { margin-top: .3em; accent-color: var(--gold); }
label.choice b { display: block; font-size: 1rem; }
label.choice small { color: var(--muted); font-size: .82rem; }
.step-wrap { max-width: 340px; }

.preview-head { margin: 20px 0 8px; }
.preview-head h3 { margin: 0 0 4px; font-size: 1rem; }
.preview-sum { margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.preview-sum b { color: var(--gold-2); }
.preview-wrap { max-height: 340px; overflow: auto; }
table.preview { min-width: 480px; }
.preview thead th { position: sticky; top: 0; z-index: 1; }
.preview td { padding: 6px 8px; font-variant-numeric: tabular-nums; }
.preview td.num { font-weight: 700; color: var(--gold-2); }
.preview td.barcell { width: 34%; }
.bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.preview tr.is-break td { color: #7be3c1; font-weight: 600; }

/* ---------- Heures estimées ---------- */
.no-clock .clock-col { display: none; }
.struct td.clk { font-variant-numeric: tabular-nums; color: var(--gold-2); font-weight: 600; white-space: nowrap; }
.at { color: var(--gold-2); font-weight: 600; white-space: nowrap; }
.upcoming li small.at { color: var(--gold-2); font-size: .8rem; margin-left: .35em; }
.upcoming li.brk small.at { color: #7be3c1; }

/* ---------- Arrière-plan (iPhone) ---------- */
dialog.small-dlg { width: min(560px, calc(100% - 20px)); }
.hint.first { margin-top: 0; }
.bg-item { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 14px; margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0, 0, 0, .2); }
.bg-item h3 { margin: 0 0 4px; font-size: .95rem; }
.bg-item p { margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.bg-item p b { color: var(--cream); }
.bg-item .btn { flex-shrink: 0; min-width: 96px; }
.bg-item .btn.on { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b2a12; border-color: transparent; }
.bg-item .btn:disabled { opacity: .4; cursor: not-allowed; }
.bg-msg { min-height: 1.4em; margin: 12px 0 0; font-size: .88rem; color: var(--gold-2); }
.tips { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.tips li + li { margin-top: 6px; }
.tips b { color: var(--cream); }
#bgBtn.on { border-color: var(--gold); color: var(--gold-2); }
.bg-option { margin-top: 12px; }
@media (max-width: 520px) { .bg-item { flex-direction: column; align-items: stretch; } }

/* ---------- Téléphone en mode paysage ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .topbar { padding-top: calc(6px + env(safe-area-inset-top)); padding-bottom: 6px; }
  .brand img { width: 30px; height: 30px; }
  .stage { padding: 10px 16px; border-radius: 20px; }
  .clock { font-size: clamp(3.5rem, 38vh, 12rem); }
  .progress { margin-bottom: 10px; }
  .blind-box { padding: 6px 16px; }
  .controls { margin-top: 10px; }
}

/* ---------- Pied de page (en bas de la page, non fixe, sur une seule ligne) ---------- */
.footer {
  display: flex; justify-content: center; text-align: center;
  padding: 14px 8px 16px;
  font-size: clamp(.6rem, 2.9vw, .85rem); color: var(--muted);
}
.noscript { text-align: center; padding: 20px; }
.footer-text { margin: 0; white-space: nowrap; word-spacing: .1em; }

/* ---------- Petits écrans ---------- */
@media (max-width: 560px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tools .btn { font-size: .85rem; padding: .55em .6em; text-align: center; white-space: nowrap; }
}
.nw { white-space: nowrap; }

/* Aperçu de la structure : sur téléphone, on retire la colonne « Évolution » pour tout garder à l'écran */
@media (max-width: 560px) {
  .bar-col, td.barcell, .elapsed-col { display: none; }
  table.preview { min-width: 0; }
  .preview th, .preview td { padding: 6px 3px; font-size: .82rem; }
  .preview th { font-size: .7rem; }
  .preview td { white-space: nowrap; }
  .preview td.n { width: auto; }
}

/* Textes propres à une plateforme (iOS / Android) : masqués par défaut, affichés selon <html data-os> */
[data-only] { display: none; }
html[data-os="ios"] [data-only="ios"] { display: revert; }
html[data-os="android"] [data-only="android"] { display: revert; }

@media (prefers-reduced-motion: reduce) {
  .clock.danger, .stage.flash { animation: none; }
}

/* ---------- Langue (FR / EN) ---------- */
.lang-switch { display: inline-flex; margin-left: 8px; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button { border: 0; background: transparent; padding: .35em .75em; font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.lang-switch button[aria-pressed="true"] { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b2a12; }
@media (max-width: 560px) { .brand .lang-switch { margin-left: auto; } }
dialog.lang-dlg { width: min(440px, calc(100% - 20px)); text-align: center; }
.lang-dlg .dlg-body { padding: 24px 20px 20px; }
.lang-logo { border-radius: 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.lang-dlg h2 { margin: 12px 0 18px; font-size: 1.15rem; line-height: 1.35; }
.lang-dlg h2 .sep { color: var(--muted); }
.lang-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lang-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 16px; padding: 16px 8px; }
.lang-btn b { font-size: 1.15rem; }
.lang-btn small { color: var(--muted); font-size: .75rem; letter-spacing: .08em; }
.lang-btn.suggested { border-color: var(--gold); background: rgba(224, 184, 76, .14); }
.lang-hint { margin: 16px 0 0; }
@media (max-width: 380px) { .lang-choices { grid-template-columns: 1fr; } }

.footer { flex-direction: column; align-items: center; gap: 4px; }
.footer-privacy { margin: 0; font-size: .85em; }
.footer-privacy a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.footer-privacy a:hover { color: var(--gold-2); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Onglets Chrono / Mains ---------- */
.main-tabs { display: flex; gap: 6px; padding: 0 clamp(12px, 3vw, 28px) 10px; }
.main-tab { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: .45em 1.2em; font-weight: 700; }
.main-tab[aria-selected="true"] { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b2a12; border-color: transparent; }

/* ---------- Partage ---------- */
#shareBtn.on { border-color: var(--gold); color: var(--gold-2); }
.share-code { text-align: center; margin: 4px 0 10px; }
.share-code small { display: block; color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.share-code b { font-size: 2.2rem; letter-spacing: .25em; padding-left: .25em; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.share-qr { width: min(240px, 70%); margin: 0 auto 14px; border-radius: 12px; overflow: hidden; background: #fff; line-height: 0; }
.share-qr svg { width: 100%; height: auto; display: block; }
.share-link { display: grid; gap: 6px; color: var(--muted); font-size: .85rem; }
.share-link input { width: 100%; min-width: 0; }
.bg-msg.err { color: #ff9a9d; }

/* ---------- Page spectateur ---------- */
.badge-ro { align-self: center; border: 1px solid var(--line); border-radius: 999px; padding: .3em .9em; font-size: .8rem; color: var(--muted); }
.w-status { text-align: center; margin: 4px 16px 10px; font-size: .88rem; color: var(--muted); min-height: 1.3em; }
.w-status.ok { color: #7be3c1; }
.w-status.err { color: #ff9a9d; }
body.is-over .stage { opacity: .6; }
.counter.ro { justify-content: center; }
.footer-text a { color: var(--muted); }
@media (max-width: 560px) { body.watch .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } body.watch .badge-ro { grid-column: 1 / -1; text-align: center; } }

/* ---------- Onglet Mains (qui gagne ?) ---------- */
.hands { padding: 0 clamp(12px, 3vw, 28px) 24px; max-width: 1100px; margin: 0 auto; display: grid; gap: 14px; }
.hands[hidden] { display: none; }
.hands .card { background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.hands h2 { margin: 0 0 6px; font-size: 1.2rem; }
.hands h3 { margin: 0 0 8px; font-size: .95rem; color: var(--gold-2); }
.hands .hint { margin: 6px 0 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.seg button { border: 0; background: transparent; padding: .45em 1.1em; font-weight: 700; color: var(--muted); }
.seg button[aria-pressed="true"] { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b2a12; }
.hands-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hands-grid { grid-template-columns: 1.1fr 1fr; } .hands-grid .result-card { grid-column: 1 / -1; } }
.slots { display: flex; gap: 6px; flex-wrap: wrap; }
.slot { width: 48px; height: 66px; border-radius: 9px; border: 2px dashed var(--line); background: rgba(255, 255, 255, .04); display: grid; place-items: center; padding: 0; }
.slot:not(.blank) { background: #f6f1e3; border: 2px solid #f6f1e3; }
.slot.sel { outline: 3px solid var(--gold-2); outline-offset: 2px; }
.slot.use:not(.blank) { box-shadow: 0 0 0 3px #7be3c1; }
.slot .plus { color: var(--muted); font-size: 1.3rem; }
.pc { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; color: #1a1a1a; font-weight: 800; }
.pc b { font-size: 1.15rem; } .pc i { font-style: normal; font-size: 1.15rem; }
.pc.red { color: #c62828; }
.p-row { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.p-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.p-name { flex: 1; min-width: 0; padding: .45em .7em; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.picker { display: grid; gap: 6px; }
.pk-row { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 4px; }
.pk { aspect-ratio: 3 / 4; border-radius: 6px; border: 0; background: #f6f1e3; color: #1a1a1a; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; padding: 0; font-weight: 800; font-size: clamp(.62rem, 2.3vw, .95rem); }
.pk i { font-style: normal; }
.pk.red { color: #c62828; }
.pk:disabled { opacity: .18; cursor: not-allowed; }
.verdict { margin: 0 0 6px; font-size: 1.05rem; }
.verdict.win b { color: #7be3c1; } .verdict.tie b { color: var(--gold-2); }
.results { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.results li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: rgba(255, 255, 255, .04); }
.results li.is-win { border-color: #7be3c1; background: rgba(123, 227, 193, .1); }
.r-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.r-name { font-weight: 700; }
.badge { background: #7be3c1; color: #06251c; border-radius: 999px; padding: .1em .7em; font-size: .75rem; font-weight: 800; }
.r-hand { color: var(--gold-2); margin: 2px 0 6px; }
.r-cards { display: flex; gap: 4px; flex-wrap: wrap; }
.r-cards .pc { background: #f6f1e3; border-radius: 6px; width: 34px; height: 46px; }
.r-cards .pc b, .r-cards .pc i { font-size: .95rem; }
.hands-rank summary { cursor: pointer; font-weight: 700; }
.hands-rank ol { margin: 10px 0 0; padding-left: 1.4em; color: var(--muted); line-height: 1.6; font-size: .9rem; }
@media (max-width: 400px) { .slot { width: 42px; height: 58px; } }

/* ---------- Fin de manche : attente de « Prochaine manche » ---------- */
.next-level {
  display: block; margin: 16px auto 22px; border: 0; border-radius: 999px; padding: .75em 2em;
  font: inherit; font-size: clamp(1.05rem, 4.4vw, 1.4rem); font-weight: 800; letter-spacing: .01em; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b2a12;
  box-shadow: 0 8px 24px rgba(224, 184, 76, .35);
  animation: nl-pulse 1.6s ease-in-out infinite;
}
.next-level:active { transform: translateY(1px); }
.next-level[hidden] { display: none; }
@keyframes nl-pulse { 50% { box-shadow: 0 8px 24px rgba(224, 184, 76, .35), 0 0 0 10px rgba(224, 184, 76, .16); } }
@media (prefers-reduced-motion: reduce) { .next-level { animation: none; } }
body.is-waiting #clock { opacity: .7; }
[data-act="fullscreen"][hidden], #wFs[hidden] { display: none !important; }

/* ---------- Accès organisateur (web) ---------- */
.gate-dlg .row-actions { margin-top: 14px; }
.gate-dlg .row-actions .btn { text-decoration: none; display: inline-block; }
.gate-form { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.gate-form label { color: var(--muted); font-size: .85rem; }
.gate-row { display: flex; gap: 8px; }
.gate-row input { flex: 1; min-width: 0; }
.gate-form .bg-msg { min-height: 1.2em; margin: 0; }
body.watch .footer-text { white-space: normal; }

/* ---------- Publicité (app Android uniquement) : la bannière native se superpose en bas, on réserve sa hauteur ---------- */
body { padding-bottom: var(--ad-h, 0px); }
.linklike { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linklike[hidden] { display: none; }
