/* ===========================
   CAROUSEL BASE
=========================== */
.carousel-section {
  width: 100%;
  max-width: 1200px;
  margin: 50px auto;
  position: relative;
}

.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Image principale */
.carousel-slide img {
  width: 100%;
  display: block;
  border-radius: var(--border-radius, 8px);
  object-fit: cover;
}

/* ===========================
   WRAPPER + BOUTON "OUVRIR EN GRAND"
=========================== */
.img-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.img-wrapper img.zoomable {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.open-new-tab {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 8px;

  display: inline-flex;
  line-height: 1;
  box-sizing: border-box;
  

  border-radius: 6px;
  font-size: 1.3rem;
  text-decoration: none;
  z-index: 50;
  transition: background 0.2s ease;
}

.open-new-tab:hover {
  background: rgba(0,0,0,0.9);
}

/* FIX CLICK */
.carousel-dots {
  pointer-events: none;
}

.carousel-dots .dot {
  pointer-events: auto;
}

/* ===========================
   FLÈCHES
=========================== */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: transparent;
  color: var(--color-accent, #ff5722);
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 5;
  transition: all 0.3s ease;
}

.carousel-arrow:hover {
  transform: translateY(-50%) scale(1.2);
  color: var(--color-secondary, #fff);
}

.carousel-arrow.left { left: 10px; }
.carousel-arrow.right { right: 10px; }

/* ===========================
   POINTS / DOTS
=========================== */
.carousel-dots {
  position: absolute;
  bottom: 15px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 14px;
  z-index: 5;
}

.carousel-dots .dot {
  width: 14px;
  height: 14px;
  background-color: rgba(255,255,255,0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dots .dot.active {
  background-color: var(--color-accent, #ff5722);
  transform: scale(1.4);
}

/* ===========================
   RESPONSIVE MOBILE
=========================== */
@media (max-width: 900px) {
  .carousel-section {
    max-width: 100%;
    margin: 5px auto;
    padding: 0 5px;
  }

  .carousel-arrow {
    font-size: 1.5rem;
    padding: 6px;
  }

  .carousel-dots {
    bottom: 5px;
  }

  .carousel-dots .dot {
    width: 10px;
    height: 10px;
  }

  .open-new-tab {
    font-size: 1rem;
    padding: 6px 10px;
    bottom: 6px;
    right: 6px;
  }
}

@media (max-width: 600px) {
  .carousel-section {
    max-width: 100%;
    margin: 2px auto;
    padding: 0 2px;
  }

  .carousel-arrow {
    font-size: 2rem;
    padding: 8px;
  }

  .carousel-dots {
    bottom: 5px;
  }

  .carousel-dots .dot {
    width: 8px;
    height: 8px;
    gap: 8px;
  }

  .img-wrapper img.zoomable {
    max-height: 55vh;
    object-fit: contain;
  }

  .open-new-tab {
    font-size: 1.1rem;
    padding: 8px 12px;
  }
}
