/* === Carrousel principal === */
.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1600px;
  margin: 60px auto 80px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(to bottom, #0a0a0f 0%, #111827 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

/* Piste du carrousel */
.carousel-track {
  display: flex;
  transition: transform 0.6s ease-in-out;
  width: 100%; /* Laisse le JS gérer la largeur dynamique */
}

  /*width: 300%;  3 images par défaut, ajusté dynamiquement */
}

.carousel-item {
  flex: 0 0 100%;
  width: 100%;
  text-align: center;
}

.carousel-item img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.5s ease, box-shadow 0.4s ease;
  display: block;
}

.carousel-item img:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
}

/* === Boutons de navigation === */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.3s;
  z-index: 10;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.carousel-btn.prev { left: 15px; }
.carousel-btn.next { right: 15px; }

/* === Points (dots) === */
.carousel-dots {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.carousel-dots button {
  border: none;
  width: 10px;
  height: 10px;
  margin: 0 5px;
  border-radius: 50%;
  background: #bbb;
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-dots button.active {
  background: #22d3ee;
}

/* === Espacement et responsive === */
.home-carousel {
  margin-top: 100px;
  margin-bottom: 60px;
}

@media (max-width: 1024px) {
  .carousel-item img { height: 400px; }
}

@media (max-width: 768px) {
  .carousel-item img { height: 300px; }
  .carousel-btn { font-size: 1.5rem; padding: 6px 10px; }
}

@media (max-width: 480px) {
  .carousel-item img { height: 220px; }
  .carousel-btn { font-size: 1.2rem; }
}
