:root {
  --bg-dark: #0a0a0a;
  --bg-card: #1a1a1a;
  --primary-orange: #ff6b00;
  --primary-orange-hover: #e66000;
  --text-light: #ffffff;
  --text-gray: #a3a3a3;
  --border-color: #333333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
}

/* Navbar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  background-color: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.logo span {
  color: var(--primary-orange);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-orange);
}

.btn-primary {
  background-color: var(--primary-orange);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-primary:hover {
  background-color: var(--primary-orange-hover);
}

/* Hero Section */
.hero {
  height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)), url('https://images.unsplash.com/photo-1603584173870-7f23fdae1b7a?auto=format&fit=crop&q=80') center/cover;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-gray);
  max-width: 600px;
  margin-bottom: 2rem;
}

/* Search Bar */
.search-bar {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  border: 1px solid var(--border-color);
}

.search-bar select {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 1rem;
  outline: none;
}

.search-bar select option {
  background: var(--bg-card);
}

/* Section Title */
.section-title {
  text-align: center;
  margin: 4rem 0 2rem;
  font-size: 2rem;
}

.section-title span {
  color: var(--primary-orange);
}

/* Cars Grid */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 0 5%;
  margin-bottom: 4rem;
}

.car-card {
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.3s, border-color 0.3s;
}

.car-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-orange);
}

.car-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.car-details {
  padding: 1.5rem;
}

.car-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.car-price {
  color: var(--primary-orange);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.car-specs {
  display: flex;
  justify-content: space-between;
  color: var(--text-gray);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

/* =========================================
   RESPONSIVE (Mobiles & Tablettes)
   ========================================= */
@media screen and (max-width: 768px) {
  nav {
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
  }

  .hero {
    height: 50vh;
    padding: 0 15px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .search-bar {
    flex-direction: column;
    width: 100%;
  }
  
  .search-bar select, .search-bar .btn-primary {
    width: 100%;
  }

  .cars-grid {
    grid-template-columns: 1fr; /* 1 seule colonne sur mobile */
    padding: 0 15px;
    gap: 1rem;
  }
  
  .car-specs {
    flex-direction: column;
    gap: 0.5rem;
  }
}
