/* Styles pour la popup vidéo */
.video-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-popup-overlay.active {
  opacity: 1;
}

.video-popup-container {
  position: relative;
  width: 80%;
  max-width: 850px;
  padding-bottom: 42%; /* Ratio 16:9 serait 56.25%, on réduit à 42% */
  height: 0;
}

.video-popup-close {
  position: absolute;
  top: -50px;
  right: 0;
  color: white;
  font-size: 36px;
  cursor: pointer;
  z-index: 10000;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
}

.video-popup-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

body.video-popup-open {
  overflow: hidden;
}

/* Style pour le bouton de lecture */
@keyframes pulse-play {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.video-play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  position: relative;
  z-index: 5;
  animation: pulse-play 2s infinite ease-in-out;
}

.video-play-button:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.15);
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
}

.video-play-button .icon {
  font-size: 32px;
  color: #fff;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Rendre le conteneur du bouton de lecture transparent sur le hero
   (écrase l'arrière-plan sombre défini dans le thème) */
.slider-text .play-video {
  background: transparent;
}

/* Adaptation mobile */
@media (max-width: 767px) {
  .video-popup-container {
    width: 95%;
    padding-bottom: 53%; /* Légèrement plus haut sur mobile pour une meilleure visibilité */
  }
  
  .video-popup-close {
    top: -45px;
    right: 5px;
    font-size: 32px;
    width: 35px;
    height: 35px;
    line-height: 35px;
  }
  
  .video-play-button {
    width: 65px;
    height: 65px;
    border-width: 1.5px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  }
  
  .video-play-button .icon {
    font-size: 26px;
  }
  
  @keyframes pulse-play {
    0% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
    }
    50% {
      transform: scale(1.04);
      box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
    100% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
  }
}

/* Adaptation pour très petits écrans */
@media (max-width: 480px) {
  .video-popup-container {
    width: 100%;
    padding-bottom: 56%; /* Ratio standard 16:9 */
  }
  
  .video-popup-close {
    top: -40px;
    right: 10px;
  }
}
