/* dc26-ejma — entry point PostCSS
   Le CSS du parent (dc26-base) est chargé en premier via la dépendance
   ['dc26-front-styles']. Ce fichier ajoute les overrides spécifiques EJMA. */

/* ===========================================================
   HEADER EJMA — adaptation du sticky dc26-base
   États fournis par le parent : .is-top / .is-scrolled
   sur .wp-block-template-part.is-style-sticky-header
   =========================================================== */

/* Sur EJMA le header est toujours fixed (overlay content) — override dc26-base sticky. */

header.wp-block-template-part.is-style-sticky-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
}

.admin-bar header.wp-block-template-part.is-style-sticky-header {
	top: var(--wp-admin--admin-bar--height, 0px);
}

.ejma-header {
	width: 100%;
	color: var(--wp--preset--color--white);
	transition: color 200ms ease;
	/* dc26-base impose flex-direction:row sur .is-style-sticky-header > .wp-block-group
	   — on override ici pour que topbar et main restent empilés verticalement. */
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
}

/* Neutralise le margin-block-start: 24px injecté par WP sur les enfants
   d'un layout contraint — inutile et visible au scroll quand la topbar se cache. */

:root :where(.ejma-header.is-layout-constrained) > *,
:root :where(.is-layout-constrained) > .ejma-topbar,
:root :where(.is-layout-constrained) > .ejma-header__main {
	margin-block-start: 0;
}

/* En haut de page : header transparent, texte blanc (géré par le parent
   pour le fond). Le logo est blanc. */

.is-style-sticky-header.is-top .ejma-header {
	color: var(--wp--preset--color--white);
}

/* Scrollé : fond clair translucide (parent) → texte foncé, logo primaire. */

.is-style-sticky-header.is-scrolled .ejma-header {
	color: var(--wp--preset--color--gray-dark, #1c1c1c);
}

/* ---- Logo modulaire : blanc en haut, primaire au scroll ---- */

.is-style-sticky-header.is-top .ejma-modular-logo__fill {
	fill: var(--wp--preset--color--white);
}

.is-style-sticky-header.is-scrolled .ejma-modular-logo__fill {
	fill: var(--wp--preset--color--primary);
}

/* Le logo reste toujours visible (décision EJMA), y compris sur la home. */

.is-style-sticky-header .ejma-modular-logo {
	opacity: 1 !important;
	pointer-events: auto !important;
}

/* ---- Topbar : disparaît au scroll, la nav principale reste ---- */

.ejma-topbar {
	gap: 1rem;
	margin-bottom: 0.75rem;
	overflow: hidden;
	max-height: 3rem;
	opacity: 1;
	transition: max-height 300ms ease, opacity 200ms ease, margin 300ms ease;
}

.is-style-sticky-header.is-scrolled .ejma-topbar {
	max-height: 0;
	opacity: 0;
	margin-bottom: 0;
}

/* Topbar masquée sur petit écran (comme l'ancien `hidden lg:flex`).
   !important nécessaire : .wp-block-group.is-layout-flex { display:flex }
   (WP core, chargé après) écrase sinon cette règle. */

@media (max-width: 1023px) {
	.ejma-header .ejma-topbar {
		display: none !important;
	}
}

/* La barre principale : logo à gauche, nav à droite. */

.ejma-header__main {
	gap: 1rem;
}

/* Sous-menus desktop : disparition instantanée au hover-out (plus de barre blanche).
   !important nécessaire : dc26-base (0,3,0) charge après et écraserait sans ça. */

.ejma-nav-primary > .wp-block-navigation__container .has-child > .wp-block-navigation__submenu-container {
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s !important;
}

.ejma-nav-primary > .wp-block-navigation__container .has-child:hover > .wp-block-navigation__submenu-container,
.ejma-nav-primary > .wp-block-navigation__container .has-child:focus-within > .wp-block-navigation__submenu-container {
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s !important;
}

/* ── Mobile nav overlay → géré via parts/navigation-overlay.html (WP 7.0 native). ── */

/* ===========================================================
   NAVIGATION FSE (wp-block-navigation) — style EJMA
   Tous les styles desktop sont scopés via
   > .wp-block-navigation__container pour ne jamais
   entrer dans le container overlay (.is-menu-open).
   =========================================================== */

.ejma-header .wp-block-navigation {
	font-family: var(--wp--preset--font-family--wide);
}

/* Liens desktop : dans le container principal uniquement. */

.ejma-nav-primary > .wp-block-navigation__container .wp-block-navigation-item__content {
	color: currentColor;
	position: relative;
	padding-block: 0.5rem;
	transition: color 200ms ease;
}

/* Soulignement animé au survol. */

.ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item:not(.has-child) .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: auto;
	right: 0;
	top: calc(100% + 0.2rem);
	height: 3px;
	width: 0;
	background-color: currentColor;
	transition: width 200ms ease, left 200ms ease, right 200ms ease;
}

.ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item:not(.has-child) .wp-block-navigation-item__content:hover::after {
	left: 0;
	right: auto;
	width: 100%;
}

/* Sous-menus desktop. */

.ejma-nav-primary > .wp-block-navigation__container .wp-block-navigation__submenu-container {
	background-color: var(--wp--preset--color--white);
	border: none;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
	min-width: 16rem;
}

.ejma-nav-primary > .wp-block-navigation__container .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	color: var(--wp--preset--color--gray-dark, #1c1c1c);
	padding: 0.75rem 1.5rem;
	white-space: nowrap;
}

.ejma-nav-primary > .wp-block-navigation__container .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--primary);
}

/* Topbar (menu secondaire) : plus petit. */

.ejma-nav-secondary {
	font-size: var(--wp--preset--font-size--small);
}

/* Overlay mobile → template part parts/navigation-overlay.html (WP 7.0 native).
   Corrections nécessaires car l'overlay est à l'intérieur de .ejma-header
   qui impose color:white et font-family:wide sur toute sa descendance. */

/* Contrebalance le color:white du header et le font-family:wide */

.ejma-nav-overlay .wp-block-navigation {
	font-family: var(--wp--preset--font-family--base);
}

.ejma-nav-overlay .wp-block-navigation-item__content {
	color: var(--wp--preset--color--black);
	padding-block: 0.2rem;
	font-weight: normal;
}

/* Sous-menus dans l'overlay : fond transparent + visibilité instantanée.
   dc26-base applique background rgba(0,0,0,0.15)!important et color:white!important
   dans .is-menu-open — on doit surcharger avec !important. */

.ejma-nav-overlay .wp-block-navigation__submenu-container {
	background: none !important;
	background-color: transparent !important;
	box-shadow: none !important;
	border: none;
	min-width: 0;
	padding-left: var(--wp--preset--spacing--40);
	transition: opacity 0.15s ease, visibility 0s linear 0s !important;
}

.ejma-nav-overlay .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 0.875em;
	white-space: normal;
	color: var(--wp--preset--color--black) !important;
}

/* Icônes sociales dans l'overlay : noir (le bloc social est blanc dans la topbar). */

.ejma-nav-overlay .wp-social-link {
	color: var(--wp--preset--color--black) !important;
	background-color: transparent !important;
}

.ejma-nav-overlay .wp-social-link svg {
	fill: var(--wp--preset--color--black) !important;
}

/* Bouton burger : couleur héritée (blanc/foncé selon scroll). */

.ejma-header .wp-block-navigation__responsive-container-open {
	color: currentColor;
}

/* ── Styles alternatifs desktop — scopés au container principal ──────────── */

/* Bouton plein */

.ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item.is-style-button .wp-block-navigation-item__content {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white) !important;
	border: 2px solid var(--wp--preset--color--primary);
	padding: 0.4rem 1.1rem;
	font-family: var(--wp--preset--font-family--wide);
	transition: background-color 200ms ease, color 200ms ease;
}

.ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item.is-style-button .wp-block-navigation-item__content:hover {
	background-color: transparent;
	color: var(--wp--preset--color--primary) !important;
}

.is-style-sticky-header.is-top .ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item.is-style-button .wp-block-navigation-item__content {
	background-color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary) !important;
}

.is-style-sticky-header.is-top .ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item.is-style-button .wp-block-navigation-item__content:hover {
	background-color: transparent;
	color: var(--wp--preset--color--white) !important;
}

.ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item.is-style-button .wp-block-navigation-item__content::after {
	display: none;
}

/* Bouton contour */

.ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item.is-style-outline .wp-block-navigation-item__content {
	background-color: transparent;
	color: var(--wp--preset--color--primary) !important;
	border: 2px solid var(--wp--preset--color--primary);
	padding: 0.4rem 1.1rem;
	font-family: var(--wp--preset--font-family--wide);
	transition: background-color 200ms ease, color 200ms ease;
}

.ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item.is-style-outline .wp-block-navigation-item__content:hover {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white) !important;
}

.is-style-sticky-header.is-top .ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item.is-style-outline .wp-block-navigation-item__content {
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--white) !important;
}

.is-style-sticky-header.is-top .ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item.is-style-outline .wp-block-navigation-item__content:hover {
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary) !important;
}

.ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item.is-style-outline .wp-block-navigation-item__content::after {
	display: none;
}

/* Accent */

.ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item.is-style-accent .wp-block-navigation-item__content {
	color: var(--wp--preset--color--primary) !important;
	font-style: italic;
}

.is-style-sticky-header.is-top .ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item.is-style-accent .wp-block-navigation-item__content {
	color: var(--wp--preset--color--white) !important;
	opacity: 0.8;
}

.ejma-nav-primary > .wp-block-navigation__container > .wp-block-navigation-item.is-style-accent .wp-block-navigation-item__content::after {
	background-color: var(--wp--preset--color--primary);
}

/* ===========================================================
   BOUTONS EJMA — rectangulaires (override du pill dc26-base)
   =========================================================== */

.wp-block-button__link {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: 0;
	padding: 0.75rem 1.5rem;
	font-family: var(--wp--preset--font-family--wide);
	text-transform: none;
	letter-spacing: 0;
	transition: all 200ms ease;
}

.wp-block-button__link:hover {
	color: var(--wp--preset--color--white);
}

/* Outline */

.is-style-outline > .wp-block-button__link,
.wp-block-button__link.is-style-outline {
	background-color: transparent;
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

.is-style-outline > .wp-block-button__link:hover,
.wp-block-button__link.is-style-outline:hover {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}

/* Outline blanc (sur fonds colorés / cartes). */

.is-style-outline > .wp-block-button__link.has-white-color,
.wp-block-button__link.is-style-outline.has-white-color {
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--white);
}

.is-style-outline > .wp-block-button__link.has-white-color:hover,
.wp-block-button__link.is-style-outline.has-white-color:hover {
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary);
}

/* Variante « arrow » — bouton avec flèche SVG à droite du texte. */

.wp-block-button.is-style-arrow .wp-block-button__link {
	padding-right: 3.25rem;
	position: relative;
}

.wp-block-button.is-style-arrow .wp-block-button__link::after {
	content: "";
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1.1rem;
	height: 0.85rem;
	background: url("../assets/images/arrow-white.svg") center / contain no-repeat;
	transition: transform 250ms ease;
}

.wp-block-button.is-style-arrow .wp-block-button__link:hover::after {
	transform: translateY(-50%) translateX(0.3rem);
}

/* Outline : flèche noire */

.wp-block-button.is-style-arrow .is-style-outline::after,
.wp-block-button.is-style-arrow.is-style-outline .wp-block-button__link::after {
	background-image: url("../assets/images/arrow-black.svg");
}

.wp-block-button.is-style-arrow.is-style-outline .wp-block-button__link:hover::after {
	background-image: url("../assets/images/arrow-white.svg");
}

/* Variante « fat » (CTA arrondi, ex. inscription). */

.wp-block-button.is-style-fat .wp-block-button__link {
	padding: 0.5rem 2rem;
	font-size: var(--wp--preset--font-size--xl);
	min-height: 5rem;
	display: inline-flex;
	align-items: center;
	border-radius: 9999px;
}

/* ===========================================================
   BLOCS EJMA — cellules partagées (formations, profs, news, agenda)
   =========================================================== */

.ejma-last-news__empty {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--wp--preset--color--gray-dark);
	font-style: italic;
	padding: var(--wp--preset--spacing--50) 0;
}

/* ---- Lien « fancy arrow » : texte + flèche SVG animée à droite ---- */

.is-style-fancy-link-arrow a {
	position: relative;
	display: inline-block;
	padding-bottom: 0.5rem;
	padding-right: 3rem;
	font-family: var(--wp--preset--font-family--heading);
	text-decoration: none;
	transition: color 200ms ease;
}

.is-style-fancy-link-arrow a::before {
	content: "";
	position: absolute;
	right: 0;
	top: 0.15em;
	width: 1.6rem;
	height: 1.2rem;
	background: url("../assets/images/arrow-black.svg") center / contain no-repeat;
	transition: transform 300ms ease;
}

.is-style-fancy-link-arrow a::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	width: 0;
	background-color: var(--wp--preset--color--primary);
	transition: width 200ms ease;
}

.is-style-fancy-link-arrow a:hover::before {
	transform: translateX(0.4rem);
}

.is-style-fancy-link-arrow a:hover::after {
	width: 100%;
}

/* ---- Lien « fancy » : soulignement animé ---- */

.is-style-fancy-link a,
p.is-style-fancy-link a {
	position: relative;
	padding-bottom: 0.5rem;
	font-family: var(--wp--preset--font-family--heading);
	text-decoration: none;
	transition: color 200ms ease;
}

.is-style-fancy-link a::after {
	content: "";
	position: absolute;
	bottom: 0;
	right: 0;
	height: 4px;
	width: 0;
	background-color: currentColor;
	transition: width 200ms ease, left 200ms ease, right 200ms ease;
}

.is-style-fancy-link a:hover::after {
	right: auto;
	left: 0;
	width: 100%;
}

/* ===========================================================
   CELLULE FORMATION — carte image plein cadre + bouton au survol
   =========================================================== */

.ejma-formation-cell {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 2rem;
	min-height: 200px;
	background: var(--wp--preset--color--primary) center / cover no-repeat;
	text-align: center;
}

@media (min-width: 768px) {
	.ejma-formation-cell { min-height: 318px; }
}

.ejma-formation-cell__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	pointer-events: none;
}

.ejma-formation-cell__title,
.ejma-formation-cell__subtitle {
	position: relative;
	z-index: 2;
	margin: 0;
}

.ejma-formation-cell__subtitle {
	margin-top: 1rem;
	font-family: var(--wp--preset--font-family--base);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.4;
}

.ejma-formation-cell__link {
	position: absolute;
	inset: 0;
	z-index: 3;
}

.ejma-formation-cell__cta {
	position: absolute;
	z-index: 2;
	top: 100%;
	transition: top 500ms ease;
	margin: 0;
	pointer-events: none;
}

.ejma-formation-cell:hover .ejma-formation-cell__cta {
	top: calc(100% - 72px - 0.5rem);
}

.ejma-formation-cell:hover .ejma-formation-cell__cta .wp-block-button__link {
	background-color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}

/* ===========================================================
   CELLULE PROFESSEUR — photo ronde + nom (styles dans le bloc,
   ici uniquement le survol partagé)
   =========================================================== */

.ejma-teacher-cell:hover .ejma-teacher-cell__photo {
	transform: scale(1.03);
}

/* ===========================================================
   CELLULES NEWS / AGENDA — cartes image avec dégradé
   =========================================================== */

.ejma-post-cell,
.ejma-agenda-cell {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 400px;
	padding: 1rem;
	color: var(--wp--preset--color--white);
	background-color: var(--wp--preset--color--primary);
	overflow: hidden;
}

@media (min-width: 768px) {
	.ejma-post-cell { padding: 2.5rem 1.25rem; }
	.ejma-agenda-cell { min-height: 550px; padding: 2.5rem 1.25rem; }
}

/* Image de fond via ::before pour permettre le zoom indépendant */

.ejma-post-cell[data-has-thumbnail="yes"]::before,
.ejma-agenda-cell[data-has-thumbnail="yes"]::before {
	content: "";
	position: absolute;
	inset: 0;
	background: inherit;
	background-size: cover;
	background-position: center;
	transition: transform 400ms ease;
	z-index: 0;
}

.ejma-post-cell:hover::before,
.ejma-agenda-cell:hover::before {
	transform: scale(1.04);
}

/* Dégradé sombre quand il y a une image, pour la lisibilité. */

.ejma-post-cell[data-has-thumbnail="yes"]::after,
.ejma-agenda-cell[data-has-thumbnail="yes"]::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(to top, var(--wp--preset--color--gray-dark, #1c1c1c), transparent);
	z-index: 1;
	transition: opacity 300ms ease;
}

.ejma-post-cell:hover::after,
.ejma-agenda-cell:hover::after {
	opacity: 0.7;
}

.ejma-post-cell > *,
.ejma-agenda-cell > * {
	position: relative;
	z-index: 2;
}

/* Stretched link : le <p> ET le <a> doivent rester static —
   is-style-fancy-link force position:relative sur le <a>,
   ce qui ancrerait le ::before sur le texte au lieu de la carte. */

.ejma-post-cell > .ejma-post-cell__more,
.ejma-agenda-cell > .ejma-agenda-cell__more {
	position: static;
}

.ejma-post-cell .ejma-post-cell__more a,
.ejma-agenda-cell .ejma-agenda-cell__more a {
	position: static;
}

.ejma-post-cell__more a::before,
.ejma-agenda-cell__more a::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
}

.ejma-post-cell__title,
.ejma-agenda-cell__title {
	margin-bottom: 0.5rem;
	transition: color 300ms ease;
}

.ejma-post-cell:hover .ejma-post-cell__title,
.ejma-agenda-cell:hover .ejma-agenda-cell__title {
	color: var(--wp--preset--color--primary);
}

.ejma-post-cell__excerpt,
.ejma-agenda-cell__excerpt {
	margin-bottom: 0;
	line-height: 1.4;
	font-family: var(--wp--preset--font-family--subtitle);
}

/* Agenda : pastille date + lieu. */

.ejma-agenda-cell__meta {
	display: flex;
	flex-direction: column;
	margin-bottom: auto;
	padding-left: 1.25rem;
	position: relative;
}

.ejma-agenda-cell__meta::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3rem;
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 9999px;
	background-color: var(--wp--preset--color--white);
}

.ejma-agenda-cell__date {
	font-family: var(--wp--preset--font-family--title);
}

.ejma-agenda-cell__location {
	font-family: var(--wp--preset--font-family--heading);
}

/* ── Lien Archives — style bouton arrow ─────────────────────── */

.ejma-last-news__archives {
	margin: 0;
}

.ejma-last-news__archives a {
	display: inline-flex;
	align-items: center;
	position: relative;
	white-space: nowrap;
	padding: 0.75rem 3.25rem 0.75rem 1.5rem;
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: 0;
	font-family: var(--wp--preset--font-family--wide);
	font-size: var(--wp--preset--font-size--regular);
	text-decoration: none;
	transition: all 200ms ease;
}

.ejma-last-news__archives a::after {
	content: "";
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1.1rem;
	height: 0.85rem;
	background: url("../assets/images/arrow-white.svg") center / contain no-repeat;
	transition: transform 250ms ease;
}

.ejma-last-news__archives a:hover {
	color: var(--wp--preset--color--white);
}

.ejma-last-news__archives a:hover::after {
	transform: translateY(-50%) translateX(0.3rem);
}

/* ===========================================================
   GALLERY — is-style-logo-grid : images centrées dans chaque cellule
   =========================================================== */

.wp-block-gallery.is-style-logo-grid .wp-block-image {
	display: flex;
	align-items: center;
	justify-content: center;
}

.wp-block-gallery.is-style-logo-grid .wp-block-image a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.wp-block-gallery.is-style-logo-grid .wp-block-image img {
	width: auto;
	max-height: 100px;
	-o-object-fit: contain;
	   object-fit: contain;
}

/* ===========================================================
   COVER BLOCK STYLES — Circle
   Le focal point picker natif du bloc contrôle object-position (img)
   et background-position (background-image) — rien de plus à faire.
   =========================================================== */

.wp-block-cover.is-style-circle {
	border-radius: 50%;
	overflow: hidden;
	aspect-ratio: 1 / 1;
}

.wp-block-cover.is-style-circle .wp-block-cover__image-background {
	border-radius: 50%;
}

/* ===========================================================
   IMAGE BLOCK STYLES — Circle / Circle mini / Circle big
   =========================================================== */

.wp-block-image.is-style-rounded-img img,
.wp-block-image.is-style-rounded-mini-img img,
.wp-block-image.is-style-rounded-big-img img {
	border-radius: 50%;
	aspect-ratio: 1 / 1;
	-o-object-fit: cover;
	   object-fit: cover;
	display: block;
}

.wp-block-image.is-style-rounded-mini-img img {
	max-width: 80px;
}

.wp-block-image.is-style-rounded-big-img img {
	max-width: 320px;
}

/* ===========================================================
   FACETWP — style EJMA
   =========================================================== */

.facetwp-facet {
	width: 100%;
	margin-bottom: 0;
}

.facetwp-facet .facetwp-counter {
	display: none;
}

/* ── Inputs génériques ──────────────────────────────────────── */

.facetwp-facet input,
.facetwp-facet textarea,
.facetwp-facet select,
.facetwp-facet .facetwp-input-wrap {
	width: 100%;
	line-height: 1.25;
	max-height: 46px;
}

/* ── Icône recherche ────────────────────────────────────────── */

.facetwp-icon {
	display: flex;
	justify-content: center;
	align-items: center;
	right: auto !important;
	left: 0;
	min-width: 42px;
	opacity: 1 !important;
}

.facetwp-icon::before {
	display: none !important;
}

.facetwp-icon::after {
	content: "";
	display: flex;
	align-items: center;
	width: 16px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='%231c1c1c'%3E%3Cpath d='M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── Search ─────────────────────────────────────────────────── */

/* dc26-base force padding pill + border:0 — on remet rectangulaire avec border */

.facetwp-type-search .facetwp-input-wrap {
	padding: 0;
	border-radius: 0;
}

.facetwp-type-search .facetwp-input-wrap input.facetwp-search {
	height: 46px;
	min-width: 240px;
	padding: 6px 12px 6px 42px;
	border: 3px solid var(--wp--preset--color--black);
	border-radius: 0;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--wide);
	font-size: var(--wp--preset--font-size--regular);
}

.facetwp-type-search .facetwp-input-wrap input.facetwp-search::-moz-placeholder {
	color: var(--facet-color-muted, #8e8e8e);
	opacity: 1;
	font-family: var(--wp--preset--font-family--wide);
}

.facetwp-type-search .facetwp-input-wrap input.facetwp-search::placeholder {
	color: var(--facet-color-muted, #8e8e8e);
	opacity: 1;
	font-family: var(--wp--preset--font-family--wide);
}

/* ── Date ───────────────────────────────────────────────────── */

.facetwp-facet-date {
	position: relative;
}

.facetwp-facet-date::before {
	content: "";
	display: inline-flex;
	justify-content: center;
	align-items: center;
	position: absolute;
	left: 0;
	width: 42px;
	height: 100%;
	opacity: 0.5;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512' fill='%231c1c1c'%3E%3Cpath d='M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192H400V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V192z'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.facetwp-facet-date input.facetwp-date {
	padding-left: 42px;
}

/* ── Facet « tranches d'âge » : gros mots cliquables centrés ── */

.facetwp-facet-tranches_age {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
}

@media (min-width: 768px) {
	.facetwp-facet-tranches_age { gap: 2.5rem; }
}

.facetwp-facet-tranches_age .facetwp-checkbox {
	padding-left: 0;
	font-family: var(--wp--preset--font-family--title);
	font-size: var(--wp--preset--font-size--xxl);
	text-align: center;
	opacity: 0.3;
	cursor: pointer;
	transition: opacity 300ms ease, color 200ms ease;
}

.facetwp-facet-tranches_age .facetwp-checkbox::before,
.facetwp-facet-tranches_age .facetwp-checkbox::after {
	display: none;
}

.facetwp-facet-tranches_age .facetwp-checkbox:hover {
	opacity: 1;
}

.facetwp-facet-tranches_age .facetwp-checkbox.checked {
	opacity: 1;
	color: var(--wp--preset--color--primary);
}

.facetwp-facet-tranches_age .facetwp-checkbox .term-description {
	font-family: var(--wp--preset--font-family--base);
	font-size: var(--wp--preset--font-size--small);
	margin-top: 0.2rem;
	opacity: 0.8;
}

/* ── Checkboxes génériques ──────────────────────────────────── */

.facetwp-type-checkboxes .facetwp-checkbox {
	display: flex;
	flex-direction: column;
	margin-bottom: 0.5rem;
	cursor: pointer;
}

.facetwp-type-checkboxes .facetwp-checkbox .term-description {
	order: 1;
}

/* ── fSelect (multi-select dropdown) ────────────────────────── */

.facetwp-type-fselect .fs-wrap.multiple {
	width: 240px;
}

.facetwp-type-fselect .fs-wrap.multiple .fs-label-wrap {
	border: none;
}

.facetwp-type-fselect .fs-wrap.multiple .fs-label {
	border: 3px solid var(--wp--preset--color--black);
	background-color: var(--wp--preset--color--light);
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--heading);
	padding: 0.75rem 2.25rem 0.75rem 1rem;
	outline: none;
	cursor: pointer;
}

.facetwp-type-fselect .fs-wrap.multiple .fs-arrow {
	width: 1.75rem;
	height: 1.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	right: 0.5rem;
}

.facetwp-type-fselect .fs-wrap.multiple .fs-dropdown {
	border: 3px solid var(--wp--preset--color--black);
}

.facetwp-type-fselect .fs-wrap.multiple .fs-dropdown .fs-search {
	margin-bottom: 1rem;
	background: transparent;
	padding: 1rem 1.5rem 0;
}

.facetwp-type-fselect .fs-wrap.multiple .fs-dropdown .fs-search input {
	border: none;
	border-bottom: 2px solid rgba(0, 0, 0, 0.2);
	border-radius: 0;
	font-size: var(--wp--preset--font-size--small);
	font-family: var(--wp--preset--font-family--base);
}

.facetwp-type-fselect .fs-wrap.multiple .fs-dropdown .fs-options {
	padding: 0 0.5rem;
}

.facetwp-type-fselect .fs-wrap.multiple .fs-dropdown .fs-option {
	margin-bottom: 0.5rem;
}

.facetwp-type-fselect .fs-wrap.multiple .fs-dropdown .fs-option:last-of-type {
	margin-bottom: 0;
}

.facetwp-type-fselect .fs-wrap.multiple .fs-dropdown .fs-checkbox {
	position: absolute;
}

.facetwp-type-fselect .fs-wrap.multiple .fs-dropdown .fs-checkbox i {
	display: none;
}

.facetwp-type-fselect .fs-wrap.multiple .fs-dropdown .fs-option-label {
	white-space: pre-wrap;
	font-size: var(--wp--preset--font-size--small);
}

/* ── Reset : lien fancy ─────────────────────────────────────── */

.facetwp-type-reset .facetwp-reset {
	position: relative;
	padding-bottom: 0.5rem;
	font-family: var(--wp--preset--font-family--heading);
	cursor: pointer;
	transition: color 200ms ease;
}

.facetwp-type-reset .facetwp-reset:hover {
	color: var(--wp--preset--color--primary);
}

.facetwp-type-reset .facetwp-reset::after {
	content: "";
	position: absolute;
	bottom: 0;
	right: 0;
	height: 4px;
	width: 0;
	background-color: var(--wp--preset--color--primary);
	transition: width 200ms ease, left 200ms ease, right 200ms ease;
}

.facetwp-type-reset .facetwp-reset:hover::after {
	right: auto;
	left: 0;
	width: 100%;
}

/* ── Radio ───────────────────────────────────────────────────── */

.facetwp-type-radio .facetwp-radio {
	background-image: none;
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 1.8rem;
	cursor: pointer;
	padding-left: 2.5rem;
	font-size: var(--wp--preset--font-size--regular);
	line-height: 1.5rem;
}

.facetwp-type-radio .facetwp-radio::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	height: 1.5rem;
	width: 1.5rem;
	border-radius: 9999px;
	border: 3px solid var(--wp--preset--color--black);
	background-color: var(--wp--preset--color--white);
	transition: border-color 200ms ease;
}

.facetwp-type-radio .facetwp-radio::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 50%;
	transform: translateY(-50%) scale(0);
	height: 0.75rem;
	width: 0.75rem;
	border-radius: 9999px;
	background-color: var(--wp--preset--color--primary);
	opacity: 0;
	transition: transform 300ms ease, opacity 300ms ease;
}

.facetwp-type-radio .facetwp-radio.checked::before {
	border-color: var(--wp--preset--color--primary);
}

.facetwp-type-radio .facetwp-radio.checked::after {
	transform: translateY(-50%) scale(1);
	opacity: 1;
}

/* ── Monthly ─────────────────────────────────────────────────── */

.facetwp-facet.facetwp-type-monthly .facetwp-type-radio {
	flex-direction: row;
	gap: 1.5rem;
}

.facetwp-facet.facetwp-type-monthly .facetwp-radio {
	padding-top: 0;
	justify-content: center;
	font-family: var(--wp--preset--font-family--wide);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.25;
}

/* ===========================================================
   FOOTER EJMA
   =========================================================== */

.ejma-footer {
	margin-block-start: 0;
}

/* Colonnes : responsive (empilées sur mobile). */

@media (max-width: 781px) {
	.ejma-footer .wp-block-columns {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--wp--preset--spacing--40);
	}
	.ejma-footer .wp-block-column:empty {
		display: none;
	}
}

/* Réseaux sociaux centrés sur mobile. */

@media (max-width: 640px) {
	.ejma-footer .wp-block-social-links.is-content-justification-left {
		justify-content: center;
	}
}

/* Barre copyright. */

.ejma-copyright {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ejma-copyright p {
	margin: 0 0 0 1rem;
}

.ejma-copyright a {
	color: inherit;
	text-decoration: underline;
}

/* ===========================================================
   GRAVITY FORMS — style EJMA (boutons hérités de _buttons.css)
   =========================================================== */

.gform_wrapper.gravity-theme .gform_footer button,
.gform_wrapper.gravity-theme .gform_footer input[type="submit"],
.gform_wrapper.gravity-theme .gform_page_footer button,
.gform_wrapper.gravity-theme .gform_page_footer input[type="submit"] {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: 0;
	padding: 0.75rem 1.5rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	transition: all 200ms ease;
	cursor: pointer;
}

.gform_wrapper.gravity-theme .gform_footer input[type="submit"]:hover,
.gform_wrapper.gravity-theme .gform_page_footer input[type="submit"]:hover {
	background-color: transparent;
	color: var(--wp--preset--color--primary);
}

/* Bandeau d'erreurs de validation : accent primaire. */

.gform_wrapper.gravity-theme .gform_validation_errors {
	border-color: var(--wp--preset--color--primary);
}

/* ===========================================================
   NAVIGATION MULTISTEP — boutons ronds précédent / suivant
   =========================================================== */

.gform_wrapper.gravity-theme .gform_page_footer input[type="button"].gform_next_button,
.gform_wrapper.gravity-theme .gform_page_footer input[type="button"].gform_previous_button {
	width: 80px;
	height: 80px;
	padding: 0;
	border-radius: 9999px;
	font-size: 0;
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 40% auto;
	border: 3px solid var(--wp--preset--color--gray-dark, #1c1c1c);
	opacity: 0.35;
	cursor: pointer;
	transition: opacity 300ms ease, background-color 300ms ease;
	background-image: url("../assets/images/arrow-short-black.svg");
}

.gform_wrapper.gravity-theme .gform_page_footer input[type="button"].gform_next_button {
	margin-left: auto;
	opacity: 1;
	background-color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	background-image: url("../assets/images/arrow-short-white.svg");
}

.gform_wrapper.gravity-theme .gform_page_footer input[type="button"].gform_previous_button {
	transform: rotate(180deg);
}

.gform_wrapper.gravity-theme .gform_page_footer input[type="button"].gform_previous_button:hover {
	opacity: 1;
}

/* ===========================================================
   NEWSLETTER (form 1) — input group email + flèche
   =========================================================== */

/* .gform-body en display:contents pour que les champs soient
   des flex-items directs du <form> aux côtés du .gform_footer. */

#gform_wrapper_1 .gform-body {
	display: contents;
}

#gform_wrapper_1 {
	max-width: 480px;
}

#gform_wrapper_1 form {
	display: flex;
	align-items: stretch;
}

#gform_wrapper_1 .gform_fields {
	flex: 1;
	margin: 0;
	padding: 0;
	display: block;
}

#gform_wrapper_1 .gfield {
	margin: 0 !important;
	padding: 0;
}

#gform_wrapper_1 .ginput_container_email {
	height: 100%;
}

#gform_wrapper_1 .ginput_container_email input[type="email"] {
	width: 100%;
	height: 100%;
	border: 2px solid var(--wp--preset--color--gray-dark, #1c1c1c);
	border-right: none;
	border-radius: 0;
	padding: 0.875rem 1.25rem;
	background: transparent;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	color: inherit;
	box-shadow: none;
	outline: none;
}

#gform_wrapper_1 .ginput_container_email input[type="email"]:focus {
	box-shadow: none;
	outline: none;
}

/* Footer : bord droit du groupe + flèche via ::after
   (fonctionne avec input[type=submit] qui ne supporte pas les pseudo-éléments). */

#gform_wrapper_1 .gform-footer,
#gform_wrapper_1 .gform_footer {
	position: relative;
	flex-shrink: 0;
	margin: 0 !important;
	padding: 0 !important;
	border: 2px solid var(--wp--preset--color--gray-dark, #1c1c1c);
	transition: background-color 200ms ease;
}

#gform_wrapper_1 .gform_footer::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: url("../assets/images/arrow-black.svg") center / 1.2rem auto no-repeat;
}

#gform_wrapper_1 .gform_footer:has(.gform_button:hover) {
	background-color: var(--wp--preset--color--primary);
}

#gform_wrapper_1 .gform_footer:has(.gform_button:hover)::after {
	background-image: url("../assets/images/arrow-white.svg");
}

/* Bouton : transparent, texte masqué, surface cliquable.
   !important nécessaire pour neutraliser les styles gravity-theme globaux. */

#gform_wrapper_1 .gform_footer .gform_button {
	display: block;
	width: 3.25rem;
	height: 100%;
	background-color: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	color: transparent !important;
	font-size: 0 !important;
	padding: 0 !important;
	cursor: pointer;
}
