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

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

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.lightbox-caption {
  color: white;
  margin-top: 1rem;
  font-size: 1.2rem;
  text-align: center;
  max-width: 80%;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: -40px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  transition: transform 0.3s ease;
}

.lightbox-close:hover {
  transform: scale(1.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 1010;
}

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

.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Animation pour l'ouverture de la lightbox */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-content {
  animation: zoomIn 0.3s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .lightbox-close {
    top: 10px;
    right: 10px;
  }
  
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    margin: 0 10px;
  }
}
