/* Quiz entre amis — feuille de style commune (hôte TV + joueur mobile). */
:root {
  --fond: #2b1055;
  --fond2: #46178f;
  --carte: #ffffff;
  --texte: #1d1d2b;
  --clair: #ffffff;
  --gris: #6b6b80;
  --rouge: #e21b3c;   /* A — triangle */
  --bleu: #1368ce;    /* B — losange */
  --jaune: #d89e00;   /* C — rond */
  --vert: #26890c;    /* D — carré */
  --ok: #2fbf71;
  --ko: #e5484d;
  --rayon: 14px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: linear-gradient(160deg, var(--fond) 0%, var(--fond2) 100%);
  background-attachment: fixed;
  color: var(--clair);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; }
button, input, select { font: inherit; }

.conteneur { max-width: 1200px; margin: 0 auto; padding: 24px; }
.carte {
  background: var(--carte); color: var(--texte);
  border-radius: var(--rayon); padding: 24px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.titre-app { font-size: 2rem; font-weight: 800; letter-spacing: .02em; text-align: center; margin: 12px 0 24px; }
.titre-app span { color: #ffd23f; }

/* Boutons */
.btn {
  border: 0; border-radius: 10px; padding: 14px 26px; cursor: pointer;
  font-weight: 700; font-size: 1.1rem; color: #fff; background: #333;
  box-shadow: 0 4px 0 rgba(0,0,0,.3); transition: transform .06s, filter .15s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-principal { background: #6c2bd9; }
.btn-principal:hover:not(:disabled) { filter: brightness(1.1); }
.btn-gros { font-size: 1.5rem; padding: 18px 40px; }
.btn-secondaire { background: #fff; color: var(--fond2); }
.rangee { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.centre { text-align: center; }
.droite { margin-left: auto; }

/* Formulaires */
label.champ { display: block; font-weight: 700; margin: 14px 0 6px; }
input[type=text], input[type=number], input[inputmode], select {
  width: 100%; padding: 12px 14px; border: 2px solid #d5d0e5; border-radius: 10px;
  font-size: 1.1rem; background: #fff; color: var(--texte);
}
input:focus, select:focus { outline: none; border-color: #6c2bd9; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 2px solid #d5d0e5; border-radius: 999px; cursor: pointer; user-select: none;
}
.puce input { accent-color: #6c2bd9; width: 18px; height: 18px; }
.puce:has(input:checked) { border-color: #6c2bd9; background: #f1eaff; }
.aide { color: var(--gris); font-size: .9rem; margin-top: 4px; }
.erreur { color: var(--ko); font-weight: 700; min-height: 1.4em; margin-top: 10px; }
.avertissement {
  background: #fff4d6; color: #7a5600; border-radius: 10px; padding: 10px 14px; margin: 10px 0;
  font-weight: 600;
}
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 700px) { .grille-2 { grid-template-columns: 1fr; } }

/* Lobby hôte */
.lobby-entete { display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: center; }
.qr-bloc { text-align: center; } .qr-bloc img { background: #fff; border-radius: 14px; padding: 6px; display: block; }
@media (max-width: 700px) { .lobby-entete { grid-template-columns: 1fr; } .qr-bloc { display: none; } }
.rapide { text-align: center; margin: 4px 0 18px; }
.btn-rapide { width: 100%; font-size: 1.5rem; padding: 18px 12px; }
.avance { margin-top: 8px; } .avance summary { cursor: pointer; font-weight: 700; color: var(--fond2, #4b2a8a); padding: 8px 0; }
.rejoindre-url { font-size: clamp(1.2rem, 2.6vw, 2.2rem); font-weight: 700; word-break: break-all; }
.code-salle {
  font-size: clamp(3rem, 10vw, 7rem); font-weight: 900; letter-spacing: .15em;
  background: #fff; color: var(--fond2); border-radius: var(--rayon); padding: 6px 28px;
  font-variant-numeric: tabular-nums; text-align: center;
}
.etiquette { text-transform: uppercase; font-size: .9rem; letter-spacing: .12em; opacity: .8; font-weight: 700; }
.joueurs { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; min-height: 60px; }
.joueur-puce {
  background: rgba(255,255,255,.15); padding: 10px 20px; border-radius: 999px;
  font-size: 1.4rem; font-weight: 700; animation: pop .3s ease-out;
}
.joueur-puce.deco { opacity: .45; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Question hôte */
.barre-haut { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; font-weight: 700; }
.badge { background: rgba(255,255,255,.18); padding: 6px 14px; border-radius: 999px; }
.question-texte {
  background: #fff; color: var(--texte); border-radius: var(--rayon);
  font-size: clamp(1.4rem, 3.2vw, 2.8rem); font-weight: 800; text-align: center;
  padding: 24px 32px; margin-bottom: 20px;
}
.zone-milieu { display: grid; grid-template-columns: 140px 1fr 140px; align-items: center; gap: 16px; margin-bottom: 20px; }
.zone-milieu .image { text-align: center; }
.zone-milieu img { max-height: 32vh; max-width: 100%; border-radius: 10px; background: #fff; }
.zone-milieu .image.photo img { max-height: 48vh; }
.chrono {
  width: 120px; height: 120px; border-radius: 50%; background: #fff; color: var(--fond2);
  display: grid; place-items: center; font-size: 3rem; font-weight: 900;
  box-shadow: 0 0 0 8px rgba(255,255,255,.25);
}
.chrono.urgent { background: #ffd23f; animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.compteur { text-align: center; font-weight: 800; font-size: 1.1rem; }
.compteur b { display: block; font-size: 3rem; }

.choix { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choix-tuile {
  display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 10px;
  color: #fff; font-weight: 800; font-size: clamp(1.1rem, 2.2vw, 2rem);
  box-shadow: 0 5px 0 rgba(0,0,0,.25); min-height: 90px; position: relative; overflow: hidden;
  transition: opacity .3s, transform .3s;
}
.c0 { background: var(--rouge); } .c1 { background: var(--bleu); }
.c2 { background: var(--jaune); } .c3 { background: var(--vert); }
.forme { flex: 0 0 auto; width: 1.6em; height: 1.6em; display: grid; place-items: center; position: relative; }
.forme svg { width: 100%; height: 100%; fill: #fff; }
.forme .lettre {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: .62em; font-weight: 900; color: rgba(0,0,0,.55); padding-top: .12em;
}
.choix-tuile.faux { opacity: .3; }
.choix-tuile.bon { transform: scale(1.02); outline: 5px solid #fff; }
.choix-tuile .nb { margin-left: auto; font-size: 1.4em; font-variant-numeric: tabular-nums; }
.choix-tuile .coche { margin-left: 8px; }
.barres { display: flex; gap: 18px; justify-content: center; align-items: flex-end; height: 110px; margin: 4px 0 14px; }
.barre { width: 80px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.barre .rempli { width: 100%; border-radius: 8px 8px 0 0; min-height: 6px; transition: height .6s; }
.barre .val { font-weight: 900; font-size: 1.5rem; margin-bottom: 4px; }
.closest-info {
  background: rgba(255,255,255,.12); border-radius: var(--rayon); padding: 30px; text-align: center;
  font-size: clamp(1.2rem, 2.5vw, 2rem); font-weight: 700;
}
.grosse-valeur { font-size: clamp(2.5rem, 7vw, 5.5rem); font-weight: 900; color: #ffd23f; }

/* Révélation hôte */
.revelation { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
@media (max-width: 900px) { .revelation { grid-template-columns: 1fr; } .zone-milieu { grid-template-columns: 1fr; } }
.explication { font-size: 1.2rem; line-height: 1.45; }
.source { color: var(--gris); margin-top: 10px; font-style: italic; }
.classement { list-style: none; margin: 0; padding: 0; }
.classement li {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px;
  background: #f4f0fb; margin-bottom: 8px; font-size: 1.2rem; font-weight: 700;
}
.classement .rang { width: 2em; text-align: center; font-weight: 900; color: var(--fond2); }
.classement .score { margin-left: auto; font-variant-numeric: tabular-nums; }
.classement .gain { color: var(--ok); font-size: .9em; min-width: 4.5em; text-align: right; }
.propositions { width: 100%; border-collapse: collapse; font-size: 1.1rem; }
.propositions td, .propositions th { padding: 6px 8px; border-bottom: 1px solid #eee; text-align: left; }
.propositions td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Podium */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 16px; margin: 30px 0; min-height: 360px; }
.marche { width: min(28vw, 240px); text-align: center; }
.marche .nom { font-size: clamp(1.1rem, 2.5vw, 2rem); font-weight: 800; margin-bottom: 8px; word-break: break-word; }
.marche .bloc {
  border-radius: 12px 12px 0 0; display: flex; flex-direction: column; justify-content: flex-start;
  align-items: center; padding-top: 14px; font-weight: 900; color: var(--fond2);
  animation: monte .8s ease-out both;
}
.marche .bloc .place { font-size: 3rem; }
.m1 .bloc { height: 260px; background: #ffd23f; }
.m2 .bloc { height: 190px; background: #e3e3ee; animation-delay: .3s; }
.m3 .bloc { height: 140px; background: #e8a765; animation-delay: .6s; }
@keyframes monte { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }

/* ----------- Joueur (mobile) ----------- */
.mobile { max-width: 560px; margin: 0 auto; padding: 16px; min-height: 100vh; display: flex; flex-direction: column; }
.mobile .carte { margin-top: 12px; }
.entete-joueur { display: flex; justify-content: space-between; align-items: center; font-weight: 700; padding: 4px 0 10px; }
.code-input { text-transform: uppercase; letter-spacing: .3em; font-weight: 900; text-align: center; font-size: 1.8rem !important; }
.plein { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 12px; }
.plein .grand { font-size: 2rem; font-weight: 900; }
.plein .enorme { font-size: 3.5rem; font-weight: 900; }
.mobile .question-mini { font-size: 1.2rem; font-weight: 700; text-align: center; margin: 6px 0 14px; }
.mobile img.illu { max-width: 100%; max-height: 28vh; border-radius: 10px; display: block; margin: 0 auto 12px; background: #fff; }
.mobile #j-image.photo img.illu { max-height: 38vh; }
.boutons { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 55vh; }
.boutons.tf { grid-template-columns: 1fr; }
.bouton-choix {
  border: 0; border-radius: 12px; color: #fff; font-weight: 800; font-size: 1.15rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 12px; box-shadow: 0 6px 0 rgba(0,0,0,.25); cursor: pointer; word-break: break-word;
}
.bouton-choix .forme { width: 3.2rem; height: 3.2rem; font-size: 2rem; }
.bouton-choix:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.bouton-choix:disabled { opacity: .5; }
.mini-chrono { background: #fff; color: var(--fond2); border-radius: 999px; padding: 4px 14px; font-weight: 900; font-variant-numeric: tabular-nums; }
.ecran-ok { background: var(--ok); border-radius: var(--rayon); padding: 30px 16px; }
.ecran-ko { background: var(--ko); border-radius: var(--rayon); padding: 30px 16px; }
.ecran-neutre { background: rgba(255,255,255,.14); border-radius: var(--rayon); padding: 30px 16px; }
.pied { text-align: center; opacity: .7; font-size: .85rem; padding: 12px 0 4px; }
.spinner {
  width: 54px; height: 54px; border-radius: 50%; border: 6px solid rgba(255,255,255,.25);
  border-top-color: #fff; animation: tourne 1s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }
.bandeau-reseau {
  position: fixed; top: 0; left: 0; right: 0; background: #ffd23f; color: #3a2a00;
  text-align: center; font-weight: 700; padding: 6px; z-index: 10;
}

/* ======================================================================
   Mode solo (solo.html / solo.js / voix.js) — classes préfixées solo- / voix-
   Palette AA : texte blanc sur --solo-ok (5,0:1) et --solo-ko (5,4:1), texte sombre sur fonds clairs.
   ====================================================================== */
.solo-large { --solo-ok: #1b7f4b; --solo-ko: #c62f35; --solo-neutre: #4d3a86; --solo-or: #ffd23f; --cat: #6c2bd9; --cat-fond: #6c2bd9; --cat-texte: #fff;
              max-width: 760px; }
.solo-large :focus-visible { outline: 3px solid var(--solo-or); outline-offset: 3px; border-radius: 6px; }
.solo-large .puce:has(input:focus-visible) { outline: 3px solid #6c2bd9; outline-offset: 2px; }
.solo-large .puce { min-height: 44px; }
.solo-lancer { position: sticky; bottom: 0; z-index: 3; margin: 8px -24px -24px; padding: 22px 24px 16px; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 40%); border-radius: 0 0 var(--rayon) var(--rayon); }
.solo-lien { color: #fff; opacity: .85; text-decoration: none; font-size: .95rem; padding: 8px 0; display: inline-block; }
.solo-lien:hover { opacity: 1; text-decoration: underline; }

/* En-tête de partie collant : progression, série et score restent visibles pendant la correction */
.solo-haut { position: sticky; top: 0; z-index: 6; margin: 0 -16px 4px; padding: 10px 16px 0; background: linear-gradient(to bottom, rgba(43,16,85,.96) 80%, rgba(43,16,85,0)); }
.solo-corrige-mode .solo-jauge { display: none; }
.solo-corrige-mode .solo-haut { padding-bottom: 6px; }

/* Barre de progression de la partie : un segment par question */
.solo-progres { display: flex; gap: 3px; margin: 2px 0 8px; height: 7px; }
.solo-progres i { flex: 1; border-radius: 4px; background: rgba(255,255,255,.22); transition: background .3s, transform .3s; }
.solo-progres i.ok { background: #5ee29b; }
.solo-progres i.ko { background: repeating-linear-gradient(135deg, #ff8f93 0 3px, rgba(255,255,255,.35) 3px 5px); }   /* hachuré : lisible sans la couleur */
.solo-progres i.en-cours { background: #fff; transform: scaleY(1.5); }

.solo-entete { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; padding: 2px 0 8px; }
.solo-entete .solo-num { font-variant-numeric: tabular-nums; min-width: 4.2em; }
.solo-centre { display: flex; align-items: center; gap: 8px; }
.solo-score { background: rgba(255,255,255,.18); border-radius: 999px; padding: 4px 12px; font-variant-numeric: tabular-nums; }
.solo-entete .mini-chrono { min-width: 3.2em; text-align: center; }
.solo-jauge { height: 8px; border-radius: 6px; background: rgba(255,255,255,.2); overflow: hidden; margin-bottom: 12px; }
.solo-jauge i { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; }
.solo-jauge.urgent i { background: var(--solo-or); }
.solo-entete .mini-chrono.urgent { background: var(--solo-or); color: #2b1055; animation: solo-pouls 1s infinite; }

/* Série : flamme vivante */
.solo-serie { display: inline-flex; align-items: center; gap: 2px; color: var(--solo-or); font-variant-numeric: tabular-nums; min-width: 2.2em; }
.solo-serie[hidden] { display: none; }
.solo-flamme { display: inline-block; transform-origin: 50% 90%; animation: solo-flamme 1.1s ease-in-out infinite; }
.solo-serie.chaud .solo-flamme { animation-duration: .7s; font-size: 1.15em; }
.solo-serie.brulant .solo-flamme { animation-duration: .45s; font-size: 1.3em; filter: drop-shadow(0 0 6px #ff9f1c); }
.solo-serie.monte .solo-flamme { animation: solo-flamme-monte .5s ease-out, solo-flamme 1.1s .5s ease-in-out infinite; }
@keyframes solo-flamme { 0%,100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.12) rotate(4deg); } }
@keyframes solo-flamme-monte { 0% { transform: scale(.4); } 60% { transform: scale(1.5); } 100% { transform: scale(1); } }
@keyframes solo-pouls { 50% { transform: scale(1.08); } }

/* Voix du narrateur */
.voix-intro, .voix-ligne { margin: 0 0 10px; font-style: italic; line-height: 1.4; }
.voix-intro { text-align: center; font-size: 1rem; opacity: .95; animation: solo-entree .35s both; }
.voix-ligne { display: flex; gap: 8px; align-items: baseline; justify-content: center; text-align: left; font-size: 1.05rem; padding: 2px 6px; }
.voix-ligne span:first-child { font-style: normal; }

/* Question : identité de catégorie */
.solo-carte-q { background: #fff; color: var(--texte); border-radius: var(--rayon); padding: 22px 16px 18px; margin: 14px 0 14px; text-align: center;
                box-shadow: inset 0 6px 0 var(--cat), 0 8px 24px rgba(0,0,0,.22); position: relative; animation: solo-entree .3s both; }
.solo-carte-q p { margin: 0; font-size: 1.3rem; font-weight: 800; line-height: 1.3; }
.solo-pastille { display: inline-flex; align-items: center; gap: 6px; background: var(--cat-fond); color: var(--cat-texte); font-weight: 800; font-size: .88rem;
                 padding: 5px 12px 5px 8px; border-radius: 999px; margin-bottom: 10px; line-height: 1.2; }
.solo-pastille .emoji { font-size: 1.15em; }
.solo-pastille small { font-weight: 600; opacity: .9; font-size: .95em; }
.solo-large .boutons { min-height: 38vh; }
.solo-large .bouton-choix { font-size: clamp(.95rem, 4.3vw, 1.15rem); padding: 12px 8px; word-break: normal; overflow-wrap: break-word; animation: solo-entree .3s backwards; animation-delay: calc(var(--i, 0) * 50ms); }
.bouton-choix.bon { outline: 5px solid #fff; transform: scale(1.02); }
.bouton-choix.ecarte { opacity: .3; }
.bouton-choix:disabled.bon, .bouton-choix:disabled.choisi { opacity: 1; }
.bouton-choix.choisi:not(.bon) { outline: 5px dashed rgba(255,255,255,.85); }
.bouton-choix.choisi:not(.bon)::after { content: "✗ ton choix"; font-size: .85rem; font-weight: 700; }
.bouton-choix.bon::after { content: "✓ bonne réponse"; font-size: .85rem; font-weight: 700; }
#s-choix { flex: 1; display: flex; flex-direction: column; }
/* après la réponse : les choix se tassent en liste pour laisser la place à la correction */
.solo-corrige-mode #s-choix { flex: none; }
.solo-corrige-mode .boutons { flex: none; }
.solo-large .solo-corrige-mode .boutons, .solo-large .solo-corrige-mode .boutons.tf { min-height: 0; gap: 6px; grid-template-columns: 1fr; }
.solo-corrige-mode .bouton-choix { flex-direction: row; justify-content: flex-start; text-align: left; padding: 6px 12px; min-height: 48px; font-size: .98rem; gap: 10px;
                                   box-shadow: 0 3px 0 rgba(0,0,0,.25); word-break: normal; overflow-wrap: break-word; }
.solo-corrige-mode .bouton-choix .forme { width: 1.9rem; height: 1.9rem; font-size: 1.2rem; flex: none; }
.solo-corrige-mode .bouton-choix > span:not(.forme) { flex: 1; min-width: 0; }
.solo-corrige-mode .bouton-choix::after { font-size: .75rem; white-space: nowrap; flex: none; }
.solo-corrige-mode .bouton-choix.bon, .solo-corrige-mode .bouton-choix.choisi:not(.bon) { outline-width: 4px; }
.solo-corrige-mode .bouton-choix.ecarte { display: none; }     /* ne restent que ton choix et la bonne réponse */
.solo-corrige-mode .solo-carte-q p { font-size: 1.05rem; }

/* Contraste AA : le jaune (C) porte un texte sombre ; forme et couleur restent distinctes */
.solo-large .bouton-choix.c2 { color: #1d1d2b; }
.solo-large .bouton-choix.c2 .forme svg { fill: #1d1d2b; }
.solo-large .bouton-choix.c2 .forme .lettre { color: #fff; }

/* Correction : verdict → bonne réponse + explication → anecdote → suite */
.solo-correction { margin-top: 14px; animation: solo-entree .3s both; }
.solo-verdict { display: flex; align-items: center; gap: 12px; border-radius: var(--rayon); padding: 12px 16px; color: #fff; margin-bottom: 10px; }
.solo-verdict.ok { background: var(--solo-ok); } .solo-verdict.ko { background: var(--solo-ko); } .solo-verdict.neutre { background: var(--solo-neutre); }
.solo-verdict-ico { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 1.5rem; font-weight: 900; }
.solo-verdict b { display: block; font-size: 1.4rem; line-height: 1.15; }
.solo-verdict span.pts { font-size: .95rem; opacity: .95; font-variant-numeric: tabular-nums; }
.solo-corrige { background: #fff; color: var(--texte); border-radius: var(--rayon); padding: 14px 16px; line-height: 1.5; margin-bottom: 10px; }
.solo-etiq { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--gris); }
.solo-rep { font-size: 1.35rem; font-weight: 900; line-height: 1.2; margin: 2px 0 6px; }
.solo-corrige p { margin: 0; font-size: 1rem; }
.solo-expl.court { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.solo-plus { background: none; border: 0; color: var(--fond2); font-weight: 700; padding: 8px 0 0; min-height: 44px; cursor: pointer; font-size: .92rem; text-decoration: underline; }
.solo-corrige small { display: block; margin-top: 8px; color: var(--gris); }
.solo-corrige a { color: var(--fond2); font-weight: 700; }
.solo-anecdote { display: flex; gap: 12px; align-items: flex-start; background: #fff6cf; color: #2d2400; border-radius: var(--rayon); padding: 14px 16px;
                 border-left: 6px solid var(--solo-or); margin-bottom: 10px; box-shadow: 0 0 0 1px rgba(255,210,63,.6), 0 6px 20px rgba(255,210,63,.18);
                 animation: solo-anecdote .5s .15s both; }
.solo-anec-ico { flex: none; font-size: 1.7rem; line-height: 1; filter: drop-shadow(0 0 6px rgba(255,190,0,.6)); }
.solo-anecdote h3 { margin: 0 0 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; color: #6b5200; }
.solo-anecdote p { margin: 0; font-size: 1.02rem; line-height: 1.5; }
.solo-suite { position: sticky; bottom: 0; z-index: 5; padding: 14px 0 calc(10px + env(safe-area-inset-bottom)); margin-top: 4px;
              background: linear-gradient(to bottom, rgba(70,23,143,0), var(--fond2) 38%); }
.solo-suite .btn { width: 100%; min-height: 58px; }

/* Panneau de test : discret, replié par défaut sur mobile */
.solo-avis-btn { display: block; margin: 0 auto 10px; border: 2px solid rgba(255,255,255,.5); background: transparent; color: #fff; border-radius: 999px;
                 padding: 10px 18px; min-height: 44px; font-weight: 700; cursor: pointer; font-size: .95rem; }
.solo-avis-btn:hover { background: rgba(255,255,255,.14); }
.solo-avis-btn[aria-expanded="true"] { background: rgba(255,255,255,.18); }
.solo-avis-btn .fait { color: var(--solo-or); }
.solo-testbox { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); border-radius: var(--rayon); padding: 12px 14px; margin-bottom: 10px; }
.solo-testbox .infos { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px; font-size: .85rem; }
.solo-testbox .infos span { background: rgba(255,255,255,.2); border-radius: 999px; padding: 3px 10px; }
.solo-testbox .infos .niv { background: var(--solo-or); color: #2b1055; font-weight: 800; }
.solo-avis { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.solo-avis button { border: 2px solid rgba(255,255,255,.6); background: rgba(255,255,255,.1); color: #fff; border-radius: 12px; padding: 10px 6px;
                    min-height: 56px; font-weight: 700; cursor: pointer; font-size: .95rem; }
.solo-avis button small { display: block; font-weight: 400; opacity: .85; font-size: .75rem; }
.solo-avis button:hover { background: rgba(255,255,255,.22); }
.solo-avis button.fait { background: #fff; color: #2b1055; border-color: #fff; }
.solo-testbox .etat { text-align: center; margin-top: 8px; min-height: 1.2em; font-size: .9rem; }
.solo-raccourcis { opacity: .75; font-size: .8rem; text-align: center; margin-top: 8px; }

/* Célébration (série de 5) */
.solo-toast { position: fixed; left: 50%; top: 76px; transform: translateX(-50%); z-index: 20; background: var(--solo-or); color: #2b1055; font-weight: 900;
              font-size: 1.3rem; padding: 10px 22px; border-radius: 999px; box-shadow: 0 8px 30px rgba(0,0,0,.35); pointer-events: none; white-space: nowrap;
              animation: solo-toast 2.2s both; }
.solo-confettis { position: fixed; inset: 0; pointer-events: none; z-index: 19; overflow: hidden; }
.solo-confettis i { position: absolute; width: 9px; height: 14px; border-radius: 2px; top: 22%; left: 50%; }

/* Bilan */
.solo-bilan-tete { text-align: center; margin: 4px 0 14px; }
.solo-bilan-emoji { font-size: 3.6rem; line-height: 1; animation: solo-pop .6s both; }
.solo-bilan-titre { font-size: 1.9rem; font-weight: 900; margin: 8px 0 6px; line-height: 1.15; }
.solo-bilan-tete .voix-ligne { justify-content: center; font-size: 1.05rem; }
.solo-chiffres { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 14px; text-align: center; }
.solo-chiffres div { background: rgba(255,255,255,.12); border-radius: 12px; padding: 10px 4px; font-size: .8rem; }
.solo-chiffres b { display: block; font-size: 1.5rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.solo-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.solo-cat-carte { background: #fff; color: var(--texte); border-radius: var(--rayon); padding: 12px; box-shadow: inset 0 5px 0 var(--cat); padding-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.solo-cat-carte .etiq { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--gris); }
.solo-cat-carte b { font-size: 1.05rem; line-height: 1.2; }
.solo-cat-carte b .emoji { font-size: 1.3em; margin-right: 4px; }
.solo-cat-carte span.score { font-size: .9rem; color: var(--gris); }
.solo-cat-carte button { margin-top: 6px; border: 2px solid var(--cat-fond); background: transparent; color: var(--texte); border-radius: 10px; padding: 8px; min-height: 40px; font-weight: 700; cursor: pointer; font-size: .85rem; }
.solo-cat-carte button:hover { background: #f4f0fb; }
.solo-cats.seule { grid-template-columns: 1fr; }
.solo-puces-cat { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; }
.solo-puces-cat > span { background: rgba(255,255,255,.14); border-radius: 999px; padding: 5px 12px; font-size: .88rem; border-left: 5px solid var(--cat); }
.solo-niveaux-scroll { overflow-x: auto; margin-bottom: 16px; border-radius: 12px; }
.niveaux-bilan { width: 100%; border-collapse: collapse; background: #fff; color: var(--texte); }
.niveaux-bilan th, .niveaux-bilan td { white-space: nowrap; padding: 8px 3px; text-align: center; font-size: .85rem; }
.niveaux-bilan th { font-size: .78rem; line-height: 1.2; }
.niveaux-bilan th { background: #f1eaff; }
.niveaux-bilan .ecart-bon { color: #1b7f4b; font-weight: 700; } .niveaux-bilan .ecart-mauvais { color: #b3262d; font-weight: 700; }
.solo-recap { list-style: none; padding: 0; margin: 0; text-align: left; }
.solo-recap li { background: #fff; color: var(--texte); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: .95rem; border-left: 6px solid var(--cat); }
.solo-recap li b { color: #1b7f4b; } .solo-recap li.ko b { color: #b3262d; }
.solo-recap small { color: var(--gris); display: block; margin-top: 2px; }
.solo-recap a { color: var(--fond2); font-weight: 700; }
.solo-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.solo-actions .btn { flex: 1 1 150px; min-height: 52px; font-size: 1.05rem; padding: 12px 16px; }
.solo-recap .emoji { margin-right: 2px; }

@keyframes solo-entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes solo-anecdote { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes solo-pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
@keyframes solo-toast { 0% { opacity: 0; transform: translate(-50%, -14px) scale(.9); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 20% { transform: translate(-50%, 0) scale(1); }
                        80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -10px); } }

@media (min-width: 700px) {
  .solo-large .boutons { min-height: 34vh; }
  .solo-carte-q p { font-size: 1.6rem; } .solo-carte-q { padding: 26px 24px 22px; }
  .solo-chiffres b { font-size: 1.9rem; }
}
@media (max-width: 380px) { .solo-chiffres { grid-template-columns: 1fr 1fr; } .solo-cats { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .solo-large *, .solo-toast, .solo-confettis * { animation: none !important; transition: none !important; }
  .solo-toast { opacity: 1; }
}

.anecdote-hote { margin-top: 12px; padding: 10px 14px; border-left: 4px solid #ffd23f; background: #fff8dc; border-radius: 8px; color: #3b2a00; font-size: 1.05rem; }

/* ── mode « chacun sur son écran » (téléphone) ── */
.att-code { font-size: 3.2rem; font-weight: 900; letter-spacing: .25em; background: #fff; color: #4b1a99; border-radius: 14px; padding: 6px 4px 6px 14px; display: inline-block; }
.res-carte { background: #fff; color: var(--texte); border-radius: var(--rayon); padding: 12px 14px; margin-top: 10px; line-height: 1.45; }
.res-carte h3 { margin: 0 0 6px; font-size: 1rem; }
.res-carte .anecdote-mobile { margin-top: 8px; padding: 8px 10px; border-left: 4px solid #ffd23f; background: #fff8dc; border-radius: 8px; color: #3b2a00; }
.rep-ligne { display: grid; grid-template-columns: 1.4rem 1fr 2rem; gap: 2px 8px; align-items: center; margin: 7px 0; font-size: .92rem; }
.rep-ligne .rep-jauge { background: #ece8f6; border-radius: 6px; height: 12px; overflow: hidden; display: block; }
.rep-ligne .rep-jauge i { display: block; height: 100%; background: #b9a7e6; }
.rep-ligne.bon .rep-jauge i { background: #1fa65a; }
.rep-ligne.bon b { color: #1fa65a; }
.rep-ligne .rep-txt { grid-column: 2 / -1; font-size: .85rem; color: #555; }
.res-carte .classement li.moi { background: #f1eaff; border-radius: 8px; font-weight: 800; }
.suite-bloc { margin-top: 14px; }
.compte-rebours { height: 8px; background: rgba(255,255,255,.2); border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.compte-rebours i { display: block; height: 100%; width: 100%; background: #ffd23f; transform-origin: left; }
.suite-bloc { position: sticky; bottom: 0; padding: 12px 0 8px; background: linear-gradient(rgba(43,16,85,0), #2b1055 28%); z-index: 3; }

/* ── badges catégorie + niveau (tous écrans) ── */
.badges-q { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0 10px; }
.badge-cat, .badge-niv { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: .88rem; line-height: 1.2; }
.badge-niv { background: rgba(255,255,255,.16); border: 2px solid var(--niv, #fff); color: #fff; }
.badge-niv .points { display: inline-flex; gap: 3px; }
.badge-niv .points i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--niv); display: block; box-sizing: border-box; }
.badge-niv .points i.on { background: var(--niv); }
.badges-q.grand .badge-cat, .badges-q.grand .badge-niv { font-size: 1.25rem; padding: 7px 18px; }
.badges-q.grand .badge-niv .points i { width: 13px; height: 13px; }

/* ── lien d'invitation (copier d'un clic) ── */
.lien-copie { display: flex; gap: 8px; align-items: stretch; margin: 6px 0 8px; }
.lien-copie input { flex: 1; min-width: 0; font-size: 1rem; padding: 10px 12px; border-radius: 12px; border: 2px solid rgba(255,255,255,.35);
                    background: rgba(255,255,255,.95); color: #2b1055; font-weight: 700; text-overflow: ellipsis; }
.lien-copie .btn { white-space: nowrap; }
.invitation { margin: 10px 0 14px; }
.invitation-tv { max-width: 760px; margin: 14px 0 0; }
.invitation-tv .lien-copie input { font-size: 1.3rem; padding: 12px 16px; }
@media (max-width: 460px) { .lien-copie { flex-direction: column; } }

.solo-alerte { background: #fff8dc; color: #3b2a00; border-left: 5px solid #ffd23f; border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; font-weight: 700; font-size: .95rem; }
.solo-reinit { display: block; margin: 8px auto 0; background: none; border: 0; color: #6b6680; text-decoration: underline; font-size: .85rem; cursor: pointer; padding: 4px 8px; }
.solo-lancer .erreur { margin: 0 0 8px; text-align: center; font-weight: 700; }
