/* ===================================================================
   MDU MOTORS — Design system
   Palette : rouge vif / noir / argent
   =================================================================== */

:root {
  --red: #e10600;
  --red-dark: #a30400;
  --red-light: #ff2a1c;
  --ink: #15171c;
  --ink-soft: #2a2d34;
  --grey: #6b7280;
  --grey-light: #9aa0a8;
  --line: #e6e8ec;
  --bg: #ffffff;
  --bg-alt: #f4f5f7;
  --silver: linear-gradient(135deg, #f5f6f8 0%, #d9dce1 100%);
  --shadow-sm: 0 1px 3px rgba(21,23,28,.08), 0 1px 2px rgba(21,23,28,.06);
  --shadow-md: 0 10px 30px rgba(21,23,28,.10);
  --shadow-lg: 0 24px 60px rgba(21,23,28,.16);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --head: 'Montserrat', var(--font);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

/* ---------- Typo ---------- */
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.25rem; }
.eyebrow {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--red);
}
.lead { font-size: 1.12rem; color: var(--grey); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.grid { display: grid; gap: 26px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--head); font-weight: 700; font-size: .95rem;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(225,6,0,.30); }
.btn--primary:hover { background: var(--red-dark); box-shadow: 0 10px 26px rgba(225,6,0,.40); }
.btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-soft); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 40px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-family: var(--head); font-weight: 600; font-size: .95rem; color: var(--ink-soft); position: relative; }
.nav-links a:hover { color: var(--red); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 3px;
  background: var(--red); border-radius: 3px;
}
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }
.nav-toggle span + span { margin-top: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: radial-gradient(120% 120% at 80% 0%, #2a2d34 0%, #15171c 55%, #0c0d10 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 90% 30%, rgba(225,6,0,.28), transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; padding-block: clamp(64px, 11vw, 120px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 .accent { color: var(--red-light); }
.hero p { color: #c7cbd2; font-size: 1.15rem; max-width: 46ch; margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-stats { display: flex; gap: 34px; margin-top: 44px; flex-wrap: wrap; }
.hero-stats .stat strong { font-family: var(--head); font-size: 2rem; display: block; line-height: 1; }
.hero-stats .stat span { color: var(--grey-light); font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; }
.hero-visual {
  background: var(--silver); border-radius: 24px; padding: 30px; box-shadow: var(--shadow-lg);
  display: grid; place-items: center;
}
.hero-visual img { width: 100%; filter: drop-shadow(0 18px 24px rgba(0,0,0,.25)); }
.hero-visual--card { background: transparent; box-shadow: none; padding: 0; }

.hero-card { background: #fff; border-radius: 22px; padding: 32px; box-shadow: var(--shadow-lg); width: 100%; max-width: 430px; }
.hero-card-top { display: flex; align-items: center; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.hero-card-top .ic-lg { flex: none; width: 54px; height: 54px; border-radius: 14px; background: rgba(225,6,0,.10); color: var(--red); display: grid; place-items: center; }
.hero-card-top .ic-lg svg { width: 28px; height: 28px; }
.hero-card-top h3 { font-size: 1.12rem; }
.hero-card-top p { color: var(--grey); font-size: .92rem; margin-top: 3px; }
.checklist { margin-top: 22px; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 11px; align-items: center; font-size: .96rem; color: var(--ink-soft); font-weight: 500; }
.checklist .ic { flex: none; width: 26px; height: 26px; border-radius: 8px; background: rgba(225,6,0,.10); color: var(--red); display: grid; place-items: center; }
.checklist .ic svg { width: 15px; height: 15px; }

/* ---------- Feature cards ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature .ico {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(225,6,0,.10); color: var(--red); margin-bottom: 18px;
}
.feature .ico svg { width: 26px; height: 26px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--grey); font-size: .97rem; }

/* ---------- Car cards ---------- */
.cars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.car-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.car-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.car-media { position: relative; aspect-ratio: 16/10; background: var(--silver); overflow: hidden; }
.car-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.car-card:hover .car-media img { transform: scale(1.05); }
.car-badge {
  position: absolute; top: 12px; left: 12px; background: var(--red); color: #fff;
  font-family: var(--head); font-weight: 700; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .08em; padding: 6px 12px; border-radius: 999px;
}
.car-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.car-body h3 { font-size: 1.18rem; }
.car-sub { color: var(--grey); font-size: .9rem; margin-top: 2px; }
.car-specs { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 16px 0 18px; color: var(--ink-soft); font-size: .88rem; }
.car-specs li { display: flex; align-items: center; gap: 6px; }
.car-specs svg { width: 16px; height: 16px; color: var(--grey-light); }
.car-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.car-price { font-family: var(--head); font-weight: 800; font-size: 1.4rem; }
.car-price span { font-size: .8rem; font-weight: 600; color: var(--grey); }

/* ---------- Filters / toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 30px; }
.toolbar input, .toolbar select {
  font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); min-width: 150px;
}
.toolbar input:focus, .toolbar select:focus { outline: 2px solid rgba(225,6,0,.35); border-color: var(--red); }
.toolbar .grow { flex: 1; min-width: 200px; }
.results-count { color: var(--grey); font-size: .92rem; margin-left: auto; }

/* ---------- Car detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.gallery-main { border-radius: var(--radius); overflow: hidden; background: var(--silver); aspect-ratio: 16/10; box-shadow: var(--shadow-sm); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.gallery-thumbs button { border: 2px solid transparent; border-radius: 10px; overflow: hidden; padding: 0; background: var(--silver); aspect-ratio: 16/11; }
.gallery-thumbs button.active { border-color: var(--red); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); position: sticky; top: 96px; }
.detail-panel .price { font-family: var(--head); font-weight: 800; font-size: 2.2rem; }
.spec-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.spec-table td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.spec-table td:first-child { color: var(--grey); }
.spec-table td:last-child { text-align: right; font-weight: 600; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.info-card { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.info-card .ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(225,6,0,.10); color: var(--red); }
.info-card h3 { font-size: 1.05rem; }
.info-card p { color: var(--grey); font-size: .95rem; }
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--head); font-weight: 600; font-size: .9rem; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; padding: 13px 15px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid rgba(225,6,0,.35); border-color: var(--red); }
.field textarea { resize: vertical; min-height: 130px; }
.map-embed { border: 0; width: 100%; height: 320px; border-radius: var(--radius); filter: grayscale(.2); }

/* ---------- CTA band ---------- */
.cta-band {
  background: radial-gradient(120% 140% at 10% 0%, #2a2d34, #15171c 60%, #0c0d10);
  color: #fff; border-radius: 24px; padding: clamp(36px, 6vw, 64px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  position: relative; overflow: hidden;
}
.cta-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 90% at 95% 50%, rgba(225,6,0,.30), transparent 60%); }
.cta-band > * { position: relative; z-index: 2; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c7cbd2; margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c7cbd2; padding: 60px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-logo { height: 58px; width: auto; }
.footer-brand p { color: var(--grey-light); font-size: .92rem; margin-top: 14px; max-width: 34ch; }
.site-footer h4 { font-family: var(--head); color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
.site-footer a { color: #c7cbd2; font-size: .95rem; }
.site-footer a:hover { color: #fff; }
.site-footer li { margin-bottom: 10px; }
.footer-zones { margin-top: 38px; font-size: .82rem; line-height: 1.7; color: var(--grey-light); text-align: center; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.10); margin-top: 22px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: .85rem; color: var(--grey-light); }

/* Page contact : formulaire seul, centré */
.form-wrap { max-width: 640px; margin-inline: auto; }

/* Bouton flottant WhatsApp */
.wa-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  background: #25D366; color: #fff; padding: 13px 18px; border-radius: 999px;
  box-shadow: 0 10px 26px rgba(37,211,102,.45);
  font-family: var(--head); font-weight: 700; font-size: .95rem;
  transition: transform .15s ease, box-shadow .2s ease;
}
.wa-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37,211,102,.55); color: #fff; }
.wa-fab svg { width: 24px; height: 24px; flex: none; }
@media (max-width: 560px) {
  .wa-fab { padding: 15px; border-radius: 50%; }
  .wa-fab span { display: none; }
}

/* Footer logo: the wordmark is dark; on dark bg we use the mark only inverted via background chip */
.footer-logo-chip { display: inline-flex; background: #fff; border-radius: 14px; padding: 12px 16px; }
.footer-logo-chip img { height: 50px; filter: none; }

/* ---------- States ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--grey); }
.skeleton { background: linear-gradient(90deg, #eef0f3 25%, #e2e5ea 37%, #eef0f3 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: var(--radius); }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.breadcrumb { color: var(--grey); font-size: .9rem; margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--red); }
.tag { display: inline-block; background: var(--bg-alt); border: 1px solid var(--line); color: var(--ink-soft); font-size: .82rem; padding: 5px 12px; border-radius: 999px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 520px; }
  .features { grid-template-columns: 1fr 1fr; }
  .cars-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid, .contact-grid { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .nav-links {
    position: fixed; inset: 74px 0 auto 0; background: #fff; flex-direction: column;
    align-items: stretch; gap: 0; padding: 10px 22px 22px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); z-index: 40;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-links a { padding: 13px 2px; }
  .nav-links a.active { color: var(--red); }
  .nav-links a.active::after { display: none; }
  .nav-toggle { display: block; }
  .nav-cta .btn { display: none; }
  .features, .cars-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 22px; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
}
