#photos { 
    scroll-margin-top: 80px; /* Ajuste cette valeur selon la hauteur de ton header */
}

.gallery {
    background-color: var(--beige);
    padding: 40px 20px 60px 20px;
    text-align: center;
}

.gallery h2 {
    font-family: 'Lobster', cursive;
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--bordeaux);
}

/* Grille responsive */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 10px;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 1/1; /* carré */
    overflow: hidden;
    border-radius: 10px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Lightbox overlay */
/* 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.show {
  display: flex;
}

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

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.3s ease;
}

.lightbox-close {
  top: 20px;
  right: 30px;
  transform: none;
  font-size: 2.5rem;
}

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

.lightbox-arrow-left {
  left: 20px;
}

.lightbox-arrow-right {
  right: 20px;
}


/* Bureau : 6 colonnes à partir de 901px */
@media (min-width: 901px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr); /* 6 colonnes */
    max-width: 1200px; /* ou ajuste selon ton design */
  }
  .gallery-item img {
    height: 400px; /* tu peux ajuster la hauteur si besoin */
  }
}
