/* Xperticar - premium automotive UI (visual redesign only, keep existing functionality) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  /* Cinematic near-black base — deeper and more neutral than before for sharper contrast */
  --bg: #07080a;
  --bg-rgb: 7, 8, 10;
  --surface-1: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.05);
  --surface-3: rgba(255, 255, 255, 0.13);

  --fg: #f7f7f8;
  --muted: rgba(247, 247, 248, 0.72);
  --muted-2: rgba(247, 247, 248, 0.52);

  --border: rgba(255, 255, 255, 0.10);
  --border-2: rgba(255, 255, 255, 0.17);

  /* Accent: burnished bronze-gold — richer and more saturated than the previous sand tone */
  --accent: #cf9a4a;
  --accent-hover: #e3b562;
  --accent-rgb: 207, 154, 74;
  --accent-15: rgba(var(--accent-rgb), 0.18);
  --accent-fg: #1a1208;

  /* Header */
  --header-bg: #07080a;
  --header-fg: var(--fg);
  --header-muted: rgba(247, 247, 248, 0.72);

  --shadow-1: 0 18px 50px rgba(0, 0, 0, 0.42);
  --shadow-2: 0 36px 90px rgba(0, 0, 0, 0.60);

  --radius: 20px;
  --radius-sm: 16px;
  --container: 1200px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --focus: 0 0 0 3px rgba(var(--accent-rgb), 0.40);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  /* Solid base avoids visible gradient banding on dark backgrounds. */
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Filet de securite mobile : les transforms (mosaique, pin-sections) ne doivent
     jamais produire de scroll horizontal involontaire. */
  overflow-x: hidden;
}

::selection { background: rgba(var(--accent-rgb), 0.18); }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  z-index: 9999;
}
.skip-link:focus { top: 12px; outline: none; box-shadow: var(--focus); }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(var(--bg-rgb), 0.16);
  backdrop-filter: blur(12px);
  color: var(--header-fg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}
.header.is-scrolled {
  background: rgba(var(--bg-rgb), 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.46);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 16px;
  transition: padding 220ms var(--ease);
}
.header.is-scrolled .header-inner { padding: 12px 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
  letter-spacing: -0.2px;
}
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}
.brand small {
  display: none;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.70);
  letter-spacing: 0.2px;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 26px;
}
.nav a:not(.btn) {
  position: relative;
  color: var(--header-muted);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  padding: 10px 2px;
  border-radius: 10px;
  transition: color 200ms var(--ease), transform 200ms var(--ease);
}
.nav a:not(.btn):hover {
  color: var(--header-fg);
  transform: translateY(-1px);
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transform: scaleX(0.5);
  transform-origin: 50% 50%;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}
.nav a[aria-current="page"]::after,
.nav a:not(.btn):hover::after {
  opacity: 1;
  transform: scaleX(1);
}
.nav a[aria-current="page"] {
  color: var(--header-fg);
}

/* Desktop navbar CTAs — use *=  (contains) so it works at any folder depth */
.header .nav a[href*="acheter-une-voiture"] {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(246, 247, 249, 0.92);
  font-weight: 800;
  transition: background 220ms var(--ease), border-color 220ms var(--ease), transform 220ms var(--ease);
}
.header .nav a[href*="acheter-une-voiture"]::after { display: none; }
.header .nav a[href*="acheter-une-voiture"]:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}
.header .nav a[href*="vendre-ma-voiture"] {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.72);
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 900;
  letter-spacing: 0.2px;
  box-shadow: 0 18px 44px rgba(var(--accent-rgb), 0.14);
  transition: background 220ms var(--ease), border-color 220ms var(--ease), transform 220ms var(--ease), box-shadow 220ms var(--ease);
}
.header .nav a[href*="vendre-ma-voiture"]::after { display: none; }
.header .nav a[href*="vendre-ma-voiture"]:hover {
  background: var(--accent-hover);
  border-color: rgba(var(--accent-rgb), 0.92);
  transform: translateY(-1px);
  box-shadow: 0 22px 56px rgba(var(--accent-rgb), 0.18);
}

.mobile-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--header-fg);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 850;
  letter-spacing: 0.2px;
}
.mobile-toggle:focus { outline: none; box-shadow: var(--focus); }

.lang-switch { display: flex; align-items: center; gap: 4px; margin-right: 6px; }
.lang-switch-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--header-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  padding: 6px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}
.lang-switch-btn:hover { color: var(--header-fg); }
.lang-switch-btn.is-active {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: transparent;
}

.mobile-nav { display: none; padding: 8px 0 18px; }
.mobile-nav.open {
  display: block;
  background: rgba(var(--bg-rgb), 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: calc(var(--radius) + 6px);
  padding: 8px 18px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-2);
  animation: mobileDrop 380ms var(--ease) both;
}
.mobile-nav a {
  display: block;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 750;
}
.mobile-nav a:hover { color: var(--header-fg); }
.mobile-nav .mobile-cta {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--fg);
  font-weight: 850;
  font-size: 14px;
  letter-spacing: 0.2px;
  cursor: pointer;
  user-select: none;
  transition: transform 200ms var(--ease), background 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
  background: var(--surface-3);
  border-color: var(--border-2);
  box-shadow: var(--shadow-1);
}
.btn:focus { outline: none; box-shadow: var(--focus); }
.btn:active { transform: translateY(0) scale(0.99); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: rgba(var(--accent-rgb), 0.72);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: rgba(var(--accent-rgb), 0.88);
  box-shadow: 0 18px 44px rgba(var(--accent-rgb), 0.18);
}
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.18); }
.btn-small { height: 42px; padding: 0 14px; font-size: 13px; }

/* Header-specific button treatment */
.header .btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--header-fg);
}
.header .btn:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}
.header .btn-ghost { border-color: rgba(255, 255, 255, 0.18); }
.header .btn-primary {
  background: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.76);
  color: var(--accent-fg);
}
.header .btn-primary:hover {
  background: var(--accent-hover);
  border-color: rgba(var(--accent-rgb), 0.92);
}

/* Text link (clean secondary CTA) */
.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 6px;
  font-weight: 850;
  font-size: 14px;
  letter-spacing: 0.2px;
  color: var(--muted);
  transition: color 200ms var(--ease), transform 200ms var(--ease);
}
.link::after {
  content: "\2192";
  color: var(--accent);
  transition: transform 200ms var(--ease);
}
.link:hover { color: var(--fg); }
.link:hover::after { transform: translateX(2px); }
.link:focus { outline: none; box-shadow: var(--focus); border-radius: 10px; }

/* Layout blocks */
.section { padding: 96px 0; }
.section-tight { padding: 44px 0; }
.section-header { margin-bottom: 28px; }
.section-dark {
  /* Cleaner premium band: avoid heavy gradients that can create banding on dark screens. */
  background:
    radial-gradient(900px 420px at 18% 0%, rgba(var(--accent-rgb), 0.16) 0%, rgba(var(--accent-rgb), 0.00) 70%),
    rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--fg);
}
.section-dark p { color: var(--muted); }
.section-dark .kicker { color: var(--muted-2); }
.section-dark .kicker::before { box-shadow: 0 12px 22px rgba(var(--accent-rgb), 0.18); }
.section-dark .card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}
.section-dark .card:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: none;
  transform: translateY(-1px);
}
.section-dark .btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--fg);
}
.section-dark .btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}
.section-dark .btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.22); }
.section-dark .btn-primary { background: var(--accent); border-color: rgba(var(--accent-rgb), 0.76); color: var(--accent-fg); }
.section-dark .btn-primary:hover { background: var(--accent-hover); border-color: rgba(var(--accent-rgb), 0.92); }
.section-dark .chip {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
}
.section-dark .link { color: rgba(255, 255, 255, 0.80); }
.section-dark .link:hover { color: var(--fg); }
.section-dark .divider { background: rgba(255, 255, 255, 0.12); }

/* Cleaner "one-plane" section background (avoids the impression of split layers). */
.section-surface {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.section-surface .divider { background: rgba(255, 255, 255, 0.12); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-weight: 850;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 10px 18px rgba(var(--accent-rgb), 0.18);
}

h1, h2, h3 { margin: 0 0 12px; line-height: 1.08; letter-spacing: -0.03em; }
h1 { font-size: clamp(44px, 6.6vw, 104px); font-weight: 900; }
h2 { font-size: clamp(32px, 4.8vw, 76px); font-weight: 880; }
h3 { font-size: 19px; letter-spacing: -0.015em; font-weight: 780; }
p { margin: 0 0 14px; color: var(--muted); }

.hero p { max-width: 62ch; }
.section-header { max-width: 820px; }
.section-header p { max-width: 72ch; }

/* Motion primitives (elegant, non-gadget) */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes heroSheen {
  0% { transform: translateX(-18%) rotate(12deg); opacity: 0; }
  22% { opacity: 0.14; }
  55% { transform: translateX(14%) rotate(12deg); opacity: 0.10; }
  100% { transform: translateX(22%) rotate(12deg); opacity: 0; }
}
@keyframes mobileDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Reveal on scroll (JS adds .reveal + .is-inview) */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(4px);
  will-change: transform, opacity, filter;
}
.reveal.is-inview {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  animation: fadeUp 900ms var(--ease) both;
  animation-delay: var(--reveal-delay, 0ms);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 118px 0 64px;
}
.hero--home {
  padding: 118px 0 64px;
  min-height: clamp(560px, 70vh, 820px);
}
.hero.hero--media {
  background-image: url("../img/hero-bg.svg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 50% calc(50% + var(--hero-shift, 0px));
  will-change: background-position;
}
.hero.hero--media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(var(--bg-rgb), 0.16), rgba(var(--bg-rgb), 0.96) 74%),
    radial-gradient(900px 520px at 18% 8%, rgba(var(--accent-rgb), 0.18), transparent 60%);
  z-index: 0;
}
.hero.hero--media::after {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.18), transparent);
  opacity: 0.10;
  transform: translateX(-18%) rotate(12deg);
  animation: heroSheen 12s var(--ease) infinite;
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }

/* Photo mosaic — grille asymétrique 3 panneaux avec séparateurs diagonaux */
.photo-mosaic {
  position: relative;
  height: clamp(280px, 42vh, 520px);
  background: var(--bg);
  overflow: hidden;
}
.photo-mosaic .mosaic-panel {
  position: absolute;
  overflow: hidden;
  opacity: 0;
  transition: transform 900ms var(--ease), opacity 700ms var(--ease);
}
.photo-mosaic .mosaic-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 700ms var(--ease);
}
.photo-mosaic .mosaic-panel:hover img {
  transform: scale(1.05);
}
/* Panneau gauche — pleine hauteur */
.photo-mosaic .mosaic-panel--1 {
  top: 0;
  bottom: 0;
  left: 0;
  width: 57%;
  clip-path: polygon(0 0, 100% 0, calc(100% - 44px) 100%, 0 100%);
  transform: translateX(-72px);
}
/* Panneau haut-droite */
.photo-mosaic .mosaic-panel--2 {
  top: 0;
  left: 58.5%;
  right: 0;
  height: 50%;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), 0 100%);
  transform: translateX(56px);
  transition-delay: 110ms;
}
/* Panneau bas-droite */
.photo-mosaic .mosaic-panel--3 {
  bottom: 0;
  left: 58.5%;
  right: 0;
  height: 50%;
  clip-path: polygon(0 32px, 100% 0, 100% 100%, 0 100%);
  transform: translateX(72px);
  transition-delay: 220ms;
}
/* État visible (classe ajoutée par JS via IntersectionObserver) */
.photo-mosaic.is-inview .mosaic-panel {
  opacity: 1;
  transform: translateX(0);
}
@media (max-width: 767px) {
  .photo-mosaic {
    height: clamp(180px, 36vw, 280px);
  }
  .photo-mosaic .mosaic-panel--1 {
    width: 100%;
    clip-path: none;
  }
  .photo-mosaic .mosaic-panel--2,
  .photo-mosaic .mosaic-panel--3 {
    display: none;
  }
}

/* ─── Pinned scrollytelling (style Apple) ──────────────────────────────────
   Un wrapper haut (ex: 240vh) contient un panneau "sticky" plein écran.
   Le JS calcule la progression du scroll dans le wrapper (0→1) et l'expose
   via --progress ; le CSS s'en sert pour scrubber les transformations. */
.pin-section {
  position: relative;
}
.pin-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Mosaïque pinnée : les photos se déploient en zoom pendant le scroll */
.pin-mosaic { height: 240vh; }
.pin-mosaic .pin-sticky { flex-direction: column; gap: 40px; }
.pin-mosaic .photo-mosaic {
  width: 100%;
  height: clamp(280px, 50vh, 560px);
  transform: scale(calc(0.84 + var(--progress, 0) * 0.16));
  opacity: calc(0.4 + var(--progress, 0) * 0.6);
}
.pin-mosaic-caption {
  text-align: center;
  max-width: 640px;
  opacity: var(--progress, 0);
  transform: translateY(calc(24px - var(--progress, 0) * 24px));
}
.pin-mosaic-caption .kicker { justify-content: center; }

/* Étapes pinnées : crossfade entre 3 stades pendant le scroll */
.pin-steps { height: 320vh; }
.pin-steps-grid {
  display: grid;
  grid-template-columns: 0.65fr 1fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}
.pin-step-number {
  font-size: clamp(120px, 20vw, 260px);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: transparent;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.95), rgba(var(--accent-rgb), 0.22));
  -webkit-background-clip: text;
  background-clip: text;
  transition: opacity 200ms linear;
}
.pin-steps-text {
  position: relative;
  min-height: 280px;
}
.pin-stage {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
  pointer-events: none;
}
/* Sous-pages : le titre de stage est un h3 (hiérarchie sémantique sous un h2 de section),
   mais doit garder le même poids visuel que le h2 de la page d'accueil. */
.pin-stage h3 {
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 860;
  letter-spacing: -0.02em;
}
.pin-stage.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.pin-stage .step-index {
  display: inline-block;
  margin-bottom: 14px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--accent);
}
.pin-progress {
  display: flex;
  gap: 8px;
  margin-top: 32px;
}
.pin-progress-dot {
  height: 4px;
  flex: 1;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.pin-progress-dot::after {
  content: "";
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 120ms linear;
}
.pin-progress-dot.is-active::after { width: 100%; }
.pin-progress-dot.is-done::after { width: 100%; }

/* Repli mobile : pas de scroll-jacking, contenu empilé normalement */
@media (max-width: 760px) {
  .pin-section { height: auto !important; }
  .pin-sticky {
    position: static;
    height: auto;
    display: block;
    padding: 48px 0;
  }
  .pin-mosaic .photo-mosaic { transform: none; opacity: 1; }
  .pin-mosaic-caption { opacity: 1; transform: none; margin-top: 28px; }
  .pin-steps-grid { grid-template-columns: 1fr; gap: 32px; }
  .pin-step-number { display: none; }
  .pin-steps-text { min-height: 0; }
  .pin-stage {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    margin-bottom: 40px;
  }
  .pin-progress { display: none; }
}

.hero .kicker { animation: fadeUp 720ms var(--ease) both; animation-delay: 80ms; }
.hero h1 { animation: fadeUp 860ms var(--ease) both; animation-delay: 140ms; }
.hero p { animation: fadeUp 940ms var(--ease) both; animation-delay: 220ms; }
.hero .hero-actions { animation: fadeUp 940ms var(--ease) both; animation-delay: 300ms; }
.hero .trust { animation: fadeUp 940ms var(--ease) both; animation-delay: 380ms; }
.hero .hero-card {
  animation: fadeUp 1020ms var(--ease) both;
  animation-delay: 220ms;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 28px;
  align-items: start;
}
.hero-card {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface-1);
  box-shadow: var(--shadow-1);
  padding: 20px;
}
.hero-card h3 { margin: 0 0 6px; }
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}
.hero-bullets {
  margin-top: 18px;
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
}
.bullet {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.hero-bullets .bullet:last-child { border-bottom: 0; }
.bullet strong { display: block; font-size: 13px; letter-spacing: 0.2px; }
.bullet div span { display: block; color: var(--muted-2); font-size: 13px; }
.icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  background: var(--accent-15);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  align-self: center;
  color: var(--accent);
}
.icon svg { display: block; }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

/* Cards */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  box-shadow: none;
  padding: 20px;
  transition: transform 240ms var(--ease), border-color 240ms var(--ease), background 240ms var(--ease), box-shadow 240ms var(--ease);
}
.card:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.34);
  background: var(--surface-3);
  box-shadow: var(--shadow-1);
}
.card p:last-child { margin-bottom: 0; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title h2, .card-title h3 { margin: 0; }

.chip {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(246, 247, 249, 0.84);
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 780;
  font-size: 12px;
  letter-spacing: 0.3px;
}

/* Journey cards (Sell vs Buy) */
.card--journey {
  position: relative;
  overflow: hidden;
  padding: 28px;
  min-height: 240px;
  background: var(--surface-1);
}
.card--journey::after {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(700px 260px at 18% 0%, rgba(var(--accent-rgb), 0.10), transparent 65%);
  opacity: 0.9;
  pointer-events: none;
}
.card--journey > * { position: relative; }
.card--journey .hero-actions { margin-top: 14px; }
.card--sell { border-color: rgba(var(--accent-rgb), 0.30); }
.card--buy { border-color: rgba(255, 255, 255, 0.12); }
.card--buy::after { background: radial-gradient(700px 260px at 18% 0%, rgba(255, 255, 255, 0.10), transparent 60%); opacity: 0.45; }

/* Reviews */
.review { padding: 22px; }
.review-stars {
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 10px;
  font-weight: 900;
}
.review-author { margin: 12px 0 0; color: var(--muted-2); font-size: 13px; font-weight: 700; }

/* Google reviews embed (real reviews, no fake quotes) */
.google-reviews {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}
.google-summary,
.google-embed { min-width: 0; }
.google-summary {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface-1);
  padding: 22px;
  box-shadow: var(--shadow-1);
}
.google-badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(246, 247, 249, 0.92);
  font-weight: 850;
  letter-spacing: 0.2px;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  line-height: 1.25;
}
.google-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 10px 18px rgba(var(--accent-rgb), 0.18);
}
.google-embed {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow-2);
  min-height: 420px;
  width: 100%;
  max-width: 100%;
}
.google-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}

/* Steps */
.steps { counter-reset: step; }
.step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  padding: 20px;
  box-shadow: none;
  transition: transform 240ms var(--ease), border-color 240ms var(--ease), background 240ms var(--ease), box-shadow 240ms var(--ease);
}
.step:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.34);
  background: var(--surface-3);
  box-shadow: var(--shadow-1);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  margin-bottom: 14px;
  font-weight: 950;
  color: var(--accent-fg);
  background: rgba(var(--accent-rgb), 0.22);
  border: 1px solid rgba(var(--accent-rgb), 0.56);
}
.step p { margin: 0; }

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

/* Stats strip (trust numbers) */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
}
.stat {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  padding: 18px;
  transition: transform 240ms var(--ease), border-color 240ms var(--ease), background 240ms var(--ease), box-shadow 240ms var(--ease);
}
.stat:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.34);
  background: var(--surface-3);
  box-shadow: var(--shadow-1);
}
/* Keep stats ultra clean (no overlay sheen that can look like a "band"). */
.stat > * { position: relative; }
.stat-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 34px;
  font-weight: 950;
  letter-spacing: -0.6px;
}
.stat-unit {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.stat-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* Vehicle cards */
.vehicle-card { padding: 0; overflow: hidden; }
.vehicle-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(900px 420px at 20% 0%, rgba(var(--accent-rgb), 0.22), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.vehicle-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.52));
  opacity: 0.65;
  pointer-events: none;
  z-index: 1;
}
.vehicle-media img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 360ms var(--ease);
  opacity: 0.98;
}
.vehicle-card:hover .vehicle-media img { transform: scale(1.045); }
.vehicle-badges {
  position: absolute;
  left: 14px;
  top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 2;
}
.vehicle-badge {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(var(--bg-rgb), 0.68);
  color: rgba(246, 247, 249, 0.88);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.2px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
}
.vehicle-price {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.46);
  background: rgba(var(--bg-rgb), 0.70);
  color: rgba(246, 247, 249, 0.92);
  font-weight: 950;
  letter-spacing: 0.2px;
  box-shadow: none;
  z-index: 2;
}
.vehicle-body { padding: 18px 20px 20px; }
.vehicle-specs { margin: 10px 0 0; color: var(--muted-2); font-size: 13px; }
.vehicle-body .hero-actions { margin-top: 12px; }

/* Filters bar (UI only) */
.filters { padding: 18px 18px 14px; }
.filters form { gap: 14px; }
.filters-grid { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1fr; gap: 12px; }
.filters-grid--hero { grid-template-columns: 1fr 1fr; }
.filters-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

/* Forms */
form { display: grid; gap: 12px; }
.field { display: grid; gap: 7px; }
label { font-weight: 780; font-size: 13px; color: var(--muted-2); letter-spacing: 0.2px; }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  font-size: 14px;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms var(--ease);
}
textarea { min-height: 110px; resize: vertical; }
/* Le menu deroulant natif d'un <select> ignore le theme de la page dans
   certains navigateurs sauf si on force explicitement color-scheme + les
   couleurs de chaque <option> (supporte par Chrome/Edge/Firefox recents). */
select { color-scheme: dark; }
select option {
  background-color: #15171b;
  color: var(--fg);
}
input:focus, select:focus, textarea:focus { outline: none; box-shadow: var(--focus); border-color: rgba(var(--accent-rgb), 0.65); background: rgba(255, 255, 255, 0.06); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.help { color: var(--muted-2); font-size: 13px; }
.fineprint { color: var(--muted-2); font-size: 12px; line-height: 1.45; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; }
.checkbox-row input { width: 18px; height: 18px; margin-top: 2px; }

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.form-actions .btn { width: 100%; }

.notice {
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  background: var(--accent-15);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: rgba(246, 247, 249, 0.82);
  font-weight: 700;
}
.notice strong { color: var(--fg); }

/* Table */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-1);
  box-shadow: none;
}
th, td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
th { text-align: left; color: var(--fg); font-weight: 900; background: rgba(255, 255, 255, 0.06); }
tr:last-child td { border-bottom: 0; }
.good { color: rgba(var(--accent-rgb), 0.92); font-weight: 900; }
.bad { color: var(--muted-2); }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 44px 0;
  background: rgba(255, 255, 255, 0.015);
}
.footer .brand { margin-bottom: 10px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 18px;
  align-items: start;
}
.footer a { color: var(--muted); font-weight: 700; font-size: 14px; }
.footer a:hover { color: var(--fg); }
.footer small { color: var(--muted-2); }
.footer-links { display: grid; gap: 10px; }

/* Keep the public navigation focused on essentials (SEO pages stay indexable via sitemap). */
.footer a[href$="vendre-voiture-belgique.html"],
.footer a[href$="vendre-voiture-bruxelles.html"],
.footer a[href$="vendre-voiture-rapidement.html"],
.footer a[href$="agence-automobile-belgique.html"],
.footer a[href$="estimation-voiture-belgique.html"] { display: none; }

/* Sticky mobile CTA */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(var(--bg-rgb), 0.82);
  backdrop-filter: blur(12px);
  padding: 10px 12px;
  display: none;
}

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 950;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.40);
  transition: transform 200ms var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); }
@media (max-width: 760px) {
  .whatsapp-float { right: 16px; bottom: 78px; width: 50px; height: 50px; }
}
.sticky-cta .container {
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Utilities */
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.center { text-align: center; }
.items-center { align-items: center; }
.justify-end { justify-content: flex-end; }
.mt-10 { margin-top: 10px; }
.mt-18 { margin-top: 18px; }
.mb-10 { margin-bottom: 10px; }
.text-link { text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover { text-decoration: underline; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  background: var(--accent-15);
  color: rgba(246, 247, 249, 0.88);
}
.divider { height: 1px; background: var(--border); margin: 18px 0; }

.span-2 { grid-column: span 2; }

/* FAQ accordion */
.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  overflow: hidden;
}
.faq details { border-top: 1px solid var(--border); }
.faq details:first-child { border-top: 0; }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 900;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 950;
  line-height: 1;
  transform: translateY(-1px);
}
.faq details[open] summary::after { content: "-"; }
.faq .answer {
  overflow: hidden;
  padding: 0 18px 18px;
  color: var(--muted);
  transition: height 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq .answer p { margin: 0; }

/* Accessibility */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tight sections (vehicle details) */
.section--tight { padding: 54px 0 78px; }

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted-2);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
  margin-bottom: 18px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--fg); }

/* Catalogue layout (inspired by premium marketplaces, not copied) */
.catalog-shell {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}
.catalog-sidebar { position: sticky; top: 92px; }
.catalog-filters { padding: 18px; box-shadow: var(--shadow-1); }
.catalog-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.catalog-filters-head h3 { margin: 0; }
.catalog-filters .filters-actions {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: start;
}
.catalog-filters .filters-actions .btn { width: 100%; }

.catalog-filters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}
.catalog-filters-grid .field { gap: 0; }
.catalog-filters-grid input,
.catalog-filters-grid select {
  padding: 14px 16px;
  border-radius: 18px;
}
.catalog-filters-grid input { min-height: 52px; }
.catalog-filters-grid select { min-height: 52px; }

/* Custom select component */
.cs-wrap { position: relative; }
.cs-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px; min-height: 52px;
  background: #16171a; border: 1px solid var(--border); border-radius: 18px;
  color: var(--text); font-size: 14px; font-family: inherit;
  cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s;
}
.cs-btn:focus-visible { outline: none; box-shadow: var(--focus); border-color: rgba(var(--accent-rgb),.65); }
.cs-btn.cs-open { border-color: rgba(var(--accent-rgb),.55); border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; }
.cs-lbl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.cs-lbl.cs-ph { color: var(--muted-2); }
.cs-arr { flex-shrink: 0; color: var(--muted-2); transition: transform .2s var(--ease); display: flex; }
.cs-btn.cs-open .cs-arr { transform: rotate(180deg); }
.cs-panel {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: #16171a; border: 1px solid rgba(var(--accent-rgb),.35); border-top: none;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 12px 28px rgba(0,0,0,.65);
  overflow: hidden; overflow-y: auto; max-height: 220px;
}
.cs-item { padding: 10px 16px; cursor: pointer; font-size: 14px; color: var(--text); transition: background .1s; }
.cs-item:hover { background: rgba(255,255,255,.07); }
.cs-item--active { color: var(--accent); font-weight: 700; }
.cs-item--ph { color: var(--muted-2); }

.catalog-hint { margin-top: 10px; font-size: 13px; font-weight: 700; }
.catalog-hint strong { color: var(--fg); font-weight: 950; }

.filter-group {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.filter-group summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 0 6px;
  font-weight: 900;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 950;
  line-height: 1;
  transform: translateY(-1px);
}
.filter-group[open] summary::after { content: "-"; }
.filter-body { padding: 6px 0 4px; }

.catalog-main { min-width: 0; }
.catalog-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 14px;
}
.catalog-count { font-weight: 900; letter-spacing: -0.2px; }
.catalog-count strong { font-size: 18px; color: var(--fg); }
.catalog-sort { display: grid; gap: 7px; justify-items: end; }
.catalog-sort label { margin: 0; }
.catalog-sort select { min-width: 220px; }

.catalog-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 14px;
}

.listing-card {
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  min-height: auto;
}
.listing-media {
  position: relative;
  display: block;
  background:
    radial-gradient(900px 420px at 20% 0%, rgba(var(--accent-rgb), 0.22), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.listing-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.52));
  opacity: 0.62;
  pointer-events: none;
  z-index: 1;
}
.listing-media img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 360ms var(--ease);
  opacity: 0.98;
}
.listing-card:hover .listing-media img { transform: scale(1.045); }
.listing-sold-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  background: rgba(14, 14, 16, 0.84);
  color: #f87171;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.38);
  backdrop-filter: blur(6px);
}
.listing-card.is-sold .listing-media img { opacity: 0.42; filter: grayscale(0.25); }
.listing-card.is-sold .listing-media { cursor: default; }
.listing-sold-msg { margin: 0; font-size: 13px; color: var(--muted-2); font-style: italic; }

/* Prix barré / remise */
.price-original {
  display: block;
  text-decoration: line-through;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
}
.listing-price-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.tag--remise {
  background: rgba(251, 146, 60, 0.15);
  border-color: rgba(251, 146, 60, 0.38);
  color: #fb923c;
}

/* Admin row views badge */
.admin-row-views {
  font-size: 12px;
  color: var(--muted-2);
  font-weight: 600;
}

/* WhatsApp share button on fiche */
.vehicle-cta-secondary { margin-top: 10px; }

/* ─── Panel Paramètres (RBAC) ─────────────────────────────────────────────── */
.settings-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 20px 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.settings-tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: none;
  background: transparent;
  color: var(--muted-2);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.settings-tab-btn:hover { color: var(--text); }
.settings-tab-btn.is-active { color: var(--gold); border-bottom-color: var(--gold); }
.settings-section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.settings-invite-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}
.settings-invite-form input,
.settings-invite-form select { flex: 1; min-width: 160px; }
.settings-invite-status { font-size: 13px; color: var(--muted-2); }
.settings-user-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.settings-user-row:last-child { border-bottom: none; }
.settings-user-row.is-pending { opacity: 0.65; }
.settings-user-info {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.settings-user-name { font-weight: 600; font-size: 14px; }
.user-number-wrap { display: inline-flex; align-items: center; gap: 4px; }
.user-number-badge { font-family: monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--muted-2); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 4px; padding: 1px 7px; }
.user-number-copy { background: none; border: none; cursor: pointer; color: var(--muted-2); font-size: 11px; padding: 0; opacity: 0.6; transition: opacity 0.15s; }
.user-number-copy:hover { opacity: 1; }
.settings-role-select {
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
}
.settings-perm-panel {
  width: 100%;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}
.settings-perm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.settings-perm-row input[type="checkbox"] { width: 15px; height: 15px; flex-shrink: 0; accent-color: var(--gold); }
.settings-pending-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted-2);
  margin: 18px 0 10px;
}

/* ─── Gear icon ────────────────────────────────────────────────────────────── */
.btn-gear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transition: color .18s, background .18s, transform .35s;
}
.btn-gear:hover { color: var(--text); background: var(--surface-2); }
.btn-gear.is-active { color: var(--gold); transform: rotate(45deg); background: var(--surface-2); border-color: var(--gold); }

/* ─── Settings drawer overlay ──────────────────────────────────────────────── */
.settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0,0,0,.55);
  justify-content: flex-end;
}
.settings-overlay.is-open {
  display: flex;
  animation: fadeIn .18s ease;
}
.settings-drawer {
  width: min(520px, 95vw);
  height: 100%;
  background: var(--surface-0, #0d0e11);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  animation: slideInRight .22s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.settings-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.settings-drawer-title { font-size: 16px; font-weight: 700; }
.settings-drawer-body { flex: 1; overflow-y: auto; padding: 24px; }

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── Roles matrix ─────────────────────────────────────────────────────────── */
.roles-matrix { margin-top: 18px; width: 100%; }
.roles-matrix-row {
  display: grid;
  grid-template-columns: 1fr repeat(3, 90px);
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.roles-matrix-row:last-child { border-bottom: none; }
.roles-matrix-header { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); padding-bottom: 12px; }
.roles-matrix-perm-label { font-size: 13px; }
.roles-matrix-role-label { text-align: center; font-size: 12px; }
.roles-matrix-cell { display: flex; justify-content: center; }
.roles-matrix-cell input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }
.btn-share-wa {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #4ade80;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.08);
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
  justify-content: center;
}
.btn-share-wa:hover { background: rgba(74, 222, 128, 0.16); border-color: rgba(74, 222, 128, 0.55); }

/* Calculateur de mensualités */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calc-result {
  padding: 18px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.calc-result-main { display: flex; flex-direction: column; gap: 3px; }
.calc-result-main strong {
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.6px;
  color: var(--accent);
  line-height: 1;
}
.calc-result-details {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted-2);
}
.calc-taux { font-size: 12px; }
.calc-disclaimer { font-size: 12px; margin: 0; }
.calc-age-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 820;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
  letter-spacing: 0.3px;
}
.calc-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: var(--radius-sm);
}
.calc-partner-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.listing-badges {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 2;
}
.tag {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(var(--bg-rgb), 0.68);
  color: rgba(246, 247, 249, 0.88);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.2px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
}
.listing-body { padding: 16px 18px 18px; display: grid; gap: 10px; }
.listing-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.listing-top h3 { margin: 0; font-size: 18px; letter-spacing: -0.2px; }
.listing-top h3 a:hover { color: rgba(246, 247, 249, 0.92); }
.listing-price { font-weight: 950; letter-spacing: 0.2px; }
.listing-sub { margin: 0; color: var(--muted-2); font-weight: 700; font-size: 13px; }
.listing-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.listing-specs span {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}
.listing-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.catalog-empty { padding: 22px; }

/* Vehicle detail (gallery + sticky lead) */
.vehicle-head {
  display: grid;
  grid-template-columns: 1fr 0.62fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}
.vehicle-price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-1);
  padding: 18px;
  box-shadow: var(--shadow-1);
}
.vehicle-price-big { font-size: 30px; font-weight: 950; letter-spacing: -0.4px; }
.vehicle-price-sub { margin-top: 6px; font-size: 13px; font-weight: 700; }
.vehicle-cta { margin-top: 14px; display: grid; gap: 10px; }
.vehicle-cta .btn { width: 100%; }

.vehicle-top {
  display: grid;
  grid-template-columns: 1.55fr 0.8fr;
  gap: 18px;
  align-items: start;
  margin-top: 12px;
}
.vehicle-sticky { position: sticky; top: 92px; display: grid; gap: 12px; }
.vehicle-lead { padding: 18px; }
.vehicle-reassure { padding: 18px; }
.fact { padding: 18px 20px; }
.fact h3 { margin: 0 0 6px; }
.fact p { margin: 0; }

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.checklist li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-weight: 650;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.56);
  background: radial-gradient(circle at 30% 30%, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.06));
  box-shadow: 0 10px 18px rgba(15, 20, 30, 0.10);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}
.gallery-tile {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.gallery-tile--main { grid-column: 1 / span 1; grid-row: 1 / span 2; }
.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 360ms var(--ease);
}
.gallery-tile:hover img { transform: scale(1.04); }
.gallery-tile:focus { outline: none; box-shadow: var(--focus); }

.gallery-tile--more::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 20, 30, 0.06), rgba(15, 20, 30, 0.38));
  pointer-events: none;
}
.gallery-more {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 20, 30, 0.72);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 900;
  letter-spacing: 0.2px;
}
.gallery-hidden { display: none; }

/* Lightbox (photo viewer) */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}
.lightbox.open { display: grid; grid-template-columns: 1fr; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 30, 0.72);
  backdrop-filter: blur(10px);
}
.lightbox-dialog {
  position: relative;
  margin: 24px auto;
  width: min(1100px, calc(100% - 24px));
  max-height: calc(100% - 48px);
  border-radius: calc(var(--radius) + 10px);
  background: rgba(var(--bg-rgb), 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.62);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.lightbox-head {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.lightbox-title { font-weight: 950; letter-spacing: -0.2px; }
.lightbox-nav { display: flex; gap: 10px; align-items: center; }
.lightbox-nav .btn { height: 42px; padding: 0 12px; }
.lightbox-stage {
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  padding: 16px;
}
.lightbox-stage img {
  max-width: 100%;
  max-height: 62vh;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}
.lightbox-thumbs {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  overflow: auto;
}
.lightbox-thumb {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  overflow: hidden;
}
.lightbox-thumb img { width: 100%; height: 72px; object-fit: cover; display: block; }
.lightbox-thumb[aria-current="true"] { border-color: rgba(var(--accent-rgb), 0.56); box-shadow: var(--focus); }

@media (max-width: 760px) {
  .span-2 { grid-column: auto; }
  .trust .chip:nth-child(n+4) { display: none; }
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media (min-width: 1041px) {
  .brand small { display: block; }
}

/* Two-column Google block only on large screens (prevents clipped embeds on smaller viewports). */
@media (min-width: 1100px) {
  .google-reviews { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}

@media (max-width: 1040px) {
  .nav { gap: 18px; }
  .nav a:not(.btn) { font-size: 13px; }
  .header .nav a[href*="acheter-une-voiture"],
  .header .nav a[href*="vendre-ma-voiture"] {
    padding: 9px 12px;
    font-size: 13px;
  }
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .filters-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .catalog-shell { grid-template-columns: 1fr; }
  .catalog-sidebar { position: static; }
  .listing-card { grid-template-columns: 1fr; }
  .listing-media { border-right: 0; border-bottom: 1px solid var(--border); aspect-ratio: 16 / 10; }
  .vehicle-head { grid-template-columns: 1fr; }
  .vehicle-top { grid-template-columns: 1fr; }
  .vehicle-sticky { position: static; }
  .lightbox-thumbs { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .mobile-toggle { display: inline-flex; }
  .lang-switch-btn { padding: 5px 7px; font-size: 10px; }
  .hero { padding: 108px 0 52px; }
  .hero--home { min-height: auto; }
  .section { padding: 56px 0; }
  .section-tight { padding: 32px 0; }
  .field-row { grid-template-columns: 1fr; }
  .sticky-cta { display: block; }
  .stats { grid-template-columns: 1fr; }
  .filters-grid { grid-template-columns: 1fr; }
  .catalog-filters-grid { grid-template-columns: 1fr; }
  .filters-actions .btn { width: 100%; }
  .catalog-sort { justify-items: start; }
  .catalog-sort select { width: 100%; min-width: 0; }
  .catalog-toolbar { align-items: flex-start; flex-direction: column; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .gallery-tile--main { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 10; }
  .lightbox-dialog { margin: 12px auto; max-height: calc(100% - 24px); }
  .lightbox-thumbs { grid-template-columns: repeat(3, 1fr); }
  .google-embed { min-height: 360px; }
  .google-embed iframe { min-height: 360px; }
}

/* ============================================================================
   Panel admin (connexion, tableau de bord, formulaire d'annonce)
   ============================================================================ */

.notice--error {
  border-color: rgba(220, 90, 70, 0.45);
  background: rgba(220, 90, 70, 0.12);
}
.notice--error strong { color: #ffb4a3; }

.field-row--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* Connexion */
.admin-auth-page {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 64px 0;
}
.admin-auth-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 32px;
}
.admin-auth-card h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.admin-auth-card form { margin-top: 18px; display: grid; gap: 14px; }

/* Header partagé admin (dashboard + formulaire) */
.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Tableau de bord */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.admin-tab {
  position: relative;
  border: none;
  background: transparent;
  color: var(--muted-2);
  font: inherit;
  font-weight: 800;
  padding: 10px 4px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.admin-tab.is-active { color: var(--fg); }
.admin-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}
.admin-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 11px;
  font-weight: 900;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.admin-list { display: grid; gap: 14px; }

.admin-search {
  flex: 1 1 200px; max-width: 300px;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: 10px; color: var(--fg); font-family: inherit;
  font-size: 13px; padding: 7px 12px; transition: border-color .15s;
}
.admin-search:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.admin-search::placeholder { color: var(--muted-2); }

.lead-card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  overflow: hidden;
  transition: border-left-color 0.2s, opacity 0.2s;
}
.lead-card.is-contacted { border-left-color: #4ade80; }
.lead-card.is-closed    { border-left-color: var(--border-2); opacity: 0.55; }

.lead-card-body { padding: 18px 20px; display: grid; gap: 12px; }

.lead-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.lead-card-identity { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lead-card-name { font-size: 16px; font-weight: 700; }
.lead-card-date { font-size: 13px; color: var(--muted-2); white-space: nowrap; }

.lead-card-contact {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.lead-card-contact a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
.lead-card-contact a:hover { text-decoration: underline; }
.lead-card-contact svg { flex-shrink: 0; opacity: 0.8; }

.lead-card-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.lead-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}

.lead-chip--link {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.08);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.lead-chip--link:hover {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.6);
  text-decoration: none;
}

.lead-card-message {
  margin: 0;
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  white-space: pre-line;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: 8px;
  border-left: 2px solid var(--border-2);
}

/* ─── Lead card header (toujours visible) ────────────────── */
.lead-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: background 0.15s;
}
.lead-card-header:hover { background: rgba(255,255,255,.025); }
.lead-card-hd-left { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.lead-card-hd-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.lead-expand-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  border: none; background: transparent; color: var(--muted-2);
  cursor: pointer; flex-shrink: 0; transition: color .15s, background .15s;
}
.lead-expand-btn:hover { color: var(--text); background: var(--surface-2); }
.lead-card.is-open .lead-expand-btn { color: var(--gold); }

/* ─── Lead card detail (masqué, visible quand .is-open) ───── */
.lead-card-detail { display: none; border-top: 1px solid var(--border); }
.lead-card.is-open .lead-card-detail { display: block; }
.lead-card-detail .lead-card-chips { padding: 12px 18px 12px; }
.lead-card-detail .lead-card-message { margin: 0 18px 12px; padding: 10px 14px; }

/* ─── Notes historique ────────────────────────────────────── */
.lead-notes-section { padding: 14px 18px; border-top: 1px solid var(--border); }
.lead-notes-title { font-size: 11px; font-weight: 600; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.lead-notes-history { display: grid; gap: 8px; margin-bottom: 14px; }
.lead-notes-empty { font-size: 13px; color: var(--muted-2); margin: 0; }
.lead-note-item { padding: 10px 12px; background: var(--surface-3); border-radius: var(--radius-sm); border-left: 3px solid var(--gold); }
.lead-note-text { margin: 0 0 4px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.lead-note-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.lead-note-meta { font-size: 11px; color: var(--muted-2); }
.lead-note-delete {
  font-size: 11px; color: var(--muted-2); background: none; border: none;
  cursor: pointer; padding: 0; text-decoration: underline; opacity: 0;
  transition: opacity .15s, color .15s;
}
.lead-note-item:hover .lead-note-delete { opacity: 1; }
.lead-note-delete:hover { color: #f87171; }
.lead-note-add textarea {
  width: 100%; box-sizing: border-box;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--fg);
  font-family: inherit; font-size: 13px; padding: 8px 10px;
  resize: vertical; transition: border-color .15s;
}
.lead-note-add textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.lead-note-add textarea::placeholder { color: var(--muted-2); }
.lead-note-add-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.lead-notes-status { font-size: 12px; color: var(--muted-2); min-height: 16px; }
.lead-notes-status.is-saved { color: #4ade80; }
.lead-notes-status.is-error { color: #f87171; }
.lead-card-actions { padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* ─── Historique des statuts ─────────────────────────────── */
.status-history-section { padding: 10px 18px 12px; border-top: 1px solid var(--border); }
.status-history-list { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.status-history-item { display: flex; align-items: center; gap: 8px; }
.status-history-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--muted-2);
}
.status-history-dot--contacted { background: var(--gold); }
.status-history-dot--closed    { background: #4ade80; }
.status-history-dot--new       { background: #60a5fa; }
.status-history-text { font-size: 12px; color: var(--muted-2); }

/* ─── Panneau email (répondre au client) ─────────────────── */
.lead-compose-section { padding: 12px 18px; border-top: 1px solid var(--border); }
.lead-compose-panel { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.lead-compose-meta { font-size: 12px; color: var(--muted-2); padding: 4px 0; }
.lead-compose-subject {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--foreground); border-radius: 6px; padding: 8px 10px; font-size: 13px;
}
.lead-compose-body {
  width: 100%; resize: vertical; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--foreground); border-radius: 6px; padding: 10px 12px; font-size: 13px;
  font-family: inherit; line-height: 1.5; min-height: 120px;
}
.lead-compose-subject:focus, .lead-compose-body:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,162,39,.2);
}
.lead-compose-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ─── Log d'activité ─────────────────────────────────────── */
.log-toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 14px; padding: 12px 14px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px;
}
.log-toolbar .admin-search { flex: 1 1 180px; max-width: 260px; }
.log-filter-select {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--foreground); border-radius: 6px; padding: 7px 10px;
  font-size: 13px; cursor: pointer;
}
.log-result-count { font-size: 12px; color: var(--muted-2); margin-left: auto; white-space: nowrap; }
.log-entry-delete {
  flex-shrink: 0; align-self: center; margin-left: 8px;
  font-size: 11px; color: var(--muted-2); background: none; border: none;
  cursor: pointer; padding: 4px 8px; border-radius: 4px;
  opacity: 0; transition: opacity .15s, color .15s, background .15s;
}
.activity-entry:hover .log-entry-delete { opacity: 1; }
.log-entry-delete:hover { color: #f87171; background: rgba(248,113,113,.12); }
.activity-log { display: grid; gap: 6px; }
.activity-day-header {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted-2); padding: 18px 0 6px; border-bottom: 1px solid var(--border);
}
.activity-day-header:first-child { padding-top: 4px; }
.activity-entry {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface-2); border-radius: 8px;
  border-left: 3px solid var(--border);
  padding: 12px 14px 12px 12px;
}
.activity-entry--create { border-left-color: #4ade80; }
.activity-entry--update { border-left-color: var(--gold); }
.activity-entry--delete { border-left-color: #f87171; }
.activity-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  margin-top: 4px; background: var(--muted-2);
}
.activity-entry--create .activity-dot { background: #4ade80; }
.activity-entry--update .activity-dot { background: var(--gold); }
.activity-entry--delete .activity-dot { background: #f87171; }
.activity-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.activity-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.activity-action { font-size: 13.5px; font-weight: 600; }
.activity-action--create { color: #4ade80; }
.activity-action--update { color: var(--gold); }
.activity-action--delete { color: #f87171; }
.activity-ts { font-size: 11px; color: var(--muted-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.activity-author { font-size: 12px; color: var(--muted-2); }
.activity-detail-row { font-size: 12.5px; color: var(--foreground); opacity: .85; }
.activity-detail-row--secondary { font-size: 11.5px; color: var(--muted-2); opacity: 1; }
.activity-change {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 500;
  background: rgba(201,162,39,.12); color: var(--gold);
  border-radius: 4px; padding: 2px 8px; margin-top: 2px; align-self: flex-start;
}
.activity-preview {
  font-size: 12px; color: var(--muted-2); font-style: italic;
  border-left: 2px solid var(--border); padding-left: 8px;
  margin-top: 2px; word-break: break-word;
}

/* ─── Filtre / recherche demandes ────────────────────────── */
.leads-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.leads-filter-search {
  flex: 1 1 180px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  padding: 7px 12px;
}
.leads-filter-bar select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  padding: 7px 12px;
  cursor: pointer;
}
.leads-filter-search:focus,
.leads-filter-bar select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.leads-filter-count { font-size: 13px; color: var(--muted-2); margin-left: auto; white-space: nowrap; }

/* legacy — keep for transition */
.lead-row { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-1); }
.lead-row-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lead-row-head-left { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; }
.lead-row-name { font-size: 15px; font-weight: 700; }
.lead-row-date { font-size: 13px; color: var(--muted-2); }
.lead-row-contact { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.lead-row-contact a { color: var(--accent); display: flex; align-items: center; gap: 5px; }
.lead-row-details { display: flex; gap: 6px; flex-wrap: wrap; }
.lead-detail-chip { font-size: 12px; padding: 2px 9px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.lead-row-message { margin: 0; white-space: pre-line; color: var(--muted); font-size: 14px; font-style: italic; border-left: 2px solid var(--border-2); padding-left: 10px; }
.lead-row-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.analytics-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.analytics-chart-wrap {
  margin-top: 24px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 16px 12px;
}
.analytics-chart-title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
}
.analytics-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.analytics-legend {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  font-size: .78rem;
  color: var(--muted-2);
}
.analytics-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}
.analytics-stat {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  padding: 18px;
}
.analytics-stat-value { font-size: 32px; font-weight: 950; letter-spacing: -0.02em; }
.analytics-stat-label { margin-top: 4px; color: var(--muted-2); font-size: 13px; font-weight: 700; }

.analytics-top-list { display: grid; gap: 8px; }
.analytics-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(80px, 160px) 40px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.analytics-top-path {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.analytics-top-bar-wrap {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.analytics-top-bar { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.analytics-top-count { text-align: right; font-weight: 800; color: var(--fg); }

@media (max-width: 760px) {
  .analytics-stats { grid-template-columns: repeat(2, 1fr); }
  .analytics-chart-wrap { padding: 12px 10px 8px; }
  .analytics-top-row { grid-template-columns: minmax(0, 1fr) 80px 30px; }
}
.admin-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
}
.admin-row-thumb {
  width: 64px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface-2);
  flex: 0 0 auto;
}
.admin-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}
.admin-row-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.admin-toggle {
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  opacity: 0.55;
  transition: opacity 180ms var(--ease), background 180ms var(--ease);
}
.admin-toggle.is-on { opacity: 1; background: var(--accent-15); border-color: rgba(var(--accent-rgb), 0.5); }

/* Formulaire d'annonce */
.admin-form { padding: 28px; display: block; }
.admin-form h3 { margin-bottom: 12px; }
.options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 16px;
}
.photo-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.photo-preview {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: grab;
  transition: opacity 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.photo-preview.is-dragging { opacity: 0.35; cursor: grabbing; }
.photo-preview.is-drop-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.45) inset;
  transform: scale(1.02);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.photo-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.photo-preview-cover {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 11px;
  font-weight: 850;
}
.photo-input-label { display: inline-flex; cursor: pointer; }
.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

@media (max-width: 760px) {
  .field-row--3 { grid-template-columns: 1fr; }
  .options-grid { grid-template-columns: 1fr 1fr; }
  .admin-toolbar { flex-direction: column; align-items: flex-start; }
  .admin-row { flex-wrap: wrap; }
  .admin-header-actions { flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
  .admin-tabs { flex-wrap: wrap; }
  .lead-row-message { word-break: break-word; }
}

@media (max-width: 480px) {
  .options-grid { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
}

/* ── CMS Éditeur de site ─────────────────────────────────────────────────── */
.cms-toolbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 20px;
  flex-wrap: wrap;
}
.cms-search {
  flex: 1;
  min-width: 180px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
}
.cms-search:focus { outline: none; border-color: rgba(var(--accent-rgb),0.5); box-shadow: var(--focus); }
.cms-preview-btn { white-space: nowrap; }
.cms-editor {
  display: flex;
  flex-direction: column;
}
.cms-body {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 28px;
  min-height: 520px;
  align-items: start;
}
.cms-field-default {
  display: block;
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
/* Grille couleurs */
.cms-main-colors { display: block; }
.cms-main-colors .cms-section-header { margin-bottom: 24px; }
.cms-main-colors .cms-field-color {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.cms-main-colors { --cms-color-cols: repeat(auto-fill, minmax(160px, 1fr)); }
.cms-main-colors > .cms-field-color { display: inline-flex; }
.cms-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  width: 100%;
}

/* Swatch individuelle */
.cms-color-swatch-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}
.cms-color-input-hidden {
  position: absolute;
  width: 0; height: 0;
  opacity: 0;
  pointer-events: none;
}
.cms-color-swatch {
  width: 120px;
  height: 120px;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,0.12);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  flex-shrink: 0;
}
.cms-color-swatch:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 36px rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.3);
}
.cms-color-swatch:focus-visible {
  outline: none;
  box-shadow: var(--focus), 0 10px 36px rgba(0,0,0,0.5);
}
.cms-color-hex {
  font-size: 12px;
  font-family: monospace;
  color: var(--muted-2);
  letter-spacing: 0.08em;
}
.cms-color-reset {
  margin-top: 4px;
  font-size: 12px;
}

/* Preview overlay */
.cms-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.cms-preview-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: #14151a;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.cms-preview-label {
  flex: 1;
  font-size: 13px;
  color: var(--muted-2);
  text-align: center;
}
.cms-preview-iframe {
  flex: 1;
  border: none;
  width: 100%;
}
.cms-preview-float-close {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 10;
  background: rgba(7, 8, 10, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-2);
  color: var(--fg);
  border-radius: 24px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  transition: background 0.15s, transform 0.15s;
  letter-spacing: 0.02em;
}
.cms-preview-float-close:hover {
  background: rgba(207, 154, 74, 0.18);
  border-color: rgba(207, 154, 74, 0.4);
  color: var(--accent);
  transform: translateY(-1px);
}
.cms-sidebar {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid var(--border);
  padding-right: 20px;
  position: sticky;
  top: 90px;
}
.cms-section-btn {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--fg);
  font-size: 14px;
  transition: background 0.15s;
  font-family: inherit;
}
.cms-section-btn:hover { background: var(--surface-2); }
.cms-section-btn.is-active { background: var(--accent-15); color: var(--accent); font-weight: 700; }
.cms-main { display: flex; flex-direction: column; gap: 20px; padding-bottom: 48px; }
.cms-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.cms-section-header h2 { flex: 1; font-size: 19px; }
.cms-save-indicator {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.cms-save-indicator.is-saved  { color: #4ade80; background: rgba(74,222,128,0.12); }
.cms-save-indicator.is-error  { color: #f87171; background: rgba(248,113,113,0.12); }
.cms-field { display: flex; flex-direction: column; gap: 7px; }
.cms-field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cms-input,
.cms-textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.55;
  transition: border-color 0.15s;
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
}
.cms-input:focus,
.cms-textarea:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: var(--focus);
}
.cms-img-preview {
  max-height: 72px;
  max-width: 180px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 8px;
}
.cms-file-input { font-size: 13px; color: var(--muted-2); cursor: pointer; }
.cms-upload-status { font-size: 12px; }

/* History modal */
.cms-modal {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cms-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
}
.cms-history-panel {
  position: relative;
  background: #14151a;
  border: 1px solid var(--border-2);
  border-radius: 20px;
  width: 520px;
  max-width: 92vw;
  max-height: 72vh;
  overflow-y: auto;
  box-shadow: var(--shadow-2);
}
.cms-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #14151a;
  z-index: 1;
}
.cms-history-head h3 { font-size: 15px; }
.cms-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  gap: 12px;
}
.cms-history-item:last-child { border-bottom: none; }

@media (max-width: 720px) {
  .cms-body { grid-template-columns: 1fr; }
  .cms-sidebar { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 12px; flex-direction: row; flex-wrap: wrap; position: static; }
  .cms-preview-label { display: none; }
}
