/* Reset et styles de base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Conteneur principal */
#wrapper {
  width: 100%;
  max-width: 964px;
  position: relative;
  margin: 0 auto;
  padding: 20px;
}

/* Conteneur du carrousel (masque le débordement) */
#carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Conteneur des items (défilement horizontal) */
#content {
  display: flex;
  gap: 16px;
  transition: transform 0.5s ease;
  width: max-content;
  padding: 5px 0; /* Espace pour l'effet hover */
}

/* Style des miniatures */
.item {
  flex: 0 0 180px; /* Largeur fixe */
  height: 180px;
  background: #2ecc71; /* Vert plus moderne */
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Effet au survol */
.item:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

/* Boutons de navigation */
#prev, #next {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  transition: all 0.3s ease;
}

#prev {
  left: 10px;
}

#next {
  right: 10px;
}

#prev:hover, #next:hover {
  background: #f1f1f1;
  transform: translateY(-50%) scale(1.1);
}

/* Masquage des boutons quand inutiles */
/*#prev.hidden, #next.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
*/
/* Style pour le conteneur vidéo */
.video-container {
  width: 90%;
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background: linear-gradient(145deg, #3a3a3a, #2d2d2d);
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  position: relative;
}

.video-container iframe {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  border: 6px solid #111;
  border-radius: 10px;
  background: black;
}

/* Indicateurs de position (optionnel) */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
}

.indicator.active {
  background: #2ecc71;
}

/* Responsive */
@media (max-width: 767px) {
  #wrapper {
    width: 90vw;
    margin-left: -10px; /* Compense le padding */
    padding: 0 5px;
  }

  #carousel {
    width: 90%;
    overflow-x: auto; /* Permet le scroll si nécessaire */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; /* Scroll fluide iOS */
  }

  #content {
    width: max-content; /* Contenu scrollable */
    padding-bottom: 10px; /* Espace pour le scroll */
  }

  .item {
    min-width: 120px; /* Taille réduite */
    height: 120px;
    scroll-snap-align: start; /* Alignement au scroll */
  }

  /* Cache les flèches sur mobile si scroll natif */
  #prev, #next {
    display: none !important;
  }
}
