/* =========================================================
   FCDM - Nouvelle ligne du temps biblique
   Fichier à placer à côté de style.css
   ========================================================= */

html {
  scroll-behavior: smooth;
}

.timeline-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(4, 12, 22, 0.82), rgba(4, 12, 22, 0.94)),
    url("assets/photos/1464822759023-fed622ff2c3b-w1920.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fff;
  overflow-x: hidden;
}

.timeline-hero {
  min-height: 82vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 20px;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.18), rgba(0,0,0,.75)),
    url("assets/photos/1500382017468-9049fed747ef-w1920.webp");
  background-size: cover;
  background-position: center;
}

.timeline-hero__content {
  max-width: 1100px;
}

.timeline-kicker {
  display: inline-block;
  margin-bottom: 18px;
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  letter-spacing: 4px;
  font-weight: 800;
  text-transform: uppercase;
}

.timeline-hero h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1.05;
  margin: 0;
  color: #ffffff !important;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.75);
}

.timeline-hero p {
  margin-top: 24px;
  font-size: clamp(1.15rem, 2.5vw, 1.65rem);
  color: rgba(255, 255, 255, 0.92) !important;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.75);
}

.timeline-kicker {
  color: #ffffff !important;
}

.timeline-nav {
  position: sticky;
  top: 72px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(7, 18, 32, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.timeline-nav__toggle {
  display: none;
  width: min(420px, 100%);
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(142, 230, 255, 0.35);
  border-radius: 14px;
  padding: 0.85rem 1.15rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.timeline-nav__toggle:hover,
.timeline-nav__toggle:focus-visible {
  background: rgba(142, 230, 255, 0.14);
  border-color: rgba(142, 230, 255, 0.55);
  outline: none;
  box-shadow: 0 0 0 3px rgba(142, 230, 255, 0.18);
}

.timeline-nav__toggle span {
  font-size: 1.1rem;
  opacity: 0.85;
  transition: transform 0.22s ease;
}

.timeline-nav.is-open .timeline-nav__toggle span {
  transform: rotate(180deg);
}

.timeline-nav__links {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1200px;
}

.timeline-nav__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.55rem 1rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: clamp(0.92rem, 1.2vw, 1.02rem);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.timeline-nav__links a:hover,
.timeline-nav__links a:focus-visible {
  color: #0a1520 !important;
  background: #8ee6ff;
  border-color: #8ee6ff;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(142, 230, 255, 0.28);
  outline: none;
}

.timeline-nav__links a:active {
  transform: translateY(0);
  box-shadow: none;
}

.timeline-nav__links a.is-active {
  color: #fff !important;
  background: rgba(201, 162, 39, 0.22);
  border-color: rgba(216, 180, 95, 0.65);
  box-shadow: inset 0 0 0 1px rgba(216, 180, 95, 0.35);
}

.timeline-modern {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
  padding: 90px 0 140px;
}

.timeline-modern::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(to bottom, #ffffff, #8ee6ff, #d8b45f, #ffffff);
  box-shadow: 0 0 28px rgba(142,230,255,.8);
}

.timeline-chapter {
  position: relative;
  z-index: 2;
  margin: 90px auto 70px;
  padding: 0 20px;
}

.timeline-chapter__inner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(850px, 100%);
  margin: auto;
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.25rem, 3vw, 2rem);
  text-align: center;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(12, 28, 50, 0.94), rgba(8, 18, 34, 0.96));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

/* Photo de fond + voile sombre pour garder le texte lisible */
.timeline-chapter__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--chapter-photo, none);
  background-size: cover;
  background-position: center;
  opacity: 0.58;
  transform: scale(1.03);
}

.timeline-chapter__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(8, 18, 34, 0.68) 0%,
    rgba(12, 28, 50, 0.52) 45%,
    rgba(8, 18, 34, 0.72) 100%
  );
}

.timeline-chapter__inner > * {
  position: relative;
  z-index: 2;
}

/* Images par section de la timeline */
#chapter-0 .timeline-chapter__inner {
  --chapter-photo: url("assets/photos/1441974231531-c6227db76b6e-w1200.webp");
}

#chapter-4 .timeline-chapter__inner {
  --chapter-photo: url("assets/photos/1505142468610-359e7d316be0-w1200.webp");
}

#chapter-9 .timeline-chapter__inner {
  --chapter-photo: url("assets/photos/1500382017468-9049fed747ef-w1200.webp");
}

#chapter-28 .timeline-chapter__inner {
  --chapter-photo: url("img/title2.webp");
}

#chapter-55 .timeline-chapter__inner {
  --chapter-photo: url("img/pexels-eberhardgross-1624496.webp");
}

#chapter-71 .timeline-chapter__inner {
  --chapter-photo: url("assets/photos/1470071459604-3b5ec3a7fe05-w1200.webp");
}

#chapter-84 .timeline-chapter__inner {
  --chapter-photo: url("img/title.webp");
}

#chapter-117 .timeline-chapter__inner {
  --chapter-photo: url("img/date1.webp");
}

#chapter-146 .timeline-chapter__inner {
  --chapter-photo: url("img/timeline1.webp");
}

#chapter-181 .timeline-chapter__inner {
  --chapter-photo: url("assets/photos/1464822759023-fed622ff2c3b-w1200.webp");
}

#chapter-199 .timeline-chapter__inner {
  --chapter-photo: url("img/madison-bracaglia-fcWAwPKpkTU-unsplash.webp");
}

#chapter-206 .timeline-chapter__inner {
  --chapter-photo: url("assets/photos/1480714378408-67cf0d13bc1b-w1200.webp");
}

#chapter-274 .timeline-chapter__inner {
  --chapter-photo: url("img/5.webp");
}

#chapter-275 .timeline-chapter__inner {
  --chapter-photo: url("img/sky-clouds-cinematic-clouds-wallpaper-7.webp");
}

#chapter-280 .timeline-chapter__inner,
#chapter-284 .timeline-chapter__inner {
  --chapter-photo: url("img/date1.webp");
}

#chapter-306 .timeline-chapter__inner {
  --chapter-photo: url("assets/photos/1464822759023-fed622ff2c3b-w1200.webp");
}

#chapter-310 .timeline-chapter__inner {
  --chapter-photo: url("assets/photos/1500382017468-9049fed747ef-w1200.webp");
}

.timeline-chapter__inner,
.timeline-chapter__inner p,
.timeline-chapter__inner strong,
.timeline-chapter__inner span {
  color: #ffffff !important;
}

.timeline-chapter__inner p,
.timeline-chapter__inner strong {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 4px 18px rgba(0, 0, 0, 0.75);
}

.timeline-chapter p {
  margin: 8px 0;
  font-size: clamp(1.2rem, 2.5vw, 1.85rem);
  line-height: 1.35;
  color: #ffffff !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.75);
}

.timeline-event {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr);
  align-items: start;
  gap: 0;
  margin: 0 0 58px;
}

.timeline-marker {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: 28px;
  height: 28px;
  margin-top: 38px;
  border-radius: 50%;
  background: #fff;
  border: 6px solid #8ee6ff;
  box-shadow: 0 0 24px #8ee6ff, 0 0 0 9px rgba(142,230,255,.14);
  z-index: 3;
}

.timeline-date {
  padding-top: 24px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1;
  color: #ffffff !important;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.85);
  z-index: 2;
}

.timeline-card {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  color: #1c2836;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.timeline-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, #8ee6ff, #d8b45f, #fff0b8);
}

.timeline-card__toggle {
  display: none;
  position: relative;
  z-index: 1;
}

.timeline-card__content {
  position: relative;
  z-index: 1;
  padding: 32px;
}

/* Illustration contextuelle colorée (coin bas-droit) */
.timeline-card[data-decor]::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: clamp(56px, 15vw, 82px);
  height: clamp(56px, 15vw, 82px);
  opacity: 0.17;
  pointer-events: none;
  z-index: 0;
  background: center / contain no-repeat;
  filter: drop-shadow(0 2px 6px rgba(26, 54, 93, 0.08));
}

.timeline-card[data-decor="creation"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='11' fill='%23f5c842'/%3E%3Cpath d='M32 6v10M32 48v10M6 32h10M48 32h10M14 14l7 7M43 43l7 7M14 50l7-7M43 21l7-7' stroke='%23e8913a' stroke-width='2.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

.timeline-card[data-decor="flood"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M6 40c6-4 10-4 16 0s10 4 16 0 10-4 16 0 10 4 16 0' fill='%234fc3f7' opacity='.55'/%3E%3Cpath d='M6 50c6-4 10-4 16 0s10 4 16 0 10-4 16 0 10 4 16 0' fill='%232563eb' opacity='.65'/%3E%3Cpath d='M24 16a8 8 0 0116 0' fill='%23cbd5e1'/%3E%3Cpath d='M32 14v8M28 18h8' stroke='%2394a3b8' stroke-width='2'/%3E%3C/svg%3E");
}

.timeline-card[data-decor="covenant"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 8l4 12h12l-10 8 4 12-10-8-10 8 4-12-10-8h12z' fill='%23f0c040' stroke='%23c9a227' stroke-width='1.5'/%3E%3C/svg%3E");
}

.timeline-card[data-decor="temple"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M8 28L32 12l24 16' fill='%23e8c56a' stroke='%23c9a227' stroke-width='1.5'/%3E%3Cpath d='M14 28v24h36V28' fill='%23f5e6c8' stroke='%23b8860b' stroke-width='1.5'/%3E%3Cpath d='M26 52V36h12v16' fill='%23d4a853'/%3E%3C/svg%3E");
}

.timeline-card[data-decor="cross"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='28' y='10' width='8' height='44' rx='2' fill='%23c0392b'/%3E%3Crect x='18' y='24' width='28' height='8' rx='2' fill='%23b91c1c'/%3E%3Ccircle cx='32' cy='32' r='20' fill='none' stroke='%23c9a227' stroke-width='1.5' opacity='.6'/%3E%3C/svg%3E");
}

.timeline-card[data-decor="dove"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M10 36c8-10 18-14 28-10 4 8 0 18-10 22-6 2-12 0-18-4' fill='%23e0f2fe' stroke='%2338bdf8' stroke-width='1.8'/%3E%3Cpath d='M38 26l8-6 4 8' fill='%23bae6fd' stroke='%230ea5e9' stroke-width='1.5'/%3E%3Ccircle cx='42' cy='28' r='2' fill='%231a365d'/%3E%3C/svg%3E");
}

.timeline-card[data-decor="scroll"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M18 12h22a6 6 0 016 6v34a6 6 0 01-6 6H18a6 6 0 01-6-6V18a6 6 0 016-6z' fill='%23f5e6c8' stroke='%23c9a227' stroke-width='1.5'/%3E%3Cpath d='M22 22h16M22 32h16M22 42h10' stroke='%23b8860b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.timeline-card[data-decor="crown"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M10 44h44' stroke='%23b8860b' stroke-width='2'/%3E%3Cpath d='M14 44l6-22 12 14 12-14 6 22' fill='%23f0c040' stroke='%23c9a227' stroke-width='1.5'/%3E%3Cpath d='M18 44v6h28v-6' fill='%23d4a853'/%3E%3Ccircle cx='20' cy='22' r='3' fill='%23e74c3c'/%3E%3Ccircle cx='32' cy='16' r='3' fill='%233498db'/%3E%3Ccircle cx='44' cy='22' r='3' fill='%232ecc71'/%3E%3C/svg%3E");
}

.timeline-card[data-decor="olive"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M12 48c8-16 20-24 32-20 4 10-2 22-14 26' fill='%2386b87f' stroke='%2352a675' stroke-width='1.8'/%3E%3Cellipse cx='34' cy='22' rx='6' ry='10' fill='%2352a675'/%3E%3Cellipse cx='42' cy='28' rx='5' ry='8' fill='%236ab07a'/%3E%3Cpath d='M12 48h36' stroke='%234a7c59' stroke-width='2'/%3E%3C/svg%3E");
}

.timeline-card[data-decor="time"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='34' r='18' fill='%23eff6ff' stroke='%233b82f6' stroke-width='2'/%3E%3Cpath d='M32 34V22M32 10v4' stroke='%231a365d' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M32 22l8 6' stroke='%23c9a227' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

@media (max-width: 900px) {
  .timeline-card[data-decor]::after {
    opacity: 0.13;
    width: 50px;
    height: 50px;
  }
}

.timeline-card h1,
.timeline-card h2,
.timeline-card h3,
.timeline-card h4,
.timeline-card h5 {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: #1a365d !important;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 18px;
  text-shadow: none;
}

.timeline-card p,
.timeline-card li,
.timeline-card span:not(.timeline-card__icon) {
  color: #334155 !important;
  font-size: clamp(1rem, 1.45vw, 1.15rem);
  line-height: 1.75;
  text-shadow: none;
}

.timeline-card p {
  margin-bottom: 14px;
}

.timeline-card strong {
  color: #1a365d !important;
  font-weight: 700;
}

.timeline-card .fst-italic {
  padding: 0.75rem 0 0.75rem 1rem;
  border-left: 3px solid #c9a227;
  color: #475569 !important;
  background: #f8f6f2;
  border-radius: 0 8px 8px 0;
}

.timeline-card .text-decoration-underline {
  color: #1a365d !important;
  font-weight: 700;
  text-decoration-color: #c9a227 !important;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.timeline-event:nth-of-type(odd) .timeline-date {
  grid-column: 1;
  text-align: right;
  padding-right: 30px;
}

.timeline-event:nth-of-type(odd) .timeline-card {
  grid-column: 3;
}

.timeline-event:nth-of-type(even) .timeline-date {
  grid-column: 3;
  text-align: left;
  padding-left: 30px;
}

.timeline-event:nth-of-type(even) .timeline-card {
  grid-column: 1;
  grid-row: 1;
}

#go-to-top-button {
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: #0b7285;
  color: #fff;
  font-size: 30px;
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
  transition: opacity .25s ease, transform .25s ease;
}

#go-to-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
}

#go-to-top-button:hover {
  transform: translateY(-4px);
}

@media (min-width: 901px) {
  .timeline-card__toggle {
    display: none !important;
  }

  .timeline-card__content {
    display: block !important;
  }
}

@media (max-width: 900px) {
  .timeline-page {
    background-attachment: scroll;
  }

  .timeline-modern {
    width: min(100% - 22px, 760px);
    padding-top: 60px;
  }

  .timeline-modern::before {
    left: 28px;
  }

  .timeline-event {
    grid-template-columns: 56px minmax(0, 1fr);
    margin-bottom: 32px;
  }

  .timeline-marker {
    grid-column: 1;
    width: 24px;
    height: 24px;
    margin-top: 34px;
  }

  .timeline-event:nth-of-type(odd) .timeline-date,
  .timeline-event:nth-of-type(even) .timeline-date {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    padding: 18px 0 10px;
  }

  .timeline-event:nth-of-type(odd) .timeline-card,
  .timeline-event:nth-of-type(even) .timeline-card {
    grid-column: 2;
    grid-row: 2;
  }

  .timeline-card__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    border: 0;
    padding: 1.1rem 1.15rem;
    background: #ffffff;
    cursor: pointer;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.05rem, 4vw, 1.25rem);
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
  }

  .timeline-card__toggle span:first-child {
    flex: 1;
    color: #1a365d !important;
  }

  .timeline-card__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: #1a365d;
    color: #ffffff !important;
    font-family: "Source Sans 3", system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
    transition: transform 0.28s ease, background 0.28s ease;
  }

  .timeline-card.is-open .timeline-card__icon {
    transform: rotate(45deg);
    background: #c9a227;
  }

  .timeline-card__content {
    display: none;
    padding: 0 1.15rem 1.35rem;
    border-top: 1px solid rgba(26, 54, 93, 0.1);
  }

  .timeline-card.is-open .timeline-card__content {
    display: block;
  }

  /* Titre déjà visible dans le bouton d'ouverture */
  .timeline-card__content > h4:first-child {
    display: none;
  }

  .timeline-card h1,
  .timeline-card h2,
  .timeline-card h3,
  .timeline-card h4,
  .timeline-card h5 {
    font-size: 1.35rem;
  }

  .timeline-card p,
  .timeline-card li {
    font-size: 1rem;
  }
}

@media (max-width: 900px) {
  .timeline-nav {
    display: block;
    padding: 12px;
  }

  .timeline-nav__toggle {
    display: flex;
  }

  .timeline-nav__links {
    display: none;
    width: min(560px, 100%);
    margin: 12px auto 0;
    padding: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: min(55vh, 420px);
    overflow: auto;
    border-radius: 16px;
    background: rgba(10, 21, 32, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
    scrollbar-width: thin;
    scrollbar-color: rgba(142, 230, 255, 0.45) transparent;
  }

  .timeline-nav.is-open .timeline-nav__links {
    display: grid;
  }

  .timeline-nav__links a {
    white-space: normal;
    text-align: center;
    font-size: 0.98rem;
    padding: 0.75rem 0.65rem;
    min-height: 44px;
  }
}

@media (max-width: 560px) {
  .timeline-hero {
    min-height: 68vh;
  }

  .timeline-chapter__inner::before {
    opacity: 0.50;
  }

  .timeline-chapter__inner {
    padding: 1.5rem 1.15rem;
    border-radius: 22px;
  }

  .timeline-date {
    font-size: 2rem;
  }

  .timeline-card {
    border-radius: 20px;
  }
}

@media (max-width: 520px) {
  .timeline-nav__links {
    grid-template-columns: 1fr;
  }
}

/* Correctifs v3 : hero plus lisible + conclusion */
.timeline-hero__content {
  padding: clamp(1.4rem, 4vw, 3rem);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(5,13,24,.42), rgba(5,13,24,.70));
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 30px 90px rgba(0,0,0,.38);
  backdrop-filter: blur(4px);
}

.timeline-hero h1 {
  color: #fff;
  text-shadow:
    0 3px 0 rgba(0,0,0,.35),
    0 12px 35px rgba(0,0,0,.92),
    0 0 55px rgba(120,217,255,.35);
}

.timeline-event--final .timeline-date {
  color: #ffe8a3;
  text-shadow: 0 0 25px rgba(255,232,163,.55), 0 8px 24px rgba(0,0,0,.9);
}

.timeline-card--final {
  background: linear-gradient(135deg, #fffef8, #fff8e6) !important;
  border: 1px solid rgba(201, 162, 39, 0.45);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.38);
}

.timeline-card--final .timeline-card__toggle,
.timeline-card--final .timeline-card__toggle span:first-child {
  color: #7a4c00 !important;
}

.timeline-card--final h1,
.timeline-card--final h2,
.timeline-card--final h3,
.timeline-card--final h4,
.timeline-card--final p,
.timeline-card--final strong {
  color: #5c3d00 !important;
}

.timeline-card--final .timeline-card__content p {
  text-align: center;
}


/* =========================================================
   Ajustements timeline v4
   ========================================================= */
.timeline-chapter__inner p:first-child,
.timeline-chapter__inner p:nth-child(2) {
  font-size: clamp(1.8rem, 4vw, 3rem) !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: #ffffff !important;
}

.timeline-hero__content h1 {
  color: #ffffff !important;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.85) !important;
}


/* =========================================================
   Lisibilité — isolation complète vs style.css global
   ========================================================= */

.page-timeline-full {
  background: #0a1520;
}

/* Zones sombres → texte clair */
.timeline-page .timeline-hero,
.timeline-page .timeline-hero h1,
.timeline-page .timeline-hero p,
.timeline-page .timeline-hero .timeline-kicker,
.timeline-page .timeline-nav,
.timeline-page .timeline-nav__toggle,
.timeline-page .timeline-chapter__inner,
.timeline-page .timeline-chapter__inner p,
.timeline-page .timeline-chapter__inner strong,
.timeline-page .timeline-date {
  color: #ffffff !important;
}

.timeline-page .timeline-nav__links a {
  color: rgba(255, 255, 255, 0.88) !important;
}

.timeline-page .timeline-nav__links a:hover,
.timeline-page .timeline-nav__links a:focus-visible {
  color: #0a1520 !important;
}

.timeline-page .timeline-nav__links a.is-active {
  color: #ffffff !important;
}

/* Cartes blanches → texte sombre (priorité maximale) */
.timeline-page .timeline-card,
.timeline-page .timeline-card .timeline-card__content,
.timeline-page .timeline-card .timeline-card__content p,
.timeline-page .timeline-card .timeline-card__content li,
.timeline-page .timeline-card .timeline-card__content span:not(.timeline-card__icon),
.timeline-page .timeline-card .timeline-card__content h1,
.timeline-page .timeline-card .timeline-card__content h2,
.timeline-page .timeline-card .timeline-card__content h3,
.timeline-page .timeline-card .timeline-card__content h4,
.timeline-page .timeline-card .timeline-card__content h5,
.timeline-page .timeline-card .timeline-card__content strong,
.timeline-page .timeline-card .timeline-card__content .fst-italic,
.timeline-page .timeline-card .timeline-card__content .text-decoration-underline {
  color: #334155 !important;
}

.timeline-page .timeline-card .timeline-card__content h1,
.timeline-page .timeline-card .timeline-card__content h2,
.timeline-page .timeline-card .timeline-card__content h3,
.timeline-page .timeline-card .timeline-card__content h4,
.timeline-page .timeline-card .timeline-card__content h5,
.timeline-page .timeline-card .timeline-card__content strong,
.timeline-page .timeline-card .timeline-card__content .text-decoration-underline {
  color: #1a365d !important;
}

.timeline-page .timeline-card .timeline-card__content .fst-italic {
  color: #475569 !important;
}

.timeline-page .timeline-card .timeline-card__content .underline {
  color: #1a365d !important;
  text-decoration: underline;
  text-decoration-color: #c9a227;
  text-underline-offset: 4px;
}
.timeline-page .timeline-card a {
  color: #2c5282 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.timeline-page .timeline-card a:hover {
  color: #c9a227 !important;
}

/* Sous-titres de chapitre */
.timeline-chapter__inner p:nth-child(3),
.timeline-chapter__inner p:nth-child(n+3) {
  font-size: clamp(1rem, 2vw, 1.25rem) !important;
  font-weight: 500;
  opacity: 0.92;
}


/* =========================================================
   Barre de progression de lecture - timeline complète
   ========================================================= */
.timeline-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10020;
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, .14);
  pointer-events: none;
}

.timeline-reading-progress__bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #8ee6ff, #d8b45f, #fff0b8);
  box-shadow: 0 0 18px rgba(216, 180, 95, .65);
  transition: width .08s linear;
}

@media (max-width: 768px) {
  .timeline-reading-progress {
    height: 4px;
  }
}
