/* Squashix — /game : le hub de choix (Squash Arcade vs Le Squizix) et Le
   Squizix lui-même. Scoped à ces deux écrans : tokens de tokens.css,
   composants de components.css (.btn/.badge/.chip/.chip-row/.kpi-card/
   .progress-bar réutilisés tels quels, aucune couleur en dur) — même
   discipline que communaute.css/paris.css. Le Squash Arcade (#stage, plus
   bas dans game.html) N'EST PAS concerné par ce fichier : il garde sa
   palette locale et fixe, définie dans le <style> de game.html — les deux
   jeux ne partagent ni DOM ni feuille de style.

   .wrap/.page-head/.eyebrow/.kpi-row : même recette que communaute.css,
   déclarée à nouveau ici plutôt que factorisée — convention déjà en place
   pour chaque page (paris.css/communaute.css/profil-page.css font pareil). */

.wrap{max-width:1180px;margin:0 auto;padding:26px 24px 60px;}

.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;flex-wrap:wrap;margin:6px 2px 24px;}
.page-head .eyebrow{display:inline-flex;align-items:center;gap:7px;font-family:var(--mono);font-size:12px;font-weight:700;color:var(--mustard-2);background:var(--mustard-soft);border:1.5px solid color-mix(in srgb, var(--mustard) 28%, transparent);border-radius:6px;padding:4px 10px;transform:rotate(-2deg);margin-bottom:12px;}
.page-head h1{font-size:34px;margin:0 0 6px;font-weight:800;letter-spacing:-0.02em;line-height:1.1;}
.page-head p{margin:0;color:var(--ink-soft);font-size:14px;max-width:56ch;line-height:1.55;}
.kpi-row{display:flex;gap:12px;flex-wrap:wrap;}

/* Pendant une question active, en mobile : l'en-tête de page (eyebrow/h1/
   texte/KPI niveau-XP) et le lien retour ne servent à rien tant qu'on n'a
   pas répondu — .quiz-playing (posée par quiz.js sur #quizPage) les masque
   pour que la question, les réponses et "Suivant" tiennent sans scroller.
   Le bouton "Abandonner" du panneau reste la seule sortie utile ici. */
@media (max-width:640px){
  .quiz-playing .page-head,.quiz-playing .quiz-back-btn{display:none;}
  .quiz-playing.wrap{padding-top:16px;}
  .quiz-playing #quizQuestionSection{padding:16px;margin-top:0;}
  .quiz-playing .quiz-timerbar{margin:2px 0 14px;}
  .quiz-playing .quiz-enonce{font-size:1.3em;margin-bottom:10px;}
  .quiz-playing .quiz-choices{gap:8px;}
  .quiz-playing .quiz-choice-btn{min-height:52px;padding:10px 14px;gap:12px;}
  .quiz-playing .quiz-choice-index{width:28px;height:28px;font-size:0.85em;}
  /* Ce qui n'apparaît qu'APRÈS la réponse (correction, "Suivant") reste
     compact pour la même raison : marges resserrées pour laisser le bouton
     "Suivant" tenir dans l'écran une fois l'explication révélée. */
  .quiz-playing .quiz-correction{margin-top:10px;padding:12px 14px;}
  .quiz-playing #quizNextBtn{margin-top:12px;}
}

/* ---------- Hub (choix du jeu) ---------- */
.hub-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:6px;}
@media (max-width:640px){.hub-grid{grid-template-columns:1fr;}}
.hub-mode-card{
  display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;
  background:var(--card);border:1.5px solid var(--line);border-radius:18px;
  padding:24px 26px;cursor:pointer;font-family:inherit;box-shadow:var(--shadow-subtle);
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;
}
.hub-mode-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-hover);border-color:var(--mustard);}
/* Même recette que .kpi-icon (components.css) : --accent/--accent-soft
   posés en style inline par bouton (voir game.html). */
.hub-mode-icon{width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:var(--accent-soft,var(--sage-soft));color:var(--accent,var(--sage));}
.hub-mode-icon svg{width:26px;height:26px;}
.hub-mode-name{font-weight:800;font-size:1.15em;color:var(--ink);}
.hub-mode-desc{font-size:0.85em;color:var(--ink-soft);line-height:1.5;}

/* ---------- Le Squizix ---------- */
.quiz-back-btn{margin-bottom:14px;}
.quiz-back-btn svg{width:14px;height:14px;}

.quiz-section-title{font-size:1.3em;font-weight:800;margin:0 0 4px;color:var(--ink);}
.quiz-home-categories .quiz-section-title{margin-top:28px;}
.quiz-home-categories .quiz-section-title:first-child{margin-top:0;}
.quiz-section-hint{margin:0 0 10px;font-size:1em;color:var(--ink-soft);}

/* Catégories + Jeu à 11 côte à côte sur desktop, pour ne pas laisser Le Jeu
   à 11 s'empiler seul sous une large zone vide en dessous — voir game.html.
   Jeu à 11 en carte (.quiz-panel) : même poids visuel que le reste du quiz,
   pas un simple paragraphe perdu à côté des catégories. */
#quizHomeSection{display:flex;flex-direction:column;gap:24px;}
@media (min-width:880px){
  #quizHomeSection{display:grid;grid-template-columns:2fr 1fr;align-items:start;}
  .quiz-home-jeu11{position:sticky;top:20px;}
}
/* auto-fit (pas auto-fill) : une seule catégorie avec contenu aujourd'hui
   doit occuper toute la largeur de la colonne, pas rester coincée à 280px
   avec des pistes vides à côté — auto-fill les garderait. */
.quiz-categories{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px;margin:10px 0 6px;}
.quiz-category-card{background:var(--card);border:1.5px solid var(--line);border-radius:16px;padding:18px 22px;box-shadow:var(--shadow-subtle);}
.quiz-category-title{font-weight:800;font-size:1.15em;margin-bottom:12px;color:var(--ink);}

/* Niveaux verrouillés/vides : le .chip générique (components.css) n'a pas
   ces états, ajoutés ici pour le Squizix uniquement. Taille remontée par
   rapport au .chip générique (12px) : ce sont ici de vrais choix de jeu, pas
   un simple filtre de liste — ils doivent se lire d'un coup d'œil. */
#quizCategoriesList,#quizJeu11Niveaux{--c:var(--mustard);--cs:var(--mustard-soft);}
#quizCategoriesList .chip,#quizJeu11Niveaux .chip{font-size:14px;padding:9px 16px;}
.chip:disabled,.chip.locked{opacity:0.45;cursor:not-allowed;}
.chip:disabled:hover,.chip.locked:hover{color:var(--ink-soft);transform:none;}
.chip.empty{opacity:0.5;}
.chip .quiz-inline-icon{width:12px;height:12px;}

/* ---------- Panneau (question / résultat) : même recette que .toolbar
   (communaute.css) — un simple bloc carte, réutilisé pour les deux écrans. ---------- */
.quiz-panel{background:var(--card);border:1.5px solid var(--line);border-radius:18px;box-shadow:var(--shadow-subtle);padding:22px 24px;margin-top:10px;}

.quiz-question-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px;}
.quiz-badges{display:flex;gap:6px;flex-wrap:wrap;}
.quiz-badges .badge{font-size:13px;}
.quiz-progress{font-weight:800;color:var(--mustard-2);font-size:1.05em;}

.quiz-timerbar{height:8px;margin:2px 0 22px;}
.quiz-timerbar-fill{background:var(--mustard);}

/* L'énoncé est ce qu'on doit lire en premier, vite et sans effort — voyant,
   lecture fluide : nettement plus grand que le corps de texte courant. */
.quiz-enonce{font-size:1.55em;font-weight:800;line-height:1.35;margin:0 0 22px;color:var(--ink);}

.quiz-choices{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
@media (max-width:560px){.quiz-choices{grid-template-columns:1fr;}}
/* Cartes de réponse, pas de simples lignes : marge généreuse, hauteur
   minimale confortable au clic/tap, index A/B/C/D en médaillon (même
   idiome que .av — components.css) pour donner du poids à chaque option. */
.quiz-choice-btn{
  display:flex;align-items:center;gap:16px;min-height:82px;
  text-align:left;cursor:pointer;font-family:inherit;
  background:var(--card);border:1.5px solid var(--line);border-radius:14px;
  padding:16px 22px;font-size:1.2em;font-weight:700;line-height:1.3;color:var(--ink);
  transition:transform .1s ease,border-color .1s ease,box-shadow .1s ease;
}
.quiz-choice-btn:not(:disabled):hover{transform:translateY(-2px);border-color:var(--mustard);box-shadow:var(--shadow-hover);}
.quiz-choice-btn:disabled{cursor:default;}
.quiz-choice-index{
  flex:none;width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:var(--bg);color:var(--ink-soft);font-weight:800;font-size:1em;transition:background .1s ease,color .1s ease;
}
.quiz-choice-btn.selected{border-color:var(--mustard);}
.quiz-choice-btn.selected .quiz-choice-index{background:var(--mustard-soft);color:var(--mustard-2);}
.quiz-choice-btn.correct{border-color:var(--sage);background:var(--sage-soft);color:var(--sage-2);}
.quiz-choice-btn.correct .quiz-choice-index{background:var(--sage);color:#fff;}
.quiz-choice-btn.incorrect{border-color:var(--danger);background:var(--danger-soft);color:var(--danger);}
.quiz-choice-btn.incorrect .quiz-choice-index{background:var(--danger);color:#fff;}

.quiz-correction{margin-top:18px;padding:16px 18px;border-radius:12px;background:var(--bg);}
/* Le bouton d'action suivant NE remplit jamais la largeur de la carte —
   .btn est déjà inline-flex à sa taille naturelle, on ne fait que le
   positionner en fin de panneau. */
#quizNextBtn{display:flex;margin:18px auto 0;}
.quiz-correction-title{display:flex;align-items:center;gap:7px;font-size:1.15em;font-weight:800;margin-bottom:8px;}
.quiz-correction-title.ok{color:var(--sage);}
.quiz-correction-title.ko{color:var(--danger);}
.quiz-correction-explication{font-size:1.05em;line-height:1.55;color:var(--ink-soft);}

/* Icônes inline génériques (verrou sur un niveau, coche/croix de correction,
   trophée de succès) — jamais d'emoji, même langage que .nav-pill-icon. */
.quiz-inline-icon{width:16px;height:16px;flex:none;vertical-align:-3px;}
.quiz-icon-badge{display:inline-flex;align-items:center;gap:5px;}
.quiz-icon-badge svg{width:13px;height:13px;flex:none;}

.quiz-result{text-align:center;}
.quiz-result-title{font-size:2.1em;font-weight:900;margin:0 0 8px;}
.quiz-result-title.ok{color:var(--sage);}
.quiz-result-title.ko{color:var(--danger);}
.quiz-result-detail{font-size:1.3em;font-weight:700;color:var(--ink-soft);margin-bottom:14px;}
.quiz-result-row{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-bottom:16px;}
.quiz-result-row .badge{font-size:14px;}
.quiz-result-achievements{display:flex;flex-direction:column;gap:8px;margin:0 auto 18px;max-width:460px;}
.quiz-result-achievement{display:flex;align-items:center;gap:8px;background:var(--plum-soft);border:1.5px solid var(--plum);border-radius:10px;padding:12px 16px;font-weight:700;font-size:1em;color:var(--plum-2);}
.quiz-result-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;}
