/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #111;
  font-family: 'Inter', sans-serif;
  color: white;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Header */
h1 {
  font-family: 'Syncopate', sans-serif;
  text-align: center;
  padding: 80px 30px 40px;  /* garde le gros padding pour qu'il soit visible sous la navbar */
  font-size: 32px;
  letter-spacing: 2px;
  background-color: #181818;
}


/* Navigation */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 60px;
  width: 100%;
  background-color: #181818;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.top-nav .burger {
  display: none; /* visible seulement sur mobile */
  font-size: 28px;
  cursor: pointer;
  color: white;
  margin-left: 20px;
}

.top-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

.top-nav a {
  text-decoration: none;
  font-weight: 600;
  color: #ccc;
  font-size: 14px;
  transition: color 0.3s;
}

.top-nav a:hover,
.top-nav a.active {
  color: white;
}

/* Grille */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  padding: 100px 50px 50px;
  max-width: 1500px;
  margin: 0 auto;
}


/* Carte Marque */
.car-card {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* ratio 16:9 pour éviter les images allongées */
  overflow: hidden;
  border-radius: 20px;
  text-decoration: none;
  margin-bottom: 30px; /* espace entre les cartes */
}

.car-card img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}


/* Si besoin de décaler certaines images vers le bas */
.car-card.bmw img {
  object-position: center 65%;
}

/* Overlay sombre */
.car-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
  transition: background 0.4s ease;
  z-index: 1;
}

/* Effet au survol */
.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 10px 15px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none; /* pour que le hover soit sur la carte */
}

.car-card:hover .overlay {
  opacity: 1;
  pointer-events: auto;
}

.photo-meta {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 5px;
}

.overlay h2 {
  margin: 0;
  font-family: 'Syncopate', sans-serif;
  font-size: 20px;
  font-weight: 600;
}

/* Label texte */
.label {
  position: absolute;
  bottom: 40%;
  width: 100%;
  text-align: center;
  font-size: 30px;
  font-weight: 600;
  font-family: 'Syncopate', sans-serif;
  color: white;
  z-index: 2;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s ease, transform 0.4s ease;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.shift-down {
    object-position: center 65%;
}

.shift-down1 {
    object-position: center 60%;
}

/* Afficher le label au survol */
.car-card:hover .label {
  opacity: 1;
  transform: scale(1.2);
}

/* Footer */
footer {
  background-color: #18231e;
  padding: 30px 0;
  text-align: center;
  color: #ccc;
  font-size: 14px;
  margin-top: 40px;
}

footer a {
  color: #ccc;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Version mobile */
@media (max-width: 800px) {
  .top-nav {
    justify-content: space-between;
    padding: 0 20px;
  }

  .top-nav .burger {
    display: block;
  }

  .top-nav ul {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: #181818;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
  }

  .top-nav ul.active {
    display: flex;
  }

  .gallery {
    grid-template-columns: 1fr;
    padding: 120px 20px 30px;
    gap: 20px;
  }

  .car-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  header h1 {
    font-size: 20px;
    padding: 60px 30px;
  }

  .label {
    font-size: 20px;
  }
}
