/* Lightbox — mêmes dimensions que La Ligne d'eau */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #F1F1F1;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.lightbox.active {
  display: flex;
}

.lightbox-image-container {
  position: relative;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 100vw !important;
  min-height: 100vh !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  box-sizing: border-box;
  margin: 0 !important;
}

.lightbox-image {
  max-width: 68.6vw !important;
  max-height: 68.6vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  display: block;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.lightbox.active .lightbox-image-container .lightbox-image {
  max-width: 68.6vw !important;
  max-height: 68.6vh !important;
  width: auto !important;
  height: auto !important;
}

@media (max-width: 1919px), (max-height: 1079px) {
  .lightbox-image,
  .lightbox.active .lightbox-image-container .lightbox-image,
  #lightbox-image,
  #lightbox #lightbox-image {
    max-width: 90.16vw !important;
    max-height: 90.16vh !important;
  }
}

@media (min-width: 2560px) {
  .lightbox-image,
  .lightbox.active .lightbox-image-container .lightbox-image,
  #lightbox-image,
  #lightbox #lightbox-image {
    max-width: 68.6vw !important;
    max-height: 68.6vh !important;
  }
}

@media (max-width: 1023px) {
  .lightbox-image,
  .lightbox.active .lightbox-image-container .lightbox-image,
  #lightbox-image,
  #lightbox #lightbox-image {
    max-width: 90vw !important;
    max-height: 90vh !important;
  }
}

@media (max-width: 599px) {
  .lightbox-image,
  .lightbox.active .lightbox-image-container .lightbox-image,
  #lightbox-image,
  #lightbox #lightbox-image {
    max-width: 95vw !important;
    max-height: 90vh !important;
  }
}

.lightbox.active,
.lightbox.active * {
  max-width: none !important;
}

.lightbox.active .lightbox-image-container {
  max-width: none !important;
  max-height: none !important;
  width: 100vw !important;
  height: 100vh !important;
}

#lightbox-image,
#lightbox #lightbox-image {
  max-width: 68.6vw !important;
  max-height: 68.6vh !important;
  width: auto !important;
  height: auto !important;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: #000000;
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 1001;
  background: transparent;
  border: none;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #000000;
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: transparent;
  border: none;
  z-index: 1001;
  transition: opacity 0.3s ease;
}

.lightbox-nav:hover {
  opacity: 0.7;
}

.lightbox-nav.prev {
  left: 2rem;
}

.lightbox-nav.next {
  right: 2rem;
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .lightbox-nav.prev {
    left: 1rem;
  }

  .lightbox-nav.next {
    right: 1rem;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
  }
}
