/* Station Orion — thème "vaisseau spatial et hologrammes" */
:root {
  --espace: #060a1a;
  --espace-2: #0c1433;
  --panneau: rgba(17, 30, 70, 0.82);
  --bord: rgba(79, 240, 255, 0.35);
  --cyan: #4ff0ff;
  --cyan-clair: #b6f9ff;
  --cyan-fonce: #1594b5;
  --violet: #8a6cff;
  --texte: #eaf6ff;
  --texte-doux: #a9bfdc;
  --rouge: #ff5a6e;
  --vert: #43d39e;
  --or: #ffd86b;
  --rayon: 16px;
  --haut: env(safe-area-inset-top, 0px);
  --bas: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% -10%, #1d2f6e 0%, var(--espace-2) 40%, var(--espace) 100%) fixed;
  background-color: var(--espace);
  color: var(--texte);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

.fond-etoiles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 72%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 34%, #b6f9ff 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 12%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 78% 58%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 26%, #d8c8ff 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 88%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 54% 92%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 6%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 80%, #b6f9ff 50%, transparent 51%);
  animation: scintille 6s ease-in-out infinite alternate;
  opacity: 0.85;
}
@keyframes scintille { from { opacity: 0.45; } to { opacity: 0.9; } }

main#ecran {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: calc(var(--haut) + 20px) 16px calc(var(--bas) + 40px);
}
body.avec-barre main#ecran { padding-top: calc(var(--haut) + 74px); }

h1, h2, h3 { font-family: 'Orbitron', sans-serif; font-weight: 800; margin: 0 0 0.5em; line-height: 1.2; letter-spacing: 0.02em; }
h2 { font-size: 1.3rem; color: var(--cyan); text-shadow: 0 0 14px rgba(79, 240, 255, 0.45); }
h3 { font-size: 1rem; color: var(--cyan-clair); }
p { margin: 0 0 0.8em; }
strong { font-weight: 800; }

.accroche { font-size: 1.12rem; font-weight: 800; text-align: center; color: var(--cyan-clair); }
.petit { font-size: 0.88rem; opacity: 0.85; }

/* ---------- Boutons ---------- */
.btn {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  padding: 15px 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--cyan-clair), var(--cyan) 45%, var(--cyan-fonce));
  color: #03212b;
  font: 800 1.05rem 'Nunito', sans-serif;
  box-shadow: 0 6px 18px rgba(79, 240, 255, 0.28), inset 0 -3px 0 rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: transform 0.12s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; }
.btn-grand { padding: 18px; font-size: 1.15rem; }
.btn-sec {
  background: rgba(79, 240, 255, 0.08);
  color: var(--texte);
  border: 1.5px solid var(--bord);
  box-shadow: none;
}
.btn-rond {
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  background: rgba(79, 240, 255, 0.12);
  color: var(--cyan-clair);
  font: 800 1.4rem 'Nunito', sans-serif;
  cursor: pointer;
}
.btn-rond:active { transform: scale(0.94); }

/* ---------- Animations communes ---------- */
.ecran { animation: apparait 0.45s ease both; }
@keyframes apparait { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.secoue { animation: secoue 0.5s ease; }
@keyframes secoue {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px) rotate(-1deg); }
  40% { transform: translateX(8px) rotate(1deg); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}
@keyframes pulse { 50% { opacity: 0.5; } }
@keyframes flotte { 50% { transform: translateY(-10px); } }
@keyframes grandit { from { transform: scale(0.2); opacity: 0; } to { transform: none; opacity: 1; } }

.etincelle {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: etincelle 1s ease-out forwards;
  text-shadow: 0 0 8px currentColor;
}
@keyframes etincelle {
  from { opacity: 1; transform: translate(-50%, -50%) scale(0.4); }
  to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2) rotate(120deg); }
}

/* ---------- Barre du haut ---------- */
#barre {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: calc(var(--haut) + 8px) 10px 8px;
  background: rgba(6, 10, 26, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bord);
}
.compte { flex: none; display: flex; align-items: center; gap: 3px; font: 800 0.95rem 'Orbitron', sans-serif; color: var(--cyan-clair); font-variant-numeric: tabular-nums; }
.compte.urgent { color: var(--rouge); animation: pulse 1s infinite; }
.compte.bonus { color: var(--or); }
.modules { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 1px; overflow: hidden; }
.modules span { font-size: 0.85rem; filter: grayscale(1); opacity: 0.25; transition: all 0.6s; }
.modules span.repare { filter: drop-shadow(0 0 4px var(--cyan)); opacity: 1; }
.badge-role {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--c, var(--cyan));
  background: rgba(255, 255, 255, 0.06);
  color: var(--texte);
  font: 800 0.92rem 'Nunito', sans-serif;
  cursor: pointer;
}

#connexion {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--bas) + 12px);
  z-index: 60;
  padding: 12px 16px;
  border-radius: 14px;
  background: #4a1730;
  border: 1px solid var(--rouge);
  text-align: center;
  font-weight: 800;
  animation: pulse 1.4s infinite;
}

/* ---------- Panneaux ---------- */
.panneau, .carte {
  background: linear-gradient(170deg, rgba(24, 42, 96, 0.9), rgba(12, 22, 56, 0.92));
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 0 24px rgba(79, 240, 255, 0.06);
}
.carte { padding: 18px 16px; margin-bottom: 16px; }
.panneau { padding: 18px; }

/* ---------- Accueil ---------- */
.ecran-centre { text-align: center; padding-top: 30vh; }
.attente-radar { font-size: 4rem; animation: flotte 2.4s ease-in-out infinite; }

.ecran-choix { text-align: center; }
.hublot-station { position: relative; margin: calc(-1 * (var(--haut) + 20px)) -16px 0; }
.hublot-station .station {
  width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent);
  mask-image: linear-gradient(to bottom, #000 75%, transparent);
}
.hublot-station .emoji-secours { font-size: 5rem; margin-top: calc(var(--haut) + 6vh); }
.titre-jeu {
  position: relative;
  margin: -14vw 0 10px;
  font-size: 1.1rem;
  letter-spacing: 0.4em;
  color: var(--cyan-clair);
  text-shadow: 0 0 16px rgba(79, 240, 255, 0.7);
}
.hublot-station:not(:has(img)) + .titre-jeu { margin-top: 10px; }
.titre-jeu span { display: block; font-size: 2.6rem; letter-spacing: 0.12em; color: var(--cyan); }
.choix-roles { display: grid; gap: 14px; margin-top: 18px; }
.carte-role {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--rayon);
  border: 1.5px solid var(--c);
  background: linear-gradient(135deg, rgba(30, 52, 110, 0.7), rgba(10, 18, 48, 0.85));
  color: var(--texte);
  text-align: left;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 25%, transparent);
}
.carte-role:active { transform: scale(0.98); }
.carte-role .initiale {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--c) 60%);
  color: #03212b;
  font: 800 1.5rem 'Orbitron', sans-serif;
}
.carte-role .nom { font: 800 1.35rem 'Orbitron', sans-serif; flex: 1; }
.carte-role .statut { font-size: 0.8rem; color: var(--texte-doux); }

.ecran-intro { text-align: center; }
.hologramme-arrive { margin-top: 3vh; animation: grandit 1s cubic-bezier(.2, 1.6, .4, 1) both, flotte 3s 1s ease-in-out infinite; }
.insigne-titre { width: 130px; margin: 0 auto; filter: drop-shadow(0 0 18px rgba(79, 240, 255, 0.6)); }
.hologramme-arrive .emoji-secours { font-size: 4rem; }
.holo-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 250px;
  margin: 24px auto 12px;
  padding: 22px 16px;
  border-radius: 18px;
  border: 2px solid var(--cyan);
  background: repeating-linear-gradient(0deg, rgba(79, 240, 255, 0.1) 0 2px, transparent 2px 5px), rgba(10, 30, 70, 0.85);
  color: var(--cyan-clair);
  font: 800 1.05rem 'Orbitron', sans-serif;
  box-shadow: 0 0 30px rgba(79, 240, 255, 0.35);
  cursor: pointer;
  animation: flotte 2.6s ease-in-out infinite;
}
.holo-icone { font-size: 2.6rem; }
.holo-clignote { font: 800 0.8rem 'Nunito', sans-serif; color: var(--rouge); animation: pulse 1s infinite; }

.lettre { text-align: left; font-size: 1rem; }
.lettre-entete { text-align: center; border-bottom: 1px solid var(--bord); margin-bottom: 14px; padding-bottom: 10px; }
.lettre-insigne { width: 80px; margin: 0 auto 6px; }
.lettre-entete h2 { margin: 4px 0; }
.lettre-directeur { font-size: 0.8rem; color: var(--texte-doux); margin: 0; }
.signature { text-align: right; font-family: 'Orbitron', sans-serif; font-weight: 800; margin-top: 16px; color: var(--cyan-clair); }
.signature small { font-family: 'Nunito', sans-serif; font-weight: 600; font-size: 0.8rem; }
.ps { font-size: 0.85rem; font-style: italic; color: var(--texte-doux); }

.scene-test { padding-top: 2vh; }
.melo-scan { position: relative; width: 190px; margin: 0 auto 12px; }
.melo-scan .melo { width: 100%; }
.melo-scan .emoji-secours { font-size: 6rem; }
.melo-scan .faisceau {
  position: absolute;
  left: -10%;
  right: -10%;
  height: 4px;
  top: 0;
  background: var(--cyan);
  box-shadow: 0 0 18px 6px rgba(79, 240, 255, 0.7);
  opacity: 0;
}
.melo-scan.analyse .faisceau { opacity: 1; animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { from { top: 5%; } to { top: 92%; } }
.test-texte { min-height: 6em; font-size: 1.05rem; font-family: 'Orbitron', sans-serif; font-weight: 600; color: var(--cyan-clair); }
.test-verdict { animation: apparait 0.6s ease both; }
.verdict-annonce { font-size: 1.1rem; margin: 0; }
.verdict-embleme { width: 140px; margin: 8px auto 0; animation: grandit 0.7s cubic-bezier(.2, 1.6, .4, 1) both; filter: drop-shadow(0 0 18px rgba(79, 240, 255, 0.5)); }
.verdict-embleme.emoji-secours { font-size: 5rem; }
.verdict-titre {
  font: 800 1.8rem 'Orbitron', sans-serif;
  color: var(--c);
  text-shadow: 0 0 22px var(--c);
  margin: 6px 0 10px;
  animation: grandit 0.7s cubic-bezier(.2, 1.6, .4, 1) both;
}
.verdict-desc { color: var(--texte-doux); }

.ecran-sas { text-align: center; }
.voyants-sas { display: flex; justify-content: center; gap: 22px; margin: 12px 0; }
.voyants-sas span { width: 22px; height: 22px; border-radius: 50%; background: var(--vert); box-shadow: 0 0 14px var(--vert); animation: pulse 1.4s infinite; }
.voyants-sas span:nth-child(2) { animation-delay: 0.45s; }
.voyants-sas span:nth-child(3) { animation-delay: 0.9s; }
.liste-cadets { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; text-align: left; }
.liste-cadets li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border-left: 5px solid var(--c);
}
.liste-cadets li.ok { background: rgba(67, 211, 158, 0.12); }
.liste-cadets .embleme { font-size: 1.6rem; }
.liste-cadets small { color: var(--texte-doux); }

.ecran-mission { text-align: center; }
.alerte-rouge {
  margin: 0 -16px 10px;
  padding: 8px;
  background: linear-gradient(90deg, transparent, rgba(255, 90, 110, 0.35), transparent);
  color: #ffd1d7;
  font: 800 1.1rem 'Orbitron', sans-serif;
  letter-spacing: 0.1em;
  animation: pulse 0.9s infinite;
}
.perso-geant .illu { width: 190px; margin: 0 auto; animation: flotte 3s ease-in-out infinite; }
.perso-geant .emoji-secours { font-size: 5rem; }
.mission-texte { text-align: left; }
.mission-texte p { opacity: 0; animation: apparait 0.7s ease forwards; }
.message-pirate { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: rgba(255, 90, 110, 0.14); border: 1px dashed var(--rouge); color: #ffd1d7; }
.mini-vortex { width: 54px; flex: none; }
.mission-action .btn { opacity: 0; animation: apparait 0.6s ease forwards; }

/* ---------- Épreuves ---------- */
.etape-entete { text-align: center; margin-bottom: 12px; }
.etape-num {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(79, 240, 255, 0.12);
  border: 1px solid var(--bord);
  color: var(--cyan-clair);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.bulle { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
.bulle-perso { flex: none; width: 64px; font-size: 2.6rem; line-height: 1; text-align: center; }
.bulle-perso .illu { width: 64px; border-radius: 50%; border: 2px solid var(--cyan); background: #0c1433; box-shadow: 0 0 12px rgba(79, 240, 255, 0.4); }
.bulle p {
  margin: 0;
  padding: 12px 14px;
  border-radius: 4px 16px 16px 16px;
  background: rgba(79, 240, 255, 0.09);
  border: 1px solid var(--bord);
  font-size: 0.98rem;
}

/* Tour de parole */
.tour-parole { margin-bottom: 14px; }
.ordre-lecture { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ordre-lecture li {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--c);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 800;
  font-size: 0.95rem;
  opacity: 0.6;
}
.ordre-lecture li.lu { opacity: 0.9; background: rgba(67, 211, 158, 0.14); }
.ordre-lecture li.lit { opacity: 1; background: color-mix(in srgb, var(--c) 30%, transparent); box-shadow: 0 0 16px var(--c); animation: pulse 1.4s infinite; }
.ordre-lecture small { font-weight: 600; color: var(--texte-doux); }
.carte-role-lecture {
  padding: 18px 16px;
  border-radius: var(--rayon);
  border: 2px solid var(--c);
  background: rgba(10, 20, 50, 0.85);
}
.carte-role-lecture.a-moi { box-shadow: 0 0 28px color-mix(in srgb, var(--c) 55%, transparent); animation: apparait 0.5s ease both; }
.a-toi { font: 800 1.05rem 'Orbitron', sans-serif; color: var(--c); }
.texte-role { font-size: 1.22rem; font-weight: 800; line-height: 1.5; margin: 0; }
.ecoute { text-align: center; font-size: 1.15rem; margin: 18px 0; color: var(--cyan-clair); }
.ecoute small { color: var(--texte-doux); font-size: 0.9rem; }
.mon-role {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px dashed var(--bord);
  background: rgba(79, 240, 255, 0.05);
}
.mon-role summary { font-weight: 800; cursor: pointer; color: var(--cyan-clair); }
.mon-role p { margin: 8px 0 0; }

/* Ordinateur de secours */
.secours {
  margin-top: 6px;
  padding: 14px 16px;
  border-radius: var(--rayon);
  background: rgba(138, 108, 255, 0.12);
  border: 1px dashed rgba(178, 160, 255, 0.6);
  transition: box-shadow 0.4s;
}
.secours.brille { box-shadow: 0 0 30px 6px rgba(150, 130, 255, 0.6); }
.secours-titre { font: 800 0.95rem 'Orbitron', sans-serif; color: #d8ceff; display: flex; align-items: center; gap: 8px; }
.secours-icone { font-size: 1.4rem; animation: flotte 3s ease-in-out infinite; }
.secours-liste { margin: 10px 0 0; padding-left: 22px; }
.secours-liste li { margin: 6px 0; }
.secours-liste:empty { display: none; }
.secours-action { margin-top: 8px; }
.secours-attente { font-size: 0.9rem; color: var(--texte-doux); }
.btn-secours { background: linear-gradient(180deg, #e2d9ff, #a98bff 45%, #6d4fe0); box-shadow: 0 6px 18px rgba(150, 110, 255, 0.35); }

/* Champ de réponse */
.champ-reponse { margin: 4px 0 16px; }
.champ-reponse label { display: block; font-weight: 800; margin-bottom: 6px; color: var(--cyan-clair); }
.champ-ligne { display: flex; flex-direction: column; }
.champ-reponse input, .cases-lettres input {
  width: 100%;
  padding: 15px 16px;
  border-radius: 14px;
  border: 2px solid var(--cyan);
  background: #071230;
  color: var(--texte);
  font: 800 18px 'Nunito', sans-serif;
  letter-spacing: 0.06em;
}
.champ-reponse input:focus, .cases-lettres input:focus { outline: none; box-shadow: 0 0 0 4px rgba(79, 240, 255, 0.3); }

.pastille {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--c);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 800;
  font-size: 0.92rem;
}
.pastille.ok { background: rgba(67, 211, 158, 0.2); }

/* Épreuve 1 : le tableau électrique */
.numero-panneau { text-align: center; font: 800 1rem 'Orbitron', sans-serif; color: var(--or); }
.pastilles-panneaux { display: flex; justify-content: center; gap: 12px; margin-top: 12px; font-size: 1.3rem; }
.pastilles-panneaux span { opacity: 0.35; }
.pastilles-panneaux span.fait, .pastilles-panneaux span.en-cours { opacity: 1; }
.manuel { display: grid; gap: 8px; }
.manuel-regle { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); border-left: 4px solid var(--cyan); }
.manuel-regle:nth-child(2) { border-left-color: var(--or); background: rgba(255, 216, 107, 0.1); }
.manuel-regle p { margin: 4px 0 0; }
.fils { display: grid; gap: 8px; margin-top: 8px; }
.fil-bouton {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: #0a1530;
  color: var(--texte);
  cursor: pointer;
  font: 800 0.9rem 'Nunito', sans-serif;
}
.fil-bouton:active { transform: scale(0.98); border-color: var(--rouge); }
.fil-num { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(79, 240, 255, 0.15); font-family: 'Orbitron', sans-serif; }
.fil { flex: 1; min-width: 0; width: 100%; height: 34px; }
.fil-contour { fill: none; stroke: #7d8bb3; stroke-width: 14; stroke-linecap: round; }
.fil-couleur { fill: none; stroke-width: 10; stroke-linecap: round; }
.fil-nom { width: 52px; text-align: right; color: var(--texte-doux); font-size: 0.8rem; }
.boitier-voyant {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin: 10px auto;
  padding: 20px;
  max-width: 280px;
  border-radius: 20px;
  background: linear-gradient(160deg, #3a4566, #1c233d);
  border: 3px solid #59658a;
}
.voyant { width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--c) 45%, color-mix(in srgb, var(--c) 50%, #000)); box-shadow: 0 0 40px 10px var(--c); animation: pulse 2s infinite; }
.ecran-nombre { min-width: 70px; padding: 6px 12px; border-radius: 10px; background: #081a0d; color: #6dff9a; font: 800 2.8rem 'Orbitron', sans-serif; text-align: center; text-shadow: 0 0 12px #6dff9a; }
.voyant-texte { text-align: center; font-size: 1.1rem; }
.boulon-dit { display: flex; align-items: center; gap: 10px; }
.boulon-mini { width: 60px; flex: none; }
.boulon-dit .emoji-secours { font-size: 2.4rem; }
.boulon-dit p { margin: 0; font-style: italic; color: var(--texte-doux); }
.court-circuit {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 3, 8, 0.97);
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
}
.court-circuit .eclair { font-size: 5rem; animation: pulse 0.25s infinite; }
.cc-titre { font: 800 1.6rem 'Orbitron', sans-serif; color: var(--or); }

/* Épreuve 2 : l'oxygène */
.regles { padding-left: 20px; margin: 0 0 12px; }
.regles li { margin: 6px 0; }
.brouillon-titre { display: block; font-weight: 800; color: var(--cyan-clair); margin-bottom: 6px; }
.brouillon { width: 100%; padding: 10px; border-radius: 12px; border: 1.5px solid var(--bord); background: #071230; color: var(--texte); font: 700 16px 'Nunito', sans-serif; }
.reservoirs { display: flex; justify-content: space-around; align-items: flex-end; gap: 10px; margin: 16px 0 8px; min-height: 230px; }
.reservoir { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--texte); cursor: pointer; font-family: 'Nunito', sans-serif; }
.cuve {
  position: relative;
  width: 100%;
  max-width: 90px;
  height: calc(180px * var(--taille));
  overflow: hidden;
  border: 3px solid #8fb6d9;
  border-radius: 14px 14px 22px 22px;
  background: rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.2s;
}
.gaz { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(180deg, #8ff7ff, #2bb6e0); box-shadow: 0 0 18px rgba(79, 240, 255, 0.7) inset; transition: height 0.9s ease; }
.opaque { position: absolute; inset: 0; display: grid; place-items: center; background: repeating-linear-gradient(45deg, #2a3557 0 10px, #222b48 10px 20px); color: var(--texte-doux); font: 800 2rem 'Orbitron', sans-serif; }
.graduations i { position: absolute; left: 0; width: 30%; border-top: 2px solid rgba(255, 255, 255, 0.4); font: 700 0.65rem 'Nunito', sans-serif; font-style: normal; color: rgba(255, 255, 255, 0.7); text-indent: 34px; line-height: 0; }
.reservoir-nom { font: 800 1.4rem 'Orbitron', sans-serif; color: var(--cyan); }
.reservoir-info { font-weight: 800; }
.reservoir.choisi .cuve { box-shadow: 0 0 0 4px var(--or), 0 0 24px var(--or); }
.reservoir.objectif .reservoir-info { color: var(--vert); }

/* Épreuve 3 : la radio et le morse */
.ecran-radio { position: relative; height: 150px; margin-bottom: 12px; overflow: hidden; border-radius: 14px; border: 3px solid #59658a; background: #0b1020; display: grid; place-items: center; }
.ecran-radio .nova-radio { height: 92%; width: auto; opacity: 0; transition: opacity 0.6s; }
.ecran-radio .emoji-secours { font-size: 4rem; }
.neige {
  position: absolute;
  inset: -50%;
  z-index: 1;
  background-image: repeating-radial-gradient(circle at 17% 32%, #fff 0 1px, transparent 1px 3px), repeating-radial-gradient(circle at 73% 61%, #999 0 1px, transparent 1px 4px);
  background-size: 7px 7px, 11px 11px;
  animation: neige 0.18s steps(3) infinite;
  pointer-events: none;
}
@keyframes neige { 33% { transform: translate(3px, -4px); } 66% { transform: translate(-4px, 2px); } }
.barre-signal { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.barre-nom { width: 92px; flex: none; font-weight: 800; font-size: 0.92rem; }
.barre-nom small { color: var(--texte-doux); font-weight: 600; }
.segments { flex: 1; display: flex; gap: 3px; }
.segments i { flex: 1; height: 26px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); }
.segments i.plein { background: linear-gradient(180deg, #8fffb0, #2dc96a); box-shadow: 0 0 8px rgba(80, 255, 140, 0.6); }
.parfait { width: 24px; color: var(--vert); font-size: 1.3rem; font-weight: 800; }
.affichage-molette { margin: 10px auto; width: 170px; height: 170px; display: grid; place-items: center; border-radius: 50%; border: 6px solid #59658a; background: radial-gradient(circle, #1d2b55, #0a1128); box-shadow: 0 0 24px rgba(79, 240, 255, 0.3); }
.affichage-molette .valeur { font: 800 3.2rem 'Orbitron', sans-serif; color: var(--cyan); text-shadow: 0 0 14px var(--cyan); font-variant-numeric: tabular-nums; }
.boutons-molette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.boutons-molette button { padding: 14px 0; border-radius: 12px; border: 2px solid var(--cyan); background: rgba(79, 240, 255, 0.12); color: var(--cyan-clair); font: 800 1.15rem 'Orbitron', sans-serif; cursor: pointer; }
.boutons-molette button:active { transform: scale(0.95); background: rgba(79, 240, 255, 0.3); }
.morse-carte { text-align: center; }
.lettre-num { font: 800 1.05rem 'Orbitron', sans-serif; color: var(--or); }
.lampe { width: 150px; height: 150px; margin: 10px auto 16px; border-radius: 50%; border: 6px solid #59658a; background: radial-gradient(circle at 40% 35%, #4a3a1a, #1d1608); transition: background 0.05s, box-shadow 0.05s; }
.lampe.allumee { background: radial-gradient(circle at 40% 35%, #fff, #ffe066 45%, #e0a000); box-shadow: 0 0 60px 20px rgba(255, 220, 90, 0.8); }
.boutons-morse { display: flex; align-items: center; gap: 10px; }
.boutons-morse .btn { margin: 0; }
.morse-carte .petit { margin: 12px 0 0; }
.table-morse { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; }
.morse-lettre { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); }
.morse-lettre strong { font: 800 1.1rem 'Orbitron', sans-serif; color: var(--cyan); width: 20px; }
.morse-lettre span { letter-spacing: 1px; font-size: 0.85rem; white-space: nowrap; }
.cases-lettres { display: flex; gap: 8px; justify-content: center; }
.cases-lettres input { width: 50px; height: 58px; padding: 0; text-align: center; font-size: 1.6rem; text-transform: uppercase; }

/* Épreuve 4 : Zouglou */
.zouglou-carte { text-align: center; }
.zouglou-image { width: 150px; margin: 0 auto 6px; animation: flotte 2.6s ease-in-out infinite; }
.zouglou-carte .emoji-secours { font-size: 4.5rem; }
.dico { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.dico-mot { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 12px; background: rgba(125, 255, 182, 0.08); border: 1px solid rgba(125, 255, 182, 0.35); }
.dico-emoji { font-size: 1.6rem; line-height: 1.1; }
.dico-mot strong { font: 800 1rem 'Orbitron', sans-serif; color: #7dffb6; }
.dico-mot span:last-child { color: var(--texte-doux); font-weight: 700; }
.demandes-zouglou { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }

/* Épreuve 5 : le radar */
.drone-titre { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; }
.drone-image { width: 54px; flex: none; animation: flotte 2s ease-in-out infinite; }
.drone-titre .emoji-secours { font-size: 2rem; }
.numero-drone { margin: 0; font-weight: 800; color: var(--or); }
.radar {
  display: grid;
  grid-template-columns: 22px repeat(8, minmax(0, 1fr));
  gap: 3px;
  padding: 8px;
  border-radius: 14px;
  background: radial-gradient(circle, #0b2a2a, #04100f);
  border: 2px solid #1f6f63;
}
.entete-radar, .coin { display: grid; place-items: center; font: 800 0.75rem 'Orbitron', sans-serif; color: #7ce8cf; }
.case-radar {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid rgba(124, 232, 207, 0.25);
  border-radius: 5px;
  background: rgba(124, 232, 207, 0.04);
  cursor: pointer;
}
.case-radar.allumee { background: color-mix(in srgb, var(--c) 42%, transparent); border-color: var(--c); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 60%, transparent) inset; }
.case-radar .antenne { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.05rem; }
.case-radar .points { position: absolute; left: 2px; right: 2px; bottom: 2px; display: flex; justify-content: center; gap: 2px; }
.case-radar .points i, .legende-radar i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); border: 1.5px solid #fff; display: inline-block; }
.legende-radar { display: flex; justify-content: center; gap: 14px; margin: 10px 0 0; font-weight: 700; font-size: 0.9rem; }
.btn-laser.arme { background: linear-gradient(180deg, #ffb3bd, var(--rouge) 50%, #b4233a); color: #fff; animation: pulse 1s infinite; }
.mode-laser .case-radar { cursor: crosshair; }
.mode-laser .radar { border-color: var(--rouge); box-shadow: 0 0 20px rgba(255, 90, 110, 0.5); }

/* Épreuve 6 : le circuit */
.circuit {
  display: grid;
  grid-template-columns: 26px repeat(var(--colonnes), minmax(0, 1fr)) 26px;
  gap: 2px;
  margin: 8px 0;
  padding: 6px;
  border-radius: 12px;
  background: #0a1128;
  border: 2px solid #59658a;
}
.bord { display: grid; place-items: center; font: 800 0.8rem 'Orbitron', sans-serif; color: var(--texte-doux); border-radius: 6px; }
.bord.entree, .bord.arrive, .bord.part { background: rgba(79, 200, 255, 0.4); color: #fff; box-shadow: 0 0 10px rgba(79, 200, 255, 0.8); }
.bord.sortie { background: rgba(255, 216, 107, 0.25); color: var(--or); }
.bord.sortie.ok { background: rgba(67, 211, 158, 0.6); color: #fff; }
.case-circuit { aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 6px; background: #121c3e; cursor: pointer; }
.case-circuit.vide { background: transparent; cursor: default; }
.case-circuit:active:not(.vide) { background: #1d2c5a; }
.tuyau { width: 100%; height: 100%; display: block; }
.tuyau g { transition: transform 0.2s; }
.tuyau-paroi { fill: none; stroke: #8a97bd; stroke-width: 34; stroke-linecap: butt; stroke-linejoin: round; }
.tuyau-liquide { fill: none; stroke: #1d2747; stroke-width: 18; stroke-linecap: butt; stroke-linejoin: round; transition: stroke 0.3s; }
.tuyau.rempli .tuyau-liquide { stroke: #4fd2ff; }
.legende-circuit { text-align: center; font-weight: 800; margin: 6px 0 0; }

/* Épreuve 7 : la ceinture d'astéroïdes */
.tableau-bord { display: flex; justify-content: space-between; font-weight: 800; margin: 0 auto 6px; max-width: 300px; }
.progression-course { height: 8px; max-width: 300px; margin: 0 auto 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.progression-course div { height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan-fonce), var(--cyan)); transition: width 0.4s; }
.ceinture {
  position: relative;
  max-width: 300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(var(--couloirs), minmax(0, 1fr));
  gap: 3px;
  padding: 6px;
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 120%, #1d2f6e, #040814);
  border: 2px solid #3a4a80;
}
.case-ceinture { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, 0.03); font-size: 1.6rem; }
.case-ceinture.brouillard { background: rgba(160, 170, 200, 0.18); }
.case-ceinture.phares { background: rgba(255, 240, 160, 0.22); box-shadow: 0 0 10px rgba(255, 240, 160, 0.4) inset; }
.case-ceinture.rang-navette { background: rgba(79, 240, 255, 0.08); }
.case-ceinture .illu { position: absolute; inset: 7%; width: 86%; height: 86%; object-fit: contain; }
.case-ceinture .navette { filter: drop-shadow(0 0 8px var(--cyan)); }
.message-ceinture {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 30%;
  padding: 14px;
  border-radius: 14px;
  background: rgba(6, 10, 26, 0.92);
  border: 1.5px solid var(--cyan);
  text-align: center;
  font-weight: 800;
}
.commandes-navette {
  position: sticky;
  bottom: calc(var(--bas) + 6px);
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 10px;
  align-items: center;
  margin: 12px -8px 0;
  padding: 8px;
  border-radius: 18px;
  background: rgba(6, 10, 26, 0.88);
}
.commandes-navette .btn { margin: 0; grid-column: 2; padding: 14px 6px; font-size: 1rem; }
.btn-pilote {
  height: 78px;
  border-radius: 18px;
  border: 0;
  background: linear-gradient(180deg, #ffd9a0, #ffb648 45%, #c47a12);
  color: #2a1700;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.btn-pilote:active { transform: scale(0.93); }
.btn-pilote:disabled { opacity: 0.35; }
.btn-pilote[data-dir="-1"] { grid-column: 1; grid-row: 1; }
.btn-pilote[data-dir="1"] { grid-column: 3; grid-row: 1; }
.legende-ceinture { text-align: center; margin-top: 8px; }

/* Épreuve 8 : l'hyper-espace */
.jauge-hyper { position: relative; height: 34px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; margin-bottom: 14px; border: 1px solid var(--bord); }
.jauge-remplie { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #6d4fe0, var(--cyan)); transition: width 0.4s; }
.jauge-texte { position: relative; z-index: 1; display: grid; place-items: center; height: 100%; font: 800 0.9rem 'Orbitron', sans-serif; }
.ordre { padding: 14px; border-radius: 14px; background: rgba(255, 216, 107, 0.12); border: 2px solid var(--or); margin-bottom: 16px; text-align: center; }
.ordre.nouveau { animation: grandit 0.4s cubic-bezier(.2, 1.6, .4, 1) both; }
.ordre.presse { border-color: var(--rouge); background: rgba(255, 90, 110, 0.15); }
.ordre-titre { margin: 0 0 4px; font-weight: 800; color: var(--or); }
.ordre-texte { margin: 0 0 10px; font: 800 1.3rem 'Nunito', sans-serif; }
.ordre-temps { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.ordre-temps div { height: 100%; background: var(--or); transition: width 0.2s linear; }
.ordre.presse .ordre-temps div { background: var(--rouge); }
.controles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.controle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 118px;
  padding: 10px 6px;
  border-radius: 14px;
  border: 1.5px solid #59658a;
  background: linear-gradient(160deg, #26304f, #141b33);
  color: var(--texte);
  font: 800 0.9rem 'Nunito', sans-serif;
  text-align: center;
  cursor: pointer;
}
.controle.appui { animation: appui 0.3s ease; }
@keyframes appui { 40% { transform: scale(0.93); } }
.controle-nom { line-height: 1.2; }
.gros-bouton { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #ff7a8a 40%, #b4233a); font-size: 1.6rem; box-shadow: 0 4px 0 #6d1222; }
.interrupteur { position: relative; width: 70px; height: 36px; border-radius: 999px; background: #3a4566; transition: background 0.2s; }
.interrupteur i { position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: #c9d2ea; transition: left 0.2s; }
.inter.actif .interrupteur { background: var(--vert); box-shadow: 0 0 12px var(--vert); }
.inter.actif .interrupteur i { left: 38px; }
.curseur { cursor: default; }
.positions { display: flex; gap: 6px; }
.positions button { width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid #59658a; background: #0a1128; color: var(--texte); font: 800 1rem 'Orbitron', sans-serif; cursor: pointer; }
.positions button.actif { background: var(--cyan); color: #03212b; box-shadow: 0 0 10px var(--cyan); }
.saut-carte { text-align: center; }
.bouton-saut {
  width: 210px;
  height: 210px;
  margin: 10px auto 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 6px solid var(--c);
  background: radial-gradient(circle at 40% 35%, #3a4a9a, #0c1433);
  color: #fff;
  font-size: 4rem;
  box-shadow: 0 0 40px var(--c);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.bouton-saut span { font: 800 1.6rem 'Orbitron', sans-serif; letter-spacing: 0.1em; }
.bouton-saut.appui { animation: appui-saut 0.4s ease; }
@keyframes appui-saut { 40% { transform: scale(0.9); box-shadow: 0 0 70px 24px var(--c); } }
.appuis-saut { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* ---------- Fin ---------- */
.ecran-fin { text-align: center; position: relative; }
.ecran-fin .bulle { text-align: left; }
.hyperespace { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hyperespace span {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 2px;
  height: 90px;
  background: linear-gradient(to bottom, transparent, #b6f9ff);
  transform-origin: 50% 0;
  transform: rotate(var(--a)) translateY(20px);
  opacity: 0;
  animation: traine 1.2s var(--d) ease-in infinite;
}
@keyframes traine { 0% { opacity: 0; transform: rotate(var(--a)) translateY(10px) scaleY(0.2); } 30% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(60vh) scaleY(2.4); } }
.fin-titre { margin-top: 3vh; }
.schema-fin { max-width: 260px; margin: 0 auto 10px; }

.vue-brevet {
  position: fixed;
  inset: 0;
  z-index: 70;
  overflow-y: auto;
  padding: calc(var(--haut) + 16px) 16px calc(var(--bas) + 20px);
  background: var(--espace);
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s;
}
.vue-brevet.visible { opacity: 1; }
.brevet {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 20px;
  background: linear-gradient(170deg, #f4f9ff, #d6e6f7);
  color: #0d1d3a;
  border-radius: 8px;
  border: 8px double #2a6fb0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}
.brevet h2 { color: #0d3a6b; text-shadow: none; font-size: 1.25rem; }
.brevet-insigne { width: 96px; margin: 0 auto 6px; }
.brevet-ecole { font: 800 0.78rem 'Orbitron', sans-serif; letter-spacing: 0.06em; color: #3d5a80; }
.brevet-nom { font: 800 2.4rem 'Orbitron', sans-serif; color: #1d3f9a; margin: 4px 0; }
.brevet-role { font-weight: 800; font-size: 1.1rem; }
.brevet-temps { font-weight: 800; color: #0d3a6b; }
.brevet-date { font-style: italic; }
.brevet-bas { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.brevet-bas .signature { text-align: left; margin: 0; color: #0d3a6b; font-size: 0.95rem; }
.brevet-nova { width: 80px; flex: none; border-radius: 50%; }

/* ---------- Fenêtres ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 6, 18, 0.84);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s;
}
.overlay.visible { opacity: 1; }
.overlay-boite {
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px 20px;
  border-radius: 22px;
  background: linear-gradient(170deg, #17295e, #0b1433);
  border: 1.5px solid var(--cyan);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(79, 240, 255, 0.18);
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(.2, 1.4, .4, 1);
}
.overlay.visible .overlay-boite { transform: none; }
.overlay-recit { color: var(--texte-doux); }
.schema-overlay { max-width: 240px; margin: 0 auto 6px; animation: grandit 0.8s cubic-bezier(.2, 1.6, .4, 1) both; }
.perso-message .illu { width: 110px; margin: 0 auto; border-radius: 50%; }
.perso-message .emoji-secours { font-size: 4rem; }
.message-mj { margin: 10px 0; padding: 16px; border-radius: 12px; background: rgba(79, 240, 255, 0.12); border: 1px solid var(--bord); font-size: 1.12rem; font-weight: 800; }
.overlay-alerte .perso-geant .illu { width: 160px; }
.menu .btn { margin-top: 10px; }

#toasts {
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(var(--haut) + 70px);
  z-index: 85;
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.toast {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 14px;
  background: #142456;
  border: 1.5px solid var(--cyan);
  color: var(--texte);
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: apparait 0.3s ease both;
  transition: opacity 0.5s, transform 0.5s;
}
.toast.erreur { border-color: var(--rouge); background: #4a1730; }
.toast.succes { border-color: var(--vert); background: #133c33; }
.toast.part { opacity: 0; transform: translateY(-10px); }

/* ---------- Schéma de la station ---------- */
.schema-station { width: 100%; height: auto; display: block; }
.schema-station .anneau { fill: none; stroke: rgba(79, 240, 255, 0.25); stroke-width: 10; }
.schema-station .rayon { stroke: rgba(120, 140, 190, 0.4); stroke-width: 4; }
.schema-station .disque { fill: #1a2240; stroke: #3a4566; stroke-width: 3; }
.schema-station .emoji { font-size: 24px; opacity: 0.3; filter: grayscale(1); }
.schema-station .allume .rayon { stroke: var(--cyan); }
.schema-station .allume .disque { fill: #13406a; stroke: var(--cyan); filter: drop-shadow(0 0 6px rgba(79, 240, 255, 0.9)); }
.schema-station .allume .emoji { opacity: 1; filter: none; }
.schema-station .nouveau .disque { animation: pulse 0.8s 4; }
.schema-station .coeur { fill: #0e1838; stroke: #3a4566; stroke-width: 4; }
.schema-station .coeur.allume { fill: #12507a; stroke: var(--cyan); filter: drop-shadow(0 0 10px var(--cyan)); }
.schema-station .coeur-texte { fill: var(--cyan-clair); font: 800 15px 'Orbitron', sans-serif; letter-spacing: 1px; }

/* ---------- Illustrations ---------- */
.illu { display: block; max-width: 100%; height: auto; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.emoji-secours { display: inline-block; }
.mini, .badge-embleme, .mini-embleme { display: inline-block; vertical-align: middle; object-fit: contain; }
.mini { width: 28px; height: 28px; }
.badge-embleme { width: 24px; height: 24px; }
.mini-embleme { width: 36px; height: 36px; }

/* ---------- Effets spéciaux du narrateur ---------- */
body.pirate main#ecran { animation: bug 0.25s steps(2) infinite; }
@keyframes bug {
  0% { transform: translate(0); filter: hue-rotate(0deg); }
  50% { transform: translate(-4px, 2px) skewX(3deg); filter: hue-rotate(140deg) saturate(2); }
  100% { transform: translate(3px, -2px); filter: hue-rotate(260deg); }
}
.effet-piratage {
  position: fixed;
  left: 0;
  right: 0;
  top: 38%;
  z-index: 95;
  padding: 18px;
  background: rgba(0, 0, 0, 0.85);
  color: #7dff9a;
  text-align: center;
  font: 800 1.4rem 'Orbitron', sans-serif;
  text-shadow: 3px 0 #ff2b6e, -3px 0 #2bd6ff;
  pointer-events: none;
}
.effet-piratage .petit { font-size: 0.9rem; }
.effet-alarme { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; pointer-events: none; animation: alarme 0.6s ease-in-out 4; }
.effet-alarme p { font: 800 2.2rem 'Orbitron', sans-serif; color: #fff; text-shadow: 0 0 20px var(--rouge); }
@keyframes alarme { 50% { background: rgba(255, 30, 60, 0.45); } }
.effet-panne {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #000;
  animation: panne 8s ease forwards;
}
.effet-panne-texte { color: #9fb0d8; text-align: center; font-size: 1.3rem; font-weight: 800; line-height: 1.6; }
.effet-panne-texte small { font-weight: 600; }
@keyframes panne { 0% { opacity: 0; } 5%, 85% { opacity: 1; } 100% { opacity: 0; } }
.effet-apparition { position: fixed; left: 50%; bottom: 0; z-index: 95; width: 230px; pointer-events: none; animation: apparition 3.2s ease forwards; }
.effet-apparition .emoji-secours { font-size: 6rem; }
@keyframes apparition { 0% { transform: translate(-50%, 100%); } 25%, 75% { transform: translate(-50%, 0); } 100% { transform: translate(-50%, 100%); } }
.effet-zouglou { position: fixed; right: 4%; bottom: 0; z-index: 95; width: 180px; pointer-events: none; animation: apparition-cote 3s ease forwards; }
.effet-zouglou .emoji-secours { font-size: 5rem; }
.bulle-zouglou { position: absolute; top: -10px; left: -60px; padding: 8px 14px; border-radius: 16px; background: #fff; color: #1b5e20; font: 800 1.3rem 'Orbitron', sans-serif; }
@keyframes apparition-cote { 0% { transform: translateY(100%) rotate(12deg); } 25%, 75% { transform: translateY(0) rotate(-4deg); } 100% { transform: translateY(100%); } }
.effet-radio { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; pointer-events: none; animation: gong-fin 2.6s ease forwards; }
.effet-radio > * { grid-area: 1 / 1; }
.effet-radio .radio-icone { font-size: 6rem; filter: drop-shadow(0 0 30px rgba(79, 240, 255, 0.9)); animation: flotte 0.6s ease-in-out infinite; }
.effet-radio .onde { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--cyan); opacity: 0; animation: onde 1.8s ease-out forwards; }
.effet-radio .onde:nth-child(2) { animation-delay: 0.3s; }
.effet-radio .onde:nth-child(3) { animation-delay: 0.6s; }
@keyframes onde { 0% { transform: scale(0.4); opacity: 0.9; } 100% { transform: scale(4); opacity: 0; } }
@keyframes gong-fin { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
