/* ==========================================================================
   VTCPass — V1.2 : mode Trajet, Duel, Carte des pièges, autonomie, guides, B2B, impression
   ========================================================================== */

/* ---------- Mode Trajet : écran sombre, boutons géants ---------- */
.trajet {
  min-height: 100vh; background: #0B1017; color: #F4F6F8; padding: var(--e-5) var(--e-4) var(--e-8);
  display: grid; align-content: start; justify-items: center;
}
.trajet-ecran { width: 100%; max-width: 40rem; display: grid; gap: var(--e-4); }
.trajet-ecran[hidden] { display: none; }
.trajet-alerte { display: flex; gap: var(--e-3); align-items: center; padding: var(--e-4); border: 3px solid var(--rouge-interdiction); border-radius: var(--r-panneau); background: #2A0E14; font-size: var(--t-2); }
.trajet-alerte .icon { width: 2.2rem; height: 2.2rem; color: #FF6B7D; flex-shrink: 0; }
.trajet-enonce { font-size: var(--t-3); line-height: 1.35; font-weight: 700; margin: 0; }
.trajet-progression { color: #AEB8C6; font-family: var(--police-titre); font-weight: 800; margin: 0; }
.trajet-choix { display: grid; gap: var(--e-3); }
.trajet-geant {
  display: flex; gap: var(--e-4); align-items: center; width: 100%; min-height: 84px; padding: var(--e-4);
  border: 3px solid #3C6FC4; border-radius: var(--r-bouton); background: #16202D; color: #F4F6F8;
  font: inherit; font-size: var(--t-2); font-weight: 700; text-align: start; text-decoration: none; cursor: pointer;
}
.trajet-geant:focus-visible { outline: 4px solid var(--ambre-chantier); outline-offset: 3px; }
.trajet-commencer, [data-action="suivante"].trajet-geant { justify-content: center; background: #1D4E9E; }
.trajet-lettre { display: inline-grid; place-items: center; min-width: 3rem; height: 3rem; border-radius: 8px; background: #F4F6F8; color: #0B1017; font-family: var(--police-titre); font-weight: 800; }
.trajet-geant.est-juste { border-color: #3FBF87; background: #0F3A28; }
.trajet-geant.est-fausse { border-color: #FF6B7D; background: #3A1018; }
.trajet-geant:disabled { cursor: default; }
.trajet-outils { display: flex; gap: var(--e-3); flex-wrap: wrap; }
.trajet-petit { min-height: 52px; padding: var(--e-2) var(--e-4); border: 2px solid #5B6676; border-radius: var(--r-bouton); background: transparent; color: #F4F6F8; font: inherit; font-weight: 700; cursor: pointer; }
.trajet-petit[aria-pressed="true"] { background: #F4F6F8; color: #0B1017; }
.trajet-correction { display: grid; gap: var(--e-3); padding: var(--e-4); border-radius: var(--r-panneau); background: #16202D; }
.trajet-correction[hidden] { display: none; }
.trajet-verdict { font-size: var(--t-2); font-weight: 800; margin: 0; }
.trajet-regle, .trajet-regle-ar { font-size: var(--t-1); margin: 0; }
.trajet-score { font-family: var(--police-titre); font-size: var(--t-5); font-weight: 800; text-align: center; margin: 0; }
.trajet-sortie { color: #AEB8C6; text-align: center; }
.trajet-info { max-width: 40rem; color: #F2A900; }

/* ---------- Duel ---------- */
.duel-moi { font-weight: 800; }
.est-juste .resultat .icon { color: var(--succes); }
.est-fausse .resultat .icon { color: var(--danger); }

/* ---------- Carte des pièges ---------- */
.carte-legende { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-5); max-width: none; }
.carte-legende li { display: flex; gap: var(--e-2); align-items: center; margin: 0; }
.carte-pastille { width: 1.1rem; height: 1.1rem; border-radius: 4px; display: inline-block; border: 1px solid var(--ligne); }
.carte-grille { display: grid; gap: var(--e-5); grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.carte-cases { list-style: none; padding: 0; display: grid; gap: var(--e-2); max-width: none; }
.carte-case { margin: 0; }
.carte-case a { display: grid; gap: 2px; padding: var(--e-3); border-radius: var(--r-bouton); border: 2px solid var(--ligne); color: var(--texte); text-decoration: none; background: var(--surface); }
.carte-case small { color: var(--texte-doux); }
.carte-ar { color: var(--texte-doux); }
.carte-vert, .carte-case.carte-vert a { border-color: var(--succes); }
.carte-ambre, .carte-case.carte-ambre a { border-color: var(--ambre-chantier); border-style: dashed; }
.carte-rouge, .carte-case.carte-rouge a { border-color: var(--danger); border-width: 3px; }
.carte-pastille.carte-vert { background: var(--succes); }
.carte-pastille.carte-ambre { background: var(--ambre-chantier); }
.carte-pastille.carte-rouge { background: var(--danger); }
.carte-pastille.carte-inconnu { background: var(--surface); }

/* ---------- Autonomie en français ---------- */
.autonomie-jauge { display: flex; gap: var(--e-3); align-items: center; margin: 0; }
.autonomie-barre { flex: 1; height: 14px; border-radius: 7px; background: var(--bitume-clair); border: 1px solid var(--ligne); overflow: hidden; }
.autonomie-rempli { display: block; height: 100%; }
.autonomie-haut { background: var(--succes); }
.autonomie-moyen { background: var(--marque); }
.autonomie-bas { background: var(--ambre-chantier); }
.autonomie-l-0 { width: 0%; }
.autonomie-l-5 { width: 5%; }
.autonomie-l-10 { width: 10%; }
.autonomie-l-15 { width: 15%; }
.autonomie-l-20 { width: 20%; }
.autonomie-l-25 { width: 25%; }
.autonomie-l-30 { width: 30%; }
.autonomie-l-35 { width: 35%; }
.autonomie-l-40 { width: 40%; }
.autonomie-l-45 { width: 45%; }
.autonomie-l-50 { width: 50%; }
.autonomie-l-55 { width: 55%; }
.autonomie-l-60 { width: 60%; }
.autonomie-l-65 { width: 65%; }
.autonomie-l-70 { width: 70%; }
.autonomie-l-75 { width: 75%; }
.autonomie-l-80 { width: 80%; }
.autonomie-l-85 { width: 85%; }
.autonomie-l-90 { width: 90%; }
.autonomie-l-95 { width: 95%; }
.autonomie-l-100 { width: 100%; }

/* ---------- Pages /pro, guides ---------- */
.grille-3 { display: grid; gap: var(--e-4); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.chapeau { font-size: var(--t-2); }
.carte-tarif { text-align: center; justify-items: center; }
.plaquette-tete { display: flex; gap: var(--e-4); align-items: center; }
.plaquette-tete svg { width: 64px; height: 64px; flex-shrink: 0; }
.guide-checklist li::marker { content: "☐  "; }

/* ---------- Impression (guides, plaquette) ---------- */
@media print {
  .entete, .pied, .sans-impression, .flash, .admin-nav { display: none !important; }
  body { background: #fff; color: #000; }
  .feuille { border: 0; box-shadow: none; padding: 0; break-inside: avoid-page; }
  .guide-section { break-before: page; }
  a { color: #000; text-decoration: none; }
  details { display: block; }
  details > summary { list-style: none; }
}
.regle { overflow-wrap: anywhere; }

/* ---------- Admin : statistiques ---------- */
.stats-cartes { display: grid; gap: var(--e-3); grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.stats-cartes .feuille { padding: var(--e-4); }
.stats-cartes p { margin: 0; }
.stats-chiffre { font-family: var(--police-titre); font-weight: 800; font-size: var(--t-4); color: var(--marque); }
.graphique { margin: 0; }
.graphique svg { display: block; width: 100%; height: auto; }
.graphique-axe { stroke: var(--ligne); stroke-width: 1; }
.graphique-barre { fill: var(--marque); }
.graphique-barre:hover { fill: var(--vert-direction); }
.graphique-etiquette, .graphique-max { fill: var(--texte-doux); font-size: 11px; font-family: var(--police-texte); }
.tableau-defilant { overflow-x: auto; }
