/*
Theme Name: Fab-VTC
Theme URI: http://localhost:8888/fab-vtc
Author: Fab-VTC
Description: Thème sur-mesure pour Fab-VTC — chauffeur privé. Estimation de trajet au kilomètre, confirmation sur WhatsApp, bascule clair / sombre.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: fab-vtc
*/

/* =========================================================
   1. Tokens
   ========================================================= */

:root {
	--f-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--f-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

	--f-head: var(--f-sans);
	--head-w: 800;
	--head-ls: -0.035em;
	--head-lh: 1.04;
	--num-f: var(--f-sans);
	--num-w: 800;

	--bg: #ffffff;
	--bg-alt: #fafafa;
	--surface: #f4f4f5;
	--surface-2: #ffffff;
	--field: #f4f4f5;
	--border: #e4e4e7;
	--border-soft: #ededef;
	--text: #09090b;
	--muted: #71717a;
	--accent: #09090b;
	--accent-ink: #ffffff;
	--accent-soft: #f4f4f5;
	--wa: #22c55e;
	--wa-hover: #16a34a;
	--wa-ink: #052e16;

	--ft-bg: #09090b;
	--ft-text: #ffffff;
	--ft-muted: #a1a1aa;

	--ph-a: #e6e6e8;
	--ph-b: #dededf;

	--shadow: 0 1px 2px rgba(9, 9, 11, .04), 0 12px 32px -12px rgba(9, 9, 11, .14);
	--shadow-lg: 0 2px 4px rgba(9, 9, 11, .04), 0 24px 60px -20px rgba(9, 9, 11, .22);

	--r: 14px;
	--r-sm: 10px;
	--r-lg: 20px;
	--wrap: 1160px;
	--gut: 24px;
	--head-h: 76px;
}

/* Le thème sombre ne redéfinit que les couleurs : la typographie est commune
   aux deux thèmes. */
[data-theme="dark"] {
	--bg: #0a0a0a;
	--bg-alt: #0c0c0c;
	--surface: #151515;
	--surface-2: #121212;
	--field: #0d0d0d;
	--border: #272727;
	--border-soft: #1d1d1d;
	--text: #f5f5f4;
	--muted: #a3a3a3;
	--accent: #e3c08a;
	--accent-ink: #1a1206;
	--accent-soft: #1c1710;
	--wa: #22c55e;
	--wa-hover: #16a34a;
	--wa-ink: #052e16;

	--ft-bg: #0a0a0a;
	--ft-text: #f5f5f4;
	--ft-muted: #8a8a8a;

	--ph-a: #191919;
	--ph-b: #131313;

	--shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 40px -16px rgba(0, 0, 0, .8);
	--shadow-lg: 0 2px 6px rgba(0, 0, 0, .6), 0 30px 70px -24px rgba(0, 0, 0, .9);
}

/* =========================================================
   2. Base
   ========================================================= */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--f-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	transition: background-color .25s ease, color .25s ease;
}

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

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

button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
	font-family: var(--f-head);
	font-weight: var(--head-w);
	letter-spacing: var(--head-ls);
	line-height: var(--head-lh);
	margin: 0;
}

h1 { font-size: clamp(2.35rem, 5.2vw, 3.65rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.5rem); }
h3 { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }

p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.section { padding: 84px 0; border-top: 1px solid var(--border-soft); }
.section--flat { border-top: 0; }

.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 34px;
	flex-wrap: wrap;
}
.section-head p { color: var(--muted); font-size: .92rem; }

.sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 999;
	background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Placeholder photo (motif rayé, remplacé par une vraie image dans les réglages) */
.ph {
	background-color: var(--ph-b);
	background-image: repeating-linear-gradient(135deg, var(--ph-a) 0 10px, var(--ph-b) 10px 20px);
	background-size: auto;
	display: flex; align-items: center; justify-content: center;
	color: var(--muted);
	font-family: var(--f-mono);
	font-size: .7rem;
	letter-spacing: .12em;
	text-transform: lowercase;
}
.ph--img { background-image: none; background-size: cover; background-position: center; }
.ph--img span { display: none; }

/* =========================================================
   3. Boutons
   ========================================================= */

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 0; border-radius: var(--r-sm);
	padding: 13px 20px;
	font-weight: 700; font-size: .93rem; font-family: var(--f-sans);
	letter-spacing: -0.01em;
	cursor: pointer;
	transition: transform .12s ease, opacity .2s ease, background-color .2s ease;
	white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { opacity: .88; }
.btn--wa { background: var(--wa); color: var(--wa-ink); }
.btn--wa:hover { background: var(--wa-hover); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn--ghost:hover { border-color: var(--text); }
.btn--block { width: 100%; }
.btn--lg { padding: 16px 22px; font-size: 1rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn--wa svg { width: 17px; height: 17px; fill: currentColor; }

/* =========================================================
   4. Header
   ========================================================= */

.site-header {
	position: sticky; top: 0; z-index: 60;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--border-soft);
}
.site-header__in {
	height: var(--head-h);
	display: flex; align-items: center; gap: 28px;
}

.brand { display: inline-flex; align-items: baseline; gap: 7px; font-size: 1.22rem; }
.brand__name {
	font-family: var(--f-head); font-weight: var(--head-w);
	letter-spacing: var(--head-ls); text-transform: uppercase;
}
[data-theme="dark"] .brand__name { color: var(--accent); }
.brand__suffix { font-family: var(--f-sans); font-weight: 500; font-size: .82em; color: var(--muted); }
[data-theme="dark"] .brand__suffix { color: var(--accent); opacity: .9; }

.nav { display: flex; gap: 26px; margin-inline: auto; }
.nav a { font-size: .93rem; color: var(--muted); transition: color .18s ease; }
.nav a:hover, .nav a.is-active { color: var(--text); }

.head-tools { display: flex; align-items: center; gap: 14px; }
.head-phone,
.theme-toggle {
	width: 38px; height: 38px; flex: none;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--border); border-radius: 50%;
	background: transparent; cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease;
}
.head-phone:hover, .theme-toggle:hover { border-color: var(--text); }
.head-phone svg, .theme-toggle svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: block; }

.burger { display: none; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: var(--r-sm); background: transparent; cursor: pointer; align-items: center; justify-content: center; }
.burger svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; }

/* =========================================================
   5. Hero
   ========================================================= */

.hero { position: relative; overflow: hidden; }
[data-theme="dark"] .hero::before {
	content: ""; position: absolute; inset: 0;
	background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.017) 0 12px, transparent 12px 24px);
	pointer-events: none;
}
.hero__in {
	position: relative;
	display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
	padding-block: 72px 88px;
}

.eyebrow {
	display: inline-block;
	border: 1px solid var(--border); border-radius: 999px;
	padding: 7px 15px;
	font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
	color: var(--text);
	margin-bottom: 26px;
}
[data-theme="dark"] .eyebrow { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }

.hero__lead { margin-top: 22px; max-width: 460px; color: var(--muted); font-size: 1.02rem; }

.hero__stats { display: flex; gap: 14px; margin-top: 34px; }
.stat {
	border: 1px solid var(--border); border-radius: var(--r-sm);
	padding: 12px 18px; min-width: 104px;
}
.stat__v { font-family: var(--num-f); font-weight: var(--num-w); font-size: 1.42rem; letter-spacing: -0.03em; line-height: 1.15; }
[data-theme="dark"] .stat__v { color: var(--accent); }
.stat__l { font-size: .78rem; color: var(--muted); }

/* Bandeau photo — visible uniquement en mobile */
.hero__media { display: none; }

/* =========================================================
   6. Carte d'estimation
   ========================================================= */

.est {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--r-lg);
	padding: 26px;
	box-shadow: var(--shadow-lg);
}
[data-theme="dark"] .est { background: var(--surface); box-shadow: var(--shadow); }

.est__title {
	font-family: var(--f-sans);
	font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
	margin-bottom: 16px;
}
[data-theme="dark"] .est__title { color: var(--accent); }

.field { position: relative; margin-bottom: 10px; }
.field__mark {
	position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
	font-size: .7rem; color: var(--muted); pointer-events: none; line-height: 1;
}
.field input {
	width: 100%;
	background: var(--field);
	border: 1px solid transparent;
	border-radius: var(--r-sm);
	padding: 14px 14px 14px 34px;
	font-size: .95rem;
	transition: border-color .18s ease, background-color .2s ease;
}
[data-theme="dark"] .field input { border-color: var(--border); }
.field input::placeholder { color: var(--muted); }
.field input:focus { outline: none; border-color: var(--accent); }
.field--plain input { padding-left: 15px; }

/* Autocomplétion */
.ac {
	position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0;
	background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm);
	box-shadow: var(--shadow-lg);
	max-height: 244px; overflow-y: auto;
	display: none;
}
[data-theme="dark"] .ac { background: #101010; }
.ac.is-open { display: block; }
.ac button {
	display: grid;
	grid-template-columns: 1fr auto;
	width: 100%; text-align: left;
	background: transparent; border: 0; cursor: pointer;
	padding: 10px 14px; font-size: .87rem; line-height: 1.35;
	border-bottom: 1px solid var(--border-soft);
}
.ac button:last-child { border-bottom: 0; }
.ac button:hover, .ac button.is-hl { background: var(--surface); }
[data-theme="dark"] .ac button:hover, [data-theme="dark"] .ac button.is-hl { background: #1a1a1a; }

.ac__name { color: var(--muted); min-width: 0; }
.ac__name strong { color: var(--text); font-weight: 700; }
[data-theme="dark"] .ac__name strong { color: var(--accent); }

.ac__kind {
	align-self: center;
	font-size: .66rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	color: var(--muted);
	border: 1px solid var(--border); border-radius: 999px;
	padding: 2px 8px; white-space: nowrap;
}

.ac small { grid-column: 1 / -1; display: block; color: var(--muted); font-size: .74rem; margin-top: 1px; }

.est__submit { margin-top: 6px; }

.est__err {
	display: none;
	margin-top: 12px; padding: 10px 13px;
	border-radius: var(--r-sm);
	background: color-mix(in srgb, #ef4444 12%, transparent);
	color: #ef4444; font-size: .84rem;
}
.est__err.is-open { display: block; }

.est__result { display: none; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border); }
.est__result.is-open { display: block; animation: fv-in .32s ease; }
@keyframes fv-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

.est__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.est__label { font-size: .78rem; color: var(--muted); }
.est__price {
	font-family: var(--num-f); font-weight: var(--num-w);
	font-size: 2.6rem; letter-spacing: -0.045em; line-height: 1.05;
}
.est__meta { text-align: right; font-size: .82rem; color: var(--muted); line-height: 1.7; white-space: nowrap; }
.est__wa { margin-top: 16px; }
.est__note { margin-top: 11px; text-align: center; font-size: .74rem; color: var(--muted); }

.est__loader { display: none; margin-top: 14px; text-align: center; font-size: .84rem; color: var(--muted); }
.est__loader.is-open { display: block; }

/* =========================================================
   7. Prestations
   ========================================================= */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
	background: var(--surface);
	border: 1px solid var(--border-soft);
	border-radius: var(--r);
	padding: 22px;
	transition: transform .18s ease, border-color .18s ease;
}
[data-theme="dark"] .card { background: var(--surface); border-color: var(--border); }
.card:hover { transform: translateY(-2px); border-color: var(--border); }
.card__sub { margin-top: 6px; font-size: .88rem; color: var(--muted); }

/* =========================================================
   8. Véhicule
   ========================================================= */

/* Les prestations laissent déjà 84 px sous leurs cartes : inutile d'en
   remettre autant au-dessus du titre. */
#vehicule { padding-top: 34px; }

.vehicle { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
/* Galerie du véhicule : une photo, ou plusieurs qui défilent. */
.gallery { position: relative; }

.gallery__frame {
	position: relative;
	/* 4:3 — le format des photos fournies, affichées sans recadrage. */
	aspect-ratio: 4 / 3;
	border-radius: var(--r);
	border: 1px solid var(--border-soft);
	overflow: hidden;
	background: var(--surface);
}
[data-theme="dark"] .gallery__frame { border-color: var(--border); }

.gallery__slide {
	position: absolute; inset: 0;
	opacity: 0;
	transition: opacity .45s ease;
	pointer-events: none;
}
.gallery__slide.is-active { opacity: 1; pointer-events: auto; }
.gallery__slide .ph { height: 100%; }

.gallery__nav {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 40px; height: 40px;
	display: flex; align-items: center; justify-content: center;
	border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #09090b;
	cursor: pointer;
	opacity: 0;
	transition: opacity .2s ease, background-color .2s ease;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.gallery__nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gallery__nav--prev { left: 12px; }
.gallery__nav--next { right: 12px; }
.gallery__nav:hover { background: #fff; }
.gallery:hover .gallery__nav, .gallery__nav:focus-visible { opacity: 1; }

.gallery__dots {
	position: absolute; left: 0; right: 0; bottom: 12px;
	display: flex; justify-content: center; gap: 7px;
}
.gallery__dot {
	width: 7px; height: 7px; padding: 0;
	border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .5);
	cursor: pointer;
	transition: background-color .2s ease, width .2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.gallery__dot.is-active { width: 20px; border-radius: 4px; background: #fff; }

/* Sur écran tactile, les flèches restent visibles : il n'y a pas de survol. */
@media (hover: none) {
	.gallery__nav { opacity: 1; background: rgba(255, 255, 255, .82); }
}
.vehicle__name { font-family: var(--f-head); font-weight: var(--head-w); letter-spacing: var(--head-ls); font-size: 1.9rem; }
.vehicle__model { margin-top: 6px; color: var(--muted); }
.vehicle__desc { margin-top: 16px; color: var(--muted); max-width: 46ch; }
.vehicle__specs { display: flex; gap: 26px; margin-top: 24px; flex-wrap: wrap; }
.spec__v { font-family: var(--num-f); font-weight: var(--num-w); font-size: 1.5rem; letter-spacing: -0.03em; }
[data-theme="dark"] .spec__v { color: var(--accent); }
.spec__l { font-size: .8rem; color: var(--muted); }

.equip { background: var(--surface); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); padding: 22px 0; }
[data-theme="dark"] .equip { background: var(--bg-alt); border-color: var(--border); }
.equip__list { display: flex; flex-wrap: wrap; gap: 10px 34px; font-size: .9rem; }
.equip__list li { list-style: none; }
.equip__list ul, .equip ul { margin: 0; padding: 0; }

/* =========================================================
   9. Avis
   ========================================================= */

.avis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.avis__card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r); padding: 22px; }
[data-theme="dark"] .avis__card { border-color: var(--border); }
.stars { letter-spacing: .12em; font-size: .95rem; margin-bottom: 12px; }
[data-theme="dark"] .stars { color: var(--accent); }
.avis__text { font-size: .93rem; }
.avis__who { margin-top: 14px; font-size: .84rem; color: var(--muted); }

/* =========================================================
   10. Contact + Footer
   ========================================================= */

.contact { text-align: center; }
.contact p { max-width: 52ch; margin: 14px auto 0; color: var(--muted); }
.contact__cta { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

.site-footer { background: var(--ft-bg); color: var(--ft-text); padding: 30px 0; }
[data-theme="dark"] .site-footer { border-top: 1px solid var(--border); }
.site-footer__in { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.site-footer__info { font-size: .88rem; color: var(--ft-muted); }
.site-footer__legal { margin-top: 16px; font-size: .76rem; color: var(--ft-muted); }

/* =========================================================
   11. Pages internes
   ========================================================= */

.page-hero { padding: 60px 0 34px; }
.entry { padding-bottom: 80px; }
.entry__content { max-width: 68ch; }
.entry__content p, .entry__content ul, .entry__content ol { margin: 0 0 1.1em; }
.entry__content a { text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   12. Responsive
   ========================================================= */

@media (max-width: 1080px) {
	.nav { gap: 18px; }
}

@media (max-width: 900px) {
	:root { --gut: 18px; --head-h: 64px; }

	.nav {
		position: fixed; inset: var(--head-h) 0 auto 0;
		flex-direction: column; gap: 0;
		background: var(--bg); border-bottom: 1px solid var(--border);
		padding: 8px 18px 18px;
		transform: translateY(-8px); opacity: 0; pointer-events: none;
		transition: opacity .18s ease, transform .18s ease;
	}
	.nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
	.nav a { padding: 13px 0; border-bottom: 1px solid var(--border-soft); font-size: 1rem; }
	.burger { display: inline-flex; }
	.head-tools { margin-left: auto; }
	.hero__in { grid-template-columns: 1fr; gap: 0; padding-block: 0 60px; }
	.hero__media {
		display: flex; flex-direction: column; justify-content: flex-end;
		position: relative; isolation: isolate;
		margin-inline: calc(var(--gut) * -1);
		/* Bandeau volontairement court : le formulaire doit être visible
		   sans faire défiler la page. La marge basse dépasse le chevauchement
		   de la carte (-34px) pour que la dernière ligne du titre reste
		   lisible. */
		min-height: 0;
		padding: 24px var(--gut) 48px;
	}
	.hero__media > .ph { position: absolute; inset: 0; z-index: -2; }
	.hero__media::after {
		content: ""; position: absolute; inset: 0; z-index: -1;
		background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.28) 48%, rgba(0,0,0,.06) 100%);
	}
	.hero__media .ph__label {
		margin-bottom: 8px;
		font-family: var(--f-mono); font-size: .65rem; letter-spacing: .12em;
		color: rgba(255,255,255,.7);
	}
	.hero__media h1 {
		font-size: clamp(1.6rem, 6.6vw, 2rem);
		color: #fff; text-shadow: 0 2px 26px rgba(0,0,0,.6);
	}
	.hero__copy .eyebrow { display: none; }
	.hero__copy h1 { display: none; }
	.hero__copy { order: 3; margin-top: 30px; }
	.hero__lead { max-width: none; }
	.hero__card { order: 2; margin-top: -34px; position: relative; z-index: 5; }
	.hero__stats { margin-top: 26px; }

	.section { padding: 56px 0; }
	.avis { grid-template-columns: repeat(2, 1fr); }
	.card { padding: 18px; }

	.vehicle { grid-template-columns: 1fr; gap: 22px; }
	.equip__list { gap: 8px; }
	.equip__list li {
		border: 1px solid var(--border); border-radius: 999px;
		padding: 7px 13px; font-size: .82rem;
	}

	.site-footer { text-align: center; padding: 34px 0; }
	.site-footer__in { flex-direction: column; gap: 8px; }
	.site-footer .brand { font-size: 1.35rem; }
}

@media (max-width: 560px) {
	.avis { grid-template-columns: 1fr; }
	.est { padding: 20px; }
	.est__price { font-size: 2.25rem; }
	.section-head { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
