* {
  box-sizing: border-box;
  margin: 0;
}


/* GRID */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 10px;
}

.gallery img {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: 60% 10%;
  /*border-radius: 10px;*/
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.6s ease-in-out;
  /*transition: transform 0.6s ease-in-out;*/
  
}


/* Zoom hover */
.gallery img:hover {
  opacity: 0.7;
  /*transform: scale(1.08);*/
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* état visible */
.lightbox.show {
  opacity: 1;
  visibility: visible;
}

/* effet sur l'image */
.lightbox img {
  max-height: 600px;
  max-width: 90%;
  transform: scale(1.5);
  transition: transform 0.6s ease;
  /*border-radius: 10px;*/
}

.lightbox.show img {
  transform: scale(1);
}

/* image affichée */
.lightbox img {
  max-height: 800px;
  max-width: 90%;
}

/* boutons */
.lightbox span {
  position: absolute;
  color: white;
  font-size: 30px;
  cursor: pointer;
  user-select: none;
}

/* positions */
.close {
  top: 10px;
  left: 10px;
}

.prev {
  left: 2px;
  top: 50%;
  transform: translateY(-55%);
}

.next {
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
}

.btn-down {
    margin: 0px 10px;
    padding: 0px 10px;
    border: solid 1px;
    border-radius: 5px;
    transition: color 0.6s ease-in-out;
}

.btn-down :hover {
        color: #000;
}

/* RESPONSIVE */
@media (max-width: 768px) {

  .gallery {
    grid-template-columns: repeat(1, 1fr);
  }
}
