html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}
* {
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  color: rgba(135, 33, 33, 0.74);
  scrollbar-color: rgba(135, 33, 33, 0.74) transparent;
}

#scroll-wrapper {
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

h1,
h2,
h3 {
  font-family: "Caladea", serif;
  font-weight: 200;
}
.header {
  background-image: url("../images/main.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  scroll-snap-align: start;
  height: 100dvh;
  width: 100%;
  will-change: transform;
}

.header .logo {
  position: absolute;
  top: 40px;
  left: 40px;
  width: 200px;
}

.header h1 {
  position: absolute;
  left: 40px;
  bottom: 40px;
  margin: 0;
  font-size: 5rem;
  color: white;
}

.splide {
  flex: 1;
  height: 100dvh;
  width: 50%;
}

.produit,
.presentation,
footer {
  scroll-snap-align: start;
  height: 100dvh;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #ddd;
}

.produit img,
.presentation img,
footer img {
  padding: 40px;
  flex: 1;
  height: 100dvh;
  width: 50%;
  object-fit: cover;
}

.produit img {
  width: 100%;
  padding: 40px;
}

.produit .details,
.presentation .text,
footer .text {
  flex: 1;
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.presentation .text p,
footer .text p {
  width: 70%;
}

.produit .details div {
  width: 70%;
  height: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.produit h2 {
  margin: 0.5rem 0;
  font-size: 1.8rem;
  font-family: Caladea, serif;
}

.produit .sous-titre {
  font-size: 1.3rem;
}

.prix {
  font-weight: bold;
}
.produit .informations {
  font-style: italic;
  font-size: 0.8rem;
}

.produit.inverse {
  flex-direction: row-reverse;
}
.produit.inverse .details div {
  text-align: right;
}

#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  background-color: rgba(135, 33, 33, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

#scrollTopBtn.show {
  opacity: 1;
  pointer-events: auto;
}

#scrollTopBtn:hover {
  background-color: rgba(135, 33, 33, 0.8);
}

#loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 4px solid #f3f3f3;
  border-top: 4px solid rgba(135, 33, 33, 0.8);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media screen and (max-width: 768px) {
  body {
    font-size: smaller;
  }

  .header .logo {
    position: absolute;
    top: 40px;
    left: 40px;
    width: 200px;
  }

  .header h1 {
    font-size: 4rem;
  }

  .splide {
    width: 100%;
  }

  .produit,
  .presentation,
  footer {
    flex-direction: column;
  }

  .presentation img,
  footer img {
    flex: 0;
    object-position: center 20%;
    padding: 10px;
    height: 30dvh;
    width: 100%;
  }

  .produit img {
    flex: 0;
    padding: 10px;
    height: 50dvh;
    width: 100%;
  }

  .produit .details,
  .presentation .text,
  footer .text {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
  }
  footer .text,
  .presentation .text {
    padding: 10px;
  }

  .presentation .text p,
  footer .text p {
    width: 100%;
    text-align: center;
  }

  .produit .details div {
    width: 70%;
    height: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }

  .produit h2 {
    margin: 0.5rem 0;
    font-size: 1.8rem;
    font-family: Caladea, serif;
  }

  .produit .sous-titre {
    font-size: 1.3rem;
  }

  .prix {
    font-weight: bold;
  }
  .produit .informations {
    font-style: italic;
    font-size: 0.8rem;
  }

  .produit.inverse {
    flex-direction: column;
  }
}
