/* ============================================================================
   GARI — Système de Design Premium E-Commerce Automobile (PC & Mobile)
   Palette : Midnight Navy #0B1320 · Orange GARI #EB4B15 · Surfaces claires épurées
   ============================================================================ */

:root {
    --navy-950: #070D17;
    --navy-900: #0B1320;
    --navy-800: #152033;
    --navy-700: #1E2D45;
    --brand: #EB4B15;
    --brand-hover: #D43E0D;
    --brand-soft: #FFF4EE;
    --brand-border: #FDD8C5;
    --bg: #FFFFFF;
    --bg-subtle: #F7F8FA;
    --bg-muted: #F1F3F6;
    --text: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --border: #E6E8EE;
    --border-strong: #D1D5DF;
    --success: #059669;
    --success-bg: #ECFDF5;
    --warn: #B45309;
    --warn-bg: #FEF3C7;
    --danger: #DC2626;
    --danger-bg: #FEF2F2;
    --info: #3730A3;
    --info-bg: #EEF2FF;
    --radius-xs: 8px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 999px;
    --shadow-xs: 0 1px 2px rgba(11, 19, 32, 0.04);
    --shadow-sm: 0 4px 14px rgba(11, 19, 32, 0.06);
    --shadow-md: 0 12px 32px rgba(11, 19, 32, 0.09);
    --shadow-lg: 0 22px 48px rgba(11, 19, 32, 0.14);
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.tabular, .price, .kpi-val, td.num { font-variant-numeric: tabular-nums; }
.site-main { flex: 1; }

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

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

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

/* ---------- Utilitaires d'espacement ---------- */
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 36px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 18px; }
.mb-4 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13.5px; }
.text-xs { font-size: 12px; }
.text-brand { color: var(--brand); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-right { text-align: right; }

/* ---------- Header & Navigation ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -0.02em;
    color: var(--navy-900);
    flex-shrink: 0;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--navy-900);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.nav-link {
    padding: 8px 13px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.16s, background 0.16s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover {
    color: var(--navy-900);
    background: var(--bg-subtle);
}

.nav-link.is-active {
    color: var(--navy-900);
    background: var(--bg-muted);
}

.nav-link-staff {
    color: var(--brand);
}

.nav-dot {
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.16s;
}

.icon-btn:hover {
    background: var(--bg-muted);
    border-color: var(--border-strong);
}

.avatar-xs {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--navy-900);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn { display: none; }

.mobile-drawer {
    border-top: 1px solid var(--border);
    background: #fff;
    padding: 12px 0 20px;
    box-shadow: var(--shadow-md);
}

.mobile-drawer-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-link {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    color: var(--text-secondary);
}

.mobile-link.is-active, .mobile-link:hover {
    background: var(--bg-subtle);
    color: var(--navy-900);
}

.mobile-drawer-cta {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius-pill);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.12s, background 0.16s, border-color 0.16s, box-shadow 0.16s;
    white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-sm { padding: 8px 15px; font-size: 13.5px; }
.btn-xs { padding: 5px 11px; font-size: 12.5px; }
.btn-lg { padding: 14px 26px; font-size: 15px; font-weight: 700; }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 4px 14px rgba(235, 75, 21, 0.25);
}

.btn-primary:hover {
    background: var(--brand-hover);
    box-shadow: 0 6px 18px rgba(235, 75, 21, 0.32);
}

.btn-dark {
    background: var(--navy-900);
    color: #fff;
}

.btn-dark:hover { background: var(--navy-800); }

.btn-soft {
    background: var(--bg-subtle);
    color: var(--text);
    border-color: var(--border);
}

.btn-soft:hover, .btn-soft.is-active {
    background: var(--bg-muted);
    border-color: var(--border-strong);
}

.btn-outline {
    background: #fff;
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-outline:hover {
    background: var(--bg-subtle);
    border-color: var(--navy-900);
}

.btn-outline-light {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.24);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.45);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover { background: #047857; }

.btn-danger-soft {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: #FECACA;
}

.btn-danger-soft:hover { background: #FEE2E2; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

.badge-occasion, .badge-info { background: var(--info-bg); color: var(--info); }
.badge-neuf { background: #FFF0EA; color: #C63A0B; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-dark { background: var(--navy-900); color: #fff; }
.badge-muted { background: var(--bg-muted); color: var(--text-secondary); }

/* ---------- Messages Flash ---------- */
.flash-stack {
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-xs);
}

.flash-success { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.flash-error { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.flash-info, .flash-warning { background: var(--brand-soft); border-color: var(--brand-border); color: #7C2D12; }
.flash-icon { flex-shrink: 0; margin-top: 2px; }
.flash-text { flex: 1; }
.flash-close {
    background: none;
    border: 0;
    cursor: pointer;
    opacity: 0.65;
    padding: 2px;
    color: currentColor;
}
.flash-close:hover { opacity: 1; }

/* ---------- Hero Page d'Accueil ---------- */
.hero {
    position: relative;
    background-color: var(--navy-950);
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 78px 0 72px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(7, 13, 23, 0.92) 0%, rgba(11, 19, 32, 0.80) 55%, rgba(11, 19, 32, 0.68) 100%);
}

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

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: rgba(235, 75, 21, 0.16);
    border: 1px solid rgba(235, 75, 21, 0.38);
    color: #FF956E;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hero-title {
    font-size: clamp(2.1rem, 4.4vw, 3.45rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    max-width: 680px;
}

.hero-subtitle {
    margin-top: 18px;
    font-size: clamp(1rem, 1.4vw, 1.12rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.80);
    max-width: 640px;
}

.hero-search {
    margin-top: 34px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: end;
    box-shadow: var(--shadow-lg);
}

.hero-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 6px;
    padding-left: 4px;
}

.hero-field select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.hero-field select option {
    background: var(--navy-900);
    color: #fff;
}

.hero-search .btn-primary {
    height: 44px;
    padding: 0 24px;
}

.hero-stats {
    margin-top: 38px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 220px));
    gap: 28px;
}

.hero-stat strong {
    display: block;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1.15;
}

.hero-stat span {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.68);
}

/* ---------- Sections ---------- */
.section { padding: 68px 0; }
.section-subtle { background: var(--bg-subtle); }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.eyebrow {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 8px;
    display: block;
}

.section-title {
    font-size: clamp(1.6rem, 2.6vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--navy-900);
    line-height: 1.18;
}

/* ---------- Cartes Carrosserie (6 types) ---------- */
.body-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.body-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    transition: transform 0.16s, border-color 0.16s, box-shadow 0.16s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.body-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand);
    box-shadow: var(--shadow-sm);
}

.body-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.body-card h3 {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--navy-900);
    margin-top: 4px;
}

.body-card p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.45;
}

/* ---------- Cartes Véhicules ---------- */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.vehicle-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

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

.vehicle-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-muted);
}

.vehicle-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.vehicle-card:hover .vehicle-card-media img {
    transform: scale(1.04);
}

.vehicle-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    box-shadow: 0 2px 8px rgba(11, 19, 32, 0.12);
}

.vehicle-card-photos {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    background: rgba(11, 19, 32, 0.72);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.vehicle-card-body {
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.vehicle-card-title {
    font-size: 16.5px;
    font-weight: 700;
    color: var(--navy-900);
    line-height: 1.3;
}

.vehicle-card-loc {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-muted);
}

.vehicle-card-specs {
    margin-top: 10px;
    padding-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 13px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.vehicle-card-specs span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.vehicle-card-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vehicle-price {
    font-size: 19px;
    font-weight: 800;
    color: var(--navy-900);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.vehicle-link {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.vehicle-link:hover { text-decoration: underline; }

/* ---------- Comment ça marche & À propos (3 colonnes) ---------- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.step-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 26px;
    box-shadow: var(--shadow-xs);
}

.step-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--navy-900);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.step-num {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 8px;
}

.step-card h3 {
    font-size: 16.5px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 10px;
}

.step-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ---------- Garanties (image + liste) ---------- */
.guarantees-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 48px;
    align-items: center;
}

.guarantees-media {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 4 / 3;
}

.guarantees-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guarantee-list {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guarantee-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.guarantee-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guarantee-item h4 {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 3px;
}

.guarantee-item p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ---------- Bandeau CTA Vendeur ---------- */
.cta-banner {
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 52px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-md);
}

.cta-banner-copy { max-width: 610px; }

.cta-banner h2 {
    font-size: clamp(1.6rem, 2.8vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.16;
    margin-bottom: 12px;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.76);
    font-size: 15px;
}

.cta-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- Fil d'Ariane & En-têtes de pages ---------- */
.page-section { padding: 36px 0 72px; }

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.breadcrumb a:hover { color: var(--brand); }
.breadcrumb strong { color: var(--navy-900); font-weight: 600; }

.page-title {
    font-size: clamp(1.55rem, 2.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--navy-900);
    line-height: 1.2;
}

.page-lead {
    margin-top: 8px;
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 640px;
}

/* ---------- Cartes & Formulaires ---------- */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-xs);
}

.card-sm { padding: 20px; }

.callout {
    background: var(--brand-soft);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.callout-icon {
    color: var(--brand);
    flex-shrink: 0;
    margin-top: 2px;
}

.callout h4 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 4px;
}

.callout p, .callout li {
    font-size: 13.5px;
    color: #5C3422;
    line-height: 1.55;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

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

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy-900);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: #fff;
    font-size: 14.5px;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control::placeholder { color: #9CA3AF; }

.form-control:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(235, 75, 21, 0.14);
}

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

/* ---------- Catalogue avec Sidebar Filtres ---------- */
.catalog-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 265px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.filter-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: sticky;
    top: 88px;
}

.filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.filter-head h3 { font-size: 15.5px; font-weight: 700; }
.filter-reset { font-size: 12.5px; font-weight: 600; color: var(--brand); }
.filter-reset:hover { text-decoration: underline; }

.filter-block {
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid var(--border);
}

.filter-block-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: #fff;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.14s;
}

.chip:hover {
    border-color: var(--navy-900);
    color: var(--navy-900);
}

.chip.is-active, input[type="radio"]:checked + .chip {
    background: var(--navy-900);
    border-color: var(--navy-900);
    color: #fff;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.mobile-filter-toggle { display: none; }

/* ---------- Fiche Détail Véhicule ---------- */
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

.gallery-main {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--navy-900);
    cursor: zoom-in;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-counter {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(11, 19, 32, 0.78);
    color: #fff;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 12.5px;
    font-weight: 700;
}

.gallery-facet-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(11, 19, 32, 0.78);
    color: #fff;
    padding: 5px 13px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.9);
    color: var(--navy-900);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.gallery-nav:hover { background: #fff; }
.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }

.gallery-thumbs {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.gallery-thumb {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    background: var(--bg-muted);
    position: relative;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb.is-active {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(235, 75, 21, 0.2);
}

.gallery-thumb span {
    position: absolute;
    inset: auto 0 0 0;
    background: linear-gradient(transparent, rgba(11,19,32,0.82));
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    padding: 10px 6px 4px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 88px;
}

.price-box-title {
    font-size: 21px;
    font-weight: 800;
    color: var(--navy-900);
    margin-top: 12px;
    line-height: 1.25;
}

.price-box-amount {
    font-size: 32px;
    font-weight: 800;
    color: var(--navy-900);
    letter-spacing: -0.03em;
    margin: 16px 0 18px;
    font-variant-numeric: tabular-nums;
}

.price-box-checks {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.price-box-checks li {
    display: flex;
    align-items: center;
    gap: 9px;
}

.price-box-checks svg {
    color: var(--success);
    flex-shrink: 0;
}

.specs-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.spec-tile {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
}

.spec-tile span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.spec-tile strong {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--navy-900);
}

/* ---------- Vendre un véhicule (étapes + choix mode photo + zones upload) ---------- */
.stepper {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 22px 0 26px;
}

.stepper-item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.stepper-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--navy-900);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mode-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.mode-option {
    position: relative;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    cursor: pointer;
    transition: all 0.16s;
    background: #fff;
    display: block;
}

.mode-option:hover { border-color: var(--border-strong); }

.mode-option.is-selected {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.mode-option-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.mode-option h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy-900);
}

.mode-option p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.facet-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.facet-box {
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-md);
    padding: 16px;
    background: var(--bg-subtle);
    transition: border-color 0.15s, background 0.15s;
}

.facet-box:hover { border-color: var(--brand); }
.facet-box.is-valid { border-style: solid; border-color: var(--success); background: #F0FDF4; }
.facet-box.is-invalid { border-style: solid; border-color: var(--danger); background: #FEF2F2; }

.facet-box-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.facet-status {
    font-size: 12px;
    margin-top: 6px;
    font-weight: 600;
}

/* ---------- Console Équipe, Caisse & Admin ---------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.kpi-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-xs);
}

.kpi-card.is-dark {
    background: var(--navy-900);
    border-color: var(--navy-900);
    color: #fff;
}

.kpi-card.is-brand {
    background: linear-gradient(135deg, var(--brand) 0%, #C93A0B 100%);
    border-color: var(--brand);
    color: #fff;
}

.kpi-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.kpi-card.is-dark .kpi-label,
.kpi-card.is-brand .kpi-label {
    color: rgba(255, 255, 255, 0.72);
}

.kpi-val {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-top: 6px;
    line-height: 1.2;
}

.kpi-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.kpi-card.is-dark .kpi-sub,
.kpi-card.is-brand .kpi-sub {
    color: rgba(255, 255, 255, 0.72);
}

.tabs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.tab-pill {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: #fff;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.14s;
}

.tab-pill:hover {
    border-color: var(--navy-900);
    color: var(--navy-900);
}

.tab-pill.is-active {
    background: var(--navy-900);
    border-color: var(--navy-900);
    color: #fff;
}

.tab-count {
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    font-size: 11.5px;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.08);
}

.tab-pill.is-active .tab-count {
    background: var(--brand);
    color: #fff;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.queue-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-xs);
}

.queue-thumb {
    width: 112px;
    height: 82px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-muted);
}

.queue-body { flex: 1; min-width: 0; }
.queue-title { font-size: 16px; font-weight: 700; color: var(--navy-900); }

.queue-meta {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 13px;
    color: var(--text-secondary);
}

.queue-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ---------- Comptes Mobile Money & Trésorerie ---------- */
.momo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.momo-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    background: #fff;
    cursor: pointer;
    transition: all 0.14s;
    display: block;
}

.momo-card:hover { border-color: var(--border-strong); }
.momo-card.is-selected { border-color: var(--brand); background: var(--brand-soft); }

.momo-phone {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy-900);
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}

.accounts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.account-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
}

.account-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.account-bal {
    font-size: 22px;
    font-weight: 800;
    color: var(--navy-900);
    font-variant-numeric: tabular-nums;
}

/* ---------- Tableaux propres ---------- */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.data-table th {
    text-align: left;
    padding: 12px 14px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #FAFBFD; }
.data-table tr.is-reversed td { opacity: 0.55; text-decoration: line-through; }

.amount-in { color: var(--success); font-weight: 700; font-variant-numeric: tabular-nums; }
.amount-out { color: var(--danger); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Modales & Lightbox ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(7, 13, 23, 0.62);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-backdrop[hidden] { display: none !important; }

.modal-card {
    width: 100%;
    max-width: 560px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

.modal-sm { max-width: 500px; }

.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-header h3 { font-size: 17px; font-weight: 800; color: var(--navy-900); }
.modal-body { padding: 22px; overflow-y: auto; }

.search-inline {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.lightbox-card {
    position: relative;
    max-width: 1020px;
    width: 100%;
}

.lightbox-card img {
    width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.lightbox-caption {
    color: #fff;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--navy-900);
    color: rgba(255, 255, 255, 0.74);
    padding: 58px 0 32px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 38px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
}

.footer-brand-icon { color: var(--brand); display: inline-flex; }

.footer-desc {
    font-size: 13.5px;
    line-height: 1.65;
    max-width: 340px;
    color: rgba(255, 255, 255, 0.66);
}

.footer-contact-mini {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact-mini span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-heading {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13.5px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.68);
    transition: color 0.15s;
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.52);
}

.scroll-top-btn {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: var(--navy-900);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 90;
}

.scroll-top-btn.is-visible { display: inline-flex; }
.scroll-top-btn:hover { background: var(--brand); }

/* ---------- État vide & Pagination ---------- */
.empty-state {
    text-align: center;
    padding: 52px 24px;
    background: var(--bg-subtle);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
}

.empty-state h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); max-width: 440px; margin: 0 auto 18px; }

.pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- Impression Reçu / Bordereau ---------- */
@media print {
    .site-header, .site-footer, .no-print, .scroll-top-btn, .flash-stack { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; border: 1px solid #ccc; }
}

/* ---------- Responsive Tablette & Mobile ---------- */
@media (max-width: 1060px) {
    .body-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .vehicles-grid, .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-search .btn-primary { grid-column: span 2; }
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .accounts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-layout { grid-template-columns: 1fr; }
    .price-box { position: static; }
    .main-nav { display: none; }
    .mobile-menu-btn { display: inline-flex; }
}

@media (max-width: 820px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .filter-panel { position: static; display: none; }
    .filter-panel.is-open { display: block; }
    .mobile-filter-toggle { display: inline-flex; }
    .steps-grid, .guarantees-grid, .footer-grid { grid-template-columns: 1fr; }
    .cta-banner { padding: 34px 26px; }
    .queue-item { flex-direction: column; align-items: flex-start; }
    .queue-thumb { width: 100%; height: 180px; }
    .queue-actions { width: 100%; }
}

@media (max-width: 640px) {
    .container, .container-narrow, .container-md { padding: 0 16px; }
    .header-cta { display: none; }
    .hide-sm { display: none; }
    .hero { padding: 52px 0 48px; }
    .hero-search { grid-template-columns: 1fr; }
    .hero-search .btn-primary { grid-column: span 1; }
    .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .hero-stat strong { font-size: 21px; }
    .section { padding: 48px 0; }
    .body-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vehicles-grid, .catalog-grid, .form-grid, .form-grid-3,
    .mode-selector, .facet-upload-grid, .momo-grid, .accounts-grid,
    .specs-grid, .kpi-grid { grid-template-columns: 1fr; }
    .col-span-2 { grid-column: span 1; }
    .gallery-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .card { padding: 20px; }
}
