/* ═══════════════════════════════════════════════════════════
   AVEKI — DA « affiche de concert » : papier chaud, aplats de
   couleurs franches mais naturelles, traits d'encre, ombres
   portées nettes. Pas de dégradés néon ni d'effets de verre.
   ═══════════════════════════════════════════════════════════ */
:root {
  --paper: #f4eee3;
  --paper-2: #ebe2d2;
  --card: #fffaf1;
  --ink: #1e1b16;
  --ink-2: #4d463c;
  --muted: #6b6255; /* contraste ≥ 4.5:1 sur papier */
  --line: rgba(30, 27, 22, 0.14);

  --tomato: #e0573b;
  --mustard: #e8b03b;
  --sage: #8daa7b;
  --forest: #3f7d5a;
  --cobalt: #2c5da9;
  --plum: #7e4e7a;
  --teal: #2a807a;
  --rose: #e79a8a;

  --ok: #3f7d5a;
  --bad: #cb4226;
  --radius: 22px;
  --radius-sm: 14px;
  --bw: 2.5px; /* épaisseur du trait d'encre */
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --font-display: 'Bricolage Grotesque', 'Arial Black', system-ui, sans-serif;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .12 0 0 0 0 .1 0 0 0 0 .08 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
b { font-weight: 800; }
em { font-style: normal; color: var(--muted); font-weight: 500; font-size: 0.85em; }
::selection { background: var(--mustard); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Couleurs utilitaires */
.c-tomato { --c: var(--tomato); --on: #fff; }
.c-mustard { --c: var(--mustard); --on: var(--ink); }
.c-sage { --c: var(--sage); --on: var(--ink); }
.c-forest { --c: var(--forest); --on: #fff; }
.c-cobalt { --c: var(--cobalt); --on: #fff; }
.c-plum { --c: var(--plum); --on: #fff; }
.c-teal { --c: var(--teal); --on: #fff; }
.c-rose { --c: var(--rose); --on: var(--ink); }

/* ── Fond papier ──────────────────────────── */
.bg { position: fixed; inset: 0; z-index: -1; background: var(--paper); overflow: hidden; }
.bg-orb { display: none; }
.bg-grid { position: absolute; inset: 0; background-image: var(--grain); opacity: 0.35; mix-blend-mode: multiply; }

/* ── Layout ───────────────────────────────── */
.app { max-width: 1240px; margin: 0 auto; padding: calc(12px + var(--safe-top)) 16px calc(18px + var(--safe-bottom)); min-height: 100dvh; }
.screen { animation: screenIn 0.3s ease both; }
.screen.center { min-height: 80dvh; display: grid; place-content: center; text-align: center; gap: 12px; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.card {
  background: var(--card);
  border: var(--bw) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative;
}
.card.narrow { max-width: 420px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 17px; margin-bottom: 14px; }
.label { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.muted { color: var(--muted); }
.center-text { text-align: center; }
.grad { color: var(--tomato); }
.row { display: flex; gap: 10px; align-items: stretch; }
.row > .input { flex: 1; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pill.subtle { background: var(--paper-2); color: var(--ink-2); }
.big-emoji { font-size: 48px; }

/* ── Boutons & champs ─────────────────────── */
.btn {
  border: var(--bw) solid var(--ink); border-radius: 999px; padding: 11px 20px; font-family: var(--font-display); font-weight: 700; font-size: 16px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px;
}
.btn:hover { background: var(--paper-2); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: var(--shadow-sm); }
.btn.primary { background: #d34021; color: #fff; } /* texte blanc : contraste 4.6:1 */
.btn.primary:hover { background: #bd3a1e; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:active { transform: none; }
.btn.sm { padding: 6px 14px; min-height: 40px; font-size: 14px; }
.btn.xl { width: 100%; min-height: 60px; font-size: 20px; }
.link-btn { display: block; text-align: center; color: var(--ink-2); font-weight: 700; font-size: 14px; margin-top: 4px; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; }
.link-btn.inline { display: inline; margin: 0; }
.link-btn:hover { color: var(--tomato); }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; border: var(--bw) solid var(--ink); background: var(--card); box-shadow: var(--shadow-sm); font-size: 18px; }

.input {
  width: 100%; border: var(--bw) solid var(--ink); outline: 0; border-radius: var(--radius-sm); padding: 12px 16px; min-height: 52px;
  background: #fff; font-size: 17px; font-weight: 600; color: var(--ink);
  transition: box-shadow 0.15s;
}
.input::placeholder { color: #7e7362; font-weight: 500; }
.input:focus { box-shadow: 0 0 0 4px var(--mustard); }
.input.code { text-transform: uppercase; letter-spacing: 0.25em; font-family: var(--font-display); font-weight: 800; text-align: center; }
.input.xl { min-height: 64px; font-size: 22px; font-weight: 700; padding: 14px 18px; }
.form-error { color: var(--bad); font-weight: 700; font-size: 14px; min-height: 1.2em; margin: 0; }

.shake { animation: shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
.input.shake { box-shadow: 0 0 0 4px var(--tomato); }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }

/* ── Logo (badge) ─────────────────────────── */
.brand-badge { display: inline-flex; align-items: center; background: #0b0b0b; border: var(--bw) solid var(--ink); border-radius: 14px; padding: 2px 10px; box-shadow: var(--shadow-sm); text-decoration: none; transform: rotate(-2deg); transition: transform 0.2s; }
.brand-badge:hover { transform: rotate(0deg) scale(1.03); }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-sm { display: flex; align-items: center; }

/* ── Topbar ───────────────────────────────── */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; min-height: 52px; }
.top-note { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--ink-2); }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 54px; z-index: 30; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 6px; min-width: 230px; display: grid; animation: screenIn 0.2s ease; }
.menu button { border: 0; background: transparent; text-align: left; padding: 12px; border-radius: 10px; font-weight: 700; }
.menu button:hover { background: var(--paper-2); }
.menu .danger { color: var(--bad); }

/* ═════════════ ACCUEIL : MODES DE JEU ═════════════ */
.home { display: flex; flex-direction: column; gap: 22px; }
.modes-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: -6px; }
.modes-head h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 7vw, 40px); margin: 0; letter-spacing: -0.02em; }
.modes { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
.mode-card { border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card); position: relative; overflow: hidden; }

.featured { display: grid; grid-template-columns: minmax(0, 1fr); }
.mode-media { position: relative; aspect-ratio: 4 / 3.3; background: var(--mustard); border-bottom: var(--bw) solid var(--ink); overflow: hidden; transition: background 0.6s; }
.mode-media[data-color='mustard'] { background: var(--mustard); }
.mode-media[data-color='tomato'] { background: var(--tomato); }
.mode-media[data-color='cobalt'] { background: var(--cobalt); }
.mode-media[data-color='sage'] { background: var(--sage); }
.mode-media[data-color='plum'] { background: var(--plum); }
.mode-media[data-color='teal'] { background: var(--teal); }
.mode-media[data-color='rose'] { background: var(--rose); }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
.sc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; opacity: 0; transition: opacity 0.9s ease; }
.sc-img.on { opacity: 1; }
.sc-img.kb { animation: kenburns 5.5s ease-out both; }
.mode-media.has-photo .sc-fallback { display: none; }
.sc-credit { position: absolute; top: 8px; right: 8px; max-width: calc(100% - 16px); font-size: 11px; line-height: 1.3; color: #fff; background: rgba(20, 18, 14, 0.72); padding: 3px 8px; border-radius: 6px; text-align: right; }
.sc-credit:empty { display: none; }
.sc-credit a { color: #fff; text-decoration: underline; }
.sc-fallback { position: absolute; inset: 0; background-image: var(--grain); opacity: 0.4; mix-blend-mode: multiply; }
.sc-caption { position: absolute; left: 14px; bottom: 14px; right: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; }
.sc-caption span, .sc-caption b { background: var(--card); border: var(--bw) solid var(--ink); border-radius: 10px; padding: 3px 10px; font-family: var(--font-display); font-weight: 800; box-shadow: var(--shadow-sm); }
.sc-caption span { font-size: 15px; }
.sc-caption b { font-size: clamp(22px, 6vw, 34px); background: var(--mustard); line-height: 1.15; transform: rotate(-1.5deg); }
.sc-caption.pop b { animation: stamp 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
@keyframes stamp { from { transform: rotate(-6deg) scale(1.25); opacity: 0; } to { transform: rotate(-1.5deg) scale(1); opacity: 1; } }

.mode-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.mode-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--forest); text-transform: uppercase; letter-spacing: 0.1em; }
.mode-kicker .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 3px rgba(63, 125, 90, 0.2); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.mode-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(38px, 10vw, 64px); line-height: 0.95; margin: 0; letter-spacing: -0.02em; }
.mode-title em { font-style: normal; font-weight: 800; font-size: 1em; color: var(--tomato); }
.mode-desc { margin: 0; color: var(--ink-2); font-size: 16.5px; max-width: 46ch; }
.start-form { display: grid; gap: 8px; margin-top: 4px; }
.start-row { display: flex; gap: 10px; flex-wrap: wrap; }
.start-row .input { flex: 1 1 200px; min-width: 0; }
.start-row .btn { flex: 1 1 180px; min-height: 54px; font-size: 18px; }
.join-hint { margin: 0; font-size: 14px; color: var(--muted); }
.code-form { display: flex; gap: 10px; }
.code-form .input { flex: 1; min-width: 0; }

.soon { display: flex; flex-direction: column; gap: 12px; }
.soon-title { font-family: var(--font-display); font-weight: 800; font-size: 24px; margin: 0; }
.soon-title span { background: var(--mustard); padding: 0 6px; border-radius: 6px; }
.soon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.soon-card { background: var(--c); color: var(--on); padding: 16px 14px 14px; text-align: left; display: flex; flex-direction: column; gap: 4px; min-height: 148px; font: inherit; cursor: pointer; transition: transform 0.15s; }
.soon-card:hover { transform: rotate(-1deg) translateY(-2px); }
.soon-card.nope { animation: shake 0.4s ease; }
.soon-emoji { font-size: 34px; line-height: 1; margin-bottom: 6px; }
.soon-name { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.05; }
.soon-tag { font-size: 13.5px; opacity: 0.9; font-weight: 600; }
.badge { margin-top: auto; align-self: flex-start; background: var(--card); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 800; transform: rotate(-2deg); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); background: var(--card); font-weight: 700; font-size: 14.5px; }
.steps b { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--on); border: 2px solid var(--ink); font-family: var(--font-display); font-size: 18px; }

/* ── Rejoindre ────────────────────────────── */
.join { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.home-card { display: flex; flex-direction: column; gap: 12px; }
.join-card { padding: 24px; }
.join-title { font-family: var(--font-display); font-size: 28px; line-height: 1.1; margin: 0; font-weight: 700; }
.join-title b { color: var(--tomato); }
.or, .rules, .demo-chain, .hero, .tagline { display: none; }
.loader { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; border: 4px solid var(--paper-2); border-top-color: var(--tomato); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═════════════ LOBBY ═════════════ */
.lobby-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.lobby-grid > *, .results-grid > *, .game-grid > * { min-width: 0; }
.invite { text-align: center; display: flex; flex-direction: column; gap: 10px; background: var(--mustard); }
.invite .label { color: var(--ink); }
.room-code { font-family: var(--font-display); font-weight: 800; font-size: clamp(42px, 12vw, 62px); letter-spacing: 0.04em; line-height: 1; }
.invite-link { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13.5px; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 2px solid var(--ink); word-break: break-all; user-select: all; }
.invite .row .btn { flex: 1; }
.invite .muted { color: var(--ink-2); }
.hint { font-size: 12.5px; color: var(--ink-2); margin: 0; }
.lobby-players { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lp { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: var(--radius-sm); background: var(--paper); border: 2px solid var(--ink); animation: pop 0.3s ease both; }
.lp.me { background: #fff3d6; }
.lp.off { opacity: 0.5; }
.lp-name { flex: 1; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crown { font-size: 18px; }
.dot-on { width: 10px; height: 10px; border-radius: 50%; background: var(--forest); }
.kick { border: 2px solid var(--ink); background: var(--card); color: var(--ink); border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: 13px; min-width: 34px; }
.kick.confirm { background: var(--tomato); color: #fff; }
@keyframes pop { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: none; } }

.settings { display: grid; gap: 2px; }
.settings.readonly .seg, .settings.readonly .stepper, .settings.readonly .toggle { pointer-events: none; opacity: 0.6; }
.set { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 2px dashed var(--line); }
.set:first-of-type { border-top: 0; }
.set.col { flex-direction: column; align-items: stretch; }
.set-label { font-weight: 700; font-size: 15px; }
.set-hint { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.seg { display: flex; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 7px 12px; border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: var(--cobalt); color: #fff; }
.seg.small button { padding: 6px 10px; font-size: 13px; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 3px; }
.stepper button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--card); font-size: 18px; font-weight: 800; }
.stepper span { min-width: 34px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.toggle { width: 56px; height: 32px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-2); position: relative; transition: background 0.2s; flex: none; padding: 0; }
.toggle span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); transition: transform 0.22s cubic-bezier(0.3, 1.5, 0.6, 1); }
.toggle.on { background: var(--forest); }
.toggle.on span { transform: translateX(24px); }
.start-pick { display: grid; gap: 8px; }
.start-chosen { display: flex; align-items: center; gap: 10px; font-size: 15px; min-height: 40px; }

.cta-bar { position: sticky; bottom: 0; padding: 16px 4px calc(8px + var(--safe-bottom)); margin-top: 16px; display: grid; gap: 10px; background: linear-gradient(180deg, rgba(244, 238, 227, 0), var(--paper) 35%); z-index: 5; }
.cta-bar p { margin: 0; }

/* ── Suggestions ──────────────────────────── */
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest:empty { display: none; }
.suggest button { border: 2px solid var(--ink); padding: 6px 12px; border-radius: 999px; background: var(--card); font-weight: 700; font-size: 14px; }

/* ── Avatars ──────────────────────────────── */
.pav { width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: calc(var(--s) * 0.38); color: #fff; background: var(--c); border: 2px solid var(--ink); }
.aav { width: var(--s); height: var(--s); border-radius: 50%; flex: none; position: relative; overflow: hidden; display: inline-grid; place-items: center; background: hsl(var(--h) 45% 62%); border: 2px solid var(--ink); }
.aav-i { font-family: var(--font-display); font-weight: 800; font-size: calc(var(--s) * 0.36); color: var(--ink); }
.aav.big { border-width: 3px; box-shadow: var(--shadow); }
.aav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; opacity: 0; transition: opacity 0.35s; }
.aav img.ok { opacity: 1; }
.photo-credit { margin-top: 6px; font-size: 11px; line-height: 1.35; color: var(--muted); max-width: 320px; margin-inline: auto; text-align: center; }
.photo-credit:empty { display: none; }
.photo-credit a { color: inherit; text-decoration: underline; }

/* ═════════════ JEU ═════════════ */
.game-top { margin-bottom: 12px; }
.game-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'stage' 'players' 'chain'; }
.stage { grid-area: stage; text-align: center; display: flex; flex-direction: column; gap: 14px; padding: 18px; overflow: hidden; scroll-margin-top: 10px; transition: background 0.3s; }
.stage.my-turn { background: #fff3d6; box-shadow: 7px 7px 0 var(--tomato); }
.stage.flash-ok { animation: flashOk 0.8s ease; }
.stage.flash-bad { animation: flashBad 0.8s ease; }
@keyframes flashOk { 0% { background: #cfe3c4; } 100% { background: var(--card); } }
@keyframes flashBad { 0% { background: #f5c2b5; } 100% { background: var(--card); } }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
.turn-row { display: flex; align-items: center; gap: 12px; min-height: 52px; min-width: 0; }
.turn-row.pop { animation: pop 0.35s ease both; }
.turn-name { font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.turn-name.me { color: var(--tomato); font-size: 24px; }
.turn-label { font-weight: 700; color: var(--muted); }

.timer { position: relative; width: 84px; height: 84px; flex: none; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.timer .trk { fill: var(--card); stroke: var(--paper-2); stroke-width: 10; }
.timer .prog { fill: none; stroke: var(--forest); stroke-width: 10; stroke-linecap: round; transition: stroke 0.3s; }
.timer.warn .prog { stroke: var(--mustard); }
.timer.danger .prog { stroke: var(--tomato); }
.timer.idle .prog { stroke: var(--paper-2); }
.timer-num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 32px; font-variant-numeric: tabular-nums; }
.timer.danger .timer-num { color: var(--tomato); }
.timer-num.beat { animation: beat 0.35s ease; }
.timer.danger { animation: dangerPulse 0.5s ease-in-out infinite alternate; }
@keyframes beat { 0% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes dangerPulse { to { transform: scale(1.06) rotate(2deg); } }

.timebar { position: fixed; top: 0; left: 0; right: 0; height: calc(6px + var(--safe-top)); z-index: 40; opacity: 0; transition: opacity 0.3s; pointer-events: none; background: var(--paper-2); }
.timebar.on { opacity: 1; }
.timebar-fill { height: 100%; background: var(--forest); transform-origin: left; transition: transform 0.1s linear; }
.timebar.danger .timebar-fill { background: var(--tomato); }

.artist-block { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.artist-block.pop { animation: artistIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes artistIn { from { opacity: 0; transform: translateY(14px) rotate(-3deg) scale(0.9); } to { opacity: 1; transform: none; } }
.artist-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(36px, 10vw, 62px); line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; word-break: break-word; background: var(--mustard); border: var(--bw) solid var(--ink); border-radius: 14px; padding: 6px 16px 8px; box-shadow: var(--shadow-sm); transform: rotate(-1.5deg); }
.question { color: var(--ink-2); font-size: 17px; font-weight: 600; padding-top: 12px; border-top: 2px dashed var(--line); }
.question b { color: var(--ink); }

.answer { display: grid; gap: 12px; animation: pop 0.25s ease both; }
.answer-field { display: grid; gap: 8px; }
.watching { min-height: 26px; color: var(--ink-2); font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.watching > span { display: inline-flex; align-items: center; gap: 6px; }
.watching:has(> span) { flex-direction: row; justify-content: center; flex-wrap: wrap; }
.dots { display: inline-flex; gap: 4px; margin-left: 2px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: 0.5; }
.dots.on i { animation: dot 1s infinite; background: var(--tomato); opacity: 1; }
.dots.on i:nth-child(2) { animation-delay: 0.15s; } .dots.on i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }
.ok-text { color: var(--forest); }
.bad-text { color: var(--bad); }
.checking { color: var(--cobalt); display: inline-flex; align-items: center; gap: 8px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--paper-2); border-top-color: var(--cobalt); animation: spin 0.7s linear infinite; display: inline-block; }
.web { font-size: 11px; }
.spectator { width: 100%; padding: 10px; border-radius: 12px; background: var(--paper-2); color: var(--ink-2); font-size: 14px; }

.countdown { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; background: var(--cobalt); color: #fff; z-index: 3; border-radius: inherit; }
.cd-num { font-family: var(--font-display); font-weight: 800; font-size: 140px; line-height: 1; animation: cd 1s ease both; }
.cd-sub { font-weight: 700; }
.cd-sub b { background: var(--mustard); color: var(--ink); padding: 0 6px; border-radius: 6px; }
@keyframes cd { 0% { transform: scale(1.7) rotate(-8deg); opacity: 0; } 25% { transform: scale(1) rotate(0); opacity: 1; } 100% { transform: scale(0.92); } }

.panel { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-weight: 800; font-size: 17px; margin-bottom: 10px; }
.players-panel { grid-area: players; }
.chain-panel { grid-area: chain; max-height: 60dvh; overflow-y: auto; scroll-behavior: smooth; }

.gplayers { list-style: none; margin: 0; padding: 2px 2px 6px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.gplayers::-webkit-scrollbar { display: none; }
.gp { display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px; background: var(--paper); border: 2px solid var(--ink); flex: none; transition: background 0.3s, transform 0.3s; }
.gp.cur { background: var(--mustard); transform: rotate(-1.5deg); box-shadow: var(--shadow-sm); }
.gp.out { opacity: 0.45; }
.gp.out .gp-name { text-decoration: line-through; text-decoration-color: var(--tomato); text-decoration-thickness: 2.5px; }
.gp-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.gp-dot.on { background: var(--forest); }
.gp-dot.off { background: var(--tomato); }
.gp-name { font-weight: 800; font-size: 14px; white-space: nowrap; }
.st { font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.st.cur { color: var(--ink); }
.st.bad { color: var(--bad); }

.chain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ch-item { display: flex; flex-direction: column; }
.ch-item.new { animation: chainIn 0.55s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.ch-item.new .ch-line { animation: draw 0.45s ease both; }
@keyframes chainIn { from { opacity: 0; transform: translateX(-12px) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.ch-artist { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--paper); border: 2px solid var(--ink); font-weight: 800; }
.ch-item:nth-child(5n + 1) .ch-artist { background: #f6dfa7; }
.ch-item:nth-child(5n + 2) .ch-artist { background: #d5e2cb; }
.ch-item:nth-child(5n + 3) .ch-artist { background: #f2c4b6; }
.ch-item:nth-child(5n + 4) .ch-artist { background: #c9d6ec; }
.ch-item:nth-child(5n + 5) .ch-artist { background: #e0cddd; }
.ch-item.last .ch-artist { background: var(--cobalt); color: #fff; box-shadow: var(--shadow-sm); }
.ch-artist > span:not(.aav):not(.pill) { flex: 1; min-width: 0; }
.ch-link { position: relative; padding: 5px 0 5px 42px; display: flex; flex-direction: column; gap: 1px; min-height: 40px; justify-content: center; }
.ch-line { position: absolute; left: 24px; top: 0; bottom: 0; width: 3px; background: var(--ink); transform-origin: top; border-radius: 2px; }
.ch-link.reset .ch-line { background: repeating-linear-gradient(180deg, var(--ink) 0 4px, transparent 4px 8px); }
.ch-song { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.ch-by { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ── Overlays plein écran : aplats de couleur ── */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; pointer-events: none; padding: 20px; }
.overlay::before { content: ''; position: absolute; inset: 0; background: var(--ink); opacity: 0; transition: opacity 0.18s; }
.overlay.accent::before { background: var(--mustard); }
.overlay.bad::before { background: #d34021; }
.overlay.warn::before { background: var(--cobalt); }
.overlay.gold::before { background: var(--sage); }
.overlay.in::before { opacity: 0.97; }
.ov-card { position: relative; text-align: center; transform: scale(0.7) rotate(-4deg); opacity: 0; transition: transform 0.32s cubic-bezier(0.2, 1.5, 0.4, 1), opacity 0.18s; max-width: 92vw; color: #fff; }
.overlay.accent .ov-card, .overlay.gold .ov-card { color: var(--ink); }
.overlay.in .ov-card { transform: rotate(-2deg); opacity: 1; }
.overlay.out .ov-card { transform: scale(1.08) rotate(0); opacity: 0; transition-duration: 0.18s; }
.ov-icon { font-size: 64px; line-height: 1; margin-bottom: 8px; }
.ov-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 12vw, 84px); line-height: 0.95; letter-spacing: -0.02em; text-transform: uppercase; }
.ov-sub { margin-top: 14px; font-size: 18px; font-weight: 600; }
.ov-sub b { background: var(--card); color: var(--ink); padding: 0 6px; border-radius: 6px; }
.overlay.big .ov-icon { font-size: 110px; animation: trophy 1.2s ease-in-out infinite alternate; }
.overlay.big .ov-title { font-size: clamp(56px, 17vw, 120px); }
@keyframes trophy { from { transform: rotate(-8deg); } to { transform: rotate(8deg) scale(1.06); } }

/* ── Toasts ───────────────────────────────── */
.toasts { position: fixed; left: 50%; bottom: calc(16px + var(--safe-bottom)); transform: translateX(-50%); z-index: 45; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast { background: var(--card); border: var(--bw) solid var(--ink); border-radius: 14px; padding: 11px 16px; box-shadow: var(--shadow-sm); font-weight: 600; font-size: 14.5px; animation: toastIn 0.3s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.toast.ok { background: #d5e2cb; }
.toast.bad { background: #f2c4b6; }
.toast.warn { background: #f6dfa7; }
.toast.out { opacity: 0; transform: translateY(8px); transition: all 0.3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) rotate(-2deg); } to { opacity: 1; transform: none; } }

.netbanner { position: fixed; top: calc(10px + var(--safe-top)); left: 50%; transform: translateX(-50%); z-index: 60; background: var(--mustard); color: var(--ink); border: var(--bw) solid var(--ink); font-weight: 800; font-size: 14px; padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 55; display: none; }

/* ═════════════ RÉSULTATS ═════════════ */
.results { display: flex; flex-direction: column; gap: 16px; }
.win-hero { text-align: center; padding: 22px 14px 18px; background: var(--sage); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.trophy { font-size: 56px; animation: trophy 1.6s ease-in-out infinite alternate; display: inline-block; }
.win-hero .label { color: var(--ink); }
.win-av { display: flex; justify-content: center; margin: 10px 0 6px; }
.win-av .pav { border-width: 3px; box-shadow: var(--shadow-sm); }
.win-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 11vw, 64px); margin: 4px 0 0; line-height: 1; display: inline-block; background: var(--mustard); border: var(--bw) solid var(--ink); border-radius: 14px; padding: 4px 16px 8px; transform: rotate(-2deg); box-shadow: var(--shadow-sm); }
.win-hero p { margin: 12px 0 0; color: var(--ink); font-weight: 600; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 12px 8px; text-align: center; }
.stat:nth-child(6n + 1) { background: #f6dfa7; } .stat:nth-child(6n + 2) { background: #c9d6ec; } .stat:nth-child(6n + 3) { background: #f2c4b6; }
.stat:nth-child(6n + 4) { background: #d5e2cb; } .stat:nth-child(6n + 5) { background: #e0cddd; } .stat:nth-child(6n + 6) { background: #cfe5e2; }
.stat-i { font-size: 20px; }
.stat-v { font-family: var(--font-display); font-weight: 800; font-size: 26px; margin-top: 2px; }
.stat-l { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.results-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.ranking, .history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rk { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--paper); border: 2px solid var(--ink); flex-wrap: wrap; }
.rk.win { background: var(--mustard); }
.rk-place { width: 30px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.rk-name { font-weight: 800; flex: 1; }
.rk-meta { font-size: 12.5px; color: var(--ink-2); font-weight: 600; width: 100%; padding-left: 74px; margin-top: -6px; }
.hi { padding: 10px 12px; border-radius: 12px; background: var(--paper); border: 2px solid var(--ink); border-left-width: 8px; border-left-color: var(--forest); }
.hi.bad { border-left-color: var(--tomato); }
.hi.warn { border-left-color: var(--mustard); }
.hi-who { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.hi-main { font-weight: 700; }
.hi-main .arrow { color: var(--tomato); }
.hi-song { font-size: 13px; color: var(--ink-2); }
.results .chain { max-height: 520px; overflow-y: auto; }

/* ═════════════ TABLETTE / DESKTOP ═════════════ */
@media (min-width: 760px) {
  .app { padding-left: 24px; padding-right: 24px; }
  .lobby-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .invite { grid-column: 1 / -1; }
  .cta-bar { max-width: 460px; margin-left: auto; margin-right: auto; width: 100%; }
  .results-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .results-grid .wide { grid-column: 1 / -1; }
  .stats-grid { grid-template-columns: repeat(6, 1fr); }
  .timer { width: 96px; height: 96px; }
  .timer-num { font-size: 36px; }
  .brand-logo { height: 46px; }
  .featured { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .featured .mode-media { aspect-ratio: auto; min-height: 460px; border-bottom: 0; border-right: var(--bw) solid var(--ink); }
  .mode-body { padding: 30px; justify-content: center; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .soon-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lobby-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.1fr); }
  .invite { grid-column: auto; }
  .game-grid { grid-template-columns: 250px minmax(0, 1fr) 300px; grid-template-areas: 'players stage chain'; align-items: start; }
  .gplayers { flex-direction: column; overflow: visible; }
  .gp { border-radius: 14px; }
  .gp .st { margin-left: auto; }
  .chain-panel { max-height: calc(100dvh - 120px); position: sticky; top: 12px; }
  .players-panel { position: sticky; top: 12px; }
  .stage { padding: 28px; min-height: 580px; justify-content: center; }
  .modes { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); align-items: start; }
  .soon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .soon-card { min-height: 130px; }
  .featured { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Clavier mobile ouvert / petits écrans en hauteur : on compacte */
@media (max-height: 560px) and (max-width: 1023px) {
  .artist-av { display: none; }
  .artist-block .label { display: none; }
  .artist-name { font-size: 30px; }
  .stage { gap: 8px; padding: 12px; }
  .question { padding-top: 6px; font-size: 14px; }
  .timer { width: 64px; height: 64px; }
  .timer-num { font-size: 24px; }
  .btn.xl { min-height: 52px; }
}

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

/* ═════════════ LOGO TYPO ═════════════ */
.brand { display: inline-flex; align-items: center; text-decoration: none; transition: transform 0.2s; }
.brand:hover { transform: rotate(-2deg) scale(1.03); }
.logo-typo { height: 46px; width: auto; display: block; filter: drop-shadow(3px 3px 0 rgba(30, 27, 22, 0.25)); }
.home-top { display: flex; justify-content: center; padding-top: 6px; }
.home-top .logo-typo { height: clamp(58px, 15vw, 92px); }
.home-sub { text-align: center; margin: -8px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink-2); }
.brand-badge, .brand-logo { display: none; }

/* Affiche typographique (accueil sans photos) */
.mode-media.typo-only .sc-caption { left: 50%; top: 50%; bottom: auto; right: auto; transform: translate(-50%, -50%); width: 90%; justify-content: center; text-align: center; }
.mode-media.typo-only .sc-caption b { font-size: clamp(30px, 8vw, 52px); padding: 6px 18px 10px; }
.mode-media.typo-only::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(30, 27, 22, 0.16) 2px, transparent 2.5px); background-size: 22px 22px; }

/* ═════════════ CARROUSEL DES MODES ═════════════ */
.carousel { position: relative; overflow-x: clip; overflow-y: visible; padding: 8px 0 14px; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.car-track { display: grid; justify-items: center; align-items: start; touch-action: pan-y; user-select: none; }
.car-card {
  grid-area: 1 / 1;
  width: min(560px, 84vw);
  background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; position: relative;
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.25, 1), opacity 0.4s, box-shadow 0.4s;
  cursor: pointer;
}
.car-card[data-pos='0'] { transform: none; z-index: 5; cursor: default; box-shadow: 8px 8px 0 var(--ink); }
.car-card[data-pos='1'] { transform: translateX(88%) scale(0.78); z-index: 4; opacity: 0.92; }
.car-card[data-pos='-1'] { transform: translateX(-88%) scale(0.78); z-index: 4; opacity: 0.92; }
.car-card[data-pos='2'] { transform: translateX(150%) scale(0.6); z-index: 3; opacity: 0.55; }
.car-card[data-pos='-2'] { transform: translateX(-150%) scale(0.6); z-index: 3; opacity: 0.55; }
.car-card[data-pos='3'] { transform: translateX(200%) scale(0.5); z-index: 2; opacity: 0; pointer-events: none; }
.car-card[data-pos='-3'] { transform: translateX(-200%) scale(0.5); z-index: 2; opacity: 0; pointer-events: none; }
.car-card:not(.is-center) > * { pointer-events: none; }
.car-card:not(.is-center):hover { opacity: 1; }

.car-card .mode-media { aspect-ratio: 16 / 10; border-bottom: var(--bw) solid var(--ink); }
.car-card .mode-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.car-card .mode-title { font-size: clamp(34px, 8vw, 52px); }
.car-card .start-form .btn { margin-top: 2px; }
.car-card .mode-kicker { margin-bottom: -4px; }

.car-card.soon { background: var(--card); }
.soon-art { aspect-ratio: 16 / 10; background: var(--c); border-bottom: var(--bw) solid var(--ink); display: grid; place-items: center; position: relative; overflow: hidden; }
.soon-art::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(30, 27, 22, 0.16) 2px, transparent 2.5px); background-size: 22px 22px; }
.soon-art::after { content: ''; position: absolute; inset: 0; background-image: var(--grain); opacity: 0.35; mix-blend-mode: multiply; }
.car-card.soon .soon-emoji { font-size: clamp(64px, 16vw, 110px); position: relative; z-index: 1; transform: rotate(-6deg); filter: drop-shadow(4px 4px 0 rgba(30, 27, 22, 0.35)); }
.car-card.soon .mode-title em { color: var(--c); }
.car-card.c-mustard .mode-title em { color: #b8841a; }
.car-card.soon .badge { align-self: flex-start; margin: 0; font-size: 13px; background: var(--mustard); }
.back-music { align-self: flex-start; }

.car-arrow {
  position: absolute; top: 28%; z-index: 10; width: 54px; height: 54px; border-radius: 50%;
  border: var(--bw) solid var(--ink); background: var(--card); box-shadow: var(--shadow-sm);
  font-size: 34px; line-height: 1; font-weight: 800; display: grid; place-items: center; padding: 0 0 4px;
  transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
}
.car-arrow:hover { background: var(--mustard); }
.car-arrow:active { transform: translate(3px, 3px); box-shadow: none; }
.car-arrow.prev { left: max(8px, calc(50% - min(560px, 84vw) / 2 - 30px)); }
.car-arrow.next { right: max(8px, calc(50% - min(560px, 84vw) / 2 - 30px)); }

.car-dots { display: flex; justify-content: center; gap: 8px; margin-top: -4px; }
.car-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); padding: 0; transition: width 0.25s, background 0.25s; }
.car-dot.on { width: 30px; border-radius: 999px; background: var(--tomato); }

/* ═════════════ PIED DE PAGE ═════════════ */
.site-footer { margin-top: 18px; padding: 18px 4px 6px; border-top: 2px dashed var(--line); text-align: center; color: var(--muted); font-size: 13px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 8px; }
.site-footer a { color: var(--ink-2); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--tomato); }
.site-footer p { margin: 0; }

/* ═════════════ PAGES LÉGALES ═════════════ */
.legal { max-width: 820px; margin: 0 auto; }
.legal .topbar { justify-content: space-between; }
.legal-doc { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 5vw, 44px); }
.legal-doc h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 7vw, 46px); line-height: 1.05; margin: 0 0 6px; letter-spacing: -0.02em; }
.legal-doc .updated { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.legal-doc h2 { font-family: var(--font-display); font-weight: 800; font-size: 22px; margin: 28px 0 8px; }
.legal-doc h3 { font-size: 17px; margin: 18px 0 6px; }
.legal-doc p, .legal-doc li { color: var(--ink-2); line-height: 1.6; }
.legal-doc a { color: var(--cobalt); font-weight: 600; }
.legal-doc table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14.5px; }
.legal-doc th, .legal-doc td { border: 2px solid var(--ink); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-doc th { background: var(--paper-2); }
.legal-doc .table-wrap { overflow-x: auto; }
.legal-note { background: #f6dfa7; border: 2px solid var(--ink); border-radius: var(--radius-sm); padding: 12px 14px; margin: 14px 0; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.legal-nav a { border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; }
.legal-nav a[aria-current='page'] { background: var(--mustard); }

@media (min-width: 760px) {
  .logo-typo { height: 52px; }
  .car-card { width: min(560px, 62vw); }
  .car-arrow.prev { left: calc(50% - min(560px, 62vw) / 2 - 76px); }
  .car-arrow.next { right: calc(50% - min(560px, 62vw) / 2 - 76px); }
  .car-arrow { top: 34%; }
}
@media (min-width: 1100px) {
  .car-card[data-pos='1'] { transform: translateX(96%) scale(0.74); }
  .car-card[data-pos='-1'] { transform: translateX(-96%) scale(0.74); }
  .car-card[data-pos='2'] { transform: translateX(165%) scale(0.56); opacity: 0.5; }
  .car-card[data-pos='-2'] { transform: translateX(-165%) scale(0.56); opacity: 0.5; }
}

/* ═════════════ ACCESSIBILITÉ CLAVIER ═════════════ */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 8px; }
.btn:focus-visible, .car-arrow:focus-visible, .car-dot:focus-visible, .toggle:focus-visible, .seg button:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.input:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--mustard), 0 0 0 7px var(--ink); }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 8px; }
.form-notice { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.form-notice a { color: var(--cobalt); font-weight: 700; }

/* ── Pages statiques : intro avant chargement, fil d'Ariane, 404 ── */
.static-intro { text-align: center; max-width: 640px; margin: 0 auto; padding: 32px 16px; gap: 14px; }
.static-intro .logo-typo { width: min(320px, 70vw); height: auto; }
.static-intro h1 { font-family: var(--font-display); font-size: clamp(26px, 5vw, 38px); line-height: 1.1; margin: 0; }
.breadcrumb { max-width: 820px; margin: 0 auto 12px; font-size: 14px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: '›'; margin-right: 6px; color: var(--muted); }
.breadcrumb a { color: var(--ink); }
.breadcrumb [aria-current] { color: var(--muted); }
.legal-doc .lead { font-size: 18px; }
.legal-doc .na { color: var(--muted); font-style: italic; }
.not-found { text-align: center; }
.not-found .big-emoji { font-size: 56px; margin: 0; }
.not-found .btn { margin: 4px; }
h1.room-code, h1.join-title { margin: 0; }

/* Fin de partie : écran « Perdu » pour les perdants */
.win-hero.lost { background: var(--card); }
.win-hero.lost .trophy { animation: none; filter: grayscale(0.2); }
.win-hero.lost .label { color: var(--bad); }
.win-hero.lost .lost-winner { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--sage); }
/* Donner la main (lobby) */
.lp .promote { border: 2px solid var(--ink); background: var(--card); border-radius: 999px; min-width: 32px; height: 32px; padding: 0 8px; cursor: pointer; font-size: 15px; line-height: 1; }
.lp .promote.confirm { background: var(--mustard); font-size: 12px; font-weight: 700; }
.promote-hint { font-size: 13px; margin: 10px 2px 0; }
.start-chosen .small { display: block; font-size: 12px; margin-top: 4px; }
.start-pick .row { flex-wrap: nowrap; }
.start-pick .row .input { flex: 1 1 auto; min-width: 0; }
.start-pick .row .btn { flex: 0 0 auto; }

.start-pick .row .btn { padding-left: 14px; padding-right: 14px; }

/* ── Salon : durée personnalisée, thèmes, carte du code, barre de lancement ── */
.turn-pick { display: grid; gap: 8px; }
.turn-pick .seg button { padding-left: 8px; padding-right: 8px; }
.turn-custom { display: flex; align-items: center; gap: 8px; }
.turn-custom .input { width: 96px; flex: none; text-align: center; padding-top: 8px; padding-bottom: 8px; }
.turn-custom .btn { padding-top: 8px; padding-bottom: 8px; }
.theme-pick { display: grid; gap: 8px; margin-top: 4px; }
.theme-title { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.themes { display: flex; flex-wrap: wrap; gap: 6px; }
.theme { display: inline-flex; align-items: center; gap: 5px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 5px 11px 5px 8px; font-family: var(--font-display); font-weight: 700; font-size: 13px; line-height: 1.2; box-shadow: 2px 2px 0 var(--ink); transition: transform 0.12s, box-shadow 0.12s, background 0.15s; }
.theme:hover { background: var(--mustard); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.theme:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.theme.on { background: var(--cobalt); color: #fff; }
.theme:disabled { opacity: 0.6; }
.theme:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.start-chosen .pill { margin-left: 6px; vertical-align: middle; font-size: 11.5px; }

/* La carte du code ne s'étire plus sur toute la hauteur */
.invite { align-self: start; }
.room-code { font-size: clamp(38px, 10vw, 54px); }

/* La barre de lancement se fond dans le fond papier (plus de rectangle clair) */
.cta-bar { background: none; }
.cta-bar::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(244, 238, 227, 0), rgba(244, 238, 227, 0.92) 45%); pointer-events: none; }
.btn.primary:disabled { opacity: 1; background: var(--paper-2); color: var(--ink-2); border-color: var(--ink); box-shadow: var(--shadow-sm); }
@media (min-width: 760px) {
  .cta-bar { position: static; padding-top: 4px; }
  .cta-bar::before { display: none; }
}
.start-chosen .sc-text { flex: 1; min-width: 0; }
.start-chosen .sc-text .pill { margin-left: 4px; }
.lobby-grid { align-items: start; }

/* ═════════════ SALON (refonte) ═════════════ */
.lobby { max-width: 1120px; margin: 0 auto; display: grid; gap: 22px; }

/* En-tête : Quitter | logo + Musique | rôle */
.lobby-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; min-height: 56px; }
.lobby-top #leaveBtn { justify-self: start; }
.lobby-brand { display: flex; align-items: center; gap: 10px; }
.lobby-brand .logo-typo { height: clamp(40px, 9vw, 58px); }
.mode-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--tomato); color: #fff; border: var(--bw) solid var(--ink); border-radius: 999px; padding: 4px 12px 5px; font-family: var(--font-display); font-weight: 800; font-size: clamp(13px, 2.6vw, 16px); box-shadow: var(--shadow-sm); transform: rotate(-4deg); white-space: nowrap; }
.top-role { justify-self: end; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* Ticket du code, au centre */
.ticket { position: relative; justify-self: center; width: min(100%, 620px); text-align: center; background: var(--mustard); border: var(--bw) solid var(--ink); border-radius: 26px; box-shadow: 7px 7px 0 var(--ink); padding: 22px 22px 18px; display: grid; gap: 8px; overflow: hidden; }
.ticket::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(30, 27, 22, 0.13) 1.6px, transparent 2px); background-size: 18px 18px; pointer-events: none; }
.ticket > * { position: relative; }
.ticket-label { font-size: 12px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.ticket .room-code { font-family: var(--font-display); font-weight: 800; font-size: clamp(54px, 15vw, 112px); letter-spacing: 0.06em; line-height: 0.95; margin: 0; color: var(--ink); text-shadow: 4px 4px 0 rgba(255, 250, 241, 0.75); user-select: all; }
.ticket-status { margin: 0; font-weight: 700; color: var(--ink-2); }
.ticket-cut { height: 0; border-top: 3px dashed rgba(30, 27, 22, 0.45); margin: 8px -22px 4px; }
.ticket-cut::before, .ticket-cut::after { content: ''; position: absolute; top: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: var(--bw) solid var(--ink); }
.ticket-cut::before { left: -16px; }
.ticket-cut::after { right: -16px; }
.ticket-actions { display: grid; gap: 10px; }
.ticket-btns { display: flex; gap: 10px; }
.ticket-btns .btn { flex: 1; }
.ticket .invite-link { background: var(--card); }
.ticket .hint:empty { display: none; }

/* Blocs (joueurs, paramètres) */
.lobby-block { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.block-head h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 19px; }

/* Joueurs : tuiles qui s'ajoutent de gauche à droite */
.lobby .lobby-players { display: flex; flex-wrap: wrap; gap: 12px; }
.lobby .lp { position: relative; flex: 0 0 auto; width: 132px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 12px; border-radius: 18px; background: var(--paper); border: 2px solid var(--ink); box-shadow: var(--shadow-sm); text-align: center; animation: pop 0.3s ease both; }
.lobby .lp.me { background: #fff3d6; }
.lobby .lp.is-host { background: #fde9b8; }
.lobby .lp.off { opacity: 0.55; }
.lp-crown { position: absolute; top: -13px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 22px; filter: drop-shadow(1px 1px 0 var(--ink)); }
.lp-av { position: relative; display: inline-grid; }
.lp-av .dot-on { position: absolute; right: 1px; bottom: 2px; width: 13px; height: 13px; border: 2px solid var(--card); }
.lobby .lp-name { flex: none; width: 100%; font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-tag { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lp-actions { display: flex; gap: 6px; margin-top: 4px; }
.lobby .lp .promote, .lobby .lp .kick { min-width: 34px; height: 30px; padding: 0 8px; border: 2px solid var(--ink); background: var(--card); border-radius: 999px; font-size: 13px; font-weight: 800; line-height: 1; cursor: pointer; }
.lobby .lp .promote.confirm { background: var(--mustard); font-size: 11.5px; }
.lobby .lp .kick.confirm { background: var(--tomato); color: #fff; font-size: 11.5px; }
.lobby .lp-invite { padding: 0; border: 2.5px dashed rgba(30, 27, 22, 0.45); background: transparent; box-shadow: none; }
.lp-invite-btn { width: 100%; height: 100%; min-height: 128px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: transparent; border-radius: 16px; padding: 12px 8px; color: var(--ink-2); }
.lp-invite-btn:hover { background: rgba(232, 176, 59, 0.18); }
.lp-plus { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 800; border: 2px dashed rgba(30, 27, 22, 0.45); }
.promote-hint { margin: 12px 0 0; font-size: 13px; }

/* Paramètres : tuiles de gauche à droite */
.set-row { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.tile { background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tile-title { font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.tile-gap { margin-top: 6px; }
.tile-sub { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tile .seg { background: var(--card); }
.tile .seg button { padding: 7px 6px; }
.tile .stepper { align-self: flex-start; background: var(--card); }
.tile .start-pick .row { display: flex; gap: 8px; }
.tile .start-pick .input { background: var(--card); }
.style-pick { display: grid; gap: 6px; margin-top: 2px; }
.select-row { display: flex; gap: 8px; }
.select-wrap { position: relative; flex: 1; min-width: 0; }
.select-wrap::after { content: ''; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select-wrap select { appearance: none; -webkit-appearance: none; width: 100%; min-height: 48px; padding: 10px 42px 10px 14px; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--card); color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 15px; box-shadow: var(--shadow-sm); cursor: pointer; }
.select-wrap select:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.select-wrap select:disabled { opacity: 0.6; }
.tile .start-chosen { background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; min-height: 64px; }
.tile .start-chosen > .muted { font-size: 14px; }
.tile .start-chosen b { font-family: var(--font-display); font-size: 17px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 14.5px; padding: 4px 0; border-top: 2px dashed var(--line); }
.opt:first-of-type { border-top: 0; }
.opt small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.opt-rule { margin: auto 0 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--card); border-radius: 10px; padding: 8px 10px; }
.settings.readonly .tile .seg, .settings.readonly .tile .stepper, .settings.readonly .tile .toggle { pointer-events: none; opacity: 0.6; }
.settings.readonly #turnCustomBtn { pointer-events: none; }

.lobby .cta-bar { width: min(100%, 520px); justify-self: center; margin-top: 0; }

@media (min-width: 760px) {
  .set-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tile-start { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .set-row { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1fr); }
  .tile-start { grid-column: auto; }
}
@media (max-width: 520px) {
  .lobby-top { grid-template-columns: auto 1fr; }
  .lobby-brand { justify-self: end; }
  .top-role { grid-column: 1 / -1; justify-self: center; }
  .lobby .lp { width: calc(50% - 6px); }
  .ticket { padding: 18px 16px 14px; }
  .ticket-cut { margin-left: -16px; margin-right: -16px; }
}
.ticket .room-code { font-size: clamp(48px, 13vw, 92px); overflow-wrap: anywhere; }
.ticket-cut { width: calc(100% + 44px); margin-left: -22px; margin-right: 0; }
.ticket-cut::before { left: -13px; }
.ticket-cut::after { right: -13px; }
.lp-actions { flex-wrap: wrap; justify-content: center; }
@media (max-width: 520px) {
  .ticket-cut { width: calc(100% + 32px); margin-left: -16px; }
}
.lobby .lp .promote, .lobby .lp .kick { height: auto; min-height: 30px; padding: 4px 10px; }

/* ═════════════ SÉRIE DE MANCHES / POINTS ═════════════ */
.head-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.round-pill { background: var(--tomato); color: #fff; }
.tile-note { font-family: var(--font); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tile .seg#segRounds button { padding-left: 6px; padding-right: 6px; }
.lp-pts { font-family: var(--font-display); font-weight: 800; font-size: 12.5px; padding: 1px 9px; border-radius: 999px; border: 2px solid var(--ink); background: var(--card); color: var(--ink-2); }
.lp-pts.has { background: var(--mustard); color: var(--ink); }
.absent-scores { margin: 12px 0 0; font-size: 13px; }

.series-card { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 14px; margin-top: 16px; }
.series-card.over { background: #fde9b8; }
.series-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.series-title { margin: 4px 0 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 4vw, 28px); }
.series-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.sd { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); }
.sd.done { background: var(--tomato); }
.series-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sr { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: var(--paper); }
.sr.me { background: #fff3d6; }
.sr.champ { background: var(--mustard); }
.sr-rank { width: 28px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.sr-name { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-gain { font-family: var(--font-display); font-weight: 800; font-size: 13px; color: #fff; background: var(--forest); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 8px; animation: pop 0.4s ease both; }
.sr-pts { font-family: var(--font-display); font-weight: 800; font-size: 17px; white-space: nowrap; }

/* ═════════════ MODE CLASSÉ ═════════════ */
.ranked-box { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 980px; margin: 8px auto 26px; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.rk-art { display: grid; place-items: center; font-size: 64px; min-height: 120px; background: var(--cobalt); border-bottom: var(--bw) solid var(--ink); position: relative; overflow: hidden; }
.rk-art::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.18) 2px, transparent 2.5px); background-size: 20px 20px; }
.rk-body { padding: 20px; display: grid; gap: 10px; }
.rk-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 4.5vw, 34px); line-height: 1.05; }
.rk-desc { margin: 0; color: var(--ink-2); }
.rk-actions { display: grid; gap: 10px; margin-top: 4px; }
.rk-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.rk-me { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rk-me-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.rk-elo { background: var(--mustard); color: var(--ink); }
.rk-links { margin: 0; font-weight: 700; font-size: 14px; }
@media (min-width: 760px) {
  .ranked-box { grid-template-columns: 200px minmax(0, 1fr); }
  .rk-art { border-bottom: 0; border-right: var(--bw) solid var(--ink); font-size: 84px; }
  .rk-body { padding: 26px 28px; }
}

/* Boutons de connexion */
.pv-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; min-height: 50px; padding: 10px 18px; font-weight: 800; flex: 1 1 220px; }
.pv-ico { width: 22px; height: 22px; flex: none; }
.pv-google { background: #fff; color: #1f1f1f; }
.pv-discord { background: #5865f2; color: #fff; }
.pv-discord:hover { background: #4752c4; }

/* File d'attente */
.queue-card { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 28px 22px; }
.queue-card h1 { margin: 6px 0 0; font-family: var(--font-display); font-size: clamp(24px, 6vw, 32px); }
.queue-time { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 34px; }
.queue-card .btn { width: 100%; }
.radar { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.radar b { position: relative; font-size: 44px; z-index: 1; }
.radar span { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--cobalt); opacity: 0; animation: radar 2.4s ease-out infinite; }
.radar span:nth-child(2) { animation-delay: 0.8s; }
.radar span:nth-child(3) { animation-delay: 1.6s; }
@keyframes radar { 0% { transform: scale(0.35); opacity: 0.9; } 100% { transform: scale(1.15); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .radar span { animation: none; opacity: 0.4; } }

/* Résultats classés */
.elo-delta { font-family: var(--font-display); font-weight: 800; font-size: 14px; border: 2px solid var(--ink); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.elo-delta.up { background: var(--forest); color: #fff; }
.elo-delta.down { background: var(--tomato); color: #fff; }
.series-title .elo-delta { font-size: 0.6em; vertical-align: middle; }
.ranked-card { background: #dfe7f5; }

/* Pages compte et classement */
.acc-msg { padding: 10px 14px; border: 2px solid var(--ink); border-radius: 12px; font-weight: 700; background: var(--paper); }
.acc-msg.bad { background: #f6d2c8; }
.acc-msg.ok { background: #d5e8d4; }
.acc-form { display: grid; gap: 8px; margin: 18px 0; }
.acc-form .row, .acc-danger .row { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-form .input, .acc-danger .input { flex: 1 1 200px; min-width: 0; }
.acc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 16px 0; }
.acc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.acc-danger { margin-top: 18px; border: 2px dashed var(--bad); border-radius: 14px; padding: 12px 14px; }
.acc-danger summary { cursor: pointer; font-weight: 800; color: var(--bad); }
.btn.danger { background: var(--bad); color: #fff; }
.board-me { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--mustard); margin: 14px 0; font-weight: 600; }
.board { list-style: none; margin: 10px 0 24px; padding: 0; display: grid; gap: 8px; }
.board-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: 'rank name elo' 'rank meta elo'; align-items: center; column-gap: 10px; padding: 10px 14px 10px 8px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); }
.board-row.top { background: #fde9b8; }
.board-row.me { box-shadow: 0 0 0 3px var(--cobalt); }
.b-rank { grid-area: rank; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.b-name { grid-area: name; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-meta { grid-area: meta; font-size: 12.5px; color: var(--muted); }
.b-elo { grid-area: elo; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.legal-doc a.btn { text-decoration: none; } .legal-doc a.btn.primary { color: #fff; } .legal-doc a.pv-google { color: #1f1f1f; } .legal-doc a.pv-discord { color: #fff; }
.pv-row + .rk-note { margin-top: 12px; }

/* ═════════════ ACCUEIL : barre du haut (mode + connexion) ═════════════ */
.home-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding-top: 6px; }
.hb-left { justify-self: start; }
.hb-center { justify-self: center; }
.hb-center .logo-typo { height: clamp(52px, 9vw, 84px); }
.hb-right { justify-self: end; min-width: 0; }

.mode-switch { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm); font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--ink); transition: background 0.2s, transform 0.12s, box-shadow 0.12s; }
.mode-switch:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.mode-switch[aria-disabled='true'] { opacity: 0.6; cursor: not-allowed; }
.mode-switch[aria-disabled='true']:active { transform: none; box-shadow: var(--shadow-sm); }
.ms-track { position: relative; width: 50px; height: 28px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper-2); flex: none; transition: background 0.2s; }
.ms-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); transition: transform 0.22s cubic-bezier(0.3, 1.5, 0.6, 1); }
.mode-switch[aria-checked='true'] { background: var(--cobalt); color: #fff; }
.mode-switch[aria-checked='true'] .ms-track { background: var(--tomato); }
.mode-switch[aria-checked='true'] .ms-knob { transform: translateX(22px); }
.ms-on { display: none; }
.mode-switch[aria-checked='true'] .ms-on { display: inline; }
.mode-switch[aria-checked='true'] .ms-off { display: none; }
.mode-switch:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }

.pv-top { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pv-top .pv-btn { flex: none; min-height: 42px; padding: 6px 14px; font-size: 14px; gap: 8px; }
.pv-top .pv-ico { width: 18px; height: 18px; }
.pv-off { opacity: 0.55; cursor: not-allowed; filter: saturate(0.6); }
.pv-off:hover { background: inherit; }
.pv-google.pv-off:hover { background: #fff; }
.pv-discord.pv-off:hover { background: #5865f2; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 800; max-width: 100%; }
.uc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-elo { background: var(--mustard); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; font-size: 13px; white-space: nowrap; }
.user-chip:hover { background: var(--paper-2); }

/* Mode classé activé : titres « Ranked », matchmaking à la place des salons */
.rk-tag { display: none; }
.ranked-on .rk-tag { display: inline-block; margin-left: 10px; vertical-align: middle; transform: rotate(-4deg) translateY(-4px); background: var(--tomato); color: #fff; border: var(--bw) solid var(--ink); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 2px 10px 4px; font-family: var(--font-display); font-style: normal; font-weight: 800; font-size: 0.42em; letter-spacing: 0.04em; text-transform: uppercase; }
.ranked-on .casual-play { display: none; }
.ranked-play:empty { display: none; }
.ranked-play { display: grid; gap: 12px; }
.home.ranked-on .car-card.music { box-shadow: 7px 7px 0 var(--cobalt); }

@media (max-width: 640px) {
  .home-bar { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'left right' 'center center'; row-gap: 8px; }
  .hb-left { grid-area: left; }
  .hb-right { grid-area: right; }
  .hb-center { grid-area: center; }
  .pv-top .pv-txt { display: none; }
  .pv-top .pv-btn { padding: 6px 10px; min-width: 46px; }
  .mode-switch { font-size: 14px; padding-right: 12px; }
}

/* Flèches décoratives : « Ranked ? » (gauche) et « Ton compte » (droite) */
.hb-left { position: relative; padding-left: 44px; }
.hb-right { position: relative; padding-right: 44px; display: flex; justify-content: flex-end; }
.ranked-hint, .account-hint { position: absolute; top: 30px; width: 300px; height: 170px; color: var(--tomato); z-index: 2; }
.ranked-hint { left: -2px; pointer-events: none; }
.account-hint { right: -2px; text-decoration: none; pointer-events: none; }
.account-hint .rh-text { pointer-events: auto; cursor: pointer; }
.rh-arrow { position: absolute; top: 0; width: 104px; height: 112px; overflow: visible; filter: drop-shadow(2px 3px 0 rgba(30, 27, 22, 0.15)); }
.ranked-hint .rh-arrow { left: 0; }
.account-hint .rh-arrow { right: 0; transform: scaleX(-1); }
.rh-text { position: absolute; top: 92px; font-family: var(--font-display); font-weight: 800; font-size: 36px; line-height: 1; letter-spacing: -0.02em; white-space: nowrap; text-shadow: 3px 3px 0 rgba(30, 27, 22, 0.12); }
.ranked-hint .rh-text { left: 92px; transform: rotate(-7deg); transform-origin: left center; animation: rh-bounce 2.6s ease-in-out infinite; }
.account-hint .rh-text { right: 92px; text-align: right; transform: rotate(6deg); transform-origin: right center; color: var(--cobalt); animation: rh-bounce-r 2.6s ease-in-out 0.4s infinite; }
.account-hint { color: var(--cobalt); }
.account-hint:hover .rh-text { color: var(--tomato); }
.rh-text small { display: block; margin-top: 6px; font-size: 15px; font-weight: 700; color: var(--ink-2); letter-spacing: 0; }
@keyframes rh-bounce { 0%, 100% { transform: rotate(-7deg) translateY(0); } 50% { transform: rotate(-5deg) translateY(-4px); } }
@keyframes rh-bounce-r { 0%, 100% { transform: rotate(6deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-4px); } }
.ranked-on .ranked-hint { display: none; }
@media (prefers-reduced-motion: reduce) { .rh-text { animation: none !important; } }

/* Grande phrase d'accroche */
.home-hero { text-align: center; margin: 120px auto 4px; max-width: 980px; padding: 0 12px; }
.home-slogan { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 6.2vw, 76px); line-height: 1; letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.home-slogan mark { background: none; color: var(--tomato); position: relative; padding: 0 0.08em; white-space: nowrap; }
.home-slogan mark::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0.02em; height: 0.24em; background: var(--mustard); z-index: -1; transform: rotate(-2deg); border-radius: 4px; }
.home-hero .home-sub { margin: 14px auto 0; max-width: 640px; }

@media (max-width: 900px) {
  .ranked-hint, .account-hint { width: 220px; height: 120px; top: 26px; }
  .rh-arrow { width: 70px; height: 76px; }
  .rh-text { top: 60px; font-size: 24px; }
  .ranked-hint .rh-text { left: 62px; }
  .account-hint .rh-text { right: 62px; }
  .rh-text small { font-size: 12px; }
  .home-hero { margin-top: 84px; }
}
@media (max-width: 640px) {
  .hb-left { padding-left: 30px; }
  .hb-right { padding-right: 30px; }
  .ranked-hint, .account-hint { top: 24px; width: 170px; height: 90px; }
  .rh-arrow { width: 48px; height: 54px; }
  .rh-text { top: 40px; font-size: 18px; }
  .ranked-hint .rh-text { left: 42px; }
  .account-hint .rh-text { right: 42px; }
  .rh-text small { display: none; }
  .home-bar { row-gap: 64px; }
  .home-hero { margin-top: 18px; }
}


/* ═════════════ GRADES & CLASSÉ (séries de 5 manches) ═════════════ */
.grade-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--gc, var(--mustard)) 55%, transparent); font-family: var(--font-display); font-weight: 800; font-size: 13.5px; white-space: nowrap; }
.grade-badge b { color: var(--ink-2); font-weight: 800; }
.grade-badge.big { font-size: 17px; padding: 6px 14px 6px 10px; }
.grade-bar { height: 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; margin: 8px 0 4px; }
.grade-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--mustard), var(--tomato)); border-radius: 999px; }
.rank-grade { margin-top: 10px; max-width: 420px; }
.uc-grade { font-size: 18px; line-height: 1; }
.b-grade { font-weight: 700; color: var(--ink-2); }
.elo-delta.zero { background: var(--paper-2); color: var(--ink-2); }
.grade-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); background: var(--card); box-shadow: var(--shadow-sm); border-left: 10px solid var(--gc, var(--mustard)); margin: 6px 0 16px; }
.gc-emoji { font-size: 44px; line-height: 1; }
.gc-body { flex: 1; min-width: 0; }
.gc-name { font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.gc-body p { margin: 4px 0 0; }
.grades-list { list-style: none; margin: 12px 0 24px; padding: 0; display: grid; gap: 8px; }
.grades-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: 'e n m' 'e d d'; column-gap: 10px; align-items: center; padding: 8px 12px 8px 8px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); border-left: 8px solid var(--gc); }
.gl-emoji { grid-area: e; font-size: 26px; text-align: center; }
.gl-name { grid-area: n; font-family: var(--font-display); font-weight: 800; }
.gl-min { grid-area: m; font-weight: 800; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.gl-desc { grid-area: d; font-size: 12.5px; color: var(--muted); }

/* File d'attente : 4 places */
.queue-theme { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 18px; padding: 4px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--mustard); }
.queue-slots { display: flex; gap: 10px; justify-content: center; }
.qs { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 2.5px dashed rgba(30, 27, 22, 0.4); font-family: var(--font-display); font-weight: 800; color: var(--muted); font-size: 18px; }
.qs.on { border-style: solid; border-color: var(--ink); background: var(--cobalt); color: #fff; animation: pop 0.3s ease both; }

/* Pause entre deux manches */
.next-round { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 14px; background: var(--card); font-weight: 600; }
.nr-count { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--tomato); color: #fff; border: 2.5px solid var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 24px; }

/* Lobby classé (10 s) */
.rlobby { max-width: 980px; margin: 0 auto; display: grid; gap: 18px; }
.rl-title { margin: 0; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 6vw, 44px); }
.rl-count { justify-self: center; display: grid; justify-items: center; width: 116px; height: 116px; place-content: center; border-radius: 50%; background: var(--tomato); color: #fff; border: var(--bw) solid var(--ink); box-shadow: var(--shadow); }
.rl-count span { font-family: var(--font-display); font-weight: 800; font-size: 54px; line-height: 1; }
.rl-count small { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.rl-players { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.rl-p { position: relative; display: grid; justify-items: center; gap: 6px; padding: 18px 10px 14px; border: var(--bw) solid var(--ink); border-radius: 18px; background: var(--card); box-shadow: var(--shadow-sm); text-align: center; animation: pop 0.35s ease both; }
.rl-p.me { background: #fff3d6; }
.rl-p.first { background: #fde9b8; }
.rl-first { position: absolute; top: -12px; background: var(--tomato); color: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 800; }
.rl-name { font-family: var(--font-display); font-weight: 800; font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-grade { font-size: 12.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; border: 2px solid var(--ink); background: color-mix(in srgb, var(--gc) 25%, var(--card)); }
.rl-start { text-align: center; display: grid; gap: 8px; justify-items: center; }
.rl-artist { display: flex; align-items: center; gap: 14px; }
.rl-artist b { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 6vw, 40px); }
.rl-start p { margin: 0; }
.rlobby .lobby-top { grid-template-columns: 1fr; justify-items: center; } .rlobby .lobby-top > span:first-child { display: none; } .rlobby .top-role { justify-self: center; grid-column: auto; }
@media (max-width: 640px) {
  .hb-left { padding-left: 26px; }
  .hb-right { padding-right: 26px; }
  .user-chip { padding: 5px 5px 5px 10px; gap: 6px; font-size: 14px; }
  .user-chip .uc-elo { display: none; }
  .user-chip .uc-name { max-width: 90px; }
  .mode-switch { gap: 7px; padding: 5px 10px 5px 5px; font-size: 13px; }
  .ms-track { width: 40px; height: 24px; }
  .ms-knob { width: 16px; height: 16px; }
  .mode-switch[aria-checked='true'] .ms-knob { transform: translateX(16px); }
}
@media (max-width: 360px) {
  .ms-label { display: none; }
}

/* ═════════════ ACCUEIL ALLÉGÉ (2 boutons, photo et slogan plus compacts) ═════════════ */
.play-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.play-choice .btn.xl { min-height: 58px; font-size: 17px; padding: 8px 12px; line-height: 1.15; text-wrap: balance; }
.btn.join-btn { background: var(--cobalt); color: #fff; }
.btn.join-btn:hover { background: #244e8f; }
.btn.join-btn.on { background: #1f447c; box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.25); transform: translate(2px, 2px); }
.car-card .code-form { animation: pop 0.25s ease both; }
.car-card .code-form .input.code { font-size: 20px; letter-spacing: 0.18em; text-transform: uppercase; }
.car-card .code-form .btn { min-height: 52px; }

/* Crédits photo discrets */
.sc-credit { top: 6px; right: 6px; font-size: 9px; line-height: 1.25; padding: 1px 5px; border-radius: 4px; opacity: 0.75; max-width: 60%; }
.sc-credit:hover, .sc-credit:focus-within { opacity: 1; }

/* Photo et « Avec qui … a collaboré ? » plus compacts */
.car-card .mode-media { aspect-ratio: 16 / 8.5; }
.sc-caption { left: 10px; bottom: 10px; right: 10px; gap: 4px 6px; }
.sc-caption span { font-size: 13px; padding: 2px 8px; }
.sc-caption b { font-size: clamp(19px, 5vw, 28px); padding: 2px 9px; }
.mode-media.typo-only .sc-caption b { font-size: clamp(26px, 7vw, 44px); }

/* Slogan plus petit */
.home-slogan { font-size: clamp(26px, 4.6vw, 54px); }
.home-hero { margin-top: 104px; }

/* Flèche « Ranked ? » / « Mode chill ? » : visible dans les deux modes */
.ranked-on .ranked-hint { display: block; }
.ranked-hint .rh-on { display: none; }
.ranked-on .ranked-hint .rh-off { display: none; }
.ranked-on .ranked-hint .rh-on { display: block; }
.ranked-on .ranked-hint { color: var(--forest); }

/* Rangs : écussons SVG */
.rank-svg { display: inline-block; vertical-align: middle; flex: none; filter: drop-shadow(1px 2px 0 rgba(30, 27, 22, 0.18)); }
.grade-badge { gap: 5px; padding: 2px 10px 2px 5px; }
.grade-badge.big { padding: 4px 14px 4px 8px; }
.uc-grade { display: inline-flex; }
.rl-grade { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 4px; }
.b-grade { display: inline-flex; align-items: center; gap: 4px; }
.gc-emoji { font-size: 0; }
.bm-who { display: inline-flex; align-items: center; gap: 8px; }
.grades-list li { grid-template-columns: auto minmax(0, 1fr) auto; }
.gl-icons { grid-area: e; display: flex; gap: 2px; align-items: flex-end; }

@media (max-width: 900px) {
  .home-hero { margin-top: 74px; }
}
@media (max-width: 640px) {
  .home-hero { margin-top: 14px; }
  .home-slogan { font-size: clamp(22px, 7vw, 30px); }
  .car-card .mode-media { aspect-ratio: 16 / 7.5; }
  .sc-caption { left: 8px; bottom: 8px; right: 8px; }
  .sc-caption span { font-size: 11.5px; padding: 1px 6px; border-width: 2px; }
  .sc-caption b { font-size: 18px; padding: 1px 7px; border-width: 2px; }
  .sc-credit { font-size: 8px; max-width: 70%; }
  .car-card .mode-body { padding: 14px 14px 16px; gap: 8px; }
  .car-card .mode-title { font-size: clamp(28px, 8vw, 40px); }
  .car-card .mode-desc { font-size: 14.5px; }
  .play-choice .btn.xl { min-height: 54px; font-size: 15.5px; }
  .grades-list li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'e e' 'n m' 'd d'; row-gap: 4px; }
}
@media (max-width: 360px) {
  .play-choice { grid-template-columns: 1fr; }
}

/* Téléphone : flèches du carrousel centrées sur la photo (ne cachent plus le titre) */
@media (max-width: 759px) {
  .car-arrow { top: calc(min(560px, 84vw) * 8.5 / 32 - 22px); width: 44px; height: 44px; font-size: 26px; }
}

/* ═════════════ PANNEAU ADMIN (/admin) ═════════════ */
.adm-top { flex-wrap: wrap; }
.adm-top .brand { margin-right: auto; }
.adm-title { font-family: var(--font-display); font-weight: 800; font-size: 22px; background: var(--ink); color: var(--paper); padding: 4px 14px; border-radius: 999px; }
.adm-live { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; color: var(--forest); }
.adm-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 0 rgba(63, 125, 90, 0.6); animation: admPulse 1.6s infinite; }
.adm-live.off { color: var(--bad); }
.adm-live.off .adm-dot { background: var(--bad); animation: none; }
@keyframes admPulse { 0% { box-shadow: 0 0 0 0 rgba(63, 125, 90, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(63, 125, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 125, 90, 0); } }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin: 6px 0 16px; }
.adm-stat { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 10px 12px; display: grid; gap: 1px; }
.adm-stat-i { font-size: 18px; }
.adm-stat b { font-family: var(--font-display); font-size: 26px; line-height: 1.1; }
.adm-stat span:last-child { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.adm-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.adm-tab { border: var(--bw) solid var(--ink); background: var(--card); border-radius: 999px; padding: 8px 16px; font: 700 15px var(--font); color: var(--ink); cursor: pointer; }
.adm-tab.on { background: var(--mustard); box-shadow: var(--shadow-sm); }
.adm-h { font-family: var(--font-display); font-size: 20px; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.adm-count { color: var(--muted); font-size: 16px; }
.adm-card { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 12px 14px; }
.adm-scroll { max-height: 460px; overflow: auto; }
.adm-empty { color: var(--muted); text-align: center; padding: 14px; margin: 0; }
.adm-cols { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .adm-cols { grid-template-columns: 1fr 1.4fr; } }
.adm-rooms { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.adm-room { background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 12px 14px; display: grid; gap: 6px; border-left: 8px solid var(--mustard); }
.adm-room.ranked { border-left-color: var(--tomato); }
.adm-room header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.adm-code { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: 0.08em; }
.adm-tag { font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--paper-2); }
.adm-tag.rk { background: var(--tomato); color: #fff; }
.adm-close { min-height: 34px; padding: 4px 12px; }
.adm-join { margin-left: auto; min-height: 34px; padding: 4px 12px; text-decoration: none; }
.adm-phase, .adm-now { margin: 0; font-size: 14px; }
.adm-players { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.adm-pl { display: flex; align-items: center; gap: 8px; font-size: 14.5px; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 4px 8px; }
.adm-pl.out .adm-pname { text-decoration: line-through; color: var(--muted); }
.adm-pl.left { opacity: 0.55; }
.adm-pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.adm-pname small { color: var(--muted); font-weight: 500; }
.adm-pdot { width: 9px; height: 9px; border-radius: 50%; background: #c9c1b3; flex: none; }
.adm-pdot.on { background: var(--forest); }
.adm-ppts { font-weight: 700; font-size: 13px; color: var(--ink-2); }
.adm-kick { border: 0; background: transparent; color: var(--bad); font-weight: 800; cursor: pointer; font-size: 15px; padding: 2px 6px; border-radius: 6px; }
.adm-kick:hover { background: #f2c4b6; }
.adm-timer { font-weight: 800; color: var(--tomato); }
.adm-list { list-style: none; margin: 0; padding: 0; display: grid; }
.adm-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 7px 2px; border-bottom: 1.5px dashed var(--line); font-size: 14px; }
.adm-list li:last-child { border-bottom: 0; }
.adm-who { flex: 1; min-width: 120px; }
.adm-log li { display: grid; grid-template-columns: auto 1fr; }
.adm-log li > span:last-child { grid-column: 1 / -1; word-break: break-word; }
.adm-search { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.adm-search .input { max-width: 420px; }
.adm-accounts { display: grid; gap: 8px; }
.adm-acc { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius-sm); padding: 8px 14px; cursor: pointer; font: inherit; color: var(--ink); box-shadow: var(--shadow-sm); }
.adm-acc:hover { background: #fff3d6; }
.adm-acc.banned { opacity: 0.7; background: #f6e2dc; }
.adm-acc-b { flex: none; display: inline-flex; }
.adm-acc-main { flex: 1; min-width: 0; display: grid; }
.adm-acc-main small { color: var(--muted); font-size: 13px; }
.adm-acc-pr { font-family: var(--font-display); font-weight: 800; font-size: 18px; white-space: nowrap; }
.adm-acc-flags { display: flex; gap: 4px; }
.adm-pill { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--paper-2); }
.adm-pill.on { background: #d5e2cb; color: var(--forest); }
.adm-pill.bad { background: #f2c4b6; color: var(--bad); }
.adm-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.adm-row .input { flex: 1; min-width: 140px; min-height: 44px; padding: 8px 12px; font-size: 16px; }
.adm-row.end { justify-content: flex-end; }
.adm-announce textarea { min-height: 96px; resize: vertical; margin-top: 8px; font-family: var(--font); }
.adm-announce .adm-row { justify-content: space-between; }
.adm-modal { position: fixed; inset: 0; z-index: 60; background: rgba(30, 27, 22, 0.45); display: grid; place-items: center; padding: 16px; }
.adm-modal[hidden] { display: none; }
.adm-modal-box { position: relative; width: min(560px, 100%); max-height: 92dvh; overflow: auto; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; animation: pop 0.2s ease both; }
.adm-modal-box h2 { font-family: var(--font-display); margin: 0 0 4px; font-size: 24px; }
.adm-x { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--ink); }
.adm-acc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; padding-right: 26px; }
.adm-acc-head p { margin: 0; }
.adm-sec { border-top: 1.5px dashed var(--line); padding-top: 12px; margin-top: 12px; }
.adm-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.adm-quick .btn { min-height: 36px; padding: 4px 12px; }
.adm-mini { display: grid; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); flex: 1; min-width: 110px; }
.adm-mini .input { min-height: 42px; padding: 6px 10px; font-size: 16px; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bad-text { color: var(--bad); }
.adm-noscroll { overflow: hidden; }
.admin-link { display: inline-flex; align-items: center; gap: 6px; }
.adm-shield { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: var(--bw) solid var(--ink); border-radius: 50%; background: var(--ink); color: var(--paper); text-decoration: none; font-size: 20px; box-shadow: var(--shadow-sm); flex: none; }
.adm-shield:hover { background: var(--mustard); }
@media (max-width: 600px) {
  .adm-title { font-size: 18px; }
  .adm-stat b { font-size: 22px; }
  .adm-rooms { grid-template-columns: 1fr; }
  .adm-acc { flex-wrap: wrap; }
}
.auth-area { display: flex; align-items: center; gap: 8px; min-width: 0; }
@media (max-width: 600px) { .adm-shield { width: 38px; height: 38px; font-size: 17px; } }
.admin-body .toasts { z-index: 70; }
@media (max-width: 600px) {
  .adm-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .adm-stat { padding: 6px 6px 7px; border-radius: 10px; text-align: center; box-shadow: 2px 2px 0 var(--ink); }
  .adm-stat-i { display: none; }
  .adm-stat b { font-size: 17px; }
  .adm-stat span:last-child { font-size: 10.5px; line-height: 1.15; }
  .adm-tab { padding: 6px 12px; font-size: 14px; }
}

/* ═════════════ CLASSEMENT EN DIRECT (fenêtre) ═════════════ */
.ranked-play .lb-open { width: 100%; margin-top: 10px; background: var(--mustard); }
.queue-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ranked-card .lb-open { margin-top: 6px; background: var(--mustard); }
.lb-noscroll { overflow: hidden; }
.lb-sheet { position: fixed; inset: 0; z-index: 50; background: rgba(30, 27, 22, 0.5); display: grid; place-items: center; padding: 14px; animation: fadeIn 0.2s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lb-box { width: min(540px, 100%); max-height: min(88dvh, 820px); display: flex; flex-direction: column; background: var(--card); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; animation: pop 0.22s ease both; }
.lb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 18px 10px; background: var(--mustard); border-bottom: var(--bw) solid var(--ink); }
.lb-head h2 { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 1.1; }
.lb-live { margin: 4px 0 0; display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.lb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--forest); animation: admPulse 1.6s infinite; flex: none; }
.lb-sheet.off .lb-dot { background: var(--bad); animation: none; }
.lb-x { border: var(--bw) solid var(--ink); background: var(--card); width: 40px; height: 40px; border-radius: 50%; font-size: 17px; cursor: pointer; flex: none; color: var(--ink); }
.lb-me { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: #fff3d6; border-bottom: 1.5px dashed var(--line); min-height: 58px; font-size: 14px; }
.lb-me-rank { font-family: var(--font-display); font-weight: 800; font-size: 20px; min-width: 40px; }
.lb-me-txt { flex: 1; min-width: 0; display: grid; }
.lb-me-txt small, .lb-name small { color: var(--muted); font-size: 12.5px; }
.lb-list { list-style: none; margin: 0; padding: 6px 10px; overflow: auto; flex: 1; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 12px; }
.lb-row + .lb-row { border-top: 1.5px dashed var(--line); }
.lb-row.me { background: #dfe8f6; outline: 2px solid var(--cobalt); outline-offset: -2px; }
.lb-row.up { animation: lbFlash 1.6s ease; }
@keyframes lbFlash { 0%, 40% { background: #d5e2cb; } 100% { background: transparent; } }
.lb-rank { min-width: 30px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.lb-name { flex: 1; min-width: 0; display: grid; }
.lb-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name em { font-style: normal; color: var(--cobalt); font-size: 13px; }
.lb-pr { font-family: var(--font-display); font-weight: 800; font-size: 17px; white-space: nowrap; }
.lb-gain { font-weight: 800; font-size: 13px; color: var(--forest); background: #d5e2cb; border-radius: 999px; padding: 1px 8px; }
.lb-empty { padding: 24px 10px; text-align: center; color: var(--muted); }
.lb-foot { margin: 0; padding: 10px 18px 14px; border-top: 1.5px dashed var(--line); font-size: 14px; font-weight: 700; }
@media (max-width: 600px) {
  .lb-sheet { padding: 0; place-items: end stretch; }
  .lb-box { width: 100%; max-height: 92dvh; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }
  .lb-head h2 { font-size: 21px; }
}
.lb-list { position: relative; }
.queue-actions .lb-open { background: var(--mustard); }

/* ═════════════ « PRÊT » DANS LE SALON ═════════════ */
.btn.ready-btn { background: var(--cobalt); color: #fff; }
.btn.ready-btn.on { background: #d5e2cb; color: var(--forest); }
.lp.is-ready .lp-tag { color: var(--forest); }
.lp.is-ready .lp-av { outline: 3px solid var(--forest); outline-offset: 2px; border-radius: 50%; }

/* ═════════════ ANNONCES (haut de l'écran, au milieu) ═════════════ */
.announces { position: fixed; top: calc(10px + var(--safe-top)); left: 50%; transform: translateX(-50%); z-index: 80; width: min(94vw, 560px); display: grid; gap: 8px; pointer-events: none; }
.announce { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; background: var(--mustard); border: var(--bw) solid var(--ink); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 10px 10px 10px 14px; animation: anIn 0.35s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.announce.out { opacity: 0; transform: translateY(-10px); transition: all 0.3s; }
@keyframes anIn { from { opacity: 0; transform: translateY(-16px) scale(0.97); } to { opacity: 1; transform: none; } }
.an-ico { font-size: 22px; line-height: 1.2; }
.an-body { flex: 1; min-width: 0; display: grid; gap: 1px; font-size: 15px; font-weight: 600; word-break: break-word; }
.an-body b { font-family: var(--font-display); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.an-x { border: 0; background: transparent; font-size: 16px; font-weight: 800; cursor: pointer; color: var(--ink); padding: 2px 6px; border-radius: 8px; }
.an-x:hover { background: rgba(0, 0, 0, 0.08); }
.adm-room.ranked .adm-close { margin-left: auto; }
.adm-pill.cr { background: #e6dcf7; color: #5b2fa0; }
.adm-pill.mod { background: #dfe8f6; color: var(--cobalt); }
.acc-role { margin: 6px 0 0; font-weight: 600; }
.adm-tab[hidden] { display: none; }
