/* ============================
 *    MAJ : 2025 04 25 23h50
 * ============================ */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
  display: flex;
  opacity: 1;
}

.lightbox-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: transparent;
}

.lightbox-info-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.5);
  text-align: center;
  z-index: 2;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-species {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0;
  color: white;
  display: inline;
}

.lightbox-location {
  font-size: 1rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 0 10px;
  display: inline;
}

.lightbox-image-container {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Légende et copyright collés au bas */
.lightbox-caption-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.5);
  text-align: center;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  z-index: 2;
}

.lightbox-caption {
  margin-bottom: 10px;
  color: white;
  font-size: 1.1rem;
  line-height: 1.5;
}

.lightbox-copyright {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 10px;
}

.lightbox-author {
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  display: inline-block;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 1001;
  pointer-events: none;
}

.lightbox-nav button {
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.lightbox-nav button:hover {
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 1;
  transform: scale(1.1);
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}

.lightbox-close:hover {
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 1;
  transform: scale(1.1);
}

.lightbox-loading {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top: 5px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 1000;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

figure.on-img_slider {
  position: relative;
  cursor: zoom-in;
}

figure.on-img_slider .monimage {
  transition: opacity 0.3s ease;
}

figure.on-img_slider::after {
  content: '🔍';
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0.4;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

figure.on-img_slider:hover::after {
  opacity: 0.8;
}

.loupe, .on-zoom {
  position: absolute;
  top: 15px !important;
  right: 15px !important;
  left: auto !important;
  width: 40px !important;
  height: 40px !important;
  background-color: rgba(0, 0, 0, 0.6) !important;
  color: white;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px;
  opacity: 0.4 !important;
  transition: opacity 0.3s ease !important;
  z-index: 10 !important;
  cursor: zoom-in !important;
}

.loupe:hover, .on-zoom:hover {
  opacity: 0.9 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .lightbox-info-header {
    padding: 10px;
  }
  
  .lightbox-species {
    font-size: 1.4rem;
  }
  
  .lightbox-caption {
    font-size: 1rem;
  }
  
  .lightbox-nav button {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .lightbox-close {
    width: 35px;
    height: 35px;
    font-size: 16px;
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  .lightbox-species {
    font-size: 1.2rem;
  }
  
  .lightbox-location {
    font-size: 0.9rem;
  }
  
  .lightbox-nav {
    padding: 0 10px;
  }
  
  .lightbox-nav button {
    width: 35px;
    height: 35px;
  }
}