/*
Theme Name: Auto Achraf — Refonte
Description: Thème sur mesure d'Auto Achraf (véhicules d'occasion, Rabat). Catalogue géré depuis le back-office, recherche en langage naturel, contact WhatsApp.
Version: 0.2.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: auto-achraf
*/

/* ---------- Jetons ---------- */
:root {
	--ink: #0e0e0d;
	--surface: #171614;
	--surface-2: #22201c;
	--line: #2a2925;
	--line-2: #34322d;
	--paper: #f4f1ea;
	--paper-2: #e4dfd3;
	--paper-line: #d9d4c8;
	--muted: #a8a49b;
	--muted-2: #c9c5bc;
	--muted-paper: #5e5a52;
	--orange: #f97816;
	--orange-ink: #b4570c;
	--green: #3dd68c;
	--r-sm: 12px;
	--r-md: 18px;
	--r-lg: 28px;
	--r-xl: 36px;
	--display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
	--body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--wrap: 1280px;
	--gutter: 24px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--body); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.05; }
h2, .h2 { font-size: clamp(34px, 4vw, 56px); letter-spacing: -1.5px; }
.h3 { font-size: clamp(26px, 2.6vw, 32px); letter-spacing: -0.8px; }
p { margin: 0; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: clamp(56px, 8vw, 96px); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 14px 18px; background: var(--orange); color: var(--ink); font-weight: 600; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--orange); margin-bottom: 12px; }
.eyebrow--ink { color: var(--ink); }
.eyebrow--dark { color: var(--orange-ink); }
.lead { font-size: 18px; color: var(--muted); max-width: 540px; }
.link-arrow { font-weight: 600; text-decoration: none; padding: 12px 0; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 20px; border: 0; border-radius: 14px; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn--accent { background: var(--orange); color: var(--ink); }
.btn--accent:hover { background: #ff8d33; color: var(--ink); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { color: var(--ink); background: #fff; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { color: var(--paper); }
.btn--outline { background: transparent; border: 1px solid var(--ink); color: var(--ink); font-weight: 500; }
.btn--outline-light { background: transparent; border: 1px solid #3a3833; color: var(--paper); font-weight: 500; }
.btn--block { width: 100%; padding-block: 16px; font-size: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(14, 14, 13, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid #24231f; }
.admin-bar .site-header { top: 32px; }
.site-header__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -.5px; text-decoration: none; color: var(--paper); }
.brand span { color: var(--orange); }
.custom-logo-link img { width: auto; max-height: 52px; }
.pill-nav { display: flex; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: #161614; }
.pill-nav a { padding: 10px 18px; border-radius: 999px; font-size: 14px; text-decoration: none; }
.pill-nav a[aria-current="page"] { background: var(--paper); color: var(--ink); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr)); gap: 40px; align-items: center; padding-block: 48px 40px; }
.hero__text { display: flex; flex-direction: column; gap: 26px; }
.hero__title { font-size: clamp(46px, 6.4vw, 92px); letter-spacing: -3px; line-height: .98; }
.hero__title em { font-style: normal; color: var(--orange); }
.live { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted-2); }
.live span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(61, 214, 140, .15); }
.hero__media { position: relative; min-height: clamp(360px, 44vw, 580px); border-radius: 32px; overflow: hidden; background: #1c1b18; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.hero__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph { color: #6f6b63; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.feature { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-radius: 22px; background: rgba(244, 241, 234, .95); color: var(--ink); text-decoration: none; }
.feature:hover { color: var(--ink); }
.feature > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.feature__kicker { font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--orange-ink); }
.feature__title { font-family: var(--display); font-size: 22px; font-weight: 600; }
.feature__meta { font-size: 14px; color: #4f4b44; }
.feature__go { flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; }

/* ---------- Recherche ---------- */
.search { display: flex; flex-direction: column; gap: 12px; }
.search__label { font-size: 13px; color: var(--muted-2); }
.search__bar { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 18px; border-radius: 20px; background: #1a1917; border: 1px solid var(--line-2); box-shadow: 0 20px 60px rgba(249, 120, 22, .10); color: var(--orange); }
.search__bar:focus-within { border-color: var(--orange); }
.search__bar input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--paper); font: inherit; font-size: 16px; padding: 12px 4px; }
.search__bar input::placeholder { color: #8f8b82; }
.quick { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.quick a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; text-decoration: none; }
.quick a:hover { border-color: var(--orange); color: var(--paper); }

/* ---------- Engagements ---------- */
.promises { border-block: 1px solid #24231f; }
.promises__list { list-style: none; margin-block: 0; padding-block: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.promises__list li { display: flex; gap: 14px; align-items: flex-start; }
.promises__list span { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: #1f1a14; color: var(--orange); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.promises__list strong { font-weight: 600; font-size: 15px; }
.promises__list p { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---------- Sections ---------- */
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }

/* ---------- Cartes véhicules ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s ease, transform .2s ease; }
.card:hover { border-color: #4a4740; transform: translateY(-2px); }
.card--sold { opacity: .6; }
.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); display: block; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 22px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.card__title { font-size: 24px; letter-spacing: -.5px; }
.card__title a { text-decoration: none; }
.card__sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.card__foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card__foot > div { display: flex; flex-direction: column; }
.card__price { font-size: 17px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.status { position: absolute; top: 14px; left: 14px; padding: 7px 12px; border-radius: 999px; background: rgba(14, 14, 13, .78); color: var(--green); font-size: 12px; font-weight: 600; }
.status::before { content: "● "; }
.status--reserve { color: #ffc46b; }
.status--vendu { color: var(--muted-2); }
.panel .status { position: static; align-self: flex-start; background: #12261b; }
.panel .status--reserve { background: #2b2210; }
.panel .status--vendu { background: var(--surface-2); }

/* ---------- Étapes ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.steps__head { grid-column: 1 / -1; margin-bottom: 12px; }
.tile { padding: 32px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 40px; min-height: 260px; }
.tile__n { font-family: var(--display); font-size: 56px; font-weight: 600; color: var(--orange); line-height: 1; }
.tile h3 { font-family: var(--body); font-size: 21px; margin-bottom: 10px; }
.tile p { font-size: 15px; color: var(--muted); }

/* ---------- Reprise ---------- */
.sell { border-radius: var(--r-xl); background: var(--orange); color: var(--ink); padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 40px; align-items: center; }
.sell__intro { display: flex; flex-direction: column; gap: 16px; }
.sell__title { font-size: clamp(38px, 5vw, 68px); letter-spacing: -2px; line-height: 1; }
.sell__intro p:last-child { font-size: 17px; max-width: 460px; }
.sell__form { position: relative; background: var(--ink); color: var(--paper); border-radius: var(--r-lg); padding: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--muted-2); }
.field input, .field select { min-height: 48px; padding: 12px 16px; border-radius: var(--r-sm); background: #1a1917; border: 1px solid var(--line-2); color: var(--paper); font: inherit; font-size: 16px; }
.field input:focus, .field select:focus { border-color: var(--orange); outline: none; }
.notice { grid-column: 1 / -1; padding: 12px 16px; border-radius: var(--r-sm); font-size: 14px; }
.notice--ok { background: #12261b; color: #8ff0bf; }
.notice--err { background: #2b1512; color: #ffb3a1; }

/* ---------- Showroom ---------- */
.showroom { background: var(--paper); color: var(--ink); }
.showroom a:hover { color: var(--orange-ink); }
.showroom__grid { padding-block: clamp(56px, 8vw, 96px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 48px; }
.showroom__info { display: flex; flex-direction: column; gap: 28px; }
.showroom h2 { font-size: clamp(38px, 5vw, 64px); letter-spacing: -2px; line-height: 1; }
.facts { margin: 0; border-top: 1px solid var(--paper-line); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--paper-line); }
.facts dt { color: var(--muted-paper); }
.facts dd { margin: 0; text-align: right; }
.facts a { font-weight: 600; }
.showroom__map { min-height: 420px; border-radius: 32px; overflow: hidden; background: var(--paper-2); }
.showroom__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

/* ---------- Catalogue ---------- */
.catalog .search { margin-bottom: 20px; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; padding: 20px; margin-bottom: 32px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.filters .field { flex: 1 1 160px; }
.empty { padding: 40px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.empty a:not(.btn) { color: var(--orange); }
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); border: 1px solid var(--line-2); text-decoration: none; }
.pagination .current { background: var(--paper); color: var(--ink); }

/* ---------- Fiche véhicule ---------- */
.vehicle { padding-block: 24px 96px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--paper); }
.vehicle__layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.vehicle__main { flex: 999 1 620px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.vehicle__aside { flex: 1 1 340px; min-width: 0; position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery__stage { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; background: #1c1b18; border: 1px solid var(--line); }
.gallery__img { width: 100%; height: 100%; object-fit: cover; }
.gallery__img[hidden] { display: none; }
.gallery__count { position: absolute; right: 14px; bottom: 14px; padding: 7px 13px; border-radius: 999px; background: rgba(14, 14, 13, .8); font-size: 13px; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.gallery__thumbs button { padding: 0; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: none; cursor: pointer; aspect-ratio: 4 / 3; }
.gallery__thumbs button[aria-current="true"] { border-color: var(--orange); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.vehicle__block { display: flex; flex-direction: column; gap: 18px; }
.spec-grid { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.spec-grid div { padding: 16px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.spec-grid dt { font-size: 13px; color: var(--muted); }
.spec-grid dd { margin: 4px 0 0; font-size: 17px; font-weight: 600; }
.sim { padding: 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.sim__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; }
.sim fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.sim legend { font-size: 14px; color: var(--muted-2); margin-bottom: 10px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: var(--r-sm); border: 1px solid var(--line-2); font-size: 14px; cursor: pointer; }
.seg input:checked + span { background: var(--orange); border-color: var(--orange); color: var(--ink); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 3px; }
.sim__result { padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.sim__result > div { display: flex; flex-direction: column; }
.sim__result p { max-width: 320px; }
.sim__value { font-family: var(--display); font-size: 36px; color: var(--orange); }
.prose { color: var(--muted-2); font-size: 16px; line-height: 1.75; }
.prose p + p { margin-top: 1em; }
.panel { padding: 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.vehicle__title { font-size: clamp(32px, 3vw, 42px); letter-spacing: -1.5px; }
.panel__price { padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.panel__price strong { font-family: var(--display); font-size: 34px; font-weight: 600; }
.panel--accent { background: var(--orange); color: var(--ink); border: 0; flex-direction: row; align-items: center; justify-content: space-between; padding: 20px 24px; }
.panel--accent p { font-size: 14px; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid #24231f; }
.site-footer__row { padding-block: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
.site-footer .brand { font-size: 18px; }

/* ---------- Barre de contact mobile ---------- */
.dock { display: none; }
@media (max-width: 760px) {
	:root { --gutter: 18px; }
	body { padding-bottom: 96px; }
	.site-header__row { padding-block: 10px; }
	.pill-nav { order: 3; width: 100%; justify-content: space-between; }
	.pill-nav a { padding: 10px 12px; font-size: 13px; }
	.site-header__cta { display: none; }
	.hero { padding-top: 28px; }
	.hero__title { letter-spacing: -1.5px; }
	.search__bar .btn { padding-inline: 14px; }
	.sell__form { grid-template-columns: 1fr; }
	.vehicle__aside { position: static; }
	.dock { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 60; padding: 8px; border-radius: 24px; background: rgba(26, 25, 23, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
	.dock a { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 18px; font-size: 15px; font-weight: 600; text-decoration: none; }
	.dock__call { border: 1px solid #3a3833; }
	.dock__wa { background: var(--orange); color: var(--ink); }
	.dock__wa:hover { color: var(--ink); }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .card { transition: none; } }
