/* ===================== Variables ===================== */
:root {
  --ink: #14213d;
  --ink-2: #3b4660;
  --muted: #6b7489;
  --line: #e3e6ec;
  --line-strong: #c4cad6;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --accent: #e8590c;
  --accent-hover: #c44a08;
  --accent-dark: #c44a08;
  --accent-soft: #fff1e8;
  --accent-soft-2: #ffe2d1;
  --success: #1f7a4d;
  --success-soft: #e7f5ee;
  --danger: #c22f2f;
  --danger-soft: #fdecec;
  --navy: #14213d;
  --solid: #14213d;
  --on-solid: #ffffff;
  --media-a: #eef1f5;
  --media-b: #dfe4eb;
  --overlay: rgba(255, 255, 255, .92);
  --chart-1: #e8590c;
  --chart-2: #2f5d9e;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 4px 16px rgba(20, 33, 61, .06);
  --shadow-hover: 0 2px 4px rgba(20, 33, 61, .08), 0 12px 32px rgba(20, 33, 61, .12);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2314213d' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  color-scheme: light;
  --radius: 14px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
/* Mode nuit : suit le réglage de l'appareil, sauf si le visiteur a choisi avec le bouton */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --ink: #e8ecf4;
  --ink-2: #b8c0d2;
  --muted: #8d97ad;
  --line: #26314a;
  --line-strong: #3a4763;
  --bg: #0b1220;
  --surface: #141c2f;
  --accent: #e8662a;
  --accent-hover: #f27a40;
  --accent-dark: #ff9a62;
  --accent-soft: #33200f;
  --accent-soft-2: #47291a;
  --success: #4cc38a;
  --success-soft: #12301f;
  --danger: #f07070;
  --danger-soft: #3a1a1d;
  --navy: #0f1830;
  --solid: #e8ecf4;
  --on-solid: #0b1220;
  --media-a: #1d2741;
  --media-b: #151d31;
  --overlay: rgba(20, 28, 47, .9);
  --chart-1: #e8662a;
  --chart-2: #5b88d4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .4);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23e8ecf4' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e8ecf4;
  --ink-2: #b8c0d2;
  --muted: #8d97ad;
  --line: #26314a;
  --line-strong: #3a4763;
  --bg: #0b1220;
  --surface: #141c2f;
  --accent: #e8662a;
  --accent-hover: #f27a40;
  --accent-dark: #ff9a62;
  --accent-soft: #33200f;
  --accent-soft-2: #47291a;
  --success: #4cc38a;
  --success-soft: #12301f;
  --danger: #f07070;
  --danger-soft: #3a1a1d;
  --navy: #0f1830;
  --solid: #e8ecf4;
  --on-solid: #0b1220;
  --media-a: #1d2741;
  --media-b: #151d31;
  --overlay: rgba(20, 28, 47, .9);
  --chart-1: #e8662a;
  --chart-2: #5b88d4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .4);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23e8ecf4' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* L'attribut hidden doit toujours masquer, même sur un élément en display:grid/flex */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.55; display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 28px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--solid); color: var(--on-solid); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ===================== Boutons ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; padding: 12px 20px; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: background .15s, transform .1s, box-shadow .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--solid); color: var(--on-solid); }
.btn-dark:hover { opacity: .88; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-dark); font-weight: 700; cursor: pointer; text-decoration: underline; }

/* ===================== En-tête ===================== */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; text-decoration: none; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; }
.logo-mark svg { width: 22px; fill: #fff; }
.logo-img { height: 44px; width: auto; max-width: 220px; object-fit: contain; display: block; border-radius: 8px; }
@media (max-width: 600px) { .logo-img { height: 38px; max-width: 170px; } }
.main-nav { display: flex; align-items: center; gap: 18px; }
.main-nav > a, .logo, .nav-account .btn { white-space: nowrap; }
/* Écrans moyens : le téléphone reste dans le pied de page et la page contact */
@media (min-width: 1081px) and (max-width: 1360px) { .nav-phone { display: none; } }
.main-nav > a { text-decoration: none; font-weight: 600; color: var(--ink-2); }
.main-nav > a:hover, .main-nav > a[aria-current] { color: var(--ink); }
.main-nav > a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }
.nav-phone { font-variant-numeric: tabular-nums; }
.nav-account { display: flex; gap: 12px; align-items: center; }
.nav-login { font-weight: 600; text-decoration: none; color: var(--ink-2); }
.menu-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .2s; }

@media (max-width: 1080px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-open .main-nav { display: flex; }
  .main-nav > a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .main-nav > a[aria-current] { box-shadow: none; color: var(--accent-dark); }
  .nav-account { padding-top: 14px; flex-wrap: wrap; }
  .nav-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ===================== Hero / recherche rapide ===================== */
.hero { background: var(--navy); color: #fff; padding: 44px 0 64px; position: relative; overflow: hidden; }
.hero::after {
  content: ''; position: absolute; right: -120px; top: -80px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 89, 12, .35), transparent 70%); pointer-events: none;
}
.hero h1 { max-width: 640px; }
.hero p.lead { color: #c5cbe0; margin: 0 0 24px; font-size: 1.05rem; max-width: 560px; }
.quick-search {
  background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 16px;
  display: grid; gap: 12px; grid-template-columns: 1fr; box-shadow: 0 20px 40px rgba(0, 0, 0, .25); position: relative; z-index: 1;
}
@media (min-width: 640px) { .quick-search { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .quick-search { grid-template-columns: repeat(4, 1fr) auto; align-items: end; } }
.qs-field label { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.quick-search .btn { height: 48px; }
@media (min-width: 640px) and (max-width: 999px) { .quick-search .btn { grid-column: 1 / -1; } }

.brand-strip { display: flex; gap: 8px; margin-top: 18px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; position: relative; z-index: 1; }
.brand-strip::-webkit-scrollbar { display: none; }
.brand-chip {
  flex: none; background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .9rem; cursor: pointer;
}
.brand-chip:hover { background: rgba(255, 255, 255, .16); }
.brand-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.brand-chip small { opacity: .7; margin-left: 4px; }

/* ===================== Champs ===================== */
select, input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], textarea {
  width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface);
  transition: border-color .15s;
}
textarea { height: auto; min-height: 140px; padding: 12px 14px; resize: vertical; }
select {
  appearance: none; padding-right: 38px; cursor: pointer;
  background-image: var(--select-arrow);
  background-repeat: no-repeat; background-position: right 14px center;
}
select:disabled { background-color: var(--bg); color: var(--muted); cursor: not-allowed; }
select:hover:not(:disabled), input:hover, textarea:hover { border-color: var(--line-strong); }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--ink); }
[aria-invalid="true"] { border-color: var(--danger) !important; }

.field { margin-bottom: 18px; }
.field > label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.field-hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.field-error { color: var(--danger); font-size: .88rem; margin: 6px 0 0; font-weight: 600; }
.form-alert { background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 12px 14px; font-weight: 600; margin-bottom: 18px; }
.form-success { background: var(--success-soft); color: var(--success); border-radius: 10px; padding: 16px; font-weight: 600; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 90px; }
.pw-toggle { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 10px; border: 0; background: var(--bg); border-radius: 8px; font-size: .85rem; font-weight: 700; cursor: pointer; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--accent); }

/* ===================== Catalogue ===================== */
.catalogue { padding: 28px 0 60px; }
.catalogue-layout { display: grid; gap: 28px; }
@media (min-width: 1000px) { .catalogue-layout { grid-template-columns: 270px 1fr; align-items: start; } }

.filters {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
@media (min-width: 1000px) { .filters { position: sticky; top: 88px; max-height: calc(100vh - 108px); overflow-y: auto; } }
.filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.filters-head h2 { font-size: 1.15rem; margin: 0; }
.filter-group { border-top: 1px solid var(--line); padding: 16px 0; }
.filter-group:last-of-type { padding-bottom: 0; }
.filter-group > h3 { font-size: .95rem; margin-bottom: 10px; }
.toggle-list { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px;
  font-size: .9rem; font-weight: 600; cursor: pointer; color: var(--ink-2);
}
.toggle:hover { border-color: var(--ink-2); }
.toggle[aria-pressed="true"] { background: var(--solid); border-color: var(--solid); color: var(--on-solid); }
.range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range-row select { height: 42px; font-size: .92rem; }

.filters-close, .filters-apply, .filters-open { display: none; }
@media (max-width: 999px) {
  .filters {
    position: fixed; inset: 0; z-index: 60; border-radius: 0; overflow-y: auto; padding: 20px 16px 96px;
    transform: translateX(-100%); transition: transform .25s ease; visibility: hidden;
  }
  .filters.open { transform: none; visibility: visible; }
  .filters-close { display: inline-flex; }
  .filters-apply {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px; background: var(--surface);
    border-top: 1px solid var(--line); z-index: 61;
  }
  .filters:not(.open) .filters-apply { display: none; }
  .filters-open { display: inline-flex; }
  body.filters-locked { overflow: hidden; }
}

.results-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.results-count { font-size: 1.15rem; font-weight: 800; margin: 0; }
.results-count span { color: var(--accent-dark); }
.results-tools { display: flex; gap: 10px; align-items: center; }
.results-tools select { height: 42px; width: auto; min-width: 190px; font-size: .92rem; }
.active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; min-height: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent-dark);
  border: 0; border-radius: 999px; padding: 6px 10px 6px 12px; font-weight: 700; font-size: .88rem; cursor: pointer;
}
.chip::after { content: '×'; font-size: 1.1rem; line-height: 1; }
.chip:hover { background: var(--accent-soft-2); }

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

.card {
  position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-link { position: absolute; inset: 0; z-index: 1; }
.card-link:focus-visible { outline-offset: -3px; border-radius: var(--radius); }
.card-media { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(180deg, var(--media-a), var(--media-b)); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.car-placeholder { width: 100%; height: 100%; display: grid; place-items: center; padding: 8% 10% 4%; }
.car-svg { width: 100%; height: auto; }
.badge { position: absolute; left: 12px; top: 12px; background: var(--surface); font-size: .78rem; font-weight: 800; padding: 4px 9px; border-radius: 999px; }
.fav-btn {
  position: absolute; right: 10px; top: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--overlay); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.fav-btn svg { width: 20px; fill: none; stroke: var(--ink); stroke-width: 2; transition: .15s; }
.fav-btn:hover svg { stroke: var(--accent); }
.fav-btn.is-on svg { fill: var(--accent); stroke: var(--accent); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-title { margin: 0; font-size: 1.12rem; }
.card-version { margin: 2px 0 12px; color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-specs { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.card-specs li { background: var(--bg); border-radius: 6px; padding: 3px 8px; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; }
.price { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.card-cta { color: var(--accent-dark); font-weight: 700; font-size: .92rem; }

.empty { text-align: center; background: var(--surface); border-radius: var(--radius); padding: 48px 20px; box-shadow: var(--shadow); }
.empty p { color: var(--muted); }
.skeleton { background: var(--surface); border-radius: var(--radius); height: 340px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); animation: shimmer 1.2s infinite; transform: translateX(-100%); }
@keyframes shimmer { to { transform: translateX(100%); } }

.trust { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 0 0 56px; }
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; flex: none; }
.trust-icon svg { width: 22px; stroke: var(--accent-dark); fill: none; stroke-width: 2; }
.trust-item p { margin: 0; color: var(--muted); font-size: .92rem; }
.trust-item strong { display: block; color: var(--ink); }

/* ===================== Fiche véhicule ===================== */
.breadcrumb { font-size: .9rem; color: var(--muted); padding: 20px 0 12px; }
.breadcrumb a { color: var(--ink-2); }
.detail { display: grid; gap: 28px; padding-bottom: 48px; }
@media (min-width: 1000px) { .detail { grid-template-columns: 1fr 380px; align-items: start; } }
.gallery-main { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(180deg, var(--media-a), var(--media-b)); border-radius: var(--radius); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery-thumbs button { flex: none; width: 96px; aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--media-a); }
.gallery-thumbs button[aria-current="true"] { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.panel + .panel { margin-top: 20px; }
.sticky-panel { position: sticky; top: 88px; }
.detail-title { margin-bottom: 4px; }
.detail-version { color: var(--muted); margin: 0 0 16px; }
.detail-price { font-size: 2rem; font-weight: 800; margin: 0 0 4px; }
.detail-price-note { color: var(--muted); font-size: .88rem; margin: 0 0 20px; }
.panel .btn { margin-bottom: 10px; }
.specs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0; }
.spec { background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.spec dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--muted); }
.spec dd { margin: 2px 0 0; font-weight: 800; }
.equip-list { columns: 2 220px; padding: 0; list-style: none; margin: 0; }
.equip-list li { padding: 5px 0 5px 26px; position: relative; break-inside: avoid; }
.equip-list li::before { content: ''; position: absolute; left: 2px; top: 11px; width: 12px; height: 7px; border-left: 2.5px solid var(--success); border-bottom: 2.5px solid var(--success); transform: rotate(-45deg); }
.detail-fav { display: inline-flex; align-items: center; gap: 8px; }
.detail-fav .fav-btn { position: static; box-shadow: none; background: var(--bg); }
.section-title { margin: 40px 0 16px; }

/* ===================== Pages simples (auth, contact, légal) ===================== */
.page-head { padding: 36px 0 8px; }
.page-head p { color: var(--muted); max-width: 640px; }
.auth-wrap { display: grid; place-items: center; padding: 40px 16px 64px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 28px; }
.auth-card h1 { font-size: 1.7rem; }
.auth-card .sub { color: var(--muted); margin: 0 0 24px; }
.auth-switch { text-align: center; margin: 20px 0 0; color: var(--muted); }
.auth-switch a { color: var(--accent-dark); font-weight: 700; }
.pw-rules { list-style: none; padding: 0; margin: 8px 0 0; font-size: .85rem; color: var(--muted); }
.pw-rules li::before { content: '○ '; }
.pw-rules li.ok { color: var(--success); }
.pw-rules li.ok::before { content: '✓ '; }

.contact-layout { display: grid; gap: 28px; padding: 16px 0 64px; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: 1fr 360px; align-items: start; } }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.info-list li:last-child { border-bottom: 0; }
.info-list strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hours { width: 100%; border-collapse: collapse; font-size: .92rem; }
.hours td { padding: 6px 0; }
.hours td:last-child { text-align: right; font-weight: 600; }
.vehicle-ref { display: flex; gap: 12px; align-items: center; background: var(--bg); border-radius: 10px; padding: 10px; margin-bottom: 18px; }
.vehicle-ref .car-placeholder, .vehicle-ref img { width: 96px; height: 60px; padding: 0; flex: none; object-fit: cover; border-radius: 6px; }

.legal { max-width: 820px; padding: 8px 0 64px; }
.legal .panel { padding: 28px clamp(20px, 4vw, 40px); }
.legal h2 { font-size: 1.25rem; margin-top: 28px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--ink-2); }
.legal [data-site] { font-weight: 700; color: var(--ink); }
.legal .updated { color: var(--muted); font-size: .9rem; }
.notice { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 8px; font-size: .92rem; margin-bottom: 20px; }

.account-grid { display: grid; gap: 20px; padding-bottom: 64px; }
@media (min-width: 900px) { .account-grid { grid-template-columns: 300px 1fr; align-items: start; } }

/* ===================== Pied de page ===================== */
/* Pied de page : bordure pour le détacher du fond en mode nuit */
.site-footer { border-top: 1px solid var(--line); background: var(--navy); color: #c5cbe0; margin-top: auto; font-size: .93rem; }
.footer-grid { display: grid; gap: 28px; padding-top: 44px; padding-bottom: 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer-brand { color: #fff; font-weight: 800; font-size: 1.15rem; margin-top: 0; }
.footer-title { color: #fff; font-weight: 700; margin-top: 0; }
.site-footer a { color: #e6e9f2; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { padding: 3px 0; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 18px; padding-bottom: 24px; font-size: .85rem; }

/* ===================== Toast ===================== */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--solid); color: var(--on-solid);
  padding: 12px 20px; border-radius: 10px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 100;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ===================== Bouton jour / nuit ===================== */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--ink); flex: none;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
.header-actions { display: flex; align-items: center; gap: 10px; }
@media (min-width: 1081px) { .header-actions { order: 3; } .main-nav { margin-left: auto; } }

/* ===================== Photos (formulaires) ===================== */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 10px; }
.photo { position: relative; aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; background: var(--bg); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.main { outline: 3px solid var(--accent); outline-offset: -3px; }
.photo .tag { position: absolute; left: 6px; top: 6px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
.photo-tools { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 4px; }
.photo-tools button { width: 28px; height: 28px; border: 0; border-radius: 6px; background: var(--overlay); color: var(--ink); cursor: pointer; font-weight: 800; }
.photo-tools button:hover { background: var(--surface); }
.photo-tools button[data-act="del"]:hover { background: var(--danger); color: #fff; }
.photo.uploading { display: grid; place-items: center; color: var(--muted); font-size: .85rem; font-weight: 700; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 18px;
  border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; text-align: center; color: var(--ink-2);
}
.dropzone span { color: var(--muted); font-size: .85rem; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }

/* ===================== Modules : vendre / recherche ===================== */
.steps { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 8px 0 24px; counter-reset: step; list-style: none; padding: 0; }
.steps li { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px 14px 58px; position: relative; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800;
}
.steps strong { display: block; }
.steps span { color: var(--muted); font-size: .9rem; }
.module-layout { display: grid; gap: 24px; padding-bottom: 64px; }
@media (min-width: 1000px) { .module-layout { grid-template-columns: 1fr 320px; align-items: start; } .module-aside { position: sticky; top: 88px; } }
.form-section { margin-bottom: 20px; }
.form-section h2 { font-size: 1.15rem; margin-bottom: 4px; }
.form-section > p.field-hint { margin: 0 0 14px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 14px; }
.fgrid .span-2 { grid-column: span 2; }
@media (max-width: 420px) { .fgrid .span-2 { grid-column: auto; } }
.checks { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.login-needed { text-align: center; padding: 32px 24px; }
.login-needed .btn { margin: 6px; }
.opt { font-weight: 400; color: var(--muted); font-size: .88rem; }
.promo { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); padding-bottom: 48px; }
.promo-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.promo-card h2 { font-size: 1.25rem; margin: 0; }
.promo-card p { margin: 0 0 8px; color: var(--muted); }
.promo-card .btn { margin-top: auto; }

/* ===================== Mon compte : demandes ===================== */
.req { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 12px; }
.req-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.req-head h3 { margin: 0; font-size: 1.05rem; }
.req small { color: var(--muted); }
.req p { margin: 6px 0 0; color: var(--ink-2); }
.pill { display: inline-block; font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.pill.wait { background: var(--bg); color: var(--ink-2); }
.pill.action { background: var(--accent-soft); color: var(--accent-dark); }
.pill.ok { background: var(--success-soft); color: var(--success); }
.pill.ko { background: var(--danger-soft); color: var(--danger); }
.offer-box { margin-top: 12px; background: var(--accent-soft); border-radius: 10px; padding: 14px 16px; }
.offer-box .offer-price { font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.offer-box .btn { margin: 10px 8px 0 0; }
.admin-note { margin-top: 10px; background: var(--bg); border-radius: 10px; padding: 10px 14px; white-space: pre-wrap; font-size: .93rem; }
.req-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.req-thumbs { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.req-thumbs img { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; }

.missing { color: var(--danger) !important; font-style: italic; }

/* Fiche véhicule sur mobile : titre, prix et bouton « intéressé » juste sous la photo */
@media (max-width: 999px) {
  .detail { display: flex; flex-direction: column; }
  .detail > aside { order: -1; }
  .detail > div:first-child { display: contents; }
  .detail .gallery-main { order: -2; }
  .detail .gallery-thumbs { order: -2; }
  .sticky-panel { position: static; }
}
.photo-missing { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: .85rem; }
