/*
Theme Name: Things To Do In Mauritius
Theme URI: https://thingstodoinmauritius.com
Author: Seobooster Ltd
Author URI: https://thingstodoinmauritius.com
Description: Code-pur bespoke theme for a free, English-language Mauritius itinerary guide. Warm sand-and-deep-lagoon neutrals with a single terracotta-coral accent; angular brand bands instead of soft travel-blog curves.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: ttdm
*/

/* =============================================================================
   1. TOKENS — 1 fond neutre (sable clair -> lagon profond) + 1 accent (corail).
   Défini en clair par défaut, redéfini entièrement en sombre (P-351/P-110).
   ============================================================================= */
:root {
	--bg: #e7f5f1;
	--bg-alt: #c9eae3;
	--surface: #ffffff;
	--ink: #0a3733;
	--ink-soft: #3e605a;
	--line: #a9d9ce;
	--accent: #e8a722;
	--accent-dark: #b9820f;
	--accent-ink: #8a6207;
	--accent-tint: #fbeacb;
	--on-accent: #0a3733;
	--band-bg: #0a3733;
	--band-bg-2: #0f4841;
	--band-ink: #eef7f6;
	--band-ink-soft: #a9c9c4;
	--band-line: rgba(238, 247, 246, 0.14);
	--shadow: 0 18px 40px -22px rgba(10, 55, 51, 0.35);
	--radius: 14px;
	--radius-sm: 8px;
	--font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #071f1c;
		--bg-alt: #0c2b27;
		--surface: #103430;
		--ink: #eaf3f1;
		--ink-soft: #a9c4bf;
		--line: #1e4a44;
		--accent: #f5b94a;
		--accent-dark: #ffce72;
		--accent-ink: #f5b94a;
		--accent-tint: rgba(245, 185, 74, 0.16);
		--on-accent: #1b1305;
		--band-bg: #103430;
		--band-bg-2: #071f1c;
		--band-ink: #eaf3f1;
		--band-ink-soft: #8fada7;
		--band-line: rgba(234, 243, 241, 0.12);
		--shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.55);
	}
}

/* =============================================================================
   2. RESET & BASE
   ============================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: hidden; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { margin: 0; padding: 0; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0 0 1.1em; }
.entry-content p:last-child { margin-bottom: 0; }

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

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 200;
	background: var(--accent); color: var(--on-accent); padding: 0.75rem 1.25rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.container { width: min(var(--maxw), 92%); margin-inline: auto; }
.container--prose { width: min(760px, 92%); }

.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section--alt { background: var(--bg-alt); }

.eyebrow {
	display: inline-block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
	letter-spacing: 0.14em; color: var(--accent-ink); margin-bottom: 0.75rem;
}
.eyebrow--inverse { color: var(--accent); }

.section__title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 2rem; max-width: 32ch; }

/* =============================================================================
   3. BOUTONS
   ============================================================================= */
.btn {
	display: inline-flex; align-items: center; gap: 0.55rem;
	padding: 0.85rem 1.4rem; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
	white-space: nowrap; transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
	min-height: 44px;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent-dark); }
.btn--ghost { border: 2px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.btn--ghost-inverse { border: 2px solid var(--band-line); color: var(--band-ink); }
.btn--ghost-inverse:hover { border-color: var(--accent); color: var(--accent); }
.btn--lg { padding: 1rem 1.7rem; font-size: 1.02rem; }

.link-more {
	display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 2rem;
	font-weight: 700; color: var(--accent-ink);
}
.link-more svg { width: 1em; height: 1em; }

/* =============================================================================
   4. HEADER
   ============================================================================= */
.site-header {
	position: sticky; top: 0; z-index: 90;
	background: var(--bg); border-bottom: 1px solid var(--line);
	transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow); }
.site-header__row { display: flex; align-items: center; gap: 1.5rem; padding: 0.85rem 0; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__word { display: flex; flex-direction: column; line-height: 1.1; }
.brand__word-top { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.brand__word-bottom { font-size: 1.15rem; font-weight: 900; color: var(--ink); }

.nav { display: none; margin-inline: auto; }
.nav__list { list-style: none; display: flex; align-items: center; gap: 1.9rem; }
.nav__item > a, .nav__toggle { display: flex; align-items: center; gap: 0.3rem; font-weight: 600; font-size: 0.95rem; padding: 0.4rem 0; }
.nav__toggle svg { width: 0.8em; height: 0.8em; transition: transform 0.15s ease; }
.nav__item > a:hover, .nav__toggle:hover { color: var(--accent-ink); }

.nav__item--has-children { position: relative; }
.nav__submenu {
	list-style: none; position: absolute; top: 100%; left: -0.75rem; min-width: 220px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
	box-shadow: var(--shadow); padding: 0.5rem; display: none; z-index: 20;
}
.nav__item--has-children:hover .nav__submenu,
.nav__item--has-children:focus-within .nav__submenu,
.nav__item--has-children.is-open .nav__submenu { display: block; }
.nav__item--has-children.is-open .nav__toggle svg { transform: rotate(180deg); }
.nav__submenu li a { display: block; padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); font-size: 0.92rem; }
.nav__submenu li a:hover { background: var(--bg-alt); color: var(--accent-ink); }

.site-header__cta { display: none; align-items: center; gap: 0.75rem; }
.site-header__burger { display: inline-flex; padding: 0.4rem; }
.site-header__burger svg { width: 1.5rem; height: 1.5rem; }

@media (min-width: 900px) {
	.nav { display: block; }
	.site-header__cta { display: flex; }
	.site-header__burger { display: none; }
}

/* =============================================================================
   5. MOBILE PANEL
   ============================================================================= */
.mobile-panel {
	position: fixed; inset: 0 0 0 auto; width: min(360px, 82vw); z-index: 150;
	background: var(--surface); box-shadow: var(--shadow);
	padding: 1.25rem; overflow-y: auto;
	padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
}
.mobile-panel__backdrop { position: fixed; inset: 0; z-index: 140; background: rgba(14, 43, 39, 0.5); }
.mobile-panel__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.mobile-panel__title { font-weight: 800; font-size: 1.05rem; }
.mobile-panel__close svg { width: 1.4rem; height: 1.4rem; }
.mobile-nav__list, .mobile-nav__group ul { list-style: none; }
.mobile-nav__list > li > a, .mobile-nav__group ul li a {
	display: block; padding: 0.7rem 0.2rem; border-bottom: 1px solid var(--line); font-weight: 600;
}
.mobile-nav__heading { display: block; padding: 0.9rem 0.2rem 0.2rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); font-weight: 700; }
.mobile-nav__group ul li a { padding-left: 0.6rem; border-bottom: 1px dashed var(--line); }
.mobile-nav__cta { margin-top: 1.25rem; }
.mobile-nav__cta .btn { width: 100%; justify-content: center; }
.mobile-panel__contact { display: flex; gap: 0.6rem; margin-top: 1.25rem; flex-wrap: wrap; }
@media (min-width: 900px) { .mobile-panel, .mobile-panel__backdrop { display: none !important; } }

/* =============================================================================
   6. ACTION BAR — barre d'action fixe mobile (R-0022)
   ============================================================================= */
.action-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
	display: flex; background: var(--band-bg); border-top: 1px solid var(--band-line);
	padding-bottom: env(safe-area-inset-bottom);
}
.action-bar__item {
	flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 0.15rem; min-height: 56px; color: var(--band-ink-soft); font-size: 0.68rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: 0.02em;
}
.action-bar__item svg { width: 1.35rem; height: 1.35rem; }
.action-bar__item--accent { color: var(--accent); }
@media (min-width: 900px) { .action-bar { display: none; } }

/* =============================================================================
   7. HERO
   ============================================================================= */
.hero {
	position: relative; background: linear-gradient(155deg, var(--band-bg) 0%, var(--band-bg-2) 100%);
	color: var(--band-ink); padding: clamp(3.5rem, 8vw, 6.5rem) 0 6rem;
	clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%);
}
.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 60px; color: var(--bg); fill: var(--bg); }
.hero__inner { position: relative; z-index: 1; max-width: 46rem; }
.hero__title { font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 0.9rem; }
.hero__sub { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--band-ink-soft); max-width: 42ch; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 2.25rem; }
.hero__trust { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.88rem; color: var(--band-ink-soft); }
.hero__trust li { position: relative; padding-left: 1.1rem; }
.hero__trust li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 900; }

/* =============================================================================
   8. VALUE GRID / STEPS
   ============================================================================= */
.value-grid, .steps-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .value-grid, .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.value-card, .step-card {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 1.75rem; box-shadow: var(--shadow);
}
.value-card__num, .step-card__num {
	display: inline-flex; align-items: center; justify-content: center;
	width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--accent-tint); color: var(--accent-ink);
	font-weight: 900; font-size: 1.1rem; margin-bottom: 1rem;
}
.value-card h3, .step-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.value-card p, .step-card p { color: var(--ink-soft); margin: 0; }

/* =============================================================================
   9. PLACE CARDS (grilles régions / activités) — classes lues dans functions.php
   ============================================================================= */
.place-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .place-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .place-grid { grid-template-columns: repeat(3, 1fr); } }

.place-card {
	display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
	border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.place-card:hover { transform: translateY(-4px); box-shadow: 0 24px 46px -20px rgba(14, 43, 39, 0.45); }
.place-card__media { display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-alt); clip-path: polygon(0 0, 100% 0, 100% 100%, 12% 100%, 0 88%); }
.place-card__media img { width: 100%; height: 100%; object-fit: cover; }
.place-card__title { display: block; font-weight: 800; font-size: 1.05rem; padding: 1.1rem 1.1rem 0.3rem; }
.place-card__desc { display: block; color: var(--ink-soft); font-size: 0.92rem; padding: 0 1.1rem 1.3rem; }

/* =============================================================================
   10. CTA BAND (réutilisé sur toutes les pages via ttdm_cta_band())
   ============================================================================= */
.cta-band { background: var(--band-bg); color: var(--band-ink); padding: clamp(2.5rem, 5vw, 4rem) 0; }
.cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.75rem; }
.cta-band__title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 0.35rem; }
.cta-band__sub { color: var(--band-ink-soft); margin: 0; max-width: 42ch; }
.cta-band__actions { display: flex; gap: 0.85rem; flex-wrap: wrap; }

/* =============================================================================
   11. PAGE HERO / GABARIT GÉNÉRIQUE
   ============================================================================= */
.page-hero { background: var(--band-bg); color: var(--band-ink); padding: 2.75rem 0 3.25rem; clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%); }
.page-hero--form { padding-bottom: 3.75rem; }
.page-hero__title { font-size: clamp(1.6rem, 3.4vw, 2.4rem); max-width: 34ch; }
.breadcrumb { font-size: 0.85rem; color: var(--band-ink-soft); margin-bottom: 0.75rem; }
.breadcrumb a { color: var(--band-ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumb a:hover { color: var(--accent); }

.page-media { max-height: 420px; overflow: hidden; margin-top: -2rem; position: relative; z-index: 1; }
.page-media img { width: 100%; height: 420px; object-fit: cover; }
@media (max-width: 640px) { .page-media, .page-media img { height: 240px; max-height: 240px; margin-top: -1.25rem; } }

/* =============================================================================
   12. CONTENU ÉDITORIAL
   ============================================================================= */
.entry-content h2 { font-size: 1.5rem; margin-top: 2.4rem; }
.entry-content h3 { font-size: 1.2rem; margin-top: 1.8rem; }
.entry-content ul, .entry-content ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content img { border-radius: var(--radius); margin: 1.75rem 0; }
.entry-content a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-ink); text-underline-offset: 2px; }

.sbs_tableau { overflow-x: auto; margin: 1.75rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
.sbs_tableau table { width: 100%; min-width: 480px; border-collapse: collapse; }
.sbs_tableau th, .sbs_tableau td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.92rem; }
.sbs_tableau thead th { background: var(--bg-alt); font-weight: 700; }
.sbs_tableau tr:last-child td { border-bottom: 0; }

/* =============================================================================
   13. PAGE ITINÉRAIRE — mise en page à deux colonnes
   ============================================================================= */
.itinerary-layout { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 960px) { .itinerary-layout { grid-template-columns: 1fr 1.1fr; align-items: start; } }

.contact-panel {
	margin-top: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 1.5rem; box-shadow: var(--shadow);
}
.contact-panel h2 { font-size: 1.05rem; margin-bottom: 1rem; }
.contact-panel__item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.contact-panel__item:last-of-type { border-bottom: 0; }
.contact-panel__item svg { width: 1.5rem; height: 1.5rem; color: var(--accent-ink); flex: none; }
.contact-panel__item strong { display: block; font-size: 0.98rem; }
.contact-panel__item small { color: var(--ink-soft); }
.contact-panel__reassurance { list-style: none; margin-top: 1rem; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.88rem; color: var(--ink-soft); }
.contact-panel__reassurance li { padding-left: 1.1rem; position: relative; }
.contact-panel__reassurance li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-ink); font-weight: 900; }

/* =============================================================================
   14. FORMULAIRE MULTI-ÉTAPES
   ============================================================================= */
.sb-form {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow);
}
.sb-form__hp { position: absolute; left: -9999px; }
.sb-form__title { font-size: 1.3rem; margin-bottom: 1.25rem; }
.sb-form__progress { height: 6px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; margin-bottom: 1.75rem; }
.sb-form__progress span { display: block; height: 100%; background: var(--accent); transition: width 0.25s ease; }

.sb-form__step { display: none; border: 0; margin: 0; padding: 0; }
.sb-form__step.is-active { display: block; }
.sb-form__step legend { font-weight: 800; font-size: 1.05rem; margin-bottom: 1rem; padding: 0; }

.sb-form__choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.sb-choice {
	display: flex; align-items: center; gap: 0.6rem; padding: 0.85rem 1rem; border: 2px solid var(--line);
	border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 0.92rem; min-height: 44px;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.sb-choice input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; flex: none; }
.sb-choice:has(input:checked) { border-color: var(--accent-ink); background: var(--accent-tint); }
.sb-choice__ico { font-size: 1.1rem; }

.sb-field { display: block; margin-bottom: 1.1rem; }
.sb-field span { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.4rem; }
.sb-field em { font-weight: 400; color: var(--ink-soft); font-style: normal; }
.sb-field input, .sb-field textarea {
	width: 100%; padding: 0.75rem 0.9rem; border: 2px solid var(--line); border-radius: var(--radius-sm);
	font: inherit; background: var(--bg); color: var(--ink); min-height: 44px;
}
.sb-field input:focus, .sb-field textarea:focus { border-color: var(--accent-ink); }
.sb-field textarea { min-height: 90px; resize: vertical; }

.sb-form__nav { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 1.5rem; }
.sb-form__nav .sb-form__next, .sb-form__nav .sb-form__submit { margin-left: auto; }
.sb-form__note { text-align: center; font-size: 0.82rem; color: var(--ink-soft); margin: 1rem 0 0; }
.sb-form__success { text-align: center; font-weight: 700; font-size: 1.05rem; padding: 2rem 0; }

/* =============================================================================
   15. FOOTER
   ============================================================================= */
.site-footer { background: var(--band-bg); color: var(--band-ink); padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem; }
.site-footer__grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; padding-bottom: 2.5rem; border-bottom: 1px solid var(--band-line); }
@media (min-width: 780px) { .site-footer__grid { grid-template-columns: 1.2fr 2fr; } }
.site-footer .brand__word-top { color: var(--band-ink-soft); }
.site-footer .brand__word-bottom { color: var(--band-ink); }
.site-footer__tagline { color: var(--band-ink-soft); max-width: 40ch; margin: 1.1rem 0 1.25rem; }
.site-footer__contact { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.site-footer__nav { display: grid; gap: 1.75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .site-footer__nav { grid-template-columns: repeat(4, 1fr); } }
.site-footer__nav h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--band-ink-soft); margin-bottom: 0.9rem; }
.site-footer__nav ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.site-footer__nav a { color: var(--band-ink); font-size: 0.92rem; }
.site-footer__nav a:hover { color: var(--accent); }
/* Repli : wp_nav_menu() rend un <ul class="nav__list"> plat si un menu admin est assigné. */
.site-footer__nav > ul.nav__list { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 1rem 2rem; }

.site-footer__bottom { padding-top: 1.5rem; font-size: 0.82rem; color: var(--band-ink-soft); }

/* =============================================================================
   16. UTILITAIRES
   ============================================================================= */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
