/*
Theme Name: EAsymage
Theme URI:
Author: EAsymage
Description: Thème de blocs maison EAsymage (charte CFL : bleu et orange du logo). Fonctionne avec les blocs natifs de WordPress et les extensions EAsymage (blocs-easymage, easymage-forms, popup-easymage). Aucune dépendance à un thème ou une bibliothèque de blocs tierce. Base : thème easymage de Cristal Fenêtres 1.1.15.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Version: 1.2.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: easymage
*/

/* ---------------------------------------------------------------
   Réglages globaux non exprimables dans theme.json
   --------------------------------------------------------------- */

:root {
	--eaz-topbar-h: 38px;
}

html {
	scroll-behavior: smooth;
}

/* Ancres (#modeles, #solutions…) : le titre visé ne doit pas passer sous l'en-tête collant. */
[id] {
	scroll-margin-top: 120px;
}

/* Les conteneurs EAsymage « pleine largeur » font 100vw, barre de défilement comprise : sans ceci,
   la page défile de quelques pixels à l'horizontale. « clip » (et non « hidden ») ne casse pas l'en-tête collant. */
body {
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img,
video {
	max-width: 100%;
	height: auto;
}

/* Les navigateurs n'appliquent pas la police de la page aux éléments de formulaire :
   on la fait hériter (formulaires EAsymage Forms, recherche...). :where() = spécificité nulle,
   un réglage de police d'un formulaire ou d'un bloc garde la priorité. */
:where(button, input, select, textarea) {
	font-family: inherit;
}

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

a,
.wp-element-button,
.wp-block-button__link {
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ---------------------------------------------------------------
   Compatibilité avec les contenus faits sous l'ancien thème (STAX)
   Filet de sécurité : les pages CFL sont réécrites avec la palette du thème, mais un contenu
   ancien (révision restaurée, copier-coller) peut encore porter les noms de couleurs de STAX
   (accent-primary, bg-dark, bg-light, white, dark-gray…) ou de la palette par défaut de
   WordPress : ils sont redirigés vers la charte CFL. Hors sélecteur de l'éditeur.
   --------------------------------------------------------------- */

:root {
	--wp--preset--color--white: #ffffff;
	--wp--preset--color--black: #000000;
	--wp--preset--color--dark-gray: var(--wp--preset--color--body-text);
	--wp--preset--color--medium-gray: #656d6f;
	--wp--preset--color--light-gray: var(--wp--preset--color--border);
	--wp--preset--color--bg-light: var(--wp--preset--color--surface);
	--wp--preset--color--bg-dark: var(--wp--preset--color--secondary);
	--wp--preset--color--accent-primary: var(--wp--preset--color--accent);
	--wp--preset--color--accent-secondary: var(--wp--preset--color--bleu-clair);
	--wp--preset--color--vivid-cyan-blue: var(--wp--preset--color--bleu-logo);
	--wp--preset--color--pale-cyan-blue: var(--wp--preset--color--bleu-clair);
	--wp--preset--color--cyan-bluish-gray: var(--wp--preset--color--surface);
	--wp--preset--color--luminous-vivid-amber: var(--wp--preset--color--accent);
}

.has-white-color { color: var(--wp--preset--color--white) !important; }
.has-black-color { color: var(--wp--preset--color--black) !important; }
.has-dark-gray-color { color: var(--wp--preset--color--dark-gray) !important; }
.has-medium-gray-color { color: var(--wp--preset--color--medium-gray) !important; }
.has-light-gray-color { color: var(--wp--preset--color--light-gray) !important; }
.has-bg-light-color { color: var(--wp--preset--color--bg-light) !important; }
.has-accent-primary-color { color: var(--wp--preset--color--primary) !important; }
.has-accent-secondary-color { color: var(--wp--preset--color--accent-secondary) !important; }
.has-vivid-cyan-blue-color { color: var(--wp--preset--color--vivid-cyan-blue) !important; }

.has-white-background-color { background-color: var(--wp--preset--color--white) !important; }
.has-black-background-color { background-color: var(--wp--preset--color--black) !important; }
.has-dark-gray-background-color { background-color: var(--wp--preset--color--dark-gray) !important; }
.has-medium-gray-background-color { background-color: var(--wp--preset--color--medium-gray) !important; }
.has-light-gray-background-color { background-color: var(--wp--preset--color--light-gray) !important; }
.has-bg-light-background-color { background-color: var(--wp--preset--color--bg-light) !important; }
.has-bg-dark-background-color { background-color: var(--wp--preset--color--bg-dark) !important; }
.has-accent-primary-background-color { background-color: var(--wp--preset--color--accent-primary) !important; }
.has-vivid-cyan-blue-background-color { background-color: var(--wp--preset--color--vivid-cyan-blue) !important; }
.has-pale-cyan-blue-background-color { background-color: var(--wp--preset--color--pale-cyan-blue) !important; }
.has-cyan-bluish-gray-background-color { background-color: var(--wp--preset--color--cyan-bluish-gray) !important; }
.has-luminous-vivid-amber-background-color { background-color: var(--wp--preset--color--luminous-vivid-amber) !important; }

.has-white-border-color { border-color: var(--wp--preset--color--white) !important; }
.has-light-gray-border-color { border-color: var(--wp--preset--color--light-gray) !important; }

/* Liens dans les titres (« Menuiseries Aluminium », listes de produits…) : non soulignés, comme sous STAX. */
:where(h1, h2, h3, h4, h5, h6) a:where(:not(.wp-element-button)) {
	text-decoration: none;
}

:where(h1, h2, h3, h4, h5, h6) a:where(:not(.wp-element-button)):hover {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent);
	text-underline-offset: 5px;
}

/* ---------------------------------------------------------------
   En-tête : bandeau bleu (adresse, téléphone) + barre blanche (logo, menu)
   --------------------------------------------------------------- */

/* Tout l'en-tête est collant, mais décalé de la hauteur du bandeau : au défilement, le bandeau
   bleu disparaît et seule la barre blanche (logo + menu) reste en haut de l'écran. */
.wp-site-blocks > header.wp-block-template-part:has(.eaz-header) {
	position: sticky;
	top: calc(-1 * var(--eaz-topbar-h));
	z-index: 100;
}

body.admin-bar .wp-site-blocks > header.wp-block-template-part:has(.eaz-header) {
	top: calc(var(--wp-admin--admin-bar--height, 32px) - var(--eaz-topbar-h));
}

/* Écran étroit : la barre d'admin WordPress n'est plus collante, l'en-tête remonte en haut. */
@media (max-width: 600px) {
	body.admin-bar .wp-site-blocks > header.wp-block-template-part:has(.eaz-header) {
		top: calc(-1 * var(--eaz-topbar-h));
	}
}

.eaz-header__barre {
	box-shadow: 0 4px 18px rgba(27, 53, 80, 0.10);
}

/* Bandeau bleu */
.eaz-topbar {
	font-size: 0.85rem;
	font-weight: 500;
}

.eaz-topbar__row {
	min-height: var(--eaz-topbar-h);
	height: var(--eaz-topbar-h);
	gap: 1.5rem;
}

.eaz-topbar__actions {
	gap: 1.5rem;
}

.eaz-topbar p {
	margin: 0;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.eaz-topbar a {
	text-decoration: none;
}

.eaz-topbar a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Pictogrammes (repère, téléphone) dessinés en CSS : pas de balisage à maintenir dans la partie. */
.eaz-topbar__adresse::before,
.eaz-topbar__tel::before {
	content: "";
	width: 15px;
	height: 15px;
	flex: none;
	background-color: currentColor;
	-webkit-mask: var(--eaz-picto) center / contain no-repeat;
	mask: var(--eaz-picto) center / contain no-repeat;
	opacity: 0.85;
}

.eaz-topbar__adresse::before {
	--eaz-picto: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E");
}

.eaz-topbar__tel::before {
	--eaz-picto: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E");
}

.eaz-topbar__tel {
	font-weight: 700;
}

/* Téléphone : l'adresse est masquée, le téléphone reste (centré). */
@media (max-width: 781px) {
	.eaz-topbar__adresse {
		display: none !important;
	}

	.eaz-topbar__row {
		justify-content: center !important;
	}
}

/* Barre blanche : logo à gauche ; à droite le menu puis le bouton « Demande d’informations ».
   Le bouton est dans la barre blanche (collante) : il reste visible au défilement. */
.eaz-header__row {
	gap: 1.5rem;
	justify-content: flex-start !important;
}

.eaz-header__row .wp-block-site-logo {
	margin-right: auto;
}

.eaz-header__cta {
	flex: none;
	margin: 0;
}

.eaz-header__cta .wp-block-button__link {
	font-size: 0.9rem;
	font-weight: 700;
	white-space: nowrap;
	border-radius: 6px;
}

/* Menu en « hamburger » : le bouton passe à gauche de l'icône du menu, l'icône tout à droite. */
@media (max-width: 1279px) {
	.eaz-header__row .wp-block-navigation {
		order: 3;
	}
}

.eaz-header.eaz-nav-compact .eaz-header__row .wp-block-navigation {
	order: 3;
}

@media (max-width: 781px) {
	.eaz-header__row {
		gap: 0.9rem;
	}

	.eaz-header__cta .wp-block-button__link {
		padding: 0.45rem 0.8rem !important;
		font-size: 0.85rem;
	}
}

.eaz-header .wp-block-site-logo {
	flex: none;
}

.eaz-header .wp-block-navigation a {
	text-decoration: none;
}

.eaz-header .wp-block-navigation-item__label {
	white-space: nowrap;
}

/* Le menu « Main Menu » contient le logo du site en 1re entrée (héritage STAX, où il n'y avait pas d'autre logo).
   L'en-tête a déjà son logo : celui du menu est masqué (sans modifier le menu en base). */
.eaz-header .wp-block-navigation-item:has(> .wp-block-site-logo) {
	display: none !important;
}

/* Survol et page courante : soulignés en orange CFL. */
.eaz-header .wp-block-navigation a:hover,
.eaz-header .wp-block-navigation .current-menu-item > a,
.eaz-header .wp-block-navigation .current-menu-ancestor > a {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 7px;
}

/* Sous-menus (Nos produits, Parrainage) : carte blanche avec liseré orange. */
.eaz-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background-color: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--primary) !important;
	border: 0 !important;
	border-top: 3px solid var(--wp--preset--color--accent) !important;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 12px 32px rgba(27, 53, 80, 0.16);
	padding: 0.5rem 0;
	min-width: 260px;
}

.eaz-header .wp-block-navigation .wp-block-navigation__submenu-container a {
	padding: 0.5rem 1.1rem;
}

@media (max-width: 781px) {
	.eaz-header .wp-block-site-logo img {
		width: 96px !important;
		height: auto;
	}
}

/* Menu « hamburger » : WordPress ne bascule qu'en dessous de 600 px. Le menu de ce site est long
   (8 entrées, libellés longs) : il passe en hamburger dès qu'il ne tient plus sur une ligne.
   - assets/js/menu.js ajoute la classe .eaz-nav-compact quand le menu déborde (s'adapte
     tout seul si on ajoute / renomme des entrées) ;
   - en dessous de 1280 px, hamburger d'office (évite un flash avant le chargement du script). */
@media (min-width: 600px) and (max-width: 1279px) {
	.eaz-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.eaz-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
}

@media (min-width: 600px) {
	.eaz-header.eaz-nav-compact .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.eaz-header.eaz-nav-compact .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
}

.eaz-header .wp-block-navigation__responsive-container-open svg {
	width: 30px;
	height: 30px;
}

/* Menu ouvert (plein écran) : entrées plus grandes, alignées à gauche, sous-menus indentés. */
.eaz-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--medium);
}

.eaz-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border-top: 0 !important;
	box-shadow: none;
	min-width: 0;
	padding: 0.4rem 0 0 1rem;
	font-size: var(--wp--preset--font-size--normal);
}

.eaz-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog {
	padding: var(--wp--preset--spacing--60) clamp(1.5rem, 6vw, 3rem);
}

.eaz-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.eaz-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.eaz-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
.eaz-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	align-items: flex-start !important;
	text-align: left;
}

.eaz-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 0.9rem;
}

/* Menu ouvert : entrées principales en grand, sous-entrées un cran en dessous ; les libellés longs
   (« Véranda / Pergola neuf & rénovation ») passent à la ligne au lieu de déborder. */
.eaz-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-size: 1.15rem !important;
	font-weight: 700;
}

.eaz-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item {
	font-size: 1rem !important;
	font-weight: 500;
}

.eaz-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__label {
	white-space: normal;
}

/* ---------------------------------------------------------------
   Pied de page (bleu nuit)
   --------------------------------------------------------------- */

.eaz-footer a {
	text-decoration: none;
}

.eaz-footer a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.eaz-footer h3 {
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.eaz-footer h3::after {
	content: "";
	display: block;
	width: 32px;
	height: 3px;
	margin-top: 0.6rem;
	background: var(--wp--preset--color--accent);
	border-radius: 2px;
}

/* Logo (bleu / orange) sur une pastille blanche : illisible directement sur le fond bleu nuit. */
.eaz-footer__logo img {
	background: var(--wp--preset--color--base);
	padding: 10px 14px;
	border-radius: 10px;
	box-sizing: content-box;
}

.eaz-footer__liens {
	list-style: none;
	padding-left: 0;
	line-height: 2;
}

.eaz-footer .wp-block-social-links .wp-social-link {
	background-color: rgba(255, 255, 255, 0.12);
}

.eaz-footer .wp-block-social-links .wp-social-link:hover {
	background-color: var(--wp--preset--color--accent);
}

/* ---------------------------------------------------------------
   Blocs natifs
   --------------------------------------------------------------- */

/* Accordéon (bloc Détails) */
.wp-block-details {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	padding: 0.9rem 1.2rem;
	background: var(--wp--preset--color--base);
}

.wp-block-details + .wp-block-details {
	margin-top: 0.75rem;
}

.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

.wp-block-details[open] summary {
	margin-bottom: 0.75rem;
	color: var(--wp--preset--color--primary);
}

/* Tableaux de caractéristiques */
.wp-block-table table,
.entry-content table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table th,
.wp-block-table td,
.entry-content table th,
.entry-content table td {
	border: 1px solid var(--wp--preset--color--border);
	padding: 0.6rem 0.9rem;
	text-align: left;
	overflow-wrap: anywhere;
}

/* Sur téléphone : cellules plus compactes pour que le tableau tienne dans la largeur. */
@media (max-width: 600px) {
	.wp-block-table th,
	.wp-block-table td,
	.entry-content table th,
	.entry-content table td {
		padding: 0.5rem 0.55rem;
		font-size: var(--wp--preset--font-size--small);
	}
}

.wp-block-table th,
.entry-content table th {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}

/* Bouton style « contour » */
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--secondary);
}

/* Bannières (cover) : sur mobile, le texte passe sur toute la largeur de l'image,
   un dégradé horizontal ne suffit plus à le rendre lisible → voile uniforme. */
@media (max-width: 781px) {
	.wp-block-cover .wp-block-cover__background.has-background-gradient {
		background: color-mix(in srgb, var(--wp--preset--color--secondary) 75%, transparent) !important;
		opacity: 1 !important;
	}
}

/* Cartes (groupe avec style « carte ») */
.is-style-eaz-carte {
	background: var(--wp--preset--color--base);
	border-radius: 12px;
	box-shadow: 0 6px 24px rgba(27, 53, 80, 0.1);
	overflow: hidden;
}

/* Page qui se termine par une section pleine largeur (ex. bandeau d’appel) : pas de bande
   entre cette section et le pied de page. */
.wp-block-post-content:has(> .alignfull:last-child) {
	padding-bottom: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}

/* Carte EAsymage suivie d'une légende dans le même groupe : la carte (height:100%) ne doit pas
   occuper toute la cellule, sinon la légende déborde sur la ligne suivante de la grille. */
.wp-block-group > .easymage-card:not(:only-child) {
	height: auto;
}

/* Titre précédé d'un petit trait orange (cartes d'avantages). Classe à ajouter au titre : eaz-titre-accent. */
.eaz-titre-accent::before {
	content: "";
	display: block;
	width: 40px;
	height: 3px;
	margin-bottom: 0.7rem;
	background: var(--wp--preset--color--accent);
	border-radius: 2px;
}

/* Encadré de performances (fiches produits). Classe de paragraphe : eaz-perf. */
.eaz-perf {
	background: var(--wp--preset--color--surface);
	border-left: 3px solid var(--wp--preset--color--accent);
	border-radius: 4px;
	padding: 0.6rem 0.9rem;
}

/* Colonnes « texte | image » : sur téléphone, l'image repasse au-dessus du texte.
   Classe à ajouter au bloc Colonnes : eaz-inverse-mobile. */
@media (max-width: 781px) {
	.wp-block-columns.eaz-inverse-mobile {
		flex-direction: column-reverse;
	}
}

/* Liens dans le texte d'une section sombre : couleur du texte + soulignés (le bleu serait illisible). */
.wp-block-post-content :is(.has-secondary-background-color, .has-primary-background-color, .has-bg-dark-background-color) a:not(.wp-element-button):not(.wp-block-button__link) {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Bandeau de titre des pages « Page » (espaces parrainage, mentions…) */
.eaz-titre-page h1 {
	margin: 0;
}

/* Cartes des agences (« Trouver mon agence ») : toutes de la même hauteur (lignes égales), photo entière
   centrée verticalement. Classe ajoutée aux blocs Média et texte : eaz-carte-agence. */
.easymage-grid:has(.eaz-carte-agence) {
	align-items: stretch;
	grid-template-rows: none !important;
	grid-auto-rows: 1fr !important;
	/* Nombre de colonnes selon la place disponible (3 / 2 / 1), au lieu des 3 colonnes fixes du bloc :
	   une carte ne descend jamais sous 250 px. */
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)) !important;
}

.easymage-slide-free:has(.eaz-carte-agence),
.easymage-slide-free:has(.eaz-carte-agence) > .easymage-slide-free-content {
	height: 100%;
}

.eaz-carte-agence {
	height: 100%;
}

/* Photo entière (portrait du responsable incrusté en haut à droite) : centrée verticalement, jamais recadrée. */
.eaz-carte-agence .wp-block-media-text__media {
	align-self: center;
}

.eaz-carte-agence .wp-block-media-text__content {
	padding: 1.5rem 1.4rem;
}

.eaz-carte-agence h3 {
	font-size: 1.2rem !important;
	line-height: 1.3;
	margin-bottom: 0.6rem;
}

/* Carte d'agence étroite (2 colonnes sur tablette, ou 3 colonnes serrées) : la photo passe au-dessus du texte.
   Requête de conteneur : dépend de la largeur de la CARTE, pas de celle de l'écran. */
.easymage-slide-free:has(> .easymage-slide-free-content > .eaz-carte-agence) {
	container-type: inline-size;
}

@container (max-width: 400px) {
	.eaz-carte-agence {
		grid-template-columns: 100% !important;
		grid-template-rows: auto 1fr;
	}

	.eaz-carte-agence > .wp-block-media-text__media {
		grid-column: 1;
		grid-row: 1;
		align-self: start;
	}

	.eaz-carte-agence > .wp-block-media-text__content {
		grid-column: 1;
		grid-row: 2;
		padding: 1rem 1.2rem 1.3rem;
		align-self: start !important;
	}
}

/* ---------------------------------------------------------------
   CFL : l'orange du logo est trop clair pour un texte blanc → texte bleu nuit sur l'orange
   (boutons), et l'orange n'est jamais utilisé seul pour du texte sur fond clair.
   --------------------------------------------------------------- */
.has-accent-background-color:not(.has-text-color) {
	color: var(--wp--preset--color--secondary);
}

.wp-block-button__link.has-accent-background-color:hover,
.wp-element-button.has-accent-background-color:hover {
	background-color: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--base) !important;
}

/* Logo CFL (large, 800 × 250) : un peu plus petit sur téléphone. */
@media (max-width: 781px) {
	.eaz-header .wp-block-site-logo img {
		width: 140px !important;
	}
}

/* ---------------------------------------------------------------
   Mise en page des pages CFL (classes posées par docs/pages/construire-pages.php)
   --------------------------------------------------------------- */

/* Section : espacement vertical régulier entre les grandes parties d'une page. */
.eaz-section {
	padding-top: var(--wp--preset--spacing--60) !important;
	padding-bottom: var(--wp--preset--spacing--60) !important;
}

.eaz-section--serree {
	padding-top: var(--wp--preset--spacing--50) !important;
	padding-bottom: var(--wp--preset--spacing--50) !important;
}

.eaz-centre,
.eaz-centre :where(h1, h2, h3, h4, p) {
	text-align: center;
}

.eaz-centre .wp-block-buttons,
.wp-block-buttons.eaz-centre {
	justify-content: center;
}

/* Sur-titre (petit texte au-dessus d'un titre). */
.eaz-surtitre {
	font-size: 0.85rem !important;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin-bottom: 0.4rem !important;
}

.has-secondary-background-color .eaz-surtitre,
.has-primary-background-color .eaz-surtitre,
.wp-block-cover .eaz-surtitre {
	color: var(--wp--preset--color--accent);
}

.eaz-chapo {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.5;
}

/* Bannière d'en-tête de page (vidéo ou image). */
.eaz-hero h1 {
	font-size: clamp(2.2rem, 5vw, 3.8rem);
	line-height: 1.1;
	max-width: 18ch;
}

.eaz-hero.eaz-centre h1 {
	margin-left: auto;
	margin-right: auto;
}

.eaz-hero .eaz-chapo {
	max-width: 42rem;
}

.eaz-hero.eaz-centre .eaz-chapo {
	margin-left: auto;
	margin-right: auto;
}

/* Cartes produits (logo LUMITHERM / LUMISTORE). */
.eaz-carte-produit {
	padding: 2rem 1.8rem !important;
	height: 100%;
	display: flex;
	flex-direction: column;
	border-top: 4px solid var(--wp--preset--color--accent);
}

.eaz-carte-produit .wp-block-buttons {
	margin-top: auto;
}

.eaz-logo-produit img {
	max-width: 220px;
	width: 100%;
	height: auto;
	border-radius: 0 !important;
}

.eaz-logo-produit {
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Liste d'atouts : coche orange sur pastille. */
ul.eaz-atouts {
	list-style: none;
	padding-left: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 0.8rem 1.5rem;
}

ul.eaz-atouts li {
	position: relative;
	padding-left: 2rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

ul.eaz-atouts li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 1.3rem;
	height: 1.3rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231B3550' d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6 11-11-1.4-1.4z'/%3E%3C/svg%3E") center / 75% no-repeat;
}

/* Définitions (critères techniques) : terme en gras, explication dessous. */
.eaz-definitions dt {
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
	margin-top: 0.9rem;
}

.eaz-definitions dd {
	margin-left: 0;
}

/* Fiches de la gamme (schémas + graphiques) : images entières sur fond blanc. */
.eaz-fiche img {
	background: var(--wp--preset--color--base);
	border-radius: 8px;
}

/* Coordonnées (pages formulaire). */
.eaz-coordonnees p {
	margin: 0.2rem 0;
}

/* Média + texte en pleine largeur : texte bien aéré. */
.wp-block-media-text.alignfull .wp-block-media-text__content {
	padding: var(--wp--preset--spacing--60) clamp(1.5rem, 6vw, 5rem);
}

.wp-block-media-text.alignfull .wp-block-media-text__content > * {
	max-width: 560px;
}

/* Galerie : images de même hauteur, recadrées. */
.eaz-galerie.wp-block-gallery .wp-block-image img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* Sections foncées : titres en blanc (la couleur « Titres » bleue serait illisible). */
:is(.has-secondary-background-color, .has-primary-background-color, .wp-block-cover.is-dark) :is(h1, h2, h3, h4, h5, h6):not(.has-text-color) {
	color: var(--wp--preset--color--base);
}

/* Bannière non centrée : titre et chapeau alignés sur le bord gauche de la colonne de contenu
   (sans ceci, leur largeur maximale les centrerait dans la mise en page « contrainte »). */
.eaz-hero:not(.eaz-centre) .wp-block-cover__inner-container > :is(h1, .eaz-chapo) {
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
	margin-right: auto !important;
}

/* Carte contenant un formulaire : marges intérieures (les champs ne touchent pas les bords). */
.eaz-carte-formulaire {
	padding: clamp(1.2rem, 4vw, 2.5rem) !important;
}

/* Bannières : sur-titre et texte lisibles sur une vidéo claire. */
.eaz-hero .wp-block-cover__inner-container {
	text-shadow: 0 1px 12px rgba(27, 53, 80, 0.45);
}

/* Étapes numérotées (« Comment ça se passe ? ») : pastilles orange. Classe de liste numérotée : eaz-etapes. */
ol.eaz-etapes {
	list-style: none;
	counter-reset: eaz-etape;
	padding-left: 0;
	max-width: 760px;
	margin-left: auto !important;
	margin-right: auto !important;
}

ol.eaz-etapes li {
	counter-increment: eaz-etape;
	position: relative;
	padding: 0.2rem 0 1rem 3.2rem;
}

ol.eaz-etapes li::before {
	content: counter(eaz-etape);
	position: absolute;
	left: 0;
	top: 0;
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--secondary);
	font-weight: 800;
	display: grid;
	place-items: center;
}
