/*
Theme Name: Chauffeur Privé Maurice
Theme URI: https://taxi-ile-maurice.fr
Author: Seobooster Ltd
Description: Thème premium sur mesure — chauffeur privé, VTC et mise à disposition à l'Île Maurice. Sobriété, matières nobles, capture de devis dès le premier écran.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: taxi-ile-maurice
License: Propriétaire — Seobooster Ltd
*/

/* ==========================================================================
   1. RESET MINIMAL
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, figure { margin: 0; }
table { border-collapse: collapse; width: 100%; }

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

/* ==========================================================================
   2. JETONS DE DESIGN — palette « graphite & cognac »
   Clair par défaut, sombre déclaré (P-110/P-351) : chaque bloc lit ces
   variables, jamais une couleur en dur dans un composant.
   ========================================================================== */
:root {
	/* fond & surfaces */
	--c-bg: #F4F2EE;
	--c-surface: #FFFFFF;
	--c-surface-2: #EDE9E2;
	/* encre */
	--c-ink: #201D1A;
	--c-ink-soft: #6B6259;
	--c-line: #E1DBD0;
	/* accent : cognac patiné, seule couleur vive du site (P-116) */
	--c-accent: #8A4B2E;
	--c-accent-dark: #6E3B22;
	--c-accent-soft: #F1E1D5;
	--c-on-accent: #FBF7F2;
	--c-focus: #2F6FED;

	--shadow-sm: 0 1px 2px rgba(32, 29, 26, 0.08);
	--shadow-md: 0 8px 24px rgba(32, 29, 26, 0.12);
	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 20px;
	--container: 1220px;

	--font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--bar-h: 64px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--c-bg: #17140F;
		--c-surface: #221D17;
		--c-surface-2: #2B2419;
		--c-ink: #F2ECE3;
		--c-ink-soft: #C9BFB2;
		--c-line: #362E24;
		--c-accent: #D08E5C;
		--c-accent-dark: #E3A473;
		--c-accent-soft: #33261A;
		--c-on-accent: #1B140D;
		--c-focus: #6FA1FF;
		--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
		--shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
	}
}

/* ==========================================================================
   3. BASE
   ========================================================================== */
body {
	background: var(--c-bg);
	color: var(--c-ink);
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	padding-bottom: 0;
}
body.has-action-bar { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; color: var(--c-ink); }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); }
p { max-width: 68ch; }
.container p { color: var(--c-ink-soft); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
	outline: 3px solid var(--c-focus);
	outline-offset: 2px;
}

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 1000;
	background: var(--c-ink); color: var(--c-bg); padding: 0.75em 1.25em; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap; left: -9999px;
}

.container { max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
section { padding-block: clamp(2.5rem, 2rem + 2vw, 5rem); }
.section-tight { padding-block: clamp(1.5rem, 1.2rem + 1vw, 2.5rem); }
.section-alt { background: var(--c-surface-2); }

.eyebrow {
	display: inline-block; font-family: var(--font-sans); font-size: 0.78rem;
	letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-accent);
	font-weight: 600; margin-bottom: 0.75rem;
}
.lede { font-size: 1.1rem; color: var(--c-ink-soft); max-width: 60ch; }

/* Tableau défilable posé par le socle : on lui donne son style minimal (P-204). */
.sbs_tableau { overflow-x: auto; margin-block: 1.5rem; border: 1px solid var(--c-line); border-radius: var(--radius-md); }
.sbs_tableau table { min-width: 480px; }
.sbs_tableau th, .sbs_tableau td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--c-line); text-align: left; }
.sbs_tableau th { background: var(--c-surface-2); font-family: var(--font-serif); }

/* ==========================================================================
   4. BOUTONS
   ========================================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
	padding: 0.85em 1.5em; border-radius: var(--radius-sm); font-weight: 600;
	font-size: 0.98rem; border: 1px solid transparent; cursor: pointer; line-height: 1.1;
	transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-accent); color: var(--c-on-accent); }
.btn-primary:hover { background: var(--c-accent-dark); }
.btn-outline { background: transparent; color: var(--c-ink); border-color: var(--c-ink); }
.btn-outline:hover { background: var(--c-ink); color: var(--c-bg); }
.btn-whatsapp { background: #25D366; color: #06210F; }
.btn-whatsapp:hover { background: #1EBE5A; }
.btn-block { width: 100%; }
.btn-lg { padding: 1.05em 1.75em; font-size: 1.05rem; }

/* ==========================================================================
   5. EN-TÊTE / NAVIGATION
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 500; background: var(--c-bg); border-bottom: 1px solid var(--c-line); }
.header-top {
	display: none; background: var(--c-ink); color: var(--c-bg);
}
.header-top .container { display: flex; justify-content: flex-end; gap: 1.5rem; padding-block: 0.4rem; font-size: 0.85rem; }
.header-top a { display: inline-flex; align-items: center; gap: 0.4em; }
.header-top a:hover { color: var(--c-accent-dark); }
@media (min-width: 768px) { .header-top { display: block; } }

.header-main .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.9rem; }

.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand svg { width: 40px; height: 40px; color: var(--c-accent); flex-shrink: 0; }
.brand-name { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700; letter-spacing: 0.01em; }

.nav-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
	background: var(--c-surface);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
	display: block; width: 20px; height: 2px; background: var(--c-ink); position: relative; transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); top: 0; }
.nav-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); top: 0; }

.main-nav {
	position: fixed; inset: 0; background: var(--c-bg);
	transform: translateX(100%); transition: transform 0.25s ease; z-index: 600;
	overflow-y: auto; padding: 5rem 1.5rem 2rem;
}
.main-nav.is-open { transform: translateX(0); }
.nav__list { display: flex; flex-direction: column; gap: 0.25rem; }
.nav__list a {
	display: block; padding: 0.9rem 0.25rem; font-family: var(--font-serif); font-size: 1.15rem;
	border-bottom: 1px solid var(--c-line);
}
.nav-close {
	position: absolute; top: 1.25rem; right: 1.25rem; width: 44px; height: 44px;
	border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: var(--c-surface);
	font-size: 1.4rem;
}
.nav-cta { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }

@media (min-width: 1024px) {
	.nav-toggle, .nav-close { display: none; }
	.main-nav {
		position: static; inset: auto; transform: none; background: transparent; padding: 0; overflow: visible;
	}
	.nav__list { flex-direction: row; align-items: center; gap: 1.75rem; }
	.nav__list a { border-bottom: none; padding: 0.4rem 0; font-family: var(--font-sans); font-size: 0.98rem; font-weight: 500; }
	.nav__list a:hover { color: var(--c-accent); }
	.nav-cta { flex-direction: row; margin-top: 0; margin-left: 1.5rem; }
	.header-main .container { flex-wrap: nowrap; }
}

/* ==========================================================================
   6. BARRE D'ACTION FIXE — mobile uniquement (R-0022)
   ========================================================================== */
.action-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 700;
	display: grid; grid-template-columns: repeat(4, 1fr);
	background: var(--c-surface); border-top: 1px solid var(--c-line); box-shadow: var(--shadow-md);
	padding-bottom: env(safe-area-inset-bottom);
}
.action-bar a, .action-bar button {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
	min-height: var(--bar-h); font-size: 0.72rem; font-weight: 600; color: var(--c-ink); background: transparent; border: none;
}
.action-bar svg { width: 22px; height: 22px; }
.action-bar .is-accent { color: var(--c-accent); }
.action-bar .is-whatsapp { color: #1EBE5A; }
@media (min-width: 1024px) { .action-bar { display: none; } body.has-action-bar { padding-bottom: 0; } }

/* ==========================================================================
   7. HÉROS + FORMULAIRE DE DEVIS
   ========================================================================== */
.hero { padding-block: clamp(2rem, 1.6rem + 2vw, 4.5rem); }
.hero .container { display: grid; gap: 2.5rem; align-items: start; }
.hero-copy h1 { margin-bottom: 1rem; }
.hero-copy .lede { margin-bottom: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; }
.hero-badges li { display: flex; align-items: center; gap: 0.5em; font-size: 0.9rem; color: var(--c-ink-soft); }
.hero-badges svg { width: 18px; height: 18px; color: var(--c-accent); flex-shrink: 0; }
.hero-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.hero-media img { width: 100%; aspect-ratio: 16/11; object-fit: cover; }

@media (min-width: 1024px) {
	.hero .container { grid-template-columns: 1.05fr 0.95fr; }
}

/* Carte de devis, réutilisée en compact (hero, sidebar) ou pleine largeur */
.devis-card {
	background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
	padding: clamp(1.25rem, 1rem + 1vw, 2rem); box-shadow: var(--shadow-md); scroll-margin-top: 5rem;
}
.devis-card h2 { font-size: 1.35rem; margin-bottom: 0.35rem; }
.devis-card .lede { font-size: 0.95rem; margin-bottom: 1.25rem; }
.devis-note { margin-top: 1rem; font-size: 0.82rem; color: var(--c-ink-soft); }

.devis-success {
	background: var(--c-accent-soft); border: 1px solid var(--c-accent); color: var(--c-ink);
	border-radius: var(--radius-md); padding: 1rem 1.25rem; margin-bottom: 1.25rem; font-weight: 600;
}

.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.form-row-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 480px) { .form-row-2 { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--c-ink); }
.field .req { color: var(--c-accent); }
.field input, .field select, .field textarea {
	background: var(--c-bg); border: 1px solid var(--c-line); border-radius: var(--radius-sm);
	padding: 0.75em 0.9em; font-size: 0.98rem; width: 100%;
}
.field textarea { resize: vertical; min-height: 5.5rem; }
.field-honeypot { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   8. GRILLE DE SERVICES
   ========================================================================== */
.services-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-top: 2rem; }
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
	display: flex; flex-direction: column; background: var(--c-surface); border: 1px solid var(--c-line);
	border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); height: 100%;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.service-card__media { aspect-ratio: 4/3; overflow: hidden; background: var(--c-surface-2); }
.service-card__media img { width: 100%; height: 100%; object-fit: cover; }
.service-card__body { padding: 1.1rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex-grow: 1; }
.service-card__body h3 { font-size: 1.05rem; }
.service-card__body p { font-size: 0.92rem; color: var(--c-ink-soft); flex-grow: 1; }
.service-card__link { font-weight: 700; color: var(--c-accent); font-size: 0.9rem; }
.services-empty { color: var(--c-ink-soft); font-style: italic; }

/* ==========================================================================
   9. BANDES DE CONFIANCE / PROCESS
   ========================================================================== */
.trust-strip { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .trust-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .trust-strip { grid-template-columns: repeat(4, 1fr); } }
.trust-item { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.25rem; border: 1px solid var(--c-line); border-radius: var(--radius-md); background: var(--c-surface); }
.trust-item svg { width: 26px; height: 26px; color: var(--c-accent); }
.trust-item h3 { font-size: 1rem; }
.trust-item p { font-size: 0.88rem; color: var(--c-ink-soft); }

.process-list { display: grid; gap: 1.5rem; grid-template-columns: 1fr; counter-reset: step; margin-top: 2rem; }
@media (min-width: 768px) { .process-list { grid-template-columns: repeat(3, 1fr); } }
.process-item { position: relative; padding-left: 3.25rem; }
.process-item::before {
	counter-increment: step; content: counter(step);
	position: absolute; left: 0; top: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%;
	background: var(--c-accent); color: var(--c-on-accent); display: flex; align-items: center; justify-content: center;
	font-family: var(--font-serif); font-weight: 700;
}
.process-item h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.process-item p { font-size: 0.9rem; color: var(--c-ink-soft); }

/* ==========================================================================
   10. GABARIT DE PAGE (service, générique)
   ========================================================================== */
.page-hero { padding-block: 2.5rem; border-bottom: 1px solid var(--c-line); background: var(--c-surface-2); }
.breadcrumb { font-size: 0.82rem; color: var(--c-ink-soft); margin-bottom: 0.75rem; }
.breadcrumb a:hover { color: var(--c-accent); }
.page-hero__media { margin-top: 1.5rem; border-radius: var(--radius-lg); overflow: hidden; max-height: 420px; }
.page-hero__media img { width: 100%; max-height: 420px; object-fit: cover; }

.page-layout { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .page-layout { grid-template-columns: 1.6fr 0.9fr; align-items: start; } }
.page-layout aside { position: static; }
@media (min-width: 1024px) { .page-layout aside { position: sticky; top: calc(var(--bar-h) + 1rem); } }

.entry-content { overflow-wrap: anywhere; }
.entry-content h2 { margin-top: 2.25rem; margin-bottom: 0.75rem; }
.entry-content h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.entry-content p { margin-bottom: 1.1rem; color: var(--c-ink); font-size: 1.02rem; line-height: 1.7; }
.entry-content ul, .entry-content ol { margin-bottom: 1.1rem; padding-left: 1.25rem; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content img { border-radius: var(--radius-md); margin-block: 1rem; }
.entry-content a:not(.btn) { color: var(--c-accent); text-decoration: underline; text-underline-offset: 2px; }

.cta-band { background: var(--c-ink); color: var(--c-bg); text-align: center; }
.cta-band h2, .cta-band p { color: var(--c-bg); }
.cta-band .lede { color: var(--c-ink-soft); margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; margin-top: 1.5rem; margin-bottom: 0; }

/* ==========================================================================
   11. PIED DE PAGE
   ========================================================================== */
.site-footer { background: var(--c-surface-2); border-top: 1px solid var(--c-line); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; padding-block: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-brand .brand { margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.92rem; color: var(--c-ink-soft); }
.footer-col h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.9rem; color: var(--c-ink-soft); }
.footer-col ul { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a { font-size: 0.92rem; }
.footer-col a:hover { color: var(--c-accent); }
.footer-contact { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-contact a { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 600; }
.footer-bottom { border-top: 1px solid var(--c-line); padding-block: 1.25rem; }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between; font-size: 0.82rem; color: var(--c-ink-soft); }
.footer-bottom a:hover { color: var(--c-accent); }

/* ==========================================================================
   12. 404 / ÉTATS
   ========================================================================== */
.state-block { text-align: center; padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.state-block .btn { margin-top: 1.5rem; }
