* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #000;
  color: #fff;
  font-family: "Press Start 2P", monospace;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  image-rendering: pixelated;
}

.screen {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.screen.active { display: block; }

/* --- Bouton mute : coin haut-droit, visible partout (boot + intro + Morpheus) --- */
.mute-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2000;
  background: #000;
  color: #7fff7f;
  border: 2px solid #7fff7f;
  box-shadow: 3px 3px 0 #0f3d0f;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  padding: 8px 10px;
  cursor: pointer;
  image-rendering: pixelated;
}

.mute-btn:hover {
  background: #0f3d0f;
  color: #c6ffc6;
}

.mute-btn:active {
  box-shadow: none;
  transform: translate(3px, 3px);
}

.mute-btn.is-muted {
  color: #666;
  border-color: #666;
  box-shadow: 3px 3px 0 #222;
}

/* --- Écran PRESS START : avant tout, débloque le geste utilisateur pour l'audio --- */
.press-start-layer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: #000;
  color: #7fff7f;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
  cursor: pointer;
}

.press-start-layer.active { display: flex; }

.press-start-title {
  font-family: "Press Start 2P", monospace;
  font-size: 25px;
  letter-spacing: 2px;
  text-shadow: 0 0 14px rgba(127, 255, 127, 0.5);
}

.press-start-prompt {
  font-family: "Press Start 2P", monospace;
  font-size: 15px;
  animation: press-start-blink 0.8s steps(1) infinite;
}

@keyframes press-start-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.press-start-sub {
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  color: #3f7f3f;
}

/* --- Boot Corrompu : faux préchargement rétro, avant tout le reste --- */
.boot-layer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  color: #7fff7f;
  padding: 40px;
  cursor: pointer;
}

.boot-layer.active { display: block; }

.boot-text {
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  margin: 0;
}

.boot-glitch {
  animation: boot-glitch-jitter 0.15s steps(2) infinite;
}

@keyframes boot-glitch-jitter {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(-3px, 1px); }
  100% { transform: translate(2px, -1px); }
}

.boot-skip-hint {
  display: none; /* remplacé par l'indicateur global .skip-hint, visible dès le Boot Corrompu */
}

/* --- Indicateur global "ÉCHAP POUR PASSER" : visible du Boot Corrompu jusqu'à la fin
   des dialogues (Press Start inclus), masqué sur l'écran Morpheus (plus besoin de passer,
   le choix est fait). Texte seul, sobre, cohérent avec les autres indications du site. --- */
.skip-hint {
  position: fixed;
  bottom: 16px;
  right: 20px;
  z-index: 1500;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: #2f5f2f;
}

.skip-hint.hidden {
  display: none;
}

/* --- Personnage : zone fixe, haut de l'écran (~3/4 sup.), ne bouge jamais --- */
.character {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
}

.character-img {
  width: 150px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 18px rgba(0,255,100,0.25));
  animation: idle-breathe 3s ease-in-out infinite, halo-pulse 2.4s ease-in-out infinite;
}

@keyframes idle-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes halo-pulse {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(0,255,100,0.18)); }
  50%      { filter: drop-shadow(0 0 26px rgba(0,255,100,0.4)); }
}

/* Idée 01 : halo qui double d'intensité pendant la "correction" du script sabot é */
.character.halo-boost .character-img {
  animation-play-state: paused;
  filter: drop-shadow(0 0 40px rgba(0,255,100,0.85)) !important;
}

/* Idée 05 : bulle de dialogue easter egg si inactivité prolongée, à GAUCHE du perso.
   Reste affichée tant que son propre bouton n'est pas cliqué (pas d'auto-fermeture). */
.idle-bubble {
  position: absolute;
  top: 12%;
  right: 100%;
  margin-right: 16px;
  width: 230px;
  padding: 10px 12px;
  background: #000;
  border: 2px solid #7fff7f;
  color: #7fff7f;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  line-height: 1.6;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.idle-bubble.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.idle-bubble-text {
  margin-bottom: 10px;
}

.idle-bubble-btn {
  display: block;
  width: 100%;
  background: #000;
  color: #7fff7f;
  border: 2px solid #7fff7f;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  padding: 6px 4px;
  cursor: pointer;
  text-align: center;
}

.idle-bubble-btn:hover {
  background: #0f3d0f;
  color: #c6ffc6;
}

.idle-bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #7fff7f;
}

/* --- Fumée (pouf au clic bouton), ancrée à la zone perso --- */
.smoke-layer {
  position: absolute;
  top: 6%;
  left: 50%;
  width: 0; height: 0;
  pointer-events: none;
  z-index: 5;
}

.smoke-puff {
  position: absolute;
  width: 30px; height: 30px;
  background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  animation: smoke-rise 1.1s ease-out forwards;
}

@keyframes smoke-rise {
  0%   { opacity: 0.8; transform: translate(0,0) scale(0.6); }
  60%  { opacity: 0.4; transform: translate(-10px,-40px) scale(1.4); }
  100% { opacity: 0;   transform: translate(-16px,-70px) scale(2); }
}

/* Fumée d'ambiance en boucle (continue, pas liée au clic) */
.ambient-puff {
  position: absolute;
  width: 22px; height: 22px;
  background: radial-gradient(circle, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  animation: ambient-smoke-rise 3.2s ease-out forwards;
}

@keyframes ambient-smoke-rise {
  0%   { opacity: 0.85; transform: translate(0,0) scale(0.5); }
  50%  { opacity: 0.5;  transform: translate(-14px,-45px) scale(1.4); }
  100% { opacity: 0;    transform: translate(-26px,-85px) scale(2.2); }
}

/* --- Dialogue : zone fixe en bas, largeur FIXE dès le départ (pas de
   croissance symétrique depuis le centre), alignée à gauche, indépendante
   de la zone du personnage --- */
.dialogue-zone {
  position: absolute;
  top: 66%;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  max-width: 92vw;
  padding: 0 10px;
  text-align: left;
}

.dialogue-text {
  font-family: "Press Start 2P", monospace;
  font-size: 15px;
  line-height: 2;
  white-space: pre-line;
  text-align: left;
  display: block;
  width: 100%;
}

/* Curseur clignotant pixel-perfect pendant l'écriture du texte */
.cursor {
  display: inline-block;
  width: 9px;
  height: 14px;
  background: #7fff7f;
  margin-left: 4px;
  vertical-align: -2px;
  animation: cursor-blink 0.9s steps(1) infinite;
}

@keyframes cursor-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.button-wrap {
  text-align: center;
  margin-top: 70px;
}

.dialogue-btn {
  padding: 10px 16px;
  background: #000;
  color: #7fff7f;
  border: 3px solid #7fff7f;
  box-shadow: 4px 4px 0 #0f3d0f;
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-transform: uppercase;
  image-rendering: pixelated;
}

.dialogue-btn:hover {
  background: #0f3d0f;
  color: #c6ffc6;
}

.dialogue-btn:active {
  box-shadow: none;
  transform: translate(4px, 4px);
}

.todo-note {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #666;
  font-size: 11px;
  font-family: "Press Start 2P", monospace;
  text-align: center;
}

/* --- Écran Morpheus --- */
.matrix-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.morpheus-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.morpheus-character {
  position: relative;
}

.morpheus-img {
  width: 260px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 20px rgba(0,255,100,0.3));
}

/* Zones de survol invisibles — couvrent la zone bras/main de chaque côté, sans
   déborder sur tout le haut/bas du personnage (trop large sinon). */
.hand-zone {
  position: absolute;
  top: 22%;
  height: 25%;
  width: 20%;
  cursor: pointer;
}

.hand-zone-left { left: 5%; }
.hand-zone-right { right: 5%; }

/* Easter egg caché (25/11/2026) : petit hitbox discret, clic uniquement, nulle part
   ailleurs. Au-dessus des zones de main (z-index) pour que le clic lui soit bien réservé. */
.groin-hitbox {
  position: absolute;
  top: 50%;
  left: 40%;
  width: 20%;
  height: 8%;
  z-index: 5;
  cursor: pointer;
}


