:root {
  --fond: #101b0a;
  --accents: #263022;
  --texte: #ffffff;
  --secondaire: #4caf50;
}
* {
  color: var(--texte);
}
html,
body {
  margin: 0;
  padding: 0;
  max-width: 100vw;
  overflow-x: hidden; /* Empêche le défilement horizontal */
}
body {
  font-family: Arial, sans-serif;
  text-align: center;
  background-color: var(--fond);
}
.filters {
  margin: 2vh;
}
.filter-group {
  margin-bottom: 1vh;
}
.filter-button {
  padding: 1vh 1.5vw;
  margin: 0.5vh;
  border: none;
  border-radius: 1vh;
  cursor: pointer;
  background-color: var(--accents);
  transition: all 0.3s ease-in-out; /* Animation fluide */
  transform: scale(1);
}

.filter-button.active {
  background-color: var(--secondaire);
  transform: scale(1.1); /* Légèrement plus grand pour effet visuel */
}
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 2vh;
  justify-content: center;
}
.photo {
  flex: 1 1 30vh; /* Largeur de base à 30vw, mais s'adapte */
  max-width: 50vh; /* Évite que les images deviennent trop grandes */
  min-width: 50vh;
  max-height: 50vh;
  object-fit: cover;
  border-radius: 1vh;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.photo:hover {
  transform: scale(1.02);
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease-in-out;
}
.modal img {
  max-width: 80vw;
  max-height: 80vh;
  border-radius: 1vh;
  transition: transform 0.3s ease-in-out;
}
.close-modal {
  position: absolute;
  top: 2vh;
  right: 2vw;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5vh 1vw;
  border-radius: 50%;
}
.close-modal:hover {
  background: rgba(255, 255, 255, 0.5);
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.nav-buttons {
  display: flex;
  justify-content: space-between;
  width: 100vw;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.nav-button {
  background: var(--accents);
  border: none;
  padding: 1vh 2vw;
  font-size: 2vh;
  cursor: pointer;
}
.nav-button:hover {
  background-color: var(--secondaire);
}
button {
  font-size: medium;
}
