:root {
  --fond: #0a0b0f;
  --surface: #13151c;
  --surface-2: #1b1e28;
  --bord: rgb(255 255 255 / .08);
  --bord-fort: rgb(255 255 255 / .16);
  --texte: #eef0f5;
  --discret: #8a90a2;
  --accent: #c8f53c;
  --accent-texte: #10120a;
  --accent-doux: rgb(200 245 60 / .14);
  --danger: #ff5d73;
  --discord: #5865f2;
  --rayon: 18px;
  --ressort: cubic-bezier(.2, .9, .25, 1.15);
  --doux: cubic-bezier(.22, 1, .36, 1);
  --titres: 'Bricolage Grotesque', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { background: var(--fond); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--texte);
  font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* Grain léger par-dessus tout, pour casser l'aspect « trop lisse » */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: var(--accent-texte); }

h1, h2, h3 { font-family: var(--titres); margin: 0 0 .4em; line-height: 1.05; }
h1 { font-size: clamp(2.4rem, 7.5vw, 4.6rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.discret { color: var(--discret); }
.centre { text-align: center; }
.erreur { color: var(--danger); margin: 1em 0 0; }
.etiquette {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--discret);
}
.surligne {
  color: var(--accent);
  background: linear-gradient(transparent 62%, var(--accent-doux) 62%);
}

/* ---------- Fond animé ---------- */
.fond { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.fond-grille {
  position: absolute;
  inset: -56px 0 0;
  background-image:
    linear-gradient(rgb(255 255 255 / .045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 10%, transparent 70%);
  animation: grille 6s linear infinite;
}
.fond-lueur {
  position: absolute;
  left: 50%;
  top: -340px;
  width: min(1100px, 140vw);
  height: 640px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 35% 50%, rgb(200 245 60 / .13), transparent),
    radial-gradient(closest-side at 70% 55%, rgb(120 90 255 / .10), transparent);
  animation: lueur 14s ease-in-out infinite alternate;
}
@keyframes grille { to { transform: translateY(56px); } }
@keyframes lueur { to { transform: translateX(-46%) scale(1.08); } }

/* ---------- Barre du haut ---------- */
.barre, main { position: relative; z-index: 1; }
.barre {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--bord);
  background: rgb(10 11 15 / .72);
  backdrop-filter: blur(16px) saturate(1.4);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--titres);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: .06em;
  color: var(--texte);
  text-decoration: none;
}
.logo span:not(.logo-marque) { color: var(--accent); margin-left: -.25em; }
.logo-marque {
  width: 14px; height: 14px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 0 18px rgb(200 245 60 / .6);
  animation: battement 2.4s ease-in-out infinite;
}
.logo:hover .logo-marque { animation-duration: .6s; }
@keyframes battement { 50% { transform: scale(.7) rotate(45deg); } }
.profil { display: flex; align-items: center; gap: 10px; min-width: 0; }
.profil-nom { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(28px, 7vw, 72px) 16px 80px;
}

/* ---------- Apparitions ---------- */
.vue > * { animation: monte .6s var(--doux) both; }
.vue > *:nth-child(2) { animation-delay: .07s; }
.vue > *:nth-child(3) { animation-delay: .14s; }
.vue > *:nth-child(4) { animation-delay: .21s; }
@keyframes monte { from { opacity: 0; transform: translateY(18px); } }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }
/* Pendant l'intro, le site attend ; il apparaît quand elle s'en va */
.avec-intro:not(.intro-finie) .vue > * { animation-play-state: paused; }

/* ---------- Boutons et champs ---------- */
.bouton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--bord-fort);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--texte);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s var(--doux), box-shadow .2s, background .2s, border-color .2s;
}
.bouton:hover:not(:disabled) { border-color: var(--discret); transform: translateY(-1px); }
.bouton:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.bouton:disabled { opacity: .4; cursor: not-allowed; }
.bouton.principal {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-texte);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 6px 24px -8px rgb(200 245 60 / .6);
}
.bouton.principal:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 10px 32px -6px rgb(200 245 60 / .75); }
.bouton.sombre { border-color: transparent; background: var(--fond); color: var(--accent); }
.bouton.sombre span { transition: transform .2s var(--doux); }
.bouton.sombre:hover span { transform: translateX(4px); }
.bouton.discret { background: transparent; border-color: var(--bord); }
.bouton.discord {
  width: 100%;
  padding: 15px;
  border-color: transparent;
  background: var(--discord);
  color: #fff;
  box-shadow: 0 8px 30px -10px rgb(88 101 242 / .8);
}
.bouton.large { width: 100%; margin-top: 16px; padding: 15px; }
.bouton-icone {
  width: 32px; height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--discret);
  font-size: 1.2rem;
  cursor: pointer;
}
.bouton-icone:hover { background: var(--surface); color: var(--danger); }

input {
  min-width: 0;
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--bord-fort);
  border-radius: 12px;
  background: rgb(0 0 0 / .35);
  color: var(--texte);
  font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-doux); }
.champ-code {
  font-family: var(--mono);
  font-size: 1.5rem;
  letter-spacing: .45em;
  text-transform: uppercase;
  text-align: center;
}
.ligne { display: flex; gap: 8px; }
label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-weight: 600; }

/* ---------- Cartes ---------- */
.carte {
  position: relative;
  padding: 26px;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: linear-gradient(180deg, rgb(255 255 255 / .035), transparent 60%), var(--surface);
  box-shadow: 0 1px 0 rgb(255 255 255 / .04) inset, 0 20px 40px -24px rgb(0 0 0 / .8);
}

/* ---------- Connexion ---------- */
.accroche { margin-bottom: 36px; }
.accroche h1 span { display: inline-block; animation: monte .8s var(--doux) both; }
.accroche h1 span + br + span { animation-delay: .12s; }
.pastille-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 12px;
  border: 1px solid var(--bord);
  border-radius: 99px;
  background: var(--surface);
}
.pastille-live::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgb(200 245 60 / .6);
  animation: ping 1.8s infinite;
}
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 8px rgb(200 245 60 / 0); } }
.connexion { max-width: 460px; }
.form-local { display: grid; }
.form-local input { margin-bottom: 14px; }
.form-local .bouton.large { margin-top: 4px; }
.bouton.discord:not([hidden]) + .form-local:not([hidden]) { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--bord); }

/* ---------- Accueil ---------- */
.accueil-titre { margin-bottom: 32px; }
.accueil-titre .etiquette { display: block; margin-bottom: 12px; }
#accueil-nom { color: var(--texte); }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.carte-creer {
  overflow: hidden;
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-texte);
  box-shadow: 0 20px 50px -20px rgb(200 245 60 / .5);
}
.carte-creer::after {
  /* gros signe + décoratif */
  content: '+';
  position: absolute;
  right: -10px;
  bottom: -70px;
  font-family: var(--titres);
  font-size: 15rem;
  font-weight: 800;
  line-height: 1;
  opacity: .12;
  transition: transform .5s var(--doux);
}
.carte-creer:hover::after { transform: rotate(90deg); }
.carte-creer p { opacity: .75; }
.titre-section { display: flex; align-items: baseline; gap: 12px; margin: 56px 0 18px; }

/* ---------- Cartes de jeux ---------- */
.jeux { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.jeu {
  --c: var(--accent);
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 9%, transparent), transparent 55%), var(--surface);
  transition: transform .3s var(--doux), border-color .3s, box-shadow .3s;
  animation: monte .6s var(--doux) both;
  animation-delay: calc(var(--i, 0) * 70ms + .2s);
}
.jeu:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 50%, transparent);
  box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--c) 60%, transparent);
}
.jeu-icone {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  color: var(--c);
  transition: transform .4s var(--ressort);
}
.jeu-icone svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.jeu:hover .jeu-icone { transform: rotate(-8deg) scale(1.08); }
.jeu-num {
  position: absolute;
  top: 18px; right: 22px;
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--discret);
}
.jeu h3 { font-size: 1.35rem; margin: 0 0 6px; }
.jeu p { margin: 0; font-size: .92rem; color: var(--discret); }
.jeu .infos { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-family: var(--mono); font-size: .72rem; color: var(--discret); }
.badge {
  padding: 3px 9px;
  border: 1px solid var(--bord);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--discret);
}
.jeu .badge.dispo { border-color: color-mix(in srgb, var(--c) 40%, transparent); color: var(--c); }

/* Liste compacte dans le salon */
.jeux.compact { grid-template-columns: 1fr; gap: 8px; }
.jeux.compact .jeu { padding: 0; animation: none; }
.jeux.compact .jeu:hover { transform: none; box-shadow: none; }
.jeux.compact button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: inherit;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.jeux.compact button:disabled { cursor: default; }
.jeux.compact .jeu-icone { width: 40px; height: 40px; margin: 0; border-radius: 11px; }
.jeux.compact .jeu-icone svg { width: 22px; height: 22px; }
.jeux.compact h3 { font-size: 1.05rem; margin: 0; }
.jeux.compact p { font-size: .8rem; }
.jeux.compact .badge { margin-left: auto; }
.jeux.compact .jeu.choisi {
  border-color: var(--c);
  box-shadow: inset 0 0 0 1px var(--c), 0 10px 30px -16px var(--c);
}

/* ---------- Salon ---------- */
.salon-entete {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.salon-entete .etiquette { display: block; margin-bottom: 10px; }
.code { display: flex; gap: 8px; }
.tuile {
  display: grid;
  place-items: center;
  width: clamp(48px, 13vw, 64px);
  height: clamp(58px, 15vw, 76px);
  border: 1px solid rgb(200 245 60 / .35);
  border-radius: 14px;
  background: linear-gradient(180deg, rgb(200 245 60 / .16), rgb(200 245 60 / .04));
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  text-shadow: 0 0 22px rgb(200 245 60 / .6);
  animation: tuile .55s var(--ressort) both;
  animation-delay: calc(var(--i) * 70ms);
}
@keyframes tuile { from { opacity: 0; transform: translateY(-14px) rotateX(70deg); } }
.salon-boutons { display: flex; gap: 8px; }
.salon-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }

.joueurs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.joueur {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface-2);
}
.joueur.nouveau { animation: pop .45s var(--ressort) both; }
.joueur.absent { opacity: .45; }
.joueur-nom { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.joueur-statut { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--discret); }
.joueur-statut.hote { color: var(--accent); }

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  font-family: var(--titres);
  font-weight: 800;
  color: #0d0e12;
  box-shadow: 0 0 0 2px var(--fond);
}
.profil .avatar { width: 32px; height: 32px; font-size: .85rem; box-shadow: 0 0 0 2px var(--accent); }

/* ---------- Notification ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  max-width: calc(100% - 32px);
  padding: 13px 20px;
  border: 1px solid var(--bord-fort);
  border-radius: 14px;
  background: rgb(27 30 40 / .9);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgb(0 0 0 / .5);
  transform: translateX(-50%);
  animation: toast .4s var(--ressort);
}
@keyframes toast { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } }

/* ---------- Intro « respawn » ---------- */
.intro { display: none; }
.avec-intro .intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #050507;
  cursor: pointer;
  transition: transform .6s cubic-bezier(.7, 0, .2, 1), clip-path .6s cubic-bezier(.7, 0, .2, 1);
  clip-path: inset(0 0 0 0);
}
.intro > * { grid-area: 1 / 1; }
.intro.sortie { clip-path: inset(0 0 100% 0); transform: translateY(-4%); }

.intro-flash {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
}
.intro.etape-flash .intro-flash { animation: flash .75s cubic-bezier(.3, 0, .2, 1) forwards; }
@keyframes flash {
  0% { opacity: 1; transform: scale(0); }
  40% { opacity: 1; transform: scale(320); }
  100% { opacity: 0; transform: scale(320); }
}

.intro-logo { display: grid; justify-items: center; gap: 6px; }
.intro-mot {
  display: flex;
  font-family: var(--titres);
  font-weight: 800;
  font-size: clamp(3.2rem, 15vw, 9rem);
  line-height: .9;
  letter-spacing: -.02em;
  color: var(--texte);
}
.intro-mot span { position: relative; opacity: 0; }
.intro.etape-logo .intro-mot span { animation: lettre .75s var(--ressort) both, glitch .6s steps(2) both; animation-delay: calc(var(--i) * 70ms); }
/* Vague de lumière : chaque lettre s'illumine à son tour */
.intro.etape-reflet .intro-mot span {
  opacity: 1;
  animation: vague .7s ease-in-out both;
  animation-delay: calc(var(--i) * 75ms);
}
@keyframes vague {
  45% { color: var(--accent); text-shadow: 0 0 40px rgb(200 245 60 / .7); transform: translateY(-5%); }
}
@keyframes lettre { from { opacity: 0; transform: translateY(-60%) scaleY(1.4); filter: blur(6px); } to { opacity: 1; } }
@keyframes glitch {
  0% { text-shadow: -6px 0 #ff2bd6, 6px 0 #00e5ff; }
  60% { text-shadow: 3px 0 #ff2bd6, -3px 0 #00e5ff; }
  100% { text-shadow: none; }
}
.intro-games {
  overflow: hidden;
  font-family: var(--mono);
  font-size: clamp(.9rem, 3vw, 1.4rem);
  letter-spacing: .9em;
  margin-right: -.9em;
  color: var(--accent-texte);
}
.intro-games span {
  display: block;
  padding: 4px 6px 4px 14px;
  background: var(--accent);
  transform: translateY(110%);
}
.intro.etape-logo .intro-games span { animation: games .55s var(--doux) .6s forwards; }
.intro-sous-titre {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--discret);
  opacity: 0;
}
.intro.etape-logo .intro-sous-titre { animation: sous-titre .7s var(--doux) 1.1s forwards; }
@keyframes sous-titre { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes games { to { transform: none; } }
.intro-passer {
  align-self: end;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgb(255 255 255 / .25);
}

@media (max-width: 520px) {
  .profil-nom, #bouton-deconnexion { display: none; }
  .carte { padding: 20px; }
}

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

/* Options d'un jeu dans le salon */
.options { display: grid; gap: 8px; margin-top: 12px; }
.option { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-weight: 500; cursor: pointer; }
.option input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.option small { color: var(--discret); }
.option.inactive { opacity: .55; }

/* ---------- Undercover ---------- */
.uc { display: grid; gap: 16px; }
.uc-haut { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; }
.uc-mot, .uc-statut {
  padding: 20px 24px;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--surface);
}
.uc-mot { border-color: var(--accent); }
.uc-mot-texte {
  margin: 4px 0 8px;
  font-family: var(--titres);
  font-weight: 800;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  line-height: 1.1;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.uc-mot p { margin: 0; }
.uc-compo { margin-top: 12px !important; font-size: .82rem; color: var(--discret); }
.uc-statut h2 { margin-top: 6px; }
.uc-statut p:last-child { margin-bottom: 0; }
.uc-statut form { margin-top: 12px; }
.uc-fin { border-color: var(--accent); }

.uc-evenement {
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--surface-2);
}

.uc-joueurs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.uc-joueur, .uc-joueur > button {
  display: flex;
  align-items: center;
  gap: 12px;
}
.uc-joueur {
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface);
}
.uc-joueur > button {
  flex: 1;
  margin: -10px -12px;
  padding: 10px 12px;
  border: 0;
  border-radius: inherit;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.uc-joueur.votable:hover { border-color: var(--discret); }
.uc-joueur.mon-vote { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.uc-joueur.parle { border-color: var(--accent); }
.uc-joueur.mort { opacity: .5; }
.uc-joueur.mort .joueur-nom { text-decoration: line-through; }
.uc-joueur-centre { flex: 1; min-width: 0; display: grid; gap: 4px; }
.uc-indices { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-indice {
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--surface-2);
  font-size: .9rem;
}
.uc-indice.ancien { opacity: .5; }
.uc-etiquettes { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: .78rem; text-align: right; }
.uc-role { padding: 2px 8px; border-radius: 99px; background: var(--surface-2); font-weight: 600; }
.uc-role.undercover { color: var(--danger); }
.uc-role.misterWhite { color: #fff; background: #444a5a; }
.uc-a-vote { color: var(--accent); }

.uc-hote { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

@media (max-width: 640px) {
  .uc-haut { grid-template-columns: 1fr; }
}
.option.choix { display: grid; gap: 4px; cursor: default; }
.option.choix span { font-size: .85rem; color: var(--discret); }
select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--bord);
  border-radius: 10px;
  background: var(--fond);
  color: var(--texte);
  font: inherit;
}
select:disabled { opacity: .7; }

/* ---------- Petit Bac ---------- */
.pb { display: grid; gap: 16px; }
.pb-haut { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pb-entete { display: flex; align-items: center; gap: 18px; min-width: 0; }
.pb-entete h2 { margin: 2px 0 0; }
.pb-lettre {
  flex: none;
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--accent-texte);
  font-family: var(--titres);
  font-weight: 800;
  font-size: 3rem;
  line-height: 1;
}
.pb-chrono { font-family: var(--mono); font-size: 2rem; color: var(--texte); }
.pb-chrono.urgent { color: var(--danger); }
.pb-bandeau {
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--danger);
  color: #fff;
  font-weight: 700;
}

.pb-colonnes { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 16px; align-items: start; }
.pb-zone-saisie { display: grid; gap: 12px; }
.pb-saisie { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pb-champ {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--bord);
  border-radius: 12px;
  background: var(--surface);
}
.pb-champ span { font-size: .85rem; color: var(--discret); font-weight: 600; }
.pb-champ:focus-within { border-color: var(--accent); }
.pb-champ:focus-within span { color: var(--accent); }
.pb-champ input { width: 100%; }
.pb-stop { justify-self: end; padding: 14px 32px; font-size: 1.1rem; letter-spacing: .05em; }

.pb-cote h2 { font-size: 1rem; }
.pb-progression { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pb-progres { display: flex; align-items: center; gap: 10px; }
.pb-progres .avatar { width: 28px; height: 28px; font-size: .8rem; }
.pb-compte { font-family: var(--mono); font-size: .85rem; color: var(--discret); }
.pb-progres.complet .pb-compte { color: var(--accent); }

.pb-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pb-categorie { padding: 16px 18px; }
.pb-categorie h3 { margin: 0 0 10px; font-family: var(--titres); font-size: 1.05rem; }
.pb-categorie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pb-reponse { display: flex; align-items: center; gap: 10px; }
.pb-reponse .avatar { width: 28px; height: 28px; font-size: .8rem; }
.pb-reponse-texte { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.pb-texte { font-weight: 600; overflow-wrap: anywhere; }
.pb-auteur { font-size: .75rem; color: var(--discret); }
.pb-reponse.refusee .pb-texte { text-decoration: line-through; color: var(--discret); }
.pb-auto { font-size: .75rem; color: var(--danger); white-space: nowrap; }
.pb-contester {
  flex: none;
  padding: 4px 10px;
  border: 1px solid var(--bord);
  border-radius: 99px;
  background: none;
  color: var(--discret);
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
}
.pb-contester:hover { border-color: var(--danger); color: var(--danger); }
.pb-contester.actif { border-color: var(--danger); background: var(--danger); color: #fff; }
.pb-points { font-family: var(--mono); font-weight: 700; color: var(--discret); }
.pb-points.p10 { color: var(--accent); }
.pb-points.p5 { color: #f5c542; }

.pb-scores ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pb-score { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 10px; }
.pb-score.moi { background: var(--surface-2); }
.pb-rang { width: 1.5em; font-family: var(--mono); color: var(--discret); text-align: right; }
.pb-scores.final { border-color: var(--accent); }
.pb-scores.final .pb-score:first-child { font-size: 1.15rem; }
.pb-scores.final .pb-score:first-child .pb-rang { color: var(--accent); }

.pb-actions { display: flex; align-items: center; justify-content: center; gap: 16px; }
.pb-hote { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0; }

@media (max-width: 720px) {
  .pb-colonnes { grid-template-columns: 1fr; }
  .pb-lettre { width: 60px; height: 60px; font-size: 2.3rem; }
  .pb-chrono { font-size: 1.6rem; }
  .pb-stop { justify-self: stretch; }
}

/* ---------- Just One ---------- */
.jo { --c: #4cc9f0; display: grid; gap: 16px; }
.jo-barre {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
}
.jo-score { font-family: var(--titres); font-weight: 800; font-size: 2.2rem; line-height: 1; }
.jo-score small { font-size: 1rem; color: var(--discret); }
.jo-cartes { display: flex; flex-wrap: wrap; gap: 6px; }
.jo-pastille {
  width: 16px; height: 22px;
  border: 1.5px solid var(--bord-fort);
  border-radius: 4px;
  transition: background .3s, border-color .3s;
}
.jo-pastille.gagnee { border-color: var(--c); background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); }
.jo-pastille.perdue { border-color: transparent; background: color-mix(in srgb, var(--danger) 45%, transparent); }

.jo.stable .jo-carte, .jo.stable .jo-indice { animation: none; }
.jo.stable .jo-carte.cachee .jo-mot { animation: battement 2.4s ease-in-out infinite; }
.jo-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; align-items: start; }
.jo-carte {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 220px;
  padding: 26px;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  border-radius: var(--rayon);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 60%),
    var(--surface);
  box-shadow: 0 24px 50px -28px color-mix(in srgb, var(--c) 70%, transparent);
  animation: pop .5s var(--ressort);
}
.jo-carte p { margin: 6px 0 0; color: var(--discret); }
.jo-mot {
  font-family: var(--titres);
  font-weight: 800;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  line-height: 1;
  color: var(--c);
  overflow-wrap: anywhere;
}
.jo-carte.cachee .jo-mot { font-size: 5rem; animation: battement 2.4s ease-in-out infinite; }
.jo-carte.fin { --c: var(--accent); }

.jo-statut {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 24px;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--surface);
}
.jo-statut h2, .jo-statut p { margin: 0; }
.jo-statut .petit { font-size: .82rem; }
.jo-info { padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.jo-form { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.jo-form input { flex: 1 1 160px; }

.jo-attente { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jo-attente li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--bord);
  border-radius: 99px;
  font-size: .9rem;
}
.jo-attente .avatar { width: 26px; height: 26px; font-size: .75rem; }
.jo-attente li.fait { border-color: color-mix(in srgb, var(--c) 50%, transparent); }
.jo-coche { color: var(--discret); }
.jo-attente li.fait .jo-coche { color: var(--c); }

.jo-indices { display: flex; flex-wrap: wrap; gap: 8px; }
.jo-indice {
  display: inline-grid;
  justify-items: center;
  padding: 8px 16px;
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 10%, var(--surface-2));
  color: var(--texte);
  font: inherit;
  font-weight: 700;
  animation: pop .4s var(--ressort) both;
}
.jo-indices.grands .jo-indice { font-family: var(--titres); font-size: 1.25rem; }
.jo-indice small { font-family: system-ui, sans-serif; font-size: .68rem; font-weight: 500; color: var(--discret); }
.jo-indice.efface { border-color: var(--bord); background: none; color: var(--discret); text-decoration: line-through; text-decoration-color: var(--danger); }
.jo-indice.efface small { text-decoration: none; color: var(--danger); }
.jo-indice.cliquable { cursor: pointer; transition: transform .15s; }
.jo-indice.cliquable:hover { transform: translateY(-2px); border-color: var(--danger); }
.jo-indices .jo-indice:nth-child(2) { animation-delay: .05s; }
.jo-indices .jo-indice:nth-child(3) { animation-delay: .1s; }
.jo-indices .jo-indice:nth-child(4) { animation-delay: .15s; }
.jo-indices .jo-indice:nth-child(n+5) { animation-delay: .2s; }

.jo-resultat.trouve { color: var(--c); }
.jo-resultat.rate { color: var(--danger); }

.jo-histo { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; width: 100%; }
.jo-histo li { display: flex; align-items: baseline; gap: 10px; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); }
.jo-histo-icone { width: 1.2em; font-weight: 800; text-align: center; color: var(--discret); }
.jo-histo li.trouve .jo-histo-icone { color: var(--c); }
.jo-histo li.rate .jo-histo-icone { color: var(--danger); }

.jo-hote { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.jo-hote p { margin: 0; }

@media (max-width: 720px) {
  .jo-corps { grid-template-columns: 1fr; }
  .jo-carte { min-height: 150px; }
}
