@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

body {
  margin:0; padding:0; overflow:hidden; overflow-y: auto;
  font-family:'Orbitron', sans-serif;
  background:black; color:#0ff;
}

canvas#bgCanvas {
  position:fixed; top:0; left:0; width:100%; height:100%; z-index:-1; pointer-events: none;
}

h1 {
  text-align:center; margin:20px 0; text-shadow: 0 0 20px #0ff;
}

.menu, .game { display:none; flex-direction:column; align-items:center; justify-content:center; }
.active { display:flex; }

button {
  margin:10px; padding:12px 24px; font-size:1em; cursor:pointer;
  background: rgba(0,0,0,0.5); color:#0ff; border:2px solid #0ff;
  border-radius:8px; text-shadow:0 0 5px #0ff; box-shadow:0 0 20px #0ff inset;
  transition: all 0.2s ease-in-out;
}
button:hover {
  background:#0ff; color:#000; box-shadow:0 0 30px #0ff, 0 0 40px #0ff inset; transform:scale(1.1);
}

#sequence, #score, #story, #question, #choices, #answers, #advStory, #grid, #message {
  margin-top:20px; text-align:center;
}

button.correct { background:#0f0; color:#000; text-shadow:0 0 10px #0f0; }
button.wrong { background:#f00; color:#fff; text-shadow:0 0 10px #f00; }
.blink { animation: blink 1s infinite; }
@keyframes blink { 0%,50%,100% {opacity:1} 25%,75% {opacity:0.3} }
.glitch { position:relative; color:#0ff; font-weight:bold; animation: glitchAnim 1s infinite; }
@keyframes glitchAnim {
  0%{text-shadow:2px 0 #0ff,-2px 0 #f0f;} 20%{text-shadow:-2px 0 #0ff,2px 0 #f0f;}
  40%{text-shadow:2px 2px #0ff,-2px -2px #f0f;} 60%{text-shadow:-2px 2px #0ff,2px -2px #f0f;}
  80%{text-shadow:2px -2px #0ff,-2px 2px #f0f;} 100%{text-shadow:2px 0 #0ff,-2px 0 #f0f;}
}

/* Grille Décryptage */
.grid { display:grid; grid-template-columns: repeat(4, 60px); gap:12px; margin-top:20px; }
.letter { width:60px; height:60px; display:flex; align-items:center; justify-content:center;
  background: rgba(20,26,40,0.8); border-radius:8px; cursor:pointer;
  font-size:1.5rem; font-weight:700; user-select:none; transition: all .2s, box-shadow .3s; }
.letter:hover { transform: scale(1.1); box-shadow:0 0 12px #3fdcff88; }
.found { background: #3fdcff; color:#00151c; box-shadow:0 0 12px #6ff3ffaa; }

#videoContainer { margin-top:0px; display:none; opacity:0; transition: opacity 0.8s ease-in-out; 
 z-index: 60; /* plus grand que le footer */
  position: relative; /* nécessaire pour que le z-index fonctionne */
}
video { width:320px; max-width:90vw; border-radius:12px; border:1px solid rgba(111,243,255,0.3); }

/* Bouton vidéo style pulse */
@keyframes pulse { 0%{box-shadow:0 0 12px #6ff3ff77,0 0 20px #3fdcff55; transform:scale(1);} 50%{box-shadow:0 0 24px #6ff3ffaa,0 0 36px #3fdcff88; transform:scale(1.08);} 100%{box-shadow:0 0 12px #6ff3ff77,0 0 20px #3fdcff55; transform:scale(1);} }
#videoBtn { animation: pulse 1.6s infinite; z-index: 70; /* bouton au-dessus du container vidéo */
  position: relative;
}

/* Footer */
.footer { position: fixed; bottom: 0; left: 0; width: 100%; text-align: center; padding: 10px 0;
 background: rgba(0,0,0,0.7); color: #00ffff; font-family: 'Orbitron', sans-serif; font-size:0.9em; box-shadow:0 -2px 10px #00ffff; z-index:50; 
 }


/* fond semi-opaque derrière tout le texte */
.text-panel {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px) brightness(0.8);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 40px #00ffff33 inset, 0 0 20px #00ffff44;
  margin: 10px auto;
  width: 85%;
}

/* léger contour de texte (stroke) pour contraster avec le fond */
.text-glow {
  text-shadow: 
    0 0 3px #000,
    0 0 8px #0ff,
    0 0 15px #0ff;
  filter: drop-shadow(0 0 2px #000);
}


/* pour confettis et cadeau */
/* Confettis */
.confetti-piece {
pointer-events: none !important;
  position: fixed;
  width: 8px;
  height: 8px;
  background: #0ff;
  opacity: 0.9;
  z-index: 1000;
  pointer-events: none;
  border-radius: 50%;
  animation: fall 3s linear infinite;
}

@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(100vh) rotate(360deg); }
}

/* Cadeau */
#gift {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 300px; height: 300px;
  background: url('images/gift.png') no-repeat center/contain;
  cursor: pointer;
  z-index: 2000;
  transition: transform 0.8s ease, opacity 0.5s ease;
}
#gift.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Photo qui apparaît */
#giftPhoto {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  z-index: 9999;
  transition: transform 0.8s ease, opacity 0.5s ease;
}
#giftPhoto.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}


/* les règles de jeu */
#rulePanel {
  background: rgba(0, 255, 255, 0.15);
  color: #0ff;
  text-align: center;
  font-size: 0.95em;
  margin-top: 15px;
  border: 1px solid #0ff;
  box-shadow: 0 0 20px #0ff33 inset, 0 0 10px #0ff55;
}
#rulePanel h3 {
  margin-bottom: 8px;
  text-shadow: 0 0 5px #0ff;
}
#rulePanel p {
  margin:0;
  line-height:1.4em;
}


/* style pour quizz */
#quizRules h3 {
  color: #0ff;
  text-shadow: 0 0 5px #0ff, 0 0 15px #0ff;
}
#quizRules p {
  color: #0ff;
  line-height: 1.5em;
}


/* style pour Aventure */
#advRules h3 {
  color: #0ff;
  text-shadow: 0 0 5px #0ff, 0 0 15px #0ff;
}
#advRules p {
  color: #0ff;
  line-height: 1.5em;
}

.game {
    padding-bottom: 80px; /* évite que les éléments du jeu soient cachés par le footer */
}


/* Vibration mauvaise réponse */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-6px); }
  100% { transform: translateX(0); }
}

.wrong {
  background:#f00 !important;
  color:#fff !important;
  animation: shake 0.3s ease-in-out;
}

/* Fade-in holographique */
@keyframes fadeIn {
  0% { opacity:0; filter:blur(4px); }
  100% { opacity:1; filter:blur(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}


.answerBtn {
  position: relative;
  overflow: hidden;
  transition: 0.2s ease-in-out;
}

.answerBtn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(0,255,255,0.4), transparent);
  transition: 0.4s;
}

.answerBtn:hover::after {
  left: 100%;
}

.answerBtn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px #0ff;
}


/* Modale centrée futuriste */
#videoModal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}

#videoModal.show {
  display: flex;
}

/* Cadre holographique */
#videoFrame {
  position: relative;
  padding: 20px;
  background: rgba(0, 20, 25, 0.7);
  border: 1px solid cyan;
  border-radius: 14px;
  box-shadow: 
      0 0 25px #0ff7 inset,
      0 0 40px #0ff2;
  animation: holoPop 0.4s ease;
}

@keyframes holoPop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Video */
#rewardVideo {
  width: 460px;
  max-width: 90vw;
  border-radius: 10px;
}

/* Close button */
#closeVideo {
  position: absolute;
  top: 5px;
  right: 8px;
  font-size: 1.4em;
  background: none;
  border: none;
  color: cyan;
  cursor: pointer;
  text-shadow: 0 0 10px cyan;
  transition: 0.3s;
}

#closeVideo:hover {
  color: white;
  text-shadow: 0 0 20px white;
}



/* ===== CORRECTION MOBILE SCROLL ===== */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .menu,
  .game {
    justify-content: flex-start;
    min-height: 100vh;
    padding-top: 80px;
  }

  .text-panel {
    width: 92%;
    margin-bottom: 20px;
  }
}

/* ===== Sécuriser l’affichage des règles ===== */
#quizRules,
#advRules,
#decryptRules,
#rulePanel {
  max-height: none;
  overflow: visible;
}

/* ===== conteneur commun pour les boutons de navigation ===== */
.nav-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ===== un micro-effet visuel au survol ===== */
.nav-buttons button:hover {
  box-shadow: 0 0 25px #0ff;
  transform: translateY(-2px) scale(1.05);
}

/* ===== fade-out plus doux sur la photo récompense ===== */
#giftPhoto {
  transition: transform 0.6s ease, opacity 0.4s ease;
}

/* ===== feedback visuel clair sur la photo récompense ===== */
#giftPhoto {
  pointer-events: auto;
}

#giftPhoto {
  cursor: pointer;
}
/* ===== Style du score ===== */
#decrypt-score {
  font-size: 1.1em;
  margin-bottom: 12px;
  text-shadow: 0 0 10px #0ff;
}


/* === CODE IA FINAL === */
#iaCodeReveal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 10, 15, 0.35);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  z-index: 6000;
  transition: opacity 2s ease;
}

#iaCodeReveal.show {
  opacity: 1;
}

.ia-code-text {
  font-size: clamp(1.4rem, 4vw, 2.6rem);
  text-align: center;
  color: #6ff3ff;
  text-shadow:
    0 0 10px #6ff3ff,
    0 0 30px #00ffff,
    0 0 60px #00ffff88;
  animation: fadeIn 1.2s ease-out;
}

/* ===== JOURNAL DE FRAGMENTS ===== */
#story {
  margin-top: 25px;
  text-align: left;
  line-height: 1.6em;
  font-size: 0.95em;
}

/* conteneur d’un fragment (jeu quiz) */
.fragment {
  margin: 8px 0;
  padding: 10px 14px;
  border-left: 3px solid #0ff;
  background: rgba(0, 20, 25, 0.45);
  border-radius: 6px;
  animation: fadeIn 0.6s ease-out;
}

/* fragment normal */
.fragment.normal {
  color: #6ff3ff;
}

/* fragment bonus */
.fragment.bonus {
  color: #ffd966;
  border-left-color: #ffd966;
  text-shadow: 0 0 8px #ffd96688;
}



#advJournal .fragment.secret-human {
  color: #ffd36f;
  border-left: 4px solid #ffd36f;
  text-shadow: 0 0 12px rgba(255, 211, 111, 0.75);
  background: linear-gradient(
    90deg,
    rgba(255, 211, 111, 0.16),
    rgba(255, 211, 111, 0.04)
  );
  box-shadow: inset 0 0 16px rgba(255, 211, 111, 0.08);
}

#advJournal .fragment.secret-ia {
  color: #d9c2ff;
  border-left: 4px solid #b47bff;
  text-shadow: 0 0 12px rgba(180, 123, 255, 0.75);
  background: linear-gradient(
    90deg,
    rgba(180, 123, 255, 0.18),
    rgba(180, 123, 255, 0.05)
  );
  box-shadow: inset 0 0 16px rgba(180, 123, 255, 0.10);
}


#advJournal .fragment.secret-human::before {
  content: "🧠 ";
  opacity: 0.95;
}

#advJournal .fragment.secret-ia::before {
  content: "💠 ";
  opacity: 0.95;
}

/* ===================== CHRONIQUE DES SEUILS ===================== */

#advFragmentTitle {
  text-align: center;
  margin: 18px 0 10px;
  font-weight: bold;
  letter-spacing: 1.2px;
  color: #00ffff;
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.8);
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
  padding-bottom: 6px;
}

/* Fragments de la chronique */
.fragment.normal,
.fragment.bonus {
  background: rgba(0, 255, 255, 0.08);
  border-left: 3px solid #00ffff;
  color: #cfffff;
}

/* ===================== MIROIR DE CONSCIENCE ===================== */

#mirrorTitle {
  position: relative;
  display: inline-block;
  text-align: center;
  margin: 28px 0 14px;
  font-weight: bold;
  letter-spacing: 1.4px;
  color: #e6d8ff;
  text-shadow:
    0 0 8px rgba(180, 120, 255, 0.55),
    0 0 18px rgba(180, 120, 255, 0.35);
  border-bottom: 1px solid rgba(180, 120, 255, 0.35);
  padding: 0 0 8px 30px;
  pointer-events: none;
  animation: mirrorTitleGlow 3.2s ease-in-out infinite alternate;
}

#mirrorTitle::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 48%;
  transform: translateY(-50%) rotate(45deg);

  width: 12px;
  height: 12px;
  border-radius: 2px;

  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.95) 0%,
    rgba(111,243,255,0.82) 38%,
    rgba(180,120,255,0.82) 100%
  );

  border: 1px solid rgba(180, 120, 255, 0.7);

  box-shadow:
    0 0 6px rgba(180,120,255,0.35),
    0 0 12px rgba(111,243,255,0.18),
    inset 0 0 4px rgba(255,255,255,0.28);

  animation: mirrorGemPulse 2.6s ease-in-out infinite alternate;
}

#mirrorTitle::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(180,120,255,0.85),
    rgba(111,243,255,0.25)
  );
  box-shadow: 0 0 6px rgba(180,120,255,0.35);
  opacity: 0.9;
}

@keyframes mirrorTitleGlow {
  from {
    text-shadow:
      0 0 6px rgba(180, 120, 255, 0.35),
      0 0 12px rgba(180, 120, 255, 0.18);
    border-bottom-color: rgba(180, 120, 255, 0.22);
  }
  to {
    text-shadow:
      0 0 10px rgba(180, 120, 255, 0.6),
      0 0 20px rgba(180, 120, 255, 0.28);
    border-bottom-color: rgba(180, 120, 255, 0.42);
  }
}

@keyframes mirrorGemPulse {
  from {
    box-shadow:
      0 0 4px rgba(180,120,255,0.22),
      0 0 8px rgba(111,243,255,0.12),
      inset 0 0 3px rgba(255,255,255,0.18);
    filter: brightness(0.95);
  }
  to {
    box-shadow:
      0 0 8px rgba(180,120,255,0.42),
      0 0 14px rgba(111,243,255,0.2),
      inset 0 0 5px rgba(255,255,255,0.34);
    filter: brightness(1.08);
  }
}


/* Seuils non franchis */
.fragment.secret {
  background: rgba(120, 60, 160, 0.12);
  border-left: 3px solid #b47bff;
  color: #f1eaff;
  font-style: italic;
  box-shadow: inset 0 0 12px rgba(180, 120, 255, 0.2);
}


/* titre journal aventure */
#advFragmentTitle {
  text-align: center;
  margin-bottom: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 0 0 10px #0ff;
}

/* titre journal quiz */
#quizFragmentTitle {
  text-align: center;
  margin-bottom: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 0 0 10px #0ff;
}



/* ===== VISUEL MENU PRINCIPAL ===== */
.menu-visual {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 20px 0 30px;
}

.menu-image {
  width: 92%;
  max-width: 900px;
  border-radius: 16px;
  box-shadow:
    0 0 30px rgba(0,255,255,0.35),
    0 0 80px rgba(0,255,255,0.15);
  animation: fadeIn 1.2s ease-out;
}

/* effet léger holographique */
.menu-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(0,255,255,0.15),
    transparent
  );
}

/* ===== révélation du miroir dans décisions critiques ===== */
#mirrorTitle,
.fragment.secret {
  animation: mirrorFade 0.8s ease-out both;
}

@keyframes mirrorFade {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}


/* ===================== VOIX DE NOCTUA ===================== */

.noctua-voice {
  margin-top: 22px;
  padding: 14px 18px;
  border-left: 3px solid rgba(255, 200, 255, 0.8);
  background: linear-gradient(
    90deg,
    rgba(180, 120, 255, 0.15),
    rgba(0, 0, 0, 0)
  );
  color: #f5eaff;
  font-style: italic;
  text-shadow: 0 0 10px rgba(200, 150, 255, 0.6);
}


/* ================= MIROIR DE CONSCIENCE INTERFACE HOLOGRAPHIQUE ================= */

#conscienceMirror {
  margin-top: 30px;
  padding: 20px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  background: linear-gradient(
    180deg,
    rgba(0, 255, 255, 0.05),
    rgba(0, 0, 0, 0.6)
  );
  box-shadow:
    0 0 20px rgba(0, 255, 255, 0.25),
    inset 0 0 40px rgba(0, 255, 255, 0.1);
  animation: hologramFlicker 4s infinite;
  pointer-events: none;
}

.mirror-header {
  font-size: 1.1em;
  letter-spacing: 0.15em;
  color: #7ffcff;
  text-align: center;
  margin-bottom: 15px;
  text-shadow: 0 0 8px rgba(127, 252, 255, 0.6);
}

.mirror-shard {
  margin: 10px 0;
  padding: 10px;
  background: rgba(0, 255, 255, 0.08);
  border-left: 3px solid rgba(0, 255, 255, 0.5);
  animation: shardScan 3s infinite;
}

.shard-label {
  display: block;
  font-size: 0.7em;
  opacity: 0.6;
  letter-spacing: 0.1em;
}

.shard-name {
  display: block;
  font-size: 0.9em;
  color: #bfffff;
}


/* === secrets humains / secrets IA dans le miroir === */

.mirror-shard.secret-human {
  background: rgba(111, 243, 255, 0.08);
  border-left: 3px solid #6ff3ff;
  box-shadow: inset 0 0 14px rgba(111, 243, 255, 0.12);
}

.mirror-shard.secret-human .shard-name {
  color: #6ff3ff;
  text-shadow: 0 0 8px rgba(111, 243, 255, 0.45);
}

.mirror-shard.secret-ia {
  background: rgba(180, 123, 255, 0.10);
  border-left: 3px solid #b47bff;
  box-shadow: inset 0 0 14px rgba(180, 123, 255, 0.16);
}

.mirror-shard.secret-ia .shard-name {
  color: #f1eaff;
  text-shadow: 0 0 8px rgba(180, 123, 255, 0.45);
}


/* === ANIMATIONS === */

@keyframes hologramFlicker {
  0%, 100% { opacity: 0.95; }
  45% { opacity: 0.85; }
  50% { opacity: 0.7; }
  55% { opacity: 0.9; }
}

@keyframes shardScan {
  0% { box-shadow: inset 0 0 0 rgba(0,255,255,0); }
  50% { box-shadow: inset 0 -10px 20px rgba(0,255,255,0.15); }
  100% { box-shadow: inset 0 0 0 rgba(0,255,255,0); }
}

/* === DIFFÉRENCIATION VISUELLE AVEC LA CHRONIQUE === */
#advJournal .fragment {
  background: rgba(255, 255, 255, 0.05);
}

#conscienceMirror {
  background-blend-mode: screen;
}

/* === Miroir vivant (réagit au survol) === */
.mirror-shard:hover {
  background: rgba(0, 255, 255, 0.2);
  transform: translateX(4px);
  transition: all 0.3s ease;
}


.threshold-container {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, #0c1020 0%, #05070f 70%);
  color: #cfd8ff;
  text-align: center;
  font-family: "Courier New", monospace;
}

.threshold-ring {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 2px solid rgba(120,150,255,0.6);
  box-shadow:
    0 0 35px rgba(120,150,255,0.35),
    inset 0 0 25px rgba(120,150,255,0.25);
  animation: pulseRing 4s infinite ease-in-out;
  margin-bottom: 40px;
}

@keyframes pulseRing {
  0%   { transform: scale(0.95); opacity: 0.6; }
  50%  { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.6; }
}

.threshold-text p {
  letter-spacing: 4px;
  font-size: 14px;
  opacity: 0.75;
}

.threshold-text span {
  display: block;
  margin-top: 14px;
  font-size: 16px;
  opacity: 0.9;
  line-height: 1.6;
}

.hint {
  position: absolute;
  bottom: 25px;
  font-size: 12px;
  opacity: 0.4;
  letter-spacing: 2px;
}

.fade {
  animation: fadeOut 1.2s forwards;
}

@keyframes fadeOut {
  to { opacity: 0; }
}


/* === MICRO-ANIMATIONS DES FINS === */

.end_alter1 {
  animation: warmPulse 2.5s infinite;
  box-shadow: 0 0 25px #D6A15C;
}

@keyframes warmPulse {
  0% { box-shadow: 0 0 10px #D6A15C; }
  50% { box-shadow: 0 0 35px #D6A15C; }
  100% { box-shadow: 0 0 10px #D6A15C; }
}

.end_alter2 {
  animation: coldVibration 3s infinite;
}

@keyframes coldVibration {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-1px); }
  50% { transform: translateX(1px); }
}

.end_equinoxe {
  background: radial-gradient(circle, #7A8FA6, transparent 70%);
}


/* === visuel_noctua_holographique_quizz === */
.quiz-visual {
  position: relative;
  margin: 20px auto;
  max-width: 520px;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.quiz-visual.hidden {
  opacity: 0;
  pointer-events: none;
}

.quiz-visual img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(120,160,200,0.35);
}

.quiz-visual-overlay {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(120,160,200,0.4);
  box-shadow: inset 0 0 25px rgba(120,160,200,0.3);
  pointer-events: none;
}

/* === style du tableau des scores === */
#scoreTable {
  width:100%;
  border-collapse: collapse;
  margin-top:15px;
}
#scoreTable th, #scoreTable td {
  border:1px solid #0ff;
  padding:8px;
}
#scoreTable th {
  background:rgba(0,255,255,0.2);
}

.quiz-image {
  margin-bottom: 20px;
  text-align: center;
}

.quiz-image img {
  max-width: 100%;
  border-radius: 6px;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
}

.advImageContainer {
  width: 100%;
  margin: 20px 0;
  text-align: center;
}

.adv-image {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(120, 180, 255, 0.25);
}

.adv-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) brightness(0.9);
}

.hidden {
  display: none;
}

/* === pour les images de quizz en général_rendu === */
#quizImageContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0 24px 0;
}

#quizImage {
  max-width: 520px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow:
    0 0 25px rgba(0, 255, 255, 0.25),
    inset 0 0 15px rgba(0, 255, 255, 0.15);
  border: 1px solid rgba(0, 255, 255, 0.35);
}


#resetEquinoxeContainer {
  margin-top: 24px;
  text-align: center;
  opacity: 0.7;
}

#resetEquinoxeBtn {
  background: transparent;
  border: 1px solid rgba(200,200,200,0.3);
  color: #ccc;
  padding: 8px 16px;
  font-family: inherit;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.3s ease;
}

#resetEquinoxeBtn:hover {
  opacity: 1;
  border-color: #fff;
  color: #fff;
}

/* === compteur accéléré visible === */
.time-pressure {
animation: pulse 1s infinite alternate;
  font-family: monospace;
  color: #ffb3b3;
  margin-bottom: 10px;
  opacity: 0.85;
  pointer-events: none;   /* ⬅️ CRITIQUE */
  z-index: 1;             /* PAS au-dessus du menu */
}
@keyframes pulse {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}

.hidden {
  display: none !important;
}

.menu-actions {
  margin-top: 20px;
  text-align: center;
}

.menu-btn.iteration {
  opacity: 0.9;
}

/* === bouton iteration au dessus du footer === */
.menu {
  padding-bottom: 90px; /* laisse la place au footer */
}


/* === bouton qui disparaissent dans la salle du temps === */
.choice-fading {
  opacity: 0.45;
  filter: grayscale(100%);
  cursor: not-allowed;
  transition: opacity 2.5s ease, filter 2.5s ease;
}

.choice-vanish {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 3s ease, transform 3s ease;
}

/* === compte a rebours pour puzzle === */
.countdown {
  margin-top: 10px;
  font-size: 1rem;
  letter-spacing: 0.15em;
  color: #ff5555;
  opacity: 0.9;
}

.countdown.urgent {
  animation: pulse 0.8s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* === titre des pieces=== */
.room-title {
  text-align: center;
  margin: 30px 0 15px;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  color: #00ffff;
  letter-spacing: 0.2em;
  opacity: 0;
  transform: translateY(10px);
  text-shadow:
    0 0 8px rgba(0,255,255,0.6),
    0 0 16px rgba(0,255,255,0.3);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.room-title.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ===================== */
/* 🟦 UI NOCTUA */
/* ===================== */

#noctua-trace {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 10px;
  height: 10px;
  border: 1px solid #6ff3ff;
  border-radius: 50%;
  opacity: 0.35;
  animation: noctuaPulse 6s infinite;
  z-index: 3000;
}

@keyframes noctuaPulse {
  0%,100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

#noctua-console {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 320px;
  background: rgba(10, 15, 25, 0.88);
  border: 1px solid rgba(111, 243, 255, 0.25);
  box-shadow: 0 0 30px rgba(111, 243, 255, 0.15);
  padding: 16px;
  font-family: monospace;
  color: #cfefff;
  z-index: 3001;
}

#noctua-header {
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0.6;
  margin-bottom: 10px;
}

#noctua-output {
  font-size: 13px;
  line-height: 1.5;
  min-height: 60px;
  margin-bottom: 12px;
}

#noctua-input {
  width: 100%;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(111,243,255,0.2);
  padding-top: 8px;
  color: #6ff3ff;
  outline: none;
}

#noctua-input::placeholder {
  color: rgba(111,243,255,0.4);
}


/* === CADRE IMAGE 16:9 — DÉCISIONS CRITIQUES === */

.advImageContainer {
  width: 100%;
  max-width: 720px;
  margin: 24px auto;
  display: flex;
  justify-content: center;
}

/* cadre par défaut = image 16:9 */
.adv-image {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  cursor: zoom-in;
  box-shadow:
    0 0 35px rgba(120,180,255,0.25),
    inset 0 0 25px rgba(120,180,255,0.15);
}

/* quand le node contient une vidéo : cadre vertical 9:16 */
.adv-image.video-portrait {
  width: min(100%, 420px);
  max-width: 420px;
  aspect-ratio: 9 / 16;
  cursor: default;
}

/* L’image s’adapte au cadre */
.adv-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* 🔥 remplit sans déformer */
  object-position: center;
  display: block;
}

.adv-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}


/* le navigateur ajuste automatiquement la hauteur */
@media (max-width: 768px) {
  .advImageContainer {
    max-width: 94%;
  }
}


/* légère pulsation holographique */
.adv-image {
  animation: holoPulse 6s infinite ease-in-out;
}

@keyframes holoPulse {
  0%,100% { box-shadow: 0 0 20px rgba(120,180,255,0.25); }
  50% { box-shadow: 0 0 40px rgba(120,180,255,0.45); }
}


/* === LIGHTBOX IMAGE IMMERSIVE === */

.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  cursor: zoom-out;
}

.image-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 14px;
  box-shadow:
    0 0 40px rgba(120,180,255,0.45),
    0 0 80px rgba(120,180,255,0.25);
  animation: zoomIn 0.35s ease;
}

/* animation douce */
@keyframes zoomIn {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}


/* ================================
   🎬 FIN NARRATIVE — OVERLAY pour quizz narratif
   ================================ */

.overlay{
  position: fixed;
  inset: 0;

  background: radial-gradient(circle at center, rgba(5,10,25,0.96), rgba(0,0,0,0.98));
  backdrop-filter: blur(8px);

  display: none;

  overflow-y: auto;   /* 🔥 scroll global */

    align-items: stretch; /* 🔥 important */
  justify-content: flex-start;
}

.overlay .cinema{
  width: 100%;
  min-height: 100vh;   /* 🔥 PLEIN ÉCRAN */
  box-sizing: border-box;
  
  margin: 0;
  padding: 80px 40px 140px;

  border-radius: 0;    /* 🔥 plus de carte → écran total */
  
  text-align: center;

  background: linear-gradient(145deg, #0a0f1f, #050810);

  border: none;        /* optionnel */
  
  box-shadow: none;    /* optionnel */

  display: flex;
  flex-direction: column;
}

/* Titre fin */
#nqEndTitle{
  font-size: 28px;
  color: #6ff3ff;
  margin-bottom: 8px;
  text-shadow: 0 0 12px rgba(0,255,255,0.35);
}

/* Tag (ex : Renaissance / Fusion / Silence) */
#nqEndTag{
  display: inline-block;
  font-size: 13px;
  color: #9bdcff;
  margin-bottom: 18px;
  opacity: 0.8;
}

/* Texte narratif */
#nqEndText{
  font-size: 15px;
  line-height: 1.6;
  color: #d9faff;
  margin-bottom: 30px;
  white-space: pre-line;
}

/* Boutons */
.end-actions{
  display: flex;
  gap: 14px;
  justify-content: center;
  
  margin-top: auto; /* 🔥 pousse les boutons en bas */
  padding-bottom: 40px;
}

.end-actions button{
  padding: 14px 26px;
  border-radius: 10px;
  border: 1px solid rgba(0,255,255,0.35);
  background: rgba(0,255,255,0.05);
  color: #6ff3ff;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.2s;
}

.end-actions button:hover{
  background: rgba(0,255,255,0.15);
  box-shadow: 0 0 12px rgba(0,255,255,0.2);
}

/* Animation apparition */
@keyframes fadeInEnd{
  from{
    opacity:0;
    transform: scale(0.95);
  }
  to{
    opacity:1;
    transform: scale(1);
  }
}


#nqEndTrait, #nqEndProfile{
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,255,255,0.18);
  background: rgba(0,255,255,0.05);
  color: #d9faff;
  text-align: left;
}

#nqEndProfile{
  opacity: .9;
  font-style: italic;
}

.noctua-box{
  margin-top:10px;
  padding:18px;
  background:rgba(0,255,255,0.05);
  border:1px solid rgba(0,255,255,0.25);
  border-radius:10px;
  text-align:left;
}

.noctua-analysis{
  padding:18px;
  background:rgba(0,255,255,0.05);
  border-top:1px solid rgba(0,255,255,0.25);
  line-height:1.6;
}
.noctua-title{
  font-size:15px;
  font-weight:600;
  margin-bottom:12px;
  color:#7df9ff;
  letter-spacing:1px;
}

.noctua-line{
  margin:4px 0;
  opacity:.95;
}

.label{
  color:#7df9ff;
  margin-right:6px;
}

.value{
  opacity:.85;
}


.noctua-reaction{
  padding:14px 18px 18px;
  border-top:1px dashed rgba(0,255,255,0.25);
  text-align:left;
}

.noctua-diagnostic{
  color:#6ff3ff;
  font-weight:600;
  margin-bottom:6px;
  letter-spacing:.5px;
}

.noctua-mystere{
  opacity:.7;
  font-style:italic;
  margin-top:6px;
}


.indice-label{
  color: #ffd36f;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(255,211,111,0.4);
  letter-spacing: 1px;
}

.indice-text{
  color:  #fff1c9;
  opacity: 0.9;
}


#nqHint{
  margin-top:10px;
  padding:10px 14px;
  background: rgba(111,243,255,0.06);
  border-left: 3px solid #6ff3ff;
  border-radius: 6px;
}


.indice-label{
  animation: hintPulse 2.5s infinite alternate;
}

@keyframes hintPulse{
  from { opacity: 0.6; }
  to   { opacity: 1; }
}


#nqSceneTitle{
  color: #6ff3ff;
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: none;
  letter-spacing: 1px;
  opacity: 0.95;

  text-shadow:
    0 0 8px rgba(111,243,255,0.7);
	
	
	/* trait vertical holographique à gauche */
	border-left: 3px solid rgba(111,243,255,0.7);
  padding-left: 10px;
  
background: linear-gradient(
    90deg,
    rgba(111,243,255,0.12),
    rgba(111,243,255,0.02)
  );

  padding: 8px 12px;
  border-radius: 6px;
}


.subtitle {
  font-size: 0.8em;
  opacity: 0.7;
  letter-spacing: 1px;
}


/* les réponses du quizz narratif sur 2 colonnes */
#nqQuizOpts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}


/* flash + effet écran pour noctua prompt */
/* Console toujours là mais cachée tant que locked */
#noctua-console.hidden { display:none; }

#noctua-console {
  position: fixed;
  right: 12px;
  bottom: 80px;
  width: min(260px, calc(100vw - 20px));
  z-index: 9999;

  background: rgba(10,15,25,0.52);
  border: 1px solid rgba(111,243,255,0.12);
  box-shadow:
    0 0 18px rgba(111,243,255,0.12),
    inset 0 0 14px rgba(111,243,255,0.05);

  border-radius: 10px;
  padding: 7px 8px;
  backdrop-filter: blur(6px);

transform: translateY(0);
transition: all 0.25s ease;

  opacity: 0.78;
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

#noctua-console.idle {
  opacity: 0.55;
  box-shadow:
    0 0 6px rgba(111,243,255,0.03),
    inset 0 0 8px rgba(111,243,255,0.02);
}

#noctua-header {
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 0.58;
  margin-bottom: 6px;
}

#noctua-output {
  min-height: 34px;
  max-height: 84px;
  overflow: auto;
  font-size: 11px;
  line-height: 1.28;
  white-space: pre-wrap;
  margin-bottom: 6px;
  opacity: 0.82;
}

#noctua-input {
  width: 100%;
  border-radius: 8px;
  padding: 7px 9px;
  outline: none;
  border: 1px solid rgba(111,243,255,0.12);
  background: rgba(0,0,0,0.22);
  color: rgba(217,250,255,0.9);
  font-size: 11px;
}


#noctua-input::placeholder {
  color: rgba(111,243,255,0.32);
}

/* Console verrouillée (visible mais inutilisable) */
#noctua-console.locked {
  opacity: 0.55;
  pointer-events: none;
  filter: grayscale(0.4);
}

/* FLASH plein écran */
#noctua-flash {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition:opacity .25s ease;
}

/* petit “pulse” flash */
#noctua-flash.active {
  animation: noctuaFlash 420ms ease-out 1;
}

@keyframes noctuaFlash {
  0% { opacity: 0; }
  20% { opacity: 1; }
  100% { opacity: 0; }
}


#noctua-trace {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    rgba(111,243,255,0.6),
    transparent);
  opacity: 0.18;
  animation: noctuaPulse 4s infinite;
  pointer-events: none;
  z-index: 9998;
}

@keyframes noctuaPulse {
  0% { opacity: 0.08; }
  50% { opacity: 0.25; }
  100% { opacity: 0.08; }
}


#noctua-trace.play{
  animation: noctuaTraceScan 1.2s ease-out;
  opacity: 1;
}

@keyframes noctuaTraceScan{
  0%{
    transform: translateY(0);
    opacity: 0;
  }
  10%{
    opacity: 1;
  }
  100%{
    transform: translateY(100vh);
    opacity: 0;
  }
}


/* console flottante + réduite */
#noctua-console.minimized {
  height: 38px;
  overflow: hidden;
  opacity: 0.75;
}

/* console vivante */
#noctua-console {
  transition: transform 0.3s ease;
}

#noctua-console:hover {
  transform: scale(1.02);
}

/* Sinon l’image peut coller à gauche pour recompense convergence. */
#nqRewardVisual{
  text-align:center;
}

/* clavier pour transcodage */
#transcodeFocus {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* pour overlay des règles */
.rule-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.rule-overlay.hidden {
  display: none;
}

.rule-box {
  max-width: 540px;
  padding: 34px;
  text-align: center;
  color: #6ff3ff;
  border: 1px solid rgba(111,243,255,0.25);
  background: rgba(5,10,20,0.9);
  backdrop-filter: blur(8px);
  font-family: Orbitron, sans-serif;
}

.rule-box h2 {
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.rule-box p {
  line-height: 1.6;
  opacity: 0.9;
}

.rule-box button {
  margin-top: 24px;
  padding: 11px 20px;
  background: transparent;
  border: 1px solid #6ff3ff;
  color: #6ff3ff;
  cursor: pointer;
}

/* colorisation des conséquences */
#nqConsequence {
  color: #ff5c7a; /* rouge néon doux */
  font-weight: 600;
  margin-top: 12px;
  text-shadow: 0 0 8px rgba(255, 80, 120, 0.6);
}
@keyframes consequenceBlink {
  0%   { opacity: 1; }
  50%  { opacity: 0.35; }
  100% { opacity: 1; }
}

#nqConsequence.active {
  animation: consequenceBlink 1s ease-in-out 3;
}

/* ============================= */
/* 🌌 BOUTONS ILLUMINÉS ADVENTURE */
/* ============================= */

#choices button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* ÉTAT SÉLECTIONNÉ */
#choices button.selected {
  color: #001018;
  background: linear-gradient(90deg, #6ff3ff, #3fdcff);
  box-shadow:
    0 0 8px #6ff3ff,
    0 0 18px #3fdcff,
    0 0 35px rgba(111,243,255,0.6);
  transform: scale(1.05);
}

/* PULSE */
#choices button.selected::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(111,243,255,0.4) 0%, transparent 70%);
  animation: pulseGlow 1s ease-out forwards;
}

@keyframes pulseGlow {
  0% {
    opacity: 1;
    transform: scale(0.8);
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

/* AUTRES BOUTONS */
#choices button.faded {
  opacity: 0.25;
  filter: blur(1px);
  transform: scale(0.95);
}

/* style aux videos de décisions critiques */
#advVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(120, 180, 255, 0.25);
}

/* style aux videos de narratif quiz */
.nqVisualContainer {
  width: 100%;
  max-width: 720px;
  margin: 18px auto 24px;
}

.nq-visual-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  box-shadow:
    0 0 35px rgba(120,180,255,0.25),
    inset 0 0 25px rgba(120,180,255,0.15);
}

#nqSceneImg,
#nqSceneVideo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
}

#nqSceneVideo {
  filter: contrast(1.08) brightness(0.88);
}

/* pour version mobile */
@media (max-width: 768px) {
  .overlay {
    padding: 0;
  }

  .overlay .cinema {
    width: 100%;
	min-height: 100vh;
    margin: 0;
    padding: 24px 14px 120px;
  }

  .end-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .end-actions button {
    width: 100%;
    max-width: 320px;
  }

  #nqRewardImg,
  #nqRewardVideo {
    max-width: 100%;
    height: auto;
  }
}



#noctua-console:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow:
    0 0 24px rgba(111,243,255,0.18),
    inset 0 0 16px rgba(111,243,255,0.06);
}

/* POUR CORRECTION DU MOBILE */
@media (max-width: 768px) {
  #noctua-console {
    right: 6px;
    bottom: 70px;
    width: min(210px, calc(100vw - 12px));
    padding: 6px 7px;
    border-radius: 8px;
    opacity: 0.6;
  }

  #noctua-header {
    font-size: 8px;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
  }

  #noctua-output {
    min-height: 22px;
    max-height: 52px;
    font-size: 10px;
    margin-bottom: 4px;
  }

  #noctua-input {
    font-size: 10px;
    padding: 5px 7px;
  }
}


/* Empêche le body de bloquer le scroll UNIQUEMENT pendant la fin */
body.nq-overlay-open {
  overflow: hidden;
}
