/* ------------------------ 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;
}

.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 DE MERDE -------------------------------------- */
.scroll-down-arrow {
  position: fixed; /* Fixe la flèche par rapport à la fenêtre */
  bottom: 40px; /* Positionne la flèche à 20px du bas */
  left: 50%; /* Centre horizontalement */
  transform: translateX(-50%); /* Centre la flèche */
  z-index: 10; /* Assure que la flèche est au-dessus des autres éléments */
  width: 40px; /* Ajuste la largeur de l'image */
  height: auto; /* Garde les proportions de l'image */
  text-align: center;
  pointer-events: auto; /* Empêche les interactions avec la flèche */
}

.scroll-down-arrow img {
  width: 40px; /* Taille de l'image */
  animation: scroll-down 2s infinite; /* Applique l'animation */
  opacity: 0;
  cursor: pointer; /* Change le curseur pour indiquer que c'est cliquable */
}

@keyframes scroll-down {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(10px); /* Déplace légèrement vers le bas */
  }
  100% {
    opacity: 0;
    transform: translateY(20px); /* Déplace encore plus vers le bas */
  }
}

.scroll-down-arrow.up img {
  transform: rotate(180deg);
  animation: scroll-up 2s infinite;
  cursor: pointer; /* Change le curseur pour indiquer que c'est cliquable */
}

@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);
  }
}
/* Loading  */



/* @media (max-width: 1400px) {
  html { font-size: 16px; }
}
@media (max-width: 900px) {
  html { font-size: 12px; }
}
@media (max-width: 700px), (max-height: 500px) {
  body > *:not(.mobile-warning) { display: none !important; }
  .mobile-warning {
    display: flex !important;
    position: fixed;
    z-index: 999999;
    background: var(--main-bg-color);
    color: #fff;
    width: 100vw;
    height: 100vh;
    top: 0; left: 0;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.3em;
    padding: 5vw;
  }
}
.mobile-warning { display: none; } */
