/* ==========================================================================
   AMG 2026 — feuille de style du thème
   Complète theme.json pour tout ce que les blocs natifs ne couvrent pas.
   Palette : bleu #345395 · cyan #009FE3 · colloque magenta #D72576 / #B80D57
   ========================================================================== */

:root {
	--amg-bleu: var(--wp--preset--color--bleu, #345395);
	--amg-cyan: var(--wp--preset--color--cyan, #009FE3);
	--amg-bleu-clair: var(--wp--preset--color--bleu-clair, #C6E3F6);
	--amg-bleu-pale: var(--wp--preset--color--bleu-pale, #F3F9FE);
	--amg-magenta: var(--wp--preset--color--magenta, #D72576);
	--amg-magenta-fonce: var(--wp--preset--color--magenta-fonce, #B80D57);
	--amg-vert: var(--wp--preset--color--vert, #8CB175);
	--amg-cyan-texte: var(--wp--preset--color--cyan-texte, #00688F);
	--amg-gris-texte: var(--wp--preset--color--gris-texte, #4A6699);
	--amg-magenta-texte: #B80D57;
	--amg-vert-texte: #5C7F45;
	--amg-trait: 1px solid rgba(52, 83, 149, 0.12);
	/* Contour des champs de saisie : 3,2:1 sur blanc, le minimum pour qu'un
	   élément d'interface se distingue de son fond. */
	--amg-trait-champ: rgba(52, 83, 149, 0.66);
	--amg-rayon-carte: 24px;
	--amg-rayon-champ: 14px;
	--amg-entete-h: 81px;
	/* Trame du site : 5 % de marge de chaque côté, plafonnée sur très grand écran. */
	--amg-marge: 5%;
	--amg-largeur-site: 1720px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--amg-entete-h) + 1.5rem);
}

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

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

/* Lien d'évitement ------------------------------------------------------- */
/* Masqué sans sortir du flux horizontal (left:-9999px élargit le document
   sur certains moteurs) : on le réduit à un point, révélé au focus clavier. */
.amg-skip-link {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 999;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	padding: 0.875rem 1.5rem;
	background: var(--amg-bleu);
	color: #fff;
	border-radius: 0 0 12px 0;
	font-weight: 700;
	font-size: 0.875rem;
}
.amg-skip-link:focus {
	width: auto;
	height: auto;
	overflow: visible;
	clip-path: none;
	color: #fff;
	text-decoration: none;
}

/* Focus visible cohérent ------------------------------------------------- */
/* L'iframe de la carte est focusable au clavier mais ne reçoit pas
   :focus-visible : on lui pose l'anneau sur :focus. */
.amg-carte-embed:focus-within,
.amg-carte-embed iframe:focus {
	/* Le conteneur rogne ce qui dépasse : l'anneau se dessine vers l'intérieur. */
	outline: 3px solid var(--amg-cyan-texte);
	outline-offset: -3px;
}
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--amg-cyan-texte);
	outline-offset: 2px;
	border-radius: 4px;
}
/* Sur fond sombre, l'anneau repasse en blanc pour rester détaché. */
.amg-hero :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.amg-pied :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.amg-bandeau--bleu :where(a, button):focus-visible {
	outline-color: #fff;
}

/* ==========================================================================
   EN-TÊTE
   ========================================================================== */

/* WordPress enveloppe chaque partie de gabarit dans un <div> qui épouse la
   hauteur de son contenu. Autour de l'en-tête, ce bloc mesure donc exactement
   81 px : le collage n'a aucune course, et `position: sticky` ci-dessous ne
   produisait rien — l'en-tête défilait avec la page. Effacer le conteneur de
   la mise en page rend le collage possible sans toucher au balisage. */
.wp-block-template-part:has(> .amg-entete) { display: contents; }

.amg-entete {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #fff;
	border-bottom: 1px solid rgba(52, 83, 149, 0.08);
}
.admin-bar .amg-entete { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .amg-entete { top: 46px; }
}

.amg-entete .amg-entete__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(1rem, 2vw, 2rem);
	padding-block: 16px;
	max-width: var(--amg-largeur-site);
	padding-inline: var(--amg-marge);
}

.amg-entete .wp-block-site-logo img {
	height: 52px;
	width: auto;
	border-radius: 0;
}
@media (max-width: 781px) {
	.amg-entete .wp-block-site-logo img { height: 42px; }
	.amg-entete__inner { padding-block: 12px; }
}

/* Navigation principale */
.amg-nav .wp-block-navigation__container {
	gap: 26px;
}
.amg-nav .wp-block-navigation-item__content {
	/* Teinte atténuée plutôt qu'opacité : à 0,72, ces liens tombaient à 3,78:1.
	   Le gris-bleu du thème donne le même effet de retrait à 5,9:1. */
	color: var(--amg-gris-texte);
	padding-block: 4px;
	border-bottom: 2px solid transparent;
	transition: color 0.18s ease, border-color 0.18s ease;
}
.amg-nav .wp-block-navigation-item__content:hover,
.amg-nav .wp-block-navigation-item__content:focus {
	color: var(--amg-bleu);
	text-decoration: none;
}
.amg-nav .current-menu-item > .wp-block-navigation-item__content,
.amg-nav .current-menu-ancestor > .wp-block-navigation-item__content,
.amg-nav .current_page_item > .wp-block-navigation-item__content {
	color: var(--amg-bleu);
	font-weight: 700;
	border-bottom-color: var(--amg-cyan);
}

/* Sous-menu déroulant */
.amg-nav .wp-block-navigation__submenu-container {
	border: var(--amg-trait);
	border-radius: 14px;
	box-shadow: 0 14px 44px rgba(52, 83, 149, 0.14);
	padding: 8px;
	min-width: 250px;
	background: #fff;
	overflow: hidden;
}
@media (min-width: 1100px) {
	/* Le bloc le place sous le lien, donc 33 px à l'intérieur de l'en-tête,
	   qu'il recouvre. On le descend sous le bandeau, avec un peu d'air. */
	.amg-entete .amg-nav .wp-block-navigation__submenu-container {
		/* Le lien est centré dans l'en-tête : son bas se situe à mi-hauteur plus
		   la demi-hauteur du texte. Décaler d'une demi-hauteur d'en-tête pose
		   donc le panneau juste sous le bandeau, quelle que soit sa taille. */
		margin-top: calc(var(--amg-entete-h) / 2);
	}
}
.amg-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 10px 14px;
	border-radius: 10px;
	border-bottom: 0;
	color: var(--amg-gris-texte);
	white-space: nowrap;
}
.amg-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: var(--amg-bleu-pale);
	color: var(--amg-bleu);
}

/* Boutons d'en-tête (Mon compte / Dons) */
.amg-entete__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: none;
}
.amg-btn-entete {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.amg-btn-entete svg { flex: none; }
.amg-btn-entete--ghost {
	border: 1.5px solid rgba(52, 83, 149, 0.28);
	color: var(--amg-bleu);
}
.amg-btn-entete--ghost:hover,
.amg-btn-entete--ghost:focus {
	background: var(--amg-bleu-pale);
	border-color: var(--amg-bleu);
	color: var(--amg-bleu);
	text-decoration: none;
}
.amg-btn-entete--plein {
	padding: 10px 20px;
	/* Une bordure transparente de même épaisseur que celle du bouton contour :
	   sans elle, les deux boutons ne font pas la même hauteur. */
	border: 1.5px solid transparent;
	background: var(--amg-bleu);
	color: #fff;
}
.amg-btn-entete--plein:hover,
.amg-btn-entete--plein:focus {
	background: var(--amg-cyan);
	color: #fff;
	text-decoration: none;
}

/* Bascule mobile */
.amg-entete__burger {
	/* Il précède le panneau dans le balisage, pour la tabulation ; à l'écran il
	   reste à droite, après le logo. */
	order: 2;
	margin-left: auto;
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1.5px solid rgba(52, 83, 149, 0.24);
	border-radius: 12px;
	background: #fff;
	color: var(--amg-bleu);
	cursor: pointer;
	flex: none;
}
.amg-entete__burger svg { display: block; }
.amg-entete__burger .amg-icone-fermer { display: none; }
.amg-entete__burger[aria-expanded="true"] .amg-icone-fermer { display: block; }
.amg-entete__burger[aria-expanded="true"] .amg-icone-menu { display: none; }

@media (max-width: 1099px) {
	.amg-entete__burger { display: inline-flex; }
	.amg-entete__panneau {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		background: #fff;
		border-bottom: var(--amg-trait);
		box-shadow: 0 18px 40px rgba(52, 83, 149, 0.12);
		padding: 1.25rem clamp(1.25rem, 4.5vw, 3.5rem) 1.75rem;
		max-height: calc(100vh - var(--amg-entete-h));
		overflow-y: auto;
	}
	.amg-entete.is-ouvert .amg-entete__panneau { display: block; }
	.amg-nav .wp-block-navigation__container {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
		width: 100%;
	}
	.amg-nav .wp-block-navigation-item {
		width: 100%;
		border-bottom: 1px solid rgba(52, 83, 149, 0.08);
	}
	.amg-nav .wp-block-navigation-item__content {
		display: block;
		width: 100%;
		padding: 13px 0;
		font-size: 1rem;
		border-bottom: 0;
		opacity: 1;
	}
	/* Le soulignement de la page courante est calé sur le menu horizontal, où il
	   passe sous la ligne de base. En tiroir, il tombait 9 px sous le séparateur
	   de l'entrée, détaché de tout : on le ramène au ras du texte. */
	.amg-nav .wp-block-navigation-item__content::after {
		bottom: 8px;
		right: auto;
		width: 2.5rem;
	}
	/* Sur mobile, le sous-menu est déroulé en permanence, en retrait sous son
	   parent. WordPress le replie avec width/height 0 + overflow hidden et lui
	   donne un fond de carte : on neutralise l'ensemble. */
	.amg-entete .amg-nav .wp-block-navigation__submenu-container,
	.amg-entete .amg-nav .wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {
		position: static !important;
		width: 100% !important;
		min-width: 0 !important;
		height: auto !important;
		overflow: visible !important;
		opacity: 1 !important;
		visibility: visible !important;
		background: transparent !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		padding: 0 0 8px 14px !important;
	}
	/* La flèche d'ouverture n'a plus d'objet dans ce mode. */
	.amg-entete .amg-nav .wp-block-navigation__submenu-icon { display: none !important; }
	/* L'élément parent est un conteneur flex en ligne : on l'empile pour que le
	   sous-menu se place en retrait SOUS son parent, et non à côté. */
	.amg-entete .amg-nav .wp-block-navigation-item.has-child {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}
	.amg-entete .amg-nav .wp-block-navigation-submenu { width: 100%; }
	.amg-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		padding: 9px 0;
		font-size: 0.9375rem;
		color: var(--amg-gris-texte);
	}
	.amg-entete__actions {
		/* Les boutons formaient un bloc collé au dernier lien du menu : un trait
		   et de l'air les détachent de la liste. */
		margin-top: 1.25rem;
		padding-top: 1.25rem;
		border-top: 1px solid rgba(52, 83, 149, 0.12);
		flex-wrap: wrap;
	}
	.amg-entete__actions .amg-btn-entete { flex: 1 1 auto; justify-content: center; }
}

@media (min-width: 1100px) {
	.amg-entete__panneau {
		display: flex !important;
		align-items: center;
		gap: 1.75rem;
		flex: 1 1 auto;
		justify-content: flex-end;
	}
}


/* Palier intermédiaire : on resserre la navigation avant de passer au burger. */
@media (min-width: 1100px) and (max-width: 1279px) {
	.amg-entete__panneau { gap: 1.25rem; }
	.amg-nav .wp-block-navigation__container { gap: 18px !important; }
	.amg-nav .wp-block-navigation-item__content { font-size: 0.796875rem; }
	.amg-entete__actions { gap: 8px; }
	/* « Mon compte » passe en icône seule pour libérer de la place. Le libellé
	   n'est pas supprimé mais masqué visuellement : il reste lu à voix haute et
	   sert d'infobulle (voir amg_render_entete_actions()). */
	/* Même rythme vertical que le bouton plein : seule la largeur se resserre. */
	.amg-entete__actions .amg-btn-entete--ghost { padding-inline: 13px; gap: 0; }
	.amg-entete__actions .amg-btn-entete--ghost .amg-btn-entete__texte {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
		border: 0;
	}
	.amg-entete__actions .amg-btn-entete--ghost svg { width: 15px; height: 15px; }
}

/* ==========================================================================
   HÉROS
   ========================================================================== */

.amg-hero {
	position: relative;
	isolation: isolate;
	min-height: 470px;
	display: flex;
	align-items: center;
	overflow: hidden;
	background: var(--amg-bleu);
}
.amg-hero__media,
.amg-hero__media video,
.amg-hero__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: -2;
}
.amg-hero__voile {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(52, 83, 149, 0.82) 0%, rgba(52, 83, 149, 0.5) 48%, rgba(52, 83, 149, 0.14) 82%);
}
.amg-hero__contenu {
	max-width: 640px;
	color: #fff;
	padding-block: clamp(3.5rem, 8vw, 6rem);
}
.amg-hero__contenu :where(h1, h2, h3, p) { color: #fff; }
.amg-hero--centre .amg-hero__contenu {
	max-width: 900px;
	margin-inline: auto;
	text-align: center;
}
.amg-hero--centre .amg-hero__voile {
	background: linear-gradient(180deg, rgba(52, 83, 149, 0.62) 0%, rgba(52, 83, 149, 0.72) 100%);
}
.amg-hero__titre {
	font-family: var(--wp--preset--font-family--titre);
	font-weight: 400;
	line-height: 1.08;
	margin: 0;
}

/* Héros « Éthique et transmission de la vie » — pleine bande vidéo */
.amg-hero--signature { min-height: min(78vh, 560px); }
.amg-hero--signature .amg-hero__titre {
	font-size: clamp(1.875rem, 5.2vw, 3.75rem);
	letter-spacing: 0.01em;
	text-transform: uppercase;
	max-width: 15ch;
}
.amg-hero--signature.amg-hero--centre .amg-hero__titre { max-width: 20ch; margin-inline: auto; }

/* Héros de page intérieure (plus court) */
.amg-hero--page {
	min-height: 320px;
	background: linear-gradient(135deg, #345395 0%, #009FE3 100%);
}
.amg-hero--page .amg-hero__voile { background: rgba(52, 83, 149, 0.28); }
.amg-hero--page .amg-hero__contenu { padding-block: clamp(3rem, 6vw, 4.25rem); }

.amg-hero--colloque { background: linear-gradient(135deg, #B80D57 0%, #D72576 100%); }
.amg-hero--colloque .amg-hero__voile { background: rgba(184, 13, 87, 0.3); }

.amg-hero__surtitre {
	display: block;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.9;
	margin-bottom: 14px;
}

.amg-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 28px;
}
.amg-hero .amg-btn--fantome {
	background: rgba(20, 38, 78, 0.42);
	border: 1.5px solid rgba(255, 255, 255, 0.72);
	color: #fff;
	backdrop-filter: blur(2px);
}
.amg-hero .amg-btn--fantome:hover,
.amg-hero .amg-btn--fantome:focus {
	background: #fff;
	color: var(--amg-bleu);
	border-color: #fff;
}

/* Bouton lecture de la bande vidéo */
.amg-hero__son {
	position: absolute;
	right: clamp(1rem, 3vw, 2rem);
	bottom: clamp(1rem, 3vw, 2rem);
	z-index: 2;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	border: 1.5px solid rgba(255, 255, 255, 0.7);
	background: rgba(52, 83, 149, 0.45);
	color: #fff;
	cursor: pointer;
	backdrop-filter: blur(4px);
}
.amg-hero__son .amg-icone-son-on { display: none; }
.amg-hero__son[aria-pressed="true"] .amg-icone-son-on { display: block; }
.amg-hero__son[aria-pressed="true"] .amg-icone-son-off { display: none; }

/* ==========================================================================
   BOUTONS UTILITAIRES
   ========================================================================== */

.amg-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 26px;
	border-radius: 999px;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	background: var(--amg-cyan-texte);
	color: #fff;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.amg-btn:hover, .amg-btn:focus { background: var(--amg-bleu); color: #fff; text-decoration: none; }
.amg-btn--bleu { background: var(--amg-bleu); }
.amg-btn--bleu:hover, .amg-btn--bleu:focus { background: var(--amg-cyan); }
.amg-btn--colloque { background: var(--amg-magenta); }
.amg-btn--colloque:hover, .amg-btn--colloque:focus { background: var(--amg-magenta-fonce); }
.amg-btn--contour {
	background: transparent;
	border-color: rgba(52, 83, 149, 0.3);
	color: var(--amg-bleu);
}
.amg-btn--contour:hover, .amg-btn--contour:focus {
	background: var(--amg-bleu);
	border-color: var(--amg-bleu);
	color: #fff;
}

/* Lien fléché */
.amg-lien-fleche {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--amg-cyan-texte);
}
.amg-lien-fleche::after {
	content: "";
	width: 16px;
	height: 16px;
	flex: none;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.18s ease;
}
.amg-lien-fleche:hover::after, .amg-lien-fleche:focus::after { transform: translateX(4px); }
.amg-lien-fleche:hover, .amg-lien-fleche:focus { text-decoration: none; color: var(--amg-bleu); }

/* ==========================================================================
   SURTITRES ET EN-TÊTES DE SECTION
   ========================================================================== */

.amg-surtitre {
	display: block;
	font-size: 0.78125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--amg-cyan-texte);
	margin-bottom: 0.75rem;
}
.amg-surtitre--bleu { color: var(--amg-bleu); }
.amg-surtitre--colloque { color: var(--amg-magenta); }
.amg-surtitre--blanc { color: rgba(255, 255, 255, 0.9); }

/* ==========================================================================
   CARTES
   ========================================================================== */

.amg-carte {
	background: var(--amg-bleu-pale);
	border: 1px solid rgba(52, 83, 149, 0.1);
	border-radius: var(--amg-rayon-carte);
	padding: 30px 26px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
/* Seuls les éléments d'action se collent en bas de carte : appliquer la règle
   au dernier enfant quel qu'il soit poussait les paragraphes vers le bas et
   creusait un vide au milieu des cartes. */
.amg-carte > a.amg-lien-fleche:last-child,
.amg-carte > a.amg-btn:last-child,
.amg-carte > p:last-child:has(> a.amg-lien-fleche),
.amg-carte > p:last-child:has(> a.amg-btn) { margin-top: auto; }
.amg-carte--blanche { background: #fff; box-shadow: 0 2px 18px rgba(52, 83, 149, 0.07); }

.amg-carte__icone {
	width: 56px;
	height: 56px;
	flex: none;
	border-radius: 16px;
	background: var(--amg-bleu-clair);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--amg-bleu);
}
.amg-carte__icone--colloque { background: var(--amg-rose, #F8C9D0); color: var(--amg-magenta-fonce); }
.amg-carte__titre {
	font-family: var(--wp--preset--font-family--corps) !important;
	font-size: 1rem !important;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
	color: var(--amg-bleu);
}
.amg-carte__num {
	font-family: var(--wp--preset--font-family--titre);
	font-size: 1.5rem;
	line-height: 1;
	color: var(--amg-cyan-texte);
}

/* Grilles de cartes */
.amg-grille {
	display: grid;
	gap: 22px;
}
.amg-grille--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.amg-grille--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.amg-grille--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1023px) {
	.amg-grille--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.amg-grille--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
	.amg-grille--2,
	.amg-grille--3,
	.amg-grille--4 { grid-template-columns: minmax(0, 1fr); }
}

/* Deux colonnes texte + média */
.amg-duo {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(2rem, 4vw, 3.5rem);
	align-items: center;
}
.amg-duo--large-gauche { grid-template-columns: 1.1fr 0.9fr; }
.amg-duo--large-droite { grid-template-columns: 0.9fr 1.1fr; }
@media (max-width: 899px) {
	.amg-duo,
	.amg-duo--large-gauche,
	.amg-duo--large-droite { grid-template-columns: minmax(0, 1fr); }
	.amg-duo__media--apres { order: 2; }
}
.amg-duo__media img {
	width: 100%;
	height: 100%;
	max-height: 420px;
	object-fit: cover;
	border-radius: var(--amg-rayon-carte);
	display: block;
}

/* ==========================================================================
   TÉMOIGNAGES VIDÉO
   ========================================================================== */

.amg-videos {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 26px;
	margin-inline: auto;
}
.amg-video {
	position: relative;
	border-radius: var(--amg-rayon-carte);
	overflow: hidden;
	background: var(--amg-bleu-clair);
	aspect-ratio: 9 / 16;
	/* La hauteur commande : la vidéo doit tenir dans l'écran sans le remplir.
	   La largeur suit le format 9/16, elle n'a pas à être imposée. */
	height: clamp(360px, 58vh, 520px);
	width: auto;
	flex: 0 0 auto;
	box-shadow: 0 14px 44px rgba(52, 83, 149, 0.14);
}
@media (max-width: 639px) {
	/* Sur téléphone la largeur redevient la contrainte forte. */
	.amg-video { height: auto; width: min(300px, 76vw); }
}
@media (max-height: 620px) and (min-width: 640px) {
	/* Téléphone ou tablette en paysage : le plancher de 360 px dépasserait la
	   fenêtre. La hauteur disponible reprend la main. */
	.amg-video { height: 74vh; }
}
.amg-video video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.amg-video__legende {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 34px 18px 16px;
	background: linear-gradient(180deg, rgba(52, 83, 149, 0) 0%, rgba(52, 83, 149, 0.85) 100%);
	color: #fff;
	font-size: 0.84375rem;
	font-weight: 700;
	pointer-events: none;
}
.amg-video__play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(52, 83, 149, 0.22);
	border: 0;
	cursor: pointer;
	color: #fff;
	transition: background-color 0.2s ease;
}
.amg-video__play:hover { background: rgba(52, 83, 149, 0.34); }
/* Ces boutons couvrent toute leur carte, qui rogne ce qui dépasse : sans offset
   négatif, l'anneau de focus est coupé et donc invisible. */
.amg-video__play:focus-visible,
.amg-video-ext__play:focus-visible { outline-offset: -4px; }
.amg-video__play span {
	width: 66px;
	height: 66px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--amg-bleu);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 24px rgba(52, 83, 149, 0.3);
}
.amg-video.is-lecture .amg-video__play,
.amg-video.is-lecture .amg-video__legende { display: none; }

/* ==========================================================================
   FORMULAIRE DE CONTACT (Contact Form 7)
   ========================================================================== */

/* Colonne de texte volontairement plus étroite : le formulaire est l'objet
   principal du bloc, il doit respirer. */
.amg-bloc-contact {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
	gap: clamp(2rem, 4vw, 4rem);
	align-items: start;
}
@media (max-width: 899px) { .amg-bloc-contact { grid-template-columns: minmax(0, 1fr); } }

.amg-formulaire {
	background: #fff;
	border-radius: var(--amg-rayon-carte);
	padding: clamp(1.75rem, 3vw, 2.5rem);
	box-shadow: 0 2px 18px rgba(52, 83, 149, 0.07);
}
.amg-formulaire .wpcf7-form { display: flex; flex-direction: column; gap: 1.25rem; }
.amg-formulaire .wpcf7-form > p { margin: 0; }
.amg-formulaire .amg-champs-duo {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.25rem;
}
.amg-formulaire .amg-champs-duo > p { margin: 0; min-width: 0; }

.amg-formulaire label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	margin-bottom: 8px;
	color: var(--amg-bleu);
}
/* L'astérisque des champs obligatoires reste discret. */
.amg-formulaire label span[aria-hidden] { color: var(--amg-cyan-texte); font-weight: 400; }
.amg-formulaire input[type="text"],
.amg-formulaire input[type="email"],
.amg-formulaire input[type="tel"],
.amg-formulaire input[type="url"],
.amg-formulaire input[type="number"],
.amg-formulaire select,
.amg-formulaire textarea {
	width: 100%;
	max-width: 100%;
	border: 1.5px solid var(--amg-trait-champ);
	border-radius: var(--amg-rayon-champ);
	padding: 14px 18px;
	font-family: inherit;
	font-size: 0.9375rem;
	line-height: 1.4;
	color: var(--amg-bleu);
	background: var(--amg-bleu-pale);
	appearance: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.amg-formulaire :where(input, select, textarea):hover { background: #fff; }
/* Chevron dessiné, à la place du menu déroulant natif du système. */
.amg-formulaire select {
	padding-right: 44px;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23345395' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 16px;
	cursor: pointer;
}
.amg-formulaire textarea { resize: vertical; min-height: 150px; }
.amg-formulaire :where(input, select, textarea):focus {
	border-color: var(--amg-cyan-texte);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(0, 104, 143, 0.16);
}
/* Le halo suffit à la souris ; au clavier, l'anneau global reste indispensable. */
.amg-formulaire :where(input, select, textarea):focus:not(:focus-visible) {
	outline: none;
}
.amg-formulaire ::placeholder,
.amg-formulaire--compte ::placeholder,
.amg-recherche ::placeholder { color: var(--amg-gris-texte); opacity: 1; }
.amg-formulaire .wpcf7-submit,
.amg-formulaire input[type="submit"] {
	align-self: flex-start;
	padding: 15px 34px;
	font-size: 0.9375rem;
	background: var(--amg-bleu);
	color: #fff;
	border: 0;
	border-radius: 999px;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.18s ease;
}
.amg-formulaire .wpcf7-submit:hover { background: var(--amg-cyan); }
.amg-formulaire .wpcf7-spinner { margin-inline-start: 12px; }
.amg-formulaire .wpcf7-not-valid-tip { font-size: 0.8125rem; color: #C0392B; margin-top: 4px; }
.amg-formulaire .wpcf7-response-output {
	margin: 12px 0 0;
	padding: 12px 16px;
	border-radius: 12px;
	border-width: 1.5px;
	font-size: 0.84375rem;
}
.amg-formulaire .amg-rgpd {
	font-size: 0.8125rem;
	line-height: 1.6;
	color: rgba(52, 83, 149, 0.8);
	font-weight: 400;
	padding-top: 0.25rem;
	border-top: 1px solid rgba(52, 83, 149, 0.1);
}
.amg-formulaire .amg-rgpd .wpcf7-list-item { margin: 0; }
.amg-formulaire .amg-rgpd label {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
	font-size: inherit;
	font-weight: 400;
	margin: 0;
	cursor: pointer;
}
.amg-formulaire .amg-rgpd input[type="checkbox"] {
	flex: none;
	width: 20px;
	height: 20px;
	margin-top: 2px;
	border: 1.5px solid var(--amg-trait-champ);
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	display: grid;
	place-content: center;
}
.amg-formulaire .amg-rgpd input[type="checkbox"]::before {
	content: "";
	width: 11px;
	height: 11px;
	transform: scale(0);
	transition: transform 0.12s ease;
	background: #fff;
	clip-path: polygon(14% 45%, 0 60%, 40% 100%, 100% 22%, 85% 8%, 38% 71%);
}
.amg-formulaire .amg-rgpd input[type="checkbox"]:checked {
	background: var(--amg-cyan-texte);
	border-color: var(--amg-cyan-texte);
}
.amg-formulaire .amg-rgpd input[type="checkbox"]:checked::before { transform: scale(1); }

/* ==========================================================================
   ASSOCIATIONS MOCS
   ========================================================================== */

.amg-asso {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: clamp(1.5rem, 3vw, 2.5rem);
	align-items: center;
	background: #fff;
	border: 1px solid rgba(52, 83, 149, 0.1);
	border-radius: var(--amg-rayon-carte);
	padding: clamp(1.5rem, 3vw, 2rem);
	box-shadow: 0 2px 18px rgba(52, 83, 149, 0.07);
}
@media (max-width: 767px) {
	.amg-asso { grid-template-columns: minmax(0, 1fr); text-align: center; }
	.amg-asso__meta { justify-content: center; }
}
.amg-asso__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 110px;
	padding: 12px;
	background: var(--amg-bleu-pale);
	border-radius: 18px;
}
.amg-asso__logo img { max-width: 100%; max-height: 92px; width: auto; height: auto; object-fit: contain; border-radius: 0; }
.amg-asso__nom {
	font-family: var(--wp--preset--font-family--titre) !important;
	font-size: 1.375rem !important;
	margin: 0 0 0.75rem;
	color: var(--amg-bleu);
}
.amg-asso__meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 1rem 0 0; padding: 0; list-style: none; }
.amg-asso__meta li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 999px;
	background: var(--amg-bleu-clair);
	color: var(--amg-bleu);
	font-size: 0.78125rem;
	font-weight: 700;
}
.amg-asso__meta li.est-gratuit { background: var(--amg-vert-texte); color: #fff; }
.amg-asso__liens { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 1rem; font-size: 0.84375rem; font-weight: 700; }

/* ==========================================================================
   RESSOURCES
   ========================================================================== */

.amg-ressource {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #fff;
	border: 1px solid rgba(52, 83, 149, 0.1);
	border-radius: var(--amg-rayon-carte);
	padding: 24px;
	box-shadow: 0 2px 18px rgba(52, 83, 149, 0.07);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.amg-ressource:hover { transform: translateY(-3px); box-shadow: 0 14px 44px rgba(52, 83, 149, 0.14); }
.amg-ressource__type {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: flex-start;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--amg-bleu-clair);
	color: var(--amg-bleu);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.amg-ressource__type--video { background: var(--amg-rose, #F8C9D0); color: #9C0A49; }
.amg-ressource__type--livre { background: var(--amg-vert-pale, #E4EECD); color: #5F7F4A; }
.amg-ressource__titre {
	font-family: var(--wp--preset--font-family--corps) !important;
	font-size: 1.0625rem !important;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
}
.amg-ressource__resume { font-size: 0.875rem; line-height: 1.65; margin: 0; opacity: 0.9; }
.amg-ressource__cadenas {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	background: var(--amg-bleu);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}


/* Barre de recherche / filtres */
.amg-filtres { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 2rem; }
.amg-filtre {
	padding: 9px 18px;
	border-radius: 999px;
	border: 1.5px solid rgba(52, 83, 149, 0.22);
	background: #fff;
	color: var(--amg-bleu);
	font-family: inherit;
	font-size: 0.84375rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.amg-filtre:hover { border-color: var(--amg-bleu); }
.amg-filtre[aria-pressed="true"] { background: var(--amg-bleu); border-color: var(--amg-bleu); color: #fff; }
.amg-recherche {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 460px;
	margin: 0 auto 1.5rem;
	background: #fff;
	border: 1.5px solid var(--amg-trait-champ);
	border-radius: 999px;
	padding: 6px 8px 6px 18px;
}
.amg-recherche input {
	flex: 1 1 auto;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 0.875rem;
	color: var(--amg-bleu);
	padding: 8px 0;
}
.amg-recherche input:focus:not(:focus-visible) { outline: none; }
.amg-recherche:focus-within {
	border-color: var(--amg-cyan-texte);
	box-shadow: 0 0 0 3px rgba(0, 104, 143, 0.16);
}
.amg-recherche button {
	flex: none;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 999px;
	background: var(--amg-bleu);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.amg-vide { text-align: center; padding: 2rem 0; opacity: 0.7; }

/* ==========================================================================
   FLIPBOOK (livret)
   ========================================================================== */

.amg-flipbook {
	background: var(--amg-bleu-pale);
	border: 1px solid rgba(52, 83, 149, 0.1);
	border-radius: var(--amg-rayon-carte);
	padding: clamp(1.25rem, 3vw, 2rem);
}
.amg-flipbook__scene {
	position: relative;
	margin-inline: auto;
	max-width: 900px;
	perspective: 2200px;
}
.amg-flipbook__pages {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 18px 50px rgba(52, 83, 149, 0.2);
}
.amg-flipbook__page { position: relative; margin: 0; background: #fff; }
.amg-flipbook__page img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0;
	transition: opacity 0.28s ease;
}
.amg-flipbook__page--vide { background: var(--amg-bleu-ciel, #EEF5FB); }
.amg-flipbook__pages::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 26px;
	transform: translateX(-50%);
	background: linear-gradient(90deg, rgba(52, 83, 149, 0) 0%, rgba(52, 83, 149, 0.14) 45%, rgba(52, 83, 149, 0.14) 55%, rgba(52, 83, 149, 0) 100%);
	pointer-events: none;
}
.amg-flipbook.est-simple .amg-flipbook__pages { grid-template-columns: minmax(0, 1fr); max-width: 460px; margin-inline: auto; }
.amg-flipbook.est-simple .amg-flipbook__pages::after { display: none; }

.amg-flipbook__barre {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 1.25rem;
	flex-wrap: wrap;
}
.amg-flipbook__nav {
	width: 46px;
	height: 46px;
	border-radius: 999px;
	border: 1.5px solid rgba(52, 83, 149, 0.24);
	background: #fff;
	color: var(--amg-bleu);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease;
}
.amg-flipbook__nav:hover:not(:disabled) { background: var(--amg-bleu); color: #fff; }
.amg-flipbook__nav:disabled { opacity: 0.35; cursor: default; }
.amg-flipbook__compteur { font-size: 0.84375rem; font-weight: 700; min-width: 92px; text-align: center; }
.amg-flipbook__outils { display: flex; gap: 10px; }

.amg-flipbook:fullscreen,
.amg-flipbook:-webkit-full-screen {
	display: flex;
	flex-direction: column;
	justify-content: center;
	background: var(--amg-bleu);
	padding: 2rem;
	border-radius: 0;
}
.amg-flipbook:fullscreen .amg-flipbook__scene { max-width: min(1400px, 92vw); }
.amg-flipbook:fullscreen .amg-flipbook__compteur { color: #fff; }

/* ==========================================================================
   BANDEAU / APPEL À L'ACTION
   ========================================================================== */

.amg-bandeau {
	border-radius: var(--amg-rayon-carte);
	padding: clamp(2rem, 4vw, 3rem);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.75rem;
}
.amg-bandeau__texte { flex: 1 1 340px; }
.amg-bandeau__texte :where(h2, h3) { margin-top: 0; }
.amg-bandeau__texte :where(p):last-child { margin-bottom: 0; }
.amg-bandeau--colloque { background: var(--amg-vert-pale, #E4EECD); }
.amg-bandeau--bleu { background: var(--amg-bleu); color: #fff; }
.amg-bandeau--bleu :where(h2, h3, p) { color: #fff; }

.amg-etiquette {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--amg-magenta);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 1rem;
}
.amg-etiquette--bleu { background: var(--amg-cyan-texte); }

/* ==========================================================================
   ARTICLES / BLOG
   ========================================================================== */

.amg-articles .wp-block-post {
	background: #fff;
	border: 1px solid rgba(52, 83, 149, 0.1);
	border-radius: var(--amg-rayon-carte);
	overflow: hidden;
	box-shadow: 0 2px 18px rgba(52, 83, 149, 0.07);
	display: flex;
	flex-direction: column;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.amg-articles .wp-block-post:hover { transform: translateY(-3px); box-shadow: 0 14px 44px rgba(52, 83, 149, 0.14); }
.amg-articles .wp-block-post-featured-image { margin: 0; }
.amg-articles .wp-block-post-featured-image img { border-radius: 0; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.amg-articles .amg-article__corps { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.amg-articles .wp-block-post-title {
	font-family: var(--wp--preset--font-family--corps);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
}
.amg-articles .wp-block-post-title a { color: var(--amg-bleu); }
.amg-articles .wp-block-post-title a:hover { color: var(--amg-cyan-texte); text-decoration: none; }
.amg-articles .wp-block-post-date { font-size: 0.78125rem; opacity: 0.7; margin: 0; }
.amg-articles .wp-block-post-excerpt { font-size: 0.875rem; line-height: 1.65; margin: 0; }
.amg-articles .wp-block-post-excerpt__more-link { font-weight: 700; }

.amg-pagination { margin-top: 2.5rem; }
.amg-pagination .wp-block-query-pagination-numbers,
.amg-pagination .wp-block-query-pagination-previous,
.amg-pagination .wp-block-query-pagination-next { font-size: 0.875rem; font-weight: 700; }
.amg-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border-radius: 999px;
	color: var(--amg-bleu);
}
.amg-pagination .page-numbers.current { background: var(--amg-bleu); color: #fff; }

/* Article seul */
.amg-article-solo .wp-block-post-content { font-size: 1rem; line-height: 1.8; }
.amg-article-solo .wp-block-post-content > * { margin-block: 1.25rem; }
.amg-article-solo .wp-block-post-featured-image img { border-radius: var(--amg-rayon-carte); }

/* ==========================================================================
   PIED DE PAGE
   ========================================================================== */

.amg-pied { background: var(--amg-bleu); color: #fff; }
.amg-pied :where(a, p, h2, h3, h4, li) { color: #fff; }
.amg-pied a:hover { color: #fff; text-decoration: underline; }
.amg-pied__grille {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: clamp(1.75rem, 3vw, 2.5rem);
	padding-block: clamp(2.5rem, 5vw, 3.25rem) clamp(1.75rem, 3vw, 2.25rem);
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
@media (max-width: 899px) { .amg-pied__grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 559px) { .amg-pied__grille { grid-template-columns: minmax(0, 1fr); } }
.amg-pied__logo {
	display: inline-block;
	background: #fff;
	border-radius: 14px;
	padding: 12px 16px;
}
.amg-pied__logo img { height: 44px; width: auto; display: block; border-radius: 0; }
.amg-pied__baseline { font-size: 0.84375rem; line-height: 1.7; margin: 18px 0 0; opacity: 0.85; }
.amg-pied__titre,
h2.amg-pied__titre {
	font-family: var(--wp--preset--font-family--corps) !important;
	font-size: 0.84375rem !important;
	font-weight: 700;
	line-height: 1.4;
	margin: 0 0 14px;
	color: #fff;
}
.amg-pied__liens { display: flex; flex-direction: column; gap: 9px; font-size: 0.84375rem; list-style: none; margin: 0; padding: 0; }
.amg-pied__liens a { opacity: 0.86; }
.amg-pied__liens a:hover { opacity: 1; }
/* Lien d'adhésion : au-dessus des deux boutons, dans le fil des autres liens
   du pied de page — c'est une page à visiter, pas une action. Il doit donc
   ressembler aux liens des colonnes voisines, soulignement compris. */
.amg-pied__lien-adhesion {
	margin: 0 0 14px;
	/* Même corps que les liens des colonnes voisines : c'est un lien de plus,
	   pas le titre de la colonne. */
	font-size: 0.875rem;
}
.amg-pied__lien-adhesion a {
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	text-decoration-color: rgba(255, 255, 255, 0.45);
}
.amg-pied__lien-adhesion a:hover { text-decoration-color: currentColor; }
.amg-pied__actions { display: flex; flex-direction: column; gap: 10px; }
.amg-pied__actions a {
	text-align: center;
	padding: 10px 16px;
	border-radius: 999px;
	font-size: 0.84375rem;
	font-weight: 700;
}
.amg-pied__actions .est-contour { border: 1.5px solid rgba(255, 255, 255, 0.5); }
.amg-pied__actions .est-contour:hover { background: rgba(255, 255, 255, 0.14); text-decoration: none; }
.amg-pied__actions .est-plein { background: var(--amg-cyan-texte); }
.amg-pied__actions .est-plein:hover { background: #fff; color: var(--amg-bleu); text-decoration: none; }
.amg-pied__bas {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	align-items: center;
	padding-block: 1.25rem 1.75rem;
	font-size: 0.75rem;
	opacity: 0.75;
}
.amg-pied__bas p { margin: 0; }

/* ==========================================================================
   DIVERS
   ========================================================================== */

.amg-mesure { max-width: 68ch; }
.amg-centre { text-align: center; }
.amg-centre .amg-mesure { margin-inline: auto; }
.amg-entete-section { text-align: center; margin-bottom: clamp(2rem, 4vw, 2.75rem); }
.amg-entete-section h2 { margin: 0; }
.amg-entete-section p { margin: 1rem auto 0; max-width: 62ch; }

.amg-liste-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.amg-liste-check li {
	position: relative;
	padding-left: 34px;
	line-height: 1.65;
}
.amg-liste-check li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 2px;
	width: 22px;
	height: 22px;
	border-radius: 999px;
	background: var(--amg-bleu-clair) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23345395' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.amg-infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.amg-info {
	background: #fff;
	border: 1px solid rgba(52, 83, 149, 0.1);
	border-radius: var(--amg-rayon-carte);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.amg-info__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amg-cyan-texte); }
.amg-info p { margin: 0; font-size: 0.875rem; line-height: 1.65; }
/* Une adresse de courriel n'a pas d'espace où se couper : sans cela elle sort
   de sa carte sur les colonnes étroites. */
.amg-info, .amg-info a { overflow-wrap: anywhere; }

.amg-carte-embed {
	border-radius: var(--amg-rayon-carte);
	overflow: hidden;
	border: 1px solid rgba(52, 83, 149, 0.12);
	background: var(--amg-bleu-pale);
	aspect-ratio: 16 / 9;
}
.amg-carte-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Image pleine largeur avec coins arrondis */
.amg-image-arrondie img { border-radius: var(--amg-rayon-carte); display: block; width: 100%; }

/* Bloc note éditeur (visible admin uniquement) */
.amg-note-interne {
	border: 2px dashed rgba(215, 37, 118, .5);
	border-radius: 14px;
	padding: 1rem 1.25rem;
	background: #FDF2F4;
	font-size: 0.84375rem;
}
body:not(.logged-in) .amg-note-interne { display: none; }

/* Impression ------------------------------------------------------------- */
@media print {
	.amg-entete, .amg-pied, .amg-flipbook__barre, .amg-hero__actions { display: none !important; }
	body { color: #000; }
}

/* ==========================================================================
   CONTENEUR (parties de gabarit hors flux de contenu)
   ========================================================================== */
.amg-conteneur {
	width: 100%;
	max-width: var(--amg-largeur-site);
	margin-inline: auto;
	padding-inline: var(--amg-marge);
}

/* Note interne : lisible en édition, jamais alignée bord à bord. */
.wp-block-post-content > .amg-note-interne,
.entry-content > .amg-note-interne {
	max-width: calc(1128px + 2 * clamp(1.25rem, 4.5vw, 3.5rem));
	margin: 1.5rem auto;
	margin-inline: auto;
	width: calc(100% - 2 * clamp(1.25rem, 4.5vw, 3.5rem));
}
.amg-note-interne::before {
	content: "Note interne — ";
	font-weight: 700;
	color: var(--amg-magenta);
}
span.amg-note-interne {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 8px;
	border-width: 1.5px;
}
span.amg-note-interne::before { content: ""; }

/* ==========================================================================
   ENCHAÎNEMENT DES SECTIONS
   Les bandes de couleur doivent se toucher : on neutralise la gouttière de
   flux que WordPress applique entre blocs de premier niveau du contenu.
   ========================================================================== */
.wp-block-post-content > .amg-hero,
.wp-block-post-content > section.wp-block-group,
.wp-block-post-content > div.wp-block-group:not(.amg-note-interne) {
	margin-block: 0;
}

/* Page blanche du feuilleteur : l'image sans source ne doit rien afficher. */
.amg-flipbook__page--vide img { display: none; }

/* Pages gauche/droite du feuilleteur : classes de repérage pour le script,
   leur mise en forme est portée par .amg-flipbook__page. */
.amg-flipbook__page--gauche,
.amg-flipbook__page--droite { position: relative; }

/* ==========================================================================
   CONTRASTE DES HÉROS PHOTO
   Sur une photo claire, le voile léger des héros de page ne suffisait pas
   à garantir la lisibilité du texte blanc. On le renforce dès qu'une image
   de fond est présente, en gardant le dégradé latéral de la maquette.
   ========================================================================== */
.amg-hero:has(.amg-hero__media) .amg-hero__voile {
	background: linear-gradient(90deg, rgba(52, 83, 149, 0.9) 0%, rgba(52, 83, 149, 0.72) 42%, rgba(52, 83, 149, 0.42) 78%, rgba(52, 83, 149, 0.34) 100%);
}
.amg-hero--colloque:has(.amg-hero__media) .amg-hero__voile {
	background: linear-gradient(90deg, rgba(184, 13, 87, 0.92) 0%, rgba(184, 13, 87, 0.76) 42%, rgba(184, 13, 87, 0.46) 78%, rgba(184, 13, 87, 0.38) 100%);
}
.amg-hero--centre:has(.amg-hero__media) .amg-hero__voile {
	background: linear-gradient(180deg, rgba(52, 83, 149, 0.76) 0%, rgba(52, 83, 149, 0.84) 100%);
}
/* Repli pour les navigateurs sans :has() — voile uniforme un peu plus dense. */
@supports not selector(:has(*)) {
	.amg-hero--page .amg-hero__voile { background: rgba(52, 83, 149, 0.62); }
	.amg-hero--colloque .amg-hero__voile { background: rgba(184, 13, 87, 0.66); }
}
/* Ombre portée légère : sécurise le texte au-dessus des zones les plus claires. */
.amg-hero__contenu :where(h1, .amg-hero__surtitre) {
	text-shadow: 0 1px 14px rgba(20, 32, 60, 0.35);
}

/* ==========================================================================
   CORRECTIF — GOUTTIÈRE DE FLUX WORDPRESS
   Nos conteneurs de mise en page (grille, flex) sont portés par des
   `wp-block-group` en layout « flow ». WordPress y applique alors un
   `margin-block-start` de blockGap à tous les enfants sauf le premier, ce qui
   décalait le voile des héros, désalignait les cartes et faisait varier les
   hauteurs. Ces conteneurs gèrent leur propre espacement : on neutralise.
   ========================================================================== */
.amg-hero > *,
.amg-grille > *,
.amg-duo > *,
.amg-videos > *,
.amg-bloc-contact > *,
.amg-infos > *,
.amg-bandeau > *,
.amg-asso > *,
.amg-pied__grille > *,
.amg-pied__bas > *,
.amg-entete__inner > *,
.amg-entete__panneau > *,
.amg-entete__actions > *,
.amg-flipbook__pages > *,
.amg-flipbook__barre > *,
.amg-filtres > *,
.amg-recherche > *,
.amg-liste-check > *,
.amg-asso__meta > * {
	margin-block: 0;
}

/* Les <figure> gardent la marge par défaut du navigateur : on la retire là où
   elles servent de brique de mise en page. */
.amg-videos figure,
.amg-flipbook__page {
	margin: 0;
}

/* ==========================================================================
   CORRECTIF — ALIGNEMENT DES BLOCS À DEUX COLONNES
   Le formulaire de contact est bien plus haut que son texte d'accroche :
   centrer verticalement laissait le titre flotter au milieu du vide.
   ========================================================================== */
.amg-bloc-contact { align-items: start; }
.amg-bloc-contact > *:first-child { padding-top: clamp(0rem, 1.5vw, 1.5rem); }

/* Même logique pour les fiches associations : le logo se cale en haut, à
   hauteur du nom de l'association, plutôt qu'au milieu d'une carte inégale. */
.amg-asso { align-items: start; }
.amg-asso__logo { min-height: 0; padding: 16px; }
.amg-asso__logo img { max-height: 84px; }
@media (max-width: 767px) {
	.amg-asso__logo { justify-self: center; width: min(100%, 260px); }
}

/* ==========================================================================
   CORRECTIF — COUVERTURE DU FEUILLETEUR
   À la première vue, il n'y a qu'une page : afficher une demi-page blanche à
   gauche donnait un livre bancal. On centre la couverture seule.
   ========================================================================== */
.amg-flipbook.est-couverture .amg-flipbook__pages {
	grid-template-columns: minmax(0, 1fr);
	max-width: 460px;
	margin-inline: auto;
}
.amg-flipbook.est-couverture .amg-flipbook__pages::after { display: none; }
.amg-flipbook.est-couverture .amg-flipbook__page--gauche { display: none; }

/* ==========================================================================
   CORRECTIF — LARGEUR DE LIGNE DANS LES HÉROS
   .amg-conteneur cale le bloc sur la largeur du site ; sans limite propre, le
   chapeau s'étirait alors sur 1128 px, bien au-delà du titre. On borne le
   texte, pas le conteneur.
   ========================================================================== */
.amg-hero__contenu { max-width: none; }
.amg-hero__contenu > * { max-width: 40rem; }
.amg-hero__contenu > .amg-hero__titre { max-width: 22ch; }
.amg-hero--signature .amg-hero__contenu > .amg-hero__titre { max-width: 15ch; }
.amg-hero--centre .amg-hero__contenu > * { max-width: 54rem; margin-inline: auto; }
.amg-hero--centre .amg-hero__contenu > .amg-hero__titre { max-width: 20ch; }

/* Respiration entre le titre et les boutons, comme sur la maquette. */
.amg-hero__contenu > .amg-hero__actions { margin-top: 1.75rem; max-width: none; }

/* ==========================================================================
   CONTRASTE — DÉCLINAISONS DE TEXTE
   Le cyan de la charte (#009FE3) ne donne que 2,97:1 sur blanc, sous le seuil
   AA de 4,5:1. Il reste la couleur de marque pour tout ce qui est décor
   (dégradés, icônes, filets, soulignement de la navigation) ; dès qu'il porte
   du texte ou reçoit du texte blanc, on utilise sa déclinaison assombrie.
   #00688F : 4,55:1 au pire des fonds du site. Même logique pour le magenta.
   ========================================================================== */
:root {
	--amg-cyan-texte: #00688F;
	--amg-magenta-texte: #B80D57;
	--amg-vert-texte: #5C7F45;
}

.amg-ressource__type--livre { background: #E4EECD; color: #3F5A2C; }

/* Liens de contenu sans classe (prose, pagination, listes). */
:where(.wp-block-post-content, .entry-content) a:not([class]),
.amg-asso__liens a { color: var(--amg-cyan-texte); }

/* Cibles de clic un peu plus généreuses dans l'en-tête. */
.amg-btn-entete { padding-block: 12px; }

/* Surtitres et liens du colloque : le magenta de la maquette (#D72576) tombe à
   3,5:1 sur les fonds vert pâle et bleu brume. On garde le magenta profond de
   la charte imprimée, conforme sur tous les fonds du site. */
/* Le magenta ne concerne que les surtitres de section, jamais ceux d'un héros
   où le texte est posé sur une photo assombrie : ils restent blancs. */
.amg-surtitre--colloque { color: var(--amg-magenta-texte); }
/* Le magenta ne s'applique qu'aux pages réellement liées au colloque : sur les
   autres pages, un bandeau vert pâle reste dans la gamme bleue du site. */
.page-colloque .amg-bandeau--colloque a:not([class]),
.page-colloque .amg-bandeau--colloque .amg-lien-fleche,
.page-communication-colloque .amg-bandeau--colloque a:not([class]),
.page-communication-colloque .amg-bandeau--colloque .amg-lien-fleche { color: var(--amg-magenta-texte); }

/* Cibles de clic : 35 px était juste ; on passe à 40. */
.amg-filtre { padding-block: 11px; }

/* L'état vide du blog ne doit pas s'étirer sur toute la largeur. */
.wp-block-query-no-results { max-width: 60ch; margin-inline: auto; }
.wp-block-query-no-results p { text-align: center; }

/* Sur un bandeau bleu plein, un bouton « contour » bleu est invisible :
   il passe en blanc, comme les boutons fantômes des héros. */
.amg-bandeau--bleu .amg-btn--contour,
.amg-hero .amg-btn--contour {
	border-color: rgba(255, 255, 255, 0.6);
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}
.amg-bandeau--bleu .amg-btn--contour:hover,
.amg-bandeau--bleu .amg-btn--contour:focus,
.amg-hero .amg-btn--contour:hover,
.amg-hero .amg-btn--contour:focus {
	background: #fff;
	border-color: #fff;
	color: var(--amg-bleu);
}
.amg-bandeau--bleu .amg-btn:not(.amg-btn--contour) {
	background: #fff;
	color: var(--amg-bleu);
}
.amg-bandeau--bleu .amg-btn:not(.amg-btn--contour):hover,
.amg-bandeau--bleu .amg-btn:not(.amg-btn--contour):focus {
	background: var(--amg-bleu-clair);
	color: var(--amg-bleu);
}
.amg-bandeau--bleu .amg-lien-fleche { color: #fff; }

/* Le surtitre du héros, en petites capitales espacées, se noyait dans les
   zones claires de la photo : blanc plein plutôt que translucide. */
.amg-hero__surtitre {
	opacity: 1;
	color: #fff;
	text-shadow: 0 1px 12px rgba(20, 32, 60, 0.45);
}
.amg-hero--colloque .amg-hero__surtitre { text-shadow: 0 1px 12px rgba(90, 6, 42, 0.5); }

/* Voile du héros colloque un peu plus dense côté texte. */
.amg-hero--colloque:has(.amg-hero__media) .amg-hero__voile {
	background: linear-gradient(90deg, rgba(150, 10, 71, 0.94) 0%, rgba(163, 11, 77, 0.8) 42%, rgba(184, 13, 87, 0.5) 78%, rgba(184, 13, 87, 0.42) 100%);
}

/* ==========================================================================
   EN-TÊTE — ALIGNEMENT ET TRAME
   Le logo, la navigation et les boutons doivent partager la même ligne
   médiane. La navigation portait un soulignement de 2 px et un padding
   asymétrique qui décalaient son centre optique.
   ========================================================================== */
.amg-entete .wp-block-site-logo,
.amg-entete .wp-block-site-logo a { display: flex; align-items: center; }
.amg-entete .wp-block-site-logo img { height: 48px; display: block; }

.amg-nav .wp-block-navigation__container { align-items: center; }
.amg-nav .wp-block-navigation-item { display: flex; align-items: center; }
.amg-nav .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	border-bottom: 0;
	position: relative;
	line-height: 1.2;
}
@media (min-width: 1100px) {
	/* Le soulignement est un pseudo-élément : il ne pèse plus sur la hauteur.
	   Réservé au menu horizontal : en tiroir, les liens ont besoin de leur
	   hauteur de touche, que cette remise à zéro leur retirait. */
	.amg-nav .wp-block-navigation-item__content { padding-block: 0; }
}
.amg-nav .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	border-radius: 2px;
	background: var(--amg-cyan);
	opacity: 0;
	transition: opacity 0.18s ease;
}
@media (min-width: 1100px) {
	/* Sous la ligne de base, comme dans la maquette. Réservé au menu horizontal :
	   en tiroir, ce décalage plaçait le trait sous le séparateur de l'entrée. */
	.amg-nav .wp-block-navigation-item__content::after { bottom: -0.55em; }
}
.amg-nav :is(.current-menu-item, .current-menu-ancestor, .current_page_item) > .wp-block-navigation-item__content::after { opacity: 1; }
.amg-entete__panneau { align-items: center; }

/* ==========================================================================
   HÉROS — MÊME TRAME QUE LE RESTE DU SITE
   ========================================================================== */
.amg-hero {
	/* Le bandeau démarre au ras de l'en-tête : aucune gouttière résiduelle. */
	margin-block: 0 !important;
	display: flex;
	align-items: center;
}
.amg-hero__contenu {
	width: 100%;
	max-width: var(--amg-largeur-site);
	margin-inline: auto;
	padding-inline: var(--amg-marge);
}
/* Le média produit par le serveur porte l'image en enfant direct. */
.amg-hero__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
	max-width: none;
}
.amg-hero__media { z-index: -2; }

/* ==========================================================================
   PIED DE PAGE — PAS DE LISERÉ BLANC AVANT
   ========================================================================== */
.wp-site-blocks > :where(footer, .amg-pied),
.amg-pied { margin-block-start: 0 !important; }
.wp-site-blocks > * + * { margin-block-start: 0; }
main.wp-block-group > :last-child { margin-block-end: 0; }

/* ==========================================================================
   BLOCS LARGES DANS UNE SECTION CONTRAINTE
   Le formulaire de contact, les grilles et les fiches associations sont écrits
   en HTML brut : ils héritaient de la largeur de lecture (820 px) et se
   retrouvaient à l'étroit. Ils reprennent la largeur « large » du site.
   ========================================================================== */
.is-layout-constrained > :where(.amg-bloc-contact, .amg-grille, .amg-infos, .amg-bandeau, .amg-flipbook, .amg-asso, [data-amg-filtrable]) {
	max-width: min(var(--wp--style--global--wide-size), 100%);
	width: 100%;
	margin-inline: auto;
}

/* Le courriel ne doit jamais déborder de sa carte. */
.amg-info p,
.amg-info a,
.amg-asso__liens a,
.amg-ressource__resume { overflow-wrap: anywhere; }

/* ==========================================================================
   RESPIRATION DES SECTIONS
   Les cartes arrivaient au ras du bord bas de leur section.
   ========================================================================== */
.wp-block-post-content > section { padding-block: clamp(3.5rem, 6vw, 5.5rem); }
.amg-entete-section { margin-bottom: clamp(2.25rem, 4vw, 3rem); }

/* Grilles : un peu plus d'air entre les cartes. */
.amg-grille { gap: clamp(1.25rem, 2vw, 1.75rem); }

/* ==========================================================================
   VIDÉO EXTERNE (YouTube) — façade sans cookie
   Rien n'est chargé depuis YouTube tant que la personne n'a pas cliqué : pas de
   cookie déposé à l'arrivée sur la page, et une page bien plus légère.
   ========================================================================== */
.amg-video-ext {
	position: relative;
	max-width: 960px;
	margin-inline: auto;
	border-radius: var(--amg-rayon-carte);
	overflow: hidden;
	background: var(--amg-bleu);
	aspect-ratio: 16 / 9;
	box-shadow: 0 14px 44px rgba(52, 83, 149, 0.16);
}
.amg-video-ext img,
.amg-video-ext iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
	border-radius: 0;
	display: block;
}
.amg-video-ext__play {
	position: absolute;
	inset: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	border: 0;
	cursor: pointer;
	background: linear-gradient(180deg, rgba(52, 83, 149, 0.28) 0%, rgba(52, 83, 149, 0.52) 100%);
	color: #fff;
	font-family: inherit;
	transition: background-color 0.2s ease;
}
.amg-video-ext__play:hover { background: rgba(52, 83, 149, 0.62); }
.amg-video-ext__play span:first-child {
	width: 76px;
	height: 76px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.94);
	color: var(--amg-bleu);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 26px rgba(52, 83, 149, 0.34);
	transition: transform 0.2s ease;
}
.amg-video-ext__play:hover span:first-child { transform: scale(1.06); }
.amg-video-ext__play .amg-video-ext__mention {
	font-size: 0.8125rem;
	max-width: 38ch;
	line-height: 1.5;
	/* Une ombre portée ne garantit pas la lisibilité sur une photo quelconque :
	   un fond opaque, si. */
	padding: 0.5rem 0.9rem;
	border-radius: 10px;
	background: rgba(20, 38, 78, 0.72);
}
.amg-video-ext.est-lancee .amg-video-ext__play { display: none; }

/* Lecteur vidéo utilisé comme colonne d'un bloc à deux colonnes. */
.amg-duo > .wp-block-shortcode,
.amg-duo > .amg-video-ext { margin: 0; }
.amg-duo .amg-video-ext { max-width: none; }

/* ==========================================================================
   ESPACE MEMBRE ET BIBLIOTHÈQUE
   ========================================================================== */

/* Fiche verrouillée : lisible, mais visiblement à part. */
.amg-ressource--premium { background: var(--amg-bleu-pale); }
.amg-ressource--premium.est-ouverte { background: #fff; }
.amg-ressource--premium:not(.est-ouverte) .amg-ressource__titre,
.amg-ressource--premium:not(.est-ouverte) .amg-ressource__titre a,
.amg-ressource--premium:not(.est-ouverte) .amg-ressource__resume { color: var(--amg-gris-texte); }
.amg-ressource__meta {
	font-size: 0.8125rem;
	color: #4A6699;
	margin: 0;
}
.amg-ressource__action {
	margin: auto 0 0;
	padding-top: 0.5rem;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 0.9rem;
}
/* Sur une ressource réservée, l'état prime et le lien reste discret : la fiche
   explique l'accès, elle n'est pas le contenu lui-même. */
.amg-lien-fleche--sobre { font-weight: 400; font-size: 0.8125rem; opacity: 0.85; }
.amg-lien-fleche--sobre:hover { opacity: 1; }
.amg-ressource__note {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--amg-bleu);
}
.amg-ressource__titre a { color: inherit; }
.amg-ressource__titre a:hover { color: var(--amg-cyan-texte); text-decoration: none; }

.amg-filtre--theme { border-style: dashed; }
.amg-filtre--premium { border-color: rgba(0, 104, 143, 0.4); }
.amg-bibliotheque { --amg-bib-gap: 1.5rem; }
.amg-bibliotheque .amg-filtres { margin-bottom: 2.25rem; }

/* Encart d'accès réservé sur une fiche ressource. */
.amg-verrou {
	background: var(--amg-bleu-pale);
	border: 1px solid rgba(52, 83, 149, 0.12);
	border-radius: var(--amg-rayon-carte);
	padding: clamp(2rem, 4vw, 3rem);
	text-align: center;
	max-width: 44rem;
	margin-inline: auto;
}
.amg-verrou__icone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 999px;
	background: var(--amg-bleu);
	color: #fff;
	margin-bottom: 1.25rem;
}
.amg-verrou h2 { margin: 0 0 0.75rem; }
.amg-verrou p { margin: 0 auto 1rem; max-width: 46ch; }
.amg-verrou__date { font-weight: 700; color: var(--amg-cyan-texte); }
.amg-verrou__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.875rem;
	justify-content: center;
	margin-top: 1.75rem;
}

/* Bandeau de statut dans l'espace membre. */
.amg-statut-membre {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 1.25rem;
	background: var(--amg-bleu-clair);
	border-radius: var(--amg-rayon-carte);
	padding: 1.25rem 1.75rem;
	margin-bottom: 2rem;
}
.amg-statut-membre p { margin: 0; }
.amg-statut-membre__niveau {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--amg-bleu);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	margin-left: 0.5rem;
}
/* Le retrait passait par l'opacité, ce qui ramenait cette ligne sous le seuil
   de lisibilité sur le bleu clair du bandeau. */
.amg-statut-membre__fin { font-size: 0.875rem; color: var(--amg-cyan-texte); }

/* Formulaires de Simple Membership : on les habille comme les nôtres. */
.amg-formulaire--compte .swpm-login-form-inner,
.amg-formulaire--compte .swpm-profile-form,
.amg-formulaire--compte .swpm-registration-form { display: flex; flex-direction: column; gap: 1.25rem; }
.amg-formulaire--compte .swpm-login-form-row,
.amg-formulaire--compte .swpm-profile-form-row,
.amg-formulaire--compte .swpm-registration-form-row { display: block; }
.amg-formulaire--compte label,
.amg-formulaire--compte .swpm-label { display: block; font-size: 0.8125rem; font-weight: 700; margin-bottom: 8px; color: var(--amg-bleu); }
.amg-formulaire--compte input[type="text"],
.amg-formulaire--compte input[type="email"],
.amg-formulaire--compte input[type="password"],
.amg-formulaire--compte select,
.amg-formulaire--compte textarea {
	width: 100%;
	border: 1.5px solid var(--amg-trait-champ);
	border-radius: var(--amg-rayon-champ);
	padding: 14px 18px;
	font-family: inherit;
	font-size: 0.9375rem;
	color: var(--amg-bleu);
	background: var(--amg-bleu-pale);
}
.amg-formulaire--compte :where(input, select, textarea):focus {
	border-color: var(--amg-cyan-texte);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(0, 104, 143, 0.16);
}
/* Le halo suffit à la souris ; au clavier, l'anneau global reste indispensable. */
.amg-formulaire--compte :where(input, select, textarea):focus:not(:focus-visible) {
	outline: none;
}
.amg-formulaire--compte input[type="submit"],
.amg-formulaire--compte button[type="submit"],
.amg-formulaire--compte .swpm-submit-btn-default-style {
	width: auto;
	min-width: 13rem;
	padding: 15px 34px;
	background: var(--amg-bleu);
	color: #fff;
	border: 0;
	border-radius: 999px;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 700;
	cursor: pointer;
}
.amg-formulaire--compte input[type="submit"]:hover,
.amg-formulaire--compte button[type="submit"]:hover,
.amg-formulaire--compte .swpm-submit-btn-default-style:hover { background: var(--amg-cyan-texte); }
.amg-formulaire--compte input[type="checkbox"] { width: auto; margin-right: 0.5rem; }
/* Deux blocs distincts, enfants d'un conteneur en colonne : impossible de les
   mettre côte à côte sans emballage. On les rapproche l'un de l'autre pour
   qu'ils se lisent comme une paire, et on les détache du bouton. */
.amg-formulaire--compte .swpm-forgot-pass-link { margin-top: 0.5rem; }
.amg-formulaire--compte .swpm-join-us-link { margin-top: -0.9rem; }
.amg-formulaire--compte .swpm-login-form-pw-reset-link,
.amg-formulaire--compte .swpm-login-form-register-link {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--amg-cyan-texte);
}
.amg-formulaire--compte p { margin: 0; }
/* Messages du plugin (inscription fermée, erreurs…) : plusieurs <p> à la suite,
   que la remise à zéro ci-dessus collerait les uns aux autres. */
.amg-formulaire--compte p + p { margin-top: 0.9em; }

/* Recherche dans le fonds documentaire. */
.amg-recherche--archives { max-width: 520px; }
.amg-recherche__resultat {
	text-align: center;
	font-size: 0.9375rem;
	margin: -0.75rem 0 1.5rem;
	display: flex;
	gap: 1rem;
	justify-content: center;
	align-items: baseline;
	flex-wrap: wrap;
}

/* Longueur de ligne : au-delà d'une soixantaine de signes, l'œil perd la ligne
   suivante. On borne les blocs de texte qui s'étalaient sur toute la largeur. */
.amg-asso > div > p,
.amg-bandeau__texte p { max-width: 62ch; }

/* Simple Membership : la case « Se souvenir de moi » s'affichait au-dessus de
   son libellé, et les libellés ne se rattachaient pas visuellement aux champs. */
.amg-formulaire--compte .swpm-remember-checkbox,
.amg-formulaire--compte .swpm-registration-form-row:has(> input[type="checkbox"]) {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}
.amg-formulaire--compte .swpm-rememberme-label,
.amg-formulaire--compte .swpm-remember-checkbox label {
	margin: 0;
	font-weight: 400;
	font-size: 0.875rem;
	cursor: pointer;
}
.amg-formulaire--compte input[type="checkbox"] {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 1.5px solid var(--amg-trait-champ);
	border-radius: 6px;
	background: #fff;
	display: grid;
	place-content: center;
	cursor: pointer;
	appearance: none;
}
.amg-formulaire--compte input[type="checkbox"]::before {
	content: "";
	width: 11px;
	height: 11px;
	transform: scale(0);
	transition: transform 0.12s ease;
	background: #fff;
	clip-path: polygon(14% 45%, 0 60%, 40% 100%, 100% 22%, 85% 8%, 38% 71%);
}
.amg-formulaire--compte input[type="checkbox"]:checked {
	background: var(--amg-cyan-texte);
	border-color: var(--amg-cyan-texte);
}
.amg-formulaire--compte input[type="checkbox"]:checked::before { transform: scale(1); }

/* Liens de bas de formulaire, alignés sur une ligne. */
.amg-formulaire--compte .swpm-login-form-below-inner-div {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin-top: 0.5rem;
	font-size: 0.875rem;
}
.amg-formulaire--compte .swpm-login-form-below-inner-div p { margin: 0; }

.amg-formulaire--compte .swpm-login-submit,
.amg-formulaire--compte .swpm-before-login-submit-section { margin-top: 0.5rem; }

/* ==========================================================================
   CORRECTIF — FORMULAIRE DE CONNEXION
   Dans le markup de Simple Membership, le <label> est frère de la case à
   cocher, pas son enfant : c'est le conteneur .swpm-remember-me qui doit
   porter la mise en ligne.
   ========================================================================== */
.amg-formulaire--compte .swpm-remember-me {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0;
}
.amg-formulaire--compte .swpm-remember-checkbox { display: flex; align-items: center; }
.amg-formulaire--compte .swpm-rememberme-label {
	margin: 0;
	font-weight: 400;
	font-size: 0.875rem;
	cursor: pointer;
	color: var(--amg-bleu);
}
.amg-formulaire--compte .swpm-rember-label { font-weight: 400; }

/* Le conteneur du bouton est une simple boîte : il ne doit rien dessiner. */
.amg-formulaire--compte .swpm-login-submit {
	display: flex;
	background: none;
	padding: 0;
}

/* Encarts d'information du plugin d'adhésion : aux couleurs du site plutôt
   qu'au jaune par défaut, qui jure avec la palette. */
.amg-formulaire--compte .swpm-yellow-box,
.amg-formulaire--compte .swpm-green-box,
.amg-formulaire--compte .swpm-red-box {
	padding: 1rem 1.25rem;
	border: 0;
	border-left: 4px solid var(--amg-cyan-texte);
	border-radius: 6px;
	background: var(--amg-bleu-pale);
	color: var(--amg-bleu);
	font-size: 0.9375rem;
}
.amg-formulaire--compte .swpm-red-box { border-left-color: var(--amg-magenta-texte); }

/* ==========================================================================
   FICHE DE PROFIL — deux colonnes
   Le plugin empile une quinzaine de champs sur une seule colonne, ce qui rend
   la page interminable. Les champs courts se placent donc par paires.
   ========================================================================== */
.amg-formulaire--compte .swpm-edit-profile-form-inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.1rem 1.5rem;
	align-items: start;
}
@media (min-width: 700px) {
	.amg-formulaire--compte .swpm-edit-profile-form-inner { grid-template-columns: 1fr 1fr; }
	/* Champs longs ou structurants : toute la largeur. */
	.amg-formulaire--compte .swpm-username-row,
	.amg-formulaire--compte .swpm-email-row,
	.amg-formulaire--compte .swpm-street-row,
	.amg-formulaire--compte .swpm-company-row,
	.amg-formulaire--compte .swpm-membership-level-row,
	.amg-formulaire--compte .swpm-submit-section,
	.amg-formulaire--compte .swpm-profile-account-delete-section { grid-column: 1 / -1; }
}
.amg-formulaire--compte .swpm-form-row { min-width: 0; }
.amg-formulaire--compte .swpm-form-desc {
	margin-top: 0.35rem;
	font-size: 0.75rem;
	color: var(--amg-cyan-texte);
}
/* Le formulaire de profil respire sur toute la largeur de lecture. */
.is-layout-constrained > .amg-formulaire--compte,
.amg-formulaire--compte .swpm-edit-profile-form { width: 100%; }

/* ==========================================================================
   FICHE RESSOURCE — caractéristiques
   ========================================================================== */
.amg-fiche-meta {
	display: grid;
	gap: 0;
	margin: 0 0 2rem;
	padding: 1.25rem 1.5rem;
	border-radius: var(--amg-rayon-carte);
	background: var(--amg-bleu-pale);
}
.amg-fiche-meta__ligne {
	display: grid;
	grid-template-columns: 12rem 1fr;
	gap: 0.25rem 1rem;
	padding: 0.55rem 0;
	border-top: var(--amg-trait);
}
.amg-fiche-meta__ligne:first-child { border-top: 0; }
.amg-fiche-meta dt {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--amg-cyan-texte);
}
.amg-fiche-meta dd { margin: 0; color: var(--amg-bleu); }
.amg-fiche-meta a { color: var(--amg-cyan-texte); }
@media (max-width: 640px) {
	.amg-fiche-meta__ligne { grid-template-columns: 1fr; }
}

/* Lien de sortie de l'espace membre, discret dans le bandeau de statut. */
.amg-statut-membre__sortie {
	margin-left: auto;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--amg-cyan-texte);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ==========================================================================
   NAVIGATION D'UN CONTENU À L'AUTRE
   Le bloc natif empile deux liens nus en bas de page. On en fait deux cartes
   lisibles, la précédente à gauche, la suivante à droite.
   ========================================================================== */
.amg-nav-article {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-top: clamp(2.5rem, 5vw, 4rem);
	margin-bottom: clamp(2rem, 4vw, 3.5rem);
	padding-top: 2rem;
	border-top: var(--amg-trait);
}
.amg-nav-article > * { margin-block: 0; }

.amg-nav-article .wp-block-post-navigation-link {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 1.1rem 1.4rem;
	border: var(--amg-trait);
	border-radius: var(--amg-rayon-carte);
	background: var(--amg-bleu-pale);
	transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.amg-nav-article .wp-block-post-navigation-link:hover {
	border-color: var(--amg-cyan-texte);
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(52, 83, 149, 0.1);
}
/* Une seule des deux existe en début ou en fin de liste : la carte restante
   garde sa colonne, elle ne s'étale pas sur les deux. */
.amg-nav-article .post-navigation-link-next:only-child { grid-column: 2; }
.amg-nav-article .post-navigation-link-previous:only-child { grid-column: 1; }

.amg-nav-article .post-navigation-link__label {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--amg-cyan-texte);
}
.amg-nav-article .wp-block-post-navigation-link a {
	font-family: var(--wp--preset--font-family--titre, inherit);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--amg-bleu);
	text-decoration: none;
}
/* La carte entière est cliquable, sans imbriquer de lien dans un lien. */
.amg-nav-article .wp-block-post-navigation-link a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.amg-nav-article .post-navigation-link-next {
	text-align: right;
	align-items: flex-end;
}
/* Chevrons : décoratifs, donc masqués aux lecteurs d'écran par le CSS seul. */
.amg-nav-article .post-navigation-link__label::before,
.amg-nav-article .post-navigation-link-next .post-navigation-link__label::after {
	display: inline-block;
	color: var(--amg-cyan-texte);
}
.amg-nav-article .post-navigation-link-previous .post-navigation-link__label::before {
	content: "←";
	margin-right: 0.5em;
}
.amg-nav-article .post-navigation-link-next .post-navigation-link__label::after {
	content: "→";
	margin-left: 0.5em;
}

@media (max-width: 599px) {
	.amg-nav-article { grid-template-columns: minmax(0, 1fr); }
	.amg-nav-article .post-navigation-link-next { text-align: left; align-items: flex-start; }
	.amg-nav-article .post-navigation-link-next:only-child { grid-column: 1; }
}

/* Complément de libellé réservé aux lecteurs d'écran : il désambiguïse un lien
   dont le texte visible se répète (« Consulter », « En savoir plus »). */
.amg-hors-ecran {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ==========================================================================
   BOUTON D'OUVERTURE DU SOUS-MENU
   Le bloc de navigation le dessine à la taille de son chevron, soit 8 × 8 px :
   trop petit pour être visé au doigt ou à la souris. On lui donne une zone
   de touche décente sans déplacer le chevron lui-même.
   ========================================================================== */
@media (min-width: 1100px) {
	.amg-nav .wp-block-navigation-submenu__toggle {
		position: relative;
		/* 24 × 24 px de zone utile, le minimum recommandé pour une cible. */
		padding: 12px;
		margin: -12px -6px;
		background: none;
		border: 0;
		color: inherit;
		cursor: pointer;
	}
	.amg-nav .wp-block-navigation-submenu__toggle .wp-block-navigation__submenu-icon {
		display: block;
	}
}

/* Archive d'un type ou d'une thématique de ressource. */
.amg-archive-ressource__compte {
	margin: 0 0 2rem;
	color: var(--amg-gris-texte);
}
.amg-archive-ressource__retour { margin-top: 2.5rem; }
