/* ═══════════════════════════════════════════════════════════════
   A 6AM TALE — GRAPHIC NOVEL & COMIC BOOK WEBGL EXPERIENCE
   Palette : Dark Ink #08080a · Gold Amber #d49547 · Comic White #ffffff
   Typographies : Titres en 'Hello Paris' · Bulles BD en 'Arial Black'
   ═══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Hello Paris';
  src: url('assets/Hello Paris Sans Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-dark:       #000000;
  --bg-deep:       #000000;
  --comic-paper:   #ffffff;
  --comic-ink:     #000000;
  --gold:          #d89c4c;
  --gold-bright:   #f6ba68;
  --gold-glow:     rgba(216, 156, 76, 0.35);
  --amber-dim:     rgba(216, 156, 76, 0.12);
  --ivory:         #ffffff;
  --text-muted:    rgba(255, 255, 255, 0.65);
  --ink-border:    #000000;
  --comic-border:  3px solid #000000;

  --font-title:    'Hello Paris', serif, sans-serif;
  --font-comic:    'Arial Black', Impact, sans-serif;
  --font-mono:     'Space Mono', monospace;
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background: #000000 !important;
  color: var(--ivory);
  font-family: var(--font-comic);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.comic-body {
  background: transparent;
  overflow-x: hidden;
  position: relative;
}

/* ── Global Canvas & Overlays ── */
#webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* ── Canvas Traits de Vent BD (Speed Lines & Manga Ink Streaks) ── */
#wind-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 12;
}

#grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 998;
  opacity: 0.04;
  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)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

#vignette-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 40%, rgba(3, 3, 4, 0.75) 100%);
}

/* ── Loader ── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.loader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loader-title {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.1em;
  color: var(--gold-bright);
  text-shadow: 0 0 25px var(--gold-glow);
}

.loader-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--text-muted);
}

.loader-bar-wrap {
  width: 220px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin-top: 10px;
}

.loader-bar {
  width: 0%;
  height: 100%;
  background: var(--gold-bright);
  box-shadow: 0 0 10px var(--gold-bright);
  transition: width 0.1s ease-out;
}

.loader-percent {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--gold);
}

/* ── Header ── */
.comic-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 40px;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.comic-header > * {
  pointer-events: auto;
}

.brand-logo {
  height: 26px;
  width: auto;
  opacity: 0.8;
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.8));
  transition: opacity 0.3s;
}

.brand-logo:hover {
  opacity: 1;
}

.header-center-tag span {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--gold);
  border: 1px solid rgba(216, 156, 76, 0.3);
  padding: 5px 14px;
  background: rgba(7, 7, 9, 0.65);
  backdrop-filter: blur(8px);
  text-transform: uppercase;
}

.sound-toggle {
  background: rgba(7, 7, 9, 0.7);
  border: 1px solid rgba(216, 156, 76, 0.3);
  padding: 6px 14px;
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.3s;
}

.sound-toggle:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.sound-wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.sound-wave i {
  width: 2px;
  height: 3px;
  background: var(--gold);
  display: inline-block;
  transition: height 0.2s;
}

.sound-toggle.is-playing .sound-wave i {
  animation: eq-bar 0.7s infinite alternate;
}
.sound-toggle.is-playing .sound-wave i:nth-child(1) { animation-delay: 0.1s; }
.sound-toggle.is-playing .sound-wave i:nth-child(2) { animation-delay: 0.3s; }
.sound-toggle.is-playing .sound-wave i:nth-child(3) { animation-delay: 0.2s; }

@keyframes eq-bar {
  0% { height: 3px; }
  100% { height: 10px; }
}

/* ── Progress Tracker ── */
.side-tracker {
  position: fixed;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tracker-line {
  width: 2px;
  height: 140px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
}

.tracker-fill {
  width: 100%;
  height: 0%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
  transition: height 0.1s linear;
}

.tracker-points {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 140px;
}

.t-dot {
  cursor: pointer;
  opacity: 0.35;
  transition: all 0.3s;
  font-size: 11px;
  font-family: var(--font-title);
  color: var(--ivory);
}

.t-dot.is-active, .t-dot:hover {
  opacity: 1;
  color: var(--gold-bright);
  transform: scale(1.3);
}

/* ── Story Wrapper & Layout BD ── */
.story-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px 120px;
}

.section-block {
  margin-bottom: 160px;
}

/* ── Hero Cover & Titre Blockbuster A 6AM TALE ── */
.hero-cover {
  min-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  perspective: 1200px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transform-style: preserve-3d;
}

.hero-pretitle {
  font-family: var(--font-comic);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--gold-bright);
  text-transform: uppercase;
  will-change: transform, opacity;
}

.main-comic-title {
  font-family: var(--font-title);
  font-size: clamp(3.8rem, 12vw, 10.5rem);
  font-weight: normal;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  text-transform: uppercase;
  line-height: 0.95;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.15em;
  perspective: 1000px;
  will-change: transform, filter;
  text-shadow: 0 0 45px var(--gold-glow), 0 15px 50px rgba(0, 0, 0, 0.9);
}

.main-comic-title .hero-char {
  display: inline-block;
  transform-origin: 50% 100%;
  will-change: transform, opacity, filter;
}

.main-comic-title .hero-space {
  display: inline-block;
  width: 0.35em;
}

.hero-badge {
  background: #ffffff;
  color: #000000;
  border: var(--comic-border);
  box-shadow: 6px 6px 0px #000000;
  padding: 10px 28px;
  font-family: var(--font-comic);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  will-change: transform, opacity;
}

.hero-scroll-cue {
  margin-top: 40px;
  font-family: var(--font-comic);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.scroll-arrow {
  width: 2px;
  height: 36px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: pulse-arrow 1.8s infinite;
}

@keyframes pulse-arrow {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.1% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Titres Dorés des Chapitres ── */
.chapter-gold-header {
  margin-bottom: 36px;
  position: relative;
  z-index: 5;
}

.chapter-gold-header.center-gold {
  text-align: center;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

.roman-num {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  color: var(--gold-bright);
  display: block;
  margin-bottom: 4px;
  text-shadow: 0 0 20px var(--gold-glow);
}

.gold-title {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 5.5vw, 4.6rem);
  font-weight: normal;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  text-transform: uppercase;
  line-height: 1.05;
  text-shadow: 0 0 35px var(--gold-glow);
  margin-bottom: 12px;
}

.gold-subtitle {
  font-family: var(--font-comic);
  font-size: clamp(12px, 1.4vw, 15px);
  color: var(--ivory);
  letter-spacing: 0.05em;
  line-height: 1.5;
  max-width: 680px;
  text-transform: uppercase;
}

.gold-desc {
  font-family: var(--font-comic);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.6;
  text-transform: uppercase;
}

/* ── Story Wrapper & Layout BD ── */
.story-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 0;
  margin: 0;
}

/* Enchaînement des vidéos avec fines bordures et espaces noirs de séparation BD */
.comic-chapter {
  position: relative;
  width: 100%;
  min-height: auto;
  margin-bottom: 75px; /* Découpe noire entre les actes */
  border-bottom: 12px solid #000000;
}

.chapter-inner-sticky {
  position: relative;
  width: 100vw;
  height: auto;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Panels Vidéo Plein Écran & Super Zoom Sans Aucune Coupe ── */
.comic-panel.panel-fullscreen {
  position: relative;
  width: 100vw;
  height: auto;
  min-height: 100vh;
  border: none;
  box-shadow: none;
  background: #000000;
  overflow: visible;
  z-index: 1;
  display: block;
}

.comic-panel.panel-fullscreen .panel-border {
  width: 100vw;
  height: auto;
  position: relative;
  display: block;
}

.comic-panel.panel-fullscreen .comic-video {
  width: 100vw !important;
  height: auto !important;
  min-width: 100vw !important;
  max-width: 100vw !important;
  display: block;
  pointer-events: none;
  background: #000000;
}

/* Suppression complète de tout masque ou filtre assombrissant */
.video-cinema-fade,
.video-overlay-glow,
.panel-ink-shadow {
  display: none !important;
}

/* ── DISPOSITION EN INSERTS COMPACTS (SEULEMENT VIDÉO 11 & VIDÉO 66) ── */
.chapter-stagger-section {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 24px;
  margin-bottom: 75px;
  border-bottom: 12px solid #000000;
  position: relative;
}

.stagger-layout-wrap {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.stagger-layout-wrap .stagger-video-box {
  order: 2;
  justify-self: end;
}

.stagger-layout-wrap .stagger-text-box {
  order: 1;
  justify-self: start;
}

/* Panneau de vidéo pour les inserts 11 et 66 */
.stagger-video-box .comic-panel {
  position: relative;
  width: clamp(280px, 36vw, 480px);
  aspect-ratio: 1 / 1;
  border: var(--comic-border);
  box-shadow: 8px 8px 0px #000000;
  background: #000000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stagger-video-box .comic-panel .comic-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stagger-video-box .comic-panel.square-format {
  width: clamp(280px, 36vw, 480px);
  aspect-ratio: 1 / 1;
  max-height: 60vh;
}

.stagger-text-box {
  width: 100%;
  max-width: 520px;
}

/* ── Calques Flottants des 3 Carrés Blancs Disséminés dans l'Espace Vidéo ── */
.comic-triptych-flow {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.comic-triptych-flow > * {
  pointer-events: auto;
}

/* Positionnement disséminé sur toute la fresque vidéo */
.flow-box-top {
  position: absolute;
  top: 6%;
  left: 6%;
  width: clamp(300px, 38vw, 500px);
}

.flow-box-mid {
  position: absolute;
  top: 45%;
  right: 6%;
  width: clamp(300px, 38vw, 500px);
}

.flow-box-bottom {
  position: absolute;
  bottom: 8%;
  left: 8%;
  width: clamp(300px, 40vw, 520px);
}

/* ── CARACTÉRISTIQUE UNIQUE : TOUS LES TEXTES EN CARRÉS BLANCS DE BD ── */
.comic-card-box {
  background: #ffffff !important;
  color: #000000 !important;
  border: var(--comic-border);
  box-shadow: 6px 6px 0px #000000;
  font-family: var(--font-comic);
  text-transform: uppercase;
  padding: 22px 28px;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  position: relative;
  will-change: transform, opacity;
}

.comic-card-box:last-child {
  margin-bottom: 0;
}

.comic-card-box .box-num {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 18px;
  color: #000000;
  margin-bottom: 6px;
}

.comic-card-box p {
  margin: 0;
  color: #000000 !important;
}

/* Header de Titre Animé */
.chapter-title-sticky-header {
  position: sticky;
  top: 90px;
  z-index: 6;
  pointer-events: none;
  padding: 0 40px;
  max-width: 1300px;
  margin: 0 auto;
}

.gold-title-reveal {
  display: inline-block;
  overflow: hidden;
}

.top-left-content {
  align-self: flex-start;
  max-width: 700px;
}

.bottom-right-content {
  align-self: flex-end;
  margin-top: auto;
  max-width: 550px;
}

.center-overlay-content {
  align-self: center;
  text-align: center;
  max-width: 850px;
}

/* ── DA UNIFIÉE : TOUTES LES BULLES CARRÉES DE BD EN ARIAL BLACK ── */
.comic-cartridge,
.comic-box.box-quote,
.floating-caption,
.floating-bubble,
.gold-manifesto-box {
  background: #ffffff;
  color: #000000;
  border: var(--comic-border);
  box-shadow: 6px 6px 0px #000000;
  font-family: var(--font-comic);
  text-transform: uppercase;
}

.comic-cartridge {
  padding: 32px 36px;
  position: relative;
  z-index: 5;
}

.comic-cartridge.black-card {
  background: #ffffff;
  color: #000000;
  border: var(--comic-border);
  box-shadow: 6px 6px 0px #000000;
}

.cartridge-header {
  border-bottom: 2px solid #000000;
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.c-num {
  font-family: var(--font-title);
  font-size: 22px;
  color: #000000;
}

.c-title {
  font-family: var(--font-title);
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  font-weight: normal;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #000000;
}

.cartridge-body {
  font-family: var(--font-comic);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.cartridge-body p {
  margin-bottom: 12px;
}

.cartridge-body p:last-child {
  margin-bottom: 0;
}

.bold-lead {
  font-size: 14px;
  color: #000000;
}

.comic-box.box-quote {
  padding: 26px 30px;
}

.box-tag {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #000000;
  display: block;
  margin-bottom: 8px;
  opacity: 0.7;
}

.box-text {
  font-size: 13px;
  line-height: 1.6;
  color: #000000;
}

.punch-callout {
  background: #000000;
  color: #ffffff;
  font-family: var(--font-comic);
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  margin: 14px 0;
  text-align: center;
}

.percent-stamp {
  font-family: var(--font-comic);
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  color: #000000;
  letter-spacing: 0.04em;
  margin: 12px 0;
}

.highlight-amber {
  color: #000000;
}

/* ── Bulles & Captions Flottantes (DA Uniforme) ── */
.floating-caption {
  position: absolute;
  bottom: 24px;
  left: 24px;
  max-width: 440px;
  padding: 14px 18px;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  z-index: 5;
}

.floating-bubble {
  position: absolute;
  top: 30px;
  left: 30px;
  padding: 10px 18px;
  font-size: 12px;
  letter-spacing: 0.02em;
  z-index: 5;
}

.gold-manifesto-box {
  padding: 24px 32px;
  margin-top: 24px;
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.chapter-content-centered {
  max-width: 800px;
  margin: 40px auto 0;
}

/* ── FOOTER OUTRO & CALL TO ACTION (Sous la dernière vidéo) ── */
.site-outro-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  background: #000000;
  padding: 100px 24px 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 12px solid #000000;
}

.footer-container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.outro-title {
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  font-weight: normal;
  letter-spacing: 0.05em;
  color: var(--gold-bright);
  text-shadow: 0 0 35px var(--gold-glow);
  margin-bottom: 16px;
}

.outro-sub {
  font-family: var(--font-comic);
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.cta-action {
  margin-bottom: 60px;
}

.comic-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  color: #000000;
  text-decoration: none;
  font-family: var(--font-comic);
  font-size: 15px;
  letter-spacing: 0.1em;
  padding: 18px 48px;
  border: var(--comic-border);
  box-shadow: 6px 6px 0px var(--gold);
  transition: all 0.25s;
  cursor: pointer;
}

.comic-cta-button:hover {
  background: var(--gold-bright);
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0px #000000;
}

.footer-sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0.7;
}

.footer-logo {
  height: 26px;
  width: auto;
}

.footer-sign p {
  font-family: var(--font-comic);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

/* ── Responsive Mobile & Tablette ── */
@media (max-width: 992px) {
  .comic-header {
    padding: 16px 20px;
  }
  .header-center-tag {
    display: none;
  }
  .side-tracker {
    display: none;
  }
  .story-wrapper {
    padding: 0;
  }
  
  .flow-box-top {
    top: 4%;
    left: 4%;
    width: 92%;
    max-width: 92%;
  }

  .flow-box-mid {
    top: 42%;
    right: 4%;
    left: 4%;
    width: 92%;
    max-width: 92%;
  }

  .flow-box-bottom {
    bottom: 4%;
    left: 4%;
    width: 92%;
    max-width: 92%;
  }

  .comic-card-box {
    padding: 16px 20px;
    font-size: 11.5px;
    box-shadow: 4px 4px 0px #000000;
  }

  .chapter-gold-header .gold-title {
    font-size: clamp(1.6rem, 6.5vw, 2.5rem);
  }

  .stagger-layout-wrap {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .stagger-video-box .comic-panel,
  .stagger-video-box .comic-panel.square-format {
    width: 100%;
    max-height: 50vh;
  }
}
