/* ═══════════════════════════════════════════
   NOTRE HISTOIRE — Chronique Éditoriale
   Style Patek / Magazine premium
   ═══════════════════════════════════════════ */

/* ── PAGE BODY ── */
.page-histoire {
  background: var(--cream);
}

/* ═══ HERO FULL-SCREEN (style homepage) ═══ */
.histoire-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--blue-dark);
  overflow: hidden;
}
.histoire-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.histoire-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) saturate(0.65);
}
.histoire-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(7,30,45,0.1) 0%, rgba(7,30,45,0.5) 100%),
    linear-gradient(to bottom, rgba(7,30,45,0.35) 0%, transparent 25%, transparent 75%, rgba(7,30,45,0.45) 100%);
}
.histoire-hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
}
.histoire-hero-overline {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: histoireFadeUp 1s var(--ease-out) 0.1s forwards;
}
.histoire-hero-title {
  margin-bottom: 2rem;
}
.histoire-hero-title .hero-line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(30px);
  animation: histoireFadeUp 1.4s var(--ease-out) forwards;
}
.histoire-hero-title .hero-line:nth-child(2) {
  animation-delay: 0.25s;
}
.histoire-hero-title .hero-line--em em {
  font-style: italic;
  color: var(--blue-light);
}
.histoire-hero-content .hero-baseline {
  opacity: 0;
  transform: translateY(20px);
  animation: histoireFadeUp 1s 0.5s var(--ease-out) forwards;
}
.histoire-hero-content .hero-baseline span {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  font-style: italic;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  padding: 0.8rem 2.5rem;
  border-top: 1px solid rgba(168,216,234,0.2);
  border-bottom: 1px solid rgba(168,216,234,0.2);
}

@keyframes histoireFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ═══ CHRONIQUE — Chapitres en quinconce ═══ */
.chronique {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2.5rem 2rem;
}

/* Ligne verticale centrale (desktop) */
.chronique::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(168,216,234,0.2) 8%,
    rgba(168,216,234,0.2) 92%,
    transparent 100%
  );
  transform: translateX(-50%);
}

/* ── CHAPITRE ── */
.chapitre {
  position: relative;
  margin-bottom: 6rem;
}
.chapitre:last-child {
  margin-bottom: 2rem;
}
.chapitre-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.chapitre-media {
  position: relative;
  z-index: 1;
}
.chapitre-text {
  position: relative;
  z-index: 1;
  padding: 1rem 0;
}

/* Inversé : photo à droite, texte à gauche */
.chapitre--reverse .chapitre-inner {
  direction: rtl;
}
.chapitre--reverse .chapitre-inner > * {
  direction: ltr;
}

/* ── IMAGE ── */
.chapitre-img-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 12px 50px rgba(7,30,45,0.1);
}
.chapitre-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.chapitre:hover .chapitre-img-wrap img {
  transform: scale(1.04);
}

/* Placeholder pour photos manquantes */
.chapitre-img-wrap--placeholder {
  background: linear-gradient(145deg, rgba(168,216,234,0.08), rgba(12,61,87,0.04));
  border: 1px dashed rgba(168,216,234,0.2);
}
.chapitre-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 0.8rem;
  color: var(--blue-light);
  opacity: 0.4;
}
.chapitre-placeholder span {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── DATE (grosse, affirmée) ── */
.chapitre-date {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--blue-ink);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: 0.6rem;
}

.chapitre-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 300;
  color: var(--blue-ink);
  line-height: 1.15;
  margin-bottom: 1.2rem;
}
.chapitre-body {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--grey-text);
  line-height: 1.9;
}
.chapitre-body sup {
  font-size: 0.65em;
}

/* Dot sur la ligne centrale */
.chapitre::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--blue-light);
  transform: translate(-50%, -50%);
  z-index: 2;
  opacity: 0.5;
  transition: opacity 0.6s, border-color 0.6s, background 0.6s;
}
.chapitre.visible::after {
  opacity: 1;
  border-color: var(--blue-mid);
  background: var(--blue-mid);
}

/* ═══ L'AVENIR — Section finale full-screen ═══ */
.avenir {
  position: relative;
  height: 70vh;
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 4rem;
}
.avenir-bg {
  position: absolute;
  inset: 0;
}
.avenir-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3) saturate(0.6);
  transition: transform 10s linear;
}
.avenir.visible .avenir-bg img {
  transform: scale(1.06);
}
.avenir-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(7,30,45,0.2) 0%, rgba(7,30,45,0.6) 100%),
    linear-gradient(to top, rgba(7,30,45,0.5) 0%, transparent 40%);
}
.avenir-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 620px;
  padding: 2rem;
}
.avenir-overline {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 1rem;
  opacity: 0.7;
}
.avenir-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1.2rem;
}
.avenir-title em {
  font-style: italic;
  color: var(--blue-light);
}
.avenir-text {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.85;
  margin-bottom: 2rem;
}

/* ═══ REVEAL — Chapitres ═══ */
.chapitre.reveal .chapitre-media {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.9s var(--ease-out) 0.15s, transform 0.9s var(--ease-out) 0.15s;
}
.chapitre.reveal .chapitre-text {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.9s var(--ease-out) 0.35s, transform 0.9s var(--ease-out) 0.35s;
}
.chapitre--reverse.reveal .chapitre-media {
  transform: translateX(30px);
}

.chapitre.reveal.visible .chapitre-media,
.chapitre.reveal.visible .chapitre-text {
  opacity: 1;
  transform: translate(0);
}

/* Override base .reveal — chapitres gèrent le reveal par enfant */
.chapitre.reveal {
  opacity: 1;
  transform: none;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
  .chronique {
    padding: 4rem 2rem 1rem;
  }
  .chapitre-inner {
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .histoire-hero {
    min-height: 500px;
  }
  .histoire-hero-title .hero-line {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .chronique::before {
    display: none;
  }
  .chapitre::after {
    display: none;
  }

  .chronique {
    padding: 3rem 1.5rem 0;
  }
  .chapitre {
    margin-bottom: 4rem;
  }
  .chapitre-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .chapitre--reverse .chapitre-inner {
    direction: ltr;
  }

  .chapitre-img-wrap {
    aspect-ratio: 16/10;
  }
  .chapitre-date {
    font-size: 2.2rem;
  }

  .chapitre.reveal .chapitre-media,
  .chapitre--reverse.reveal .chapitre-media {
    transform: translateY(20px);
  }

  .avenir {
    height: 55vh;
    margin-top: 2rem;
  }
  .avenir-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
}

@media (max-width: 480px) {
  .histoire-hero {
    min-height: 450px;
  }
  .chapitre-title {
    font-size: 1.4rem;
  }
  .chapitre-body {
    font-size: 0.88rem;
  }
  .avenir {
    height: 50vh;
    min-height: 380px;
  }
}
