/* ==========================================================================
   Base — reset doux, typographie, utilitaires de mise en page.
   Spécificité minimale (:where) pour ne jamais écraser les widgets Elementor.
   Points de rupture de la maquette : 1100 (menu), 900 (grilles), 600 (cartes).
   ========================================================================== */

:where(*, *::before, *::after) { box-sizing: border-box; }
:where(html) { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { :where(html) { scroll-behavior: auto; } }

:where(body) {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: 1.6;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

:where(img, svg, video) { display: block; max-width: 100%; }
:where(img) { height: auto; }
:where(a) { color: var(--ink); transition: color var(--t-hover) ease; }
:where(a:hover) { color: var(--accent); }
:where(h1, h2, h3, h4) { margin: 0; font-family: var(--font-display); font-weight: 400; }
:where(p, ul, ol, figure, blockquote) { margin: 0; }
:where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(button) { cursor: pointer; }

/* Focus visibles (Composants : contour 2 px, décalage 4 px). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.sr-only {
	position: absolute !important;
	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: 16px; top: -100px; z-index: 1000;
	padding: 14px 20px;
	background: var(--ink); color: var(--bg);
	font: 500 12px/1 var(--font-ui); letter-spacing: .18em; text-transform: uppercase;
	text-decoration: none;
}
.skip-link:focus { top: 16px; color: var(--bg); }

/* --------------------------------------------------------------- Conteneurs */
.wrap { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--text { max-width: calc(var(--text) + 2 * var(--gutter)); }
.wrap--narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
.section { padding-block: var(--section); }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--dark); color: var(--on-dark); }
.section--dark :where(a) { color: var(--on-dark); }

/* ------------------------------------------------------------- Typographie */
.eyebrow {
	margin: 0;
	font-family: var(--font-ui);
	font-size: var(--fs-eyebrow);
	font-weight: 500;
	letter-spacing: .24em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--accent);
}
.script { font-family: var(--font-script); font-weight: 400; font-style: normal; color: var(--accent); }
.h1 { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h1); line-height: 1.1; }
.h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h2); line-height: 1.1; }
.h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.2; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-soft); }
.text { font-size: var(--fs-body); line-height: 1.6; color: var(--ink-soft); }

/* Texte riche saisi par la cliente : l'italique devient Parisienne (docs/03). */
.rich :where(em, i) { font-family: var(--font-script); font-style: normal; font-size: 1.15em; color: var(--accent); line-height: 1; }
.rich :where(p + p) { margin-top: 1em; }
.rich :where(strong, b) { font-weight: 600; color: var(--ink); }

/* Contenu éditorial des pages simples (blocs natifs). */
.entry-content :where(h2) { font-size: var(--fs-h3); line-height: 1.2; margin: 1.8em 0 .6em; }
.entry-content :where(h3) { font-size: 22px; line-height: 1.25; margin: 1.6em 0 .5em; }
.entry-content :where(p, ul, ol) { margin: 0 0 1em; color: var(--ink-soft); }
.entry-content :where(ul, ol) { padding-left: 1.2em; }
.entry-content :where(a) { color: var(--ink); text-underline-offset: .2em; }

/* -------------------------------------------- Emplacements d'image (--ph) */
.ph {
	display: flex; align-items: center; justify-content: center;
	width: 100%;
	background: var(--ph);
	color: var(--ink-soft);
	font-family: var(--font-ui); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
	text-align: center; padding: 16px;
}
.ph--dark { background: var(--ph-dark); color: #E9E1D5; }
.b-img { width: 100%; height: auto; object-fit: cover; background: var(--ph); }
.b-img[style*="aspect-ratio"] { height: auto; }

/* ---------------------------------------------- Apparition au défilement */
.js .reveal { opacity: 0; transform: translateY(var(--reveal-shift)); transition: opacity var(--t-reveal) var(--ease), transform var(--t-reveal) var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* Ancres sous l'en-tête fixe. */
:where([id]) { scroll-margin-top: 120px; }
