/* Container des slides : empile les slides */
.slider-wrapper {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}
.carousel {
  position: relative;
}

/* Chaque slide */
.carousel-slide {
  position: absolute; /* pour empiler les slides */
  top: 0;
  left: 0;
  width: 100%;
  /* height: 100dvh; */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  transition: opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
}

/* Slide visible */
.carousel-slide:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
  position: relative; /* pour que la slide active prenne place */
  z-index: 1;
}

.carousel-slide[hidden] {
  display: none !important; /* cache les slides non actives */
}

/* Image pleine hauteur et largeur */
.image-wrap img {
  width: 100%;
  height: 100dvh;
  object-fit: cover;
  grid-area: 1/1/3/-1;
  position: absolute;
  top: 0;
}

/* Contenu + puces */
.hero-zone {
  grid-area: 2/1/3/3;
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
  z-index: 2;
  position: relative;
  padding: 2rem;
}

/* Contenu texte */
.hero-slider-contenu {
  grid-column: 1 / 2;
  color: var(--wp--preset--color--primary);
  opacity: 0.9;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding-inline: 2rem;
  padding-block: 2rem;
  border-radius: var(--wp--custom--radius--xl);
  max-width: 468px;
  margin-inline: 2rem;
  margin-block: 1rem;
  gap: 1.5rem;
}

/* Puces */
.slide-nav {
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 60%;
  right: 15%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 26em) {
  .slide-nav {
    top: 45%;
    right: 45%;
  }
}
@media (min-width: 48em) {
  .slide-nav {
    top: 55%;
    right: 45%;
  }
}
@media (min-width: 90em) {
  .slide-nav {
    top: 60%;
    right: 58%;
  }
}
@media (min-width: 100em) {
  .slide-nav {
    top: 65%;
    right: 65%;
  }
}
.nav-dot {
  width: 2rem;
  height: 2rem;
  opacity: 0.9;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  outline: none;
}

.nav-dot.active,
.nav-dot:hover {
  opacity: 1;
  width: 2.4rem;
  height: 2.4rem;
  transition: width 0.3s ease, height 0.3s ease;
  /* outline: 1px solid var(--wp--preset--color--background); */
}
.nav-dot:focus {
  outline: 4px solid var(--wp--preset--color--base);
}
/* Ajustements typographiques */
.description-site {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}
.hero-slider-contenu h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero-slider-contenu h1 strong {
  font-weight: 400;
  background-color: #ffff;
  padding-inline: 0.5rem;
}

.hero-slider-contenu p.sstitre {
  font-family: var(--wp--preset--font-family--primary);
  line-height: var(--wp--custom--line-height--regular);
  font-size: 1.2rem;
  font-weight: var(--wp--custom--font-weight--bold);
  margin-bottom: 1rem;
}
/* Overlay link pour rendre toute la hero-zone cliquable */
.hero-zone {
  position: relative;
}
.hero-zone .hero-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
}
.hero-zone .hero-contenu {
  position: relative;
  z-index: 2;
}
.logo-Tours-slide {
  width: 320px;
  height: auto;
  align-self: center;
}
.hero-text {
  display: flex;
  flex-direction: column;
}
/* Corriger le 100vh sur iOS */
.slider-wrapper,
.carousel-slide,
.image-wrap img {
  height: 100dvh; /* iOS 16+ supporte dvh (Dynamic Viewport Height) */
}
@media (max-width: 42em) {
  .slider-wrapper,
  .carousel-slide,
  .image-wrap img {
    height: auto; /* Pas de hauteur fixe sur mobile */
  }
}
/* fallback */
@supports not (height: 100dvh) {
  .slider-wrapper,
  .carousel-slide,
  .image-wrap img {
    height: 100vh;
  }
}

/* Ajustement mobile : pas de height fixe */
@media (max-width: 42em) {
  .carousel-slide {
    height: auto !important;
  }
  .image-wrap img {
    /* height: auto !important; */
    max-height: 70vh; /* limite en hauteur mais pas fixe */
  }
}
