/* =========================================================
   Équipop — feuille de style
   Mobile d'abord : les styles de base visent le téléphone,
   les media queries en bas élargissent pour tablette / PC.
   ========================================================= */

/* ---------- 1. Variables ---------- */
:root {
  --bg: #0f0b1f;
  --bg-alt: #160f2e;
  --surface: #1f1740;
  --surface-2: #2a2054;
  --border: #3a2f6b;
  --text: #f4f1ff;
  --muted: #b3a9d9;

  --pink: #ff5e8a;
  --violet: #7c5cff;
  --cyan: #2fd4e0;
  --yellow: #ffcc3d;
  --green: #3ddc84;
  --red: #ff4d5e;

  --grad: linear-gradient(135deg, var(--pink), var(--violet));
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);

  --font-title: "Fredoka", "Trebuchet MS", sans-serif;
  --font-text: "Inter", system-ui, sans-serif;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-title); line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.no-scroll { overflow: hidden; }
[hidden] { display: none !important; } /* l'attribut hidden l'emporte toujours */

/* ---------- 3. Boutons & puces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .8em 1.4em; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(255, 94, 138, .35); }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--violet); }
.btn--small { padding: .45em 1em; font-size: .9rem; }
.btn--big { padding: 1em 2em; font-size: 1.15rem; }
.btn--green { background: var(--green); color: #0b2a17; }
.btn--red { background: var(--red); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.chip {
  padding: .45em 1em; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: .9rem;
}
.chip.is-active { background: var(--violet); border-color: var(--violet); }

.badge {
  display: inline-block; padding: .35em .9em; border-radius: 999px;
  background: rgba(124, 92, 255, .18); color: #cfc3ff; font-size: .85rem; font-weight: 600;
  margin-bottom: 1rem;
}

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}

/* ---------- 4. En-tête ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 11, 31, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: .5em; font-family: var(--font-title); font-size: 1.4rem; font-weight: 700; text-decoration: none; }
.nav-toggle { background: none; border: 0; font-size: 1.6rem; cursor: pointer; }
.nav {
  position: absolute; top: 64px; left: 0; right: 0;
  display: none; flex-direction: column; padding: 8px 16px 16px;
  background: var(--bg-alt); border-bottom: 1px solid var(--border);
}
.nav.is-open { display: flex; }
.nav a { padding: .7em 0; text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); }

/* ---------- 5. Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 72px; text-align: center; }
.hero__inner { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.2rem, 8vw, 4.2rem); }
.hero__lead { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero__stats { list-style: none; padding: 0; margin: 2.5rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; color: var(--muted); }
.hero__stats strong { color: var(--text); font-family: var(--font-title); font-size: 1.4rem; margin-right: .2em; }
.hero__blobs span {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45;
  animation: float 12s ease-in-out infinite alternate;
}
.hero__blobs span:nth-child(1) { width: 320px; height: 320px; background: var(--pink); top: -80px; left: -80px; }
.hero__blobs span:nth-child(2) { width: 280px; height: 280px; background: var(--violet); bottom: -100px; right: -60px; animation-delay: -4s; }
.hero__blobs span:nth-child(3) { width: 200px; height: 200px; background: var(--cyan); top: 40%; left: 55%; opacity: .25; animation-delay: -8s; }
@keyframes float { to { transform: translate(40px, 30px) scale(1.1); } }

/* Choix du public : entreprise / particuliers */
body:not([data-audience="perso"]) .aud-perso,
body[data-audience="perso"] .aud-pro { display: none; }
.aud-switch {
  display: inline-flex; padding: 4px; margin-bottom: 1.2rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
}
.aud-switch__btn {
  padding: .55em 1.1em; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font-weight: 600; cursor: pointer; transition: background .2s, color .2s;
}
.aud-switch__btn.is-active { background: var(--grad); color: #fff; }
.hero__inner .badge { display: table; margin: 0 auto 1rem; }
.audiences { display: grid; gap: 16px; }
.audience { border-top: 4px solid var(--c); display: flex; flex-direction: column; gap: 10px; }
.audience__icon { font-size: 2.6rem; }
.audience ul { margin: 0 0 8px; padding-left: 1.2em; color: var(--muted); }
.audience .btn { align-self: flex-start; }

/* ---------- 6. Sections ---------- */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }
.section__title { font-size: clamp(1.7rem, 5vw, 2.4rem); }
.section__lead { color: var(--muted); max-width: 620px; margin-bottom: 2rem; }

/* ---------- 7. Joueurs ---------- */
.players__form { display: flex; flex-direction: column; gap: 10px; }
.players__form input, .field {
  flex: 1; padding: .8em 1em; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); outline: none;
}
.players__form input:focus, .field:focus { border-color: var(--violet); }
.players__list { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; }
.players__list li {
  display: flex; align-items: center; gap: .4em;
  padding: .4em .5em .4em .9em; border-radius: 999px; background: var(--surface-2);
  animation: pop .25s ease;
}
.players__list li button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .9rem; padding: 0 .3em; }
.players__list li button:hover { color: var(--red); }
.players__list .empty { background: none; color: var(--muted); padding: 0; }
.players__footer { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; color: var(--muted); }
.players__footer div { display: flex; gap: 8px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* ---------- 8. Grille de cartes ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.tile {
  position: relative; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.tile::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c, var(--violet));
}
.tile:hover { transform: translateY(-4px); border-color: var(--c, var(--violet)); box-shadow: var(--shadow); }
.tile__icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.8rem; margin-bottom: 14px;
  background: color-mix(in srgb, var(--c, var(--violet)) 22%, transparent);
}
.tile h3 { font-size: 1.3rem; }
.tile p { color: var(--muted); margin: 0 0 14px; font-size: .95rem; }
.tile__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tile__meta span { font-size: .78rem; padding: .25em .7em; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tile.is-hidden { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

/* ---------- 9. Étapes ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps li { position: relative; padding-top: 28px; }
.steps__num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad); font-family: var(--font-title); font-weight: 700; margin-bottom: 12px;
}
.steps p { color: var(--muted); margin: 0; }

/* ---------- 10. Pied de page ---------- */
.footer { padding: 40px 0; border-top: 1px solid var(--border); color: var(--muted); text-align: center; }
.footer__small { font-size: .85rem; }

/* ---------- 11. Fenêtre modale ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 3, 14, .8); backdrop-filter: blur(6px);
  display: flex; align-items: stretch; justify-content: center;
}
.modal[hidden] { display: none; }
.modal__box {
  width: 100%; max-width: 960px; background: var(--bg-alt);
  display: flex; flex-direction: column; animation: slideUp .3s ease;
}
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal__head h2 { margin: 0; font-size: 1.4rem; }
.modal__close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 1.1rem; }
.modal__body { flex: 1; overflow-y: auto; padding: 20px 16px 32px; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } }

/* ---------- 12. Éléments communs aux outils/jeux ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.center { text-align: center; justify-content: center; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .9rem; }
.big-text { font-family: var(--font-title); font-size: clamp(1.6rem, 6vw, 2.8rem); line-height: 1.2; }
.huge { font-family: var(--font-title); font-size: clamp(3.5rem, 18vw, 8rem); line-height: 1; font-variant-numeric: tabular-nums; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.label { font-size: .85rem; color: var(--muted); display: block; margin-bottom: 4px; }
select.field { appearance: auto; }

/* Équipes */
.teams { display: grid; grid-template-columns: 1fr; gap: 12px; }
.team { border-radius: var(--radius); padding: 16px; background: var(--surface); border-top: 5px solid var(--c); animation: pop .3s ease both; }
.team h3 { color: var(--c); margin-bottom: .4em; }
.team ul { margin: 0; padding-left: 1.1em; }

/* Roue */
.wheel-wrap { position: relative; width: min(100%, 420px); margin: 0 auto; aspect-ratio: 1; }
.wheel-wrap canvas { width: 100%; height: 100%; transition: transform 4.5s cubic-bezier(.17, .67, .2, 1); }
.wheel-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent;
  border-top: 30px solid var(--yellow); filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); z-index: 2;
}
.wheel-result { min-height: 2.6em; }

/* Chrono */
.timer-display.is-low { color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.progress { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > div { height: 100%; background: var(--grad); width: 100%; transition: width .25s linear; }

/* Scores */
.score-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); }
.score-row__name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-row__pts { font-family: var(--font-title); font-size: 1.6rem; min-width: 2.5ch; text-align: center; }
.score-row.is-first { outline: 2px solid var(--yellow); }
.round-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; font-size: 1.2rem; font-weight: 700; background: var(--surface-2); }
.round-btn--plus { background: var(--green); color: #0b2a17; }

/* Dés */
.dice { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.die {
  width: 90px; height: 90px; border-radius: 18px; background: #fff; color: #1a1033;
  display: grid; place-items: center; font-size: 3.5rem; box-shadow: var(--shadow);
}
.die.is-rolling { animation: roll .5s ease; }
@keyframes roll { 0% { transform: rotate(0) scale(.8); } 50% { transform: rotate(200deg) scale(1.1); } 100% { transform: rotate(360deg) scale(1); } }

/* Cartes de question */
.qcard {
  border-radius: 24px; padding: 32px 24px; text-align: center;
  background: var(--grad); box-shadow: var(--shadow); animation: pop .3s ease;
  min-height: 200px; display: flex; flex-direction: column; justify-content: center; gap: 12px;
}
.qcard__tag { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; opacity: .85; font-weight: 600; }

/* Quiz */
.answers { display: grid; grid-template-columns: 1fr; gap: 10px; }
.answer {
  padding: 16px; border-radius: var(--radius-sm); border: 2px solid var(--border);
  background: var(--surface); cursor: pointer; text-align: left; font-weight: 600; font-size: 1.05rem;
}
.answer:hover { border-color: var(--violet); }
.answer.is-good { background: var(--green); border-color: var(--green); color: #0b2a17; }
.answer.is-bad { background: var(--red); border-color: var(--red); opacity: .8; }

/* Tu préfères */
.wyr { display: grid; grid-template-columns: 1fr; gap: 12px; }
.wyr__opt {
  position: relative; overflow: hidden; border: 0; border-radius: var(--radius); padding: 28px 20px;
  font-family: var(--font-title); font-size: 1.35rem; cursor: pointer; color: #fff; min-height: 130px;
}
.wyr__opt:nth-child(1) { background: var(--pink); }
.wyr__opt:nth-child(3) { background: var(--violet); }
.wyr__or { text-align: center; font-family: var(--font-title); color: var(--muted); }
.wyr__bar { position: absolute; left: 0; bottom: 0; height: 8px; background: rgba(255,255,255,.7); transition: width .4s; }
.wyr__count { display: block; font-family: var(--font-text); font-size: .9rem; margin-top: 8px; opacity: .9; }

/* Duel réflexe */
.duel { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; height: min(70vh, 560px); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.duel__side {
  border-radius: var(--radius); display: grid; place-items: center; text-align: center; cursor: pointer;
  font-family: var(--font-title); font-size: 1.4rem; padding: 12px; transition: background .1s;
}
.duel__side:first-child { transform: rotate(180deg); }
.duel__side.p1 { background: color-mix(in srgb, var(--pink) 35%, var(--surface)); }
.duel__side.p2 { background: color-mix(in srgb, var(--cyan) 35%, var(--surface)); }
.duel.is-go .duel__side { background: var(--green); color: #0b2a17; }
.duel__side.is-win { background: var(--yellow) !important; color: #1a1033; }
.duel__side.is-lose { background: var(--surface) !important; color: var(--muted); }
.duel__score { display: block; font-size: 2.5rem; }

/* Bombe */
.bomb { font-size: 7rem; text-align: center; line-height: 1; }
.bomb.is-ticking { animation: shake .3s infinite; }
.bomb.is-boom { animation: boom .6s ease; }
@keyframes shake { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes boom { 0% { transform: scale(1); } 50% { transform: scale(2); } 100% { transform: scale(1.3); } }

/* Compte à rebours "Qui de nous" */
.countdown { font-family: var(--font-title); font-size: 6rem; text-align: center; animation: pop .4s ease; }

/* Blind test */
.bt-stage {
  min-height: 190px; border-radius: 24px; padding: 24px; text-align: center;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, #e05cff 35%, var(--surface)), var(--surface));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  animation: pop .3s ease;
}
.bt-cover { width: 140px; height: 140px; border-radius: 16px; box-shadow: var(--shadow); object-fit: cover; }
.eq { display: flex; align-items: flex-end; gap: 6px; height: 70px; }
.eq span { width: 10px; height: 12px; border-radius: 6px; background: var(--grad); }
.eq.is-playing span { animation: eq 0.9s ease-in-out infinite alternate; }
.eq span:nth-child(2n) { animation-delay: -.3s !important; }
.eq span:nth-child(3n) { animation-delay: -.6s !important; animation-duration: .7s !important; }
.eq span:nth-child(5n) { animation-delay: -.15s !important; animation-duration: 1.1s !important; }
@keyframes eq { from { height: 10px; } to { height: 70px; } }
.bt-scores { border-top: 1px solid var(--border); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.bt-score {
  display: inline-flex; gap: .5em; align-items: center; padding: .5em 1em; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 18%, var(--surface)); font-weight: 600;
  user-select: none; -webkit-user-select: none;
}
.bt-score strong { font-family: var(--font-title); font-size: 1.15rem; }
.bt-score:active { transform: scale(.95); }

/* ===== Jeux de société ===== */
.section--board { background: radial-gradient(ellipse at 20% 0%, rgba(255, 204, 61, .12), transparent 60%), var(--bg-alt); }
.grid--board .tile { padding: 26px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 20%, var(--surface)), var(--surface) 60%); }
.grid--board .tile__icon { width: 72px; height: 72px; font-size: 2.4rem; }
.grid--board .tile:first-child { border-color: color-mix(in srgb, var(--c) 60%, var(--border)); }

.pawn-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex-shrink: 0; display: inline-block; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.team-inputs { display: grid; grid-template-columns: 1fr; gap: 8px; }
.team-input { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: var(--radius-sm); background: var(--surface); border-left: 4px solid var(--c); }
.team-input .field { flex: 1; min-width: 0; }
.team-input__name { flex: 1; font-weight: 600; }
.team-input__name + .field { max-width: 160px; }

/* Plateau */
.plateau { display: grid; gap: 16px; }
.board { display: grid; gap: 5px; padding: 10px; border-radius: 20px; background: #120c28; border: 1px solid var(--border); }
.cell {
  position: relative; aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 30%, #1a1238); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
}
.cell--plain { background: #1c1540; border-color: #2a2054; }
.cell--start, .cell--end { background: color-mix(in srgb, var(--c) 55%, #1a1238); }
.cell--end { box-shadow: 0 0 20px color-mix(in srgb, var(--c) 60%, transparent); }
.cell__n { position: absolute; top: 2px; left: 5px; font-size: .62rem; color: rgba(255,255,255,.45); }
.cell__icon { font-size: clamp(1rem, 3.6vw, 1.5rem); opacity: .9; }
.cell__pawns { position: absolute; inset: auto 2px 2px 2px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.pawn {
  width: 20px; height: 20px; border-radius: 50%; background: var(--c); border: 2px solid #fff;
  display: grid; place-items: center; font-size: .62rem; font-weight: 700; color: #1a1033;
  box-shadow: 0 3px 6px rgba(0,0,0,.5); animation: hop .25s ease;
}
.pawn.is-turn { outline: 3px solid var(--c); outline-offset: 2px; z-index: 2; }
@keyframes hop { 40% { transform: translateY(-10px) scale(1.15); } }
.pl-side { display: flex; flex-direction: column; gap: 14px; }
.pl-turn { display: flex; align-items: center; gap: 10px; justify-content: center; font-family: var(--font-title); font-size: 1.35rem; }
.pl-side .die { width: 76px; height: 76px; font-size: 3rem; }
.pl-teams { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pl-teams li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface); font-size: .9rem; }
.pl-teams li.is-turn { outline: 2px solid var(--c); }
.pl-teams__name { width: 34%; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-teams__bar { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pl-teams__bar span { display: block; height: 100%; background: var(--c); transition: width .3s; }

/* Carte défi par-dessus le jeu */
.bg-pop { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: rgba(5, 3, 14, .7); backdrop-filter: blur(4px); animation: fadeIn .2s; }
.bg-pop__card {
  width: min(100%, 520px); max-height: calc(100vh - 32px); overflow-y: auto; text-align: center;
  background: var(--bg-alt); border: 2px solid var(--c); border-radius: 24px; padding: 24px 20px;
  box-shadow: 0 0 60px color-mix(in srgb, var(--c) 40%, transparent); animation: cardIn .4s cubic-bezier(.2, 1.4, .4, 1);
  display: flex; flex-direction: column; gap: 12px;
}
.bg-pop__card h3 { color: var(--c); font-size: 1.6rem; margin: 0; }
.bg-pop__card p { margin: 0; }
.bg-pop__card .answers { grid-template-columns: 1fr; }
.bg-pop__icon { font-size: 3.2rem; line-height: 1; }
.secret { font-family: var(--font-title); font-size: 1.8rem; padding: 16px; border-radius: 16px; background: color-mix(in srgb, var(--c) 25%, var(--surface)); }
.cd { display: flex; flex-direction: column; gap: 6px; }
.cd-bar { height: 100%; width: 100%; background: var(--c); transition: width 1s linear; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes cardIn { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }

/* L'Intrus */
.rules { margin: 0; padding-left: 1.3em; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.rules strong { color: var(--text); }
.pass-card, .secret-card { border-radius: 24px; padding: 32px 20px; background: var(--surface); border: 2px dashed var(--border); }
.secret-card { background: var(--grad); border: 0; animation: cardIn .4s cubic-bezier(.2, 1.4, .4, 1); }
.secret-card.is-intrus { background: linear-gradient(135deg, #1a1033, #3a1f4f); border: 2px solid var(--pink); }
.talk-order { margin: 0; padding: 0; list-style: none; counter-reset: o; display: flex; flex-wrap: wrap; gap: 8px; }
.talk-order li { counter-increment: o; padding: .45em .9em; border-radius: 999px; background: var(--surface-2); font-weight: 600; }
.talk-order li::before { content: counter(o) ". "; color: var(--pink); }
.vote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.vote-btn { padding: 22px 10px; border-radius: 16px; border: 2px solid var(--border); background: var(--surface); font-family: var(--font-title); font-size: 1.15rem; cursor: pointer; }
.vote-btn:hover { border-color: var(--pink); transform: translateY(-2px); }
.reveal-role { font-family: var(--font-title); font-size: clamp(2.2rem, 10vw, 4rem); padding: 24px; border-radius: 24px; background: var(--surface); animation: cardIn .5s cubic-bezier(.2, 1.4, .4, 1); }
.reveal-role.is-intrus { background: var(--grad); }
.role-chip { padding: .35em .8em; border-radius: 999px; background: var(--surface-2); }
.role-chip.is-intrus { background: var(--pink); color: #fff; font-weight: 600; }

/* Le Bon Chiffre : ligne graduée */
.numline { position: relative; height: 190px; margin: 0 8px; }
.numline__axis { position: absolute; left: 0; right: 0; top: 50%; height: 4px; border-radius: 4px; background: var(--surface-2); }
.numline__answer { position: absolute; top: 8%; bottom: 8%; width: 4px; margin-left: -2px; background: var(--yellow); border-radius: 4px; box-shadow: 0 0 16px var(--yellow); }
.numline__answer span { position: absolute; top: -6px; left: 50%; transform: translate(-50%, -100%); font-size: 1.4rem; }
.numline__mark { position: absolute; left: 0; top: 50%; width: 18px; height: 18px; margin: -7px 0 0 -9px; border-radius: 50%; background: var(--c); border: 3px solid #fff; transition: left 1.2s cubic-bezier(.2, .8, .2, 1); }
.numline__label {
  position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; text-align: center;
  font-size: .75rem; line-height: 1.2; padding: 3px 7px; border-radius: 8px; background: var(--c); color: #1a1033;
  bottom: calc(100% + 6px + var(--row) * 38px);
}
.gain { font-family: var(--font-title); color: var(--green); font-size: 1.2rem; animation: pop .4s ease; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; }
.podium__step {
  width: 30%; max-width: 160px; display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: flex-start;
  padding: 14px 8px; border-radius: 16px 16px 6px 6px; background: color-mix(in srgb, var(--c) 35%, var(--surface)); border-top: 4px solid var(--c);
  animation: rise .7s cubic-bezier(.2, 1.2, .4, 1) both;
}
.podium__step--1 { order: 2; height: 200px; animation-delay: .4s; }
.podium__step--2 { order: 1; height: 160px; animation-delay: .2s; }
.podium__step--3 { order: 3; height: 125px; }
.podium__medal { font-size: 2.2rem; }
@keyframes rise { from { transform: translateY(60px); opacity: 0; } }

/* Ciné Pixel */
.cine { display: grid; gap: 16px; }
.cine__screen {
  position: relative; justify-self: center; width: min(100%, 340px); padding: 10px; border-radius: 18px;
  background: #07040f; box-shadow: 0 0 0 3px #2a2054, 0 20px 50px rgba(0,0,0,.5);
}
.cine__screen canvas { display: block; width: 100%; height: auto; border-radius: 10px; image-rendering: pixelated; }
.cine__screen canvas.is-flash { animation: flash .35s ease; }
.cine__screen canvas.is-reveal { animation: cardIn .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes flash { from { filter: brightness(1.8); } }
.cine__stake {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: .3em .9em; border-radius: 999px; background: rgba(0,0,0,.75); color: var(--yellow);
  font-family: var(--font-title); font-size: 1.05rem;
}
.cine__stake:empty { display: none; }
.cine__levels { display: flex; gap: 4px; }
.cine__levels span { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-2); transition: background .3s; }
.cine__levels span.is-on { background: var(--yellow); }
.cine__title { font-family: var(--font-title); font-size: clamp(1.5rem, 5vw, 2.2rem); text-align: center; color: var(--yellow); animation: pop .4s ease; }
.answers--one { grid-template-columns: 1fr !important; }
.bt-score:disabled { opacity: .55; cursor: default; }
.bt-score.is-out { text-decoration: line-through; opacity: .4; }

/* ===== Partie en ligne : bannière de la page d'accueil ===== */
.section--online { padding-top: 24px; }
.online-banner {
  display: grid; gap: 24px; padding: 28px 20px; border-radius: 28px; overflow: hidden;
  background: radial-gradient(circle at 85% 30%, rgba(47, 212, 224, .25), transparent 50%), linear-gradient(135deg, #2a1660, #1a1238);
  border: 1px solid #4a3a8a;
}
.online-banner .section__lead { margin-bottom: 1rem; }
.online-banner__list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 8px; }
.online-banner__list li { padding: .35em .8em; border-radius: 999px; background: rgba(255,255,255,.08); font-size: .9rem; }
.online-banner__visual { position: relative; height: 220px; display: grid; place-items: center; }
.ob-screen {
  width: 220px; height: 130px; border-radius: 14px; background: #0f0b1f; border: 4px solid #3a2f6b;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: var(--shadow);
}
.ob-screen span { font-family: var(--font-title); font-size: 2.4rem; letter-spacing: .2em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ob-screen small { color: var(--muted); }
.ob-phone {
  position: absolute; bottom: 0; left: 50%; width: 70px; height: 120px; padding: 10px 7px; border-radius: 14px;
  background: #0f0b1f; border: 3px solid #4a3a8a; display: grid; grid-template-columns: 1fr 1fr; gap: 5px;
  transform: translateX(calc(-50% + var(--x))) rotate(var(--r)); animation: phoneFloat 3s ease-in-out infinite alternate;
}
.ob-phone:last-child { animation-delay: -1.5s; }
.ob-phone i { border-radius: 5px; background: var(--c); }
@keyframes phoneFloat { to { translate: 0 -10px; } }

/* ===== Partie en ligne : écran hôte ===== */
.on-lobby { display: grid; gap: 20px; }
.on-join { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px; border-radius: 20px; background: var(--surface); }
.on-join .label { margin: 0; }
.on-url { font-family: var(--font-title); font-size: 1.15rem; margin: 0; word-break: break-all; }
.on-code { display: flex; gap: 8px; }
.on-code span {
  width: 58px; height: 70px; display: grid; place-items: center; border-radius: 14px;
  font-family: var(--font-title); font-size: 2.6rem; background: var(--grad); color: #fff; box-shadow: var(--shadow);
}
.on-qr { width: 170px; background: #fff; padding: 6px; border-radius: 12px; margin-top: 6px; }
.on-qr svg { display: block; width: 100%; height: auto; }
.on-warn { font-size: .82rem; color: var(--yellow); background: rgba(255, 204, 61, .1); border-radius: 10px; padding: 8px 10px; margin: 6px 0 0; }
.on-players { padding: 14px; border-radius: 16px; background: var(--surface); }
.on-players__list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 36px; }
.on-player { display: inline-flex; align-items: center; gap: 6px; padding: .4em .9em; border-radius: 999px; background: color-mix(in srgb, var(--c) 22%, var(--surface-2)); font-weight: 600; animation: pop .3s ease; }
.on-player small { color: var(--muted); }
.on-player.is-off { opacity: .4; }
.on-waiting { animation: pulse 1.6s infinite; }
.on-games { display: grid; gap: 8px; }
.on-game {
  display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  background: var(--surface); border: 2px solid transparent;
}
.on-game:hover, .on-game.is-active { border-color: var(--c); background: color-mix(in srgb, var(--c) 15%, var(--surface)); }
.on-game__icon { font-size: 1.8rem; }
.on-game strong { display: block; }
.on-game .muted { font-size: .85rem; }

.on-qhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.on-code-mini { font-size: .85rem; color: var(--muted); }
.on-code-mini strong { color: var(--text); letter-spacing: .1em; }
.on-question { font-family: var(--font-title); font-size: clamp(1.4rem, 4.5vw, 2.3rem); text-align: center; margin: 18px 0; line-height: 1.2; }
.on-opts { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
.on-opt {
  display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px;
  background: var(--c); color: #fff; font-weight: 700; font-size: 1.1rem; transition: opacity .3s, transform .3s;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.on-opt__shape { font-size: 1.5rem; }
.on-opt__txt { flex: 1; }
.on-opt__n { font-family: var(--font-title); }
.on-opt.is-dim { opacity: .3; }
.on-opt.is-good { transform: scale(1.03); box-shadow: 0 0 0 4px #fff, 0 0 30px var(--c); }
.on-opts--small .on-opt { padding: 12px; font-size: .95rem; }
.on-cine { display: grid; gap: 14px; align-items: start; }
.on-cine .cine__screen { width: min(100%, 300px); }
.on-qfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.on-who { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.on-dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700;
  background: var(--surface-2); color: var(--muted); border: 2px solid var(--c); transition: background .2s;
}
.on-dot.is-in { background: var(--c); color: #1a1033; animation: pop .3s ease; }
.on-wyr { display: grid; gap: 12px; }
.on-wyr__side { padding: 22px; border-radius: 18px; background: var(--c); color: #fff; text-align: center; font-family: var(--font-title); font-size: 1.3rem; }
.on-wyr__side p { margin: 6px 0; }
.on-wyr__or { text-align: center; font-family: var(--font-title); color: var(--muted); align-self: center; }
.on-wyr__pct { font-size: 2.4rem; animation: pop .4s ease; }
.on-wyr__names { font-family: var(--font-text); font-size: .85rem; opacity: .9; }
.on-lb { margin-top: 18px; padding: 16px; border-radius: 18px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; animation: slideUp .4s ease; }
.on-lb .label { margin: 0 0 4px; }
.on-lb__row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--bg-alt); animation: slideUp .4s ease both; }
.on-lb__rank { font-family: var(--font-title); width: 1.6em; color: var(--muted); }
.on-lb__name { flex: 1; font-weight: 600; }
.on-lb .row { margin-top: 8px; }

/* ===== Manette (téléphone) ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pad-body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.pad-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.pad-head .logo { font-size: 1.15rem; }
.pad-me { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.pad-me strong { font-family: var(--font-title); padding: .1em .6em; border-radius: 999px; background: var(--surface-2); }
.pad-main { flex: 1; display: flex; flex-direction: column; padding: 16px; gap: 14px; max-width: 560px; width: 100%; margin: 0 auto; }
.pad-join { display: flex; flex-direction: column; gap: 14px; margin: auto 0; }
.pad-join .field { width: 100%; font-size: 1.1rem; }
.pad-code { text-align: center; font-family: var(--font-title); font-size: 2.2rem !important; letter-spacing: .4em; text-transform: uppercase; }
.pad-big { font-size: 4.5rem; text-align: center; line-height: 1; }
.pad-float { animation: phoneFloat 1.5s ease-in-out infinite alternate; }
.pad-state { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.pad-state .big-text { margin: 0; }
.pad-prompt { font-family: var(--font-title); font-size: 1.25rem; text-align: center; margin: 0; }
.pad-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 60vh; }
.pad-grid--two { grid-template-columns: 1fr; }
.pad-btn {
  border: 0; border-radius: 18px; background: var(--c); color: #fff; cursor: pointer; padding: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 1rem; text-shadow: 0 1px 2px rgba(0,0,0,.35); box-shadow: 0 6px 0 rgba(0,0,0,.25);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.pad-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.pad-btn__shape { font-size: 2.6rem; line-height: 1; }
.pad-btn__txt { line-height: 1.25; }
.pad-chosen { font-family: var(--font-title); font-size: 1.3rem; margin: 0; }
.pad-number { display: flex; flex-direction: column; gap: 12px; margin: auto 0; align-items: stretch; text-align: center; }
.pad-number .field { font-size: 2rem; text-align: center; font-family: var(--font-title); }
.pad-result.is-ok .big-text { color: var(--green); }
.pad-result.is-ko .big-text { color: var(--red); }
.pad-gain { font-family: var(--font-title); font-size: 3rem; color: var(--green); margin: 0; animation: pop .4s ease; }

/* ===== Nouveaux jeux ===== */

/* Mémo Party : cartes qui se retournent en 3D */
.memo-wrap { display: grid; gap: 16px; }
.memo { display: grid; gap: 8px; perspective: 900px; }
.memo-card { aspect-ratio: 3 / 4; border: 0; padding: 0; background: none; cursor: pointer; }
.memo-card__inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); transform-style: preserve-3d; }
.memo-card.is-up .memo-card__inner { transform: rotateY(180deg); }
.memo-card__back, .memo-card__front {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; backface-visibility: hidden;
}
.memo-card__back {
  background: var(--grad); color: rgba(255,255,255,.85); font-family: var(--font-title); font-size: clamp(1.2rem, 4vw, 2rem);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.25), 0 4px 10px rgba(0,0,0,.3);
}
.memo-card__front { background: #fff; transform: rotateY(180deg); font-size: clamp(1.6rem, 6vw, 3rem); box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.memo-card.is-match .memo-card__front { background: #d9ffe9; box-shadow: 0 0 0 3px var(--green), 0 0 20px var(--green); animation: pop .4s ease; }
.memo-side { display: flex; flex-direction: column; gap: 8px; }

/* Croquis Express */
.croquis { display: flex; flex-direction: column; gap: 10px; }
.croquis__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cr-peek { user-select: none; -webkit-user-select: none; touch-action: none; min-width: 0; }
.cr-peek.is-on { background: var(--yellow); color: #1a1033; border-color: var(--yellow); font-weight: 700; }
.croquis__board { border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 0 0 3px var(--border); }
.croquis__board canvas { display: block; width: 100%; touch-action: none; cursor: crosshair; }
.croquis__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: center; }
.cr-color { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface); background: var(--c); cursor: pointer; box-shadow: 0 0 0 1px var(--border); }
.cr-color.is-active { border-color: #fff; transform: scale(1.15); }
.cr-size, .cr-tool { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; display: grid; place-items: center; font-size: 1.1rem; }
.cr-size span { display: block; border-radius: 50%; background: var(--text); }
.cr-size.is-active, .cr-tool.is-active { border-color: var(--yellow); background: var(--surface-2); }
.cr-sep { width: 1px; height: 26px; background: var(--border); margin: 0 4px; }

/* Duel de Calcul */
.calc { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; height: min(72vh, 600px); user-select: none; -webkit-user-select: none; }
.calc__side { border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 10px; transition: background .2s; }
.calc__side--0 { background: color-mix(in srgb, var(--pink) 25%, var(--surface)); transform: rotate(180deg); }
.calc__side--1 { background: color-mix(in srgb, var(--cyan) 25%, var(--surface)); }
.calc__side.is-wrong { background: var(--red); animation: shake .3s 2; }
.calc__side.is-win { background: var(--yellow); color: #1a1033; }
.calc__side.is-lose { opacity: .4; }
.calc__head { display: flex; justify-content: space-between; font-family: var(--font-title); font-size: 1.1rem; }
.calc__bar { height: 8px; border-radius: 99px; background: rgba(0,0,0,.3); overflow: hidden; }
.calc__bar div { height: 100%; width: 0; background: var(--green); transition: width .3s; }
.calc__op { flex: 1; display: grid; place-items: center; font-family: var(--font-title); font-size: clamp(2rem, 9vw, 3.5rem); }
.calc__opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.calc__btn {
  padding: 16px 0; border-radius: 14px; border: 0; background: var(--bg); color: var(--text); cursor: pointer;
  font-family: var(--font-title); font-size: 1.6rem; box-shadow: 0 5px 0 rgba(0,0,0,.35); touch-action: manipulation;
}
.calc__btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.35); }

/* Le Pendu Party */
.pendu { display: grid; gap: 16px; }
.pendu__left { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pendu__draw { width: 160px; height: 200px; border-radius: 18px; background: #120c28; padding: 14px; box-shadow: inset 0 0 0 1px var(--border); }
.pendu-svg { width: 100%; height: 100%; stroke: var(--pink); stroke-width: 4; stroke-linecap: round; fill: none; filter: drop-shadow(0 0 4px var(--pink)); }
.pendu-svg > * { animation: fadeIn .4s ease; }
.pendu__lives { color: var(--muted); font-size: .9rem; }
.pendu__word { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pendu__word span {
  width: clamp(26px, 7vw, 42px); height: clamp(36px, 9vw, 54px); display: grid; place-items: center;
  border-bottom: 4px solid var(--border); font-family: var(--font-title); font-size: clamp(1.3rem, 5vw, 2rem);
}
.pendu__word span.is-on { border-color: var(--violet); animation: pop .3s ease; }
.pendu__word span.is-missed { color: var(--red); }
.kbd { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.kbd__key {
  aspect-ratio: 1; border-radius: 8px; border: 0; background: var(--surface-2); color: var(--text); cursor: pointer;
  font-family: var(--font-title); font-size: clamp(.9rem, 3vw, 1.2rem);
}
.kbd__key:nth-child(n+21) { transform: translateX(50%); }
.kbd__key.is-good { background: var(--green); color: #0b2a17; }
.kbd__key.is-bad { background: var(--red); opacity: .5; }
.kbd__key:disabled { cursor: default; }

/* Écho */
.echo { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.echo.is-wrong .echo__pads { animation: shake .3s 2; }
.echo__pads { position: relative; width: min(84vw, 340px); aspect-ratio: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.echo__pad {
  border: 0; cursor: pointer; background: color-mix(in srgb, var(--c) 40%, #120c28); transition: background .1s, box-shadow .1s, transform .1s;
  touch-action: manipulation;
}
.echo__pad:nth-child(1) { border-radius: 100% 12px 12px 12px; }
.echo__pad:nth-child(2) { border-radius: 12px 100% 12px 12px; }
.echo__pad:nth-child(3) { border-radius: 12px 12px 12px 100%; }
.echo__pad:nth-child(4) { border-radius: 12px 12px 100% 12px; }
.echo__pad.is-lit { background: var(--c); box-shadow: 0 0 40px var(--c); transform: scale(1.03); }
.echo__center {
  position: absolute; inset: 0; margin: auto; width: 34%; height: 34%; border-radius: 50%; background: var(--bg);
  display: grid; place-items: center; font-family: var(--font-title); font-size: 2.2rem; box-shadow: 0 0 0 6px var(--bg-alt); pointer-events: none;
}
.bt-score.is-active { box-shadow: 0 0 0 3px #fff; }

/* Morpion Ultime */
.ultimate-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ultimate { width: min(100%, 520px); aspect-ratio: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; border-radius: 18px; background: #120c28; }
.ult-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 4px; border-radius: 10px; background: var(--surface); transition: box-shadow .2s, background .2s; }
.ult-grid.is-playable { background: color-mix(in srgb, var(--pc) 18%, var(--surface)); box-shadow: 0 0 0 2px var(--pc), 0 0 18px color-mix(in srgb, var(--pc) 50%, transparent); }
.ult-cell { border: 0; border-radius: 5px; background: var(--bg-alt); cursor: pointer; font-family: var(--font-title); font-size: clamp(.9rem, 3.5vw, 1.4rem); font-weight: 700; padding: 0; }
.ult-cell.is-set { animation: pop .25s ease; }
.ult-grid:not(.is-playable) .ult-cell { cursor: default; }
.ult-win { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(3rem, 14vw, 6rem); font-weight: 700; pointer-events: none; text-shadow: 0 0 20px currentColor; }
.ult-grid.is-won .ult-cell { opacity: .2; }

/* Le Coffre-fort */
.coffre { display: grid; gap: 18px; }
.coffre__vault { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vault {
  position: relative; width: min(100%, 320px); padding: 22px 16px 18px; border-radius: 24px;
  background: linear-gradient(145deg, #4a4f63, #262a38); box-shadow: inset 0 2px 0 rgba(255,255,255,.15), 0 14px 30px rgba(0,0,0,.5), 0 0 0 6px #1a1d27;
  display: flex; flex-direction: column; align-items: center; gap: 14px; transition: transform .8s cubic-bezier(.3, 1.3, .5, 1);
}
.vault.is-open { transform: perspective(800px) rotateY(-28deg); box-shadow: 0 0 60px var(--yellow), 0 0 0 6px var(--yellow); }
.vault__dial {
  width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, #c9ccd6 0 30%, #8a8fa0 31% 60%, #5b6070 61%);
  box-shadow: 0 4px 10px rgba(0,0,0,.5); position: relative; transition: transform .8s cubic-bezier(.3, 1.4, .5, 1);
}
.vault__dial span { position: absolute; top: 6px; left: 50%; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--red); }
.vault__slots { display: flex; gap: 8px; }
.vault__slots span {
  width: 44px; height: 54px; border-radius: 10px; background: #0d0f15; display: grid; place-items: center;
  font-family: var(--font-title); font-size: 1.8rem; color: var(--green); box-shadow: inset 0 2px 6px rgba(0,0,0,.7); text-shadow: 0 0 10px var(--green);
}
.vault__slots span.is-on { animation: pop .2s ease; }
.keypad { display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; }
.keypad__k {
  height: 54px; border-radius: 14px; border: 0; background: var(--surface-2); color: var(--text); cursor: pointer;
  font-family: var(--font-title); font-size: 1.5rem; box-shadow: 0 4px 0 rgba(0,0,0,.35);
}
.keypad__k:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.keypad__k:disabled { opacity: .3; cursor: default; }
.keypad__k--ok { background: var(--green); color: #0b2a17; }
.keypad__k--del { background: var(--surface); }
.coffre__log { padding: 14px; border-radius: 18px; background: var(--surface); max-height: 420px; overflow-y: auto; }
.coffre__list { display: flex; flex-direction: column; gap: 6px; }
.co-try { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--bg-alt); border-left: 4px solid var(--c); animation: slideUp .3s ease; }
.co-try__team { flex: 1; font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-try__code { font-family: var(--font-title); font-size: 1.3rem; letter-spacing: .1em; }
.co-try__hint { min-width: 80px; text-align: right; }

/* En ligne : Dico des Menteurs, Petit Bac, Réflexe */
.dico-word { text-align: center; padding: 18px; border-radius: 22px; background: var(--grad); margin: 14px 0; }
.dico-word p { font-family: var(--font-title); font-size: clamp(2rem, 8vw, 3.6rem); margin: 4px 0 0; word-break: break-word; }
.dico-word--small p { font-size: clamp(1.5rem, 5vw, 2.2rem); }
.dico-list { display: flex; flex-direction: column; gap: 8px; }
.dico-opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface); transition: background .3s; }
.dico-opt__n { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-family: var(--font-title); }
.dico-opt__txt { flex: 1; }
.dico-opt__res { text-align: right; font-weight: 600; font-size: .9rem; display: flex; flex-direction: column; }
.dico-opt__res small { color: var(--muted); font-weight: 400; }
.dico-opt.is-real { background: color-mix(in srgb, var(--green) 30%, var(--surface)); box-shadow: 0 0 0 2px var(--green); }
.dico-opt.is-fake .dico-opt__res { color: var(--pink); }
.bac-letter {
  width: 120px; height: 120px; margin: 14px auto; border-radius: 28px; display: grid; place-items: center;
  background: var(--grad); font-family: var(--font-title); font-size: 4.5rem; box-shadow: var(--shadow); animation: cardIn .5s cubic-bezier(.2, 1.4, .4, 1);
}
.bac-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 10px; }
.bac-cats span { padding: .4em 1em; border-radius: 999px; background: var(--surface-2); font-weight: 600; }
.bac-scroll { overflow-x: auto; margin: 8px 0 12px; }
.bac-table { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: .9rem; }
.bac-table th { text-align: left; color: var(--muted); font-weight: 500; font-size: .8rem; padding: 0 4px; }
.bac-table td { white-space: nowrap; }
.bac-cell { width: 100%; padding: 6px 8px; border-radius: 8px; border: 0; cursor: pointer; text-align: left; font-weight: 600; }
.bac-cell.is-ok { background: color-mix(in srgb, var(--green) 30%, var(--surface)); color: var(--text); }
.bac-cell.is-ko { background: color-mix(in srgb, var(--red) 25%, var(--surface)); color: var(--muted); text-decoration: line-through; }
.bac-cell.is-empty { background: var(--surface); color: var(--muted); cursor: default; }
.flash-zone {
  margin-top: 14px; height: 200px; border-radius: 24px; display: grid; place-items: center; text-align: center;
  background: color-mix(in srgb, var(--red) 40%, var(--surface)); font-family: var(--font-title); font-size: clamp(1.6rem, 6vw, 2.6rem);
  transition: background .1s;
}
.flash-zone.is-go { background: var(--green); color: #0b2a17; }

/* Manette : nouveaux types de réponse */
.pad-grid--list { grid-template-columns: 1fr !important; min-height: 0; }
.pad-grid--list .pad-btn { flex-direction: row; justify-content: flex-start; text-align: left; padding: 14px; }
.pad-grid--list .pad-btn__shape { font-size: 1.4rem; }
.pad-btn.is-mine { opacity: .35; cursor: default; }
.pad-tap {
  flex: 1; min-height: 60vh; border: 0; border-radius: 28px; background: var(--red); color: #fff; cursor: pointer;
  font-family: var(--font-title); font-size: 2.6rem; touch-action: manipulation; transition: background .05s;
}
.pad-tap.is-go { background: var(--green); color: #0b2a17; }
.pad-letter {
  width: 90px; height: 90px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center;
  background: var(--grad); font-family: var(--font-title); font-size: 3.4rem;
}
.pad-text { display: flex; flex-direction: column; gap: 10px; }
.pad-text .field { width: 100%; font-size: 1.05rem; }
.pad-text textarea.field { resize: none; }

/* ===== 3ᵉ série de jeux ===== */

/* Défis Express */
.defi-card {
  border-radius: 26px; padding: 22px; display: flex; flex-direction: column; gap: 16px; text-align: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 45%, var(--surface)), var(--surface) 75%);
  border: 2px solid var(--c); box-shadow: 0 0 40px color-mix(in srgb, var(--c) 30%, transparent); animation: cardIn .45s cubic-bezier(.2, 1.4, .4, 1);
}
.defi-card__head { display: flex; justify-content: space-between; font-weight: 600; }
.defi-card__pts { color: var(--yellow); }
.defi-card__txt { font-family: var(--font-title); font-size: clamp(1.4rem, 4.5vw, 2.1rem); line-height: 1.25; margin: 0; }
.defi-card__time { display: flex; flex-direction: column; gap: 8px; }

/* Emoji Mystère */
.emoji-big { font-size: clamp(3.5rem, 15vw, 7rem); text-align: center; letter-spacing: .1em; margin: 18px 0; line-height: 1.2; animation: cardIn .5s cubic-bezier(.2, 1.4, .4, 1); }

/* Plus ou Moins : cartes à jouer */
.pm { display: grid; gap: 18px; }
.pm__table {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 16px; border-radius: 26px;
  background: radial-gradient(ellipse at 50% 30%, #1f7a4d, #0e3d27); box-shadow: inset 0 0 0 8px #6b4423, inset 0 0 0 10px #3d2614, 0 14px 30px rgba(0,0,0,.4);
}
.pm__cards { position: relative; width: 130px; height: 185px; }
.pm__cards.is-shake { animation: shake .3s 2; }
.pcard {
  position: absolute; inset: 0; border-radius: 12px; background: #fff; color: #1a1033; box-shadow: 0 8px 18px rgba(0,0,0,.45);
  display: grid; place-items: center; font-family: var(--font-title);
}
.pcard.is-red { color: #d6283c; }
.pcard.is-new { animation: dealIn .5s cubic-bezier(.2, 1.2, .4, 1); }
.pcard__mid { font-size: 4rem; }
.pcard__corner { position: absolute; top: 8px; left: 10px; font-size: 1.15rem; line-height: 1; text-align: center; }
.pcard__corner--b { top: auto; left: auto; bottom: 8px; right: 10px; transform: rotate(180deg); }
@keyframes dealIn { from { transform: translate(140px, -40px) rotate(25deg); opacity: 0; } }
.pm__pot { font-family: var(--font-title); font-size: 1.3rem; color: #fff; padding: .3em 1em; border-radius: 999px; background: rgba(0,0,0,.3); }
.pm__pot strong { color: var(--yellow); font-size: 1.6rem; }
.pm__btn { color: #fff; min-width: 140px; }
.pm__btn--up { background: var(--green); color: #0b2a17; }
.pm__btn--down { background: var(--red); }
.pm__scores { display: flex; flex-direction: column; gap: 8px; }
.pm__scores .pl-teams__bar { flex: 1; }

/* En ligne : Classe-les !, Le Plus Probable */
.order-list { display: flex; flex-direction: column; gap: 8px; max-width: 620px; margin: 0 auto; }
.order-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px;
  background: var(--c); color: #fff; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.order-item.is-revealed { animation: slideUp .45s ease both; }
.order-item__name { flex: 1; font-size: 1.1rem; }
.order-item__info { font-family: var(--font-title); }
.order-item__rank { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.25); font-family: var(--font-title); }
.vote-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface); }
.vote-bar__name { width: 30%; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-bar__track { flex: 1; height: 14px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.vote-bar__track span { display: block; height: 100%; background: var(--c); border-radius: 99px; animation: growX .8s ease both; transform-origin: left; }
@keyframes growX { from { transform: scaleX(0); } }

/* Manette : classement */
.pad-order { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.pad-order__item {
  display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-radius: 16px; border: 0; cursor: pointer; text-align: left;
  background: var(--c); color: #fff; font-weight: 700; font-size: 1.05rem; text-shadow: 0 1px 2px rgba(0,0,0,.35); box-shadow: 0 5px 0 rgba(0,0,0,.25);
}
.pad-order__item.is-picked { opacity: .55; box-shadow: none; transform: translateY(4px); }
.pad-order__pos { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.25); font-family: var(--font-title); font-size: 1.2rem; }

/* ===== L'Affaire Belvédère (enquête) ===== */
.enq { display: grid; gap: 18px; }
.enq__main { display: flex; flex-direction: column; gap: 10px; }
.enq__main > .label { margin: 6px 0 0; }
.enq__intro {
  padding: 16px 18px; border-radius: 18px; color: #f5e9c8;
  background: linear-gradient(135deg, #2b1d0e, #4a2f14); border: 1px solid #8a6a2f; box-shadow: inset 0 0 30px rgba(0,0,0,.4);
}
.enq__intro .qcard__tag { color: #e8c46a; }
.enq__intro p { margin: 6px 0 0; font-style: italic; }
.enq__suspects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.enq-sus {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 6px; border-radius: 14px;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); border: 2px solid transparent; transition: transform .25s, border-color .25s, box-shadow .25s;
}
.enq-sus__face { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; background: var(--bg); box-shadow: 0 0 0 3px var(--c); }
.enq-sus small { color: var(--muted); font-size: .72rem; line-height: 1.2; }
.enq__map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; border-radius: 18px; background: #1b1430; border: 1px solid var(--border); }
.enq-place {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 12px 4px; border-radius: 10px;
  background: linear-gradient(160deg, #2c2150, #221a40); font-size: .85rem; text-align: center; border: 2px solid transparent; transition: all .25s;
}
.enq-place__icon { font-size: 1.6rem; }
.enq__objects { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.enq-obj { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 10px; background: var(--surface); font-size: 1.4rem; text-align: center; border: 2px solid transparent; transition: all .25s; }
.enq-obj small { font-size: .62rem; color: var(--muted); line-height: 1.1; }
.enq [data-id].is-hyp { border-color: var(--yellow); box-shadow: 0 0 18px rgba(255, 204, 61, .55); transform: scale(1.05); }
.enq__side { display: flex; flex-direction: column; gap: 10px; }
.enq-turn { font-family: var(--font-title); font-size: 1.3rem; display: flex; align-items: center; gap: 8px; }
.enq-hyp { padding: 12px; border-radius: 14px; background: var(--surface); }
.enq-hyp .label { margin: 0 0 6px; }
.enq-hyp__cards { display: flex; flex-wrap: wrap; gap: 6px; }
.enq-tag { display: inline-flex; align-items: center; gap: 4px; padding: .2em .65em; border-radius: 999px; background: color-mix(in srgb, var(--c) 25%, var(--surface-2)); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.enq-wait { margin: 8px 0 4px; animation: pulse 1.6s infinite; }
.enq-players { display: flex; flex-direction: column; gap: 4px; }
.enq-player { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface); font-size: .9rem; }
.enq-player__name { flex: 1; font-weight: 600; }
.enq-player small { color: var(--muted); }
.enq-player.is-turn { outline: 2px solid var(--c); }
.enq-player.is-out { opacity: .5; }
.enq-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; font-size: .88rem; }
.enq-log li { padding: 8px 10px; border-radius: 10px; background: var(--bg-alt); line-height: 1.6; animation: slideUp .3s ease; }
.enq-reveal { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.enq-reveal__cards { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; perspective: 900px; }
.enq-card {
  width: 140px; height: 190px; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(160deg, #f8edd0, #e6d3a3); color: #2b1d0e; box-shadow: 0 10px 30px rgba(0,0,0,.5), inset 0 0 0 4px #8a6a2f;
  animation: flipIn .8s cubic-bezier(.2, 1.2, .4, 1) both;
}
.enq-card__icon { font-size: 3.4rem; }
@keyframes flipIn { from { transform: rotateY(90deg) scale(.6); opacity: 0; } }
.enq-story { font-size: 1.15rem; font-style: italic; max-width: 620px; color: #f5e9c8; margin: 0; }

/* Manette de l'enquête */
.cl-panel { padding: 16px; border-radius: 18px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.cl-panel p { margin: 0; }
.cl-panel__title { font-family: var(--font-title); font-size: 1.25rem; }
.cl-panel--turn { background: linear-gradient(160deg, color-mix(in srgb, var(--violet) 35%, var(--surface)), var(--surface)); box-shadow: 0 0 0 2px var(--violet); }
.cl-panel--alert { background: linear-gradient(160deg, color-mix(in srgb, var(--yellow) 30%, var(--surface)), var(--surface)); box-shadow: 0 0 0 2px var(--yellow); animation: cardIn .4s cubic-bezier(.2, 1.4, .4, 1); }
.cl-panel--accuse { background: linear-gradient(160deg, color-mix(in srgb, var(--red) 30%, var(--surface)), var(--surface)); box-shadow: 0 0 0 2px var(--red); }
.cl-form { display: flex; flex-direction: column; gap: 8px; }
.cl-select .field { width: 100%; font-size: 1rem; }
.cl-select .label { margin-bottom: 2px; }
.cl-hyp { font-weight: 700; }
.cl-show { display: flex; flex-direction: column; gap: 8px; }
.cl-card {
  padding: 16px; border-radius: 14px; border: 0; cursor: pointer; font-family: var(--font-title); font-size: 1.2rem;
  background: linear-gradient(160deg, #f8edd0, #e6d3a3); color: #2b1d0e; box-shadow: 0 5px 0 #8a6a2f;
}
.cl-card:active { transform: translateY(3px); box-shadow: 0 2px 0 #8a6a2f; }
.cl-reveal { align-self: center; padding: 18px 26px; border-radius: 16px; font-family: var(--font-title); font-size: 1.5rem; background: linear-gradient(160deg, #f8edd0, #e6d3a3); color: #2b1d0e; animation: flipIn .7s cubic-bezier(.2, 1.2, .4, 1); }
.cl-notebook { padding: 14px; border-radius: 18px; background: #f3ecd8; color: #2b1d0e; display: flex; flex-direction: column; gap: 4px; box-shadow: inset 0 0 0 1px #d6c79f; }
.cl-notebook__title { font-family: var(--font-title); font-size: 1.15rem; margin: 0 0 4px; }
.cl-notebook__title small { font-family: var(--font-text); font-size: .75rem; color: #7a6a45; display: block; }
.cl-sec { color: #7a6a45 !important; margin: 8px 0 2px !important; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem !important; }
.cl-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 0; cursor: pointer; text-align: left;
  background: rgba(255,255,255,.6); color: #2b1d0e; font-size: .95rem; border-bottom: 1px dashed #d6c79f;
}
.cl-row__icon { font-size: 1.3rem; }
.cl-row__name { flex: 1; font-weight: 600; display: flex; flex-direction: column; }
.cl-row__name small { font-weight: 400; color: #7a6a45; font-size: .75rem; }
.cl-row__mark { font-size: 1.2rem; min-width: 1.5em; text-align: center; }
.cl-row.is-x .cl-row__name, .cl-row.is-mine .cl-row__name { text-decoration: line-through; opacity: .6; }
.cl-row.is-mine { background: rgba(124, 92, 255, .12); cursor: default; }
.cl-row.is-v { background: rgba(61, 220, 132, .25); }
.cl-row.is-q { background: rgba(255, 204, 61, .3); }
.cl-solution { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-title); font-size: 1.2rem; }

/* Enchaînement automatique */
.btn.is-auto { position: relative; overflow: hidden; }
.btn.is-auto::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: var(--p, 100%);
  background: rgba(255,255,255,.85); transition: width 1s linear;
}
.auto-count {
  display: inline-grid; place-items: center; min-width: 1.8em; height: 1.8em; margin-left: .4em; border-radius: 50%;
  background: rgba(0,0,0,.25); font-family: var(--font-title); font-size: .9em;
}
.on-settings { --c: var(--violet); }
.on-settings .field { width: auto; padding: .4em .6em; }
.on-next-game { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 30px 10px; }
.on-next-game__icon {
  width: 130px; height: 130px; border-radius: 34px; display: grid; place-items: center; font-size: 4.5rem;
  background: color-mix(in srgb, var(--c) 30%, var(--surface)); box-shadow: 0 0 60px color-mix(in srgb, var(--c) 50%, transparent);
  animation: cardIn .6s cubic-bezier(.2, 1.4, .4, 1);
}
.on-next-game .big-text { font-size: 3rem; color: var(--c); animation: pulse 1s infinite; }

/* ===== Chromo ! (jeu de cartes) ===== */
.ch-card {
  position: relative; width: 100%; aspect-ratio: 5 / 7.4; border-radius: 12%/8%; background: var(--c); color: #fff;
  box-shadow: 0 6px 14px rgba(0,0,0,.4), inset 0 0 0 4px rgba(255,255,255,.9); overflow: hidden;
  font-family: var(--font-title); user-select: none;
}
.ch-card::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.09) 0 6px, transparent 6px 14px);
}
.ch-card__mid { position: absolute; inset: 18% 14%; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.92); transform: rotate(-12deg); }
.ch-card__mid span { color: var(--c); font-size: clamp(1.1rem, 4.5vw, 2.4rem); line-height: 1; transform: rotate(12deg); }
.ch-card__corner { position: absolute; top: 6%; left: 9%; font-size: clamp(.65rem, 2.2vw, 1rem); line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.ch-card__corner--b { top: auto; left: auto; bottom: 6%; right: 9%; transform: rotate(180deg); }
.ch-card.is-wild { background: conic-gradient(#ff5e8a 0 25%, #7c5cff 0 50%, #2fd4e0 0 75%, #ffcc3d 0); }
.ch-card.is-wild .ch-card__mid { background: #1a1033; }
.ch-card.is-wild .ch-card__mid span { color: #fff; }
.ch-card.is-back { background: linear-gradient(135deg, #1a1033, #3a2f6b); }
.ch-card.is-back .ch-card__mid { background: var(--grad); }
.ch-card.is-back .ch-card__mid span { color: #fff; }
.ch-card.is-new { animation: dealIn .45s cubic-bezier(.2, 1.2, .4, 1); }

.ch { display: flex; flex-direction: column; gap: 14px; }
.ch__players { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.ch-dir { color: var(--muted); font-size: 1.2rem; }
.ch-player { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 2px solid transparent; min-width: 90px; }
.ch-player.is-turn { border-color: var(--c); box-shadow: 0 0 20px color-mix(in srgb, var(--c) 50%, transparent); }
.ch-player__name { font-weight: 600; }
.ch-player__cards { display: flex; align-items: center; }
.ch-player__cards i { width: 10px; height: 15px; margin-left: -4px; border-radius: 2px; background: var(--grad); box-shadow: 0 0 0 1px var(--bg); }
.ch-player__cards b { margin-left: 6px; font-family: var(--font-title); }
.ch-player__alert { position: absolute; top: -10px; right: -6px; padding: 2px 6px; border-radius: 6px; background: var(--red); font-size: .7rem; font-weight: 700; animation: pulse 1s infinite; }
.ch__table {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 14px; border-radius: 26px;
  background: radial-gradient(ellipse at 50% 30%, #3b2a7a, #1a1238); box-shadow: inset 0 0 0 2px #4a3a8a;
}
.ch__center { display: flex; align-items: center; gap: 26px; }
.ch__pile { width: 90px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); }
.ch__discard { width: 130px; }
.ch__color { font-size: 1.05rem; }
.ch__msg { min-height: 2.6em; margin: 0; text-align: center; font-weight: 600; max-width: 560px; }
.ch__turn { font-family: var(--font-title); font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }

/* Manette Chromo */
.ch-pad { display: flex; flex-direction: column; gap: 10px; }
.ch-pad__top { display: flex; gap: 12px; align-items: flex-start; }
.ch-pad__discard { width: 74px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ch-pad__color { font-size: .75rem; font-weight: 700; color: var(--c); white-space: nowrap; }
.ch-pad__others { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-pad__others span { padding: .3em .7em; border-radius: 999px; background: var(--surface); font-size: .85rem; border: 2px solid transparent; }
.ch-pad__others span.is-turn { border-color: var(--c); }
.ch-pad__msg { margin: 0; font-size: .9rem; color: var(--muted); min-height: 2.4em; }
.ch-pad__status { text-align: center; padding: 10px; border-radius: 14px; background: var(--surface); font-family: var(--font-title); font-size: 1.15rem; }
.ch-pad__status.is-mine { background: var(--grad); animation: pop .3s ease; }
.ch-pad__status small { opacity: .8; font-size: .75em; }
.ch-hand { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.ch-hand__card { border: 0; padding: 0; background: none; cursor: pointer; transition: transform .15s, opacity .15s; }
.ch-hand__card:disabled { opacity: .4; cursor: default; filter: saturate(.6); }
.ch-hand__card.is-ok { transform: translateY(-6px); }
.ch-hand__card.is-ok:active { transform: translateY(-2px) scale(.96); }
.ch-hand__card.is-drawn { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 10px; }
.ch-shout { background: var(--surface-2); color: var(--text); }
.ch-shout.is-on { background: var(--yellow); color: #1a1033; animation: pulse 1s infinite; }
.ch-pick { padding: 12px; border-radius: 16px; background: var(--surface); text-align: center; display: flex; flex-direction: column; gap: 8px; animation: cardIn .3s ease; }
.ch-pick p { margin: 0; font-weight: 600; }
.ch-pick__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ch-pick__btn { padding: 18px 8px; border-radius: 14px; border: 0; background: var(--c); color: #fff; font-family: var(--font-title); font-size: 1.1rem; cursor: pointer; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* Baccalauréat */
.bac-letter--big { width: 150px; height: 150px; font-size: 6rem; }
.bac-letter--big.is-done { animation: cardIn .5s cubic-bezier(.2, 1.6, .4, 1); box-shadow: 0 0 60px rgba(255, 94, 138, .6); }
.bac-letter--mini { width: 44px; height: 44px; margin: 0; border-radius: 12px; font-size: 1.6rem; display: grid; place-items: center; }
.ba-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border-left: 4px solid var(--c); }
.ba-row__name { flex: 1; font-weight: 600; min-width: 100px; }
.ba-row__btns { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===== Loto / Bingo ===== */
.loto { display: grid; gap: 16px; }
.loto__main { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.loto__stage { font-size: 1.1rem; }
.loto__stage strong { color: var(--yellow); font-family: var(--font-title); font-size: 1.3rem; }
.loto__ball-wrap { perspective: 600px; }
.loto__ball {
  width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff 0 8%, #ffe27a 9%, #ffb703 60%, #c77d00);
  box-shadow: 0 18px 40px rgba(0,0,0,.5), inset -10px -14px 30px rgba(0,0,0,.25);
}
.loto__ball span {
  width: 96px; height: 96px; border-radius: 50%; background: #fff; color: #1a1033; display: grid; place-items: center; align-content: center;
  font-family: var(--font-title); font-size: 2.8rem; line-height: 1; box-shadow: inset 0 2px 6px rgba(0,0,0,.2);
}
.loto__ball small { display: block; font-size: 1rem; color: var(--pink); }
.loto__ball.is-new { animation: ballIn .7s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes ballIn { from { transform: translateY(-140px) rotate(-200deg) scale(.4); opacity: 0; } }
.loto__last { display: flex; gap: 8px; min-height: 44px; }
.loto__last span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-family: var(--font-title); font-size: .95rem; }
.loto__board { display: grid; gap: 4px; padding: 10px; border-radius: 16px; background: var(--surface); }
.loto__board span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 6px; font-size: .8rem; color: var(--muted); background: var(--bg-alt); transition: all .3s; }
.loto__board span.is-on { background: var(--yellow); color: #1a1033; font-weight: 700; transform: scale(1.08); }
.loto__winners p { margin: 0 0 6px; padding: 8px 12px; border-radius: 10px; background: var(--surface); animation: slideUp .3s ease; }
.loto__win { box-shadow: inset 4px 0 0 var(--c); }
.loto__bad { color: var(--muted); font-size: .9rem; }

/* Carton sur le téléphone */
.bg-pad { display: flex; flex-direction: column; gap: 12px; }
.bg-pad__top { display: flex; align-items: center; gap: 14px; }
.bg-pad__ball {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff 0 10%, #ffe27a 11%, #ffb703 70%); color: #1a1033; font-family: var(--font-title); font-size: 1.6rem;
}
.bg-pad__ball.is-new { animation: pop .4s ease; }
.bg-card { display: grid; gap: 4px; padding: 8px; border-radius: 16px; background: #fff7e0; box-shadow: inset 0 0 0 3px #e8c46a; }
.bg-card--loto { grid-template-columns: repeat(9, 1fr); }
.bg-card--bingo { grid-template-columns: repeat(5, 1fr); }
.bg-card__head { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.bg-card__head span { text-align: center; font-family: var(--font-title); font-size: 1.4rem; color: #fff; background: var(--pink); border-radius: 8px; }
.bg-cell {
  aspect-ratio: 1; border: 0; border-radius: 8px; background: #fff; color: #1a1033; display: grid; place-items: center;
  font-family: var(--font-title); font-size: clamp(.9rem, 4vw, 1.3rem); cursor: pointer; position: relative; box-shadow: 0 2px 0 #e8c46a;
}
.bg-cell.is-blank { background: repeating-linear-gradient(45deg, #f3e2b3 0 4px, #fff7e0 4px 8px); box-shadow: none; cursor: default; }
.bg-cell.is-called { animation: pulse 1.2s infinite; background: #fff1b8; }
.bg-cell.is-daub::after {
  content: ""; position: absolute; inset: 10%; border-radius: 50%; background: rgba(255, 77, 94, .6); mix-blend-mode: multiply; animation: pop .25s ease;
}
.bg-cell.is-free { color: var(--pink); }
.bg-claim { background: var(--grad); color: #fff; font-size: 1.4rem; padding: 1em; }
.bg-claim.is-bad { background: var(--red); }
.bg-claim.is-win { background: var(--yellow); color: #1a1033; }

/* ===== La Nuit des Loups ===== */
.lg { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 20px 10px; border-radius: 26px; overflow: hidden; transition: background 1.2s; background: linear-gradient(180deg, #7ec8ff 0%, #ffe8b0 100%); color: #1a1033; }
.lg.is-night { background: linear-gradient(180deg, #050314 0%, #1a1238 100%); color: var(--text); }
.lg__sky { position: absolute; top: 14px; right: 24px; }
.lg__moon { display: block; width: 60px; height: 60px; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 40px #ffd23f; transition: all 1.2s; }
.lg.is-night .lg__moon { background: #f2f2e6; box-shadow: 0 0 50px rgba(255,255,255,.6), inset -12px -6px 0 #d9d9c6; }
.lg__phase { font-family: var(--font-title); font-size: clamp(1.8rem, 6vw, 2.8rem); margin: 10px 0 0; position: relative; }
.lg__text { font-size: 1.15rem; max-width: 640px; margin: 0; position: relative; }
.lg__timer span { font-family: var(--font-title); font-size: 2.4rem; }
.lg__village { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; position: relative; }
.lg-hut { width: 96px; padding: 8px 4px; border-radius: 14px; background: rgba(255,255,255,.18); display: flex; flex-direction: column; align-items: center; gap: 2px; border-bottom: 4px solid var(--c); }
.lg-hut__icon { font-size: 1.8rem; }
.lg-hut small { font-size: .7rem; opacity: .85; min-height: 1em; }
.lg-hut.is-dead { opacity: .5; filter: grayscale(.8); }
.lg .enq-log { width: 100%; max-width: 560px; text-align: left; max-height: 180px; }
.lg .enq-log li { background: rgba(0,0,0,.25); color: inherit; }

/* Rôle et choix sur le téléphone */
.lg-card {
  margin-top: 12px; padding: 22px; border-radius: 22px; text-align: center; user-select: none; -webkit-user-select: none; touch-action: none;
  background: linear-gradient(160deg, #2a1660, #120c28); border: 2px dashed #4a3a8a; cursor: pointer;
}
.lg-card.is-open { border-style: solid; border-color: var(--yellow); background: linear-gradient(160deg, #3b2a7a, #1a1238); }
.lg-card__icon { font-size: 3.6rem; }
.lg-card__name { font-family: var(--font-title); font-size: 1.6rem; margin: 6px 0; }
.lg-card__desc { color: var(--muted); margin: 0; }
.lg-card__mates { margin: 10px 0 0; font-weight: 600; color: var(--yellow); }
.lg-opts { display: flex; flex-direction: column; gap: 8px; }
.lg-opt { padding: 16px; border-radius: 14px; border: 0; background: var(--surface-2); color: var(--text); font-family: var(--font-title); font-size: 1.15rem; cursor: pointer; }
.lg-opt:active { transform: scale(.97); }
.lg-night-panel { background: linear-gradient(160deg, #1a1238, #050314); box-shadow: 0 0 0 2px #3a2f6b; }
.lg-roles { display: flex; flex-direction: column; gap: 6px; }
.lg-roles span { padding: 6px 12px; border-radius: 10px; background: var(--surface); }
.lg-roles small { color: var(--muted); }

/* ===== Dessine et devine en direct ===== */
.dd__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.dd__hint { font-family: var(--font-title); font-size: clamp(1.2rem, 4vw, 2rem); letter-spacing: .15em; }
.dd__body { display: grid; gap: 12px; margin-top: 10px; }
.dd__board { position: relative; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 0 0 3px var(--border); }
.dd__board canvas { display: block; width: 100%; height: auto; }
.dd__who { position: absolute; left: 10px; bottom: 10px; padding: .4em .9em; border-radius: 999px; background: rgba(26, 16, 51, .85); font-weight: 600; }
.dd__side { display: flex; flex-direction: column; gap: 8px; }
.dd__scores { display: flex; flex-direction: column; gap: 4px; }
.dd__feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .9rem; max-height: 260px; overflow: hidden; }
.dd__feed li { padding: 6px 10px; border-radius: 8px; background: var(--surface); animation: slideUp .25s ease; }
.dd-pad { display: flex; flex-direction: column; gap: 10px; }
.dd-pad__word { text-align: center; padding: 10px; border-radius: 14px; background: var(--grad); font-size: 1.1rem; }
.dd-pad__hint { text-align: center; font-family: var(--font-title); font-size: 1.5rem; letter-spacing: .15em; margin: 0; }
.dd-pad__canvas { width: 100%; height: auto; border-radius: 14px; background: #fff; box-shadow: 0 0 0 2px var(--border); touch-action: none; }
.dd-pad__form { display: flex; gap: 8px; }
.dd-pad__form .field { flex: 1; font-size: 1.1rem; }

/* ===== Le Portrait Mystère ===== */
.pm-svg { display: block; width: 100%; height: auto; }
.pm { display: grid; gap: 16px; }
.pm__board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 10px; border-radius: 20px; background: linear-gradient(160deg, #2a1660, #1a1238); box-shadow: inset 0 0 0 2px #4a3a8a; }
.pm-tile {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px; border-radius: 12px; border: 0;
  background: #fff; color: #1a1033; font-weight: 600; font-size: .78rem; cursor: pointer; transition: transform .25s, opacity .25s, filter .25s;
  box-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.pm-tile svg { border-radius: 9px; }
.pm-tile.is-off { opacity: .28; filter: grayscale(1); transform: scale(.92) rotateX(25deg); }
.pm-tile.is-pick { box-shadow: 0 0 0 4px var(--red), 0 0 20px var(--red); transform: scale(1.06); }
.pm-tile.is-mystery { box-shadow: 0 0 0 4px var(--yellow), 0 0 30px var(--yellow); transform: scale(1.1); z-index: 2; }
.pm__side { display: flex; flex-direction: column; gap: 10px; }
.pm-mystery {
  align-self: center; width: 150px; padding: 10px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: linear-gradient(160deg, #3b2a7a, #1a1238); box-shadow: 0 0 0 3px var(--yellow), 0 10px 30px rgba(0,0,0,.4);
}
.pm-mystery > span { width: 100%; aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-title); font-size: 4rem; background: repeating-linear-gradient(45deg, #2a1660 0 8px, #3a2f6b 8px 16px); }
.pm-mystery small { font-weight: 600; }
.pm-mystery.is-revealed { animation: cardIn .6s cubic-bezier(.2, 1.4, .4, 1); }
.pm-last { padding: 14px; border-radius: 16px; background: var(--surface); text-align: center; }
.pm-q { font-family: var(--font-title); font-size: 1.2rem; margin: 4px 0; }
.pm-answer { font-family: var(--font-title); font-size: 2rem; margin: 0; animation: pop .4s ease; }
.pm-answer.is-yes { color: var(--green); }
.pm-answer.is-no { color: var(--red); }
.pm-pad { display: flex; flex-direction: column; gap: 10px; }
.pm-pad__last { padding: 10px 12px; border-radius: 12px; background: var(--surface); font-size: .95rem; animation: pop .3s ease; }
.pm-pad__last small { color: var(--muted); }
.pm-pad__last.is-yes strong { color: var(--green); }
.pm-pad__last.is-no strong { color: var(--red); }
.pm-pad__board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pm-pad__board .pm-tile { font-size: .7rem; }
.pm-pad__hist { padding: 10px; border-radius: 12px; background: var(--surface); font-size: .9rem; }
.pm-pad__hist p { margin: 4px 0; }
.pm-reveal { width: 150px; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 4px var(--yellow); animation: cardIn .5s ease; }

/* Scène Mystère & Logo Mystère */
.rv-frame { position: relative; justify-self: center; width: 100%; max-width: 560px; padding: 10px; border-radius: 18px; background: #07040f; box-shadow: 0 0 0 3px #2a2054, 0 20px 50px rgba(0,0,0,.5); }
.rv-clip { overflow: hidden; border-radius: 10px; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.rv-clip img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.3, .8, .3, 1), filter 1s ease; }
.rv-frame--scene .rv-clip { aspect-ratio: 16 / 10; }
.rv-frame--scene .rv-clip img { transform-origin: 50% 50%; }
.rv-frame--logo { max-width: 340px; background: #fff; box-shadow: 0 0 0 3px #2a2054, 0 20px 50px rgba(0,0,0,.4); }
.rv-frame--logo .rv-clip { aspect-ratio: 1; padding: 14%; }
.rv-frame--logo .rv-clip img { object-fit: contain; }
.on-cine .rv-frame { max-width: 520px; }
.on-cine .rv-frame--logo { max-width: 300px; }

/* Sélecteur de langue */
.lang-switch { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); margin-left: auto; margin-right: 10px; }
.lang-switch button { display: flex; align-items: center; gap: 4px; padding: .3em .55em; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 700; cursor: pointer; }
.lang-switch button.is-active { background: var(--grad); color: #fff; }
.lang-switch span { display: none; }
@media (min-width: 640px) { .lang-switch span { display: inline; } }
.pad-head .lang-switch { margin-right: 8px; }

.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 300; }

/* ---------- 13. Responsive (tablette et +) ---------- */
@media (min-width: 640px) {
  .players__form { flex-direction: row; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .teams { grid-template-columns: repeat(2, 1fr); }
  .answers { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .modal { padding: 24px; align-items: center; }
  .modal__box { border-radius: 24px; max-height: calc(100vh - 48px); border: 1px solid var(--border); }
  .modal__body { padding: 24px 28px 36px; }
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav { position: static; display: flex; flex-direction: row; gap: 28px; padding: 0; background: none; border: 0; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .teams { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .wyr { grid-template-columns: 1fr auto 1fr; align-items: stretch; }
  .team-inputs { grid-template-columns: repeat(2, 1fr); }
  .audiences { grid-template-columns: 1fr 1fr; }
  .on-opts { grid-template-columns: 1fr 1fr; }
  .on-opts--col { grid-template-columns: 1fr; }
  .on-cine { grid-template-columns: 300px 1fr; }
  .on-wyr { grid-template-columns: 1fr auto 1fr; }
  .memo-wrap { grid-template-columns: 1fr 230px; align-items: start; }
  .pendu { grid-template-columns: 180px 1fr; align-items: start; }
  .coffre { grid-template-columns: 1fr 1fr; align-items: start; }
  .pm { grid-template-columns: 1fr 260px; align-items: start; }
  .enq { grid-template-columns: 1fr 300px; align-items: start; }
  .loto { grid-template-columns: 320px 1fr; align-items: start; }
  .loto__winners { grid-column: 1 / -1; }
  .dd__body { grid-template-columns: 1fr 260px; }
  .pm { grid-template-columns: 1fr 280px; align-items: start; }
  .cine:has(.rv-frame--scene) { grid-template-columns: 1.4fr 1fr; }
  .on-cine:has(.rv-frame--scene) { grid-template-columns: 1.5fr 1fr; }
  .enq__suspects { grid-template-columns: repeat(6, 1fr); }
  .plateau { grid-template-columns: 1fr 260px; align-items: start; }
  .cine { grid-template-columns: 340px 1fr; align-items: start; }
  .online-banner { grid-template-columns: 1.4fr 1fr; align-items: center; padding: 40px; }
  .on-lobby { grid-template-columns: 300px 1fr; align-items: start; }
  .bg-pop__card .answers { grid-template-columns: 1fr 1fr; }
  .wyr__or { align-self: center; }
  .duel { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .duel__side:first-child { transform: none; }
  .calc { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .calc__side--0 { transform: none; }
}

/* Respecte les personnes qui préfèrent moins d'animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
