/* ==========================
   PAGE RÉALISATIONS
========================== */

/* Grille des thèmes */
.themes-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Chaque thème */
.theme {
  width: 250px;
  text-align: center;
}

.theme h2 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #b1a353;
}

/* Image preview cliquable */
.preview {
  cursor: pointer;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.preview:hover img {
  transform: scale(1.05);
}

/* Galerie cachée (lightbox) */
.gallery {
  display: none;
}

/* Lightbox plein écran */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Boutons navigation & fermeture */
.lightbox .close,
.lightbox .prev,
.lightbox .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 2em;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  transition: background 0.3s ease;
}

.lightbox .close {
  top: 30px;
  right: 30px;
  transform: none;
}

.lightbox .prev {
  left: 40px;
}

.lightbox .next {
  right: 40px;
}

.lightbox .close:hover,
.lightbox .prev:hover,
.lightbox .next:hover {
  background: rgba(255,255,255,0.2);
}

/* Diaporama interne aux thèmes */
.diaporama {
  position: relative;
  max-width: 800px;
  margin: 20px auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.diaporama img {
  opacity: 0;
  transition: opacity 0.8s ease;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.diaporama img.active {
  opacity: 1;
  position: relative;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .themes-grid {
    gap: 20px;
    padding: 40px 15px;
  }

  .theme {
    width: 45%;
  }

  .preview img {
    height: 150px;
  }
}

@media (max-width: 480px) {
  .theme {
    width: 100%;
  }

  .preview img {
    height: 180px;
  }
}



/* Vidéo lightbox */
#lightbox-video {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
}

/* Icône lecture */
.video-preview {
  position: relative;
}

.video-preview .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 60px;
  color: white;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  padding: 10px 18px;
  pointer-events: none;
}





/* ===== BLOC VIDÉO PLEINE LARGEUR ===== */
.theme.video {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Titre vidéo centré */
.theme.video h2 {
  text-align: center;
  margin-bottom: 20px;
}

/* Vignette vidéo centrée */
.theme.video .video-preview {
  width: 400px;
  max-width: 90%;
}


/* ===== CORRECTION DESKTOP VIDÉO ===== */
.theme.video {
  width: 100% !important;
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.theme.video .video-preview {
  width: 500px;
  max-width: 90%;
}





