/* ===== FONTS (Inter variable, auto-hébergée) ===== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-var.woff2') format('woff2');
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root, [data-theme="dark"] {
  /* Surfaces */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #1a1a24;
  --bg-card: #16161f;
  --bg-card-hover: #1e1e2a;
  --bg-elevated: #1c1c28;
  --bg-muted: #0f0f14;

  /* Texte */
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text: #f4f4f5;
  --text-inverse: #0a0a0f;

  /* Accent marque (vert Autohaus) */
  --accent: #0d7a3f;
  --accent-hover: #0a6332;
  --accent-light: #22c55e;
  --accent-soft: rgba(13, 122, 63, 0.15);
  --accent-ring: rgba(34, 197, 94, 0.35);

  /* Secondaires */
  --gold: #d4a017;
  --gold-soft: rgba(212, 160, 23, 0.15);
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* Bordures & ombres */
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-strong: rgba(255, 255, 255, 0.22);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);

  /* Header / overlays */
  --header-bg: rgba(10, 10, 15, 0.88);
  --header-bg-scrolled: rgba(10, 10, 15, 0.96);
  --overlay: rgba(10, 10, 15, 0.75);
  --overlay-soft: rgba(10, 10, 15, 0.45);

  /* Formulaires */
  --input-bg: #111118;
  --input-bg-focus: #16161f;
  --input-color: #f4f4f5;
  --input-placeholder: #71717a;
  --input-border: rgba(255, 255, 255, 0.1);
  --input-border-focus: var(--accent-light);

  /* Divers */
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --logo-filter: none;
  --scrollbar-track: #111118;
  --scrollbar-thumb: #2a2a36;
}

[data-theme="light"] {
  /* Surfaces */
  --bg-primary: #f4f5f7;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eef0f3;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fb;
  --bg-elevated: #ffffff;
  --bg-muted: #e8eaee;

  /* Texte */
  --text-primary: #111118;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --text: #111118;
  --text-inverse: #ffffff;

  /* Accent marque */
  --accent: #0d7a3f;
  --accent-hover: #0a6332;
  --accent-light: #16a34a;
  --accent-soft: rgba(13, 122, 63, 0.1);
  --accent-ring: rgba(13, 122, 63, 0.25);

  /* Secondaires */
  --gold: #b8860b;
  --gold-soft: rgba(184, 134, 11, 0.12);
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #2563eb;

  /* Bordures & ombres */
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.14);
  --border-strong: rgba(0, 0, 0, 0.2);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.12);

  /* Header / overlays */
  --header-bg: rgba(255, 255, 255, 0.9);
  --header-bg-scrolled: rgba(255, 255, 255, 0.97);
  --overlay: rgba(15, 15, 20, 0.7);
  --overlay-soft: rgba(15, 15, 20, 0.4);

  /* Formulaires */
  --input-bg: #f4f5f7;
  --input-bg-focus: #ffffff;
  --input-color: #111118;
  --input-placeholder: #9ca3af;
  --input-border: rgba(0, 0, 0, 0.1);
  --input-border-focus: var(--accent);

  --logo-filter: none;
  --scrollbar-track: #eef0f3;
  --scrollbar-thumb: #c4c8d0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.45s ease, color 0.35s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  border: none;
  outline: none;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  will-change: background-color;
}

.header.scrolled {
  background: var(--header-bg-scrolled);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.3px;
}

.logo span {
  color: var(--accent-light);
}

.logo img {
  /* logo.png : emblème + wordmark blancs (ratio large ~3.3:1) — dimensionné par hauteur */
  height: 46px;
  width: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Mode clair : le logo blanc passe en noir pour rester lisible. Mode sombre : blanc natif. */
[data-theme="light"] .logo img {
  filter: invert(1);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--text-primary);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

/* Dropdown Plus */
.nav-item {
  position: relative;
}

.nav-item > a {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 0;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  z-index: 100;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(8px);
}

.dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.dropdown a:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.dropdown a::after {
  display: none;
}

.dropdown-divider {
  height: 1px;
  margin: 8px 12px;
  background: var(--border);
  opacity: 0.8;
}

/* ===== Menu « Plus » : bloc choix de la langue (widget GTranslate) ===== */
.lang-menu {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.lang-menu-title {
  display: block;
  padding: 6px 20px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lang-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 20px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

[data-theme="light"] .lang-menu-item:hover {
  background: var(--accent-soft);
}

.lang-menu-item.active {
  color: var(--accent-light);
  font-weight: 700;
}

.lang-menu-item.active::after {
  content: '✓';
  margin-left: auto;
  font-size: 0.8rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
}

.catalog-show-all-btn {
  display: block;
  margin: 32px auto 8px;
  padding: 12px 28px;
  font-size: 1rem;
  cursor: pointer;
}

.catalog-show-all-btn[hidden] {
  display: none;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: 10px;
}

.mobile-toggle {
  display: none;
  background: none;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-toggle:hover,
.mobile-toggle:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 10, 15, 0.88) 0%, rgba(10, 10, 15, 0.55) 45%, rgba(10, 10, 15, 0.25) 100%);
  z-index: 1;
  transition: background 0.45s ease;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 60px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--accent-light);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  color: var(--accent-light);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.hero-stat strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-stat span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== SECTIONS ===== */
section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}

.section-header .label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  background: var(--bg-secondary);
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.step-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.step-number {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 auto 24px;
}

.step-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== VEHICLES ===== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
  justify-content: center;
}

.filter-btn {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Advanced Filters Panel */
.filters-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 40px;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.filter-search {
  flex: 1;
  min-width: 220px;
}

.filter-search input {
  width: 100%;
  padding: 12px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.filter-search input::placeholder {
  color: var(--text-muted);
}

.filter-select {
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  min-width: 160px;
  cursor: pointer;
}

.filter-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.filter-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.filters-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.btn-reset {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-reset:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

@media (max-width: 768px) {
  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-select {
    width: 100%;
  }
}

.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.vehicle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  contain: layout style paint;
}

.vehicle-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.vehicle-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--bg-muted);
}

.vehicle-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.vehicle-card:hover .vehicle-image img {
  transform: scale(1.08);
}

.vehicle-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}

.badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-featured {
  background: #1e3a8a;
  color: #fff;
}

.badge-promo {
  background: #f59e0b;
  color: #000;
}

.badge-category {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  backdrop-filter: blur(4px);
  margin-left: auto;
}

.vehicle-body {
  padding: 20px;
}

.vehicle-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
  color: var(--text-primary);
}

.vehicle-specs {
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.vehicle-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.price-main {
  font-size: 1.4rem;
  font-weight: 700;
}

.price-old {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-right: 6px;
}

.detail-badge-promo {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--accent, #d4af37);
  color: #111;
  vertical-align: middle;
}

.price-month {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-outline-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline-sm:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===== BRANDS ===== */
.brands {
  background: var(--bg-secondary);
  padding: 60px 0;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 20px;
  opacity: 1;
}

.brand-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  text-align: center;
}

.brand-item img {
  height: 36px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  filter: var(--logo-filter);
  opacity: 0.85;
}

.brand-item:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.brand-item:hover img {
  opacity: 1;
}

/* ===== PROCESS ===== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.process-step {
  display: flex;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}

.process-step:hover {
  border-color: var(--border-hover);
}

.process-num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(37, 99, 235, 0.15);
  color: var(--accent-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.process-step h4 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.process-step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== SERVICES ===== */
.services {
  background: var(--bg-secondary);
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition);
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-ring);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-form-feedback {
  min-height: 22px;
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

.contact-form-feedback.success {
  color: var(--success);
}

.contact-form-feedback.error {
  color: var(--danger);
}

[data-theme="light"] .services {
  background: var(--bg-primary);
}

[data-theme="light"] .service-card {
  background: var(--bg-card);
  border-color: var(--border-strong);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .service-card h3 {
  color: var(--text-primary);
}

[data-theme="light"] .service-card p {
  color: var(--text-secondary);
}

/* ===== STATS ===== */
.stats {
  padding: 80px 0;
  background: var(--bg-secondary);
  content-visibility: auto;
  contain-intrinsic-size: 0 200px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item strong {
  display: block;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent-light);
  margin-bottom: 8px;
}

.stat-item span {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ===== WHY US ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  gap: 16px;
  transition: var(--transition);
}

.why-card:hover {
  border-color: var(--border-hover);
}

.why-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(37, 99, 235, 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.why-card h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.why-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== TESTIMONIALS ===== */
.testimonials {
  background: var(--bg-secondary);
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
}

.testimonial-card:hover {
  border-color: var(--border-hover);
}

.stars {
  color: #fbbf24;
  font-size: 1rem;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.testimonial-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.author-info strong {
  display: block;
  font-size: 0.95rem;
}

.author-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== CONTACT ===== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.contact-info > p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-item-icon {
  width: 42px;
  height: 42px;
  background: rgba(37, 99, 235, 0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.contact-item span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 80px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 16px;
  max-width: 280px;
}

.footer h4 {
  font-size: 1rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== MOBILE ===== */
@media (max-width: 1024px) {
  .steps {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 68px;
  }

  /* Perf mobile : le blur du header coûte cher en scroll sur GPU faibles */
  .header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--header-bg-scrolled);
  }

  .logo img {
    height: 38px;
  }

  .header-actions {
    gap: 8px;
  }

  .theme-toggle,
  .mobile-toggle {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }

  .lang-toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
  }

  .nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    border-bottom: 1px solid var(--border);
    gap: 2px;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav.open {
    display: flex;
  }

  .nav-item:hover .dropdown {
    opacity: 0;
    visibility: hidden;
    transform: none;
  }

  .nav-item .dropdown {
    position: static;
    transform: none;
    opacity: 0;
    visibility: hidden;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 12px;
    min-width: auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, visibility 0.25s ease;
  }

  .nav-item.open .dropdown {
    max-height: 800px;
    opacity: 1;
    visibility: visible;
  }

  .nav-more-toggle svg {
    transition: transform 0.3s ease;
  }

  .nav-item.open .nav-more-toggle svg {
    transform: rotate(180deg);
  }

  .dropdown a {
    min-height: 36px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    line-height: 1.25;
  }

  .nav > a,
  .nav-more-toggle {
    min-height: 42px;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    line-height: 1.25;
  }

  .nav a::after {
    bottom: 4px;
    left: 12px;
  }

  .mobile-toggle {
    display: block;
  }

  .header-actions .btn {
    display: none;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  section {
    padding: 70px 0;
  }
}

/* ===== PAGE HERO ===== */
.page-hero {
  position: relative;
  padding: 160px 0 80px;
  text-align: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  transition: opacity 0.45s ease;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,15,0.45) 0%, rgba(10,10,15,0.75) 100%);
  z-index: 1;
  transition: background 0.45s ease;
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

.page-hero .label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-light);
  margin-bottom: 16px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.page-hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp 0.7s ease forwards;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ===== CHAT WIDGET ===== */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: Inter, system-ui, sans-serif;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.chat-toggle:hover { transform: scale(1.05); }

.chat-panel {
  display: none;
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  overflow: hidden;
  flex-direction: column;
}

.chat-widget.open .chat-panel { display: flex; }

.chat-header {
  background: var(--accent);
  color: #fff;
  padding: 16px 18px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.chat-messages {
  height: 280px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-secondary);
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.chat-msg.bot {
  background: var(--bg-card);
  border: 1px solid var(--border);
  align-self: flex-start;
  color: var(--text-primary);
}

.chat-msg.user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
}

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.chat-quick button {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.2s;
}

.chat-quick button:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.chat-input-row input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.chat-input-row button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 600;
}

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  position: relative;
}

.theme-toggle svg {
  transition: opacity 0.25s ease, transform 0.35s ease;
}

/* Dark mode: show moon, hide sun */
[data-theme="dark"] .theme-toggle .icon-sun,
:root:not([data-theme="light"]) .theme-toggle .icon-sun {
  display: none;
}
[data-theme="dark"] .theme-toggle .icon-moon,
:root:not([data-theme="light"]) .theme-toggle .icon-moon {
  display: block;
}
/* Light mode: show sun, hide moon */
[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}
[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Light mode specific tweaks */
[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

[data-theme="light"] .header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

/* Light mode: keep photos visible with a soft dark veil + white text */
[data-theme="light"] .hero-overlay {
  background: linear-gradient(90deg, rgba(15, 15, 20, 0.72) 0%, rgba(15, 15, 20, 0.4) 50%, rgba(15, 15, 20, 0.2) 100%);
}

[data-theme="light"] .page-hero-bg img {
  opacity: 0.85;
}

[data-theme="light"] .page-hero-overlay {
  background: linear-gradient(to bottom, rgba(15, 15, 20, 0.35) 0%, rgba(15, 15, 20, 0.7) 100%);
}

[data-theme="light"] .page-hero h1,
[data-theme="light"] .hero h1,
[data-theme="light"] .hero-content p,
[data-theme="light"] .page-hero p,
[data-theme="light"] .hero-badge,
[data-theme="light"] .page-hero .label {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .hero-stat strong,
[data-theme="light"] .hero-stat span {
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .page-hero-bg img {
  opacity: 0.7;
}

[data-theme="dark"] .hero-bg img {
  opacity: 1;
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: var(--input-bg);
  color: var(--input-color);
  border-color: var(--border);
}

[data-theme="light"] .filter-select,
[data-theme="light"] .filter-search input {
  background: #f4f4f5;
  color: #111;
}

[data-theme="light"] .filter-select option {
  background: #fff;
  color: #111;
}

[data-theme="light"] .chat-messages {
  background: #f4f4f5;
}

[data-theme="light"] .chat-msg.bot {
  background: #fff;
  color: #111;
}

[data-theme="light"] .vehicle-card {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .btn-outline {
  border-color: rgba(0,0,0,0.15);
  color: var(--text-primary);
}

[data-theme="light"] .brand-item img {
  filter: none;
}

[data-theme="light"] .dropdown {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .dropdown a {
  color: var(--text-secondary);
}

[data-theme="light"] .dropdown a:hover {
  background: var(--accent-soft);
  color: var(--text-primary);
}

[data-theme="light"] .process-num {
  background: var(--accent-soft);
  color: var(--accent-light);
}

[data-theme="light"] .why-icon {
  background: var(--accent-soft);
}

[data-theme="light"] .contact-item-icon {
  background: var(--accent-soft);
}

[data-theme="light"] .nav-mobile,
[data-theme="light"] .mobile-menu,
[data-theme="light"] .header-nav-mobile {
  background: var(--bg-secondary) !important;
}

[data-theme="light"] .nav-mobile a,
[data-theme="light"] .mobile-menu a {
  color: var(--text-primary) !important;
}

[data-theme="light"] .nav-mobile a:hover,
[data-theme="light"] .mobile-menu a:hover {
  color: var(--accent-light) !important;
  background: var(--accent-soft);
}

[data-theme="light"] .badge-category {
  background: rgba(0, 0, 0, 0.15);
  color: #fff;
}

[data-theme="light"] .step-number {
  color: #fff;
}

[data-theme="light"] .btn-primary {
  box-shadow: 0 4px 14px rgba(13, 122, 63, 0.25);
}

[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 8px 22px rgba(13, 122, 63, 0.35);
}

[data-theme="light"] .contact-form {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .review-form {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}


/* ===== THEME TRANSITION ===== */
html {
  transition: color-scheme 0.35s ease;
}

html[data-theme] body,
html[data-theme] .header,
html[data-theme] .vehicle-card,
html[data-theme] .service-card,
html[data-theme] .testimonial-card,
html[data-theme] .filters-panel,
html[data-theme] .bg-card,
html[data-theme] .chat-panel,
html[data-theme] .chat-widget,
html[data-theme] .brand-item,
html[data-theme] .step-card,
html[data-theme] .why-card,
html[data-theme] .process-step,
html[data-theme] input,
html[data-theme] select,
html[data-theme] textarea,
html[data-theme] .btn,
html[data-theme] .footer,
html[data-theme] .detail-breadcrumb-bar,
html[data-theme] .detail-main-img,
html[data-theme] .detail-thumbs button,
html[data-theme] .detail-spec,
html[data-theme] .reg-card,
html[data-theme] .dash-sidebar,
html[data-theme] .dash-panel,
html[data-theme] .dash-section,
html[data-theme] .simu-box,
html[data-theme] .cookie-banner {
  transition: background-color 0.4s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* ===== PAGE LOAD ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-content {
  animation: fadeInUp 0.8s ease both;
}

.hero-stats {
  animation: fadeInUp 0.9s ease 0.15s both;
}

.section-header {
  animation: fadeInUp 0.6s ease both;
}

.vehicle-card {
  animation: fadeInUp 0.5s ease both;
}

.vehicle-card:nth-child(1) { animation-delay: 0.05s; }
.vehicle-card:nth-child(2) { animation-delay: 0.1s; }
.vehicle-card:nth-child(3) { animation-delay: 0.15s; }
.vehicle-card:nth-child(4) { animation-delay: 0.2s; }
.vehicle-card:nth-child(5) { animation-delay: 0.25s; }
.vehicle-card:nth-child(6) { animation-delay: 0.3s; }

.service-card,
.testimonial-card,
.stat-item,
.brand-item {
  animation: fadeInUp 0.55s ease both;
}

/* Hover polish */
.vehicle-card {
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.35s ease, border-color 0.3s ease, background-color 0.4s ease;
}

.vehicle-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.btn {
  transition: transform 0.2s ease, background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  box-shadow: 0 4px 14px rgba(13, 122, 63, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 8px 22px rgba(13, 122, 63, 0.45);
}

/* Header refined */
.header {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, border-color 0.3s ease;
}

/* Chat open animation */
.chat-panel {
  animation: scaleIn 0.25s ease both;
  transform-origin: bottom right;
}

.chat-widget.open .chat-panel {
  animation: scaleIn 0.25s ease both;
}

/* Filters panel */
.filters-panel {
  transition: background-color 0.4s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.filters-panel:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 122, 63, 0.15);
}

/* Theme toggle pulse on load */
.theme-toggle {
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease, background-color 0.35s ease;
}

.theme-toggle:active {
  transform: scale(0.92);
}

/* Smooth image hover on cards */
.vehicle-image img {
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.4s ease;
}

/* Label accent bar */
.section-header .label::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: middle;
  border-radius: 2px;
}

/* Scroll reveal helper */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 18px 20px;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.2);
  display: none;
}

.cookie-banner.show { display: block; }

.cookie-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.cookie-inner p {
  flex: 1;
  min-width: 240px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Section with side image */
.section-with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.section-with-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  max-height: 360px;
}

@media (max-width: 768px) {
  .section-with-image {
    grid-template-columns: 1fr;
  }
}

/* Review form */
.review-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 640px;
  margin: 40px auto 0;
}

.star-rating {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 1.6rem;
  cursor: pointer;
}

.star-rating span {
  color: var(--text-muted);
  transition: color 0.15s;
}

.star-rating span.active,
.star-rating span:hover {
  color: #fbbf24;
}

/* ===== PHOTO UPLOAD (page Vendre) ===== */
.photo-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.photo-upload-zone:hover,
.photo-upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.05);
}

.photo-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.photo-upload-icon {
  font-size: 2rem;
}

.photo-upload-placeholder small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.photo-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.photo-thumbnails:empty {
  margin-top: 0;
}

.photo-thumb {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-thumb-remove:hover {
  background: #dc2626;
}

/* ===== LANGUAGE SWITCHER (vestiges GTranslate) ===== */
html.translated-ltr,
html.translated-rtl {
  margin-top: 0 !important;
}

body {
  top: 0 !important;
}

.goog-te-banner-frame,
.skiptranslate,
#google_translate_element {
  display: none !important;
}

/* ===== HEADER AUTH ===== */
.header-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-auth-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text, #1d1d1f);
  text-decoration: none;
  padding: 6px 4px;
  white-space: nowrap;
}
.header-auth-link:hover {
  color: var(--accent, #0071e3);
}
.header-auth-btn {
  padding: 8px 16px !important;
  font-size: 0.85rem !important;
  border-radius: 8px !important;
  white-space: nowrap;
  text-decoration: none;
}
.header-auth-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
}
.header-auth-user a {
  color: var(--accent, #0071e3);
  text-decoration: none;
  font-weight: 600;
}
.header-auth-user a:hover {
  text-decoration: underline;
}
@media (max-width: 768px) {
  .header-auth { display: none; }
  .header-auth-link { display: none; }
  .header-auth-btn { padding: 6px 12px !important; font-size: 0.8rem !important; }
}

/* ===== BLOC UTILISATEUR DANS LE MENU MOBILE ===== */
.mobile-user {
  display: none;
}

/* Masqué quand non connecté (aucun contenu) */
.mobile-user:empty {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
  }
  .mobile-user-name {
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .mobile-user-logout {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
  }
  .mobile-user-logout:hover {
    background: var(--danger);
    color: #fff;
  }
}


/* ===== DARK MODE: catalogue lisible ===== */
[data-theme="dark"] .vehicle-card,
:root .vehicle-card {
  color: #ffffff;
}
[data-theme="dark"] .vehicle-title,
:root:not([data-theme="light"]) .vehicle-title {
  color: #ffffff !important;
}
[data-theme="dark"] .vehicle-specs,
:root:not([data-theme="light"]) .vehicle-specs {
  color: #e4e4e7 !important;
}
[data-theme="dark"] .price-main,
:root:not([data-theme="light"]) .price-main {
  color: #ffffff !important;
}
[data-theme="dark"] .price-month,
:root:not([data-theme="light"]) .price-month {
  color: #d4d4d8 !important;
}
[data-theme="dark"] .vehicle-body {
  color: #ffffff;
}
[data-theme="light"] .vehicle-title {
  color: #111118 !important;
}
[data-theme="light"] .vehicle-specs {
  color: #52525b !important;
}
[data-theme="light"] .price-main {
  color: #111118 !important;
}
[data-theme="light"] .price-month {
  color: #71717a !important;
}


/* =========================================================
   HARMONIE CLAIR / SOMBRE — composants globaux
   ========================================================= */

/* --- Inputs & formulaires --- */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
  background: var(--input-bg) !important;
  color: var(--input-color) !important;
  border: 1.5px solid var(--input-border) !important;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  background: var(--input-bg-focus) !important;
  border-color: var(--input-border-focus) !important;
  box-shadow: 0 0 0 3px var(--accent-ring);
  outline: none;
}
input::placeholder,
textarea::placeholder {
  color: var(--input-placeholder);
}

/* --- Cartes génériques --- */
.vehicle-card,
.step-card,
.service-card,
.why-card,
.testimonial-card,
.brand-item,
.bg-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, transform 0.25s ease;
}
.vehicle-card:hover,
.step-card:hover,
.service-card:hover,
.why-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

/* --- Boutons outline --- */
.btn-outline,
.btn-outline-sm {
  border: 1.5px solid var(--border-strong);
  color: var(--text-primary);
  background: transparent;
}
.btn-outline:hover,
.btn-outline-sm:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* --- Filtres catalogue --- */
.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-light);
}
.filter-select,
.filter-search input {
  background: var(--input-bg) !important;
  color: var(--input-color) !important;
  border: 1px solid var(--input-border) !important;
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}
.footer a {
  color: var(--text-secondary);
}
.footer a:hover {
  color: var(--accent-light);
}
.footer h4,
.footer .footer-brand {
  color: var(--text-primary);
}

/* --- Mobile menu --- */
.nav-mobile,
.mobile-menu,
.header-nav-mobile {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
}
.nav-mobile a,
.mobile-menu a {
  color: var(--text-primary) !important;
}
.nav-mobile a:hover {
  color: var(--accent-light) !important;
  background: var(--accent-soft);
}

/* --- Theme toggle button (harmonized) --- */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  position: relative;
}
.theme-toggle svg {
  transition: opacity 0.25s ease, transform 0.35s ease;
}
.theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: scale(1.06);
}

/* --- Sections --- */
.section {
  background: var(--bg-primary);
  color: var(--text-primary);
}
.section-alt,
.section-muted {
  background: var(--bg-secondary);
}
.section-header h2,
.section-header .label {
  color: var(--text-primary);
}
.section-header p {
  color: var(--text-secondary);
}

/* --- Auth / dashboard cards (compte, inscription, connexion) --- */
.reg-card,
.dash-sidebar,
.dash-panel,
.dash-section,
.empty-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.reg-title,
.dash-user h3,
.dash-panel h2,
.dash-panel h3 {
  color: var(--text-primary);
}
.reg-sub,
.dash-user p,
.welcome {
  color: var(--text-secondary);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* --- Selection --- */
::selection {
  background: var(--accent-soft);
  color: var(--text-primary);
}

/* --- Table / list rows --- */
table,
.table {
  color: var(--text-primary);
}
tr {
  border-color: var(--border);
}
th {
  color: var(--text-secondary);
  background: var(--bg-muted);
}

/* --- Badges --- */
.badge,
.tag {
  background: var(--accent-soft);
  color: var(--accent-light);
  border: 1px solid transparent;
}
[data-theme="light"] .badge,
[data-theme="light"] .tag {
  color: var(--accent-hover);
}

/* --- Chat widget --- */
.chat-panel,
.chat-messages {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--text-primary);
}
.chat-msg.bot {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.chat-msg.user {
  background: var(--accent);
  color: #fff;
}

/* --- Hero stays readable in both modes (photo + overlay) --- */
.hero-overlay {
  background: linear-gradient(90deg, var(--overlay) 0%, var(--overlay-soft) 50%, transparent 100%);
}

/* --- Light mode specific polish --- */
[data-theme="light"] .header {
  box-shadow: 0 1px 0 var(--border);
}
[data-theme="light"] .header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .vehicle-card,
[data-theme="light"] .step-card,
[data-theme="light"] .service-card,
[data-theme="light"] .why-card,
[data-theme="light"] .testimonial-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .vehicle-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .btn-primary {
  box-shadow: 0 4px 14px rgba(13, 122, 63, 0.25);
}

/* --- Dark mode specific polish --- */
[data-theme="dark"] .vehicle-card,
[data-theme="dark"] .step-card,
[data-theme="dark"] .service-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .btn-primary {
  box-shadow: 0 4px 18px rgba(13, 122, 63, 0.35);
}

/* --- Force text contrast on vehicle cards --- */
[data-theme="dark"] .vehicle-title,
[data-theme="dark"] .price-main {
  color: var(--text-primary) !important;
}
[data-theme="dark"] .vehicle-specs,
[data-theme="dark"] .price-month {
  color: var(--text-secondary) !important;
}
[data-theme="light"] .vehicle-title,
[data-theme="light"] .price-main {
  color: var(--text-primary) !important;
}
[data-theme="light"] .vehicle-specs,
[data-theme="light"] .price-month {
  color: var(--text-secondary) !important;
}

/* --- Body padding under fixed header --- */
body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Smooth theme switch */
html {
  color-scheme: dark;
}
html[data-theme="light"] {
  color-scheme: light;
}

/* ===== THEME TOGGLE ANIMATION ===== */
@keyframes themeToggleSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(0.85); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes iconFadeIn {
  from { opacity: 0; transform: scale(0.5) rotate(-90deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

.theme-toggle:active {
  transform: scale(0.88);
  transition: transform 0.1s ease;
}

.theme-toggle.animating svg {
  animation: iconFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Smooth icon crossfade */
.theme-toggle svg {
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== GLOBAL SMOOTH THEME TRANSITIONS ===== */
/* Ensure ALL elements that use CSS variables transition smoothly */
.header,
.footer,
.nav,
.nav-item,
.dropdown,
.hero-overlay,
.page-hero-overlay,
.section,
.section-header,
.vehicle-card,
.service-card,
.testimonial-card,
.why-card,
.step-card,
.brand-item,
.process-step,
.stat-item,
.filters-panel,
.filter-btn,
.cookie-banner,
.chat-panel,
.chat-messages,
.reg-card,
.dash-sidebar,
.dash-panel,
.detail-breadcrumb-bar,
.detail-main-img,
.detail-thumbs button,
.detail-spec,
.simu-box,
.form-group,
.form-group input,
.form-group select,
.form-group textarea,
.contact-form,
.review-form,
input,
select,
textarea,
.btn,
.badge,
.lang-switcher,
.lang-toggle,
.lang-dropdown,
.lang-option {
  transition-property: background-color, color, border-color, box-shadow;
  transition-duration: 0.4s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero text stays readable during transition */
.hero h1,
.hero p,
.hero-badge,
.page-hero h1,
.page-hero p,
.page-hero .label {
  transition: color 0.35s ease, text-shadow 0.35s ease;
}

/* Logo adapts smoothly */
.logo img {
  transition: filter 0.4s ease;
}

/* Scrollbar adapts */
::-webkit-scrollbar-thumb {
  transition: background 0.35s ease;
}

/* Dropdown hover stays snappy */
.dropdown a,
.lang-option {
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* ===== THEME SWITCH FLASH EFFECT ===== */
.theme-switching {
  position: relative;
}

.theme-switching::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.08) 100%);
  animation: themeFlash 0.5s ease both;
}

[data-theme="light"].theme-switching::after {
  background: radial-gradient(circle at center, transparent 0%, rgba(255,255,255,0.12) 100%);
}

@keyframes themeFlash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* ===== SKELETON LOADER ===== */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 25%,
    var(--bg-muted) 37%,
    var(--bg-tertiary) 63%
  );
  background-size: 800px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

[data-theme="light"] .skeleton {
  background: linear-gradient(
    90deg,
    #e8eaee 25%,
    #f4f5f7 37%,
    #e8eaee 63%
  );
  background-size: 800px 100%;
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-image {
  height: 200px;
  border-radius: 0;
}

.skeleton-body {
  padding: 20px;
}

.skeleton-title {
  height: 18px;
  width: 70%;
  margin-bottom: 10px;
}

.skeleton-specs {
  height: 13px;
  width: 90%;
  margin-bottom: 16px;
}

.skeleton-price {
  height: 22px;
  width: 40%;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Vehicle image loading state */
.vehicle-image .skeleton-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: opacity 0.4s ease;
}

.vehicle-image .skeleton-overlay.loaded {
  opacity: 0;
  pointer-events: none;
}

.vehicle-image img {
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.5s ease;
}

.vehicle-image img.visible {
  opacity: 1;
}

/* ===== NETWORK STATUS BANNER ===== */
.net-status-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  z-index: 900;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.net-status-banner.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.net-status-banner.offline {
  border-color: var(--warning);
  color: var(--warning);
}

.net-status-banner .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
