/* Styles spécifiques pour les vidéos */
.gallery-item video {
  position: relative;
  cursor: pointer;
}

/* Overlay pour les vidéos avec bouton Play */
.gallery-item:has(video)::before {
  content: '\f04b'; /* Code Font Awesome pour l'icône "Play" */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900; /* Nécessaire pour les icônes solides */
  font-size: 3rem; /* Taille du bouton Play */
  color: rgba(255, 255, 255, 0.9);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Centrage précis */
  z-index: 2;
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
  pointer-events: none; /* Permet le clic sur la vidéo elle-même */
}

.gallery-item:has(video)::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255, 77, 0, 0.3) 0%, rgba(138, 43, 226, 0.3) 100%);
  z-index: 1;
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
  pointer-events: none;
}

/* Afficher l'overlay au survol */
.gallery-item:hover:has(video)::before,
.gallery-item:hover:has(video)::after {
  opacity: 1;
}

/* Overlay pour les images */
.gallery-item:not(:has(video))::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255, 77, 0, 0.3) 0%, rgba(138, 43, 226, 0.3) 100%);
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
  pointer-events: none;
}

.gallery-item:hover:not(:has(video))::after {
  opacity: 1;
}

/* Styles pour les contrôles vidéo */
.gallery-item video::-webkit-media-controls {
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item video:hover::-webkit-media-controls {
  opacity: 1;
}

/* Fallback pour les navigateurs qui ne supportent pas :has() */
@supports not (selector(:has(video))) {
  .gallery-item video {
    position: relative;
  }
  
  .gallery-item video::before {
    content: '\f04b';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
  }
  
  .gallery-item:hover video::before {
    opacity: 1;
  }
}

/* Ajout d'un effet de marque Teepana sur les vidéos */
.gallery-item::before {
  content: 'TEEPANA';
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
  letter-spacing: 1px;
}

.gallery-item:hover::before {
  opacity: 1;
}