@font-face {
  font-family: "InconsolataCondensed";
  src: url("fonts/Inconsolata_Condensed-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}




html {

  scroll-behavior: smooth;

}

/* ==== FOND ANIMÉ GLOBAL ==== */
body {
  font-family: "Arial", sans-serif;
  color: #ffffff;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(-45deg, #131738, #1b1e4b, #140750, #181844);
}


@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

section,
.charts-container {
  scroll-margin-top: 100px;
}

h1,
h2 {
    font-family: "InconsolataCondensed", sans-serif;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 6px rgba(255, 255, 255, 0.25);
}

h1.title {
  font-size: 2.2rem;
  margin: 3rem 0 2rem;
  letter-spacing: 1px;
}

/* ===== INTRO ===== */
#intro {
  position: relative;
  height: 100vh;
  overflow: hidden;
  color: white;
}

/* 
#bg-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  filter: brightness(0.45) saturate(1.1);
  z-index: -2;  tout au fond 
  pointer-events: none;

*/


#intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

.overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 2rem;
}

.overlay h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  letter-spacing: 8px;
  background: linear-gradient(90deg, #00d4ff, #ff00cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(255, 0, 204, 0.4));
  animation: fadeInDown 1.5s ease-out;
}

/* ==== VIDÉO FOND TERRE ==== */
#earthVideo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;

}

/* Optionnel : effet spatial sombre par-dessus */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  /* au-dessus de la vidéo, sous le contenu */
  pointer-events: none;
}


#intro {
  position: relative;
  height: 100vh;
  overflow: hidden;
  color: white;
}


/* Dégradé léger par-dessus la vidéo */
#intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

.overlay {
  position: relative;
  z-index: 1;
}

.overlay h1 {
  font-size: 6rem;
  letter-spacing: 8px;
  background: linear-gradient(90deg, #00d4ff, #ff00cc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(255, 0, 204, 0.4));
  animation: fadeInDown 1.5s ease-out;
}

/* machine à écrire horizontal */
.overlay h2 {
  font-size: clamp(1.1rem, 2.3vw, 1.8rem);
  margin-top: 15px;
  color: rgba(255, 255, 255, 0.95);
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid #fff;
  width: 0;
  max-width: max-content;
  animation: typing 2.6s steps(52) 1s forwards,
             blink 0.75s step-end infinite 3.6s;
}




.overlay p {
  margin-top: 20px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  opacity: 0;
  animation: fadeIn 2s ease-in-out 5s forwards;
}

.scroll-down {
  position: absolute;
  bottom: 35px;
  font-size: 1.8rem;
  opacity: 0.7;
  animation: bounce 2.5s infinite, fadeIn 3s ease-in-out 6s forwards;
}

.scroll-down a {
  text-decoration: none;
  color: white;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typing {
  from { width: 0; }
  to   { width: 100%; }
}


@keyframes blink {
  50% { border-color: transparent; }
}


@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

@keyframes typing {
  from { width: 0; }
  to   { width: 52ch; }
}

@keyframes blink {
  50% { border-color: transparent; }
}


/* ===== CHARTS ===== */
.charts-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  align-items: center;
  padding: 2rem 1rem 3rem;
}

.chart-card {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.chart-wrapper {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

canvas {
  width: 100%;
  max-width: 800px;
  height: 400px;
}

.legend {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1.2rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.25s, transform 0.25s;
}

.legend-item:hover {
  opacity: 0.7;
  transform: scale(1.05);
}

.info-bubble {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1rem 1.3rem;
  max-width: 260px;
  font-size: 0.95rem;
  line-height: 1.5;
  align-self: center;
}

/* ===== LEURS HISTOIRES (aligné/centré) ===== */
.histoires-section {
  padding: 3.5rem 1rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.histoires-section h1 {
  margin-bottom: 1.5rem;
}

.carousel-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto 1.5rem;
}

.arrow {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform .15s ease, background .2s;
}

.arrow:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.18);
}

.carousel {
  display: flex;
  gap: 1rem;
  padding: 0.5rem;
  max-width: 800px;
  overflow-x: auto;
  justify-content: center;
  scrollbar-width: thin;
}

.carousel img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  opacity: 0.45;
  filter: saturate(0.7);
  transition: transform .2s, opacity .2s, filter .2s, box-shadow .2s;
  cursor: pointer;
}

.carousel img.active {
  opacity: 1;
  transform: scale(1.1);
  filter: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.carousel img.inactive {
  opacity: 0.6;
}

.reseau-info {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 2rem;
  align-items: center;
  justify-items: center;
}

.reseau-info .texte {
  max-width: 650px;
  text-align: center;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #f3f3f7;
}

.reseau-info .pdg {
  text-align: center;
}

.reseau-info .pdg img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 0.5rem;
}

/* ===== IMPACT & PRÉVENTION ===== */
.impact-section {
  padding: 3rem 1rem 4rem;
}

.impact-intro {
  max-width: 900px;
  margin: 0 auto 2rem;
  text-align: center;
  color: #eaeaf0;
}

.comparatif-container {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

.select-age {
  display: flex;
  align-items: center;
  gap: .8rem;
  justify-content: center;
  margin: 1rem 0 1.5rem;
}

.select-age select {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 10px;
  padding: .5rem .8rem;
}

.comparatif-card {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 2rem;
  margin-top: 1rem;
}

.colonne {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 1.2rem 1.6rem;
  min-width: 220px;
  text-align: center;
}

.colonne h3 {
  margin: 0 0 .6rem 0;
  font-weight: 600;
}

.temps {
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 1px;
}

.difference {
  margin-top: 1.2rem;
  text-align: center;
}

.age-msg {
  font-size: 0.95rem;
  color: #ccc;
  margin-top: .5rem;
}

/* Reset bouton */
.reset-btn {
  margin-top: 1.5rem;
  padding: 0.8rem 1.6rem;
  background-color: rgba(24, 119, 242, 0.9);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.3s, transform 0.2s;
}

.reset-btn:hover {
  background-color: rgba(24, 119, 242, 1);
  transform: scale(1.05);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  font-size: 0.8rem;
  color: #d2d6ff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  .reseau-info {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 900px) {
  .chart-card {
    flex-direction: column;
    align-items: center;
  }

  .info-bubble {
    max-width: 90%;
    margin-top: 0.5rem;
  }
}

@media (max-width: 700px) {
  .comparatif-card {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .colonne {
    width: 80%;
  }

  .temps {
    font-size: 2rem;
  }

  .carousel img {
    width: 48px;
    height: 48px;
  }

}