

/* ============================================
   Modale Vidéo
   ============================================ */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.video-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.video-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  transform: scale(0.9);
  transition: transform 0.4s ease;
}

.video-modal.is-open .video-modal-content {
  transform: scale(1);
}

/* Bouton fermer */
.video-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.3s ease;
}

.video-modal-close::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background-color: white;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.video-modal-close:hover {
  transform: rotate(90deg);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  background-color: #000;
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Fix pour le rendu Drupal Media */
.video-wrapper .media,
.video-wrapper article {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-wrapper .field {
  height: 100%;
}




.video-trigger {
  position: relative;
  width: 100%;
  display: inline-block;
}

.video-trigger > .video__thumbnail > article > img {
  display: block;
  width: 100%;
  height: auto;
  border: none;
  z-index: 1;
}

.video-trigger > button {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  cursor: pointer;
  background: transparent;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-trigger > button::before {
  content: '';
  display: block;
  width: 60px;
  height: 60px;
  background: url("../../images/icons/play.svg") no-repeat center;
  background-size: contain;
}

@media screen and (min-width: 999px) {
  .video-trigger > button::before {
    width: 80px;
    height: 80px;
  }
}
