@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@300;400;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root {
  --bg-color: #333333;
  --text-color: #ffffff;
  --accent: #cdcdcd;
  --alert: #ff3333; 
  --censor-bar: #000000;
  --paper-bg: #f3f0e6; 
  --paper-ink: #1a1a1a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Archivo', sans-serif;
  overflow-x: hidden;
  cursor: none;
  scrollbar-width: none; 
  -ms-overflow-style: none;
}

body::-webkit-scrollbar { display: none; }

/* 1. ATMOSPHERE */
.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 400px 400px; 
}

.bunker-light-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 253, 224, 0.1) 0%, rgba(0,0,0,0) 80%);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  mix-blend-mode: screen;
  transition: opacity 0.05s;
}

#rainCanvas {
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  transition: opacity 2s ease;
}

/* 2. TYPO */
h1, h2, h3, .stair-step {
  font-family: 'Archivo', sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.9;
}

p {
  font-family: inherit;
  font-weight: 300;
  line-height: 1.7;
  font-size: 1rem;
  color: var(--text-color);
}

.mono {
  font-family: 'Courier Prime', monospace;
  font-size: 0.9rem;
  color: var(--text-color);
  letter-spacing: 1px;
}

.censor-container { display: inline-block; position: relative; }

.censor-bar {
  position: absolute;
  top: 45%;
  opacity: 0.9;
  left: -5px;
  right: -2px;
  height: 122px;
  width: 1100px;
  background: var(--censor-bar);
  z-index: 22;
}

/* 3. HERO */
.section {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6vw;
  position: relative;
  z-index: 10;
}

.hero {
  height: 100vh;
  min-height: 100vh;
  width: 100%;
  /* Image en fallback si WebGL charge pas */
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/parasite-hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat; 
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  margin: 0;
}

.hero h1 {
  font-size: clamp(4rem, 15vw, 12rem);
  font-weight: 900;
  color: white;
  position: relative;
  z-index: 3;
}

/* 4. INTRO SPECTACULAIRE */
.intro-spectacular {
    position: relative;
    min-height: 250vh; 
    padding: 0;
    overflow: hidden;
    background-color: #333333; 
}
.watermark-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: flex-start;
    padding-top: 20vh; pointer-events: none; z-index: 1;
}
.giant-watermark {
    font-size: 20vw; font-weight: 900;
    color: rgba(255, 255, 255, 0.03); 
    white-space: nowrap; text-transform: uppercase;
}
.intro-content-wrapper { position: relative; z-index: 5; padding: 10vh 0; }
.intro-moment {
    position: relative; height: 90vh;
    display: flex; align-items: center; margin-bottom: 20vh;
}
.moment-img-container {
    position: absolute; top: 0; width: 55%; height: 100%;
    overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.5); border-radius: 4px;
}
.moment-img-container img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(100%) brightness(0.8); transition: filter 0.5s ease;
}
.intro-moment:hover .moment-img-container img { filter: grayscale(20%) brightness(0.9); }
.img-left { left: 5%; }
.img-right { right: 5%; }
.moment-text-container { position: relative; width: 45%; z-index: 10; }
.text-right { margin-left: auto; margin-right: 15%; }
.text-left { margin-left: 15%; }

.text-box-brutal {
    position: relative; padding: 3rem; max-width: 600px;
    background-color: var(--paper-bg);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
    color: var(--paper-ink);
    box-shadow: 15px 15px 5px rgba(0,0,0,0.6); 
    clip-path: polygon(2% 1%, 98% 0%, 100% 98%, 85% 99%, 80% 97%, 75% 99%, 5% 100%, 0% 98%);
    transform: rotate(-1deg); transition: transform 0.3s ease;
}
.text-box-brutal:hover { transform: rotate(0deg) scale(1.02); }
.text-box-brutal::before {
    content: ''; position: absolute; top: -12px; left: 50%;
    width: 120px; height: 35px; background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(2px); border-left: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); transform: translateX(-50%) rotate(-1deg); z-index: 10;
}
.text-box-brutal .decoration-tag-red {
    display: inline-block; margin-bottom: 1.5rem; font-size: 1.2rem;
    color: #cc0000; border: 2px solid #cc0000; padding: 0.3rem 0.8rem;
    font-weight: 700; transform: rotate(-2deg);
}
.text-box-brutal p { font-family: 'Courier Prime', monospace; color: #222; }

@media (max-width: 768px) {
    .intro-spectacular { min-height: auto; padding-bottom: 10vh; }
    .intro-moment { height: auto; flex-direction: column; margin-bottom: 10vh; }
    .moment-img-container { position: relative; width: 90%; height: 50vh; margin: 0 auto; }
    .moment-text-container { width: 90%; margin: -50px auto 0; }
}

/* 5. ESCALIER (Cartographie des sujets) */
.stairs-container { display: flex; flex-direction: column; gap: 2px; margin-top:200px; }
.stair-item {
  display: flex; flex-direction: column; border-left: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s; position: relative; margin-left :100px;
}
.stair-step {
  display: block; position: relative; font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900; color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.3); transition: all 0.4s;
  padding-left: 80px; padding-bottom: 1rem; cursor: none; z-index: 20;
}
.stair-step:hover {
  color: white; padding-left: 90px; 
  background: linear-gradient(90deg, rgba(255,255,255,0.05), transparent);
}
.arrow-icon {
  position: absolute; left: 0; top: 0; margin-left: 15px;
  font-size: 1em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.5);
  transition: transform 0.4s ease, color 0.3s;
}
.stair-step:hover .arrow-icon, .stair-item.active .arrow-icon { color: var(--alert); -webkit-text-stroke: 0px; }
.stair-item.active .arrow-icon { transform: rotate(45deg); }
.stair-item.active { background: linear-gradient(90deg, rgba(255,255,255,0.03), transparent); border-left: 4px solid white; }
.stair-content { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s cubic-bezier(0.25, 1, 0.5, 1); opacity: 0.5; }
.stair-content.open { grid-template-rows: 1fr; opacity: 1; margin-bottom: 2rem; }
.content-inner { overflow: hidden; padding-left: 80px; border-left: 2px solid var(--alert); margin-left: 4px; }
.content-inner p { margin-top: 10px; max-width: 500px; }

/* 6. ELEMENTS D'AMBIANCE & CURSEURS */
#red-dot-cursor {
  position: fixed; width: 15px; height: 15px; background-color: var(--alert);
  border-radius: 50%; pointer-events: none; z-index: 10000;
  transform: translate(-50%, -50%); mix-blend-mode: exclusion;
}
#custom-cursor {
  position: fixed; width: 300px; height: 300px; pointer-events: none; z-index: 9999;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: 0; transition: opacity 1.3s ease; transform: translate(-50%, -50%) scale(0);
}
#custom-cursor.active { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Parallax Overlay Box (Hérité pour le futur) */
.parallax-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    pointer-events: none; z-index: 5; display: flex; flex-direction: column;
    justify-content: center; opacity: 0;
}
.float-box {
    background-color: #e8e8e8;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.1'/%3E%3C/svg%3E");
    padding: 2rem; 
    width: 350px; 
    color: #000000;
    position: absolute;
    clip-path: polygon(0% 5%, 5% 0%, 95% 2%, 100% 0%, 98% 95%, 100% 100%, 2% 98%, 0% 100%);
    box-shadow: 10px 20px 30px rgba(0,0,0,0.5);
}
.float-box p { color: #000000; font-weight: 500; }
.float-box::after {
    content: ''; position: absolute; top: -10px; left: 40%; width: 80px; height: 25px;
    background-color: rgba(255, 255, 255, 0.35); transform: rotate(3deg);
}
.float-box h3 {
    font-weight: 900; font-size: 1.5rem; margin-bottom: 0.5rem;
    color: #ff3333; border-bottom: 3px solid #000;
}
.box-left { top: 20%; left: -10%; }
.box-right { bottom: 20%; right: -10%; text-align: right; }

/* 7. MENU NAVIGATION */
.menu-toggle-btn {
    position: fixed; top: 30px; right: 30px; z-index: 9999;
    cursor: pointer; display: flex; flex-direction: column; align-items: flex-end;
    mix-blend-mode: difference; color: white;
}
.menu-line { width: 40px; height: 2px; background-color: white; margin-bottom: 8px; transition: width 0.3s; }
.menu-toggle-btn:hover .menu-line:first-child { width: 50px; }
.menu-label { font-size: 0.8rem; margin-top: 5px; }

.menu-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #111; z-index: 9990; transform: translateY(-100%);
    display: flex; justify-content: center; align-items: center; overflow: hidden;
}
.menu-container { width: 80%; max-width: 1200px; }
.menu-header {
    display: flex; justify-content: space-between; margin-bottom: 4rem;
    border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 1rem;
}
.decoration-tag-red {
    color: var(--alert); border: 1px solid var(--alert);
    padding: 0.2rem 0.6rem; font-size: 0.8rem;
}
.close-btn { cursor: pointer; color: rgba(255,255,255,0.5); transition: color 0.3s; }
.close-btn:hover { color: white; }
.menu-links { display: flex; flex-direction: column; gap: 20px; }
.menu-link-item {
    text-decoration: none; color: rgba(255,255,255,0.3);
    font-family: 'Archivo', sans-serif; font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900; text-transform: uppercase; transition: all 0.4s;
    display: flex; align-items: baseline; position: relative;
}
.link-number { font-size: 1rem; margin-right: 2rem; color: var(--alert); transform: translateY(-10px); }
.link-status {
    font-size: 0.8rem; color: var(--alert); margin-left: 20px;
    opacity: 0; transform: translateX(-10px); transition: all 0.3s;
}
.menu-link-item:hover, .menu-link-item.active { color: white; padding-left: 20px; }
.menu-link-item.active .link-status, .menu-link-item:hover .link-status { opacity: 1; transform: translateX(0); }

/* Canvas Container pour escalier (juste au cas où) */
#canvas-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 1; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; background-color: #1a1a1a;
}

/* --- PIED DE MENU (SOURCES) --- */
.menu-footer {
    margin-top: 3rem; /* Espace après les gros liens */
    opacity: 0; /* Caché par défaut pour l'animation JS */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.separator-line-small {
    width: 50px;
    height: 1px;
    background-color: var(--alert); /* Rouge */
    margin-bottom: 1.5rem;
}

.menu-source-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5); /* Gris discret */
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.menu-source-link:hover {
    color: #fff;
    padding-left: 10px; /* Petit décalage au survol */
}

.menu-source-link::before {
    content: '>';
    position: absolute;
    left: 0;
    opacity: 0;
    color: var(--alert);
    transition: opacity 0.3s;
}

.menu-source-link:hover::before {
    opacity: 1;
}