/* ------------------------ GENERAL ------------------------------------------- */
html,
body {
  width: 100vw;
  height: 100vh;
  min-width: 320px;
  min-height: 400px;
  font-family: "Figtree", sans-serif;
  margin: 0;
  padding: 0;
  overflow: hidden; /* Emp├¬che le d├®filement horizontal */
  box-sizing: border-box;
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE10+/Edge */
  user-select: none; /* Standard */
  background-color: var(--main-bg-color); /* Fond noir */
}

.container {
  width: 100%;
  height: 100vh;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  margin: 0;
  padding: 0;
  scrollbar-width: none; /* Cacher la barre de d├®filement dans Firefox */
  max-width: 2560px; /* Emp├¬che le d├®bordement horizontal */
}
.container::-webkit-scrollbar {
  display: none; /* Cacher la barre de d├®filement dans Chrome, Edge et Safari */
}
.hidden {
  display: none;
}
h1,
h2,
button.visionner-trigger-h3 {
  font-family: "Libre Baskerville", serif;
  font-size: clamp(2rem, 3vw, 3em);
  position: absolute;
  color: white;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
  max-width: 90%; /* Important pour que l'ellipsis fonctionne */
  /* white-space: nowrap; */ /* On retire cette ligne pour permettre le retour ├á la ligne dans l'├®tat .move */
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  font-weight: 400;
}
.index-soustitre {
  font-size: clamp(1.5rem, 2vw, 2.5em);
  position: absolute;
  color: white;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
  max-width: 90%; /* Important pour que l'ellipsis fonctionne */
  /* white-space: nowrap; */ /* On retire cette ligne pour permettre le retour ├á la ligne dans l'├®tat .move */
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  font-weight: 300;
}
.slide2 h2,
.slide3 h2 {
  /* font-size: clamp(1.2rem, 3vw, 3em); */
}

h2 {
  position: relative;
  display: inline-block; /* N├®cessaire pour que le soulignement s'adapte au texte */
}

button.visionner-trigger-h3 {
  font-family: "Figtree";
  font-size: clamp(1.2em, 1.9vw, 1.4em);
  font-weight: 400;
  top: 60%;
  position: relative;
  display: inline-block;
  opacity: 1;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
  visibility: visible;
}
button.visionner-trigger-h3:hover {
  color: #ddd; /* L├®g├¿re modification de la couleur au survol */
  transition: color 0.3s ease; /* Transition pour la couleur */
  text-decoration: none; /* Pas de soulignement par d├®faut */
  cursor: pointer;
}
button.visionner-trigger-h3::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%; /* Soulignement visible par d├®faut */
  height: 2px;
  background-color: #ddd;
  z-index: -1;
  transition: transform 0.5s ease-in-out;
  transform: scaleX(1); /* Pr├®sent de base */
  transform-origin: center;
  border-radius: 2px; /* Arrondi les bords du soulignement */
}
.visionner-trigger-h3.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.visionner-trigger-h3.fade-in {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

button.visionner-trigger-h3:hover::after {
  transform: scaleX(0); /* Se r├®duit vers le centre au hover */
}
.visionner iframe {
  width: 90vw !important;
  max-width: 100vw;
  height: 50vw !important;
  max-height: 80vh;
  min-height: 200px;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}
@media (max-width: 600px) {
  .visionner iframe {
    width: 100vw !important;
    height: 56vw !important; /* 16:9 ratio */
    min-height: 180px;
    max-height: 60vh;
    border-radius: 0;
  }
}
/* ---------------------- MAIN PAGE ------------------------------------ */
.slides {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  scroll-snap-align: start; /* Aligne chaque diapositive au d├®but de la fen├¬tre lors du d├®filement */
  margin: 0;
  padding: 0;
}

.slides > video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Assure que la vid├®o remplit le conteneur sans d├®border */
  position: absolute; /* Positionne la vid├®o pour qu'elle couvre tout le conteneur */
  top: 0;
  left: 0;
  z-index: 0; /* Place la vid├®o derri├¿re les autres ├®l├®ments */
  transition: transform 0.5s ease, filter 0.5s ease;
}

.slides > video.flou {
  filter: blur(0.3rem);
  transform: scale(1.05); /* Agrandit l├®g├¿rement la vid├®o */
}
.slides h2 {
  position: absolute;
  left: 50%;
  top: 40%;
  /* On ajoute scale(1) pour avoir un point de d├®part pour l'animation */
  transform: translate(-50%, -50%) scale(1);
  transition: color 0.3s ease;
  white-space: nowrap;
  /* On pr├®vient le navigateur qu'on va animer cette propri├®t├® */
  will-change: transform;
}
.slides h2::after {
  content: attr(data-author);
  display: block;
  text-align: right;
  font-family: "Figtree", sans-serif;
  font-size: 0.8em;
  font-weight: 400;
  line-height: 1.5;
  margin-top: 0.75em;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: none;

  opacity: 0;
  /* MODIFI├ë : On retire le d├®lai, la transition est maintenant directe */
  transition: opacity 0.5s ease-in-out;
}

/* MODIFI├ë : On utilise une nouvelle classe pour afficher l'auteur */
.slides h2.author-visible::after {
  opacity: 1;
}
/* NOUVELLE CLASSE pour activer l'animation de transform */
.slides h2.animate-transform {
  transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.slides h2.move {
  /* ON NE TOUCHE PLUS ├Ç 'left' OU 'top' */
  /* ON NE TOUCHE PLUS ├Ç 'font-size' pour l'animation */
  font-size: clamp(
    1.5rem,
    2vw,
    2.9rem
  ); /* La taille change instantan├®ment, ce qui est moins choquant qu'une animation saccad├®e */
  text-align: left;
  white-space: normal;

  /* NOUVELLE STRAT├ëGIE DE TRANSFORM : */
  /* On combine le scale et le translate pour tout faire en une seule propri├®t├® */
  transform: translate(calc(-50% - (50vw - 30vw)), 0%) scale(0.8);
  /* Explication du calcul ci-dessous */
}

.slides:first-child {
  scroll-snap-align: start;
  line-height: 1.5;
}

.sliderButton {
  position: relative;
  margin: 0;
  z-index: 10; /* Place les boutons au-dessus des autres ├®l├®ments */
}

.info {
  position: relative; /* IMPORTANT : Pour positionner le bouton ├á l'int├®rieur */
  background: rgba(4, 14, 30, 0.6);
  /* backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); */
  text-align: justify;
  border-radius: 10px;
  padding: 2vw 2.5vw;
  width: 40%;
  max-width: 500px;
  position: absolute;
  left: 55vw;
  top: 30%;
  color: white;
  font-family: "Figtree", sans-serif;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  line-height: 1.5;
  display: none;
  /* NOUVEAU : On s'assure qu'il y a assez de place en hauteur */
  min-height: 30vh;
  /* NOUVEAU : On ajoute du padding en bas pour que le texte ne passe pas sous le bouton */
  padding-bottom: 80px;
  text-indent: 40px;
  font-weight: 200;
}
@keyframes nudge-right {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(4px);
  }
}
/* NOUVEAU STYLE POUR LE BOUTON DANS LE BLOC INFO */
.info-button {
  /* On retire la marge et on change le positionnement */
  display: inline-flex;
  align-items: center;
  position: absolute;
  bottom: 25px;
  right: 25px;
  padding: 12px 24px;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  /* border: 1px solid rgba(255, 255, 255, 0.4); */
  border-radius: 100px;
  text-decoration: none;
  font-weight: 500;
  text-indent: 0;
  transition: background-color 0.3s, border-color 0.3s;
}
.info-button span {
  position: relative;
  display: inline-block;
}

/* NOUVEAU : On cr├®e le soulignement (cach├® par d├®faut) */
.info-button span::before {
  content: "";
  position: absolute;
  bottom: -4px; /* Distance du soulignement par rapport au texte */
  left: 0;
  width: 100%;
  height: 2px; /* ├ëpaisseur du soulignement */
  background-color: rgba(255, 255, 255, 0.8);

  /* Animation depuis le centre */
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

/* NOUVEAU : On affiche le soulignement au survol et au focus */
.info-button:hover span::before,
.info-button:focus span::before {
  transform: scaleX(1);
}

.info-button::after {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-left: 8px;
  background-image: url("../img/arrowright.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: nudge-right 1.2s infinite;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  vertical-align: middle;
}
.info-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 1250px) {
  .slides h2.move {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    width: 45%;
    transform: translate(calc(-50% - (50vw - 20vw)), -110%) scale(0.7);
  }

  .info {
    left: 52vw; /* Le bloc commence toujours ├á 52% de la gauche */
    right: 20px; /* MAIS il doit s'arr├¬ter ├á 20px du bord droit */
    width: auto; /* On laisse le navigateur calculer la largeur */
    max-width: 90%; /* S├®curit├® pour ne pas qu'il soit trop large */
  }
}

/* -------------------------------- SLIDER BUTTON -------------------------------*/
.point1,
.point2 {
  width: clamp(10px, 1.8vw, 12px);
  height: clamp(10px, 1.8vw, 12px);
  border-radius: 100%;
  border: 2px solid white;
  transition: background-color 0.3s ease-in-out;
}
.full {
  background-color: white;
}
.empty {
  background-color: none;
  cursor: pointer;
}
.empty:hover {
  background-color: #ddd;
  cursor: pointer;
}

.slides > .sliderButton {
  width: 5%;
  min-width: 70px;
  height: auto;
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
  display: flex;
  justify-content: space-evenly;
}
#transition-overlay {
  z-index: 10000; /* Plus haut que .loading-screen */
}

/* ----------------------------- FLECHE SCROLL (scroll-down-arrow) ----------------------------- */
.scroll-down-arrow {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 40px;
  height: auto;
  text-align: center;
  pointer-events: auto;
}

.scroll-down-arrow img {
  width: 40px;
  animation: scroll-down 2s infinite;
  opacity: 0;
  cursor: pointer;
  /* Accessibilit├® : focus visible */
  outline: none;
}
.scroll-down-arrow img:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@keyframes scroll-down {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(10px);
  }
  100% {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Fl├¿che up : rotation + animation inverse */
.scroll-down-arrow.up img {
  transform: rotate(180deg);
  animation: scroll-up 2s infinite;
  cursor: pointer;
}

@keyframes scroll-up {
  0% {
    opacity: 0;
    transform: rotate(180deg) translateY(-20px);
  }
  50% {
    opacity: 1;
    transform: rotate(180deg) translateY(-10px);
  }
  100% {
    opacity: 0;
    transform: rotate(180deg) translateY(0px);
  }
}

/* Responsive : r├®duit la taille sur mobile */
@media (max-width: 600px) {
  .scroll-down-arrow {
    display: none !important;
  }
}
.index-soustitre {
  font-size: clamp(1.5rem, 2vw, 2.5em);
  position: absolute;
  color: white;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10;
  max-width: 90%; /* Important pour que l'ellipsis fonctionne */
  /* white-space: nowrap; */ /* On retire cette ligne pour permettre le retour ├á la ligne dans l'├®tat .move */
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  font-weight: 300;
}
