/* ============================================================
   Concept Car — site vitrine public
   Design moderne & responsive (autonome, sans Bootstrap/Foundation)
   ============================================================ */

:root {
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f1f5f9;
    --bg: #ffffff;
    --accent: #e11d2a;
    --accent-dark: #b3151f;
    --dark: #0b1220;
    --dark-2: #131c2e;
    --ok: #16a34a;
    --ok-bg: #dcfce7;
    --err: #dc2626;
    --err-bg: #fee2e2;
    --radius: 14px;
    --shadow: 0 10px 30px -12px rgba(2, 6, 23, .25);
    --shadow-sm: 0 4px 14px -8px rgba(2, 6, 23, .35);
    --maxw: 1200px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 { line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--soft { background: var(--soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 1.05rem; }
.eyebrow {
    display: inline-block; text-transform: uppercase; letter-spacing: .14em;
    font-size: .76rem; font-weight: 700; color: var(--accent); margin-bottom: 10px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent); color: #fff; font-weight: 700;
    padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
    font-size: .98rem; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
    box-shadow: 0 8px 20px -10px rgba(225, 29, 42, .8);
}
.btn:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn--ghost {
    background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .55);
    box-shadow: none;
}
.btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.btn--dark { background: var(--ink); box-shadow: none; }
.btn--dark:hover { background: #000; }
.btn--lg { padding: 17px 34px; font-size: 1.05rem; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header .bar {
    display: flex; align-items: center; justify-content: space-between;
    height: 76px; gap: 24px;
}
.brand { display: flex; align-items: center; }
.brand-logo { height: 44px; width: auto; display: block; }
@media (max-width: 520px) { .brand-logo { height: 34px; } }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    color: var(--ink); font-weight: 600; font-size: .95rem;
    padding: 9px 14px; border-radius: 999px; transition: color .15s, background .15s;
}
.nav a:hover, .nav a.is-active { color: var(--accent); background: var(--soft); }
.nav .btn { color: #fff; margin-left: 10px; padding: 10px 20px; }
.nav .btn:hover { color: #fff; }

.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 920px) {
    .nav-toggle { display: block; }
    .nav {
        position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch;
        background: #fff; padding: 16px 20px 26px; gap: 4px;
        transform: translateY(-150%); transition: transform .28s ease;
        border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    }
    .nav a { padding: 14px 12px; font-size: 1.05rem; border-radius: 10px; }
    .nav .btn { margin: 10px 0 0; justify-content: center; }
    #nav-switch:checked ~ .nav { transform: translateY(0); }
}
#nav-switch { display: none; }

/* ---------- Hero ---------- */
.hero {
    position: relative; color: #fff; text-align: center;
    background:
        radial-gradient(1200px 600px at 70% -10%, rgba(225, 29, 42, .35), transparent 60%),
        linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
    padding: 96px 0 110px; overflow: hidden;
}
.hero::after {
    content: ""; position: absolute; inset: auto 0 -1px 0; height: 120px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .04));
}
.hero h1 { max-width: 14ch; margin: 0 auto 18px; }
.hero p { max-width: 56ch; margin: 0 auto 34px; color: #c7d0e0; font-size: 1.15rem; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; margin-top: 56px; }
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 2rem; color: #fff; }
.hero-stats span { color: #93a1b8; font-size: .9rem; }

/* ---------- Quick search bar ---------- */
.searchbar {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 18px; display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px;
    margin-top: -56px; position: relative; z-index: 5;
}
.searchbar input, .searchbar select {
    width: 100%; padding: 14px 14px; border: 1px solid var(--line);
    border-radius: 10px; font-size: .95rem; font-family: inherit; background: #fff; color: var(--ink);
}
.searchbar input:focus, .searchbar select:focus { outline: 2px solid var(--accent); border-color: transparent; }
@media (max-width: 820px) { .searchbar { grid-template-columns: 1fr 1fr; margin-top: -40px; } .searchbar .btn { grid-column: 1 / -1; } }
@media (max-width: 520px) { .searchbar { grid-template-columns: 1fr; } }

/* ---------- Vehicle grid & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; transition: transform .18s ease, box-shadow .18s ease;
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card .media { position: relative; aspect-ratio: 4 / 3; background: var(--soft); overflow: hidden; }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .media img { transform: scale(1.06); }
.card .tag {
    position: absolute; top: 12px; left: 12px; background: rgba(15, 23, 42, .85);
    color: #fff; font-size: .72rem; font-weight: 700; padding: 6px 12px; border-radius: 999px;
    text-transform: uppercase; letter-spacing: .06em;
}
.card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card .body h3 { font-size: 1.08rem; }
.card .price { color: var(--accent); font-weight: 800; font-size: 1.35rem; margin: 6px 0 14px; }
.card .price small { color: var(--muted); font-weight: 600; font-size: .8rem; }
.card .specs {
    display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted);
    font-size: .85rem; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
}
.card .specs span { display: inline-flex; align-items: center; gap: 6px; }

.empty-state {
    text-align: center; padding: 64px 20px; color: var(--muted);
    background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-state h3 { color: var(--ink); margin-bottom: 8px; }

/* Placeholder image (véhicule sans photo) */
.ph {
    width: 100%; height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px; text-align: center;
    padding: 18px; color: var(--muted); font-weight: 600; font-size: .9rem;
    background: linear-gradient(135deg, var(--soft), #e7edf5);
}
.ph-ico { font-size: 2.6rem; opacity: .45; line-height: 1; }
.ph--lg .ph-ico { font-size: 4rem; }
.ph small { display: inline-block; margin-top: 4px; font-weight: 500; opacity: .85; }

/* ---------- Filters ---------- */
.filters {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 12px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px; margin-bottom: 32px;
}
.filters input, .filters select {
    width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: .92rem;
}
.filters .btn { min-width: 0; }
@media (max-width: 860px) { .filters { grid-template-columns: 1fr 1fr; } .filters .btn { grid-column: 1 / -1; } }

/* ---------- Vehicle detail ---------- */
.detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
.gallery-main {
    border-radius: var(--radius); overflow: hidden; background: var(--soft);
    aspect-ratio: 4 / 3; border: 1px solid var(--line);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.gallery-thumbs img {
    aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: pointer;
    border: 2px solid transparent; transition: border-color .15s;
}
.gallery-thumbs img:hover, .gallery-thumbs img.is-active { border-color: var(--accent); }

.detail aside { position: sticky; top: 92px; align-self: start; }
.price-box {
    background: var(--dark); color: #fff; border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow);
}
.price-box .price { font-size: 2.2rem; font-weight: 800; }
.price-box .price small { color: #93a1b8; font-size: .9rem; font-weight: 600; }
.price-box .btn { margin-top: 18px; }
.price-box .tel { margin-top: 14px; font-size: .9rem; color: #c7d0e0; text-align: center; }
.price-box .tel a { color: #fff; font-weight: 700; }

.spec-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 26px; }
.spec-list li { background: #fff; padding: 16px 18px; }
.spec-list .k { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.spec-list .v { font-weight: 700; font-size: 1.02rem; margin-top: 2px; }
@media (max-width: 520px) { .spec-list { grid-template-columns: 1fr; } }

/* ---------- Content / legal ---------- */
.prose { max-width: 820px; margin: 0 auto; }
.prose h1 { margin-bottom: 8px; }
.prose .lead { color: var(--muted); font-size: 1.1rem; margin-bottom: 32px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose li { margin-bottom: 8px; }
.prose h2, .prose h3 { margin: 32px 0 12px; }
.prose strong { color: var(--ink); }

/* ---------- Forms ---------- */
.form-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 32px; box-shadow: var(--shadow-sm); max-width: 640px; margin: 0 auto;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 7px; }
.field input, .field textarea, .field select {
    width: 100%; padding: 13px 14px; border: 1px solid var(--line);
    border-radius: 10px; font-family: inherit; font-size: .98rem; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.field textarea { min-height: 140px; resize: vertical; }
.field .err { color: var(--err); font-size: .85rem; margin-top: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* Sidebar de recherche véhicule (pages de contenu) */
.search-aside { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.search-aside h3 { font-size: 1.1rem; margin-bottom: 18px; }
.search-aside .field { margin-bottom: 14px; }
.search-aside .btn { margin-top: 4px; }
.search-aside-help { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.search-aside-help a { color: var(--accent); font-weight: 700; }

.flash, .message { border-radius: 12px; padding: 14px 18px; margin-bottom: 22px; font-weight: 600; }
.flash.success, .message.success { background: var(--ok-bg); color: #166534; }
.flash.error, .message.error { background: var(--err-bg); color: #991b1b; }

/* ---------- Feature blocks ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
.feature {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 30px 26px; text-align: center;
}
.feature .ico {
    width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(225, 29, 42, .12), rgba(225, 29, 42, .04));
    color: var(--accent); display: grid; place-items: center; font-size: 1.6rem;
}
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: .95rem; }

/* ---------- CTA band ---------- */
.cta-band {
    background:
        radial-gradient(800px 400px at 80% 0%, rgba(225, 29, 42, .4), transparent 60%),
        linear-gradient(180deg, var(--dark), var(--dark-2));
    color: #fff; border-radius: 22px; padding: 56px 40px; text-align: center;
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { color: #c7d0e0; max-width: 52ch; margin: 0 auto 26px; }
.cta-band .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }
.news-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px; display: flex; flex-direction: column;
}
.news-card .date { color: var(--accent); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.news-card h3 { margin: 10px 0 10px; }
.news-card p { color: var(--muted); font-size: .95rem; flex: 1; }
.news-card a.more { margin-top: 16px; color: var(--accent); font-weight: 700; font-size: .9rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #93a1b8; padding: 60px 0 30px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.5fr; gap: 30px 44px; align-items: start; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-col-brand p { max-width: 40ch; }
.footer-map-col { grid-column: 1 / -1; margin-top: 6px; }
.footer-map-wrap { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); line-height: 0; }
.footer-map { width: 100%; height: 240px; border: 0; display: block; filter: grayscale(.35) contrast(.95) brightness(.95); transition: filter .25s ease; }
.footer-map-wrap:hover .footer-map { filter: none; }
.footer-map-itin { display: inline-block; margin-top: 10px; color: var(--accent); font-weight: 700; font-size: .9rem; }
.footer-map-itin:hover { color: #fff; }
.footer-contact li a[href^="https://www.google"] { line-height: 1.4; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; letter-spacing: .04em; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; font-size: .95rem; }
.footer-contact strong { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 44px; padding-top: 22px;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem;
}
.footer-brand { color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 12px; }
.footer-brand span { color: var(--accent); }
/* Accès gestion discret : fondu dans le texte légal, sans style de lien */
.footer-admin-link { color: inherit; opacity: .35; text-decoration: none; cursor: default; padding: 0 2px; }
.footer-admin-link:hover { opacity: 1; color: #fff; }

.breadcrumb { color: var(--muted); font-size: .88rem; margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--accent); }
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin: 40px 0 0; padding: 0; flex-wrap: wrap; list-style: none; }
.pagination li { list-style: none; margin: 0; display: flex; }
.pagination a, .pagination span {
    display: block; padding: 9px 15px; border: 1px solid var(--line); border-radius: 10px;
    color: var(--ink); font-weight: 600; font-size: .9rem; background: #fff; text-decoration: none;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active span { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .disabled span { color: var(--muted); opacity: .5; }
