/*
 * Elevation Cie — feuille de style du thème
 *
 * Chargée sur le site (wp_enqueue_style) et dans l'éditeur (add_editor_style).
 * Couleurs, polices, tailles et espacements : variables générées par theme.json
 * (--wp--preset--color--<slug>, --wp--preset--spacing--<slug>, etc.).
 *
 * Attention : WordPress convertit les slugs de taille « 2xl » et « 3xl » en
 * --wp--preset--font-size--2-xl et --wp--preset--font-size--3-xl
 * (classes has-2-xl-font-size et has-3-xl-font-size).
 *
 * Contextes sombres : .has-encre-background-color,
 * .has-petrole-fonce-background-color, .has-petrole-background-color et
 * .is-style-carte-encre. Contextes clairs imbriqués : .is-style-carte,
 * .has-blanc-background-color, .has-creme-background-color,
 * .has-petrole-clair-background-color.
 *
 * Sommaire
 *   1. Base
 *   2. Sections
 *   3. Liens et focus
 *   4. Contextes sombres
 *   5. Styles de blocs (bouton, groupe, paragraphe, liste, détails)
 *   6. Navigation
 *   6 bis. En-tête, logo, pied de page
 *   7. Démonstrateur (.ec-demo)
 *   8. Utilitaires
 *   9. Responsive
 *  10. Accessibilité : mouvement réduit, couleurs forcées
 */

/* -------------------------------------------------------------------------
 * 1. Base
 * ---------------------------------------------------------------------- */

/* scroll-padding-top : les ancres (#refonte…) ne passent pas sous l'en-tête collant. */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: 6rem;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

:where(h1, h2, h3, h4, h5, h6) {
	text-wrap: balance;
}

:where(p, li, dd, figcaption) {
	text-wrap: pretty;
}

::selection {
	background-color: var(--wp--preset--color--petrole-clair);
	color: var(--wp--preset--color--petrole-fonce);
}

/* Exposants (« 1er ») sans écarter les lignes. */
sup {
	font-size: 0.7em;
	line-height: 0;
}

/* Mot coloré (format « Surligner » sans fond) : jamais le jaune par défaut du navigateur. */
mark.has-inline-color:not([style*="background-color"]) {
	background-color: transparent;
}

/* Mot mis en valeur dans un titre (format « Surligner » avec un fond). */
:where(h1, h2, h3) mark.has-inline-color[style*="background-color"]:not([style*="rgba(0, 0, 0, 0)"]) {
	padding: 0 0.22em 0.04em;
	border-radius: 0.2em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* En-tête, contenu et pied de page se touchent : chaque section gère ses marges. */
.wp-site-blocks > *,
.is-root-container > :is(header, main, footer) {
	margin-block-start: 0;
}

/* -------------------------------------------------------------------------
 * 2. Sections
 * ---------------------------------------------------------------------- */

.ec-section {
	position: relative;
	overflow-x: clip;
	scroll-margin-top: var(--wp--preset--spacing--40);
}

/* Valeurs par défaut : les attributs du bloc (styles en ligne) priment. */
:where(.ec-section) {
	padding-top: var(--wp--preset--spacing--80);
	padding-bottom: var(--wp--preset--spacing--80);
}

/* Pas de bande blanche entre deux sections pleine largeur. */
.ec-section + .ec-section,
.wp-block-post-content > .ec-section,
.is-root-container > .ec-section {
	margin-block-start: 0;
	margin-block-end: 0;
}

/*
 * Accueil : deux sections de même fond qui se suivent (témoignages puis
 * « Ce qui est inclus », suivi puis « Qui suis-je ») restent distinctes.
 */
.ec-main-accueil > .ec-section.has-creme-background-color + .ec-section.has-creme-background-color,
.ec-main-accueil > .ec-section.has-blanc-background-color + .ec-section.has-blanc-background-color {
	border-top: 1px solid var(--wp--preset--color--bordure);
}

/* -------------------------------------------------------------------------
 * 3. Liens et focus
 * ---------------------------------------------------------------------- */

/*
 * Liens dans le texte courant : soulignés en permanence. Le pétrole et le
 * texte n'ont que 1,9:1 de contraste entre eux ; sans soulignement, un lien
 * ne se distinguerait que par sa couleur (WCAG 1.4.1). Les liens isolés
 * (navigation, boutons) restent soulignés au survol seulement.
 */
:root :where(.ec-section, .wp-block-post-content, .wp-block-details) :where(p, li, dd, td, figcaption) a:where(:not(.wp-element-button, .wp-block-navigation-item__content)) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--petrole);
	outline-offset: 2px;
}

/* Boutons : anneau pétrole lumineux + halo pétrole, lisible sur fond clair comme sombre. */
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--petrole-lumineux);
	outline-offset: 2px;
	box-shadow: 0 0 0 6px var(--wp--preset--color--petrole);
}

/* -------------------------------------------------------------------------
 * 4. Contextes sombres
 * ---------------------------------------------------------------------- */

/* Filet de sécurité : texte clair sur fond sombre si aucune couleur n'est choisie. */
:root :where(.has-encre-background-color, .has-petrole-fonce-background-color, .has-petrole-background-color):where(:not(.has-text-color)) {
	color: var(--wp--preset--color--sur-encre);
}

/*
 * Liens sur fond sombre. Spécificité 0-1-0 : une couleur de lien choisie
 * dans l'éditeur (0-1-1) reste prioritaire.
 */
:root :where(:is(.has-encre-background-color, .has-petrole-fonce-background-color, .has-petrole-background-color, .is-style-carte-encre) a:not(.wp-element-button)) {
	color: var(--wp--preset--color--sur-encre);
}

:root :where(:is(.has-encre-background-color, .has-petrole-fonce-background-color, .has-petrole-background-color, .is-style-carte-encre) a:not(.wp-element-button):hover) {
	color: var(--wp--preset--color--blanc);
}

/* Carte claire posée sur un fond sombre : retour aux couleurs claires. */
:root :where(:is(.has-encre-background-color, .has-petrole-fonce-background-color, .has-petrole-background-color, .is-style-carte-encre) :is(.is-style-carte, .has-blanc-background-color, .has-creme-background-color, .has-petrole-clair-background-color) a:not(.wp-element-button)) {
	color: var(--wp--preset--color--petrole);
}

:root :where(:is(.has-encre-background-color, .has-petrole-fonce-background-color, .has-petrole-background-color, .is-style-carte-encre) :is(.is-style-carte, .has-blanc-background-color, .has-creme-background-color, .has-petrole-clair-background-color) a:not(.wp-element-button):hover) {
	color: var(--wp--preset--color--petrole-fonce);
}

/* Focus sur fond sombre. */
:where(.has-encre-background-color, .has-petrole-fonce-background-color, .has-petrole-background-color, .is-style-carte-encre) :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline-color: var(--wp--preset--color--petrole-lumineux);
}

/* -------------------------------------------------------------------------
 * 5. Styles de blocs
 * ---------------------------------------------------------------------- */

/* 5.1 Bouton : contour et contour clair ----------------------------------- */

.wp-block-button.is-style-contour > .wp-block-button__link,
.wp-block-button.is-style-contour-clair > .wp-block-button__link {
	background-color: transparent;
	border: 1px solid currentColor;
	/* Même hauteur que le bouton plein, bordure comprise. */
	padding: calc(0.875rem - 1px) calc(1.375rem - 1px);
}

.wp-block-button.is-style-contour > .wp-block-button__link {
	color: var(--wp--preset--color--texte);
}

.wp-block-button.is-style-contour-clair > .wp-block-button__link {
	color: var(--wp--preset--color--sur-encre);
}

.wp-block-button.is-style-contour > .wp-block-button__link:hover,
.wp-block-button.is-style-contour-clair > .wp-block-button__link:hover {
	background-color: color-mix(in srgb, currentColor 10%, transparent);
}

/* 5.2 Groupe : carte et carte encre -------------------------------------- */

.wp-block-group.is-style-carte {
	background-color: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--texte);
	border: 1px solid var(--wp--preset--color--bordure);
	border-radius: var(--wp--custom--rayon--carte, 16px);
	padding: var(--wp--preset--spacing--50);
}

.wp-block-group.is-style-carte-encre {
	background-color: var(--wp--preset--color--encre);
	color: var(--wp--preset--color--sur-encre);
	border-radius: var(--wp--custom--rayon--carte, 16px);
	padding: var(--wp--preset--spacing--50);
}

/* Cartes de même hauteur dans une rangée de colonnes. */
.wp-block-column > .wp-block-group.is-style-carte:only-child,
.wp-block-column > .wp-block-group.is-style-carte-encre:only-child {
	box-sizing: border-box;
	height: 100%;
}

/* 5.3 Paragraphe : surtitre ------------------------------------------------ */

.is-style-surtitre {
	font-family: var(--wp--preset--font-family--inter);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--wp--preset--color--petrole);
}

:is(.has-encre-background-color, .has-petrole-fonce-background-color, .is-style-carte-encre) .is-style-surtitre {
	color: var(--wp--preset--color--petrole-lumineux);
}

/* Sur fond pétrole, le pétrole lumineux n'atteint que 3,8:1 : pétrole clair (7,7:1). */
.has-petrole-background-color .is-style-surtitre {
	color: var(--wp--preset--color--petrole-clair);
}

:is(.has-encre-background-color, .has-petrole-fonce-background-color, .has-petrole-background-color, .is-style-carte-encre) :is(.is-style-carte, .has-blanc-background-color, .has-creme-background-color, .has-petrole-clair-background-color) .is-style-surtitre {
	color: var(--wp--preset--color--petrole);
}

/* 5.4 Liste : coches et croix ---------------------------------------------- */

:is(ul, ol).is-style-coches,
:is(ul, ol).is-style-croix {
	list-style: none;
	padding-left: 0;
}

:is(ul, ol).is-style-coches > li,
:is(ul, ol).is-style-croix > li {
	position: relative;
	padding-left: 1.875em;
}

:is(ul, ol).is-style-coches > li + li,
:is(ul, ol).is-style-croix > li + li {
	margin-top: 0.75rem;
}

:is(ul, ol).is-style-coches > li::before,
:is(ul, ol).is-style-croix > li::before {
	content: "";
	position: absolute;
	left: 0;
	/* Centré sur la première ligne (interligne 1,6). */
	top: 0.175em;
	top: calc((1lh - 1.25em) / 2);
	width: 1.25em;
	height: 1.25em;
	-webkit-mask: var(--ec-icone) center / contain no-repeat;
	mask: var(--ec-icone) center / contain no-repeat;
}

:is(ul, ol).is-style-coches > li::before {
	--ec-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5L8.2 14L15.5 6.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-color: var(--wp--preset--color--petrole);
}

:is(ul, ol).is-style-croix > li::before {
	--ec-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000'%3E%3Ccircle cx='10' cy='10' r='8.5' stroke-width='1.3'/%3E%3Cpath d='M7.2 7.2L12.8 12.8M12.8 7.2L7.2 12.8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
	background-color: var(--wp--preset--color--texte-doux);
}

:is(.has-encre-background-color, .has-petrole-fonce-background-color, .is-style-carte-encre) :is(ul, ol).is-style-coches > li::before {
	background-color: var(--wp--preset--color--petrole-lumineux);
}

.has-petrole-background-color :is(ul, ol).is-style-coches > li::before {
	background-color: var(--wp--preset--color--petrole-clair);
}

:is(.has-encre-background-color, .has-petrole-fonce-background-color, .has-petrole-background-color, .is-style-carte-encre) :is(ul, ol).is-style-croix > li::before {
	background-color: var(--wp--preset--color--sur-encre-doux);
}

:is(.has-encre-background-color, .has-petrole-fonce-background-color, .has-petrole-background-color, .is-style-carte-encre) :is(.is-style-carte, .has-blanc-background-color, .has-creme-background-color, .has-petrole-clair-background-color) :is(ul, ol).is-style-coches > li::before {
	background-color: var(--wp--preset--color--petrole);
}

:is(.has-encre-background-color, .has-petrole-fonce-background-color, .has-petrole-background-color, .is-style-carte-encre) :is(.is-style-carte, .has-blanc-background-color, .has-creme-background-color, .has-petrole-clair-background-color) :is(ul, ol).is-style-croix > li::before {
	background-color: var(--wp--preset--color--texte-doux);
}

/* 5.5 Détails : FAQ (accordéon) --------------------------------------------- */

.wp-block-details.is-style-faq {
	border-bottom: 1px solid var(--wp--preset--color--bordure);
	padding: 0;
}

.wp-block-details.is-style-faq > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--40);
	min-height: 44px;
	padding-block: 1.375rem;
	list-style: none;
	cursor: pointer;
	font-family: var(--wp--preset--font-family--inter-tight);
	font-size: var(--wp--preset--font-size--l);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.35;
}

.wp-block-details.is-style-faq > summary::-webkit-details-marker {
	display: none;
}

.wp-block-details.is-style-faq > summary::marker {
	content: "";
}

/* Icône + / − : deux traits dessinés en dégradé sur une pastille pétrole clair. */
.wp-block-details.is-style-faq > summary::after {
	content: "";
	flex: none;
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
	background:
		linear-gradient(var(--wp--preset--color--petrole), var(--wp--preset--color--petrole)) center / 0.875rem 2px no-repeat,
		linear-gradient(var(--wp--preset--color--petrole), var(--wp--preset--color--petrole)) center / 2px 0.875rem no-repeat,
		var(--wp--preset--color--petrole-clair);
	transition: background-size 0.2s ease;
}

.wp-block-details.is-style-faq[open] > summary::after {
	background-size: 0.875rem 2px, 2px 0, auto;
}

.wp-block-details.is-style-faq > summary:focus-visible {
	outline-offset: 4px;
	border-radius: 4px;
}

.wp-block-details.is-style-faq > :not(summary) {
	padding-right: 3.5rem;
	color: var(--wp--preset--color--texte-doux);
}

.wp-block-details.is-style-faq > summary + * {
	margin-top: 0;
}

.wp-block-details.is-style-faq[open] {
	padding-bottom: 1.625rem;
}

/* Dans une carte, pas de filet sous la dernière question. */
.is-style-carte > .wp-block-details.is-style-faq:last-child {
	border-bottom: 0;
}

/* FAQ sur fond sombre. */
:is(.has-encre-background-color, .has-petrole-fonce-background-color, .has-petrole-background-color, .is-style-carte-encre) .wp-block-details.is-style-faq {
	border-bottom-color: rgba(243, 244, 245, 0.16);
}

:is(.has-encre-background-color, .has-petrole-fonce-background-color, .has-petrole-background-color, .is-style-carte-encre) .wp-block-details.is-style-faq > :not(summary) {
	color: var(--wp--preset--color--sur-encre-doux);
}

/* -------------------------------------------------------------------------
 * 6. Navigation
 * ---------------------------------------------------------------------- */

/* Zones cliquables de 44 px de haut (interligne 1,35 × 15 px + 2 × 12 px). */
.wp-block-navigation .wp-block-navigation-item__content {
	padding-block: 0.75rem;
}

/*
 * Sous-menu « Mes offres » en panneau. Exclu du menu mobile ouvert
 * (.is-menu-open), où WordPress affiche les sous-menus à plat.
 */
.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container:not(.is-menu-open *) {
	min-width: 17rem;
	padding: 0.5rem;
	background-color: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--texte);
	border: 1px solid var(--wp--preset--color--bordure);
	border-radius: var(--wp--custom--rayon--carte, 16px);
	box-shadow: 0 18px 40px rgba(17, 20, 24, 0.12);
}

.wp-block-navigation .wp-block-navigation__submenu-container:not(.is-menu-open *) .wp-block-navigation-item__content {
	padding: 0.75rem 0.875rem;
	border-radius: 10px;
}

.wp-block-navigation .wp-block-navigation__submenu-container:not(.is-menu-open *) .wp-block-navigation-item__content:hover {
	background-color: var(--wp--preset--color--creme);
	text-decoration: none;
}

/* -------------------------------------------------------------------------
 * 6 bis. En-tête, logo, pied de page
 * ---------------------------------------------------------------------- */

/* En-tête collant au défilement (décalage des ancres : scroll-padding-top, section 1). */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
}

/* Sur mobile, la barre d'administration défile avec la page. */
@media (max-width: 600px) {
	.wp-site-blocks > header.wp-block-template-part {
		top: 0;
	}
}

/* -------------------------------------------------------------------------
 * 6 ter. Bandeau « Prix de lancement » (functions.php, section 5)
 * Imprimé avant l'en-tête, il défile avec la page : seul l'en-tête reste
 * collant. Absent du HTML à partir du 1er janvier 2027. Fond et texte :
 * classes de contexte sombre (section 4). Contrastes sur pétrole foncé :
 * sur-encre 10,7:1, blanc 11,8:1. Aucune animation, pas de bouton de
 * fermeture (ni script, ni stockage).
 * ---------------------------------------------------------------------- */

.ec-bandeau-lancement {
	padding: 0.5rem var(--wp--preset--spacing--30);
	font-size: 0.875rem;
	line-height: 1.45;
	text-align: center;
}

.ec-bandeau-lancement__texte {
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin: 0 auto;
}

/* Point pétrole lumineux : même repère que la pastille du hero. */
.ec-bandeau-lancement__texte::before {
	content: "";
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	margin-inline-end: 0.5rem;
	border-radius: 50%;
	background-color: var(--wp--preset--color--petrole-lumineux);
	vertical-align: 0.05em;
}

.ec-bandeau-lancement strong {
	color: var(--wp--preset--color--blanc);
	font-weight: 600;
}

.ec-bandeau-lancement .ec-bandeau-lancement__lien {
	display: inline-block;
	margin-inline-start: 0.5rem;
	padding-block: 0.25rem;
	color: var(--wp--preset--color--blanc);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	white-space: nowrap;
}

.ec-bandeau-lancement .ec-bandeau-lancement__lien:hover {
	color: var(--wp--preset--color--petrole-clair);
	text-decoration-thickness: 2px;
}

.ec-bandeau-lancement .ec-bandeau-lancement__lien:focus-visible {
	outline: 2px solid var(--wp--preset--color--petrole-lumineux);
	outline-offset: 2px;
}

@media (max-width: 599px) {
	.ec-bandeau-lancement {
		font-size: 0.8125rem;
	}

	/* Accueil : une seule ligne. Le titre du hero dit déjà « site pro, textes
	   compris » et le prix ; le lien double le bouton du hero puis la barre du
	   bas. En décembre : « Plus que N jours à 490 € HT, puis 590 € HT. » */
	.home .ec-bandeau-lancement {
		padding-block: 0.375rem;
		font-size: 0.75rem;
	}

	.home .ec-bandeau-lancement__long,
	.home .ec-bandeau-lancement .ec-bandeau-lancement__lien,
	.home .ec-bandeau-lancement--decompte .ec-bandeau-lancement__date {
		display: none;
	}
}

@media print {
	.ec-bandeau-lancement {
		display: none;
	}
}

/*
 * Logo 3b : symbole (calotte encre, corps pétrole) + « Elevation Cie ».
 * Un seul lien vers l'accueil : le symbole est décoratif, dessiné ici.
 * « Cie » passe en graisse normale via functions.php (.ec-marque__cie).
 */
.ec-marque {
	margin: 0;
}

.ec-marque a {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 44px;
	text-decoration: none;
}

.ec-marque a::before {
	content: "";
	flex: none;
	width: 1.75rem;
	height: 1.75rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 92'%3E%3Cdefs%3E%3CclipPath id='c'%3E%3Ccircle cx='46' cy='46' r='46'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23c)'%3E%3Crect width='92' height='27' fill='%23111418'/%3E%3Crect y='34' width='92' height='58' fill='%231F4E5F'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

/* Version monochrome crème sur fond sombre (pied de page). */
:is(.has-encre-background-color, .has-petrole-fonce-background-color, .has-petrole-background-color, .is-style-carte-encre) .ec-marque a::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 92'%3E%3Cdefs%3E%3CclipPath id='c'%3E%3Ccircle cx='46' cy='46' r='46'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg clip-path='url(%23c)'%3E%3Crect width='92' height='27' fill='%23F5F2EC'/%3E%3Crect y='34' width='92' height='58' fill='%23F5F2EC'/%3E%3C/g%3E%3C/svg%3E");
}

.ec-marque__cie {
	font-weight: 400;
}

/*
 * Sous-menu « Mes offres » : panneau de 340 px et lignes d'aide
 * (WordPress masque les descriptions des liens par défaut).
 */
/* Même spécificité que la règle générale du panneau (section 6), déclarée après. */
.wp-block-navigation.ec-header__nav:not(.has-background) .wp-block-navigation__submenu-container:not(.is-menu-open *) {
	min-width: 21.25rem;
}

/* Libellé au-dessus de sa ligne d'aide (WordPress aligne le lien en ligne, flex). */
.ec-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	flex-direction: column;
	align-items: flex-start;
	gap: 0.125rem;
}

.ec-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__label,
.ec-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__description {
	display: block;
}

.ec-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__label {
	font-weight: 600;
}

.ec-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__description {
	margin-top: 0.125rem;
	font-size: 0.8125rem;
	font-weight: 400;
	line-height: 1.4;
	color: var(--wp--preset--color--texte-doux);
}

/* Entre 600 et 900 px, menu resserré pour tenir sur la ligne du logo. */
@media (min-width: 600px) and (max-width: 900px) {
	.ec-header .ec-header__nav {
		gap: var(--wp--preset--spacing--20);
	}
}

/* Pied de page : titres de colonnes en sur-encre (maquette), liens de 44 px de haut. */
.ec-footer .is-style-surtitre {
	color: var(--wp--preset--color--sur-encre);
}

.ec-footer .ec-footer__nav {
	gap: 0;
}

.ec-footer .wp-block-navigation .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding-block: 0;
}

.ec-footer .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--sur-encre);
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.ec-footer__legal a {
	display: inline-block;
	padding-block: 0.625rem;
}

/* Réseaux sociaux : icônes rondes de 44 px (nom accessible sur le lien). */
.ec-footer .ec-footer__reseaux {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	margin-bottom: 0;
	padding: 0;
	list-style: none;
}

.ec-footer .ec-footer__reseaux a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--wp--preset--color--petrole-fonce);
	border-radius: 50%;
	color: var(--wp--preset--color--sur-encre-doux);
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.ec-footer .ec-footer__reseaux a:hover,
.ec-footer .ec-footer__reseaux a:focus-visible {
	border-color: var(--wp--preset--color--sur-encre-doux);
	background-color: rgba(243, 244, 245, 0.08);
	color: var(--wp--preset--color--sur-encre);
}

.ec-footer .ec-footer__reseaux svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
	.ec-footer .ec-footer__reseaux a {
		transition: none;
	}
}

/* Mention HT et TVA : en petit, sous les liens légaux. */
.ec-footer__legal .ec-footer__mention {
	font-size: 0.75rem;
	line-height: 1.5;
}

/* -------------------------------------------------------------------------
 * 7. Démonstrateur (.ec-demo)
 * Conteneur générique ; les styles détaillés (dont box-sizing) sont fournis
 * avec la composition, dans son bloc HTML.
 * ---------------------------------------------------------------------- */

.ec-demo {
	position: relative;
	max-width: 100%;
	margin: 0;
}

.ec-demo svg {
	max-width: 100%;
	height: auto;
}

/*
 * Espace réservé au démonstrateur du hero (au-dessus de la ligne de
 * flottaison) : aucun décalage de mise en page pendant le chargement.
 * Sur ordinateur, sa hauteur naturelle (dimensions fixes en px) est
 * d'environ 27 rem ; la réserve de 24 rem reste en dessous pour ne jamais
 * ajouter de vide. Sur mobile, la hauteur dépend de la largeur : pas de réserve.
 */
@media (min-width: 782px) {
	.ec-hero .ec-demo {
		min-height: 24rem;
	}
}

/* -------------------------------------------------------------------------
 * 7 bis. Formulaires (contact et commande : inc/formulaires.php)
 * ---------------------------------------------------------------------- */

.ec-formulaire {
	display: grid;
	gap: 1.25rem;
}

.ec-formulaire__champ {
	display: grid;
	gap: 0.375rem;
	margin: 0;
	padding: 0;
	border: 0;
}

.ec-formulaire__champ > label,
.ec-formulaire__champ > legend {
	padding: 0;
	color: var(--wp--preset--color--texte);
	font-weight: 600;
	line-height: 1.4;
}

.ec-formulaire__champ > legend {
	margin-bottom: 0.5rem;
}

.ec-formulaire__requis {
	color: var(--wp--preset--color--petrole);
}

.ec-formulaire input[type="text"],
.ec-formulaire input[type="email"],
.ec-formulaire input[type="tel"],
.ec-formulaire select,
.ec-formulaire textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 0.75rem 0.875rem;
	border: 1px solid var(--wp--preset--color--texte-doux);
	border-radius: 10px;
	background-color: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--texte);
	font: inherit;
	line-height: 1.5;
}

.ec-formulaire textarea {
	min-height: 8rem;
	resize: vertical;
}

.ec-formulaire input::placeholder,
.ec-formulaire textarea::placeholder {
	color: var(--wp--preset--color--texte-doux);
	opacity: 1;
}

.ec-formulaire input:focus-visible,
.ec-formulaire select:focus-visible,
.ec-formulaire textarea:focus-visible {
	outline: 2px solid var(--wp--preset--color--petrole);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--petrole);
}

/* Choix en pastilles (boutons radio). */
.ec-formulaire__pastilles {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.ec-formulaire__pastille {
	position: relative;
	display: inline-flex;
	cursor: pointer;
}

/* Bouton radio natif visible (repérable, et dessiné par le système en contraste forcé). */
.ec-formulaire__pastille input {
	position: absolute;
	top: 50%;
	left: 0.875rem;
	width: 1.125rem;
	height: 1.125rem;
	margin: 0;
	z-index: 1;
	transform: translateY(-50%);
	accent-color: var(--wp--preset--color--petrole);
	cursor: pointer;
}

.ec-formulaire__pastille span {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0.5rem 1rem 0.5rem 2.5rem;
	border: 1px solid var(--wp--preset--color--bordure);
	border-radius: 999px;
	background-color: var(--wp--preset--color--blanc);
	line-height: 1.3;
}

.ec-formulaire__pastille input:checked + span {
	border-color: var(--wp--preset--color--petrole);
	background-color: var(--wp--preset--color--petrole-clair);
	color: var(--wp--preset--color--petrole-fonce);
	font-weight: 600;
}

.ec-formulaire__pastille input:focus-visible + span {
	outline: 2px solid var(--wp--preset--color--petrole);
	outline-offset: 2px;
}

/* Cases à cocher (commande). */
.ec-formulaire__case {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.625rem;
	align-items: start;
	cursor: pointer;
	font-weight: 400;
}

.ec-formulaire__case input {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0.15rem 0 0;
	accent-color: var(--wp--preset--color--petrole);
}

.ec-formulaire__aide,
.ec-formulaire__rgpd,
.ec-formulaire__micro {
	margin: 0;
	color: var(--wp--preset--color--texte-doux);
	font-size: var(--wp--preset--font-size--s);
	line-height: 1.5;
}

.ec-formulaire__erreur {
	margin: 0;
	color: #A3261B;
	font-size: var(--wp--preset--font-size--s);
	font-weight: 600;
	line-height: 1.5;
}

.ec-formulaire__champ.a-erreur input,
.ec-formulaire__champ.a-erreur select,
.ec-formulaire__champ.a-erreur textarea {
	border-color: #A3261B;
}

.ec-formulaire__alerte {
	padding: 1rem 1.25rem;
	border-left: 4px solid #A3261B;
	border-radius: 8px;
	background-color: #FBEDEB;
}

.ec-formulaire__alerte p {
	margin: 0;
}

.ec-formulaire__bouton {
	margin: 0.25rem 0 0;
}

.ec-formulaire__bouton .wp-element-button {
	border: 0;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
}

/* Mention « prix de lancement » vide après l'échéance (jeton %%mention_lancement%%). */
.ec-mention-lancement:empty {
	display: none;
}

/* Champ piège : hors écran, jamais atteint au clavier. */
.ec-formulaire__piege {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* -------------------------------------------------------------------------
 * 7 ter. Bouton WhatsApp et barre « Commander » mobile (functions.php, section 7)
 * ---------------------------------------------------------------------- */

.ec-whatsapp {
	position: fixed;
	right: max(1rem, env(safe-area-inset-right));
	bottom: max(1rem, env(safe-area-inset-bottom));
	z-index: 40;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	background-color: #25D366;
	color: #FFFFFF;
	box-shadow: 0 6px 18px rgba(17, 20, 24, 0.22);
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ec-whatsapp:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(17, 20, 24, 0.28);
	color: #FFFFFF;
}

.ec-whatsapp:focus-visible {
	outline: 3px solid var(--wp--preset--color--petrole);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.ec-whatsapp {
		transition: none;
	}

	.ec-whatsapp:hover {
		transform: none;
	}
}

@media print {
	.ec-whatsapp {
		display: none;
	}
}

/*
 * Barre « Commander » collée en bas de l'écran, sur mobile : bouton de
 * commande et WhatsApp, toujours sous le pouce. Elle remplace la bulle ronde
 * (qui ne masque plus de texte) ; sur ordinateur, la bulle reste seule. Le
 * body des pages qui l'affichent (classe ec-avec-barre-mobile, functions.php)
 * réserve sa hauteur : la fin de la page n'est jamais masquée. Sans script :
 * elle s'efface tant qu'un champ de saisie a le focus (clavier ouvert).
 * Hauteur : 0,5 rem + 48 px + 0,5 rem + 1 px de filet, soit 65 px (< 4,5 rem).
 */
.ec-barre-mobile {
	display: none;
}

@media (max-width: 781px) {
	body.ec-avec-barre-mobile {
		padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
	}

	/* Un champ atteint au clavier (Tab) ne s'arrête pas sous la barre. */
	html:has(> body.ec-avec-barre-mobile) {
		scroll-padding-bottom: calc(5rem + env(safe-area-inset-bottom));
	}

	.ec-avec-barre-mobile .ec-whatsapp {
		display: none;
	}

	.ec-barre-mobile {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 40;
		display: flex;
		align-items: center;
		gap: 0.5rem;
		padding: 0.5rem max(1rem, env(safe-area-inset-right)) calc(0.5rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
		border-top: 1px solid var(--wp--preset--color--bordure);
		background-color: var(--wp--preset--color--blanc);
		box-shadow: 0 -6px 18px rgba(17, 20, 24, 0.08);
		transition: transform 0.2s ease, visibility 0s;
	}

	/* Accueil : effacée tant que le bouton « Commander » du hero est à l'écran
	   (script en fin de page, functions.php) : un seul appel à commander visible. */
	.ec-barre-mobile.ec-barre-mobile--masquee {
		transform: translateY(110%);
		visibility: hidden;
		transition: transform 0.2s ease, visibility 0s linear 0.2s;
	}

	/* Clavier ouvert : la barre s'efface tant qu'un champ de saisie a le focus. */
	body:has(:is(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="reset"], [type="hidden"], [type="range"]), textarea, select):focus) .ec-barre-mobile {
		transform: translateY(110%);
	}

	.ec-barre-mobile .ec-barre-mobile__cta {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		min-width: 0;
		min-height: 48px;
		padding: 0.375rem 1rem;
		box-sizing: border-box;
		border-radius: 999px;
		background-color: var(--wp--preset--color--petrole);
		color: var(--wp--preset--color--blanc);
		font-size: 0.9375rem;
		font-weight: 600;
		line-height: 1.25;
		text-align: center;
		text-decoration: none;
	}

	.ec-barre-mobile .ec-barre-mobile__cta:hover {
		background-color: var(--wp--preset--color--petrole-fonce);
		color: var(--wp--preset--color--blanc);
		text-decoration: none;
	}

	.ec-barre-mobile .ec-barre-mobile__wa {
		flex: none;
		display: grid;
		place-items: center;
		width: 48px;
		height: 48px;
		border-radius: 50%;
		background-color: #25D366;
		color: #FFFFFF;
		text-decoration: none;
	}

	.ec-barre-mobile .ec-barre-mobile__wa:hover {
		color: #FFFFFF;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ec-barre-mobile {
		transition: none;
	}
}

@media (forced-colors: active) {
	.ec-barre-mobile {
		border-top-color: CanvasText;
	}

	.ec-barre-mobile .ec-barre-mobile__cta,
	.ec-barre-mobile .ec-barre-mobile__wa {
		border: 1px solid LinkText;
	}
}

@media print {
	.ec-barre-mobile {
		display: none !important;
	}

	body.ec-avec-barre-mobile {
		padding-bottom: 0;
	}
}

/* -------------------------------------------------------------------------
 * 8. Utilitaires
 * ---------------------------------------------------------------------- */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	-webkit-clip-path: inset(50%);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--wp--preset--color--blanc);
	clip: auto !important;
	-webkit-clip-path: none;
	clip-path: none;
	color: var(--wp--preset--color--texte);
	display: block;
	height: auto;
	left: 8px;
	padding: 12px 20px;
	top: 8px;
	width: auto;
	z-index: 100000;
}

/* -------------------------------------------------------------------------
 * 9. Responsive
 * ---------------------------------------------------------------------- */

/* Tablette : les grilles de 4 éléments ou plus passent sur 2 colonnes. */
@media (min-width: 782px) and (max-width: 1080px) {
	.wp-block-group.is-layout-grid:has(> :nth-child(4)) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Mobile : toutes les grilles passent sur 1 colonne (les colonnes s'empilent déjà). */
@media (max-width: 781px) {
	.wp-block-group.is-layout-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.wp-block-group.is-layout-grid > * {
		grid-column: auto;
	}

	.wp-block-details.is-style-faq > :not(summary) {
		padding-right: 0;
	}

	.wp-block-group.is-style-carte,
	.wp-block-group.is-style-carte-encre {
		padding: var(--wp--preset--spacing--40);
	}
}

/* -------------------------------------------------------------------------
 * 10. Accessibilité : mouvement réduit, couleurs forcées
 * ---------------------------------------------------------------------- */

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

@media (forced-colors: active) {
	:is(ul, ol).is-style-coches > li::before,
	:is(ul, ol).is-style-croix > li::before {
		forced-color-adjust: none;
		background-color: CanvasText;
	}

	.wp-block-details.is-style-faq > summary::after {
		content: "+";
		display: inline-flex;
		align-items: center;
		justify-content: center;
		background: none;
		border: 1px solid CanvasText;
	}

	.wp-block-details.is-style-faq[open] > summary::after {
		content: "\2212";
	}

	.ec-bandeau-lancement {
		border-bottom: 1px solid CanvasText;
	}

	.ec-bandeau-lancement__texte::before {
		forced-color-adjust: none;
		background-color: CanvasText;
	}
}

/* Référencement local, « Inclus chaque mois » : 4 cartes de même hauteur,
 * ligne de réassurance alignée en bas de chaque carte, 2 × 2 jusqu'à 1 240 px. */
.ec-seo-inclus-grille > .is-style-carte {
	display: flex;
	flex-direction: column;
}

.ec-seo-inclus-grille > .is-style-carte > :nth-last-child(2) {
	margin-bottom: var(--wp--preset--spacing--30);
}

.ec-seo-inclus-grille .ec-seo-inclus-pied {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--bordure);
	color: var(--wp--preset--color--petrole);
	font-size: var(--wp--preset--font-size--s);
	font-weight: 600;
}

@media (min-width: 782px) and (max-width: 1240px) {
	.wp-block-group.ec-seo-inclus-grille.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Côte à côte, les filets des pieds restent alignés (pied d'une ou deux lignes). */
@media (min-width: 782px) {
	.ec-seo-inclus-grille .ec-seo-inclus-pied {
		min-height: 3.2em;
		min-height: 2lh;
	}
}

.ec-seo-inclus-fin a {
	font-weight: 600;
	white-space: nowrap;
}

/* Captures d'écran dans les pages (ex. preuve SST86 de la page Référencement local). */
.wp-block-image.ec-seo-capture img {
	border: 1px solid var(--wp--preset--color--bordure);
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(17, 20, 24, 0.04), 0 12px 32px rgba(17, 20, 24, 0.08);
}

.wp-block-image.ec-seo-capture figcaption {
	margin-top: 0.75rem;
	color: var(--wp--preset--color--texte-doux);
	font-size: var(--wp--preset--font-size--s);
	text-align: left;
}

/* Tableau des positions Google (preuve SST86 de la page Référencement local). */
.wp-block-table.ec-seo-positions {
	margin-block: var(--wp--preset--spacing--40) 0;
	overflow-x: auto;
}

.wp-block-table.ec-seo-positions table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--s);
	line-height: 1.45;
}

.wp-block-table.ec-seo-positions th,
.wp-block-table.ec-seo-positions td {
	padding: 0.625rem 0.75rem;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--bordure);
	text-align: left;
	vertical-align: top;
}

.wp-block-table.ec-seo-positions thead th {
	border-bottom: 2px solid var(--wp--preset--color--petrole);
	background-color: var(--wp--preset--color--creme);
	color: var(--wp--preset--color--texte);
	font-weight: 600;
}

.wp-block-table.ec-seo-positions td:nth-child(2) {
	white-space: nowrap;
}

.wp-block-table.ec-seo-positions td:nth-child(3) {
	color: var(--wp--preset--color--petrole);
	font-weight: 600;
}

.wp-block-table.ec-seo-positions figcaption {
	margin-top: 0.75rem;
	color: var(--wp--preset--color--texte-doux);
	font-size: var(--wp--preset--font-size--s);
	text-align: left;
}

/* -------------------------------------------------------------------------
 * 7 quater. Page de commande (commander-pack-essentiel)
 * Carte de commande, formulaire court, réassurance. Le bouton vient du code
 * court [elevation_cie_bouton_commande] (functions.php, section 11).
 * ---------------------------------------------------------------------- */

/* Code postal et ville côte à côte à partir de 360 px. */
.ec-formulaire__ligne {
	display: grid;
	gap: 1.25rem;
}

@media (min-width: 360px) {
	.ec-formulaire__ligne {
		grid-template-columns: minmax(6.5rem, 1fr) 2fr;
		align-items: start;
	}
}

/* Téléphone et précision, repliés et facultatifs. */
.ec-formulaire__plus > summary {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	min-height: 44px;
	color: var(--wp--preset--color--petrole);
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.ec-formulaire__plus > summary::-webkit-details-marker {
	display: none;
}

.ec-formulaire__plus > summary::before {
	content: "+";
	display: inline-grid;
	place-items: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 999px;
	background-color: var(--wp--preset--color--petrole-clair);
	color: var(--wp--preset--color--petrole-fonce);
	font-weight: 700;
	line-height: 1;
}

.ec-formulaire__plus[open] > summary::before {
	content: "\2212";
}

.ec-formulaire__plus > summary:focus-visible {
	border-radius: 4px;
	outline: 2px solid var(--wp--preset--color--petrole);
	outline-offset: 2px;
}

.ec-formulaire__plus-champs {
	display: grid;
	gap: 1.25rem;
	margin-top: 0.75rem;
}

/* Bouton de commande (Stripe ou formulaire). */
.ec-bouton-commande {
	margin-block: 1.25rem 0;
}

.ec-bouton-commande .wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
}

@media (max-width: 599px) {
	.ec-bouton-commande .wp-element-button {
		width: 100%;
	}
}

.ec-bouton-commande__micro {
	margin-block: 0.5rem 0;
	color: var(--wp--preset--color--texte-doux);
	font-size: var(--wp--preset--font-size--s);
	line-height: 1.5;
}

/* Mention légale du paiement : en petit, sous la date de démarrage. */
.ec-bouton-commande__legal {
	font-size: 0.75rem;
}

.ec-carte-commande__prix {
	margin-block: 0.25rem 0;
	color: var(--wp--preset--color--texte);
	font-family: var(--wp--preset--font-family--inter-tight);
	font-size: clamp(2.25rem, 8vw, 3rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

/* Réassurance : 1 colonne, 2 à partir de 600 px. */
.wp-block-group.ec-reassurance {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

@media (min-width: 600px) {
	.wp-block-group.ec-reassurance {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.ec-reassurance > .ec-reassurance__tuile > * {
	margin-block: 0;
}

.ec-reassurance > .ec-reassurance__tuile > * + * {
	margin-block-start: 0.25rem;
}

.ec-rappel-commande {
	text-align: center;
}

.ec-rappel-commande .ec-bouton-commande .wp-element-button {
	margin-inline: auto;
}

@media print {
	.ec-virement,
	.ec-whatsapp {
		display: none;
	}
}

/* Bouton d'envoi des formulaires : pleine largeur et cible confortable sur mobile. */
@media (max-width: 599px) {
	.ec-formulaire [type="submit"] {
		width: 100%;
		min-height: 52px;
	}
}
