/* Section Vidéos */
.videos-section {
  padding: 4rem 2rem;
  background-color: #fff;
  text-align: center;
}

.videos-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.videos-container h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #000;
  position: relative;
  display: inline-block;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

/* Carrousel de vidéos */
.videos-carousel {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  padding: 0 40px;
  box-sizing: border-box;
}

.videos-wrapper {
  width: 100%;
  position: relative;
  min-height: 400px;
  overflow: hidden;
  margin: 0 auto;
  max-width: 900px;
}

.slides-container {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
  height: 100%;
  cursor: grab; /* Curseur pour indiquer le drag */
}

.slides-container.grabbing {
  cursor: grabbing; /* Curseur pendant le drag */
  transition: none; /* Pas de transition pendant le drag */
}

.video-item {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  padding: 0 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-user-select: none; /* Empêcher la sélection de texte */
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none; /* Empêcher le menu contextuel sur iOS */
  -webkit-tap-highlight-color: transparent; /* Supprimer le highlight bleu sur mobile */
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 843px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background: #000;
  aspect-ratio: 16/9;
}

.video-wrapper:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  outline: none;
  border: none;
  background: #000;
}

.video-info {
  padding: 1.2rem;
  text-align: left;
  background: white;
  border-radius: 0 0 12px 12px;
  width: 100%;
  max-width: 843px;
  margin: 0 auto;
  box-sizing: border-box;
}

.video-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: #333;
}

/* Flèches de navigation - Cachées sur mobile */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
  transition: all 0.3s ease;
}

.carousel-arrow:hover {
  background: var(--jaune);
  color: #000;
}

.prev-video {
  left: 10px;
}

.next-video {
  right: 10px;
}

/* Pagination */
.video-pagination {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  gap: 8px;
}

.pagination-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-dot.active {
  background: var(--jaune);
  transform: scale(1.2);
}

/* Messages d'état */
.loading-videos, .no-videos, .error-message {
  padding: 2rem;
  color: #666;
  font-style: italic;
  text-align: center;
}

.error-message {
  color: #d32f2f;
}

h2 .accent {
  display: block;
  width: 60px;
  height: 4px;
  background: var(--jaune);
  margin: 0.5rem auto 1.5rem;
  border-radius: 2px;
}

/* ==================== */
/* RESPONSIVE MOBILE */
/* ==================== */

@media (max-width: 768px) {
  .videos-section {
    padding: 2rem 0.5rem;
  }
  
  .videos-container h2 {
    font-size: 1.8rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
  }
  
  .videos-carousel {
    padding: 0 10px;
  }
  
  .videos-wrapper {
    min-height: 300px;
    /* Permettre le scroll tactile */
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y; /* Permettre le scroll vertical mais pas horizontal */
  }
  
  /* Cacher les flèches sur mobile */
  .carousel-arrow {
    display: none;
  }
  
  /* Adapter le conteneur pour le swipe */
  .slides-container {
    cursor: grab;
  }
  
  .video-wrapper {
    background: transparent;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    aspect-ratio: 9/16;
  }
  
  .video-wrapper video {
    object-fit: cover;
    background: transparent;
  }
  
  .video-item {
    padding: 0 5px;
  }
  
  .video-wrapper {
    border-radius: 8px;
  }
  
  .video-info {
    padding: 0.8rem;
  }
  
  .video-info h3 {
    font-size: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .videos-wrapper {
    min-height: 250px;
  }
  
  .video-wrapper {
    aspect-ratio: 9/16;
    border-radius: 6px;
  }
  
  .video-info {
    padding: 0.6rem;
  }
  
  .video-info h3 {
    font-size: 0.9rem;
  }
}
