/* Styles pour la lightbox de la galerie */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.lightbox-container {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.active .lightbox-container {
  transform: scale(1);
}

.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
  border: 3px solid white;
}

.lightbox-caption {
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 16px;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  margin-top: 10px;
  border-radius: 5px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 20px;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
}

.lightbox-prev {
  left: -60px;
}

.lightbox-next {
  right: -60px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Animation pour les transitions entre images */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-image.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

/* Styles pour les appareils mobiles */
@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
  
  .lightbox-prev {
    left: -45px;
  }
  
  .lightbox-next {
    right: -45px;
  }
  
  .lightbox-caption {
    font-size: 14px;
    padding: 10px;
  }
}
