/*
 * APEEF Fauriel — composants du thème.
 *
 * Couleurs, polices, tailles et espacements viennent de theme.json (variables
 * --wp--preset--*). Ce fichier ne décrit que les composants : en-tête, cartes,
 * compte à rebours, sections de l'accueil, pied de page.
 *
 * Sommaire
 *   1. Réglages généraux
 *   2. Boutons
 *   3. En-tête et bandeau d'annonce
 *   4. Accueil : hero et « Prochain rendez-vous »
 *   5. Sections, surtitres
 *   6. « Nos rendez-vous » : onglets et cartes
 *   7. Ventes solidaires (WooCommerce)
 *   8. « Où va l'argent ? »
 *   9. Bénévolat
 *  10. Pages, articles, événement
 *  11. Pied de page
 *  12. Animations
 */

:root {
	--apeef-creme: var(--wp--preset--color--creme, #FFF7EC);
	--apeef-blanc: var(--wp--preset--color--blanc, #FFFFFF);
	--apeef-sable: var(--wp--preset--color--sable, #F0E3D2);
	--apeef-terre: var(--wp--preset--color--terre, #33241A);
	--apeef-terre-clair: var(--wp--preset--color--terre-clair, #463326);
	--apeef-terre-doux: var(--wp--preset--color--terre-doux, #6B5646);
	--apeef-corail: var(--wp--preset--color--corail, #C4452F);
	--apeef-corail-fonce: var(--wp--preset--color--corail-fonce, #9E3522);
	--apeef-corail-pale: var(--wp--preset--color--corail-pale, #FCE3DC);
	--apeef-feuille: var(--wp--preset--color--feuille, #7FA400);
	--apeef-feuille-fonce: var(--wp--preset--color--feuille-fonce, #3F5800);
	--apeef-feuille-pale: var(--wp--preset--color--feuille-pale, #EEF5D6);
	--apeef-soleil: var(--wp--preset--color--soleil, #FFC21A);
	--apeef-soleil-pale: var(--wp--preset--color--soleil-pale, #FFE9A8);
	--apeef-titre: var(--wp--preset--font-family--titre, Fredoka, sans-serif);
	--apeef-ombre-douce: var(--wp--preset--shadow--douce, 0 12px 34px rgba(51, 36, 26, 0.08));
	--apeef-ombre-portee: var(--wp--preset--shadow--portee, 0 24px 60px rgba(51, 36, 26, 0.14));
	--apeef-ressort: cubic-bezier(0.2, 0.7, 0.2, 1);

	/* Icônes (le trait prend la couleur du texte grâce à mask-image). */
	--apeef-i-fleche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
	--apeef-i-coeur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 5.6a5 5 0 0 0-7.1 0L12 7.3l-1.7-1.7a5 5 0 1 0-7.1 7.1L12 21.5l8.8-8.8a5 5 0 0 0 0-7.1z'/%3E%3C/svg%3E");
}

/* ─── 1. Réglages généraux ─────────────────────────────────────────────── */

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

/* En-tête, contenu et pied de page se touchent : chaque section gère ses marges. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

::selection {
	background: var(--apeef-soleil-pale);
	color: var(--apeef-terre);
}

:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--apeef-corail);
	outline-offset: 3px;
}

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

/* Le panneau « Déjà passés » est masqué d'emblée quand JavaScript est actif. */
.apeef-js [data-apeef-masque] {
	display: none;
}

/* Consigne visible uniquement dans l'éditeur (aperçu des blocs). */
.apeef-consigne {
	margin: 0;
	padding: 0.9rem 1.1rem;
	border: 2px dashed var(--apeef-sable);
	border-radius: 14px;
	background: var(--apeef-blanc);
	color: var(--apeef-terre-doux);
	font-size: 0.875rem;
	line-height: 1.5;
}

.apeef-icone {
	flex-shrink: 0;
}

/* ─── 2. Boutons ───────────────────────────────────────────────────────── */

.wp-block-button__link,
.wp-element-button {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 3.25rem;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--apeef-ressort), box-shadow 0.2s ease;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(196, 69, 47, 0.22);
}

.wp-block-button__link:active,
.wp-element-button:active {
	transform: translateY(0);
	box-shadow: none;
}

/* Style « Contour » */
.wp-block-button.is-style-contour .wp-block-button__link {
	border: 2px solid var(--apeef-terre);
	background: var(--apeef-blanc);
	color: var(--apeef-terre);
}

.wp-block-button.is-style-contour .wp-block-button__link:hover {
	background: var(--apeef-terre);
	color: var(--apeef-blanc);
	box-shadow: 0 10px 22px rgba(51, 36, 26, 0.18);
}

/* Style « Brun » */
.wp-block-button.is-style-sombre .wp-block-button__link {
	background: var(--apeef-terre);
	color: var(--apeef-blanc);
}

.wp-block-button.is-style-sombre .wp-block-button__link:hover {
	background: var(--apeef-terre-clair);
	box-shadow: 0 10px 22px rgba(51, 36, 26, 0.22);
}

/* Flèche après le texte (classe « apeef-bouton-fleche » sur le bouton). */
.apeef-bouton-fleche .wp-block-button__link::after {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--apeef-i-fleche) center / contain no-repeat;
	mask: var(--apeef-i-fleche) center / contain no-repeat;
	transition: transform 0.25s var(--apeef-ressort);
}

.apeef-bouton-fleche .wp-block-button__link:hover::after {
	transform: translateX(4px);
}

/* Bouton pleine largeur (cartes d'événement). */
.apeef-bouton-plein {
	width: 100%;
}

.apeef-bouton-plein .wp-block-button__link {
	width: 100%;
}

.apeef-bouton-large .wp-block-button__link {
	min-height: 3.5rem;
	font-size: 1.0625rem;
}

/* ─── 3. En-tête et bandeau d'annonce ──────────────────────────────────── */

/* Collant : le bandeau remonte avec la page (--apeef-bandeau-h, mesuré par
   apeef.js), la barre de navigation reste en haut de l'écran. C'est la partie
   <header> elle-même qui colle (enfant direct de la page), quel que soit le modèle
   qui l'appelle, y compris ceux de WooCommerce. */
.wp-site-blocks > .wp-block-template-part:has(> .apeef-entete) {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) - var(--apeef-bandeau-h, 0px));
	z-index: 50;
}

@media (max-width: 600px) {
	/* La barre d'administration n'est plus fixe sur téléphone. */
	.admin-bar .wp-site-blocks > .wp-block-template-part:has(> .apeef-entete) {
		top: calc(0px - var(--apeef-bandeau-h, 0px));
	}
}

.apeef-bandeau {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.4rem 0.9rem;
	min-height: 46px;
	padding: 0.55rem clamp(1rem, 5vw, 5rem);
	background: var(--apeef-terre);
	color: var(--apeef-creme);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
}

.apeef-bandeau__pastille {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.65rem;
	border-radius: 99px;
	background: var(--apeef-soleil);
	color: var(--apeef-terre);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	animation: apeef-pulsation 2.8s ease-in-out infinite;
}

.apeef-bandeau__lien,
.apeef-bandeau__lien:hover {
	color: var(--apeef-soleil);
	font-weight: 800;
	text-decoration: none;
}

.apeef-bandeau__lien span {
	display: inline-block;
	transition: transform 0.25s var(--apeef-ressort);
}

.apeef-bandeau__lien:hover span {
	transform: translateX(4px);
}

.apeef-entete__barre {
	border-bottom: 1px solid var(--apeef-sable);
	transition: box-shadow 0.3s ease;
}

.apeef-entete.est-defile .apeef-entete__barre {
	box-shadow: 0 10px 30px rgba(51, 36, 26, 0.09);
}

.apeef-entete__ligne {
	min-height: 5rem;
	gap: 1.5rem;
}

.apeef-entete .wp-block-site-logo img {
	max-width: min(150px, 34vw);
	height: auto;
}

.apeef-entete .wp-block-navigation {
	flex: 1 1 auto;
}

.apeef-entete .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.6rem 0;
	border-bottom: 3px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.apeef-entete .wp-block-navigation .wp-block-navigation-item__content:hover {
	border-bottom-color: var(--apeef-corail-pale);
}

.apeef-entete .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.apeef-entete .wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] {
	border-bottom-color: var(--apeef-corail);
}

/* Bouton du menu mobile */
.apeef-entete .wp-block-navigation__responsive-container-open {
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: var(--apeef-terre);
	color: var(--apeef-blanc);
}

.apeef-entete .wp-block-navigation__responsive-container-open svg {
	width: 22px;
	height: 22px;
}

/* Menu ouvert (plein écran) */
.apeef-entete .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 1.5rem;
}

.apeef-entete .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 0.4rem;
}

.apeef-entete .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--apeef-titre);
	font-size: 1.75rem;
	font-weight: 700;
}

.apeef-entete .wp-block-navigation__responsive-container-close {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--apeef-blanc);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Le menu passe en bouton sous 1100 px (WordPress le fait à 600 px seulement) :
   cinq entrées, le logo et deux boutons ne tiennent pas sur une tablette. */
@media (max-width: 1099px) {
	.apeef-entete .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.apeef-entete .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}

	.apeef-entete .wp-block-navigation {
		flex: 0 0 auto;
		order: 3;
	}

	.apeef-entete .apeef-entete__actions {
		margin-left: auto;
	}

	/* Le compte client rejoint le panier, à droite. */
	.apeef-entete .wp-block-woocommerce-customer-account {
		margin-left: auto;
	}

	.apeef-entete .wp-block-woocommerce-customer-account + .apeef-entete__actions {
		margin-left: 0;
	}
}

.apeef-entete__actions {
	flex-shrink: 0;
}

/* Mini-panier WooCommerce */
.apeef-entete .wc-block-mini-cart__button {
	position: relative;
	width: 48px;
	height: 48px;
	padding: 0;
	justify-content: center;
	border-radius: 14px;
	background: var(--apeef-creme);
	color: var(--apeef-terre);
	transition: background-color 0.2s ease;
}

.apeef-entete .wc-block-mini-cart__button:hover {
	background: var(--apeef-sable);
	opacity: 1;
}

.apeef-entete .wc-block-mini-cart__badge {
	background: var(--apeef-corail);
	color: var(--apeef-blanc);
	border: 2px solid var(--apeef-blanc);
	font-weight: 800;
}

/* Compte client (ajouté par WooCommerce à côté de la navigation) : même pastille que le panier. */
.apeef-entete .wc-block-customer-account__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border-radius: 14px;
	background: var(--apeef-creme);
	color: var(--apeef-terre);
	transition: background-color 0.2s ease;
}

.apeef-entete .wc-block-customer-account__link:hover {
	background: var(--apeef-sable);
}

.apeef-entete .wc-block-customer-account__account-icon {
	width: 22px;
	height: 22px;
}

/* « Je donne un coup de main » */
.apeef-bouton-aide .wp-block-button__link {
	min-height: 48px;
	padding: 0 1.35rem;
	border-radius: 14px;
	font-size: 0.9375rem;
	white-space: nowrap;
}

.apeef-bouton-aide .wp-block-button__link::before {
	content: "";
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	background: currentColor;
	-webkit-mask: var(--apeef-i-coeur) center / contain no-repeat;
	mask: var(--apeef-i-coeur) center / contain no-repeat;
}

.apeef-bouton-aide .wp-block-button__link:hover::before {
	animation: apeef-battement 0.9s ease-in-out;
}

@media (min-width: 1100px) and (max-width: 1279px) {
	/* Le cœur seul : le texte reste lu par les lecteurs d'écran. */
	.apeef-bouton-aide .wp-block-button__link {
		width: 48px;
		padding: 0;
		font-size: 0;
		gap: 0;
	}
}

@media (max-width: 600px) {
	.apeef-entete__ligne {
		min-height: 4.5rem;
		gap: 0.5rem;
	}

	.apeef-entete .wc-block-mini-cart__button,
	.apeef-entete .wc-block-customer-account__link {
		width: 44px;
		height: 44px;
		border-radius: 12px;
	}

	.apeef-entete .apeef-bouton-aide {
		display: none;
	}

	.apeef-bandeau {
		gap: 0.3rem 0.6rem;
		min-height: 44px;
		font-size: 0.8125rem;
		font-weight: 700;
	}
}

/* ─── 4. Accueil : hero et « Prochain rendez-vous » ────────────────────── */

.apeef-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

/* Deux bulles de couleur qui flottent doucement derrière le texte. */
.apeef-hero::before,
.apeef-hero::after {
	content: "";
	position: absolute;
	z-index: -1;
	border-radius: 50%;
	pointer-events: none;
}

.apeef-hero::before {
	left: -120px;
	top: 55%;
	width: 360px;
	height: 360px;
	background: var(--apeef-feuille-pale);
	animation: apeef-flotte 14s ease-in-out infinite;
}

.apeef-hero::after {
	right: 30%;
	top: -140px;
	width: 300px;
	height: 300px;
	background: var(--apeef-soleil-pale);
	animation: apeef-flotte 11s ease-in-out -4s infinite reverse;
}

.apeef-hero__colonnes {
	gap: clamp(2rem, 5vw, 4rem);
}

.apeef-pastille-lieu {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: fit-content;
	padding: 0.5rem 0.9rem;
	border: 1px solid var(--apeef-sable);
	border-radius: 99px;
	background: var(--apeef-blanc);
	color: var(--apeef-terre-doux);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
}

.apeef-pastille-lieu::before {
	content: "";
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234C6A00' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21V11'/%3E%3Cpath d='M12 11c0-4 3-6 7-6 0 4-3 6-7 6z'/%3E%3Cpath d='M12 14c0-3-2.5-5-6-5 0 3 2.5 5 6 5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.apeef-hero h1 {
	letter-spacing: -0.015em;
	line-height: 1.02;
	text-wrap: balance;
}

/* Le mot surligné du titre (surlignage « couleur » de l'éditeur) : un trait
   de feutre qui se dessine à l'arrivée. */
.apeef-hero h1 mark {
	position: relative;
	background: none;
	white-space: nowrap;
}

.apeef-hero h1 mark::after {
	content: "";
	position: absolute;
	left: -2%;
	right: -2%;
	bottom: -0.12em;
	height: 0.28em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 14c40-9 90-12 194-6' fill='none' stroke='%23FFC21A' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	z-index: -1;
	transform-origin: left center;
	animation: apeef-trait 0.9s 0.4s var(--apeef-ressort) both;
}

.apeef-chapo {
	max-width: 36rem;
	color: var(--apeef-terre-doux);
	font-size: var(--wp--preset--font-size--moyen);
	line-height: 1.6;
	text-wrap: pretty;
}

/* Carte « Prochain rendez-vous » */
.apeef-rdv {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 28px;
	background: var(--apeef-blanc);
	box-shadow: var(--apeef-ombre-portee);
}

.apeef-rdv__tete {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 0.4rem;
	min-height: 210px;
	padding: 1.6rem 1.9rem;
	overflow: hidden;
	background: var(--apeef-fond, var(--apeef-terre));
	isolation: isolate;
}

.apeef-rdv__tete .apeef-illustration {
	position: absolute;
	right: 18px;
	top: 18px;
	z-index: -1;
	width: 170px;
	height: 170px;
	transform-origin: 50% 95%;
	animation: apeef-balance 6s ease-in-out infinite;
}

.apeef-rdv__tete--image .apeef-visuel__image {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Voile pour garder le titre lisible sur une photo. */
.apeef-rdv__tete--image::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(51, 36, 26, 0) 25%, rgba(51, 36, 26, 0.88) 100%);
}

.apeef-rdv__surtitre {
	color: var(--apeef-soleil);
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.apeef-rdv__titre,
a.apeef-rdv__titre:hover {
	max-width: 80%;
	color: var(--apeef-blanc);
	font-family: var(--apeef-titre);
	font-size: clamp(1.9rem, 3vw, 2.5rem);
	font-weight: 700;
	line-height: 1.02;
	text-decoration: none;
	text-wrap: balance;
}

a.apeef-rdv__titre:hover {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 5px;
}

.apeef-rdv__tete--image .apeef-rdv__titre {
	max-width: none;
}

.apeef-rdv__corps {
	display: flex;
	flex-direction: column;
	gap: 1.4rem;
	padding: 1.75rem 1.9rem 1.9rem;
}

.apeef-rdv__corps > .wp-block-buttons {
	display: block;
	margin: 0;
}

.apeef-rdv__attente {
	margin: 0;
	color: var(--apeef-terre-doux);
	font-size: 1.0625rem;
}

/* Compte à rebours */
.apeef-compte {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.apeef-compte__case {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.2rem;
	padding: 0.8rem 0 0.7rem;
	border-radius: 16px;
	background: var(--apeef-creme);
}

.apeef-compte__nombre {
	font-family: var(--apeef-titre);
	font-size: clamp(1.6rem, 2.6vw, 2.125rem);
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.apeef-compte__case:last-child .apeef-compte__nombre {
	color: var(--apeef-corail);
}

.apeef-compte__unite {
	color: var(--apeef-terre-doux);
	font-size: 0.75rem;
	font-weight: 700;
}

.apeef-compte--fini .apeef-compte__case {
	background: var(--apeef-soleil-pale);
}

/* Date, horaires, lieu */
.apeef-infos {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 1rem;
	font-weight: 600;
}

.apeef-infos li {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin: 0;
}

.apeef-infos .apeef-icone {
	color: var(--apeef-corail);
}

/* Missions bénévoles */
.apeef-missions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.apeef-missions li {
	margin: 0;
	padding: 0.45rem 0.8rem;
	border-radius: 99px;
	background: var(--apeef-feuille-pale);
	color: var(--apeef-feuille-fonce);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.2;
}

@media (max-width: 781px) {
	.apeef-hero::before {
		display: none;
	}

	.apeef-hero::after {
		right: -80px;
		top: -70px;
		width: 200px;
		height: 200px;
	}

	.apeef-hero .wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
	}

	.apeef-hero .wp-block-button,
	.apeef-hero .wp-block-button__link {
		width: 100%;
	}

	.apeef-rdv {
		border-radius: 24px;
	}

	.apeef-rdv__tete {
		min-height: 150px;
		padding: 1.25rem 1.4rem;
	}

	.apeef-rdv__tete .apeef-illustration {
		right: 10px;
		top: 12px;
		width: 118px;
		height: 118px;
	}

	.apeef-rdv__corps {
		gap: 1.1rem;
		padding: 1.25rem 1.25rem 1.4rem;
	}

	.apeef-compte {
		gap: 8px;
	}

	.apeef-compte__case {
		padding: 0.65rem 0 0.55rem;
		border-radius: 14px;
	}

	.apeef-compte__unite {
		font-size: 0.6875rem;
	}
}

/* ─── 5. Sections, surtitres ───────────────────────────────────────────── */

.apeef-surtitre {
	margin: 0;
	color: var(--apeef-corail);
	font-size: 0.875rem;
	font-weight: 800;
	letter-spacing: 0.09em;
	line-height: 1.3;
	text-transform: uppercase;
}

.apeef-section h2 {
	text-wrap: balance;
}

.apeef-section__tete {
	gap: 1.5rem;
}

.apeef-section__tete > .wp-block-group {
	gap: 0.6rem;
}

.apeef-section__tete h2,
.apeef-section__tete p {
	margin: 0;
}

.apeef-section__intro {
	max-width: 29rem;
	color: var(--apeef-terre-doux);
	font-size: 1.125rem;
	line-height: 1.6;
}

/* ─── 6. « Nos rendez-vous » : onglets et cartes ───────────────────────── */

.apeef-evenements {
	display: flex;
	flex-direction: column;
	gap: 2.25rem;
}

.apeef-onglets {
	display: inline-flex;
	align-self: flex-start;
	gap: 6px;
	padding: 6px;
	border-radius: 16px;
	background: var(--apeef-creme);
}

.apeef-onglet {
	height: 44px;
	padding: 0 1.25rem;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--apeef-terre);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.apeef-onglet:hover {
	background: var(--apeef-sable);
}

.apeef-onglet[aria-selected="true"] {
	background: var(--apeef-terre);
	color: var(--apeef-blanc);
	font-weight: 800;
}

/* Sur grand écran, les onglets se rangent à droite du titre de la section. */
@media (min-width: 900px) {
	/* Place libre à droite pour les onglets (une largeur maximale décentrerait le
	   titre dans la mise en page « contrainte »). */
	.apeef-section__tete:has(+ .apeef-evenements) {
		padding-inline-end: 22rem;
	}

	.apeef-section__tete + .apeef-evenements {
		margin-block-start: 2.25rem;
	}

	.apeef-section__tete + .apeef-evenements > .apeef-onglets {
		align-self: flex-end;
		margin-top: calc(-56px - 2.25rem);
	}
}

.apeef-evenements__vide {
	margin: 0;
	color: var(--apeef-terre-doux);
}

.apeef-grille {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 28px;
}

.apeef-grille[hidden] {
	display: none;
}

.apeef-carte {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 24px;
	background: var(--apeef-creme);
	transition: transform 0.3s var(--apeef-ressort), box-shadow 0.3s ease;
}

.apeef-carte--a-venir {
	border-color: var(--apeef-corail);
}

.apeef-carte:hover {
	transform: translateY(-6px);
	box-shadow: var(--apeef-ombre-portee);
}

.apeef-carte:focus-within {
	outline: 3px solid var(--apeef-corail);
	outline-offset: 3px;
}

.apeef-carte:focus-within .apeef-carte__lien:focus-visible {
	outline: none;
}

.apeef-carte__visuel {
	position: relative;
	height: 240px;
	overflow: hidden;
	background: var(--apeef-terre);
}

.apeef-carte__visuel .apeef-visuel__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
	transition: transform 0.6s var(--apeef-ressort);
}

.apeef-carte:hover .apeef-visuel__image {
	transform: scale(1.05);
}

/* Scènes illustrées par défaut : le sujet est au centre, un peu bas. */
.apeef-carte__visuel .apeef-visuel__scene {
	object-position: center 55%;
}

.apeef-rdv__tete .apeef-visuel__scene {
	object-position: center 72%;
}

.apeef-visuel__repli {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	background: var(--apeef-fond, var(--apeef-terre));
}

/* Couleur de fond de chaque illustration (inc/illustrations.php). */
.apeef-fond--citrouille,
.apeef-fond--marche,
.apeef-fond--spectacle,
.apeef-fond--pousse {
	--apeef-fond: #33241A;
}

.apeef-fond--jeux,
.apeef-fond--papillote,
.apeef-fond--loto,
.apeef-fond--kermesse {
	--apeef-fond: #3F5800;
}

.apeef-fond--livre,
.apeef-fond--pizza,
.apeef-fond--vide-grenier {
	--apeef-fond: #463326;
}

.apeef-fond--sapin,
.apeef-fond--carnaval {
	--apeef-fond: #9E3522;
}

.apeef-visuel__repli .apeef-illustration {
	width: 140px;
	height: 140px;
	transform-origin: 50% 95%;
	transition: transform 0.5s var(--apeef-ressort);
}

.apeef-carte:hover .apeef-visuel__repli .apeef-illustration {
	transform: rotate(-4deg) scale(1.06);
}

.apeef-carte__date {
	position: absolute;
	left: 20px;
	top: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 64px;
	padding: 0.5rem 0;
	border-radius: 14px;
	background: var(--apeef-blanc);
	color: var(--apeef-terre);
	box-shadow: 0 6px 16px rgba(51, 36, 26, 0.12);
}

.apeef-carte__jour {
	font-family: var(--apeef-titre);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1;
}

.apeef-carte__mois {
	color: var(--apeef-terre-doux);
	font-size: 0.75rem;
	font-weight: 800;
	text-transform: uppercase;
}

.apeef-carte--a-venir .apeef-carte__mois {
	color: var(--apeef-corail);
}

.apeef-carte__etiquette {
	position: absolute;
	right: 20px;
	top: 22px;
	padding: 0.35rem 0.75rem;
	border-radius: 99px;
	background: var(--apeef-soleil);
	color: var(--apeef-terre);
	font-size: 0.75rem;
	font-weight: 800;
}

.apeef-carte__corps {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.6rem;
	padding: 1.5rem 1.6rem 1.75rem;
}

.apeef-carte__titre {
	margin: 0;
	font-size: 1.625rem;
	line-height: 1.1;
}

.apeef-carte__lien,
.apeef-carte__lien:hover {
	color: var(--apeef-terre);
	text-decoration: none;
}

/* Toute la carte est cliquable. */
.apeef-carte__lien::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.apeef-carte__texte {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--apeef-terre-doux);
	font-size: 1rem;
	line-height: 1.55;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.apeef-carte__action {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: auto;
	padding-top: 0.4rem;
	color: var(--apeef-feuille-fonce);
	font-size: 1rem;
	font-weight: 800;
}

.apeef-carte--a-venir .apeef-carte__action {
	color: var(--apeef-corail);
}

.apeef-carte__action .apeef-icone {
	transition: transform 0.25s var(--apeef-ressort);
}

.apeef-carte:hover .apeef-carte__action .apeef-icone {
	transform: translateX(5px);
}

/* Changement d'onglet : les cartes arrivent l'une après l'autre. */
.apeef-grille--entree > * {
	animation: apeef-entree 0.5s var(--apeef-ressort) both;
}

.apeef-grille--entree > :nth-child(2) { animation-delay: 0.07s; }
.apeef-grille--entree > :nth-child(3) { animation-delay: 0.14s; }
.apeef-grille--entree > :nth-child(4) { animation-delay: 0.21s; }
.apeef-grille--entree > :nth-child(n+5) { animation-delay: 0.28s; }

@media (max-width: 781px) {
	.apeef-onglets {
		display: flex;
		align-self: stretch;
	}

	.apeef-onglet {
		flex: 1;
	}

	.apeef-grille {
		gap: 20px;
	}

	.apeef-carte__visuel {
		height: 200px;
	}

	.apeef-carte__corps {
		padding: 1.25rem 1.3rem 1.4rem;
	}

	.apeef-carte__titre {
		font-size: 1.4rem;
	}
}

/* ─── 7. Ventes solidaires (WooCommerce) ───────────────────────────────── */

.apeef-ventes__colonnes {
	gap: clamp(2rem, 4vw, 3.5rem);
}

.apeef-ventes__texte p:not(.apeef-surtitre) {
	color: var(--apeef-terre-doux);
	font-size: 1.125rem;
}

body .apeef-ventes .woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	gap: 28px;
	margin: 0;
	padding: 0;
}

body .apeef-ventes .woocommerce ul.products::before {
	display: none;
}

body .apeef-ventes .woocommerce ul.products li.product {
	display: flex;
	flex-direction: column;
	float: none;
	clear: none;
	width: auto;
	margin: 0;
	overflow: hidden;
	border-radius: 24px;
	background: var(--apeef-blanc);
	box-shadow: var(--apeef-ombre-douce);
	text-align: left;
	transition: transform 0.3s var(--apeef-ressort), box-shadow 0.3s ease;
}

body .apeef-ventes .woocommerce ul.products li.product:hover {
	transform: translateY(-6px);
	box-shadow: var(--apeef-ombre-portee);
}

/* Pastille « Vente en cours » */
body .apeef-ventes .woocommerce ul.products li.product::before {
	content: "Vente en cours";
	position: absolute;
	left: 18px;
	top: 18px;
	z-index: 2;
	padding: 0.35rem 0.75rem;
	border-radius: 99px;
	background: var(--apeef-feuille);
	color: #1F2A00;
	font-size: 0.75rem;
	font-weight: 800;
}

body .apeef-ventes .woocommerce ul.products li.product .woocommerce-loop-product__link {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: baseline;
	gap: 0 0.75rem;
	padding-bottom: 0.5rem;
	color: var(--apeef-terre);
	text-decoration: none;
}

body .apeef-ventes .woocommerce ul.products li.product img {
	grid-column: 1 / -1;
	width: 100%;
	height: 250px;
	margin: 0 0 1.4rem;
	object-fit: cover;
	border-radius: 0;
	transition: transform 0.6s var(--apeef-ressort);
}

body .apeef-ventes .woocommerce ul.products li.product .woocommerce-loop-product__title {
	margin: 0;
	padding: 0 0 0 1.6rem;
	font-family: var(--apeef-titre);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.1;
}

body .apeef-ventes .woocommerce ul.products li.product .price {
	margin: 0;
	padding: 0 1.6rem 0 0;
	color: var(--apeef-corail);
	font-family: var(--apeef-titre);
	font-size: 1.75rem;
	font-weight: 700;
}

body .apeef-ventes .woocommerce ul.products li.product .onsale {
	display: none;
}

body .apeef-ventes .woocommerce ul.products li.product .button {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	margin: auto 1.6rem 1.6rem;
	padding: 0.85rem 1.2rem;
	line-height: 1.2;
	border-radius: 14px;
	background: var(--apeef-corail);
	color: var(--apeef-blanc);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 800;
}

body .apeef-ventes .woocommerce ul.products li.product .button:hover {
	background: var(--apeef-corail-fonce);
}

body .apeef-ventes .woocommerce ul.products li.product .added_to_cart {
	margin: -0.9rem 1.6rem 1.4rem;
	color: var(--apeef-feuille-fonce);
	font-weight: 800;
	text-align: center;
}

/* Une seule vente en cours : une case « Prochaine vente » complète la grille. */
body .apeef-ventes .woocommerce ul.products:has(> li.product:only-child)::after {
	content: "Les prochaines ventes apparaîtront ici dès leur ouverture.";
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 7.5rem 2rem 2rem;
	border: 2px dashed #E3CFB6;
	border-radius: 24px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 72'%3E%3Ccircle cx='36' cy='36' r='36' fill='%23FFE9A8'/%3E%3Cg transform='translate(20 20) scale(1.333)' fill='none' stroke='%2333241A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12v9H4v-9'/%3E%3Cpath d='M2 7h20v5H2z'/%3E%3Cpath d='M12 21V7'/%3E%3Cpath d='M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z'/%3E%3Cpath d='M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z'/%3E%3C/g%3E%3C/svg%3E") center 2.25rem / 72px no-repeat;
	color: var(--apeef-terre-doux);
	font-size: 0.9375rem;
	line-height: 1.55;
	text-align: center;
}

/* ─── 8. « Où va l'argent ? » ──────────────────────────────────────────── */

.apeef-impact {
	border-radius: 32px;
	color: var(--apeef-creme);
}

/* Sans vente en cours, la section « Ventes solidaires » disparaît : la bande garde
   alors sa respiration sous « Nos rendez-vous ». */
.apeef-section:not(.apeef-ventes) + .apeef-impact {
	margin-block-start: var(--wp--preset--spacing--70);
}

.apeef-impact h2 {
	max-width: 40rem;
	color: var(--apeef-blanc);
	font-size: clamp(1.9rem, 3.2vw, 2.625rem);
	line-height: 1.1;
}

.apeef-impact__tete {
	gap: 2rem;
}

.apeef-impact__chiffre {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.25rem;
}

.apeef-impact__chiffre p {
	margin: 0;
}

.apeef-impact__nombre {
	color: var(--apeef-soleil);
	font-family: var(--apeef-titre);
	font-size: clamp(2.75rem, 5vw, 3.5rem);
	font-weight: 700;
	line-height: 1;
}

.apeef-impact__legende {
	max-width: 15rem;
	color: #E9D9C6;
	font-size: 0.9375rem;
	font-weight: 600;
	text-align: right;
}

.apeef-impact__item {
	display: grid;
	grid-template-columns: 30px 1fr;
	align-content: start;
	column-gap: 1rem;
	padding: 1.5rem;
	border-radius: 22px;
	background: var(--apeef-terre-clair);
	transition: transform 0.3s var(--apeef-ressort), background-color 0.3s ease;
}

.apeef-impact__item:hover {
	transform: translateY(-4px);
	background: #523c2d;
}

.apeef-impact__item::before {
	content: "";
	grid-row: 1 / span 2;
	width: 30px;
	height: 30px;
	background: center / contain no-repeat;
}

.apeef-impact__item--sorties::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFC21A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='11' rx='3'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3Cpath d='M6 10h4M14 10h4'/%3E%3C/svg%3E");
}

.apeef-impact__item--projets::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A6D128' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21V11'/%3E%3Cpath d='M12 11c0-4 3-6 7-6 0 4-3 6-7 6z'/%3E%3Cpath d='M12 14c0-3-2.5-5-6-5 0 3 2.5 5 6 5z'/%3E%3C/svg%3E");
}

.apeef-impact__item--vie::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F58E7B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 5.6a5 5 0 0 0-7.1 0L12 7.3l-1.7-1.7a5 5 0 1 0-7.1 7.1L12 21.5l8.8-8.8a5 5 0 0 0 0-7.1z'/%3E%3C/svg%3E");
}

.apeef-impact__item h3 {
	margin: 0;
	color: var(--apeef-blanc);
	font-family: inherit;
	font-size: 1.125rem;
	font-weight: 800;
	line-height: 1.3;
}

.apeef-impact__item p {
	margin: 0.4rem 0 0;
	color: #E9D9C6;
	font-size: 0.9375rem;
	line-height: 1.55;
}

@media (max-width: 781px) {
	.apeef-impact {
		border-radius: 24px;
	}

	.apeef-impact__chiffre {
		align-items: flex-start;
	}

	.apeef-impact__legende {
		text-align: left;
	}
}

/* ─── 9. Bénévolat ─────────────────────────────────────────────────────── */

.apeef-mission {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	padding: 1.75rem 1.6rem;
	border: 1px solid var(--apeef-sable);
	border-radius: 24px;
	background: var(--apeef-blanc);
	transition: transform 0.3s var(--apeef-ressort), box-shadow 0.3s ease, border-color 0.3s ease;
}

.apeef-mission:hover {
	transform: translateY(-6px) rotate(-0.6deg);
	border-color: transparent;
	box-shadow: var(--apeef-ombre-portee);
}

.apeef-mission::before {
	content: "";
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background: var(--apeef-mission-fond, var(--apeef-creme)) center / 26px no-repeat;
	background-image: var(--apeef-mission-icone);
	transition: transform 0.4s var(--apeef-ressort);
}

.apeef-mission:hover::before {
	transform: scale(1.1) rotate(-6deg);
}

.wp-block-group.apeef-mission > * {
	margin: 0;
}

.apeef-mission h3 {
	font-size: 1.375rem;
}

.apeef-mission p {
	color: var(--apeef-terre-doux);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.apeef-mission--gateau {
	--apeef-mission-fond: var(--apeef-corail-pale);
	--apeef-mission-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C4452F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 18h18v3H3z'/%3E%3Cpath d='M5 18v-5a7 7 0 0 1 14 0v5'/%3E%3Cpath d='M12 3v3'/%3E%3C/svg%3E");
}

.apeef-mission--buvette {
	--apeef-mission-fond: var(--apeef-soleil-pale);
	--apeef-mission-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333241A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h12l-1.5 17a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M5.5 8h13'/%3E%3C/svg%3E");
}

.apeef-mission--maquillage {
	--apeef-mission-fond: var(--apeef-feuille-pale);
	--apeef-mission-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234C6A00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8.5 14.5a4 4 0 0 0 7 0'/%3E%3Cpath d='M9 9.5h.01M15 9.5h.01'/%3E%3C/svg%3E");
}

.apeef-mission--installer {
	--apeef-mission-fond: #F3E6D6;
	--apeef-mission-icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A6645' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5.4 5.4L3 18l3 3 6.3-6.3a4 4 0 0 0 5.4-5.4l-2.6 2.6-2.4-.6-.6-2.4z'/%3E%3C/svg%3E");
}

.apeef-appel {
	gap: 1.5rem;
	border-radius: 24px;
}

.apeef-appel p {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
}

/* « Je donne un coup de main » : formulaire du prochain rendez-vous, autres rendez-vous */
.apeef-aide {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

.apeef-aide__une {
	overflow: hidden;
	border-radius: 28px;
	background: var(--apeef-blanc);
	box-shadow: var(--apeef-ombre-portee);
}

.apeef-aide__une .apeef-rdv__tete {
	min-height: 240px;
}

.apeef-aide__corps {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: clamp(1.25rem, 3vw, 2.25rem);
}

.apeef-aide__details {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 1rem 2.5rem;
}

.apeef-aide__details .apeef-missions {
	flex: 1 1 14rem;
}

.apeef-aide__formulaire {
	padding-top: 1.5rem;
	border-top: 1px solid var(--apeef-sable);
}

.apeef-aide__corps > .wp-block-buttons {
	display: block;
	margin: 0;
}

.apeef-aide__vide {
	margin: 0;
	color: var(--apeef-terre-doux);
}

.apeef-aide__sous-titre {
	margin: 0 0 1.25rem;
	font-size: var(--wp--preset--font-size--grand);
}

.apeef-aide__liste {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.apeef-aide__ligne {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto;
	align-items: center;
	gap: 1.1rem;
	margin: 0;
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--apeef-sable);
	border-radius: 18px;
	background: var(--apeef-blanc);
	transition: transform 0.25s var(--apeef-ressort), box-shadow 0.25s ease;
}

.apeef-aide__ligne:hover {
	transform: translateY(-2px);
	box-shadow: var(--apeef-ombre-douce);
}

.apeef-aide__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 64px;
	padding: 0.45rem 0;
	border-radius: 14px;
	background: var(--apeef-creme);
}

.apeef-aide__nom,
.apeef-aide__nom:hover {
	color: var(--apeef-terre);
	font-family: var(--apeef-titre);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.apeef-aide__nom:hover {
	color: var(--apeef-corail);
}

.apeef-aide__quand {
	display: block;
	margin-top: 0.15rem;
	color: var(--apeef-terre-doux);
	font-size: 0.9375rem;
}

.apeef-aide__action .wp-block-buttons {
	margin: 0;
}

.apeef-aide__action .wp-block-button__link {
	min-height: 44px;
	padding: 0.6rem 1.1rem;
	font-size: 0.9375rem;
	white-space: nowrap;
}

.apeef-aide__bientot {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	border-radius: 99px;
	background: var(--apeef-creme);
	color: var(--apeef-terre-doux);
	font-size: 0.8125rem;
	font-weight: 700;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.apeef-aide__ligne {
		grid-template-columns: 56px minmax(0, 1fr);
	}

	.apeef-aide__date {
		width: 56px;
	}

	.apeef-aide__action {
		grid-column: 1 / -1;
	}

	.apeef-aide__action .wp-block-button,
	.apeef-aide__action .wp-block-button__link {
		width: 100%;
	}
}

/* ─── 10. Pages, articles, événement ───────────────────────────────────── */

.apeef-page-tete {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.apeef-page-tete::after {
	content: "";
	position: absolute;
	right: -90px;
	top: -110px;
	z-index: -1;
	width: 280px;
	height: 280px;
	border-radius: 50%;
	background: var(--apeef-soleil-pale);
}

.apeef-page-tete .wp-block-post-title {
	text-wrap: balance;
}

.apeef-fiche-evenement {
	display: grid;
	gap: 1.4rem;
	padding: clamp(1.25rem, 3vw, 1.9rem);
	border-radius: 24px;
	background: var(--apeef-blanc);
	box-shadow: var(--apeef-ombre-douce);
}

@media (min-width: 782px) {
	.apeef-fiche-evenement:not(.apeef-fiche-evenement--passe) {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
		align-items: center;
		column-gap: 2rem;
	}

	.apeef-fiche-evenement > .wp-block-buttons {
		grid-column: 1 / -1;
	}
}

.apeef-fiche-evenement__details {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.apeef-fiche-evenement > .wp-block-buttons {
	margin: 0;
}

.apeef-fiche-evenement--passe {
	padding: 1rem 1.25rem;
	background: var(--apeef-feuille-pale);
	box-shadow: none;
}

.apeef-fiche-evenement__passe {
	margin: 0;
	color: var(--apeef-feuille-fonce);
	font-weight: 700;
}

.wp-block-post-content img,
.wp-block-post-featured-image img {
	border-radius: 18px;
}

.wp-block-post-content a:not(.wp-element-button):not(.wp-block-button__link) {
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

/* Pages WooCommerce (boutique, produit, panier, commande) : leurs modèles n'ont
   pas de marge sous l'en-tête. */
body.woocommerce-page .wp-site-blocks > main {
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--70);
}

/* Listes d'articles (blog, archives, recherche) */
.apeef-liste-articles > li {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 24px;
	background: var(--apeef-blanc);
	box-shadow: var(--apeef-ombre-douce);
	transition: transform 0.3s var(--apeef-ressort), box-shadow 0.3s ease;
}

.apeef-liste-articles > li:hover {
	transform: translateY(-6px);
	box-shadow: var(--apeef-ombre-portee);
}

.apeef-liste-articles .wp-block-post-featured-image {
	margin: 0;
}

.apeef-liste-articles .wp-block-post-featured-image img {
	border-radius: 0;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.apeef-liste-articles .wp-block-post-title a {
	color: var(--apeef-terre);
	text-decoration: none;
}

.apeef-liste-articles .wp-block-post-title a:hover {
	color: var(--apeef-corail);
}

.apeef-liste-articles .wp-block-post-excerpt {
	color: var(--apeef-terre-doux);
}

.apeef-liste-articles .wp-block-post-date {
	color: var(--apeef-terre-doux);
	font-size: 0.875rem;
	font-weight: 700;
}

.wp-block-query-pagination {
	gap: 0.5rem;
	font-weight: 800;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 0.9rem;
	border-radius: 12px;
	background: var(--apeef-blanc);
	color: var(--apeef-terre);
	text-decoration: none;
}

.wp-block-query-pagination .page-numbers.current {
	background: var(--apeef-terre);
	color: var(--apeef-blanc);
}

/* Formulaires (recherche, Forminator, WooCommerce) : champs arrondis. */
.wp-block-search__input,
.wp-block-post-content input[type="text"],
.wp-block-post-content input[type="email"],
.wp-block-post-content input[type="tel"],
.wp-block-post-content input[type="number"],
.wp-block-post-content select,
.wp-block-post-content textarea {
	border: 2px solid var(--apeef-sable);
	border-radius: 12px;
	background: var(--apeef-blanc);
	color: var(--apeef-terre);
	font: inherit;
}

.wp-block-search__input {
	min-height: 3.25rem;
	padding: 0 1rem;
}

.wp-block-search__button {
	border-radius: 14px;
}

/* Formulaires Forminator (inscriptions) : aux couleurs du site. Forminator écrit des
   sélecteurs très précis, d'où les !important, limités à l'essentiel. */
.forminator-ui.forminator-custom-form .forminator-button-submit {
	min-height: 3.25rem;
	padding: 0.9rem 1.6rem !important;
	border: 0 !important;
	border-radius: 14px !important;
	background: var(--apeef-corail) !important;
	color: var(--apeef-blanc) !important;
	font-family: var(--wp--preset--font-family--texte) !important;
	font-size: 1rem !important;
	font-weight: 800 !important;
	box-shadow: none !important;
	transition: background-color 0.2s ease, transform 0.2s var(--apeef-ressort);
}

.forminator-ui.forminator-custom-form .forminator-button-submit:hover {
	background: var(--apeef-corail-fonce) !important;
	transform: translateY(-2px);
}

.forminator-ui.forminator-custom-form .forminator-input,
.forminator-ui.forminator-custom-form .forminator-textarea,
.forminator-ui.forminator-custom-form select {
	border-radius: 12px !important;
}

/* ─── 11. Pied de page ─────────────────────────────────────────────────── */

.apeef-pied {
	border-top: 1px solid var(--apeef-sable);
}

.apeef-pied .wp-block-site-logo img {
	max-width: 170px;
	height: auto;
}

.apeef-pied__texte {
	max-width: 22.5rem;
	color: var(--apeef-terre-doux);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.apeef-pied__colonne {
	gap: 0.75rem;
}

.apeef-pied__colonne p {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 700;
}

.apeef-pied__colonne p.apeef-pied__titre {
	color: var(--apeef-terre-doux);
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.apeef-pied__colonne a {
	color: var(--apeef-terre);
	text-decoration: none;
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
	transition: background-size 0.3s var(--apeef-ressort), color 0.2s ease;
}

.apeef-pied__colonne a:hover {
	color: var(--apeef-corail);
	background-size: 100% 2px;
}

.apeef-pied__bas {
	border-top: 1px solid var(--apeef-sable);
	color: var(--apeef-terre-doux);
	font-size: 0.8125rem;
}

.apeef-pied__bas p {
	margin: 0;
}

/* ─── 12. Animations ───────────────────────────────────────────────────── */

/* Apparition au défilement (classe posée par apeef.js, jamais sans lui). */
.apeef-apparition--attente {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.7s ease, transform 0.8s var(--apeef-ressort);
}

.apeef-apparition--attente.est-visible {
	opacity: 1;
	transform: none;
}

@keyframes apeef-flotte {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(18px, -22px) scale(1.05); }
}

@keyframes apeef-balance {
	0%, 100% { transform: rotate(-3deg); }
	50% { transform: rotate(3deg); }
}

@keyframes apeef-pulsation {
	0%, 100% { box-shadow: 0 0 0 0 rgba(255, 194, 26, 0.55); }
	60% { box-shadow: 0 0 0 7px rgba(255, 194, 26, 0); }
}

@keyframes apeef-battement {
	0%, 100% { transform: scale(1); }
	30% { transform: scale(1.25); }
	60% { transform: scale(0.95); }
}

@keyframes apeef-trait {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

@keyframes apeef-entree {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: none; }
}

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

html {
	scroll-behavior: smooth;
	/* Les ancres (#rendez-vous, #benevolat) ne passent pas sous l'en-tête collant. */
	scroll-padding-top: calc(var(--wp-admin--admin-bar--height, 0px) + 6rem);
}
