/* ==========================================================================
   Culture Clash — feuille de style partagée
   Variables et composants communs extraits des écrans validés
   (accueil, choix du niveau, plateau) + nouveaux écrans (lobby, carte, fin).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Nunito+Sans:wght@400;600;700;800&display=swap');

:root{
  /* fond nébuleuse nuit étoilée */
  --void-1: #0a0f2e;
  --void-2: #151140;
  --void-3: #1c1f52;

  /* accents de marque */
  --gold: #f2c14e;
  --gold-soft: #fde8c0;
  --blue-c: #4a7bea;
  --blue-c2: #3d6fce;
  --ink: #f4f7ff;
  --muted: #a9b7db;

  /* catégories */
  --savoirs-bg: #ece2c6; --savoirs-ink: #241c0a;
  --culture-bg: #5b3f96; --culture-ink: #f4eefc;
  --sport-bg: #2e8f4f;   --sport-ink: #eafff1;
  --sante-bg: #2fa89b;   --sante-ink: #eafffb;
  --clash-bg: #c23b34;   --clash-ink: #fff0ee;

  /* niveaux */
  --decouverte-1: #a7dc4f; --decouverte-2: #4c7a12; --decouverte-ink:#0d2103;
  --challenge-1: #4fc2f2;  --challenge-2: #045a8a;  --challenge-ink:#eaf7ff;
  --maitrise-1: #c46bab;   --maitrise-2: #5a1f4a;   --maitrise-ink:#fbeef7;
  --legende-1: #f6d27a;    --legende-2: #d99e2a;    --legende-ink:#2a1c05;

  /* joueurs (jusqu'à 4) */
  --p1: #f2c14e; --p2: #4fc2f2; --p3: #c46bab; --p4: #7fe07f;

  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Nunito Sans', system-ui, sans-serif;
}

*, *::before, *::after{ box-sizing: border-box; }
html, body{ margin:0; padding:0; background: var(--void-1); height: 100%; }
body{ font-family: var(--font-body); color: var(--ink); }
button{ font-family: inherit; }
h1,h2,h3{ font-family: var(--font-display); margin: 0; }
p{ margin: 0; }
input, textarea{ font-family: inherit; }

#app{ min-height: 100vh; width: 100%; }

/* ---------- fond commun à tous les écrans ---------- */
.cc-screen{
  position: relative;
  min-height: 100vh;
  width: 100%;
  background:
    radial-gradient(ellipse 70% 45% at 20% 0%, rgba(122,79,214,0.35), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 6%, rgba(242,193,78,0.18), transparent 60%),
    radial-gradient(ellipse 90% 55% at 50% 105%, rgba(61,111,206,0.30), transparent 65%),
    linear-gradient(160deg, var(--void-1), var(--void-3) 45%, var(--void-2) 100%);
  display: flex; flex-direction: column; align-items: center;
  padding: 22px 16px 32px;
  overflow-x: hidden;
}
.cc-stars{
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 15%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 80% 10%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 30% 60%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 60% 90%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 90% 70%, #fde8c0, transparent),
    radial-gradient(1.2px 1.2px at 45% 30%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 22% 82%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 68% 40%, #fde8c0, transparent);
  background-repeat: no-repeat;
  opacity: 0.6;
  animation: cc-twinkle 3.5s ease-in-out infinite alternate;
}
@keyframes cc-twinkle{ from{opacity:.4;} to{opacity:.85;} }

/* ---------- barre haute + bouton retour ---------- */
.cc-topbar{
  position: relative; z-index: 2; width: 100%; max-width: 460px;
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.cc-back{
  width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16); color: var(--ink); font-size: 18px;
  display: flex; align-items:center; justify-content:center; cursor: pointer;
}
.cc-back:hover{ background: rgba(255,255,255,0.14); }
.cc-pill{
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: var(--gold-soft); letter-spacing: 0.03em;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}

/* ---------- signature de marque C ⚡ C ---------- */
.cc-mark{ display:flex; align-items:center; gap:1px; position: relative; }
.cc-mark .c{ font-family: var(--font-display); font-weight: 800; }
.cc-mark .c1{ color: var(--gold); text-shadow: 0 0 16px rgba(242,193,78,0.75); }
.cc-mark .c2{ color: var(--blue-c); text-shadow: 0 0 16px rgba(74,123,234,0.75); }
.cc-mark .bolt{ filter: drop-shadow(0 0 9px rgba(255,224,140,0.9)); }

/* ---------- boutons pleins et opaques (jamais transparents) ---------- */
.btn{
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  border: none; border-radius: 14px; padding: 14px 22px; cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,0.4);
  transition: filter .15s ease, transform .15s ease;
}
.btn:hover{ filter: brightness(1.07); transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn:disabled{ opacity: 0.45; cursor: default; filter: none; transform: none; }
.btn-gold{ color: #2a1c05; background: linear-gradient(135deg, #f6d27a, var(--gold) 60%, #d99e2a); }
.btn-blue{ color: #eaf3ff; background: linear-gradient(135deg, #6ea3f7, var(--blue-c) 60%, var(--blue-c2)); }
.btn-ghost{ color: var(--ink); background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); box-shadow: none; }
.btn-ghost:hover{ background: rgba(255,255,255,0.2); }
.btn-danger{ color: #fff0ee; background: linear-gradient(135deg, #e2685f, var(--clash-bg) 70%); }
.btn-block{ width: 100%; }

/* ---------- tooltips (survol/focus) ---------- */
.cc-tooltip{
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: #0d1330; color: var(--ink); font-size: 11.5px; font-weight: 600;
  padding: 7px 11px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15);
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,0.45); z-index: 5;
}
.cc-tooltip.visible{ opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- titres de section ---------- */
.cc-title{ font-size: clamp(20px, 6vw, 26px); font-weight: 800; text-align: center; }
.cc-subtitle{ color: var(--muted); font-size: 13.5px; text-align: center; margin-top: 6px; }

/* ---------- badges de catégorie ---------- */
.cc-cat-savoirs{ background: var(--savoirs-bg); color: var(--savoirs-ink); }
.cc-cat-culture{ background: var(--culture-bg); color: var(--culture-ink); }
.cc-cat-sport{ background: var(--sport-bg); color: var(--sport-ink); }
.cc-cat-sante{ background: var(--sante-bg); color: var(--sante-ink); }
.cc-cat-clash{ background: var(--clash-bg); color: var(--clash-ink); }

/* ---------- toast / message flash ---------- */
.cc-toast{
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: #10143a; border: 1px solid rgba(255,255,255,0.18); color: var(--ink);
  padding: 12px 18px; border-radius: 12px; font-size: 13px; font-weight: 600;
  box-shadow: 0 10px 26px rgba(0,0,0,0.5); opacity: 0; transition: all .25s ease; z-index: 50;
  max-width: 90vw; text-align: center;
}
.cc-toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }

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

/* ==========================================================================
   Écran Accueil
   ========================================================================== */
.acc-root{ padding-top: 30px; }
.acc-glow-orb{
  position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.5;
  animation: acc-drift 9s ease-in-out infinite alternate;
}
.acc-glow-orb.o1{ width: 220px; height: 220px; background: #7a4fd6; top: -60px; left: -60px; }
.acc-glow-orb.o2{ width: 260px; height: 260px; background: #3d6fce; bottom: -100px; right: -80px; animation-delay: 1.5s; }
.acc-glow-orb.o3{ width: 160px; height: 160px; background: #f2c14e; top: 30%; right: 5%; animation-delay: 3s; }
@keyframes acc-drift{ from{ transform: translate(0,0) scale(1); } to{ transform: translate(12px,-10px) scale(1.08); } }

.acc-logo-wrap{ position: relative; z-index: 2; width: min(360px, 78%); filter: drop-shadow(0 10px 26px rgba(0,0,0,0.5)); margin-bottom: 2px; }
.acc-logo-wrap img{ width: 100%; display:block; }

.acc-mark{ position: relative; z-index: 2; display:flex; align-items:center; justify-content:center; gap:2px; margin: 4px 0 6px; }
.acc-mark .c{ font-size: clamp(30px, 6vw, 42px); line-height: 1; }
.acc-bolt{ width: 20px; height: 34px; margin: 0 -2px; animation: acc-pulse 2.2s ease-in-out infinite; }
@keyframes acc-pulse{
  0%,100%{ filter: drop-shadow(0 0 6px rgba(255,224,140,0.6)); transform: scale(1); }
  50%{ filter: drop-shadow(0 0 18px rgba(255,224,140,1)); transform: scale(1.06); }
}

.acc-slogan{
  position: relative; z-index: 2; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 28px; text-align: center; text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

.acc-choices{ position: relative; z-index: 2; width: 100%; max-width: 420px; display:flex; flex-direction:column; gap:14px; margin-top:4px; }

.acc-btn{
  position: relative; display:flex; align-items:center; gap:14px; padding: 17px 18px; border-radius:16px;
  border:none; cursor:pointer; text-align:left; font-family: var(--font-body);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  width: 100%;
}
.acc-btn:hover{ transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 10px 24px rgba(0,0,0,0.45); }
.acc-btn:focus-visible{ outline: 3px solid #fff; outline-offset: 2px; }
.acc-btn.solo{ background: linear-gradient(135deg, #f6d27a, var(--gold) 60%, #d99e2a); color: #2a1c05; }
.acc-btn.groupe{ background: linear-gradient(135deg, #6f97f2, var(--blue-c) 60%, #2c4fb0); color: #f4f7ff; }
.acc-btn-icon{ width:44px; height:44px; flex:none; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:22px; background: rgba(255,255,255,0.28); }
.acc-btn-title{ font-family: var(--font-display); font-weight:700; font-size:18px; letter-spacing:0.01em; }
.acc-btn-sub{ font-size:12.5px; opacity:0.85; margin-top:2px; }
.acc-btn-arrow{ margin-left:auto; font-size:18px; opacity:0.8; }

.acc-categories{ position:relative; z-index:2; display:flex; gap:8px; margin-top:24px; flex-wrap:wrap; justify-content:center; max-width:420px; }
.acc-chip{ font-size:11px; letter-spacing:0.04em; padding:5px 10px; border-radius:999px; color:var(--ink); border:1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); }

.acc-footer{ position:relative; z-index:2; margin-top:auto; padding-top:22px; font-size:11px; color:var(--muted); text-align:center; opacity:0.75; }

@media (prefers-reduced-motion: reduce){ .cc-stars, .acc-bolt, .acc-glow-orb { animation: none !important; } }

/* ==========================================================================
   Écran Choix du niveau (composant réutilisable dans le lobby)
   ========================================================================== */
.niv-brand{ display:flex; align-items:center; gap:8px; opacity:0.9; }
.niv-brand img{ height:22px; }
.niv-brand span{ font-family: var(--font-display); font-weight:700; font-size:13px; letter-spacing:0.04em; color: var(--gold-soft); }

.niv-grid{ position:relative; z-index:2; width:100%; max-width:460px; display:grid; grid-template-columns: 1fr 1fr; gap:14px; }
.niv-grid.compact{ max-width: 100%; gap: 10px; }

.niv-card{
  position:relative; border:none; border-radius:18px; padding:18px 14px 16px; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; text-align:center; gap:8px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.4); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  overflow:hidden;
}
.niv-card:hover{ transform: translateY(-3px); filter: brightness(1.05); box-shadow: 0 14px 28px rgba(0,0,0,0.5); }
.niv-card:focus-visible{ outline: 3px solid #fff; outline-offset: 2px; }
.niv-card.selected{ outline: 3px solid #fff; outline-offset: 2px; }
.niv-card.decouverte{ background: radial-gradient(circle at 30% 15%, var(--decouverte-1), var(--decouverte-2) 75%); color: var(--decouverte-ink); }
.niv-card.challenge{ background: radial-gradient(circle at 30% 15%, var(--challenge-1), var(--challenge-2) 75%); color: var(--challenge-ink); }
.niv-card.maitrise{ background: radial-gradient(circle at 30% 15%, var(--maitrise-1), var(--maitrise-2) 75%); color: var(--maitrise-ink); }
.niv-card.legende{ background: radial-gradient(circle at 30% 15%, var(--legende-1), var(--legende-2) 75%); color: var(--legende-ink); }
.niv-card-icon{ width:52px; height:52px; color:currentColor; filter: drop-shadow(0 3px 4px rgba(0,0,0,0.3)); }
.niv-grid.compact .niv-card-icon{ width: 36px; height: 36px; }
.niv-card-name{ font-family: var(--font-display); font-weight:800; font-size:16px; letter-spacing:0.02em; }
.niv-card-desc{ font-size:11px; opacity:0.85; line-height:1.3; }

/* ==========================================================================
   Écran Salon (lobby) — multijoueur local
   ========================================================================== */
.lob-wrap{ position:relative; z-index:2; width:100%; max-width:460px; display:flex; flex-direction:column; gap:18px; }

.lob-players{ display:flex; flex-direction:column; gap:8px; }
.lob-player{
  display:flex; align-items:center; gap:10px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 10px 12px;
}
.lob-player-dot{ width:14px; height:14px; border-radius:50%; flex:none; box-shadow: 0 0 8px currentColor; }
.lob-player-name{ font-weight:700; flex:1; }
.lob-player-level{ font-size:10.5px; font-weight:800; letter-spacing:0.04em; padding:4px 9px; border-radius:999px; }
.lob-player-remove{
  width:28px; height:28px; border-radius:8px; border:1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08); color: var(--ink); cursor:pointer; flex:none;
}
.lob-player-remove:hover{ background: rgba(198,64,64,0.35); }
.lob-empty{ color: var(--muted); font-size: 13px; text-align:center; padding: 14px; border: 1px dashed rgba(255,255,255,0.2); border-radius: 12px; }

.lob-section-title{ font-family: var(--font-display); font-weight:700; font-size:14px; color: var(--gold-soft); margin-bottom:8px; }

.lob-add-card{ background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 14px; }
.lob-name-input{
  width:100%; padding: 11px 13px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(10,15,46,0.6); color: var(--ink); font-size: 14px; margin-bottom: 10px;
}
.lob-name-input::placeholder{ color: var(--muted); }

.lob-endmode{ display:flex; flex-direction:column; gap:8px; }
.lob-radio{
  display:flex; align-items:center; gap:10px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; padding: 10px 12px; cursor:pointer;
}
.lob-radio.checked{ border-color: var(--gold); background: rgba(242,193,78,0.12); }
.lob-radio input{ accent-color: var(--gold); }
.lob-duration-select{
  margin-top: 4px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(10,15,46,0.6); color: var(--ink);
}

.lob-hint{ color: var(--muted); font-size: 12px; text-align: center; }

/* ==========================================================================
   Écran Plateau
   ========================================================================== */
.cp-board-wrap{ position: relative; z-index: 2; width: min(94vw, 380px); }
.cp-board{
  position: relative; width: 100%; aspect-ratio: 1/1;
  background: radial-gradient(circle at 50% 45%, #16224a, #0a1230 75%);
  border-radius: 14px; border: 2px solid rgba(242,193,78,0.5);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5), inset 0 0 40px rgba(0,0,0,0.4);
}
.cp-row-top, .cp-row-bottom{ position: absolute; left: 0; right: 0; height: calc(100%/9); display: flex; }
.cp-row-top{ top: 0; }
.cp-row-bottom{ bottom: 0; left: calc(100%/9); right: 0; }
.cp-col-left, .cp-col-right{ position: absolute; top: calc(100%/9); bottom: 0; width: calc(100%/9); display: flex; flex-direction: column; }
.cp-col-left{ left: 0; }
.cp-col-right{ right: 0; bottom: calc(100%/9); }
.cp-cell{
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 10px;
  border: 1px solid rgba(6,10,26,0.55); position: relative;
}
.cp-cell.active{ outline: 2px solid #fff; outline-offset: -2px; filter: brightness(1.15); }

.cp-center{
  position: absolute; inset: calc(100%/9); border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, rgba(242,193,78,0.14), transparent 60%), linear-gradient(160deg, #12183c, #0a1230);
  display: grid; grid-template-columns: 1fr 1.15fr 1fr; grid-template-rows: auto auto auto;
  align-items: center; justify-items: center; gap: 4px 2px; padding: 8px;
  border: 1px solid rgba(242,193,78,0.35);
}
.cp-legend-item{ display:flex; flex-direction:column; align-items:center; gap:3px; }
.cp-legend-icon{
  width: 15vw; height: 15vw; max-width: 46px; max-height: 46px; min-width: 34px; min-height: 34px;
  border-radius: 10px; display:flex; align-items:center; justify-content:center; box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.cp-legend-icon svg{ width: 62%; height: 62%; }
.cp-legend-label{ font-family: var(--font-display); font-weight: 700; font-size: 9.5px; letter-spacing: 0.03em; color: var(--ink); text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.cp-legend-savoirs{ grid-column: 2; grid-row: 1; }
.cp-legend-clash{ grid-column: 1; grid-row: 2; }
.cp-legend-culture{ grid-column: 3; grid-row: 2; }
.cp-legend-sante{ grid-column: 1; grid-row: 3; }
.cp-legend-sport{ grid-column: 3; grid-row: 3; }
.cp-center-core{ grid-column: 2; grid-row: 2; display:flex; flex-direction:column; align-items:center; gap:3px; position: relative; }
.cp-center-glow{ position: absolute; width: 120%; aspect-ratio: 1/1; border-radius: 50%; background: radial-gradient(circle, rgba(242,193,78,0.35), transparent 70%); filter: blur(6px); z-index: 0; }
.cp-center-mark{ display:flex; align-items:center; gap:1px; position: relative; z-index: 1; }
.cp-center-mark .c{ font-family: var(--font-display); font-weight: 800; font-size: clamp(26px,9.5vw,38px); }
.cp-center-mark .c1{ color: var(--gold); text-shadow: 0 0 16px rgba(242,193,78,0.75); }
.cp-center-mark .c2{ color: #4a7bea; text-shadow: 0 0 16px rgba(74,123,234,0.75); }
.cp-center-bolt{ width: 15px; height: 26px; filter: drop-shadow(0 0 9px rgba(255,224,140,0.9)); position: relative; z-index: 1; }
.cp-center-tag{ font-size: 7.5px; letter-spacing: 0.08em; color: var(--gold-soft); text-transform: uppercase; text-align: center; opacity: 0.9; position: relative; z-index: 1; }

.cp-pawn{
  position: absolute; width: calc(100%/9 * 0.55); aspect-ratio: 1/1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--gold) 55%, #b6842a);
  box-shadow: 0 3px 8px rgba(0,0,0,0.6), 0 0 0 2px rgba(255,255,255,0.5);
  transition: left .28s cubic-bezier(.4,1.6,.6,1), top .28s cubic-bezier(.4,1.6,.6,1); z-index: 3;
}

.cp-dice-row{ position: relative; z-index: 2; display: flex; align-items: center; gap: 16px; margin: 18px 0 8px; }
.cp-dice{
  width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(160deg, #fff, #d8dce8);
  display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr;
  padding: 9px; gap: 3px; box-shadow: 0 8px 18px rgba(0,0,0,0.4); transition: transform .5s ease;
}
.cp-dice.rolling{ animation: cp-shake .5s ease; }
@keyframes cp-shake{ 0%,100%{transform:rotate(0);} 25%{transform:rotate(-15deg);} 75%{transform:rotate(15deg);} }
.cp-pip{ width: 100%; height: 100%; border-radius: 50%; background: #16224a; opacity: 0; }

.cp-players{ position: relative; z-index: 2; width: 100%; max-width: 420px; margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.cp-player{ display: flex; align-items: center; gap: 10px; }
.cp-player-dot{ width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 8px currentColor; }
.cp-player-name{ font-size: 12.5px; font-weight: 700; width: 74px; flex: none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cp-player-bar{ flex: 1; height: 10px; border-radius: 999px; background: rgba(255,255,255,0.1); overflow: hidden; position: relative; }
.cp-player-fill{ height: 100%; border-radius: 999px; transition: width .4s ease; }
.cp-player-score{ font-size: 11.5px; color: var(--muted); width: 34px; text-align: right; flex: none; }
.cp-player.current .cp-player-name{ color: var(--gold-soft); }
.cp-player.quit{ opacity: 0.4; }

.cp-timer{ font-family: var(--font-display); font-weight:700; }
.cp-footer{ position: relative; z-index: 2; margin-top: 16px; font-size: 10.5px; color: var(--muted); text-align: center; max-width: 360px; }

/* ==========================================================================
   Écran Carte — question / effet Clash
   ========================================================================== */
.car-card{
  position: relative; z-index: 2; width: 100%; max-width: 480px; border-radius: 22px;
  padding: 22px 20px 24px; box-shadow: 0 16px 34px rgba(0,0,0,0.5); margin-top: 6px;
}
.car-header{ display:flex; align-items:center; gap:10px; margin-bottom: 14px; }
.car-cat-icon{ width: 34px; height: 34px; border-radius: 9px; display:flex; align-items:center; justify-content:center; flex:none; box-shadow: 0 3px 8px rgba(0,0,0,0.3); }
.car-cat-icon svg{ width: 60%; height: 60%; }
.car-cat-label{ font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: 0.03em; }
.car-level-badge{ margin-left: auto; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; padding: 4px 9px; border-radius: 999px; background: rgba(0,0,0,0.2); }

.car-question{ font-size: clamp(16px, 4.6vw, 19px); font-weight: 700; line-height: 1.4; margin-bottom: 18px; }
.car-texte{ font-size: 16px; line-height: 1.5; margin-bottom: 18px; }

.car-qcm{ display:flex; flex-direction:column; gap:9px; }
.car-qcm-btn{
  text-align:left; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.55); color: #1a1206; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: filter .15s ease;
}
.car-qcm-btn:hover:not(:disabled){ filter: brightness(0.96); }
.car-qcm-btn:disabled{ cursor: default; }
.car-qcm-btn.correct{ background: #7fd88f; color: #0d2a12; border-color: #3f8f52; }
.car-qcm-btn.incorrect{ background: #e2827a; color: #3a0e0a; border-color: #a5352b; }

.car-input-row{ display:flex; gap:8px; margin-bottom: 10px; }
.car-text-input{
  flex:1; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.9); color: #1a1206; font-size: 14px;
}
.car-mic-btn{
  width: 46px; flex:none; border-radius: 12px; border: 1px solid rgba(0,0,0,0.2);
  background: rgba(255,255,255,0.55); font-size: 18px; cursor: pointer;
}
.car-mic-btn.listening{ background: #f2c14e; }

.car-manual-row{ display:flex; gap:8px; margin: 10px 0; }
.car-manual-row .btn{ flex:1; padding: 10px 12px; font-size: 13px; }

.car-verdict{ font-weight: 800; font-size: 14px; margin: 8px 0; padding: 8px 12px; border-radius: 10px; display:inline-block; }
.car-verdict.ok{ background: rgba(127,216,143,0.9); color:#0d2a12; }
.car-verdict.ko{ background: rgba(226,130,122,0.9); color:#3a0e0a; }

.car-reveal{
  margin-top: 14px; padding: 14px 16px; border-radius: 14px; font-size: 14px; line-height: 1.5;
}
.car-reveal.ok{ background: rgba(127,216,143,0.16); border: 1px solid rgba(127,216,143,0.4); }
.car-reveal.ko{ background: rgba(226,130,122,0.14); border: 1px solid rgba(226,130,122,0.4); }
.car-reveal-title{ font-family: var(--font-display); font-weight: 800; margin-bottom: 4px; }

.car-continue{ margin-top: 18px; }

.car-opponent-grid{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom: 14px; }
.car-opponent-btn{
  display:flex; align-items:center; gap:8px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.1); color: var(--ink);
  cursor:pointer; font-weight: 700; font-size: 13.5px;
}
.car-opponent-btn:hover{ background: rgba(255,255,255,0.18); }
.car-opponent-dot{ width:10px; height:10px; border-radius:50%; box-shadow: 0 0 6px currentColor; }

.car-timer-badge{
  display:inline-flex; align-items:center; gap:6px; font-family: var(--font-display); font-weight:800;
  background: rgba(255,255,255,0.12); padding: 6px 12px; border-radius: 999px; margin-bottom: 12px; font-size: 13px;
}

.car-cap-list{ display:flex; flex-wrap:wrap; gap:6px; margin: 10px 0 14px; }
.car-cap-chip{
  display:inline-flex; align-items:center; gap:4px; font-size: 12.5px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px; background: rgba(127,216,143,0.18);
  border: 1px solid rgba(127,216,143,0.45); color: var(--ink);
}

.car-sub{ color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }

/* ==========================================================================
   Écran Fin de partie
   ========================================================================== */
.fin-trophy{ font-size: 54px; margin-bottom: 6px; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.5)); }
.fin-ranking{ width:100%; max-width: 440px; display:flex; flex-direction:column; gap:10px; margin-top: 22px; }
.fin-row{
  display:flex; align-items:center; gap:12px; padding: 14px 16px; border-radius: 16px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14);
}
.fin-row.first{ background: linear-gradient(135deg, rgba(246,210,122,0.28), rgba(217,158,42,0.16)); border-color: rgba(242,193,78,0.6); }
.fin-rank{ font-family: var(--font-display); font-weight: 800; font-size: 18px; width: 28px; text-align:center; }
.fin-dot{ width: 14px; height:14px; border-radius:50%; box-shadow: 0 0 8px currentColor; flex:none; }
.fin-name{ font-weight: 700; flex:1; }
.fin-score{ font-family: var(--font-display); font-weight:800; font-size: 16px; }
.fin-actions{ margin-top: 26px; width: 100%; max-width: 440px; display:flex; flex-direction:column; gap: 10px; }
