/* ENVOL — l'interface : verre sombre sur le paysage, chiffres lisibles d'un coup d'œil. */
:root {
  --fond: rgba(10, 16, 24, .62); --fond-fort: rgba(10, 16, 24, .9); --ligne: rgba(255, 255, 255, .14);
  --texte: #eef3f8; --discret: #a9b6c4; --accent: #ffb300; --monte: #2ee59d; --chute: #ff5252; --bleu: #4fc3f7;
  --r: 14px; --police: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1118; color: var(--texte); font: 14px/1.4 var(--police); }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
button { font: inherit; color: var(--texte); background: rgba(255, 255, 255, .08); border: 1px solid var(--ligne); border-radius: 10px; padding: 9px 14px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
button:hover { background: rgba(255, 255, 255, .16); }
button.principal { background: var(--accent); color: #1a1200; border-color: transparent; font-weight: 700; }
button.principal:hover { filter: brightness(1.08); }
select, input { font: inherit; color: var(--texte); background: rgba(0, 0, 0, .35); border: 1px solid var(--ligne); border-radius: 9px; padding: 8px 10px; width: 100%; }
input[type=range] { padding: 0; accent-color: var(--accent); }
label { display: flex; flex-direction: column; gap: 6px; color: var(--discret); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
label span { text-transform: none; letter-spacing: 0; color: var(--texte); }
.discret { color: var(--discret); }
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); border: 1px solid var(--ligne); font: 12px var(--police); text-align: center; }
.logo { font-weight: 900; letter-spacing: .32em; font-size: 26px; color: #fff; }

/* écrans pleins */
.ecran { position: fixed; inset: 0; z-index: 20; }
#chargement { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(ellipse at 50% 30%, #1d3a5a, #070b10 70%); padding: 24px; text-align: center; }
#chargement .marque { display: flex; flex-direction: column; gap: 6px; color: var(--discret); }
#chargement .logo { font-size: 48px; }
.charge { width: min(420px, 90vw); height: 6px; background: rgba(255, 255, 255, .1); border-radius: 3px; overflow: hidden; }
#charge-barre { height: 100%; width: 0; background: linear-gradient(90deg, var(--bleu), var(--accent)); transition: width .3s; }
#charge-barre.erreur { background: var(--chute); }
.sources { max-width: 560px; font-size: 12px; color: #6f7d8c; }

.panneau-menu { overflow: auto; padding: clamp(16px, 4vw, 40px); background: linear-gradient(90deg, rgba(7, 11, 16, .93) 0%, rgba(7, 11, 16, .78) 55%, rgba(7, 11, 16, .35) 100%); }
.panneau-menu header { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin-bottom: 18px; }
.panneau-menu .sous { color: var(--discret); }
#niveaux { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.onglet.actif { background: var(--accent); color: #1a1200; border-color: transparent; }
.colonnes { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); gap: 22px; max-width: 1180px; margin-top: 14px; }
@media (max-width: 860px) { .colonnes { grid-template-columns: 1fr; } }
.liste-missions { display: flex; flex-direction: column; gap: 10px; }
.carte-mission { flex-direction: column; align-items: flex-start; text-align: left; padding: 14px 16px; background: var(--fond); border-radius: var(--r); gap: 6px; }
.carte-mission strong { font-size: 16px; }
.carte-mission span { color: var(--discret); }
.carte-mission small { color: #cfd8e3; display: flex; gap: 6px; align-items: center; }
.carte-mission.actif { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.reglages { display: flex; flex-direction: column; gap: 14px; background: var(--fond); border: 1px solid var(--ligne); border-radius: var(--r); padding: 18px; align-self: start; }
.reglages .boutons { display: flex; flex-wrap: wrap; gap: 10px; }
.petit { font-size: 11px; }
.briefing { white-space: pre-wrap; color: #dbe5ef; margin: 0; max-height: 40vh; overflow: auto; }
.avis { display: flex; gap: 10px; padding: 12px; border-radius: 10px; background: rgba(46, 229, 157, .1); border: 1px solid rgba(46, 229, 157, .4); }
.avis div { display: flex; flex-direction: column; gap: 3px; }
.avis small { color: var(--discret); }
.avis-experts { background: rgba(255, 179, 0, .1); border-color: rgba(255, 179, 0, .45); }
.avis-non { background: rgba(255, 82, 82, .1); border-color: rgba(255, 82, 82, .5); }

/* tableau de bord */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud > * { pointer-events: auto; }
.bloc { position: absolute; background: var(--fond); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid var(--ligne); border-radius: var(--r); padding: 12px 14px; }
.mission { top: 14px; left: 14px; width: min(340px, 44vw); display: flex; flex-direction: column; gap: 4px; }
.mission strong { font-size: 15px; }
.jauge { height: 4px; background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden; margin: 4px 0; }
#mission-barre { height: 100%; width: 0; background: var(--accent); transition: width .4s; }
#radio { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: min(520px, 46vw); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.msg { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 10px; background: var(--fond-fort); border: 1px solid var(--ligne); transition: opacity 1.5s; }
.msg.prio2 { border-color: rgba(255, 179, 0, .6); }
.msg.prio3 { border-color: var(--chute); background: rgba(70, 10, 10, .9); }
.msg.vieux { opacity: .45; }
.instruments { top: 14px; right: 14px; width: 210px; display: flex; flex-direction: column; gap: 10px; }
.vario { display: flex; align-items: center; gap: 12px; }
.vario > div:last-child { display: flex; flex-direction: column; }
#vario-val { font: 800 38px/1 var(--police); font-variant-numeric: tabular-nums; }
#vario-val.monte { color: var(--monte); } #vario-val.chute { color: var(--chute); }
#vario-barre { --v: 0; position: relative; width: 10px; height: 64px; border-radius: 5px; background: rgba(255, 255, 255, .1); overflow: hidden; }
#vario-barre::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: calc(max(var(--v), 0) * 50%); transform: translateY(-100%); background: var(--monte); }
#vario-barre::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: calc(max(calc(var(--v) * -1), 0) * 50%); background: var(--chute); }
dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; }
dt { color: var(--discret); font-size: 12px; } dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.rose { position: relative; height: 74px; border-radius: 50%; width: 74px; margin: 0 auto; border: 2px solid var(--ligne); display: flex; flex-direction: column; align-items: center; justify-content: center; }
#rose-fleche { position: absolute; inset: 6px; }
#rose-fleche::before { content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%); border: 7px solid transparent; border-bottom: 18px solid var(--bleu); }
.rose small { color: var(--discret); font-size: 10px; }
.rose .cap { position: absolute; bottom: -20px; font-size: 11px; color: var(--discret); }
.etat { text-align: center; margin-top: 12px; font-weight: 700; color: var(--accent); }
#minicarte { position: absolute; left: 14px; bottom: 14px; border-radius: 50%; border: 2px solid var(--ligne); box-shadow: 0 8px 30px rgba(0, 0, 0, .4); width: 230px; height: 230px; }
.commandes { left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 16px; padding: 10px 16px; }
.frein { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.barre-f { --f: 0; width: 16px; height: 56px; border-radius: 6px; background: rgba(255, 255, 255, .12); position: relative; overflow: hidden; }
.barre-f::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--f) * 100%); background: var(--accent); }
.barre-f.acc::after { background: var(--bleu); top: auto; bottom: 0; }
.frein small { font-size: 10px; color: var(--discret); }
.outils { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; }
.question { position: absolute; right: 14px; bottom: 64px; display: flex; gap: 6px; width: min(360px, 40vw); }
.question input { background: var(--fond-fort); }
.pave { display: none; }
body.tactile .tactile-seul.pave { display: grid; position: absolute; right: 14px; bottom: 110px; grid-template-columns: repeat(3, 76px); gap: 8px; }
body.tactile .pave button { height: 64px; justify-content: center; font-size: 12px; background: rgba(10, 16, 24, .7); }
body.tactile .question { display: none; }

/* fenêtres */
.fenetre { position: fixed; z-index: 30; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--fond-fort); border: 1px solid var(--ligne); border-radius: 18px; padding: 22px 24px; box-shadow: 0 20px 80px rgba(0, 0, 0, .6); }
.fenetre h2 { margin: 0 0 12px; }
.fenetre .boutons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
#res-titre.ok { color: var(--monte); } #res-titre.ko { color: var(--chute); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stats div { background: rgba(255, 255, 255, .06); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; }
.stats span { color: var(--discret); font-size: 12px; } .stats strong { font-size: 18px; }
.aide-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 6px 22px; }
.aide-grille h3 { margin: 10px 0 4px; color: var(--accent); font-size: 14px; }
.aide-grille p { margin: 4px 0; color: #d4dee8; }

@media (max-width: 700px) {
  .mission { width: calc(100vw - 28px); }
  #radio { top: auto; bottom: 260px; width: calc(100vw - 28px); }
  .instruments { top: auto; bottom: 14px; right: 14px; width: 150px; padding: 8px 10px; }
  .instruments dl dt:nth-of-type(n+5), .instruments dl dd:nth-of-type(n+5) { display: none; }
  #vario-val { font-size: 28px; }
  #minicarte { width: 130px; height: 130px; }
  .commandes, .outils span { display: none; }
  .outils { top: 150px; bottom: auto; }
}

/* ── premier vol guidé, invite, cible ─────────────────────────────── */
.accueil-guide { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 18px; }
button.grand { font-size: 18px; padding: 14px 22px; border-radius: 14px; }
.invite { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 16px; background: var(--fond-fort); border: 1px solid var(--ligne); font-size: 17px; font-weight: 600; pointer-events: none; max-width: calc(100vw - 32px); box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.invite.danger { border-color: var(--chute); background: rgba(80, 12, 12, .92); }
.invite.attention { border-color: var(--accent); }
.invite.bon { border-color: var(--monte); }
.invite:empty, .invite.vide { display: none; }
.touches { display: inline-flex; align-items: center; gap: 6px; }
.touche { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 10px; background: #f4f7fa; color: #10161d; font: 800 15px var(--police); border-bottom: 4px solid #9aa7b4; }
.touche.fleche svg { width: 20px; height: 20px; }
.ou, .plus { color: var(--discret); font-size: 13px; font-weight: 500; margin: 0 2px; }
.tuto { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); background: var(--fond-fort); border: 1px solid var(--accent); border-radius: 18px; padding: 16px 18px; box-shadow: 0 16px 60px rgba(0,0,0,.45); }
.tuto-tete { display: flex; gap: 10px; align-items: baseline; }
#tuto-num { color: var(--accent); font-weight: 800; }
#tuto-titre { font-size: 19px; }
#tuto-consigne { font-size: 17px; margin: 8px 0 12px; }
#tuto-touches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tuto-aide { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 179, 0, .12); color: #ffe7a6; }
.tuto-pied { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tuto-points { display: flex; gap: 5px; flex: 1; }
.tuto-points i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); }
.tuto-points i.fait { background: var(--monte); } .tuto-points i.encours { background: var(--accent); }
.tuto-pied button { font-size: 12px; padding: 6px 10px; }
.bravo { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font: 900 44px var(--police); color: var(--monte); text-shadow: 0 4px 30px rgba(0,0,0,.6); pointer-events: none; animation: bravo 1s ease-out; }
@keyframes bravo { from { opacity: 0; transform: translate(-50%, -30%) scale(.8); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } to { opacity: 1; } }
.cible { position: absolute; left: 50%; top: 14px; margin-left: -30px; width: 60px; display: flex; flex-direction: column; align-items: center; color: #ff9100; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); pointer-events: none; }
.cible svg { width: 34px; height: 34px; transition: transform .15s linear; }
.cible span { font: 700 12px var(--police); color: #fff; }
#radio { top: 70px; }
body.tactile .tactile-seul.pave { grid-template-columns: repeat(3, 84px); }
@media (max-width: 700px) {
  .invite { bottom: 150px; font-size: 15px; }
  .touche { min-width: 34px; height: 34px; }
  .tuto { top: 70px; }
}

/* ── mode simple (assistance) : l'essentiel seulement ─────────────── */
body.simple .mission > :not(strong):not(#arrivee) { display: none; }
body.simple .mission { width: auto; max-width: 340px; padding: 10px 14px; }
body.simple #form-question { display: none; }
body.simple .instruments dl dt:nth-of-type(n+3), body.simple .instruments dl dd:nth-of-type(n+3) { display: none; }
body.simple #radio .msg:nth-child(n+2) { display: none; }
body.simple .commandes { display: none; }
/* ── fenêtres étroites : une colonne, rien ne se chevauche ─────────── */
@media (max-width: 900px) {
  .mission { top: 10px; left: 10px; max-width: calc(100vw - 200px); }
  body.simple .mission { display: none; }
  .instruments { top: 10px; right: 10px; width: 150px; padding: 8px 10px; gap: 6px; }
  .instruments dl dt:nth-of-type(n+3), .instruments dl dd:nth-of-type(n+3) { display: none; }
  .rose { display: none; }
  #vario-val { font-size: 28px; }
  #vario-barre { height: 44px; }
  .tuto { top: 10px; left: 10px; transform: none; width: calc(100vw - 190px); padding: 12px 14px; }
  #tuto-titre { font-size: 16px; } #tuto-consigne { font-size: 14px; margin: 6px 0 8px; }
  .tuto-pied { flex-wrap: wrap; }
  #radio { top: auto; bottom: 150px; left: 10px; transform: none; width: calc(100vw - 260px); }
  body.simple #radio { display: none; }
  #form-question { display: none; }
  .commandes { display: none; }
  #minicarte { width: 130px; height: 130px; }
  .outils { bottom: 10px; right: 10px; } .outils span { display: none; }
  .invite { bottom: 64px; font-size: 14px; max-width: calc(100vw - 180px); left: auto; right: 10px; transform: none; }
  .cible { top: auto; bottom: 150px; }
}
@media (max-width: 560px) {
  .tuto { width: calc(100vw - 20px); }
  .instruments { top: auto; bottom: 64px; }
  .invite { max-width: calc(100vw - 20px); bottom: 10px; right: 10px; }
}

/* ── alertes ──────────────────────────────────────────────────────── */
.alerte { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); z-index: 15; display: flex; gap: 12px; align-items: center; width: min(640px, calc(100vw - 24px)); padding: 14px 18px; border-radius: 14px; font: 700 16px var(--police); color: #fff; background: rgba(120, 80, 0, .95); border: 2px solid var(--accent); box-shadow: 0 12px 50px rgba(0,0,0,.5); animation: alerte .35s ease-out; pointer-events: none; }
.alerte.danger { background: rgba(140, 16, 16, .96); border-color: #ff8a80; animation: alerte .35s ease-out, clignote 1s ease-in-out 3; }
.alerte.info { background: rgba(10, 40, 70, .95); border-color: var(--bleu); }
.alerte .ico { width: 26px; height: 26px; flex: none; }
@keyframes alerte { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes clignote { 50% { box-shadow: 0 0 0 6px rgba(255, 82, 82, .45), 0 12px 50px rgba(0,0,0,.5); } }

/* ── planificateur ────────────────────────────────────────────────── */
.planif { position: fixed; inset: 0; z-index: 25; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); background: #0b1118; }
.planif-carte-zone { position: relative; min-height: 0; }
#planif-carte { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.planif-legende { position: absolute; left: 10px; bottom: 6px; margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--fond-fort); font-size: 12px; color: var(--discret); }
.pt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 4px 0 10px; vertical-align: -1px; }
.pt.jaune { background: #ffd600; } .pt.bleu { background: #4fc3f7; } .pt.orange { background: #ff9100; } .pt.vert { background: #00e676; }
.planif-cote { overflow: auto; padding: 18px; border-left: 1px solid var(--ligne); display: flex; flex-direction: column; gap: 12px; }
.planif-cote h2 { margin: 0; }
.planif-reglages { display: grid; grid-template-columns: 1fr 1fr 110px; gap: 8px; }
.planif-balises { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.planif-balises li { display: grid; grid-template-columns: 24px 1fr 90px 34px; gap: 6px; align-items: center; }
.planif-balises li b { color: var(--accent); text-align: center; }
.planif-balises li button { padding: 6px; justify-content: center; }
.planif-cote .boutons { display: flex; flex-wrap: wrap; gap: 8px; }
.planif-totaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.planif-totaux div { background: rgba(255,255,255,.06); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.planif-totaux span { font-size: 11px; color: var(--discret); } .planif-totaux strong { font-size: 17px; }
.risque.ok strong { color: var(--monte); } .risque.modere strong { color: #ffd54f; } .risque.eleve strong { color: #ff9100; } .risque.grave strong { color: var(--chute); }
.planif-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 10px; }
.planif-table th, .planif-table td { padding: 5px 6px; border-bottom: 1px solid var(--ligne); text-align: right; }
.planif-table th:first-child, .planif-table td:first-child { text-align: left; }
.planif-table tr.eleve td:first-child, .planif-table tr.grave td:first-child { box-shadow: inset 3px 0 0 #ff9100; }
.planif-risques { margin: 10px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.planif-risques li { padding: 7px 10px; border-radius: 8px; background: rgba(255,255,255,.05); border-left: 3px solid #ffd54f; }
.planif-risques li.eleve { border-left-color: #ff9100; } .planif-risques li.grave { border-left-color: var(--chute); } .planif-risques li.ok { border-left-color: var(--monte); }
@media (max-width: 900px) { .planif { grid-template-columns: 1fr; grid-template-rows: 55vh auto; } .planif-cote { border-left: 0; } .planif-reglages { grid-template-columns: 1fr 1fr; } }

/* ── lancement : un seul bouton « Voler » ──────────────────────────── */
.lancement { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; align-items: stretch; width: min(980px, 100%); }
.voler { flex: 1 1 340px; flex-direction: column; justify-content: center; gap: 8px; padding: 26px 24px; border-radius: 22px; background: var(--accent); color: #1a1200; border: 0; font-weight: 800; box-shadow: 0 16px 60px rgba(255, 179, 0, .25); }
.voler .ico { width: 44px; height: 44px; }
.voler-titre { font-size: 40px; letter-spacing: .04em; }
.voler-sous { font-size: 15px; font-weight: 600; opacity: .85; }
.voler .charge { width: 80%; height: 6px; background: rgba(0,0,0,.18); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.voler #charge-barre { display: block; height: 100%; width: 0; background: #1a1200; transition: width .3s; }
.voler:focus-visible { outline: 4px solid #fff; outline-offset: 4px; }
.pilotage { flex: 1 1 300px; background: var(--fond); border: 1px solid var(--ligne); border-radius: 22px; padding: 18px 22px; text-align: left; }
.pilotage h2 { margin: 0 0 12px; font-size: 24px; }
.gestes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.gestes li { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.gestes .touches { min-width: 92px; justify-content: center; }
button.lien { background: none; border: 0; color: var(--discret); text-decoration: underline; }
/* ── pastilles de niveau d'aide ─────────────────────────────────────── */
.pastilles { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.pastilles legend { color: var(--discret); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.pastilles label { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; padding: 9px 10px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid var(--ligne); cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 13px; }
.pastilles label:has(input:checked) { border-color: var(--accent); background: rgba(255, 179, 0, .14); }
.pastilles input { accent-color: var(--accent); }
.pastilles b { color: var(--texte); } .pastilles span { color: var(--discret); }
/* ── le guide : une carte, une ligne, des pastilles ─────────────────── */
.tuto { top: 16px; width: min(760px, calc(100vw - 32px)); border-color: rgba(255,255,255,.18); background: rgba(8, 12, 18, .94); text-align: center; }
.tuto-titre { color: var(--accent); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
#tuto-consigne { font: 800 32px/1.25 var(--police); margin: 6px 0 4px; }
#tuto-consigne .touche { min-width: 48px; height: 46px; font-size: 18px; vertical-align: middle; margin: 0 4px; }
.tuto-ligne { margin: 0 0 10px; color: #cdd8e3; font-size: 16px; min-height: 1.4em; }
.tuto-ligne .touche { min-width: 30px; height: 28px; font-size: 13px; }
.tuto-points { justify-content: center; }
.tuto.reussi { box-shadow: 0 0 0 3px var(--monte), 0 16px 60px rgba(0,0,0,.45); }
.tuto .touches.pulse .touche { animation: pulse .8s ease-in-out infinite; }
.tuto .touches.fantome .touche { animation: fantome 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.14); box-shadow: 0 0 0 6px rgba(255,179,0,.45); } }
@keyframes fantome { 0%, 100% { transform: translateY(0); } 40%, 70% { transform: translateY(4px); border-bottom-width: 1px; background: #ffd54f; } }
.je-taide { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; padding: 3px 10px; border-radius: 99px; background: rgba(79,195,247,.16); color: #b3e5fc; font-size: 13px; }
.bord-danger { position: fixed; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 6px rgba(255, 82, 82, .85), inset 0 0 60px rgba(255, 82, 82, .45); z-index: 9; }
.haut-droite { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; align-items: center; }
.badge-temps { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: 99px; background: var(--fond-fort); border: 1px solid var(--ligne); font-weight: 800; }
.btn-pause { width: 44px; height: 44px; justify-content: center; padding: 0; }
.hauteur-pre { position: absolute; right: 14px; top: 70px; padding: 10px 14px; border-radius: 14px; background: var(--fond-fort); border: 1px solid var(--ligne); text-align: right; }
.hauteur-pre strong { display: block; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.hauteur-pre small { color: var(--discret); }
.hauteur-pre .perdre { height: 6px; margin-top: 8px; background: rgba(255,255,255,.12); border-radius: 3px; overflow: hidden; }
.hauteur-pre .perdre div { height: 100%; width: 0; background: var(--accent); }
/* poignées de frein (et zones de pouce sur téléphone) */
.poignee { position: absolute; bottom: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 16px; background: var(--fond); border: 1px solid var(--ligne); touch-action: none; user-select: none; -webkit-user-select: none; }
.poignee.g { left: 18px; } .poignee.d { right: 18px; }
body:not(.simple) .poignee { display: none; }
body.simple .poignee { display: flex; }
.jauge-f { position: relative; width: 22px; height: 110px; border-radius: 8px; background: rgba(255,255,255,.12); overflow: hidden; }
.jauge-f .rempli { position: absolute; left: 0; right: 0; top: 0; height: 0; background: var(--accent); }
.jauge-f .plafond { position: absolute; left: -4px; right: -4px; height: 2px; background: #fff; opacity: .8; display: none; }
.poignee.actif { border-color: var(--accent); background: rgba(255, 179, 0, .16); }
.poignee.mauvais { border-color: var(--chute); }
body.tactile.simple .poignee { bottom: 0; width: 40vw; height: 45vh; justify-content: flex-end; padding-bottom: 18px; border-radius: 24px 24px 0 0; background: rgba(10,16,24,.22); border-style: dashed; }
body.tactile.simple .poignee.g { left: 0; border-left: 0; } body.tactile.simple .poignee.d { right: 0; border-right: 0; }
.btn-action { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: 96px; height: 96px; border-radius: 50%; flex-direction: column; justify-content: center; gap: 2px; padding: 0; background: var(--accent); color: #1a1200; font-weight: 800; border: 0; touch-action: none; }
.btn-action .ico { width: 30px; height: 30px; }
.btn-action span { font-size: 13px; }
.btn-action .anneau { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); transform: rotate(-90deg); }
.btn-action .anneau circle { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 6; }
.btn-action .anneau .progres { stroke: #fff; stroke-dasharray: 289; stroke-dashoffset: 289; transition: stroke-dashoffset .15s linear; }
/* pendant le guide : rien d'autre que la carte, les poignées, le bandeau rouge */
body.guide .mission, body.guide .instruments, body.guide #minicarte, body.guide #radio, body.guide #invite,
body.guide #form-question, body.guide .outils, body.guide .commandes { display: none !important; }
.fin-guide { text-align: center; }
.etoiles { display: flex; justify-content: center; gap: 18px; margin: 10px 0 16px; }
.etoiles div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; color: var(--discret); width: 110px; }
.etoiles .ico { width: 44px; height: 44px; color: rgba(255,255,255,.18); }
.etoiles .gagnee .ico { color: #ffd54f; }
.tu-sais { display: inline-block; text-align: left; padding: 14px 18px; border-radius: 14px; background: rgba(255,255,255,.06); }
.tu-sais .gestes { margin-top: 10px; }
.fin-guide .boutons { justify-content: center; }
.interrupteur { flex-direction: row; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--texte); }
@media (max-width: 700px) {
  #tuto-consigne { font-size: 24px; }
  .voler-titre { font-size: 34px; }
  .hauteur-pre { top: auto; bottom: 48vh; }
}

body.guide .alerte { top: auto; bottom: 170px; }

.planif-verdict { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 82, 82, .14); border: 1px solid rgba(255, 82, 82, .5); font-weight: 600; }
