:root {
  --bmw-blue: #0066b1;
  --bmw-blue-dark: #004f8f;
  --ink: #111111;
  --text: #262626;
  --muted: #666666;
  --line: #e6e6e6;
  --soft: #f6f6f6;
  --soft-2: #efefef;
  --white: #ffffff;
  --black: #000000;
  --max: 1280px;
  --font: "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
  --shadow: 0 24px 70px rgba(0, 0, 0, .12);
  --shadow-soft: 0 10px 34px rgba(0, 0, 0, .075);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.55;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
strong { font-weight: 500; }

.container { width: min(100% - 56px, var(--max)); margin-inline: auto; }
.narrow { width: min(100% - 56px, 880px); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:absolute; left: 20px; top: -90px; z-index: 1000; background: var(--bmw-blue); color: #fff; padding: 12px 18px; }
.skip-link:focus { top: 20px; }

/* Header inspiré BMW.fr : blanc, fin, très lisible, sans retour à la ligne */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 34px;
  padding: 0 max(28px, calc((100vw - var(--max))/2));
  border-bottom: 1px solid rgba(0,0,0,.06);
  color: #555;
  font-size: .78rem;
  letter-spacing: .01em;
}
.topbar p { margin: 0; }
.topbar-actions { display: flex; gap: 24px; white-space: nowrap; }
.topbar a { color: var(--ink); font-weight: 400; }
.topbar a:hover { color: var(--bmw-blue); }
.navbar {
  width: min(100% - 56px, var(--max));
  margin-inline: auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: nowrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--ink);
  letter-spacing: -.01em;
}
.brand-mark {
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: none;
  color: var(--ink);
  box-shadow: none;
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: .18em;
}
.brand span:last-child { font-size: .98rem; color: #343434; }
.brand strong { font-weight: 500; }
.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 82px;
  padding: 0;
  color: #242424;
  font-size: .9rem;
  line-height: 1;
  font-weight: 400;
  white-space: nowrap;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  height: 2px;
  background: var(--bmw-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link:hover,
.nav-link.active { color: var(--black); }
.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}
.menu-toggle span:not(.sr-only) { width: 22px; height: 1px; background: var(--ink); display: block; }

/* Boutons BMW-like : carrés, nets, moins gras */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font-weight: 500;
  font-size: .95rem;
  line-height: 1;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--bmw-blue); color: #fff; }
.btn-primary:hover { background: var(--bmw-blue-dark); }
.btn-secondary { background: #fff; color: var(--ink); border-color: #fff; }
.btn-secondary:hover { background: #e9e9e9; border-color: #e9e9e9; }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: #e9e9e9; border-color: #e9e9e9; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.72); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border-color: #222; }
.btn-outline:hover { background: #111; color: #fff; }
.btn-small { min-height: 42px; padding: 0 18px; font-size: .88rem; }
.nav-links > .btn { flex: 0 0 auto; white-space: nowrap; }

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - 116px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: #111;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(0,0,0,.74) 0%, rgba(0,0,0,.45) 42%, rgba(0,0,0,.08) 100%), url('../images/consec-chant.webp');
  background-size: cover;
  background-position: center;
  transform: scale(1.005);
}
.hero-content {
  position: relative;
  max-width: 680px;
  padding: 180px 0 104px;
  margin-left: max(28px, calc((100vw - var(--max))/2));
}
.hero h1,
.page-hero h1 {
  margin: 0 0 22px;
  font-size: clamp(3rem, 6.4vw, 6.25rem);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 300;
}
.hero p {
  max-width: 620px;
  color: rgba(255,255,255,.9);
  font-size: clamp(1.05rem, 1.45vw, 1.28rem);
  margin: 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.eyebrow {
  margin: 0 0 16px;
  color: var(--bmw-blue);
  text-transform: uppercase;
  letter-spacing: .17em;
  font-size: .73rem;
  line-height: 1.3;
  font-weight: 500;
}
.hero .eyebrow,
.section-dark .eyebrow { color: #fff; opacity: .86; }

/* Sections & typographie */
.section { padding: 112px 0; }
.section-muted { background: var(--soft); }
.section-dark { background: #111; color: #fff; }
.section-dark p { color: rgba(255,255,255,.72); }
.section-title { text-align: center; max-width: 820px; margin-bottom: 50px; }
.section-title .eyebrow { margin-inline: auto; }
h2 {
  margin: 0 0 20px;
  font-size: clamp(2.15rem, 4.1vw, 4.05rem);
  line-height: 1.04;
  letter-spacing: -.052em;
  font-weight: 300;
  color: var(--ink);
}
.section-dark h2,
.page-hero h1 { color: #fff; }
h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  line-height: 1.22;
  letter-spacing: -.025em;
  font-weight: 400;
  color: var(--ink);
}
p { color: var(--muted); margin-top: 0; }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 72px; align-items: center; }
.align-start { align-items: start; }

.quick-card,
.card,
.icon-card,
.testimonials figure,
.filters {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
}
.quick-card,
.card { padding: 32px; }
.quick-card { border-left: 4px solid var(--bmw-blue); }
.quick-card h3 { font-size: 1.85rem; font-weight: 300; letter-spacing: -.045em; }
.quick-card p { margin: 8px 0; }
.quick-card a { text-decoration: underline; text-underline-offset: 4px; }

.cards { display: grid; gap: 28px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vehicle-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.vehicle-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #f3f3f3;
  border-bottom: 1px solid var(--line);
}
.card-content { padding: 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-content h2,
.card-content h3 { font-size: 1.35rem; font-weight: 400; letter-spacing: -.03em; }
.card-content p { margin-bottom: 0; }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 500;
  margin-top: 8px;
}
.text-link::after { content: "›"; font-size: 1.25rem; line-height: 0; color: var(--bmw-blue); }
.text-link:hover { color: var(--bmw-blue); }
.badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 10px;
  background: #f0f6fb;
  color: var(--bmw-blue);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .02em;
  margin: 0;
}
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 8px 0 4px; background: var(--line); border: 1px solid var(--line); }
.specs div { background: #fff; padding: 13px 14px; }
.specs dt { color: #777; text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; font-weight: 500; }
.specs dd { margin: 3px 0 0; color: var(--ink); font-weight: 400; }

.icon-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.icon-card { display: block; min-height: 238px; padding: 28px; transition: transform .18s ease, border-color .18s ease; }
.icon-card:hover { transform: translateY(-3px); border-color: #cfcfcf; }
.icon-card span {
  display: inline-flex;
  color: var(--bmw-blue);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .12em;
  margin-bottom: 48px;
}
.icon-card h2,
.icon-card h3 { font-size: 1.25rem; font-weight: 400; }
.icon-card p { margin-bottom: 0; }

.cta-band .split { align-items: center; }
.button-stack { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

.testimonials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.testimonials figure { margin: 0; padding: 32px; }
.testimonials blockquote { margin: 0 0 20px; color: var(--ink); font-size: 1.04rem; }
.testimonials figcaption { color: #6a6a6a; font-weight: 400; }

/* Héros des pages internes */
.page-hero {
  padding: 118px 0 88px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.45)),
    url('../images/showroom.svg') center/cover no-repeat;
}
.page-hero p { color: rgba(255,255,255,.78); font-size: 1.13rem; max-width: 760px; }
.page-hero .btn { margin-top: 22px; }

/* Filtres */
.filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 36px;
  padding: 24px;
}
.filters label { flex: 1 1 190px; color: var(--ink); font-size: .9rem; font-weight: 500; }
.filters select { margin-top: 8px; }
.no-results { color: #a60000; font-weight: 500; }

/* Formulaires */
.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 8px; color: var(--ink); font-weight: 500; font-size: .94rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
input,
select,
textarea {
  width: 100%;
  border: 1px solid #d0d0d0;
  border-radius: 0;
  padding: 14px 14px;
  min-height: 48px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
input:focus,
select:focus,
textarea:focus { border-color: var(--bmw-blue); box-shadow: inset 0 0 0 1px var(--bmw-blue); }
textarea { resize: vertical; }
.consent { display: flex !important; align-items: flex-start; gap: 10px !important; color: #555 !important; font-size: .9rem !important; font-weight: 400 !important; }
.consent input { width: auto; min-height: auto; margin-top: 3px; }
.hp { display: none; }
.form-message { margin: 0; font-weight: 500; }
.form-message.success { color: #0b7a2a; }
.form-message.error { color: #a60000; }

.rounded-media { border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.check-list { padding: 0; list-style: none; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 30px; color: #414141; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 1px; background: var(--bmw-blue); }
.large li { font-size: 1.05rem; }
.services-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.concession-card h2,
.concession-card h3 { font-size: 1.35rem; font-weight: 400; }
.map-wrap { overflow: hidden; border: 1px solid var(--line); background: #f1f1f1; }
.map-wrap iframe { width: 100%; min-height: 430px; border: 0; display: block; }
.contact-layout { display: grid; grid-template-columns: .82fr 1.18fr; gap: 32px; align-items: start; }
.contact-info { position: sticky; top: 130px; }
.legal-content { max-width: 920px; }
.legal-content h2 { font-size: 1.7rem; margin-top: 42px; font-weight: 300; }

/* Footer */
.site-footer { background: #111; color: #fff; padding: 76px 0 0; }
.site-footer p,
.site-footer address { color: rgba(255,255,255,.68); font-style: normal; }
.site-footer a { display: block; color: rgba(255,255,255,.88); margin: 8px 0; font-weight: 400; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.25fr .95fr .8fr .85fr; gap: 42px; }
.footer-grid h2 { color: #fff; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; margin: 0 0 18px; }
.footer-brand { color: #fff; margin-bottom: 20px; }
.footer-brand .brand-mark,
.footer-brand span:last-child { color: #fff; }
.social-proof { display: inline-flex; color: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.18); padding: 9px 12px; font-weight: 400; }
.footer-bottom { margin-top: 58px; border-top: 1px solid rgba(255,255,255,.14); padding: 24px 20px; text-align: center; }
.footer-bottom p { margin: 0; font-size: .88rem; }

/* Actions rapides et cookies */
.floating-actions { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; gap: 8px; }
.floating-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; color: #fff; font-weight: 500; font-size: .9rem; box-shadow: var(--shadow-soft); }
.float-call { background: #1c7c3e; }
.float-estimate { background: var(--bmw-blue); }
.cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 200;
  width: min(100% - 48px, 1040px);
  margin: auto;
  background: #111;
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: var(--shadow);
  padding: 22px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { color: rgba(255,255,255,.7); margin: .25rem 0 0; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
:focus-visible { outline: 3px solid rgba(0,102,177,.36); outline-offset: 3px; }

/* Responsive : on passe en menu mobile AVANT que la navbar puisse couper */
@media (max-width: 1320px) {
  .navbar { min-height: 74px; }
  .nav-links {
    position: fixed;
    inset: 108px 28px auto 28px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 10px 0;
  }
  .nav-links.open { display: flex; }
  .nav-link {
    min-height: 48px;
    padding: 0 20px;
    font-size: .98rem;
  }
  .nav-link::after { left: 20px; right: auto; width: 44px; bottom: 8px; }
  .nav-links > .btn { margin: 12px 20px 8px; align-self: flex-start; }
  .menu-toggle { display: flex; }
  .cards-3,
  .icon-grid,
  .services-grid,
  .testimonials,
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .topbar { display: none; }
  .navbar { min-height: 70px; width: min(100% - 36px, var(--max)); }
  .nav-links { inset: 82px 18px auto 18px; }
  .brand { gap: 12px; }
  .brand span:last-child { font-size: .92rem; }
  .brand-mark { font-size: .95rem; letter-spacing: .15em; }
  .hero { min-height: 680px; }
  .hero-content { width: min(100% - 36px, var(--max)); margin-inline: auto; padding: 96px 0 72px; }
  .hero h1,
  .page-hero h1 { font-size: clamp(2.55rem, 12vw, 4.65rem); }
  .hero-actions,
  .button-stack { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; min-height: 52px; }
  .card-actions .btn,
  .cookie-actions .btn,
  .nav-links > .btn { width: auto; }
  .section { padding: 76px 0; }
  .page-hero { padding: 86px 0 70px; }
  .split,
  .contact-layout { grid-template-columns: 1fr; gap: 34px; }
  .cards-3,
  .cards-2,
  .icon-grid,
  .services-grid,
  .testimonials,
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-info { position: static; }
  .specs { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: flex-start; padding-bottom: 84px; left: 18px; right: 18px; width: calc(100% - 36px); }
  .floating-actions { left: 16px; right: 16px; }
  .floating-actions a { flex: 1; }
}

@media (max-width: 480px) {
  .container,
  .narrow { width: min(100% - 32px, var(--max)); }
  .quick-card,
  .card,
  .testimonials figure,
  .filters { padding: 24px; }
  .card-content,
  .icon-card { padding: 24px; }
  .filters { gap: 14px; }
  h2 { font-size: clamp(2rem, 10vw, 3rem); }
}
