/* Reset léger et base */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f9fafb;
  color: #333;
  margin: 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* Titres */
h2 {
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 25px;
  letter-spacing: 1px;
}

/* Conteneur des filtres */
.filters {
  margin-bottom: 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

/* Style des boutons */
.filters button {
  padding: 12px 25px;
  border: 2.5px solid #3498db;
  background-color: #fff;
  color: #3498db;
  font-weight: 600;
  font-size: 16px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgb(52 152 219 / 0.2);
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
  user-select: none;
  min-width: 110px;
  text-align: center;
}

/* Effet au survol */
.filters button:hover:not(.active) {
  background-color: #3498db;
  color: #fff;
  box-shadow: 0 8px 15px rgb(52 152 219 / 0.4);
  transform: translateY(-2px);
}

/* Bouton actif */
.filters button.active {
  background-color: #2980b9;
  border-color: #2980b9;
  color: #fff;
  box-shadow: 0 8px 20px rgb(41 128 185 / 0.6);
  transform: translateY(-2px);
}

/* Galerie */
#gallery {
  max-width: 1000px;
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
  gap: 24px;
  justify-items: center;
}

/* Carte voiture */
.voiture-item {
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow:
    0 4px 8px rgb(0 0 0 / 0.07),
    0 6px 20px rgb(0 0 0 / 0.1);
  width: 220px;
  text-align: center;
  transition: box-shadow 0.3s ease;
  cursor: default;
}

.voiture-item:hover {
  box-shadow:
    0 8px 16px rgb(0 0 0 / 0.15),
    0 12px 30px rgb(0 0 0 / 0.2);
}

.voiture-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #eee;
}

.voiture-item p {
  margin: 12px 15px 20px;
  font-size: 14.5px;
  color: #555;
  font-weight: 500;
  line-height: 1.3;
}

.voiture-item small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  margin-top: 8px;
}

/* Responsive */
@media (max-width: 480px) {
  .filters {
    flex-direction: column;
    gap: 12px;
  }
  .filters button {
    min-width: 100%;
  }
}
