/* =========================
   GALLERY
   ========================= */

body.gallery-page {
    min-height: 100vh;
    background: url('../img/fond-gallery.png');
	background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.gallery {
      display: grid;
      grid-template-columns: repeat(4, 1fr); 
      padding: 150px 10px 20px 10px; /* On définit des marges égales à gauche et à droite */
      gap: 8px; /* L'espace entre les images */
      width: 100%;
      box-sizing: border-box; /* INDISPENSABLE : inclut le padding dans le calcul des 100% */
      margin: 0;
    }

    .gallery img, 
    .gallery-video-wrapper {
        width: 100%; /* L'image prend 100% de sa case (1/4 de l'écran) */
        height: auto;
        aspect-ratio: 1 / 1; /* Reste bien carrée */
        object-fit: cover;
        border-radius: 4px;
    }

.gallery img:hover,
.gallery video:hover {
    transform: scale(1.03);
}

.gallery-video-wrapper {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.gallery-video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateY(-0px);
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;      /* cercle */
  height: 60px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* laisse passer le clic au parent */
  animation: blink 4s infinite; /* animation clignotement */
}

/* Triangle Play */
.play-overlay::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 18px solid white; /* taille du triangle */
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 3px; /* pour centrer dans le cercle */
}

/* Animation keyframes */
@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0.3; }
}

.gallery-pagination {
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn-prev,
.btn-next {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    background-color: rgba(30, 144, 255, 0.5); /* 0.5 = 50% */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-prev i,
.btn-next i {
    font-size: 14px;
}

.btn-prev:hover,
.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
	border: 1px solid #0066cc;
}


/* =========================
   MODAL
   ========================= */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.8);
}

.modal img,
.modal video {
  max-width: 90vw;
  max-height: 90vh;
  margin: auto;
  display: block;
  z-index: 1000; /* plus bas que la croix */
}

.modal .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  z-index: 9999; 

}

.modal .prev,
.modal .next {
  position: absolute;
  top: 50%;
  font-size: 50px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  padding: 10px;
  transform: translateY(-50%);
  z-index: 1001; /* juste au-dessus des images/videos */
}

.modal .prev {
  left: 30px;
}

.modal .next {
  right: 30px;
}



