/* =====================================================================
   Génie en Herbe RDC — charte
   Tenant « ecole » : sobre, précis, lisible de loin (vidéoprojecteur).
   Contrastes vérifiés WCAG 2.1 AA sur le canevas sombre.
   Variables CSS uniquement, mobile-first.
   ===================================================================== */

:root {
  /* --- Canevas & surfaces --- */
  --canvas:        #08090b;
  --surface-1:     #101215;
  --surface-2:     #16181c;
  --surface-3:     #1d2026;
  --hairline:      #262930;
  --hairline-fort: #363a44;

  /* --- Encre (sur canevas sombre) --- */
  --encre:         #f4f6f8;  /* 18.4:1 */
  --encre-douce:   #cdd3dc;  /* 11.6:1 */
  --encre-tenue:   #8c939f;  /*  5.2:1 */

  /* --- Accent --- */
  --accent:        #828fff;  /*  7.5:1 */
  --accent-fonce:  #5e6ad2;
  --sur-accent:    #0a0b10;

  /* --- Sémantique. Jamais de rouge : une mauvaise réponse est ambre. --- */
  --juste:         #3ecf5a;  /* 10.1:1 */
  --juste-fond:    #102a17;
  --presque:       #f5b544;  /* 11.3:1 */
  --presque-fond:  #2e2210;

  /* --- Postes --- */
  --poste-1:       #828fff;
  --poste-2:       #4ec9b0;  /* 10.1:1 */

  /* --- Typographie. Polices interdites par la charte (Inter, Roboto,
         Arial, Space Grotesk) volontairement absentes de la pile. --- */
  --police: "Segoe UI", Ubuntu, Cantarell, "Noto Sans", "DejaVu Sans",
            "Helvetica Neue", sans-serif;

  --t-affiche:  clamp(2rem, 5vw, 3.5rem);
  --t-titre:    clamp(1.5rem, 3.2vw, 2.25rem);
  --t-sous:     clamp(1.125rem, 2vw, 1.5rem);
  --t-corps:    clamp(1rem, 1.4vw, 1.125rem);
  --t-petit:    0.875rem;
  --t-legende:  0.75rem;

  /* --- Espacements --- */
  --e-1: 0.25rem; --e-2: 0.5rem;  --e-3: 0.75rem;
  --e-4: 1rem;    --e-5: 1.5rem;  --e-6: 2rem;   --e-7: 3rem;

  --rayon:       12px;
  --rayon-petit: 8px;

  /* --- Cible tactile : plancher absolu, jamais rogné --- */
  --cible-min: 48px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--encre);
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { margin: 0 0 var(--e-3); font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: var(--t-titre); }
h2 { font-size: var(--t-sous); }
h3 { font-size: var(--t-corps); }
p  { margin: 0 0 var(--e-3); }

a { color: var(--accent); }

/* --- Focus visible : obligation d'accessibilité --- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* =====================================================================
   Mise en page générique
   ===================================================================== */

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--e-5) var(--e-4) var(--e-7);
}

.bandeau {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--e-3);
  padding-bottom: var(--e-4);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--e-5);
}

.marque {
  font-size: var(--t-sous);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.marque span { color: var(--accent); }

.eyebrow {
  font-size: var(--t-legende);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--encre-tenue);
}

.carte {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--rayon);
  padding: var(--e-5);
  margin-bottom: var(--e-4);
}

.grille-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--e-4);
}
@media (min-width: 720px) {
  .grille-2 { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   Contrôles
   ===================================================================== */

.champ { margin-bottom: var(--e-4); }
.champ label {
  display: block;
  font-size: var(--t-petit);
  color: var(--encre-douce);
  margin-bottom: var(--e-2);
}

input, select {
  width: 100%;
  min-height: var(--cible-min);
  padding: var(--e-2) var(--e-3);
  font: inherit;
  color: var(--encre);
  background: var(--surface-2);
  border: 1px solid var(--hairline-fort);
  border-radius: var(--rayon-petit);
}

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e-2);
  min-height: var(--cible-min);
  padding: var(--e-2) var(--e-5);
  font: inherit;
  font-weight: 600;
  color: var(--sur-accent);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--rayon-petit);
  cursor: pointer;
}
.bouton:hover { background: #97a2ff; }
.bouton[disabled] { opacity: 0.45; cursor: not-allowed; }

.bouton.secondaire {
  color: var(--encre);
  background: var(--surface-2);
  border-color: var(--hairline-fort);
}
.bouton.secondaire:hover { background: var(--surface-3); }

/* =====================================================================
   États obligatoires : chargement, vide, erreur
   ===================================================================== */

.etat {
  padding: var(--e-6) var(--e-4);
  text-align: center;
  border: 1px dashed var(--hairline-fort);
  border-radius: var(--rayon);
  color: var(--encre-tenue);
}
.etat--erreur {
  color: var(--presque);
  border-color: var(--presque);
  border-style: solid;
  background: var(--presque-fond);
}
.etat[hidden] { display: none; }

.chargement::after {
  content: "";
  display: inline-block;
  width: 1em; height: 1em;
  margin-left: var(--e-2);
  border: 2px solid var(--encre-tenue);
  border-top-color: transparent;
  border-radius: 50%;
  vertical-align: -0.15em;
  animation: tourne 0.8s linear infinite;
}
@keyframes tourne { to { transform: rotate(360deg); } }

/* =====================================================================
   Pastilles / listes
   ===================================================================== */

.pastille {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  padding: 2px var(--e-3);
  font-size: var(--t-petit);
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--hairline-fort);
  color: var(--encre-douce);
}
.pastille--p1 { color: var(--poste-1); border-color: var(--poste-1); }
.pastille--p2 { color: var(--poste-2); border-color: var(--poste-2); }
.pastille--juste   { color: var(--juste);   border-color: var(--juste); }
.pastille--presque { color: var(--presque); border-color: var(--presque); }

.liste-manches { list-style: none; margin: 0; padding: 0; }
.liste-manches li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-3);
  flex-wrap: wrap;
  padding: var(--e-3);
  border: 1px solid var(--hairline);
  border-radius: var(--rayon-petit);
  margin-bottom: var(--e-2);
  background: var(--surface-2);
}
.liste-manches li[data-statut="ouverte"] { border-color: var(--accent); }
.liste-manches li[data-statut="fermee"]  { opacity: 0.6; }

/* =====================================================================
   ÉCRAN JOUEUR — répartition imposée 15 / 50 / 35
   ===================================================================== */

.console {
  display: grid;
  grid-template-rows: 15% 50% 35%;
  height: 100dvh;
  height: 100vh;
}

.zone-chrono {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--e-2);
  padding: var(--e-3) var(--e-4);
  border-bottom: 1px solid var(--hairline);
}
.chrono-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-3);
  font-size: var(--t-petit);
  color: var(--encre-douce);
}
.chrono-valeur {
  font-size: var(--t-sous);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.chrono-piste {
  height: 8px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.chrono-jauge {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.25s linear;
}

.zone-enonce {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--e-4);
  padding: var(--e-4) var(--e-5);
  text-align: center;
  overflow-y: auto;
}
.enonce {
  font-size: var(--t-affiche);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.zone-grille {
  padding: var(--e-3) var(--e-4) var(--e-4);
  border-top: 1px solid var(--hairline);
  overflow-y: auto;           /* plutôt que d'écraser les cibles sous 48px */
  -webkit-overflow-scrolling: touch;
}
.grille-propositions {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* 2 colonnes, imposé */
  gap: var(--e-2);
}

/* --- Proposition : double état pression → relâchement --- */
.proposition {
  position: relative;
  min-height: var(--cible-min);
  padding: var(--e-2) var(--e-3);
  font: inherit;
  font-size: var(--t-corps);
  font-weight: 500;
  text-align: left;
  color: var(--encre);
  background: var(--surface-2);
  border: 2px solid var(--hairline-fort);
  border-radius: var(--rayon-petit);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.08s ease, background 0.12s ease, border-color 0.12s ease;
}
.proposition:hover:not([disabled]) { border-color: var(--encre-tenue); }

/* état 1 : pression maintenue — armé, rien n'est encore envoyé */
.proposition.armee {
  transform: scale(0.97);
  background: var(--surface-3);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.proposition.armee::after {
  content: "relâchez pour valider";
  position: absolute;
  inset: auto var(--e-2) 2px auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}

/* état 2 : relâchement — choix envoyé */
.proposition.choisie {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
}
.proposition.juste {
  border-color: var(--juste);
  background: var(--juste-fond);
  color: var(--juste);
}
.proposition.presque {
  border-color: var(--presque);
  background: var(--presque-fond);
  color: var(--presque);
}
.proposition.retiree {
  opacity: 0.28;
  text-decoration: line-through;
  pointer-events: none;
}
.proposition[disabled] { cursor: default; }

/* --- Micro-feedback 1,5 s, non bloquant --- */
.feedback {
  position: fixed;
  left: 50%;
  bottom: var(--e-5);
  transform: translate(-50%, 16px);
  width: min(680px, calc(100vw - 2rem));
  padding: var(--e-4);
  border-radius: var(--rayon);
  border: 2px solid var(--juste);
  background: var(--juste-fond);
  color: var(--encre);
  opacity: 0;
  pointer-events: none;      /* non bloquant : n'intercepte aucun geste */
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 40;
}
.feedback.visible { opacity: 1; transform: translate(-50%, 0); }
.feedback--presque { border-color: var(--presque); background: var(--presque-fond); }
.feedback-titre {
  font-size: var(--t-sous);
  font-weight: 700;
  margin-bottom: var(--e-1);
}
.feedback--juste   .feedback-titre { color: var(--juste); }
.feedback--presque .feedback-titre { color: var(--presque); }
.feedback-explication {
  font-size: var(--t-petit);
  color: var(--encre-douce);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .proposition, .feedback, .chrono-jauge { transition: none; }
  .chargement::after { animation: none; }
}

/* =====================================================================
   ÉCRAN PUBLIC — carte 60 % / grilles 40 %
   ===================================================================== */

.scene {
  display: grid;
  grid-template-rows: auto 60% 40%;
  height: 100dvh;
  height: 100vh;
  overflow: hidden;
}
.scene-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-4);
  flex-wrap: wrap;
  padding: var(--e-3) var(--e-5);
  border-bottom: 1px solid var(--hairline);
}
.scene-carte { position: relative; min-height: 0; }
#carte { width: 100%; height: 100%; background: var(--canvas); }
.leaflet-container { background: var(--canvas) !important; outline: none; }

.scene-bas {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--e-4);
  padding: var(--e-4) var(--e-5);
  border-top: 1px solid var(--hairline);
  min-height: 0;
  overflow: hidden;
}
@media (min-width: 900px) {
  .scene-bas { grid-template-columns: 2fr 1fr; }
}

.tableau-ordre { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.tableau-ordre li {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  padding: var(--e-2) var(--e-3);
  border-bottom: 1px solid var(--hairline);
  font-size: var(--t-corps);
}
.rang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface-3);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rang--1 { background: var(--accent); color: var(--sur-accent); }

.legende { display: flex; flex-wrap: wrap; gap: var(--e-3); }
.legende-item { display: flex; align-items: center; gap: var(--e-2); font-size: var(--t-petit); }
.puce { width: 14px; height: 14px; border-radius: 4px; flex: 0 0 auto; }

/* =====================================================================
   Bilan
   ===================================================================== */

.barre-taux {
  height: 10px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin-top: var(--e-2);
}
.barre-taux span { display: block; height: 100%; background: var(--juste); }

.a-revoir {
  border-left: 3px solid var(--presque);
  padding-left: var(--e-4);
  margin-bottom: var(--e-4);
}

/* =====================================================================
   Mentions légales — obligatoires (charte FIVE SARL)
   ===================================================================== */

.mentions {
  margin-top: var(--e-6);
  padding-top: var(--e-4);
  border-top: 1px solid var(--hairline);
  font-size: var(--t-legende);
  line-height: 1.6;
  color: var(--encre-tenue);
}
.mentions--compact {
  margin: 0;
  padding: var(--e-2) var(--e-5);
  border-top: 1px solid var(--hairline);
  border-bottom: 0;
  text-align: center;
}

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

/* =====================================================================
   Suivi de chantier (page d'accueil)
   ===================================================================== */

.jauge-globale { margin-bottom: var(--e-6); }
.jauge-globale-tete {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--e-2);
}
.jauge-globale-tete strong { font-size: var(--t-titre); font-variant-numeric: tabular-nums; }
.jauge-globale .chrono-piste { height: 12px; }
.jauge-globale .chrono-jauge { background: var(--accent); transition: width 0.6s ease; }

.etapes { list-style: none; margin: 0; padding: 0; }
.etape {
  position: relative;
  padding: var(--e-4) var(--e-4) var(--e-4) var(--e-5);
  margin-bottom: var(--e-3);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--hairline-fort);
  border-radius: var(--rayon);
}
.etape--fait     { border-left-color: var(--juste); }
.etape--en_cours { border-left-color: var(--presque); }

.etape-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-3);
  flex-wrap: wrap;
  margin-bottom: var(--e-2);
}
.etape-tete h3 { margin: 0; }
.etape-detail {
  font-size: var(--t-petit);
  color: var(--encre-douce);
  margin: 0 0 var(--e-3);
}
.etape .chrono-piste { height: 6px; }

.mesures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--e-3);
  margin-top: var(--e-4);
}
.tuile {
  padding: var(--e-4);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--rayon-petit);
}
.tuile-valeur {
  font-size: var(--t-sous);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.tuile-libelle {
  font-size: var(--t-legende);
  color: var(--encre-tenue);
  margin-top: var(--e-1);
}

/* =====================================================================
   Écran de relecture
   ===================================================================== */

.relecture-carte { border-left: 3px solid var(--presque); }

.distracteurs {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--e-2);
  margin-top: var(--e-3);
}
@media (min-width: 620px) {
  .distracteurs { grid-template-columns: 1fr 1fr; }
}

.distracteur {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  min-height: var(--cible-min);
  padding: var(--e-2) var(--e-3);
  background: var(--surface-2);
  border: 1px solid var(--hairline-fort);
  border-radius: var(--rayon-petit);
  cursor: pointer;
  font-size: var(--t-petit);
}
.distracteur:hover { border-color: var(--encre-tenue); }
.distracteur input { width: 20px; height: 20px; min-height: 0; flex: 0 0 auto; accent-color: var(--juste); }
/* Décoché = écarté par le relecteur : on le montre barré, pas caché. */
.distracteur:has(input:not(:checked)) { opacity: 0.5; }
.distracteur:has(input:not(:checked)) span:first-of-type { text-decoration: line-through; }

/* =====================================================================
   PLATEAU JOUEUR — habillage « question pour un champion »
   Le wireframe 15/50/35 est remplacé par une grille à 4 bandes :
   bandeau de score, énoncé, propositions, barre d'action.
   Le plancher de 48 px sur les cibles tactiles, lui, reste intouchable.
   ===================================================================== */

.plateau-body { overflow: hidden; }

.plateau {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  height: 100dvh;
  height: 100vh;
  background:
    radial-gradient(120% 80% at 50% 0%, #12161f 0%, var(--canvas) 60%);
}

/* ---- bandeau : score / chrono / score ---- */

.plateau-tete {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--e-3);
  padding: var(--e-3) var(--e-4);
  border-bottom: 1px solid var(--hairline);
  background: rgba(0, 0, 0, 0.35);
}

.equipe {
  display: grid;
  grid-template-areas: "nom score" "jauge jauge";
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px var(--e-3);
  padding: var(--e-2) var(--e-3);
  border-radius: var(--rayon-petit);
  border: 1px solid var(--hairline);
  opacity: 0.45;
  transition: opacity 0.3s ease;
}
.equipe--presente { opacity: 1; }
.equipe--1 { border-left: 4px solid var(--poste-1); }
.equipe--2 { border-right: 4px solid var(--poste-2); text-align: right; }
.equipe--2 { grid-template-areas: "score nom" "jauge jauge"; grid-template-columns: auto 1fr; }

.equipe-nom {
  grid-area: nom;
  font-size: var(--t-petit);
  font-weight: 600;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.equipe-score {
  grid-area: score;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.equipe--1 .equipe-score { color: var(--poste-1); }
.equipe--2 .equipe-score { color: var(--poste-2); }
.equipe-jauge {
  grid-area: jauge;
  display: block;
  height: 3px;
  width: 0%;
  border-radius: 999px;
  background: currentColor;
  transition: width 0.5s ease;
}
.equipe--1 .equipe-jauge { color: var(--poste-1); }
.equipe--2 .equipe-jauge { color: var(--poste-2); margin-left: auto; }

@keyframes bondir {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.score-monte { animation: bondir 0.5s ease; }

/* ---- chrono central ---- */

.chrono-bloc { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.chrono-rond {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(64px, 11vw, 92px);
  height: clamp(64px, 11vw, 92px);
  border-radius: 50%;
  border: 2px solid var(--hairline-fort);
  background: var(--surface-1);
}
.chrono-val {
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.chrono-unite { font-size: 10px; color: var(--encre-tenue); letter-spacing: 0.1em; }

@keyframes battre {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
.chrono-rond--chaud {
  border-color: var(--presque);
  color: var(--presque);
  animation: battre 1s ease-in-out infinite;
}

/* ---- énoncé ---- */

.plateau-enonce {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--e-3);
  padding: var(--e-4) var(--e-5);
  text-align: center;
  min-height: 0;
  overflow-y: auto;
}
.plateau-enonce .enonce {
  font-size: clamp(1.6rem, 4.2vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.barre-temps {
  width: min(560px, 90%);
  height: 6px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.barre-temps-remplie {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--presque));
  transition: width 0.25s linear;
}

/* ---- grille ---- */

.plateau-grille {
  padding: 0 var(--e-4) var(--e-3);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@keyframes entrer {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.plateau .proposition {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  animation: entrer 0.3s ease both;
  animation-delay: var(--retard, 0ms);
}
.proposition-num {
  flex: 0 0 auto;
  font-size: 1.1rem;
  color: var(--encre-tenue);
  line-height: 1;
}
.proposition-texte { flex: 1; }
.proposition.juste  .proposition-num { color: var(--juste); }
.proposition.presque .proposition-num { color: var(--presque); }

/* ---- barre d'action ---- */

.plateau-pied {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  flex-wrap: wrap;
  padding: var(--e-2) var(--e-4) var(--e-3);
  border-top: 1px solid var(--hairline);
}
.plateau-pied .bouton { min-height: 44px; padding: var(--e-2) var(--e-4); }

/* ---- flash de conquête ---- */

.flash-conquete {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(60% 60% at 50% 50%, rgba(130,143,255,0.28), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 30;
}
.flash-conquete.visible { opacity: 1; }
.flash-texte {
  font-size: clamp(1.5rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--encre);
  text-shadow: 0 0 40px rgba(130,143,255,0.9);
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(.2,1.4,.4,1);
}
.flash-conquete.visible .flash-texte { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .plateau .proposition, .score-monte, .chrono-rond--chaud, .flash-texte {
    animation: none; transition: none;
  }
}

/* =====================================================================
   Explorateur géographique
   ===================================================================== */

.explo-body { overflow: hidden; }

.explo {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "tete" "carte" "panneau";
  height: 100dvh;
  height: 100vh;
}
@media (min-width: 900px) {
  .explo {
    grid-template-columns: 1fr 340px;
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "tete tete" "carte panneau";
  }
}

.explo-tete {
  grid-area: tete;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-4);
  flex-wrap: wrap;
  padding: var(--e-3) var(--e-4);
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-1);
}
.explo-outils { display: flex; align-items: center; gap: var(--e-2); flex-wrap: wrap; }
.explo-outils input { width: min(320px, 60vw); min-height: 44px; }
.explo-outils .bouton { min-height: 44px; padding: var(--e-2) var(--e-4); }

/* fil d'Ariane */
.fil { display: flex; align-items: center; gap: var(--e-2); flex-wrap: wrap; margin-top: 2px; }
.fil-item {
  font-size: var(--t-corps);
  font-weight: 600;
  color: var(--encre);
  background: none; border: 0; padding: 0; font-family: inherit;
}
.fil-item--lien { color: var(--accent); cursor: pointer; text-decoration: underline; }
.fil-sep { color: var(--encre-tenue); }

.suggestions {
  position: absolute;
  top: 100%; right: var(--e-4);
  z-index: 1000;
  width: min(420px, calc(100vw - 2rem));
  max-height: 55vh;
  overflow-y: auto;
  margin: 0; padding: var(--e-1);
  list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--hairline-fort);
  border-radius: var(--rayon-petit);
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}
.suggestion {
  display: flex; align-items: center; gap: var(--e-3);
  min-height: 44px;
  padding: var(--e-2) var(--e-3);
  border-radius: var(--rayon-petit);
  cursor: pointer;
}
.suggestion:hover, .suggestion:focus-visible { background: var(--surface-3); outline: none; }
.suggestion--vide { color: var(--encre-tenue); cursor: default; font-size: var(--t-petit); }

.explo-carte { grid-area: carte; position: relative; min-height: 0; }
.explo-carte #carte { width: 100%; height: 100%; background: var(--canvas); }
.explo-carte .leaflet-container { background: var(--canvas); }
.leaflet-control-attribution {
  background: rgba(8,9,11,.82) !important;
  color: var(--encre-tenue) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--encre-douce) !important; }

.explo-etat {
  position: absolute;
  left: 50%; bottom: var(--e-4);
  transform: translateX(-50%);
  z-index: 500;
  padding: var(--e-2) var(--e-4);
  background: var(--presque-fond);
  border: 1px solid var(--presque);
  color: var(--presque);
  border-radius: 999px;
  font-size: var(--t-petit);
}
.explo-etat[hidden] { display: none; }

.explo-panneau {
  grid-area: panneau;
  padding: var(--e-4);
  border-top: 1px solid var(--hairline);
  background: var(--surface-1);
  overflow-y: auto;
  max-height: 38vh;
}
@media (min-width: 900px) {
  .explo-panneau { border-top: 0; border-left: 1px solid var(--hairline); max-height: none; }
}
.explo-panneau h2 { margin-bottom: 0; }

.fiche { display: grid; grid-template-columns: auto 1fr; gap: var(--e-2) var(--e-4); margin: var(--e-4) 0; }
.fiche dt { font-size: var(--t-petit); color: var(--encre-tenue); }
.fiche dd { margin: 0; font-size: var(--t-petit); font-weight: 600; text-align: right; }
