@charset "UTF-8";

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-family: "Archivo Black", sans-serif;
  position: relative;
}

.gridContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 0;
  pointer-events: none;
}

.bloc {
  display: flex;
  flex: 1;
  width: 100%;
  height: 100px;
  background: linear-gradient(20deg, rgb(0, 229, 255), rgba(0, 0, 252));
  animation: blocanim 1s infinite;
}

.cell {
  flex-grow: 1;
  transition: flex-grow 1s ease-in-out;
  background: linear-gradient(to right, rgb(0, 0, 252), transparent);
}

.MainText {
  position: absolute;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  padding: 20px;
  text-align: center;
}
.main-title {
  font-size: 4rem;
  color: rgb(215, 215, 215);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  text-align: center;
  padding: 20px;
}

/* Scroll horizontal animé en haut */
.scroll-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  background-color: rgb(0, 0, 252);
  height: 70px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.phrase:first-of-type {
  margin-top: 120vh; /* commence après l'écran de titre */
}
.phrase:last-of-type {
  margin-bottom: 100vh; /* commence après l'écran de titre */
}

/* Phrases qui apparaissent au scroll */
.phrase {
  width: 85%;
  margin: 60rem auto;
  margin-bottom: 300px;
  font-size: 60px;
  color: rgb(235, 235, 236);
  text-align: center;
  position: relative;
  text-shadow: 2px 2px 4px rgba(4, 0, 106, 0.5);
  letter-spacing: 2px;
  font-weight: bold;
  opacity: 0;
  animation: fade-in-slide 1.5s ease-out forwards;
  animation-delay: 0.5s;
  padding: 25px;
  z-index: 4;
}

@keyframes fade-in-slide {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#background-video {
  position: fixed;
  bottom: 0;
  left: -5;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  object-fit: cover;
  z-index: 0;
}

#background-video.visible {
  opacity: 0.15;
}

#chrono {
  position: fixed;
  bottom: 30px;
  right: 15px;
  background-color: rgb(0, 0, 252);
  color: rgb(215, 215, 215);
  font-size: 0.9rem;
  padding: 5px 10px;
  border-radius: 10px;
  font-family: sans-serif;
  z-index: 1000;
  transition: all 0.5s ease; /* animation douce */
  text-align: center;
  line-height: normal;
  width: auto;
  height: auto;
  white-space: nowrap; /* éviter retour à la ligne */
}

/* Classe appliquée quand on est en bas */
#chrono.en-bas {
  bottom: 150px; /* plus bas, pour avoir de l’espace */
  left: 50%; /* centre horizontal */
  right: auto; /* annule right */
  transform: translateX(-50%);
  width: 80vw;
  height: 120px;
  font-size: 18vw;
  padding: 10px 20px;
  border-radius: 30px;
  line-height: 120px; /* centre verticalement le texte */
  font-weight: 900;
  letter-spacing: 0.05em;
  filter: saturate(1.3);
}

@media (max-width: 768px) {
  .phrase {
    margin: 25rem auto;
    font-size: 8vw;
  }
  .phrase:first-of-type {
    margin-top: 100vh;
  }

  .scroll-text {
    font-size: 2rem;
  }

  #chrono {
    font-size: 0.8rem;
    padding: 4px 8px;
  }

  .MainText {
    padding: 10px;
    height: 90vh; /* évite de couper sur les petits écrans */
  }
  .main-title {
    font-size: 8vw; /* ou 6vw selon ton style */
    padding: 10px;
  }
  #chrono {
    font-size: 6vw;
    bottom: 20px;
    right: 10px;
    padding: 4px 8px;
  }
  #chrono.en-bas {
    font-size: 20vw;
    height: 115px;
    bottom: 350px;
    width: 60vw;
  }
}

@media (min-width: 1200px) {
  #chrono {
    font-size: 2vw;
  }
  #chrono.en-bas {
    font-size: 12vw;
  }
}
