/*
Theme Name:   AVEAH Child
Description:  Thème enfant de GeneratePress pour la plateforme AVEAH.
Author:       Marcdonald Tech
Template:     generatepress
Version:      0.12.5
Requires at least: 6.5
Requires PHP: 8.1
Text Domain:  aveah-child
*/

/* ==========================================================================
   1. Polices hébergées localement (SIL Open Font License 1.1)
   Licences : assets/fonts/OFL-Montserrat.txt et OFL-DancingScript.txt
   ========================================================================== */

@font-face {
	font-family: "Montserrat";
	src: url("assets/fonts/montserrat-latin-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Dancing Script";
	src: url("assets/fonts/dancing-script-latin-wght-normal.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

:root {
	--aveah-font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--aveah-font-script: "Dancing Script", cursive;
}

body,
button,
input,
select,
textarea {
	font-family: var(--aveah-font);
}

/* Réservé aux slogans : à n'appliquer qu'à des éléments décoratifs courts. */
.aveah-slogan {
	font-family: var(--aveah-font-script);
}

/* ==========================================================================
   2. Typographie (charte AVEAH) — tailles fluides mobile → ordinateur
   ========================================================================== */

body {
	font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem); /* 16 → 17 px */
	font-weight: 400;
	line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
	line-height: 1.25;
}

h1 { font-size: clamp(2rem, 1.55rem + 1.9vw, 2.75rem);      font-weight: 800; } /* 32 → 44 px */
h2 { font-size: clamp(1.625rem, 1.33rem + 1.25vw, 2.125rem); font-weight: 700; } /* 26 → 34 px */
h3 { font-size: clamp(1.375rem, 1.23rem + 0.6vw, 1.625rem);  font-weight: 700; } /* 22 → 26 px */
h4 { font-size: 1.25rem;  font-weight: 600; } /* 20 px */
h5 { font-size: 1.125rem; font-weight: 600; } /* 18 px */
h6 { font-size: 1rem;     font-weight: 600; } /* 16 px */

/* Titre du site */
.main-title {
	font-size: clamp(1.5rem, 1.35rem + 0.6vw, 1.75rem); /* 24 → 28 px */
	font-weight: 800;
	line-height: 1.2;
}

/* Navigation */
.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle {
	font-size: 1rem;
	font-weight: 600;
}

/* Boutons */
button,
.button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.wp-block-button__link {
	font-size: 1rem;
	font-weight: 600;
}

/* Titres de widgets */
.widget-title,
.widget .wp-block-heading {
	font-size: 1.25rem;
	font-weight: 700;
}

/* ==========================================================================
   3. En-tête : logo officiel et titre du site
   ========================================================================== */

/* Logo : hauteur fixe, proportions conservées (le fichier n'est pas modifié). */
.site-header .header-image {
	height: 72px;
	width: auto;
	max-width: 100%;
}

/* Le bloc logo + titre peut rétrécir au lieu de déborder.
   GeneratePress lui impose flex-shrink: 0 : on l'autorise à rétrécir. */
.site-header .site-branding-container {
	flex-shrink: 1;
	min-width: 0;
}

.site-header .site-branding {
	min-width: 0;
}

.main-title,
.main-title a {
	overflow-wrap: break-word;
}

@media (max-width: 768px) {
	.site-header .header-image {
		height: 48px;
	}

	.site-branding-container .site-logo {
		margin-right: 0.75em;
	}

	.site-header .main-title {
		font-size: 1.25rem; /* 20 px */
		line-height: 1.2;
	}
}

/* ==========================================================================
   4. Composants de base (charte AVEAH)
   Les couleurs utilisent les variables globales de GeneratePress,
   avec une valeur de secours identique à la charte.
   ========================================================================== */

/* 4.1 Champs de formulaire : fond blanc, bordure fine, focus bleu secondaire */
body input[type="text"],
body input[type="email"],
body input[type="url"],
body input[type="password"],
body input[type="search"],
body input[type="tel"],
body input[type="number"],
body input[type="date"],
body textarea,
body select {
	background-color: #fff;
	color: var(--contrast, #1F2937);
	border: 1px solid #D1D5DB;
	border-radius: 6px;
	padding: 10px 14px;
}

body input[type="text"]:focus,
body input[type="email"]:focus,
body input[type="url"]:focus,
body input[type="password"]:focus,
body input[type="search"]:focus,
body input[type="tel"]:focus,
body input[type="number"]:focus,
body input[type="date"]:focus,
body textarea:focus,
body select:focus {
	background-color: #fff;
	color: var(--contrast, #1F2937);
	border-color: var(--aveah-bleu-2, #0875C3);
	box-shadow: 0 0 0 1px var(--aveah-bleu-2, #0875C3);
	outline: none;
}

/* 4.2 Focus clavier visible (n'apparaît qu'à la navigation au clavier) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--aveah-bleu-2, #0875C3);
	outline-offset: 2px;
}

/* 4.3 Liens sur fond gris clair : bleu institutionnel souligné (contraste AA) */
.paging-navigation a,
.comment-navigation a,
.has-base-2-background-color a:not(.wp-block-button__link),
.aveah-fond-gris a:not(.wp-block-button__link) {
	color: var(--accent, #063C86);
	text-decoration: underline;
}

/* 4.4 et 4.5 Boutons : coins arrondis, cible tactile >= 44 px */
button,
html input[type="button"],
input[type="reset"],
input[type="submit"],
a.button,
.wp-block-button__link,
.wp-block-search__button {
	border-radius: 6px;
	min-height: 44px;
	padding: 10px 22px;
	line-height: 1.5;
}

/* Boutons de blocs : texte centré verticalement dans la hauteur minimale */
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

/* Bouton du bloc Recherche : mêmes couleurs que les autres boutons */
.wp-block-search .wp-block-search__button {
	background-color: var(--accent, #063C86);
	color: #fff;
	border: 0;
}

.wp-block-search .wp-block-search__button:hover,
.wp-block-search .wp-block-search__button:focus {
	background-color: var(--aveah-bleu-2, #0875C3);
	color: #fff;
}

/* 4.6 Cartes : coins arrondis et ombre très discrète (à partir de la tablette) */
@media (min-width: 769px) {
	.separate-containers .inside-article,
	.separate-containers .comments-area,
	.separate-containers .page-header,
	.separate-containers .paging-navigation {
		border-radius: 8px;
		box-shadow: 0 1px 3px rgba(4, 42, 100, 0.08);
	}
}

/* 4.7 Classes utilitaires pour composer les pages */

/* Bouton secondaire : contour bleu institutionnel */
a.aveah-btn-secondaire,
.aveah-btn-secondaire .wp-block-button__link {
	display: inline-block;
	background-color: transparent;
	color: var(--accent, #063C86);
	border: 2px solid var(--accent, #063C86);
	border-radius: 6px;
	min-height: 44px;
	padding: 8px 20px;
	font-weight: 600;
	text-decoration: none;
}

a.aveah-btn-secondaire:hover,
a.aveah-btn-secondaire:focus,
.aveah-btn-secondaire .wp-block-button__link:hover,
.aveah-btn-secondaire .wp-block-button__link:focus {
	background-color: var(--accent, #063C86);
	color: #fff;
}

/* Carte de contenu */
.aveah-carte {
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(4, 42, 100, 0.08);
	padding: 24px;
}

/* Pastille verte WASH (texte blanc sur vert : contraste 4,64) */
.aveah-badge-vert {
	display: inline-block;
	background-color: var(--aveah-vert, #24862E);
	color: #fff;
	border-radius: 999px;
	padding: 2px 12px;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.6;
}

/* ==========================================================================
   5. En-tête : bouton de compte et mise en page du menu (lot 5)
   ========================================================================== */

/* 5.1 Zone de compte (Connexion / Mon espace / Déconnexion) */
.aveah-compte {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: 12px;
}

.site-header .aveah-compte .aveah-compte__bouton {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 18px;
	border-radius: 6px;
	background-color: var(--accent, #063C86);
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.site-header .aveah-compte .aveah-compte__bouton:hover,
.site-header .aveah-compte .aveah-compte__bouton:focus {
	background-color: var(--aveah-bleu-2, #0875C3);
	color: #fff;
}

.site-header .aveah-compte .aveah-compte__lien {
	color: var(--accent, #063C86);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.site-header .aveah-compte .aveah-compte__lien:hover,
.site-header .aveah-compte .aveah-compte__lien:focus {
	color: var(--aveah-bleu-2, #0875C3);
	text-decoration: underline;
}

/* 5.2 Ordinateur et tablette (>= 769 px) */
@media (min-width: 769px) {
	/* Le logo contient déjà « AVEAH » : titre texte masqué visuellement,
	   mais conservé pour les lecteurs d'écran et le référencement. */
	.site-header .main-title {
		position: absolute !important;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	/* Espacement réduit des entrées du menu (20 px par défaut) */
	.main-navigation .main-nav ul li a {
		padding-left: 14px;
		padding-right: 14px;
	}

	.main-navigation .main-nav ul li.menu-item-has-children > a .dropdown-menu-toggle {
		padding-right: 0;
		padding-left: 6px;
	}
}

/* 5.3 Largeur intermédiaire (769 à 1199 px) */
@media (min-width: 769px) and (max-width: 1199px) {
	.site-header .header-image {
		height: 56px;
	}

	.main-navigation .main-nav ul li a {
		padding-left: 10px;
		padding-right: 10px;
		font-size: 0.9375rem; /* 15 px */
	}

	.site-header .aveah-compte .aveah-compte__bouton {
		padding: 8px 14px;
		font-size: 0.9375rem;
	}
}

/* 5.4 « Déconnexion » : texte (>= 1200 px), icône (769–1199 px),
   entrée du menu ☰ (<= 768 px) — lot 15B */
.site-header .aveah-compte .aveah-compte__lien {
	display: inline-flex;
	align-items: center;
}

.aveah-compte__icone {
	display: none;
}

@media (min-width: 769px) and (max-width: 1199px) {
	.site-header .aveah-compte .aveah-compte__lien {
		justify-content: center;
		width: 44px;
		height: 44px;
		border-radius: 6px;
	}

	.site-header .aveah-compte .aveah-compte__lien:hover,
	.site-header .aveah-compte .aveah-compte__lien:focus {
		background-color: var(--base-2, #F3F4F6);
		text-decoration: none;
	}

	.aveah-compte__icone {
		display: block;
	}

	.aveah-compte__texte {
		position: absolute !important;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
}

@media (max-width: 768px) {
	.site-header .aveah-compte .aveah-compte__lien {
		display: none;
	}
}

/* Entrée « Déconnexion » du menu : seulement dans le menu ☰ du téléphone */
@media (min-width: 769px) {
	.main-navigation .main-nav ul li.aveah-menu-deconnexion {
		display: none;
	}
}

/* 5.5 Mobile (<= 768 px) : logo, titre, compte et bouton ☰ sur une ligne */
@media (max-width: 768px) {
	.site-header.has-inline-mobile-toggle .site-branding-container {
		flex: 1 1 0;
	}

	.aveah-compte {
		margin-left: 0;
		margin-right: 4px;
	}

	.site-header .aveah-compte .aveah-compte__bouton {
		padding: 6px 12px;
		font-size: 0.9375rem;
	}
}

/* ==========================================================================
   6. Pied de page (lot 6)
   Couleurs de fond, texte et liens : réglées dans le Personnaliseur (lot 3).
   ========================================================================== */

/* Titres des colonnes (blocs Titre ou titres de widgets) */
.footer-widgets .widget-title,
.footer-widgets .wp-block-heading {
	color: #fff;
	font-size: 1.125rem; /* 18 px */
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 12px;
}

/* Logo dans le pied de page */
.footer-widgets .wp-block-image img,
.footer-widgets img {
	max-width: 120px;
	height: auto;
}

/* Slogan : or sur bleu nuit (décision C2, contraste 8,13) */
.footer-widgets .aveah-slogan {
	color: var(--aveah-or, #F3C01B);
	font-size: 1.375rem;
	line-height: 1.3;
}

/* Listes : menu « Pied de page » et coordonnées */
.footer-widgets .menu,
.footer-widgets .aveah-coordonnees {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-widgets .menu li,
.footer-widgets .aveah-coordonnees li {
	margin: 0 0 8px;
}

.footer-widgets .aveah-coordonnees__libelle {
	font-weight: 600;
}

/* Liens du pied de page : soulignés au survol et au focus */
.site-footer a:hover,
.site-footer a:focus {
	text-decoration: underline;
}

/* Filet discret entre les colonnes et la barre de copyright */
.site-footer .site-info {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   7. Page d'accueil et sections de contenu (lot 7)
   Les classes ci-dessous sont réutilisables sur les autres pages.
   ========================================================================== */

/* 7.1 Accueil : la page n'a pas de carte blanche globale, chaque section est sa propre carte */
.home.separate-containers .inside-article {
	padding: 0;
	background: transparent;
	box-shadow: none;
}

/* 7.2 Bandeau d'accueil (fond bleu institutionnel) */
.aveah-hero,
.aveah-cta {
	background-color: var(--accent, #063C86);
	color: #fff;
	border-radius: 8px;
	padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 64px);
	margin-bottom: 32px;
}

.aveah-hero h1,
.aveah-hero h2,
.aveah-cta h2 {
	color: #fff;
	margin-bottom: 12px;
}

/* Titre du bandeau un peu plus petit sur mobile, césure française propre */
.aveah-hero h1 {
	font-size: clamp(1.625rem, 1.2rem + 2.4vw, 2.75rem); /* 26 → 44 px */
}

.aveah-hero h1,
.aveah-section h2,
.aveah-section h3,
.aveah-carte p {
	-webkit-hyphens: auto;
	hyphens: auto;
	overflow-wrap: normal;
}

.aveah-hero p,
.aveah-cta p {
	color: #fff;
	max-width: 760px;
}

.aveah-hero .aveah-slogan {
	color: var(--aveah-or, #F3C01B);
	font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
	margin-bottom: 16px;
}

.aveah-cta {
	text-align: center;
}

.aveah-cta p {
	margin-left: auto;
	margin-right: auto;
}

.aveah-cta .wp-block-buttons {
	justify-content: center;
}

/* Boutons sur fond bleu : principal or (texte bleu nuit, contraste 8,13), secondaire contour blanc */
body .aveah-hero .wp-block-button:not(.aveah-btn-secondaire) .wp-block-button__link,
body .aveah-cta .wp-block-button:not(.aveah-btn-secondaire) .wp-block-button__link {
	background-color: var(--aveah-or, #F3C01B);
	color: var(--aveah-bleu-fonce, #042A64);
	border: 2px solid var(--aveah-or, #F3C01B);
}

body .aveah-hero .wp-block-button:not(.aveah-btn-secondaire) .wp-block-button__link:hover,
body .aveah-hero .wp-block-button:not(.aveah-btn-secondaire) .wp-block-button__link:focus,
body .aveah-cta .wp-block-button:not(.aveah-btn-secondaire) .wp-block-button__link:hover,
body .aveah-cta .wp-block-button:not(.aveah-btn-secondaire) .wp-block-button__link:focus {
	background-color: #fff;
	border-color: #fff;
	color: var(--accent, #063C86);
}

body .aveah-hero .wp-block-button.aveah-btn-secondaire .wp-block-button__link,
body .aveah-cta .wp-block-button.aveah-btn-secondaire .wp-block-button__link {
	background-color: transparent;
	color: #fff;
	border: 2px solid #fff;
}

body .aveah-hero .wp-block-button.aveah-btn-secondaire .wp-block-button__link:hover,
body .aveah-hero .wp-block-button.aveah-btn-secondaire .wp-block-button__link:focus,
body .aveah-cta .wp-block-button.aveah-btn-secondaire .wp-block-button__link:hover,
body .aveah-cta .wp-block-button.aveah-btn-secondaire .wp-block-button__link:focus {
	background-color: #fff;
	color: var(--accent, #063C86);
}

/* Focus visible sur fond bleu : contour blanc */
.aveah-hero a:focus-visible,
.aveah-cta a:focus-visible {
	outline-color: #fff;
}

/* 7.3 Bouton secondaire (bloc Bouton) sur fond clair : priorité sur les styles du thème */
body .wp-block-button.aveah-btn-secondaire .wp-block-button__link {
	background-color: transparent;
	color: var(--accent, #063C86);
	border: 2px solid var(--accent, #063C86);
}

body .wp-block-button.aveah-btn-secondaire .wp-block-button__link:hover,
body .wp-block-button.aveah-btn-secondaire .wp-block-button__link:focus {
	background-color: var(--accent, #063C86);
	color: #fff;
}

/* 7.4 Section de contenu (carte blanche) */
.aveah-section {
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(4, 42, 100, 0.08);
	padding: clamp(24px, 4vw, 48px);
	margin-bottom: 32px;
}

.aveah-section > h2,
.aveah-section > .wp-block-group__inner-container > h2 {
	text-align: center;
	margin-bottom: 24px;
}

.aveah-section > p,
.aveah-section > .wp-block-group__inner-container > p {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.aveah-section .wp-block-buttons {
	justify-content: center;
	margin-top: 24px;
}

/* 7.4 bis Neutralise les marges intérieures que le thème parent applique à
   l'enveloppe .wp-block-group__inner-container : nos composants gèrent
   eux-mêmes leurs espacements. */
body .aveah-hero > .wp-block-group__inner-container,
body .aveah-cta > .wp-block-group__inner-container,
body .aveah-section > .wp-block-group__inner-container,
body .aveah-grille > .wp-block-group__inner-container,
body .aveah-carte > .wp-block-group__inner-container,
body .aveah-profil > .wp-block-group__inner-container,
body .aveah-profil__texte > .wp-block-group__inner-container {
	padding: 0;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

/* 7.5 Grille responsive de cartes (s'adapte seule de 1 à 5 colonnes)
   Avec un thème classique, WordPress insère une enveloppe
   .wp-block-group__inner-container dans chaque Groupe : la grille
   s'applique alors à cette enveloppe, sinon au groupe lui-même. */
.aveah-grille:not(:has(> .wp-block-group__inner-container)),
.aveah-grille > .wp-block-group__inner-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 20px;
}

.aveah-grille > *,
.aveah-grille > .wp-block-group__inner-container > * {
	margin: 0;
	max-width: none;
}

/* Cartes à l'intérieur d'une section blanche : fond gris clair */
.aveah-section .aveah-carte {
	background-color: var(--base-2, #F3F4F6);
	box-shadow: none;
}

.aveah-carte h3 {
	font-size: 1.25rem;
	margin-bottom: 8px;
}

.aveah-carte > :last-child,
.aveah-carte > .wp-block-group__inner-container > :last-child {
	margin-bottom: 0;
}

/* Chiffre clé */
.aveah-chiffre {
	color: var(--accent, #063C86);
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.5rem); /* 24 → 40 px */
	font-weight: 800;
	line-height: 1.1;
	margin-bottom: 6px;
}

/* Pastille d'étape : espacement sous la pastille verte */
.aveah-carte .aveah-badge-vert {
	margin-bottom: 10px;
}

/* ==========================================================================
   8. Pages de contenu composées de sections (lot 8)
   Une page qui contient des sections AVEAH n'a pas de carte blanche globale :
   le titre de page s'affiche sur le fond gris, puis chaque section est sa carte.
   (Sans prise en charge de :has(), la page garde sa carte blanche : rendu acceptable.)
   ========================================================================== */

.separate-containers .inside-article:has(.aveah-section, .aveah-hero, .aveah-cta) {
	padding: 0;
	background: transparent;
	box-shadow: none;
}

.separate-containers .inside-article:has(.aveah-section, .aveah-hero, .aveah-cta) > .entry-header {
	padding: 8px 4px 24px;
}

/* Grille de 2 cartes (mission / vision) : deux colonnes égales dès la tablette */
@media (min-width: 769px) {
	.aveah-section .aveah-grille:has(> .wp-block-group__inner-container > .aveah-carte:nth-child(2):last-child) > .wp-block-group__inner-container {
		grid-template-columns: 1fr 1fr;
	}
}

/* Chiffres clés : jamais de césure ; passage à la ligne entre les mots uniquement */
.aveah-chiffre {
	-webkit-hyphens: manual;
	hyphens: manual;
	overflow-wrap: break-word;
}

/* Icône WhatsApp du pied de page (pastille verte, cible tactile 44 px) */
.footer-widgets .aveah-coordonnees__whatsapp {
	margin-top: 12px;
}

.site-footer .aveah-whatsapp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background-color: #25D366; /* vert officiel WhatsApp */
	color: #fff;
	text-decoration: none;
}

.site-footer .aveah-whatsapp:hover,
.site-footer .aveah-whatsapp:focus {
	background-color: #1DA851;
	color: #fff;
	text-decoration: none;
}

.site-footer .aveah-whatsapp svg {
	width: 24px;
	height: 24px;
}

/* Focus clavier visible sur fond bleu nuit */
.site-footer a:focus-visible {
	outline-color: #fff;
}

/* Grille limitée à 4 colonnes (ex. 8 cartes → 2 lignes de 4) : ajouter la classe aveah-grille-4 */
.aveah-grille-4:not(:has(> .wp-block-group__inner-container)),
.aveah-grille-4 > .wp-block-group__inner-container {
	grid-template-columns: repeat(auto-fit, minmax(max(180px, calc((100% - 60px) / 4)), 1fr));
}

/* ==========================================================================
   9. Listes dépliables (bloc Détails) et listes d'unités (lot 11)
   ========================================================================== */

/* Ancres du sommaire : petit espace au-dessus du titre ciblé */
.aveah-section h2[id] {
	scroll-margin-top: 24px;
}

/* Sommaire : boutons centrés, passent à la ligne */
.aveah-section .wp-block-buttons {
	flex-wrap: wrap;
	gap: 10px;
}

/* Bloc Détails dans une section */
.aveah-section .wp-block-details {
	max-width: 860px;
	margin: 0 auto 12px;
	background-color: var(--base-2, #F3F4F6);
	border-radius: 8px;
	padding: 0;
}

.aveah-section .wp-block-details > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 52px;
	padding: 12px 18px;
	cursor: pointer;
	list-style: none;
	color: var(--accent, #063C86);
	font-weight: 700;
	font-size: 1.0625rem;
	border-radius: 8px;
}

.aveah-section .wp-block-details > summary::-webkit-details-marker {
	display: none;
}

/* Indicateur + / − */
.aveah-section .wp-block-details > summary::after {
	content: "+";
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background-color: var(--accent, #063C86);
	color: #fff;
	font-size: 1.25rem;
	line-height: 1;
}

.aveah-section .wp-block-details[open] > summary::after {
	content: "−";
}

.aveah-section .wp-block-details > summary:hover {
	color: var(--aveah-bleu-2, #0875C3);
}

.aveah-section .wp-block-details > summary:focus-visible {
	outline: 2px solid var(--aveah-bleu-2, #0875C3);
	outline-offset: 2px;
}

/* Liste des unités */
.aveah-section .aveah-unites {
	list-style: none;
	margin: 0;
	padding: 0 18px 12px;
}

.aveah-section .aveah-unites li {
	margin: 0;
	padding: 10px 0;
	border-top: 1px solid #E5E7EB;
	-webkit-hyphens: auto;
	hyphens: auto;
}

.aveah-section .aveah-unites li strong {
	display: inline-block;
	min-width: 3.2em;
	color: var(--accent, #063C86);
}

/* Unités : la 2e ligne reste alignée avec le texte (mobile) */
.aveah-section .aveah-unites li:has(> strong) {
	display: grid;
	grid-template-columns: 3.4em 1fr;
	column-gap: 6px;
}

.aveah-section .aveah-unites li:has(> strong) > strong {
	min-width: 0;
}

/* ==========================================================================
   10. Fiches des formateurs (lot 12)
   ========================================================================== */

.aveah-profil {
	background-color: var(--base-2, #F3F4F6);
	border-radius: 8px;
	padding: clamp(20px, 3vw, 32px);
	margin-bottom: 20px;
}

.aveah-profil:last-child {
	margin-bottom: 0;
}

/* Photo à gauche, texte à droite (tablette et ordinateur) */
.aveah-profil:not(:has(> .wp-block-group__inner-container)),
.aveah-profil > .wp-block-group__inner-container {
	display: grid;
	grid-template-columns: 160px 1fr;
	column-gap: 32px;
	align-items: start;
}

.aveah-profil .aveah-photo {
	margin: 0;
}

.aveah-profil .aveah-photo img {
	display: block;
	width: 160px;
	height: 160px;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid #fff;
	box-shadow: 0 1px 3px rgba(4, 42, 100, 0.15);
	box-sizing: border-box;
}

.aveah-profil h3 {
	margin-bottom: 4px;
	font-size: 1.375rem;
}

.aveah-profil .aveah-fonction {
	color: var(--contrast, #1F2937);
	font-weight: 600;
	margin-bottom: 10px;
}

.aveah-profil .aveah-expertises {
	display: inline-block;
	background-color: var(--aveah-vert, #24862E);
	color: #fff;
	border-radius: 999px;
	padding: 2px 14px;
	font-size: 0.875rem;
	font-weight: 600;
	margin-bottom: 14px;
}

.aveah-profil .aveah-role {
	border-left: 4px solid var(--aveah-or, #F3C01B);
	padding-left: 12px;
	margin-bottom: 0;
}

.aveah-profil__texte p {
	-webkit-hyphens: auto;
	hyphens: auto;
}

/* Mobile : photo centrée au-dessus du texte */
@media (max-width: 768px) {
	.aveah-profil:not(:has(> .wp-block-group__inner-container)),
	.aveah-profil > .wp-block-group__inner-container {
		grid-template-columns: 1fr;
		row-gap: 16px;
	}

	.aveah-profil .aveah-photo img {
		margin: 0 auto;
		width: 140px;
		height: 140px;
	}

	.aveah-profil h3,
	.aveah-profil .aveah-fonction {
		text-align: center;
	}

	.aveah-profil .aveah-expertises {
		border-radius: 14px;
		display: table;
		margin-left: auto;
		margin-right: auto;
		text-align: center;
	}
}

/* ==========================================================================
   11. Page Contact : cartes et formulaire (lot 13)
   Couleurs d'état ajoutées (hors charte, fonctionnelles) :
   erreur #B42318 (contraste 6,6 sur blanc), WhatsApp foncé #075E54 (texte blanc, 7,7).
   ========================================================================== */

.aveah-contact-liste {
	list-style: none;
	margin: 0;
	padding: 0;
}

.aveah-contact-liste li {
	margin: 0 0 8px;
	overflow-wrap: anywhere;
}

.aveah-contact-liste a {
	color: var(--accent, #063C86);
	font-weight: 600;
}

.aveah-btn-whatsapp {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 10px 18px;
	border-radius: 6px;
	background-color: #075E54;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.aveah-btn-whatsapp:hover,
.aveah-btn-whatsapp:focus {
	background-color: #054A42;
	color: #fff;
}

/* Formulaire */
.aveah-form {
	max-width: 760px;
	margin: 0 auto;
	text-align: left;
}

.aveah-form__grille {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 20px;
}

@media (max-width: 768px) {
	.aveah-form__grille {
		grid-template-columns: 1fr;
	}
}

.aveah-champ {
	margin-bottom: 18px;
}

.aveah-champ label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: var(--contrast, #1F2937);
}

.aveah-champ input[type="text"],
.aveah-champ input[type="email"],
.aveah-champ input[type="tel"],
.aveah-champ select,
.aveah-champ textarea {
	width: 100%;
	min-height: 44px;
	box-sizing: border-box;
}

.aveah-requis {
	color: #B42318;
}

.aveah-champ [aria-invalid="true"] {
	border-color: #B42318;
}

.aveah-erreur {
	margin: 6px 0 0;
	color: #B42318;
	font-size: 0.9375rem;
}

/* Case de consentement : case et texte sur une ligne */
.aveah-champ--case {
	display: grid;
	grid-template-columns: 22px 1fr;
	column-gap: 10px;
	align-items: start;
}

.aveah-champ--case input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin: 3px 0 0;
	accent-color: var(--accent, #063C86);
}

.aveah-champ--case label {
	font-weight: 400;
	margin: 0;
}

.aveah-champ--case .aveah-erreur {
	grid-column: 2;
}

/* Champ piège (invisible pour les visiteurs et les lecteurs d'écran) */
.aveah-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.aveah-form__mention {
	font-size: 0.875rem;
	color: var(--contrast, #1F2937);
}

.aveah-form__bouton {
	background-color: var(--accent, #063C86);
	color: #fff;
}

.aveah-form__bouton:hover,
.aveah-form__bouton:focus {
	background-color: var(--aveah-bleu-2, #0875C3);
	color: #fff;
}

/* Messages d'état */
.aveah-form-message {
	max-width: 760px;
	margin: 0 auto 20px;
	padding: 14px 18px;
	border-radius: 6px;
	border-left: 4px solid;
	text-align: left;
}

.aveah-form-message p {
	margin: 0 0 6px;
}

.aveah-form-message p:last-child {
	margin-bottom: 0;
}

.aveah-form-message--erreur {
	border-color: #B42318;
	background-color: #FEF3F2;
}

.aveah-form-message--succes {
	border-color: var(--aveah-vert, #24862E);
	background-color: #ECFDF3;
}

/* ==========================================================================
   12. Page Inscription : demande d'admission (lot 14A)
   ========================================================================== */

/* Le champ date suit les autres champs */
.aveah-champ input[type="date"] {
	width: 100%;
	min-height: 44px;
	box-sizing: border-box;
	padding: 10px 15px;
	border: 1px solid var(--border-color, #CCCCCC);
	background-color: var(--base-3, #FFFFFF);
	color: var(--contrast, #1F2937);
	font: inherit;
}

/* Groupes de champs (Identité, Coordonnées…) */
.aveah-form__bloc {
	margin: 0 0 24px;
	padding: 20px 20px 4px;
	border: 1px solid #E5E7EB;
	border-radius: 8px;
	background-color: var(--base-3, #FFFFFF);
	min-width: 0;
}

.aveah-form__bloc > legend {
	padding: 0 8px;
	font-weight: 700;
	color: var(--accent, #063C86);
}

.aveah-form__aide {
	margin: -6px 0 18px;
	font-size: 0.9375rem;
	color: var(--contrast, #1F2937);
}

/* Questions Oui / Non */
.aveah-choix {
	border: 0;
	padding: 0;
	margin: 0 0 18px;
	min-width: 0;
}

.aveah-choix > legend {
	padding: 0;
	margin-bottom: 6px;
	font-weight: 600;
	color: var(--contrast, #1F2937);
}

.aveah-choix__options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}

.aveah-choix__options label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	font-weight: 400;
	cursor: pointer;
}

.aveah-choix__options input[type="radio"] {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--accent, #063C86);
}

.aveah-choix [aria-invalid="true"] {
	outline: 2px solid #B42318;
	outline-offset: 2px;
}

/* Étapes numérotées (page et message de confirmation) */
.aveah-etapes-liste {
	margin: 0 0 12px 1.4em;
	padding: 0;
}

.aveah-etapes-liste > li {
	margin-bottom: 8px;
}

.aveah-etapes-liste ul {
	margin: 6px 0 0 1.1em;
	padding: 0;
}

/* Les longues adresses e-mail passent à la ligne au lieu de déborder */
.aveah-form-message {
	overflow-wrap: anywhere;
}

.aveah-form-message .aveah-btn-whatsapp {
	margin-top: 4px;
}

@media (max-width: 768px) {
	.aveah-form__bloc {
		padding: 16px 14px 2px;
	}

	.aveah-form-message {
		padding: 12px 14px;
	}
}

/* ==========================================================================
   13. « Mon espace » : tableau de bord (lot 17A)
   ========================================================================== */

.aveah-espace__grille {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: 20px;
	margin-top: 8px;
}

.aveah-espace__carte {
	display: flex;
	flex-direction: column;
	text-align: left;
}

.aveah-espace__carte h3 {
	margin-bottom: 8px;
	font-size: 1.25rem;
	color: var(--accent, #063C86);
}

.aveah-espace__carte p {
	margin-bottom: 12px;
}

/* La carte du groupe ressort : liseré vert */
.aveah-espace__carte--groupe {
	border-left: 4px solid var(--aveah-vert, #24862E);
}

.aveah-espace__liste {
	margin: 0 0 4px 1.2em;
	padding: 0;
}

.aveah-espace__liste li {
	margin-bottom: 6px;
	font-weight: 600;
}

.aveah-espace__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
}

.aveah-espace__bouton {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 16px;
	border: 2px solid var(--accent, #063C86);
	border-radius: 6px;
	background-color: var(--accent, #063C86);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.aveah-espace__bouton:hover,
.aveah-espace__bouton:focus {
	background-color: var(--aveah-bleu-2, #0875C3);
	border-color: var(--aveah-bleu-2, #0875C3);
	color: #fff;
}

.aveah-espace__bouton--secondaire {
	background-color: transparent;
	color: var(--accent, #063C86);
}

.aveah-espace__bouton--secondaire:hover,
.aveah-espace__bouton--secondaire:focus {
	background-color: var(--accent, #063C86);
	border-color: var(--accent, #063C86);
	color: #fff;
}

.aveah-espace__bouton--whatsapp {
	background-color: #075E54;
	border-color: #075E54;
}

.aveah-espace__bouton--whatsapp:hover,
.aveah-espace__bouton--whatsapp:focus {
	background-color: #054A42;
	border-color: #054A42;
}

.aveah-espace__deconnexion {
	margin-top: 24px;
	text-align: center;
}

/* 13.2 Dernières publications de mes groupes (lot 17B) : carte pleine largeur */
.aveah-espace__carte--fil {
	grid-column: 1 / -1;
}

.aveah-espace__fil {
	list-style: none;
	margin: 0;
	padding: 0;
}

.aveah-espace__fil li {
	padding: 12px 0;
	border-top: 1px solid #E5E7EB;
}

.aveah-espace__fil li:first-child {
	border-top: 0;
	padding-top: 0;
}

.aveah-espace__fil-entete {
	margin-bottom: 4px;
	font-size: 0.9375rem;
	color: var(--contrast, #1F2937);
}

.aveah-espace__fil-entete span {
	color: #4B5563;
}

.aveah-espace__fil-texte {
	margin-bottom: 6px;
	overflow-wrap: anywhere;
}

.aveah-espace__fil a {
	display: inline-block;
	min-height: 24px;
	font-weight: 600;
}

/* ==========================================================================
   14. Fichiers joints — groupes et devoirs (lots 21B et 21D)
   ========================================================================== */

.aveah-pj-zone {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	margin: 8px 0;
}

.aveah-pj-bouton {
	min-height: 44px;
	padding: 6px 14px;
	border: 2px solid var(--accent, #063C86);
	border-radius: 6px;
	background-color: transparent;
	color: var(--accent, #063C86);
	font-weight: 600;
	cursor: pointer;
}

.aveah-pj-bouton::before {
	content: "📎 ";
}

.aveah-pj-bouton:hover,
.aveah-pj-bouton:focus {
	background-color: var(--accent, #063C86);
	color: #fff;
}

.aveah-pj-bouton:disabled {
	opacity: 0.6;
	cursor: wait;
}

.aveah-pj-aide {
	font-size: 0.85em;
	color: #555;
}

.aveah-pj-etat {
	flex-basis: 100%;
	font-size: 0.9em;
	overflow-wrap: anywhere;
}

.aveah-pj-etat:empty {
	display: none;
}

.aveah-pj-etat--erreur {
	color: #B00020;
	font-weight: 600;
}

.aveah-pj-retirer {
	min-height: 44px;
	min-width: 44px;
	margin-left: 4px;
	padding: 6px 12px;
	border: 1px solid #B00020;
	border-radius: 4px;
	background: transparent;
	color: #B00020;
	cursor: pointer;
}

.aveah-pj {
	margin: 10px 0 0;
}

.aveah-pj--image img {
	display: block;
	max-width: 100%;
	max-height: 360px;
	height: auto;
	border: 1px solid #ddd;
	border-radius: 6px;
}

.aveah-pj--image figcaption,
.aveah-pj--document span,
.aveah-devoir__taille {
	font-size: 0.85em;
	color: #555;
}

.aveah-pj--document a::before,
.aveah-devoir__documents a::before {
	content: "📄 ";
}

.aveah-pj--document a,
.aveah-devoir__documents a {
	font-weight: 600;
	overflow-wrap: anywhere;
}

/* ==========================================================================
   15. Devoirs — carte « Mes devoirs » et page du devoir (lots 21A et 21C)
   ========================================================================== */

.aveah-espace__carte--devoirs h4 {
	margin: 12px 0 6px;
	font-size: 1rem;
}

.aveah-devoirs {
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
}

.aveah-devoirs li {
	padding: 8px 0;
	border-bottom: 1px solid #e5e7eb;
	overflow-wrap: anywhere;
}

.aveah-devoirs li:last-child {
	border-bottom: 0;
}

.aveah-devoirs a {
	font-weight: 600;
}

.aveah-devoirs__details {
	font-size: 0.85em;
	color: #555;
}

.aveah-devoirs__badge {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 999px;
	background-color: var(--accent, #063C86);
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.5;
	vertical-align: middle;
}

.aveah-devoirs__badge--passe {
	background-color: #e5e7eb;
	color: #374151;
}

.aveah-devoirs--passes a {
	font-weight: 500;
}

.aveah-devoir__limite {
	padding: 10px 14px;
	border-left: 4px solid var(--accent, #063C86);
	background-color: #f3f6fb;
}

.aveah-devoir__limite--depassee {
	border-left-color: #9ca3af;
	background-color: #f3f4f6;
	color: #374151;
}

/* ==========================================================================
   16. Vidéos externes — lecteur YouTube adaptatif (lot 22)
   ========================================================================== */

.aveah-video {
	position: relative;
	width: 100%;
	max-width: 720px;
	margin: 10px 0;
	aspect-ratio: 16 / 9;
	border-radius: 6px;
	overflow: hidden;
	background-color: #000;
}

.aveah-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ==========================================================================
   17. BuddyPress : bloc principal dans le cadre de la page (lot 26)
   BuddyPress ajoute la classe « alignwide » à #buddypress ; GeneratePress lui
   donne alors des marges négatives (-30 px sur mobile, -40 px sur ordinateur)
   qui le font déborder et coupent le texte à gauche sur téléphone.
   ========================================================================== */

body.buddypress .entry-content .buddypress-wrap.alignwide,
body.buddypress .buddypress-wrap.alignwide {
	width: auto;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

/* Marge intérieure des pages BuddyPress sur téléphone (le contenu ne touche plus les bords) */
@media (max-width: 768px) {
	body.buddypress.separate-containers .inside-article {
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* ==========================================================================
   18. Bannière avec photo (lot 28)
   Bloc natif « Bannière » (core/cover) avec les classes « aveah-hero
   aveah-hero--photo » : l'image se remplace dans l'éditeur (bouton « Remplacer »).
   Voile bleu du bloc : dégradé sur ordinateur (texte à gauche), uniforme sur
   téléphone. Contraste du texte blanc ≥ 4,5:1 même sur une zone blanche.
   ========================================================================== */

.wp-block-cover.aveah-hero--photo {
	overflow: hidden;
	border-radius: 8px;
	padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 64px);
	margin-bottom: 32px;
}

.wp-block-cover.aveah-hero--photo .wp-block-cover__inner-container {
	width: 100%;
	max-width: 640px;
	color: #fff;
}

@media (max-width: 768px) {
	.wp-block-cover.aveah-hero--photo {
		min-height: 0 !important;
	}

	.wp-block-cover.aveah-hero--photo .wp-block-cover__background {
		background: rgba(4, 42, 100, 0.86) !important;
	}

	.wp-block-cover.aveah-hero--photo .wp-block-cover__inner-container {
		max-width: none;
	}
}

/* Illustrations dans les sections (bloc Image + classe « aveah-illustration ») :
   pleine largeur, coins arrondis, cadrage homogène (3:2 sur téléphone, 2:1 sur ordinateur). */
.wp-block-image.aveah-illustration {
	margin: 0 0 24px;
}

.wp-block-image.aveah-illustration img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	object-position: 50% 30%;
	border-radius: 8px;
}

@media (min-width: 769px) {
	.wp-block-image.aveah-illustration img {
		aspect-ratio: 2 / 1;
	}
}

