/* Carrousel galerie : defile auto, navigation, indicateurs.
   RTL-friendly : les fleches gardent leur sens visuel logique. */

/* Wrapper pour grouper titre + carrousel et homogeneiser la marge basse. */
.gallery-carousel-wrap {
  margin: 0 0 1rem 0;
}

.gallery-carousel__title {
  color: #0f172a;
  margin: 0 0 0.4rem 0;
  text-align: start;
}
.gallery-carousel__title-link {
  color: inherit;
  text-decoration: none;
}
.gallery-carousel__title-link:hover { text-decoration: underline; }

.gallery-carousel {
  position: relative;
  width: 100%;
  margin: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #0f172a;
  user-select: none;
  cursor: pointer;
}

.gallery-carousel__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.gallery-carousel__track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  transition: opacity 0.6s ease;
}

.gallery-carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.gallery-carousel__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.gallery-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 5;
  transition: background 0.15s ease;
}

.gallery-carousel__nav:hover { background: rgba(15, 23, 42, 0.8); }
.gallery-carousel__nav svg { width: 20px; height: 20px; }

/* En RTL : prev = visuellement a droite (avancer dans la lecture hebraique),
   next = visuellement a gauche. */
[dir="rtl"] .gallery-carousel__nav--prev { right: 0.5rem; left: auto; }
[dir="rtl"] .gallery-carousel__nav--next { left: 0.5rem; right: auto; }
[dir="ltr"] .gallery-carousel__nav--prev { left: 0.5rem; right: auto; }
[dir="ltr"] .gallery-carousel__nav--next { right: 0.5rem; left: auto; }

.gallery-carousel__dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  gap: 6px;
  justify-content: center;
  z-index: 5;
}

.gallery-carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.gallery-carousel__dot.is-active {
  background: #fff;
  transform: scale(1.25);
}

