/* Style de la lightbox et des éléments associés */

.photo-block {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.photo-block__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
  opacity: 0;
}

.photo-block:hover .photo-block__overlay {
  background-color: rgba(0, 0, 0, 0.8);
  opacity: 1;
}

.photo-block__eye {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  position: relative;
}

.photo-block__eye img {
  width: 44px;
  height: 44px;
  transition: transform 0.3s ease;
}

.photo-block__eye:hover img {
  transform: scale(1.1);
}

.photo-block__fullscreen {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
}

.photo-block__fullscreen img {
  width: 34px;
  height: 34px;
  transition: transform 0.3s ease;
}

.photo-block__fullscreen:hover img {
  transform: scale(1.1);
}

.photo-block__infos {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  color: var(--main-color);
  z-index: 2;
}

.photo-block__title,
.photo-block__category {
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
}

.photo-block__ref {
  display: none;
}

/* Lightbox */

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox--visible {
  display: flex;
}

/* Nouveau conteneur pour image + infos */
.lightbox__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}

.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--main-color);
  font-size: 30px;
  cursor: pointer;
  z-index: 1002;
}

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 20px;
}

.lightbox__prev {
  left: 20px;
}

.lightbox__next {
  right: 20px;
}

.lightbox__nav img {
  width: 30px;
  height: 30px;
}

.lightbox__infos {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding-top: 15px;
  color: var(--main-color);
}

.lightbox__ref,
.lightbox__category {
  text-transform: uppercase;
}

/* Style pour les écrans plus petits */

@media (max-width: 1024px) {
  .lightbox {
    padding: 20px;
  }

  .lightbox__prev,
  .lightbox__next {
    padding: 10px;
    top: 95%;
  }

  .lightbox__prev {
    left: 10px;
  }

  .lightbox__next {
    right: 10px;
  }
}

@media (max-width: 768px) {
  .lightbox {
    background-color: rgba(0, 0, 0, 0.95);
  }
  .lightbox__prev,
  .lightbox__next {
    padding: 10px;
    top: 90%;
  }
}