:root {
  /* Palette Pacifique — utilisée par les graphiques ApexCharts de graphiques.html */
  --ocean: #1E4E5A;
  --lagoon: #6FB4C1;
  --lagoon-2: #A9DDE0;
  --sand: #e7d4a5;
  --coral: #E4572E;
  --coral-soft: #F0A58E;
  --ink: #1E4E5A;
  --muted: #4a6066;
  --line: #e7d4a5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 70px;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: #1E4E5A;
}

h2, h3, h4 {
  font-family: 'Playfair Display', serif;
}

a {
  color: inherit;
}

/* ====== BARRE DE PROGRESSION ====== */
.progress-track {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(231, 214, 177, 0.3);
  z-index: 1031;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6FB4C1, #CBA85E);
  transition: width 0.1s linear;
}

/* ====== NAV CHAPITRES (Bootstrap navbar) ====== */
.chapter-nav {
  top: 4px;
  background: #e7d4a5;
  backdrop-filter: blur(6px);
  padding: 0.6rem 1.5rem;
}

.chapter-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #1E4E5A;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  opacity: 0.75;
  padding: 0.25rem 0;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.chapter-nav .nav-link:hover,
.chapter-nav .nav-link:focus-visible,
.chapter-nav .nav-link.active {
  opacity: 1;
  color: #274f56;
}

.chapter-nav .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #1E4E5A;
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.chapter-nav .nav-link:hover .dot,
.chapter-nav .nav-link:focus-visible .dot,
.chapter-nav .nav-link.active .dot {
  background: #CBA85E;
  border-color: #CBA85E;
}

@media (max-width: 640px) {
  .chapter-nav {
    padding: 0.5rem 1rem;
  }
  .chapter-nav .lbl {
    display: none;
  }
}

/* ====== HERO ====== */
.hero {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(160deg, #2f5c64 0%, #274f56 45%, #1e3f45 100%);
  overflow: hidden;
  padding: 6rem 2rem;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  color: #F4EFE3;
}

.hero-subtitle {
  font-family: 'Special Elite', monospace;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: #CBA85E;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.25;
  color: #F4EFE3;
}

.hero-lede {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #E7D6B1;
}

.hero-scroll-hint {
  font-family: 'Special Elite', monospace;
  font-size: 0.9rem;
  color: #6FB4C1;
}

/* ====== PARTIES (commun) ====== */
.part-num {
  font-family: 'Special Elite', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: #1E4E5A;
  opacity: 0.7;
}

.part-title {
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.3;
  color: #1E4E5A;
  margin-bottom: 1rem;
}

.part-lede {
  color: #274f56;
}

.part-intro {
  color: #4a6066;
}

.scene-title {
  font-weight: 600;
  color: #1E4E5A;
  margin-bottom: 1rem;
}

.scene-text p {
  line-height: 1.7;
}

.facts-label {
  font-family: 'Special Elite', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: #1E4E5A;
  opacity: 0.7;
  margin-top: 1.5rem;
}

.facts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.facts li {
  padding: 0.5rem 0;
  border-top: 1px solid rgba(30, 78, 90, 0.15);
}

.facts li span {
  display: block;
  font-size: 0.8rem;
  color: #1E4E5A;
  opacity: 0.65;
}

/* Cartes (graphiques / compteurs) */
.scene-data .card,
.scene-data-full .card {
  background: #FBF8F1;
  border-radius: 1rem;
}

/* Cartes des sous-parties (Partie 1 — Les causes) */
.causes-cards .card {
  background: #FBF8F1;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.causes-cards a.card:hover,
.causes-cards a.card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2rem rgba(30, 78, 90, 0.2) !important;
}

.causes-cards .card-img-top {
  height: 340px;
  object-fit: cover;
}

.card-link-hint {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1E4E5A;
  opacity: 0.75;
}

.causes-cards .card-body {
  padding: 1.25rem;
}

/* Apparition au scroll (profondeur : opacité + ombre) */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  box-shadow: 0 0 0 rgba(30, 78, 90, 0);
  transition: opacity 0.8s ease, box-shadow 0.8s ease;
  will-change: opacity, transform;
}

.scroll-reveal.is-visible {
  opacity: 1;
  box-shadow: 0 1.75rem 3.5rem -1rem rgba(30, 78, 90, 0.35);
}

.chart {
  min-height: 280px;
}

.chart-cap {
  font-weight: 600;
  color: #1E4E5A;
}

.chart-desc {
  color: #4a6066;
  line-height: 1.7;
}

.src {
  font-size: 0.78rem;
  color: #1E4E5A;
  opacity: 0.6;
}

.counter {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2.5rem;
  color: #1E4E5A;
}

.counter--xl {
  font-size: 3.5rem;
}

.counter-cap {
  color: #4a6066;
}

.cyclone-icons {
  font-size: 1.4rem;
  letter-spacing: 0.2rem;
  margin: 0.5rem 0;
}

.ph-scale {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ph-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(111, 180, 193, 0.15);
}

.ph-row--danger {
  background: rgba(203, 168, 94, 0.25);
}

.ph-val {
  font-weight: 700;
  color: #1E4E5A;
}

.ph-lbl {
  color: #4a6066;
}

.quote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: #1E4E5A;
  border-left: 3px solid #CBA85E;
  padding-left: 1rem;
  margin: 0 0 1rem;
}

.quote cite {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-style: normal;
  font-size: 0.85rem;
  color: #6FB4C1;
  margin-top: 0.5rem;
}

/* Statistique pleine largeur */
.big-stat {
  text-align: left;
}

.big-stat h3 {
  font-weight: 600;
  color: #1E4E5A;
}

.overline {
  font-family: 'Special Elite', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: #1E4E5A;
  opacity: 0.7;
}

.scene--accent .big-stat {
  background: #1E4E5A;
  color: #F4EFE3;
  border-radius: 1.25rem;
  padding: 3rem 2.5rem;
}

.scene--accent .big-stat h3,
.scene--accent .overline,
.scene--accent .counter {
  color: #F4EFE3;
  opacity: 1;
}

.scene--accent .src {
  color: #CBA85E;
  opacity: 1;
}

/* Cartes "trio" */
.trio-card {
  background: #FBF8F1;
  border-radius: 1rem;
}

.trio-icon {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.trio-card h4 {
  font-weight: 600;
  color: #1E4E5A;
}

/* Transitions entre parties */
.transition {
  padding: 2rem 0;
  color: #274f56;
  font-style: italic;
}

.transition-strong {
  font-weight: 600;
  font-style: normal;
  margin-top: 0.5rem;
}

/* ====== CARROUSEL — ESPÈCES MENACÉES ====== */
.reef-carousel {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px -34px rgba(8, 46, 56, 0.6);
  border: 1px solid rgba(30, 78, 90, 0.15);
}

.reef-carousel .slide {
  min-height: 440px;
  display: flex;
  width: 100%;
}

.reef-carousel .slide-art {
  position: relative;
  flex: 0 0 42%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.reef-carousel .slide-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reef-carousel .slide-body {
  flex: 1 1 auto;
  background: #FBF8F1;
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.reef-carousel .country {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 7px;
  font-family: 'Special Elite', monospace;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: #1E4E5A;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.reef-carousel .country::before {
  content: "";
  width: 22px;
  height: 2px;
  background: #71c1c4;
  border-radius: 2px;
}

.reef-carousel .slide-body h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 32px);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  color: #1E4E5A;
}

.reef-carousel .sci {
  font-style: italic;
  color: #4a6066;
  font-size: 15px;
  margin-bottom: 16px;
}

.reef-carousel .status {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.reef-carousel .status.en {
  background: rgba(228, 87, 46, 0.12);
  color: #c23b1e;
}

.reef-carousel .status.cr {
  background: rgba(228, 87, 46, 0.22);
  color: #8f1f0a;
}

.reef-carousel .status.vu {
  background: rgba(203, 168, 94, 0.25);
  color: #8a5a12;
}

.reef-carousel .status.nt {
  background: rgba(111, 180, 193, 0.2);
  color: #1E4E5A;
}

.reef-carousel .block {
  margin-bottom: 16px;
}

.reef-carousel .block .lbl {
  font-family: 'Special Elite', monospace;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1E4E5A;
  opacity: 0.7;
  margin-bottom: 5px;
}

.reef-carousel .block p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #4a6066;
}

.reef-carousel .carousel-indicators {
  width: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  bottom: 14px;
  margin: 0;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 7px 11px;
  box-shadow: 0 4px 14px -6px rgba(8, 46, 56, 0.5);
}

.reef-carousel .carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: #9fb3ba;
  opacity: 1;
  margin: 0 5px;
}

.reef-carousel .carousel-indicators .active {
  background: #CBA85E;
}

.reef-carousel .carousel-control-prev,
.reef-carousel .carousel-control-next {
  width: 7%;
}

.reef-carousel .carousel-control-prev-icon,
.reef-carousel .carousel-control-next-icon {
  background-color: rgba(8, 46, 56, 0.55);
  border-radius: 50%;
  padding: 14px;
  background-size: 44%;
}

@media (max-width: 768px) {
  .reef-carousel .slide {
    flex-direction: column;
    min-height: 0;
  }
  .reef-carousel .slide-art {
    flex: 0 0 auto;
    min-height: 200px;
  }
  .reef-carousel .slide-body {
    padding: 30px 26px 34px;
  }
  .reef-carousel .carousel-control-prev,
  .reef-carousel .carousel-control-next {
    align-items: flex-start;
    padding-top: 70px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reef-carousel .carousel-item {
    transition: none;
  }
}

/* ====== COULEURS DE FOND PAR SECTION ====== */
.part--causes {
  background-color: #e7d4a5;
}

.part--consequences {
  background-color: #71c1c4;
}

.part--solutions {
  background-image: linear-gradient(to bottom, #71c1c4 0%, rgba(113, 193, 196, 0) 25%), url('../mer.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
}

/* ====== PAGE GRAPHIQUES ====== */
.graphs-hero {
  background: linear-gradient(160deg, #2f5c64 0%, #274f56 45%, #1e3f45 100%);
  color: #F4EFE3;
  padding-top: 70px;
}

.graphs-hero .part-num {
  color: #CBA85E;
  opacity: 1;
}

.graphs-hero .part-title {
  color: #F4EFE3;
}

.graphs-hero .part-lede {
  color: #E7D6B1;
}

#effet-de-serre {
  background-color: #e7d4a5;
}

#origine-des-emissions {
  background-color: #71c1c4;
}

#contribution-inegale {
  background-color: #ba8f60;
}

.graph-section .scene-title {
  margin: 0.5rem 0 1.5rem;
}

.graphs-footer {
  background-color: #1e4e5a;
}

/* ====== ÉPILOGUE ====== */
.epilogue {
  background-color: #1e4e5a;
  color: #F4EFE3;
}

.epi-title {
  font-weight: 600;
  line-height: 1.35;
}

.epi-text {
  color: #E7D6B1;
  line-height: 1.7;
}

.epilogue-recap {
  margin: 2.5rem 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(244, 239, 227, 0.15);
}

.epilogue-recap .col {
  position: relative;
}

@media (min-width: 768px) {
  .epilogue-recap .col:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 0.2rem;
    bottom: 0.2rem;
    left: 0;
    width: 1px;
    background: rgba(244, 239, 227, 0.15);
  }
  .epilogue-recap .col:not(:first-child) {
    padding-left: 1.75rem;
  }
}

.epi-recap-label {
  font-family: 'Special Elite', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #CBA85E;
  margin-bottom: 0.6rem;
}

.epi-recap-label span {
  margin-right: 0.35rem;
}

.epi-recap-text {
  color: #E7D6B1;
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 0;
}

.epi-stats .counter {
  color: #F4EFE3;
}

.epi-stats label {
  display: block;
  font-size: 0.8rem;
  color: #6FB4C1;
  margin-top: 0.25rem;
}

.epi-sign {
  font-family: 'Special Elite', monospace;
  font-size: 1.2rem;
  color: #CBA85E;
  margin-top: 1rem;
}

.epi-sub {
  color: #E7D6B1;
}

.epi-credit {
  font-size: 0.8rem;
  color: #6FB4C1;
}

.epi-credit a {
  color: #CBA85E;
  text-decoration: underline;
}
