/* =====================================================================
   CleanDrive Import Auto — Thème principal (version CLAIRE)
   Palette : blanc/gris très clair + acier bleuté, écho au logo (globe + véhicules)
   Typo    : Oswald (display, condensé/industriel) + Inter (texte) + Roboto Mono (data)
   Signature : motif d'arc "route d'import" (grand cercle), rappel du globe du logo
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=Roboto+Mono:wght@400;500;700&display=swap');

:root {
	--bg: #F7F8FA;
	--surface: #FFFFFF;
	--surface-2: #F0F3F7;

	--border: rgba(18, 24, 31, 0.10);
	--border-strong: rgba(18, 24, 31, 0.18);

	--text: #12181F;
	--text-dim: #545E6A;
	--text-dimmer: #89919B;

	--steel: #3E5C76;
	--steel-light: #4F6B85;

	--route: #2F6FE4;
	--route-hover: #2559BE;
	--route-tint: rgba(47, 111, 228, 0.09);
	--route-border: #AFC9F5;

	--success: #1E8E5A;
	--success-tint: rgba(30, 142, 90, 0.10);
	--error: #D6362B;
	--error-tint: rgba(214, 54, 43, 0.09);

	--shadow-sm: 0 1px 2px rgba(18, 24, 31, 0.05);
	--shadow-md: 0 12px 28px -16px rgba(18, 24, 31, 0.18);

	--font-display: 'Oswald', sans-serif;
	--font-body: 'Inter', sans-serif;
	--font-mono: 'Roboto Mono', monospace;

	--radius: 4px;
	--container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

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

h1, h2, h3, h4 {
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
	margin: 0 0 16px;
	color: var(--text);
}

h1 { font-size: 2.6rem; letter-spacing: 0.02em; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.3rem; }

p { color: var(--text-dim); margin: 0 0 16px; }

.eyebrow {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--route);
	display: block;
	margin-bottom: 10px;
}

/* ================= NAVIGATION ================= */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--border);
}

.nav-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 24px;
	max-width: var(--container);
	margin: 0 auto;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
}

.brand img { height: 52px; width: auto; border-radius: 6px; }

.brand-text {
	font-family: var(--font-display);
	line-height: 1;
}

.brand-text .name {
	display: block;
	font-size: 1.15rem;
	letter-spacing: 0.05em;
	color: var(--text);
}

.brand-text .tagline {
	display: block;
	font-size: 0.62rem;
	letter-spacing: 0.22em;
	color: var(--steel-light);
	margin-top: 2px;
}

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

.main-nav a {
	font-family: var(--font-display);
	font-size: 0.82rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 10px 14px;
	color: var(--text-dim);
	border-radius: var(--radius);
	transition: color .15s ease, background .15s ease;
}

.main-nav a:hover,
.main-nav a.active {
	color: var(--text);
	background: var(--route-tint);
}

.nav-cta {
	background: var(--route);
	color: #fff !important;
	padding: 10px 18px !important;
}
.nav-cta:hover { background: var(--route-hover); }

.nav-toggle {
	display: none;
	background: none;
	border: 1px solid var(--border-strong);
	color: var(--text);
	border-radius: var(--radius);
	padding: 8px 12px;
	font-size: 1.1rem;
}

/* ================= HERO (signature : arc "route d'import") ================= */
.hero {
	position: relative;
	overflow: hidden;
	padding: 100px 0 120px;
	border-bottom: 1px solid var(--border);
	background: linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
}

.hero-arc {
	position: absolute;
	top: -280px;
	left: 50%;
	transform: translateX(-50%);
	width: 1400px;
	height: 1400px;
	border: 1px solid rgba(47, 111, 228, 0.16);
	border-radius: 50%;
	pointer-events: none;
}
.hero-arc.arc-2 {
	top: -180px;
	width: 1000px;
	height: 1000px;
	border-color: rgba(18, 24, 31, 0.06);
}

.hero-grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 48px;
	align-items: center;
}

.hero h1 {
	font-size: 3.1rem;
	line-height: 1.05;
}
.hero h1 span { color: var(--route); }

.hero-lead {
	font-size: 1.05rem;
	max-width: 480px;
}

.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.hero-stats {
	display: flex;
	gap: 34px;
	margin-top: 44px;
	padding-top: 28px;
	border-top: 1px solid var(--border);
}
.hero-stats div strong {
	display: block;
	font-family: var(--font-mono);
	font-size: 1.5rem;
	color: var(--text);
}
.hero-stats div span {
	font-size: 0.72rem;
	color: var(--text-dimmer);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.hero-panel {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 28px;
	position: relative;
	box-shadow: var(--shadow-md);
}
.hero-panel .badge {
	position: absolute;
	top: -12px;
	left: 24px;
	background: var(--route);
	color: #fff;
	font-family: var(--font-mono);
	font-size: 0.7rem;
	padding: 4px 10px;
	border-radius: 3px;
	letter-spacing: 0.06em;
}
.hero-panel img { border-radius: 4px; margin-bottom: 16px; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.hero-panel .price {
	font-family: var(--font-mono);
	color: var(--route);
	font-size: 1.3rem;
}

/* ================= BOUTONS ================= */
.btn {
	display: inline-block;
	font-family: var(--font-display);
	font-size: 0.85rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 13px 26px;
	border-radius: var(--radius);
	border: 1px solid transparent;
	cursor: pointer;
	transition: all .15s ease;
}
.btn-primary { background: var(--route); color: #fff; }
.btn-primary:hover { background: var(--route-hover); }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--route); background: var(--route-tint); }
.btn-sm { padding: 8px 14px; font-size: 0.72rem; }
.btn-danger { background: var(--error); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ================= SECTION GÉNÉRIQUE ================= */
.section { padding: 80px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; gap: 20px; flex-wrap: wrap; }
.section-alt { background: var(--surface-2); }

/* ================= FILTRES CATALOGUE ================= */
.filters {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 36px;
	align-items: center;
}
.filters a {
	font-family: var(--font-display);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 9px 18px;
	border: 1px solid var(--border-strong);
	border-radius: 999px;
	color: var(--text-dim);
	background: var(--surface);
}
.filters a.active, .filters a:hover {
	border-color: var(--route);
	color: var(--route);
	background: var(--route-tint);
}
.search-box { margin-left: auto; display: flex; gap: 8px; }
.search-box input {
	background: var(--surface);
	border: 1px solid var(--border-strong);
	color: var(--text);
	padding: 9px 14px;
	border-radius: var(--radius);
	font-family: var(--font-body);
}

/* ================= CARTES VEHICULES ================= */
.vehicle-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 26px;
}

.vehicle-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	position: relative;
	box-shadow: var(--shadow-sm);
	transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.vehicle-card:hover { transform: translateY(-4px); border-color: var(--route-border); box-shadow: var(--shadow-md); }

.vehicle-card .thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); }
.vehicle-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.pill {
	position: absolute;
	top: 12px;
	left: 12px;
	font-family: var(--font-mono);
	font-size: 0.65rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid var(--route);
	color: var(--route);
	padding: 4px 9px;
	border-radius: 3px;
}
.pill.unavailable { border-color: var(--error); color: var(--error); }

.vehicle-card .body { padding: 20px; }
.vehicle-card h3 { margin-bottom: 4px; font-size: 1.1rem; }
.vehicle-card .subtitle { font-size: 0.82rem; color: var(--text-dimmer); margin-bottom: 14px; }

.spec-row {
	display: flex;
	gap: 14px;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	color: var(--text-dimmer);
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 14px;
	border-top: 1px solid var(--border);
}
.price-tag { font-family: var(--font-mono); font-size: 1.15rem; color: var(--route); }

.empty-state {
	text-align: center;
	padding: 60px 20px;
	border: 1px dashed var(--border-strong);
	border-radius: 8px;
	color: var(--text-dimmer);
	background: var(--surface);
}

/* ================= FICHE VEHICULE ================= */
.vehicle-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; margin-bottom: 50px; }
.gallery-main { border-radius: 8px; overflow: hidden; aspect-ratio: 16/10; background: var(--surface-2); border: 1px solid var(--border); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; }
.gallery-thumbs img { width: 90px; height: 60px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); cursor: pointer; }

.vehicle-description {
	color: var(--text);
	font-size: 1rem;
	line-height: 1.75;
	max-width: 640px;
}

.equipment-grid {
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	max-width: 640px;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px 20px;
}
.equipment-grid li {
	position: relative;
	padding-left: 24px;
	color: var(--text-dim);
	font-size: 0.92rem;
	line-height: 1.4;
}
.equipment-grid li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	color: var(--route);
	font-weight: 700;
}

.spec-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 26px; align-self: start; box-shadow: var(--shadow-md); }
.spec-panel .price-tag { font-size: 2rem; display: block; margin-bottom: 20px; }
.spec-list { list-style: none; margin: 0 0 24px; padding: 0; }
.spec-list li {
	display: flex;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px solid var(--border);
	font-family: var(--font-mono);
	font-size: 0.85rem;
}
.spec-list li span:first-child { color: var(--text-dimmer); text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.72rem; }

/* ================= FORMULAIRES ================= */
.form-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 32px;
	max-width: 620px;
	box-shadow: var(--shadow-sm);
}
.input {
	background: var(--surface);
	border: 1px solid var(--border-strong);
	color: var(--text);
	padding: 12px 14px;
	border-radius: var(--radius);
	width: 100%;
	font-family: var(--font-body);
	margin-bottom: 18px;
}
.input:focus { outline: none; border-color: var(--route); box-shadow: 0 0 0 3px var(--route-tint); }
label {
	display: block;
	font-family: var(--font-display);
	font-size: 0.78rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--text-dimmer);
	margin-bottom: 8px;
}
textarea.input { min-height: 130px; resize: vertical; }

.checkbox-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px 16px;
	background: var(--surface-2);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	padding: 16px;
	margin-bottom: 18px;
}
.checkbox-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-body);
	font-size: 0.88rem;
	text-transform: none;
	letter-spacing: normal;
	color: var(--text-dim);
	cursor: pointer;
	margin-bottom: 0;
}
.checkbox-item input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--route);
	flex-shrink: 0;
}

.error-message { color: var(--error); font-size: 0.8rem; margin: -12px 0 14px; font-family: var(--font-mono); }
.input.form-error { border-color: var(--error); }

.flash_success, .flash_error {
	padding: 14px 18px;
	border-radius: var(--radius);
	margin-bottom: 24px;
	font-family: var(--font-mono);
	font-size: 0.85rem;
}
.flash_success { background: var(--success-tint); border: 1px solid var(--success); color: var(--success); }
.flash_error { background: var(--error-tint); border: 1px solid var(--error); color: var(--error); }

/* ================= FOOTER ================= */
.site-footer {
	background: var(--surface-2);
	border-top: 1px solid var(--border);
	padding: 56px 0 30px;
	margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { font-size: 0.85rem; color: var(--text-dimmer); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--text-dim); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--route); }
.footer-bottom {
	border-top: 1px solid var(--border);
	padding-top: 22px;
	display: flex;
	justify-content: space-between;
	font-size: 0.78rem;
	color: var(--text-dimmer);
	flex-wrap: wrap;
	gap: 10px;
}

/* ================= PAGE À PROPOS ================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.value-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 26px; box-shadow: var(--shadow-sm); }
.value-card .eyebrow { margin-bottom: 12px; }

/* ================= ADMIN / BACK-OFFICE ================= */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar {
	background: var(--surface);
	border-right: 1px solid var(--border);
	padding: 26px 18px;
}
.admin-sidebar .brand img { height: 40px; }
.admin-sidebar nav { margin-top: 36px; }
.admin-sidebar nav a {
	display: block;
	padding: 11px 14px;
	font-family: var(--font-display);
	font-size: 0.82rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--text-dim);
	border-radius: var(--radius);
	margin-bottom: 4px;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
	background: var(--route-tint);
	color: var(--route);
}
.admin-main { padding: 40px; background: var(--bg); }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-table th, .admin-table td {
	padding: 14px 16px;
	text-align: left;
	border-bottom: 1px solid var(--border);
	font-size: 0.88rem;
}
.admin-table th {
	font-family: var(--font-display);
	text-transform: uppercase;
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	color: var(--text-dimmer);
	background: var(--surface-2);
}
.admin-table tr:hover td { background: var(--surface-2); }
.admin-actions { display: flex; gap: 8px; }

.login-shell {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at 50% 0%, var(--route-tint), transparent 60%), var(--bg);
}
.login-card { width: 100%; max-width: 400px; }

.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 34px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 22px; box-shadow: var(--shadow-sm); }
.stat-card strong { display: block; font-family: var(--font-mono); font-size: 1.8rem; color: var(--text); }
.stat-card span { font-size: 0.75rem; color: var(--text-dimmer); text-transform: uppercase; letter-spacing: 0.06em; }

.pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 40px 0 0; justify-content: center; }
.pagination a, .pagination li { padding: 8px 13px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-dim); }
.pagination .active a, .pagination .active { background: var(--route); color: #fff; }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
	.hero-grid, .about-grid, .vehicle-hero { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
	.value-grid { grid-template-columns: 1fr; }
	.admin-shell { grid-template-columns: 1fr; }
	.admin-sidebar { display: none; }
	.stat-cards { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
	.main-nav { display: none; }
	.nav-toggle { display: inline-block; }
	.nav-wrap.open .main-nav {
		display: flex;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--surface);
		flex-direction: column;
		padding: 12px 24px 20px;
		border-bottom: 1px solid var(--border);
		box-shadow: var(--shadow-md);
	}
	.hero h1 { font-size: 2.2rem; }
	.equipment-grid { grid-template-columns: 1fr; }
	.checkbox-grid { grid-template-columns: 1fr; }
	.section-head { flex-direction: column; align-items: flex-start; }
	.search-box { margin-left: 0; width: 100%; }
	.search-box input { flex: 1; }
}

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