/* Styles généraux */
body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  background: white;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid #eee;
  position: relative; /* Nécessaire pour le positionnement absolu du logo Instagram */
}

.logo img {
  height: 40px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav ul li a {
  text-decoration: none;
  color: inherit;
  padding: 0.5rem 0;
  display: inline-block;
  transition: all 0.3s ease;
}

nav ul li.active a {
  color: #007bff;
  font-weight: 400;
}

nav ul li:hover a {
  color: #0056b3;
}

.social img {
  height: 24px;
}

/* Galerie */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 10px;
  padding: 2rem;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1; /* carré */
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
}

/* Bouton "Voir plus de photos" */
#loadMore {
  display: block;
  margin: 0 auto 2rem;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  background: white;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#loadMore:hover {
  border-color: #999;
  background-color: #f8f8f8;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox img {
  max-width: 80%;
  max-height: 80%;
}

.hidden {
  display: none;
}

#lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10; /* Pour que la croix soit toujours au-dessus de l'image */
}

/* Responsivité */
@media (max-width: 1024px) {
  /* Réduction de l'espacement et des tailles pour les tablettes */
  header {
    padding: 1rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  #loadMore {
    font-size: 1rem;
  }

  #lightbox-close {
    font-size: 35px;
    top: 5px;
    right: 5px;
  }
}

@media (max-width: 768px) {
  /* Adaptation pour les smartphones */
  header {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  nav ul {
    display: flex; /* Pour afficher les éléments du menu côte à côte */
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
  }

  .logo img {
    height: 30px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    padding: 1rem;
  }

  #loadMore {
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
  }

  #lightbox-close {
    font-size: 30px;
    top: 5px;
    right: 5px;
  }

  /* Positionner Instagram dans le coin supérieur droit sur mobile */
  .social {
    position: absolute;
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 480px) {
  /* Ajustements supplémentaires pour les très petits écrans */
  .gallery {
    grid-template-columns: 1fr;
    padding: 0.5rem;
  }

  .logo img {
    height: 25px;
  }

  #loadMore {
    font-size: 1.1rem;
    padding: 0.6rem 1.2rem;
  }
}
