/* Version 10 — « Mardi » : la home retenue au point du 28 octobre 2026.
   Animation de la version 3 « Mise en place » (ouverture du hero, flèche, anneau),
   boutons qui répondent (version 9), et une base recalée : marges intérieures plus
   généreuses, blocs alignés, page épurée. */

/* ---- Animation (version 3) ---- */
.motion-attente main h1,
.motion-attente main .ernest-media,
.motion-attente main .is-style-surtitre:first-child { visibility: hidden; }
.motion-mardi h1 .mot { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.motion-mardi h1 .mot__in { display: inline-block; will-change: transform; }

/* ---- Boutons qui répondent (version 9, méthode Emil Kowalski) ---- */
.motion-mardi {
	--m-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
.motion-mardi .wp-element-button {
	transition: transform 160ms var(--m-ease-out), background-color 150ms ease, color 150ms ease;
}
.motion-mardi .wp-element-button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
	.motion-mardi .ernest-domaine { transition: transform 200ms var(--m-ease-out); }
	.motion-mardi .ernest-domaine:hover { transform: translateX(6px); }
	.motion-mardi .ernest-domaines-droite .ernest-domaine:hover { transform: translateX(-6px); }
}
@media (prefers-reduced-motion: reduce) {
	.motion-mardi .wp-element-button:active,
	.motion-mardi .ernest-domaine:hover { transform: none; }
}

/* ---- Base recalée : rythme vertical et marges intérieures ----
   Mesures faites à 1280 px après correction de l'échelle d'espacements (theme.json,
   defaultSpacingSizes:false). Principe : une échelle, 4 crans (12 / 24 / 40 / 64 px),
   l'écart grandit avec la distance sémantique ; les titres sont plus près de ce qui suit
   que de ce qui précède. */
.ernest-v10 {
	--r-1: 0.75rem;   /* surtitre → titre, nom → ligne */
	--r-2: 1.5rem;    /* titre → texte, texte → bouton */
	--r-3: clamp(1.75rem, 3vw, 2.5rem); /* entre items d'une liste, titre de section → contenu */
	--r-4: clamp(2.5rem, 5vw, 4rem);    /* entre groupes */
}
/* Sections : même respiration partout, le hero un peu plus court en haut. */
.ernest-v10 main > .wp-block-group.alignfull { padding-top: var(--wp--preset--spacing--60) !important; padding-bottom: var(--wp--preset--spacing--60) !important; }
.ernest-v10 main > .wp-block-group.alignfull:first-child { padding-top: var(--wp--preset--spacing--50) !important; }
/* Hiérarchie des titres : h2 de section nettement au-dessus des h3 de cartes. */
.ernest-v10 main h2 { font-size: clamp(2.125rem, 3.4vw, 3rem); }
.ernest-v10 .ernest-pilier h3,
.ernest-v10 .ernest-fondateur h3 { font-size: var(--wp--preset--font-size--l); }
/* Surtitre → titre → texte → bouton : écarts croissants. */
.ernest-v10 main .is-style-surtitre + h1,
.ernest-v10 main .is-style-surtitre + h2 { margin-top: var(--r-1); }
.ernest-v10 main h1 + p { margin-top: var(--r-2); max-width: 36rem; }
.ernest-v10 main > .wp-block-group.alignfull:first-child .wp-block-buttons { margin-top: var(--r-3) !important; }
.ernest-v10 main h2 + .wp-block-columns,
.ernest-v10 main h2 + .wp-block-group { margin-top: var(--r-4) !important; }
.ernest-v10 main h2[style*="margin-bottom"] { margin-bottom: 0 !important; }
/* Bloc noir : trois moments séparés par un filet, sans double espacement. */
.ernest-v10 .is-style-item-numerote { padding-block: var(--r-3); margin-top: 0 !important; }
.ernest-v10 .is-style-item-numerote:last-child { padding-bottom: 0; }
.ernest-v10 .is-style-item-numerote > p:not(.ernest-num) { margin-top: var(--r-1) !important; }
/* Bloc orange : phrase, surlignage, bouton. */
.ernest-v10 .is-style-surligne + .is-style-surligne { margin-top: var(--r-1); }
.ernest-v10 .is-style-surligne + .wp-block-buttons { margin-top: var(--r-3) !important; }
/* Cartes des piliers : même marge sur les quatre côtés, bouton calé en bas sans double espace. */
.ernest-v10 .ernest-pilier { padding: var(--r-3) !important; }
.ernest-v10 .ernest-pilier .ernest-icone { margin-bottom: var(--r-2); }
.ernest-v10 .ernest-pilier h3 { margin-top: 0; }
.ernest-v10 .ernest-pilier p { margin-top: var(--r-1); }
.ernest-v10 .ernest-pilier > .wp-block-buttons { padding-top: var(--r-3); }
.ernest-v10 .ernest-pilier .wp-block-button__link { font-size: 1.0625rem; }
.ernest-v10 main .ernest-pilier:not(:first-child) { margin-top: 0; }
/* Domaines : étiquettes alignées, texte sous l'étiquette, lignes régulières. */
.ernest-v10 .ernest-domaine { padding-bottom: var(--r-2); }
.ernest-v10 .ernest-domaine p { margin-top: var(--r-1); }
/* Fondateurs : trois lignes nettes sur le bleu. */
.ernest-v10 .ernest-fondateur { padding-bottom: var(--r-2); border-bottom: 1px solid rgb(255 255 255 / 0.35); }
.ernest-v10 .ernest-fondateur:last-of-type { border-bottom: 0; padding-bottom: 0; }
.ernest-v10 .ernest-fondateur + .ernest-fondateur { margin-top: var(--r-2) !important; }
.ernest-v10 .ernest-fondateur h3 { margin: 0; }
.ernest-v10 .ernest-fondateur h3 a { color: inherit; text-decoration: none; }
.ernest-v10 .ernest-fondateur h3 a:hover, .ernest-v10 .ernest-fondateur h3 a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.ernest-v10 .ernest-fondateur p { margin-top: var(--r-1); }
.ernest-v10 .ernest-fondateur + .ernest-qui-fait-quoi { margin-top: var(--r-3) !important; opacity: 0.85; }
.ernest-v10 .ernest-qui-fait-quoi + .wp-block-buttons { margin-top: var(--r-2) !important; }
/* Appel à rendez-vous : titre → texte → bouton. */
.ernest-v10 main > .wp-block-group.alignfull:last-child h2 + p { margin-top: var(--r-2); }
/* Colonnes pleine largeur : sur mobile, mêmes marges que le reste de la page. */
@media (max-width: 781px) {
	.ernest-v10 .wp-block-columns.alignfull > .wp-block-column { padding-left: clamp(1rem, 4vw, 2.5rem) !important; padding-right: clamp(1rem, 4vw, 2.5rem) !important; }
	.ernest-v10 main h2 + .wp-block-columns,
	.ernest-v10 main h2 + .wp-block-group { margin-top: var(--r-3) !important; }
}
