/* Da Silva Rúben 13.01.2026 Styles de la page html accueil*/

input {
  display: block;
  margin: 0 auto 20px auto;
  width: 100%;
  max-width: 350px;
  padding: 10px 14px;
  font-size: 16px;
  border-radius: 20px;
  border: 1px solid #ccc;
}

/* ================= SLIDER ================= */

.sec-1 {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

/* Slide */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  opacity: 0;
  animation: fadeSlides 12s infinite;
}

/* Image du slide */
.sec-1 img {
  width: 100%;
  max-width: 1200px;
  height: 700px;
  object-fit: fill;

  /* Dégradé de transparence */
  mask-image: linear-gradient(to right, transparent 0%, black 30%, black 100%);
}

/* Texte du slide */
.div-1 {
  color: white;
  margin-left: 150px;
}

/* ================= ANIMATION ================= */

@keyframes fadeSlides {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  30% {
    opacity: 1;
  }
  40% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* Délais entre les slides */
.sec-1 .slide:nth-child(1) {
  animation-delay: 0s;
}
.sec-1 .slide:nth-child(2) {
  animation-delay: 4s;
}
.sec-1 .slide:nth-child(3) {
  animation-delay: 8s;
}

/* ================= CONTENU ================= */

body {
  margin: 100px auto;
}

.sec-2 h2 {
  position: relative;
  left: 90px;
}

/* ================= MOBILE ================= */

@media (max-width: 480px) {
  body {
    margin: 20px auto;
    max-width: 100%;
    padding: 0 10px;
  }

  input {
    width: 90%;
  }

  .sec-1 {
    height: auto;
    position: relative;
  }

  .slide {
    position: relative;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 1;
    animation: fadeSlidesMobile 12s infinite;
  }

  .sec-1 img {
    width: 100%;
    height: auto;
    object-fit: cover;
    mask-image: none;
  }

  .sec-2 h2 {
    position: static;
    text-align: center;
    font-size: 18px;
    margin: 10px 0;
  }

  /* Animation mobile */
  @keyframes fadeSlidesMobile {
    0%,
    10% {
      opacity: 0;
    }
    20%,
    80% {
      opacity: 1;
    }
    90%,
    100% {
      opacity: 0;
    }
  }
}
