/* ==========================================================
   CAROUSEL RÉNIL — STYLE VERT PASTEL + VERRE DÉPOLI
   Version optimisée et nettoyée
   ========================================================== */

/* === Conteneur principal === */
.carousel-container {
  position: relative;
  isolation: isolate;
  max-width: 900px;
  height: 480px;
  margin: 3em auto;
  overflow: hidden;
  border-radius: 18px;
  z-index: 4;

  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

  /* verre dépoli */
  background: transparent;
}

.carousel-container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    to bottom right,
    rgba(217, 228, 183, 0.35),
    rgba(255, 255, 255, 0.30)
  );
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  z-index: 0;
  pointer-events: none;
}

/* === Slides === */
.carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 2em;
  opacity: 0;
  pointer-events: none;

  transition: opacity 0.65s ease-in-out;
  z-index: 1;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* === Image === */
.carousel-image {
  max-width: 80%;
  max-height: 360px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

/* === Texte === */
.carousel-text {
  max-width: 85%;
}

.carousel-text h2 {
  margin-bottom: 0.45em;
  color: #222;
  font-size: 1.8em;
  font-weight: 600;
}

.carousel-text p {
  font-size: 1.05em;
  line-height: 1.45em;
  color: #555;
}

/* ==========================================================
   FLÈCHES — version RÉNIL harmonisée (vert pastel léger)
   ========================================================== */
.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;

  width: 52px;
  height: 52px;
  font-size: 1.6em;

  display: flex;
  justify-content: center;
  align-items: center;

  color: #2b2b2b;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  user-select: none;
  z-index: 10;

  box-shadow: 0 0 18px rgba(154, 195, 28, 0.25);

  transition:
    background 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease,
    scale 0.3s ease;
}

/* Hover avec dégradé vert pastel RéNIL */
.prev:hover,
.next:hover {
  scale: 1.10;
  color: white;
  background: linear-gradient(
    135deg,
    rgba(154, 195, 28, 0.95),
    rgba(200, 220, 150, 0.9)
  );
  box-shadow:
    0 0 20px rgba(154, 195, 28, 0.6),
    inset 0 0 6px rgba(255,255,255,0.6);
}

.prev { left: 22px; }
.next { right: 22px; }

/* === Points indicateurs === */
.carousel-dots {
  position: absolute;
  bottom: 16px;
  width: 100%;
  text-align: center;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  display: inline-block;

  background: #c8c8c8;
  border-radius: 50%;
  margin: 0 5px;

  cursor: pointer;

  transition: background 0.3s ease;
}

.dot.active,
.dot:hover {
  background: #9AC31C;
}

/* === Responsive === */
@media screen and (max-width: 768px) {
  .carousel-container {
    height: 360px;
    margin: 2em 1em;
  }

  .carousel-image {
    max-width: 90%;
    max-height: 240px;
  }

  .prev,
  .next {
    width: 42px;
    height: 42px;
    font-size: 1.25em;
  }

  .carousel-text h2 {
    font-size: 1.4em;
  }

  .carousel-text p {
    font-size: 0.95em;
  }
}
.carousel-timer {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(
    to right,
	rgba(255,255,255,0.2) 0%,
	rgba(200,215,225,0.6) 50%,
	rgba(149,184,202,0.9) 100%
  );
  box-shadow: 0 0 8px rgba(255,255,255,0.45);
  border-radius: 0 8px 8px 0;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

@keyframes timerProgress {
  from { width: 0%; }
  to   { width: 100%; }
}

.carousel-timer.active {
  opacity: 1;
}

