/* FP Hero · Manifesto — porté verbatim depuis components/Hero.jsx (HeroManifesto)
   Structure JSX :
     <section flex column>           ← .fp-hero-m
       ::before                       ← bg image opacity 0.32 + saturate(0.85)
       ::after                        ← veil gradient
       <div flex align-center pad>    ← .fp-hero-m__container
         <div maxWidth 1200>          ← .fp-reveal-stagger (généré dans le pattern)
           <eyebrow row>
           <h1 title cascade>
           <bottom grid>
*/

.fp-hero-m {
	position: relative;
	min-height: min(95vh, 1000px);
	background-color: var(--paper);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center; /* centrage vertical du contenu */
	color: var(--ink);
	padding: clamp(80px, 8vw, 140px) clamp(20px, 5vw, 56px) clamp(40px, 5vw, 80px);
}

/* Background image (couche 0) — paramètres pilotés depuis Gutenberg via CSS vars, zoom in subtle au load.
   Fallbacks = valeurs originales du design system. */
.fp-hero-m::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: var(--fp-hero-bg-url, url('../../assets/img/lifestyle-508.jpg'));
	background-position: 50% 50%;
	background-size: cover;
	background-repeat: no-repeat;
	opacity: var(--fp-hero-img-opacity, 0.32);
	filter: saturate(var(--fp-hero-img-saturate, 0.85));
	pointer-events: none;
	z-index: 0;
	transform: scale(1.06);
	animation: fp-hero-m-zoom 2400ms cubic-bezier(.2, .7, .2, 1) forwards;
}
@keyframes fp-hero-m-zoom { to { transform: scale(1); } }

/* Veil (couche 1) — gradient blanc qui assure la lisibilité.
   Variables pour opacité haut/bas ; le point milieu est interpolé en moyenne. */
.fp-hero-m::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(244, 239, 230, var(--fp-hero-veil-top, 0.55)) 0%,
		rgba(244, 239, 230, calc((var(--fp-hero-veil-top, 0.55) + var(--fp-hero-veil-bottom, 0.95)) / 2 + 0.05)) 55%,
		rgba(244, 239, 230, var(--fp-hero-veil-bottom, 0.95)) 100%
	);
	pointer-events: none;
	z-index: 1;
}

/* Aperçu éditeur — neutralise le zoom anim et clamp la hauteur pour rester maniable. */
.fp-hero-m--editor {
	min-height: 420px;
}
.fp-hero-m--editor::before {
	animation: none;
	transform: none;
}

/* Inner content max 1200px, centré horizontalement, contenu en flux normal block.
   Le centrage vertical est géré par .fp-hero-m (justify-content: center) plus haut. */
.fp-hero-m > .fp-hero-m__container {
	position: relative;
	z-index: 2;
	max-width: 1200px;
	margin: 0 auto;
	width: 100%;
	display: block;
	padding: 0;
}

/* EYEBROW row — flex container avec rule fin + Eyebrow.
   Le rule de 44px est généré en pseudo-element ::before pour rester pur Gutenberg
   (pas besoin de span dans le HTML, le pattern reste éditable inline). */
.fp-hero-m__eyebrow {
	display: inline-flex !important;
	align-items: center;
	gap: 14px;
	margin: 0 0 56px 0;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	line-height: 1;
	text-transform: uppercase;
	color: var(--ink);
}
.fp-hero-m__eyebrow::before {
	content: '';
	display: inline-block;
	width: 44px;
	height: 1px;
	background: var(--ink);
	flex: 0 0 44px;
}

/* TITLE — typo dominante */
.fp-hero-m__title {
	margin: 0;
	font-family: var(--font-serif);
	font-weight: 500;
	font-size: clamp(2.4rem, 7.5vw, 8rem);
	line-height: 0.96;
	letter-spacing: -0.025em;
	text-transform: lowercase;
	color: var(--ink);
	text-wrap: balance;
	max-width: 14ch;
}
.fp-hero-m__title em {
	font-style: italic;
	color: var(--accent);
}

/* Animation cascade du titre — chaque <span class="fp-hero-m__line">
   créé par le JS hero-manifesto/script.js qui splitte par <br>.
   Délais 100/320/540/760 ms (verbatim prototype). */
.fp-hero-m__title .fp-hero-m__line {
	display: block;
	opacity: 0;
	transform: translateY(36px);
	transition: opacity 1100ms cubic-bezier(.2, .7, .2, 1),
	            transform 1100ms cubic-bezier(.2, .7, .2, 1);
}
.fp-hero-m__title .fp-hero-m__line:nth-child(1) { transition-delay: 100ms; }
.fp-hero-m__title .fp-hero-m__line:nth-child(2) { transition-delay: 320ms; }
.fp-hero-m__title .fp-hero-m__line:nth-child(3) { transition-delay: 540ms; }
.fp-hero-m__title .fp-hero-m__line:nth-child(4) { transition-delay: 760ms; }
.fp-hero-m__title .fp-hero-m__line:nth-child(5) { transition-delay: 980ms; }
.fp-hero-m__title.is-revealed .fp-hero-m__line {
	opacity: 1;
	transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
	.fp-hero-m__title .fp-hero-m__line {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

/* BOTTOM grid — verbatim JSX : 1.2fr / 1fr, gap clamp, marginTop clamp */
.fp-hero-m__bottom.wp-block-group,
.fp-hero-m__bottom {
	display: grid !important;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: clamp(24px, 5vw, 64px);
	align-items: flex-start;
	margin-top: clamp(56px, 7vw, 96px);
}
@media (max-width: 720px) {
	.fp-hero-m__bottom.wp-block-group,
	.fp-hero-m__bottom {
		grid-template-columns: 1fr;
	}
}

.fp-hero-m__bottom-text.wp-block-group,
.fp-hero-m__bottom-text {
	display: flex !important;
	flex-direction: column;
	gap: 28px;
}

.fp-hero-m__description {
	margin: 0;
	max-width: 480px;
	font-family: var(--font-serif);
	font-size: clamp(1rem, 1.2vw, 1.18rem);
	line-height: 1.6;
	color: var(--ink-2);
}

.fp-hero-m__ctas.wp-block-buttons,
.fp-hero-m__ctas {
	display: flex !important;
	gap: 16px;
	flex-wrap: wrap;
	align-items: center;
}

.fp-hero-m__stats.wp-block-group,
.fp-hero-m__stats {
	display: flex !important;
	flex-direction: row;
	gap: clamp(20px, 3vw, 40px);
	flex-wrap: wrap;
	padding-top: 8px;
	margin: 0;
}
.fp-hero-m__stat.wp-block-group,
.fp-hero-m__stat {
	margin: 0;
	display: block;
}
.fp-hero-m__stat-value {
	margin: 0;
	font-family: var(--font-serif);
	font-size: 24px;
	line-height: 1;
	color: var(--ink);
}
.fp-hero-m__stat-label {
	margin: 6px 0 0;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ink-3);
}
