/* party.css — Growly Party (plateau tablette + écran joueur). Autonome,
   gros éléments tactiles, thème clair/sombre. Hors du reste de Growly. */

:root {
  --pt-bg: #f4f1ea; --pt-card: #ffffff; --pt-ink: #1d2433; --pt-muted: #6b7280;
  --pt-accent: #6d5bd0; --pt-accent2: #11a37f; --pt-ok: #11a37f; --pt-ko: #e0556b;
  --pt-line: #e5e1d8; --pt-shadow: 0 8px 30px rgba(30,30,60,.10);
}
:root:not([data-theme="light"]) { }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pt-bg: #15171c; --pt-card: #1e2128; --pt-ink: #eef0f4; --pt-muted: #9aa3b2;
    --pt-accent: #9887f0; --pt-accent2: #2bd4a8; --pt-line: #2b2f38;
    --pt-shadow: 0 8px 30px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --pt-bg: #15171c; --pt-card: #1e2128; --pt-ink: #eef0f4; --pt-muted: #9aa3b2;
  --pt-accent: #9887f0; --pt-accent2: #2bd4a8; --pt-line: #2b2f38;
  --pt-shadow: 0 8px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
:root { --amb: #6d5bd0; }   /* couleur d'ambiance (change selon le module) */
body {
  background-color: #0e1830; color: var(--pt-ink); min-height: 100vh;
  /* Image de fond « jeu de plateau » + voile sombre pour garder le texte lisible */
  background-image: linear-gradient(rgba(8,14,30,.42), rgba(8,14,30,.58)), url("../img/fond1.jpg");
  background-size: cover; background-position: center; background-repeat: no-repeat; background-attachment: fixed;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
/* Halo d'ambiance animé discret (couleur = module en cours), par-dessus l'image */
body::before {
  content: ""; position: fixed; inset: -25%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 22% 22%, color-mix(in srgb, var(--amb) 12%, transparent), transparent 46%),
    radial-gradient(circle at 80% 78%, color-mix(in srgb, var(--amb) 9%, transparent), transparent 48%);
  animation: amb-drift 18s ease-in-out infinite alternate;
  transition: background 1s ease; mix-blend-mode: screen;
}
@keyframes amb-drift { 0% { transform: translate(-3%, -2%) scale(1); } 100% { transform: translate(3%, 2%) scale(1.08); } }

/* Confettis (victoire) */
.pt-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.pt-confetti i { position: absolute; top: -6%; width: 11px; height: 17px; border-radius: 2px; opacity: .92; animation-name: confetti-fall; animation-timing-function: cubic-bezier(.3,.6,.5,1); animation-iteration-count: 1; animation-fill-mode: forwards; }
@keyframes confetti-fall { to { transform: translateY(112vh) rotate(680deg); opacity: .8; } }
h1, h2 { margin: 0 0 .4em; line-height: 1.15; }
b { font-weight: 700; }

/* Boutons communs */
.pt-btn, .pp-btn {
  display: inline-block; border: none; cursor: pointer; border-radius: 14px;
  background: var(--pt-accent); color: #fff; font-weight: 700; font-size: 18px;
  padding: 14px 24px; text-decoration: none; transition: transform .06s ease, filter .15s;
}
.pt-btn:hover, .pp-btn:hover { filter: brightness(1.06); }
.pt-btn:active, .pp-btn:active { transform: scale(.97); }
.pt-btn[disabled], .pp-btn[disabled] { opacity: .45; cursor: default; }
.pt-big, .pp-big { font-size: 22px; padding: 18px 32px; width: 100%; max-width: 420px; }
.pt-ghost { background: transparent; color: var(--pt-accent); border: 2px solid var(--pt-accent); padding: 8px 16px; font-size: 15px; }
.pt-muted, .pp-hint { color: var(--pt-muted); }
.pt-input, .pp-input {
  width: 100%; max-width: 480px; border: 2px solid var(--pt-line); border-radius: 12px;
  background: var(--pt-card); color: var(--pt-ink); font-size: 18px; padding: 14px 16px; margin: 6px 0 14px;
}
.pt-input:focus, .pp-input:focus { outline: none; border-color: var(--pt-accent); }

/* ───────── PLATEAU (tablette) ───────── */
#board { max-width: 1100px; margin: 0 auto; padding: 28px 24px 48px; }
.pt-center { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 16px; }
.pt-center h1 { font-size: clamp(28px, 5vw, 52px); }
.pt-spin { width: 46px; height: 46px; border: 5px solid var(--pt-line); border-top-color: var(--pt-accent); border-radius: 50%; margin: 24px auto; animation: pt-rot 1s linear infinite; }
@keyframes pt-rot { to { transform: rotate(360deg); } }

.pt-lobby { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.pt-join, .pt-players, .pt-ctrl { background: var(--pt-card); border-radius: 20px; padding: 24px; box-shadow: var(--pt-shadow); }
.pt-ctrl { grid-column: 1 / -1; text-align: center; }
.pt-url { font-size: 20px; font-weight: 700; margin: 4px 0; }
.pt-code { font-size: clamp(56px, 12vw, 120px); font-weight: 800; letter-spacing: .12em; color: var(--pt-accent); text-align: center; margin-top: 8px; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.pt-chip { background: var(--pt-bg); border: 1px solid var(--pt-line); border-radius: 999px; padding: 6px 14px; font-weight: 600; }

.pt-board { display: flex; flex-direction: column; gap: 8px; }
.pt-row { display: grid; grid-template-columns: 28px 1fr 2fr auto; align-items: center; gap: 10px; }
.pt-rank { color: var(--pt-muted); font-weight: 700; text-align: center; }
.pt-name { font-weight: 600; }
.pt-bar { background: var(--pt-bg); border-radius: 999px; height: 14px; overflow: hidden; }
.pt-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--pt-accent), var(--pt-accent2)); border-radius: 999px; }
.pt-pts { font-weight: 800; min-width: 44px; text-align: right; }

/* Question (plateau) */
.pt-qhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pt-qnum { color: var(--pt-muted); font-weight: 700; }
.pt-timer { position: relative; width: 64px; height: 64px; }
.pt-timer svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.pt-ring-bg { fill: none; stroke: var(--pt-line); stroke-width: 3; }
.pt-ring { fill: none; stroke: var(--pt-accent); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.pt-timer b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; }
.pt-qtext { font-size: clamp(26px, 4.4vw, 46px); margin: 8px 0 24px; }
.pt-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pt-choice { display: flex; align-items: center; gap: 14px; background: var(--pt-card); border: 2px solid var(--pt-line); border-radius: 16px; padding: 20px; font-size: clamp(18px, 2.4vw, 26px); box-shadow: var(--pt-shadow); }
.pt-letter { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; background: var(--pt-accent); color: #fff; font-weight: 800; }
.pt-answered { text-align: center; margin-top: 22px; font-size: 20px; font-weight: 600; display: flex; gap: 16px; align-items: center; justify-content: center; }

/* Révélation (plateau) */
.pt-reveal h1 { font-size: clamp(24px, 3.6vw, 40px); color: var(--pt-ok); }
.pt-explain { font-size: 18px; color: var(--pt-muted); margin: -4px 0 18px; }
.pt-deltas { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.pt-delta { display: flex; gap: 10px; align-items: center; background: var(--pt-card); border-radius: 12px; padding: 10px 16px; font-weight: 600; box-shadow: var(--pt-shadow); }
.pt-delta b { font-size: 20px; }
.pt-delta.ok b { color: var(--pt-ok); }
.pt-delta.ko b { color: var(--pt-ko); }
.pt-reveal .pt-btn, .pt-end .pt-btn { margin-top: 20px; }
.pt-trophy { font-size: 92px; }
.pt-end h1 { font-size: clamp(30px, 6vw, 60px); }

/* ───────── JOUEUR (téléphone) ───────── */
#app { max-width: 560px; margin: 0 auto; padding: 16px; min-height: 100dvh; display: flex; flex-direction: column; justify-content: safe center; position: relative; }
.pp-chip { position: absolute; top: 10px; right: 12px; z-index: 3; display: flex; gap: 10px; align-items: center; background: var(--pt-card); border: 1px solid var(--pt-line); border-radius: 999px; padding: 6px 14px; font-weight: 600; }
.pp-chip b { color: var(--pt-accent); }
.pp-join { text-align: center; padding-top: 8vh; }
.pp-join h1 { font-size: 34px; }
.pp-join label { display: block; text-align: left; max-width: 480px; margin: 8px auto 0; font-weight: 600; color: var(--pt-muted); }
.pp-code { text-align: center; letter-spacing: .3em; font-size: 30px; font-weight: 800; text-transform: uppercase; }
.pp-err { color: var(--pt-ko); font-weight: 600; }

.pp-q { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.pp-qnum { color: var(--pt-muted); font-weight: 700; margin: 0 0 6px; }
.pp-qtext { font-size: 24px; margin: 0 0 18px; }
.pp-choices { display: flex; flex-direction: column; gap: 12px; }
.pp-choice { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; background: var(--pt-card); border: 2px solid var(--pt-line); border-radius: 16px; padding: 18px; font-size: 19px; color: var(--pt-ink); cursor: pointer; }
.pp-choice:active { transform: scale(.98); }
.pp-choice.sel { border-color: var(--pt-accent); background: color-mix(in srgb, var(--pt-accent) 14%, var(--pt-card)); }
.pp-choice[disabled] { opacity: .6; }
.pp-letter { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 9px; background: var(--pt-accent); color: #fff; font-weight: 800; }
.pp-sent { text-align: center; color: var(--pt-ok); font-weight: 700; font-size: 18px; margin-top: 18px; }
.pp-hint { text-align: center; }

.pp-wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
.pp-pulse { width: 54px; height: 54px; border-radius: 50%; background: var(--pt-accent); animation: pp-pulse 1.2s ease-in-out infinite; }
@keyframes pp-pulse { 0%,100% { transform: scale(.8); opacity: .5; } 50% { transform: scale(1); opacity: 1; } }

.pp-reveal, .pp-end { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; border-radius: 18px; }
.pp-reveal.ok { background: color-mix(in srgb, var(--pt-ok) 12%, transparent); }
.pp-reveal.ko { background: color-mix(in srgb, var(--pt-ko) 12%, transparent); }
.pp-big-emoji { font-size: 84px; animation: pp-burst .5s cubic-bezier(.2,1.5,.4,1); }
.pp-reveal.ko .pp-big-emoji { animation: pp-shake .5s ease; }
.pp-delta { animation: pp-burst .5s .1s both cubic-bezier(.2,1.5,.4,1); }
@keyframes pp-burst { 0% { transform: scale(0); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes pp-shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.pp-reveal.ok h2 { color: var(--pt-ok); }
.pp-reveal.ko h2 { color: var(--pt-ko); }
.pp-delta { font-size: 28px; font-weight: 800; }
.pp-correct { color: var(--pt-muted); font-size: 17px; }

@media (max-width: 720px) {
  .pt-lobby { grid-template-columns: 1fr; }
  .pt-choices { grid-template-columns: 1fr; }
}

/* ═══════════ PLATEAU CIRCULAIRE (tablette à plat) ═══════════ */
#board { max-width: none; margin: 0; padding: 0; }

/* Scène carrée centrée → le cercle reste rond quelle que soit la tablette */
.pt-ring-board {
  position: relative; width: 100vw; height: 100dvh; margin: 0; overflow: hidden;
}

/* Centre : code+commandes (lobby) ou chrono+bouton (jeu) */
.pt-core, .pt-core2 {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; width: 46%; max-width: 420px;
}
.pt-core .pt-code { font-size: clamp(40px, 9vw, 96px); margin: 2px 0; }
.pt-core .pt-url { font-size: 16px; font-weight: 700; margin: 0; word-break: break-all; }
.pt-core2 { width: auto; }
.pt-answered { font-size: 22px; font-weight: 800; }

/* Sièges du cercle (lobby) — pastilles tournées vers le joueur */
.pt-seat {
  position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 108px; height: 72px; border-radius: 16px; cursor: pointer;
  border: 2px dashed var(--pt-line); background: var(--pt-card); color: var(--pt-ink);
  font-size: 15px; line-height: 1.1; padding: 4px;
}
.pt-seat small { color: var(--pt-muted); font-size: 11px; margin-top: 2px; }
.pt-seat.empty { color: var(--pt-accent); font-size: 26px; font-weight: 800; border-style: dashed; }
.pt-seat.taken { border-style: solid; border-color: var(--pt-accent); }
.pt-seat.taken b { font-size: 17px; }

/* Badges score (jeu) — orientés vers chaque joueur */
.pt-badge {
  position: absolute; display: flex; flex-direction: column; align-items: center;
  min-width: 128px; padding: 12px 20px; border-radius: 18px;
  background: var(--pt-card); border: 2px solid var(--pt-line); box-shadow: var(--pt-shadow);
}
.pt-badge.is-ans { border-color: var(--pt-ok); }
.pt-badge b { font-size: 24px; }
.pt-badge span { font-size: 22px; color: var(--pt-accent); font-weight: 800; }
.pt-badge i { font-style: normal; font-weight: 800; font-size: 20px; }
.pt-badge i.up { color: var(--pt-ok); }
.pt-badge i.dn { color: var(--pt-ko); }
.pt-badge i.ok { color: var(--pt-ok); }

/* Question répétée vers les 4 côtés */
.pt-quad { position: absolute; width: 40%; }
.pt-quad.q-bottom { left: 50%; top: 73%; transform: translate(-50%, -50%) rotate(0deg); }
.pt-quad.q-top    { left: 50%; top: 27%; transform: translate(-50%, -50%) rotate(180deg); }
.pt-quad.q-left   { left: 27%; top: 50%; transform: translate(-50%, -50%) rotate(90deg); }
.pt-quad.q-right  { left: 73%; top: 50%; transform: translate(-50%, -50%) rotate(270deg); }
.pt-qcard { text-align: center; }
.pt-qcard .pt-qnum { color: var(--pt-muted); font-weight: 700; font-size: 12px; }
.pt-qcard .pt-qtext { font-size: clamp(14px, 1.9vw, 19px); font-weight: 600; margin: 3px 0 6px; }
.pt-qcard .pt-ch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pt-qcard .pt-c { background: var(--pt-bg); border-radius: 8px; padding: 5px 8px; font-size: clamp(11px, 1.4vw, 14px); text-align: left; }
.pt-qcard .pt-c b { color: var(--pt-accent); margin-right: 6px; }
.pt-qcard .pt-ok-t { font-size: clamp(15px, 2.2vw, 22px); font-weight: 700; color: var(--pt-ok); }
.pt-qcard .pt-expl { font-size: 13px; color: var(--pt-muted); margin-top: 4px; }

/* Classement */
.pt-lb { display: flex; flex-direction: column; gap: 8px; max-width: 520px; margin: 10px auto 0; }
.pt-lbrow { display: grid; grid-template-columns: 26px 1fr 2fr auto; align-items: center; gap: 10px; }
.pt-lb .pt-rank { color: var(--pt-muted); font-weight: 700; text-align: center; }
.pt-lb .pt-name { font-weight: 600; }
.pt-lb .pt-bar { background: var(--pt-card); border-radius: 999px; height: 13px; overflow: hidden; }
.pt-lb .pt-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--pt-accent), var(--pt-accent2)); }
.pt-lb .pt-pts { font-weight: 800; min-width: 42px; text-align: right; }

/* Sélecteur de pseudo pour un siège */
.pt-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 50; }
.pt-sheet { background: var(--pt-card); border-radius: 18px; padding: 24px; width: min(92vw, 420px); box-shadow: var(--pt-shadow); text-align: center; }
.pt-sheet h3 { margin: 0 0 14px; }
.pt-pool { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 16px; }
.pt-pool button { border: 2px solid var(--pt-accent); background: var(--pt-card); color: var(--pt-ink); border-radius: 999px; padding: 10px 18px; font-size: 16px; font-weight: 600; cursor: pointer; }

/* Centre « théâtre » (chrono / réponse) — ressort au milieu du cercle */
.pt-core2.theater { background: var(--pt-card); border-radius: 22px; padding: 22px 28px; box-shadow: var(--pt-shadow); width: min(42%, 380px); }
.pt-qmeta { color: var(--pt-muted); font-weight: 700; font-size: 14px; }
.pt-tiny { font-size: 12px; margin: 2px 0 0; }
.pt-reveal-ans { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pt-reveal-ans .pt-tag { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pt-ok); }
.pt-reveal-ans b { font-size: clamp(22px, 3vw, 34px); color: var(--pt-ink); }
.pt-reveal-ans + .pt-expl { font-size: 13px; color: var(--pt-muted); text-align: center; margin-top: -2px; }

/* Couronne du meneur + animation du delta */
.pt-badge { transition: border-color .2s, box-shadow .2s; }
.pt-badge.is-ans { box-shadow: 0 0 0 3px color-mix(in srgb, var(--pt-ok) 45%, transparent), var(--pt-shadow); }
.pt-badge.is-leader { border-color: var(--pt-accent); border-width: 3px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--pt-accent) 22%, transparent), var(--pt-shadow); }
.pt-crown { position: absolute; top: -20px; font-style: normal; color: #e8b50a; font-size: 26px; }
.pt-badge i.fx { animation: pt-pop .7s cubic-bezier(.2,1.4,.4,1); }
/* Couleur par joueur (--pc) : badge + nom + siège lobby (le leader garde l'accent) */
.pt-badge { border-color: var(--pc, var(--pt-line)); }
.pt-badge b { color: var(--pc, inherit); }
.pt-seat.taken.ro { border-color: var(--pc, var(--pt-accent)); }
.pt-seat.taken.ro b { color: var(--pc, inherit); }
@keyframes pt-pop { 0% { transform: scale(0); opacity: 0; } 55% { transform: scale(1.5); opacity: 1; } 100% { transform: scale(1); } }

/* Barre d'aperçu */
.pt-preview { position: fixed; top: 0; left: 0; right: 0; z-index: 40; background: #d8a500; color: #1b1500; font-weight: 700; font-size: 13px; padding: 4px 10px; display: flex; gap: 8px; align-items: center; justify-content: center; }
.pt-preview button { border: none; background: rgba(0,0,0,.18); color: #1b1500; border-radius: 6px; padding: 3px 10px; cursor: pointer; font-weight: 700; }

/* Missions — bannière plateau */
.pt-missions { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 2px; }
.pt-mission { background: color-mix(in srgb, var(--pt-accent) 12%, var(--pt-card)); border-radius: 12px; padding: 8px 12px; font-size: 15px; animation: pt-pop .5s; }
.pt-m-rew { color: var(--pt-ok); font-weight: 800; }
.pt-m-steal { color: var(--pt-ko); font-weight: 700; font-size: 13px; }

/* Missions — téléphone (carte bien visible) */
.pp-mission { background: color-mix(in srgb, var(--pt-accent) 14%, var(--pt-card)); border: 2px solid var(--pt-accent); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.pp-mission-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.pp-mission-h > span:first-child { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--pt-accent); }
.pp-mission-r { background: var(--pt-accent); color: #fff; font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 999px; }
.pp-mission-ok { color: var(--pt-ok); font-weight: 800; font-size: 13px; }
.pp-mission-t { font-size: 17px; font-weight: 600; line-height: 1.25; }
.pp-mission.done { border-color: var(--pt-ok); background: color-mix(in srgb, var(--pt-ok) 12%, var(--pt-card)); }
.pp-m { border-radius: 12px; padding: 10px 14px; font-weight: 700; margin-top: 12px; font-size: 16px; animation: pp-burst .5s cubic-bezier(.2,1.5,.4,1); }
.pp-m.win { background: color-mix(in srgb, var(--pt-ok) 15%, transparent); color: var(--pt-ok); }
.pp-m.lose { background: color-mix(in srgb, var(--pt-ko) 15%, transparent); color: var(--pt-ko); }

/* ═══════════ RÉFLEXE ═══════════ */
/* Menu de modules (lobby) */
.pt-modbtns { display: flex; gap: 12px; }
.pt-modbtns .pt-btn { flex: 1; }
.pt-btn.pt-accent2 { background: var(--pt-accent2); }

/* Plateau — signal */
.rx-core { min-width: min(46%, 440px); }
.rx-signal { font-size: clamp(34px, 7vw, 72px); font-weight: 800; padding: 18px 10px; border-radius: 16px; }
.rx-signal.rx-wait { color: var(--pt-muted); }
.rx-signal.rx-go { color: #fff; background: var(--pt-ko); animation: rx-flash .4s steps(1) infinite; }
@keyframes rx-flash { 0%,100% { background: var(--pt-ko); } 50% { background: var(--pt-accent); } }

/* Plateau — tableau des temps */
.rx-results { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; max-width: 420px; }
.rx-row { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.rx-row b { flex: 1; text-align: left; }
.rx-ms { font-variant-numeric: tabular-nums; font-weight: 700; }
.rx-false { color: var(--pt-ko); font-weight: 700; }
.rx-slow { color: var(--pt-muted); }
.rx-row i.fx.up { color: var(--pt-ok); } .rx-row i.fx.dn { color: var(--pt-ko); }
.rx-row i { font-style: normal; font-weight: 800; min-width: 34px; text-align: right; }

/* Téléphone — gros bouton tap */
.rx-play { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.rx-meta { color: var(--pt-muted); font-weight: 700; }
.rx-hit { width: min(80vw, 320px); height: min(80vw, 320px); border-radius: 50%; border: none; font-size: 40px; font-weight: 800; color: #fff; cursor: pointer; }
.rx-hit.wait { background: var(--pt-muted); }
.rx-hit.go { background: var(--pt-ko); animation: rx-pulse .5s ease-in-out infinite; }
.rx-hit.done { background: var(--pt-ok); }
.rx-hit.false { background: var(--pt-ko); }
@keyframes rx-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* QR code du lobby (fond blanc → scanne aussi en thème sombre) */
.pt-qr { display: block; width: clamp(150px, 23vw, 230px); height: auto; margin: 2px auto 6px; background: #fff; padding: 10px; border-radius: 14px; image-rendering: pixelated; box-shadow: var(--pt-shadow); }

/* ═══════════ PLACEMENT (table + orientation) ═══════════ */
/* Bandes d'orientation de la tablette (haut = teal, bas = corail) — repère partagé avec les téléphones */
.pt-ring-board::before, .pt-ring-board::after { content: ""; position: absolute; left: 16%; right: 16%; height: 9px; z-index: 0; }
.pt-ring-board::before { top: 0; background: var(--pt-accent2); border-radius: 0 0 9px 9px; }
.pt-ring-board::after { bottom: 0; background: var(--pt-ko); border-radius: 9px 9px 0 0; }
.pt-seat.ro { cursor: default; border-style: solid; }
.pt-seat.empty.ro { border-style: dashed; font-size: 15px; color: var(--pt-muted); }

/* Table imaginaire (téléphone) */
.tp-title { text-align: center; font-weight: 600; font-size: 18px; margin: 4px 0 12px; }
.tp-table { position: relative; width: min(86vw, 360px); aspect-ratio: 1 / 1; margin: 0 auto 10px; }
.tp-tablet { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46%; height: 30%; background: var(--pt-card); border: 1px solid var(--pt-line); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--pt-muted); font-weight: 700; }
.tp-band { position: absolute; left: 14%; right: 14%; height: 7px; border-radius: 4px; }
.tp-band.top { top: -4px; background: var(--pt-accent2); }
.tp-band.bot { bottom: -4px; background: var(--pt-ko); }
.tp-seat { position: absolute; transform: translate(-50%, -50%); min-width: 58px; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; font-size: 13px; line-height: 1.1; padding: 4px 6px; border: 2px solid var(--pt-line); background: var(--pt-card); color: var(--pt-ink); font-family: inherit; }
.tp-seat.empty { border-style: dashed; color: var(--pt-accent); font-size: 28px; font-weight: 800; cursor: pointer; }
.tp-seat.me { border-color: var(--pt-accent); background: color-mix(in srgb, var(--pt-accent) 16%, var(--pt-card)); cursor: pointer; }
.tp-seat.me small { font-size: 10px; color: var(--pt-accent); margin-top: 2px; }
.tp-seat.other { color: var(--pt-muted); }
.tp-c-top { color: var(--pt-accent2); }
.tp-c-bot { color: var(--pt-ko); }

/* ═══════════ DESSIN ═══════════ */
.dz-board { max-width: 760px; margin: 0 auto; padding: 14px 16px; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.dz-head { font-size: 22px; font-weight: 600; display: flex; gap: 14px; align-items: center; }
.dz-timer, .dz-t { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--pt-accent); }
.dz-canvas { width: min(60vh, 70vw, 540px); aspect-ratio: 1 / 1; background: #fff; border: 2px solid var(--pt-line); border-radius: 14px; color: #1d2433; box-shadow: var(--pt-shadow); }
.dz-feed { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 26px; max-width: 680px; }
.dz-guess { background: var(--pt-card); border: 1px solid var(--pt-line); border-radius: 999px; padding: 4px 12px; font-size: 15px; }
.dz-guess.ok { background: color-mix(in srgb, var(--pt-ok) 18%, var(--pt-card)); border-color: var(--pt-ok); color: var(--pt-ok); font-weight: 700; }
.dz-empty { color: var(--pt-muted); }
.dz-scores { display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center; font-size: 14px; color: var(--pt-muted); }
.dz-scores b { color: var(--pt-ink); }
.dz-reveal { font-size: 26px; font-weight: 600; } .dz-reveal b { color: var(--pt-ok); }
.dz-sub b { color: var(--pt-ok); }

/* Téléphone */
.dz-play { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.dz-word-box { font-size: 16px; font-weight: 600; text-align: center; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.dz-word-box #dz-word { font-size: 24px; font-weight: 800; color: var(--pt-accent); letter-spacing: .05em; }
.dz-canvas-draw { width: min(92vw, 440px); aspect-ratio: 1 / 1; background: #fff; border: 2px solid var(--pt-accent); border-radius: 14px; touch-action: none; color: #1d2433; cursor: crosshair; }
.dz-canvas-view { width: min(92vw, 440px); aspect-ratio: 1 / 1; background: #fff; border: 2px solid var(--pt-line); border-radius: 14px; color: #1d2433; }
.dz-tools { display: flex; gap: 10px; }
.dz-guessrow { display: flex; gap: 8px; width: min(92vw, 440px); }
.dz-guessrow .pp-input { margin: 0; flex: 1; }
.dz-guessrow .pp-btn { padding: 12px 18px; font-size: 16px; }
.dz-play.guesser .dz-feed { flex-direction: column; align-items: stretch; width: min(92vw, 440px); }

/* ═══════════ MEMORY ═══════════ */
.mm-board { max-width: 720px; margin: 0 auto; padding: 14px 16px; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.mm-head { font-size: 24px; font-weight: 600; display: flex; gap: 14px; align-items: center; }
.mm-target { font-size: 32px; }
.mm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mm-cell { width: min(13vw, 100px); aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; font-size: clamp(28px, 5vw, 50px); border-radius: 14px; background: var(--pt-accent); color: #fff; box-shadow: var(--pt-shadow); }
.mm-cell.up { background: var(--pt-card); color: var(--pt-ink); border: 2px solid var(--pt-line); }
/* Téléphone */
.mm-play { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; width: 100%; }
.mm-tbanner { font-size: 18px; font-weight: 600; text-align: center; }
.mm-grid.phone { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mm-grid.phone .mm-cell { width: min(26vw, 104px); font-size: clamp(26px, 9vw, 44px); border: none; font-family: inherit; }
.mm-grid.phone .mm-cell.tap { cursor: pointer; }
.mm-grid.phone .mm-cell.tap:active { transform: scale(.95); }
.mm-grid.phone .mm-cell.mine { background: var(--pt-ok); }

/* ═══════════ BLIND TEST ═══════════ */
.bl-board { max-width: 720px; margin: 0 auto; padding: 14px 16px; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.bl-wave { font-size: clamp(40px, 8vw, 72px); letter-spacing: .12em; animation: bl-pulse 1.2s ease-in-out infinite; }
@keyframes bl-pulse { 0%,100% { opacity: .6; transform: scale(.98); } 50% { opacity: 1; transform: scale(1.03); } }
.bl-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(90vw, 660px); }
.bl-choice { background: var(--pt-card); border: 2px solid var(--pt-line); border-radius: 14px; padding: 14px 16px; font-size: 18px; text-align: left; color: var(--pt-ink); font-family: inherit; }
.bl-choice b { color: var(--pt-accent); margin-right: 8px; }
.bl-choice small { color: var(--pt-muted); display: block; margin-top: 2px; }
.bl-art { width: 140px; height: 140px; border-radius: 16px; box-shadow: var(--pt-shadow); object-fit: cover; }
.bl-answer { text-align: center; } .bl-answer b { font-size: 26px; display: block; } .bl-answer span { color: var(--pt-muted); }
.bl-play { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; }
.bl-choices.phone { grid-template-columns: 1fr; width: 100%; }
.bl-play .bl-choice { cursor: pointer; }
.bl-play .bl-choice.sel { border-color: var(--pt-accent); background: color-mix(in srgb, var(--pt-accent) 14%, var(--pt-card)); }
.bl-play .bl-choice[disabled] { opacity: .6; }
.pp-reveal .bl-art { width: 120px; height: 120px; margin-bottom: 8px; }

/* ═══════════ DÉCOMPTE DE TRANSITION ═══════════ */
.tr-core { gap: 4px; }
.tr-num { font-size: clamp(90px, 17vw, 210px); font-weight: 800; line-height: 1; color: var(--amb); text-shadow: 0 0 34px color-mix(in srgb, var(--amb) 65%, transparent); }
.tr-label { font-size: clamp(28px, 5vw, 58px); font-weight: 800; color: #fff; transform-origin: center; transition: opacity .12s linear, transform .12s linear; }
.tr-sub { margin-top: 6px; }
.pp-trans { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.pp-trans-h { color: var(--pt-muted); font-weight: 700; }
.pp-trans .tr-num { font-size: clamp(80px, 30vw, 140px); }
.pp-trans .tr-label { font-size: clamp(24px, 8vw, 34px); }

/* ═══════════ 5 ERREURS ═══════════ */
.cq-board { max-width: 1000px; margin: 0 auto; padding: 14px 16px; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.cq-pair { display: flex; gap: 22px; justify-content: center; width: 100%; }
.cq-svg { width: min(44vw, 46vh); aspect-ratio: 1 / 1; background: #fff; border-radius: 16px; box-shadow: var(--pt-shadow); display: block; }
.cq-mark { animation: cq-pop .35s ease; }
@keyframes cq-pop { from { opacity: 0; } to { opacity: 1; } }
.cq-play { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.cq-pair-phone { display: flex; flex-direction: column; gap: 10px; width: 100%; align-items: center; }
.cq-pair-phone .cq-svg { width: min(82vw, 300px); touch-action: manipulation; cursor: crosshair; }
#pp-reco { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 9999;
  background: #e0556b; color: #fff; font-weight: 700; font-size: .82rem; padding: 5px 14px;
  border-radius: 999px; box-shadow: 0 4px 16px rgba(0,0,0,.3); animation: reco-pulse 1.1s ease-in-out infinite; }
@keyframes reco-pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.cq-svg.cq-miss { animation: cq-miss .4s ease; }
@keyframes cq-miss { 0%,100% { box-shadow: var(--pt-shadow); transform: translateX(0); } 25% { box-shadow: 0 0 0 4px var(--pt-ko); transform: translateX(-5px); } 55% { transform: translateX(5px); } 80% { transform: translateX(-2px); } }

/* ═══════════ PODIUM (fin de partie) ═══════════ */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 16px; margin: 20px 0 8px; }
.pod { display: flex; flex-direction: column; align-items: center; width: clamp(110px, 16vw, 170px); }
.pod-medal { font-size: clamp(34px, 5vw, 52px); }
.pod-name { font-weight: 800; font-size: clamp(18px, 2.4vw, 26px); color: var(--pc); margin-bottom: 6px; }
.pod-bar { width: 100%; border-radius: 14px 14px 0 0; background: color-mix(in srgb, var(--pc) 72%, #0e1830); border: 2px solid var(--pc); border-bottom: none; display: flex; justify-content: center; padding-top: 12px; transform-origin: bottom; animation: pod-grow .7s cubic-bezier(.2,1.2,.4,1) both; }
.pod-pts { font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: #fff; }
.pod1 .pod-bar { height: clamp(150px, 26vh, 200px); }
.pod2 .pod-bar { height: clamp(110px, 19vh, 150px); animation-delay: .1s; }
.pod3 .pod-bar { height: clamp(80px, 14vh, 110px); animation-delay: .2s; }
@keyframes pod-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.pp-rank { font-size: 18px; }

/* Éclat de score (gain / perte) */
.pt-badge.score-up { animation: score-up .9s ease; }
.pt-badge.score-down { animation: score-down .9s ease; }
@keyframes score-up { 0%,100% { box-shadow: var(--pt-shadow); } 28% { box-shadow: 0 0 0 11px color-mix(in srgb, var(--pt-ok) 55%, transparent), var(--pt-shadow); } }
@keyframes score-down { 0%,100% { box-shadow: var(--pt-shadow); } 28% { box-shadow: 0 0 0 11px color-mix(in srgb, var(--pt-ko) 55%, transparent), var(--pt-shadow); } }
