.gallery-main {
  margin-top: 100px; /* ajuster selon la hauteur exacte de ton header */
}

/* Mobile first : 3 colonnes */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 colonnes égales */
  gap: 10px;
  max-width: 100%;
  margin: 20px auto;
  padding: 0 10px;
}

.gallery-item img {
  width: 100%;
  height: 120px; /* hauteur pour renforcer uniformité comme Instagram */
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Tablettes : 3 colonnes aussi */
@media (min-width: 601px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 600px;
  }
  .gallery-item img {
    height: 150px;
  }
}

/* Bureau : 4 colonnes à partir de 901px */
@media (min-width: 901px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
  }
  .gallery-item img {
    height: 180px;
  }
}

/* Lightbox overlay */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.lightbox[aria-hidden="false"] {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 0 30px white;
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: #ccc;
}
