/* Body */
body {
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
}

/* Hero section */
header {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
  height: 100vh !important;
  margin: 0 !important;
  overflow-y: hidden !important;
  background-color: #000;
}

header img {
  width: 100% !important;
  height: 100vh !important;
  filter: brightness(85%) !important;
  object-fit: cover !important;
}

header img.plat-gauche {
  height: 100vh !important;
  object-position: center;
}

header img.plat-droite {
  height: 120vh !important;
  object-position: right;
  transform: rotate(180deg);
}

header div.left {
  position: relative;
  background-color: var(--color-fresh);
}

header div.right {
  position: relative;
  background-color: var(--color-warm);
}

/* Overlay sur les images */
header .left::after,
header .right::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

/* Texte au-dessus de l'overlay */
div.slogan {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #fff;
  font-weight: bold;
  text-align: center;
  transform: translate(-50%, -50%);
  z-index: 2;
  /* text-shadow: 2px 2px 4px rgba(255,255,255,1);  */
}

div.slogan h1 {
  margin-bottom: 1.2rem;
  font-size: 3.5rem;
}

div.slogan h2 {
  font-size: 1.8rem;
}

/* Main */
main .title {
  padding: 80px 130px;
}

main .title h1 {
  position: relative;
  font-weight: bold;
}

main .title .line {
  width: 30%;
  border: 2px solid black;
}

.slide-to-right {
  font-family: "JejuGothic", sans-serif;
}

/* Slider */
div.slider {
  display: flex;
  flex-direction: column;
  gap: 30px;
  height: 100vh;
  overflow-x: hidden;
}

.content-slider {
  display: flex;
  width: 100vw;
  transition: transform 0.6s ease;
}

.slide {
  position: relative;
  min-width: 100vw;
  height: 80vh;
  overflow: hidden;
}

.slide img {
  width: 100%;
  height: 100%;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  object-fit: cover;
}

/* Informations du slide */
.infos-slide {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 600px;
  height: 80vh;
  gap: 20px;
  padding: 80px 40px;
  background-color: rgba(0, 0, 0, 0.77);
  color: white;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
}

.infos {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.infos .infos-name {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.infos a {
  width: fit-content;
  margin: 0 auto;
  padding: 10px 20px;
  color: white;
  border: 2px solid white;
  border-radius: 60px;
  font-size: 1.2rem;
  text-decoration: none;
}

.infos a:hover {
  background-color: white;
  color: black;
  border: 2px solid black;
}

.infos-slide button {
  background: transparent;
  color: white;
  border: none;
  font-size: 6rem;
  cursor: pointer;
}

.infos-supplementaires {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.infos-supplementaires p {
  font-family: var(--ff-text);
  font-size: 1.1rem;
}

.slide-to-right {
  position: absolute;
  right: 50px;
}

/* Boutons du slider */
.buttons-slider {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.button-slider {
  width: 50px;
  height: 15px;
  background: #d9d9d9;
  border-radius: 50px;
  cursor: pointer;
  transition: 0.2s all ease;
}

.button-slider:hover {
  border: 3px solid black;
}

.button-slider.active {
  background: black;
}

/* Bannière recette aléatoire */
.banner-random-recipe {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  background-color: var(--color-yellow);
}

.infos-random-recipe {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  height: 300px;
  margin: auto 40px;
  padding: 30px 60px;
  border: 3px solid black;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.25);
  font-size: 1.2rem;
}

.infos-random-recipe a.button-random-recipe {
  width: fit-content;
  margin: auto;
  padding: 16px 24px;
  background-color: black;
  color: white;
  border-radius: 6px;
  font-family: var(--ff-text);
  text-decoration: none;
  transition: 0.2s all ease;
}

.infos-random-recipe a.button-random-recipe:hover {
  background-color: white;
  color: black;
  border: 2px solid black;
}

/* Dernières recettes */
div.last-recipes {
  display: flex;
  flex-direction: column;
  padding: 20px 130px;
}

/* Tablet */
@media (max-width: 900px) {
  main .title {
    padding: 40px 24px;
  }
  .content-slider {
    width: 100vw;
  }
  .slide {
    height: auto;
  }
  .slide img {
    height: 50vh;
  }
  .infos-slide {
    /* position: static; */
    width: 100vw;
    /* height: auto; */
    padding: 24px;
    border-radius: 0;
  }
  .infos a {
    font-size: 1.05rem;
    padding: 10px 16px;
  }
  .buttons-slider {
    gap: 8px;
  }
  .button-slider {
    width: 40px;
    height: 12px;
  }

  /* Random recipe banner: stack and relax spacing */
  .banner-random-recipe {
    flex-direction: column;
    gap: 16px;
    padding: 24px;
  }
  .banner-random-recipe img {
    width: 100vw;
    height: 40vh;
    object-fit: cover;
  }
  .infos-random-recipe {
    height: auto;
    margin: 0;
    padding: 16px;
    font-size: 1.05rem;
  }
}

/* Phone */
@media (max-width: 900px) {
  div.slogan h1 {
    font-size: 2rem;
  }
  div.slogan h2 {
    font-size: 1.125rem;
  }

  /* Title spacing */
  main .title {
    padding: 32px 16px;
  }
  main .title .line {
    width: 50%;
  }

  /* Slider: single column, text below image */

  .content-slider {
    /* flex-direction: column; */
    width: 100%;
    /* height: 200rem; */
  }
  .slider {
    padding-top: 30px;
  }
  .slide {
    min-width: 100%;
    /* height: auto; */
  }
  .slide img {
    border-radius: 0;
    height: 40vh;
  }
  .infos-slide {
    position: static;
    width: 100%;
    height: auto;
    padding: 16px;
    border-radius: 0;
  }
  .infos-supplementaires p {
    font-size: 1rem;
  }
  .infos a {
    font-size: 1rem;
    padding: 10px 14px;
  }
  .buttons-slider {
    gap: 6px;
  }
  .button-slider {
    width: 36px;
    height: 10px;
  }

  /* Random recipe banner: stack content */
  .banner-random-recipe {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  .infos-random-recipe {
    height: auto;
    margin: 0;
    padding: 16px;
    font-size: 1rem;
  }
  .infos-random-recipe a.button-random-recipe {
    font-size: 1rem;
    padding: 10px 14px;
  }

  /* Last recipes section */
  div.last-recipes {
    padding: 16px;
  }
}