/* ══ MDLM EVENTS — ÉVÉNEMENTS PASSÉS, SHORTCODE [mdlm_past_events] ══════════
 *
 * Grille paginée des événements passés, rendue par
 * MDLM_Events_Past_Events_Shortcode dans une page WordPress / Elementor
 * (widget Shortcode). Chargée seulement là où le shortcode sert.
 *
 * Même langage que les cartes de la vue Photo (mdlm-events-photo.css) : carte
 * blanche bordée, rayon 18, image 16:9 jusqu'aux bords, pavé date bleu très
 * clair, titre Nunito 800 bleu marine, date / heure bleu-gris. Jetons de
 * mdlm-events-base.css (posés sur .mdlm-past-events) : aucune couleur, police ni
 * rayon nouveau.
 *
 * ── SCOPE ─────────────────────────────────────────────────────────────────
 *
 *     .mdlm-past-events …
 *
 * Éléments qualifiés par leur balise (a, h2–h4, ul, li, p, img) : poids 0,2,1,
 * au-dessus du kit Elementor (.elementor-kit-N a, h2 : 0,1,1) et du thème Hello
 * (a, ul, img : 0,0,1 ; .page-content a : 0,1,1), sans !important.
 *
 * ── GRILLE — stable, calée sur le CONTENEUR ─────────────────────────────────
 * Aucune largeur de page supposée : une colonne ne descend jamais sous
 * 17,5 rem, et le nombre de colonnes est plafonné par la fenêtre.
 *   fenêtre > 1024 px        3 colonnes au plus (2 ou 1 si le conteneur est étroit)
 *   fenêtre 768 – 1024 px    2 colonnes au plus
 *   fenêtre ≤ 767 px         1 colonne
 * Pas de requête de conteneur : container-type annulerait la largeur
 * intrinsèque du widget dans un conteneur Elementor en ligne.
 *
 * ── HIÉRARCHIE D'UNE CARTE (0.1.35) ────────────────────────────────────────
 *   pavé date          information : bleu très clair, non cliquable ;
 *   catégories         les plus discrètes : pastilles neutres gris-bleu, petit texte ;
 *   Voir le retour     SEUL bouton plein : bleu soutenu, texte blanc, survol bleu marine ;
 *   Retour disponible  pastille blanche sur l'image, doublon visuel du bouton.
 *
 * ── SOMMAIRE ──────────────────────────────────────────────────────────────
 *  1. Bloc et grille
 *  1 bis. Filtres et compteur
 *  1 ter. Interface enrichie (script) : listes, suggestions, chargement
 *  2. Carte
 *  3. Image
 *  4. Contenu et pavé date
 *  5. Titre, date / heure, lieu, catégories
 *  6. Retour disponible
 *  7. Pagination
 *  8. État vide
 *  9. Texte réservé aux lecteurs d'écran, pictogrammes
 * 10. Mouvement réduit
 * 11. Paliers
 */


/* ══ 1. BLOC ET GRILLE ═════════════════════════════════════════════════════ */

.mdlm-past-events {
	--mdlm-past-gap: 1.625rem;
	--mdlm-past-min: 17.5rem;
	--mdlm-past-cols: 3;

	/* 15 px de marge extérieure à gauche et à droite (0.1.35) : largeur automatique,
	   jamais 100 % + marges, qui déborderait. */
	box-sizing: border-box;
	width: auto;
	max-width: none;
	margin: 0 15px;
	padding: 0;
	color: var(--mdlm-ev-ink);
	font-family: var(--mdlm-ev-font-text);
	scroll-margin-top: var(--mdlm-ev-page-offset);
}

.mdlm-past-events *,
.mdlm-past-events *::before,
.mdlm-past-events *::after {
	box-sizing: border-box;
}

.mdlm-past-events ul.mdlm-past-events__grid {
	display: grid;
	grid-template-columns: repeat(
		auto-fill,
		minmax(
			min(100%, max(var(--mdlm-past-min), calc((100% - (var(--mdlm-past-cols) - 1) * var(--mdlm-past-gap)) / var(--mdlm-past-cols)))),
			1fr
		)
	);
	gap: var(--mdlm-past-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.mdlm-past-events li.mdlm-past-events__item {
	display: flex;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mdlm-past-events li.mdlm-past-events__item::before,
.mdlm-past-events li.mdlm-past-events__item::marker {
	content: none;
}


/* ══ 1 bis. FILTRES ET COMPTEUR ════════════════════════════════════════════
 * Formulaire GET : recherche sur toute la largeur, puis année, catégorie et
 * actions. Fond bleu ultra pâle, bordure douce, rayon 18 — le panneau des cartes
 * d'informations de la fiche. Libellés visibles (jamais le seul placeholder).
 *
 *   Rechercher
 *   [ Rechercher un événement…                                     ]
 *   Année                 Catégorie
 *   [ Toutes les années ] [ Toutes les catégories ] [Filtrer] [Réinitialiser]
 */

.mdlm-past-events form.mdlm-past-events__filters {
	display: grid;
	grid-template-areas:
		"search search search"
		"year category actions";
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
	align-items: end;
	gap: .875rem 1rem;
	margin: 0 0 1.25rem;
	padding: 1.125rem 1.25rem 1.25rem;
	border: 1px solid var(--mdlm-ev-panel-line);
	border-radius: var(--mdlm-ev-radius-lg);
	background: var(--mdlm-ev-panel);
}

.mdlm-past-events .mdlm-past-events__field {
	display: flex;
	flex-direction: column;
	gap: .375rem;
	min-width: 0;
}

.mdlm-past-events .mdlm-past-events__field--search {
	grid-area: search;
}

.mdlm-past-events .mdlm-past-events__field--year {
	grid-area: year;
}

.mdlm-past-events .mdlm-past-events__field--category {
	grid-area: category;
}

.mdlm-past-events label.mdlm-past-events__label {
	margin: 0;
	padding: 0;
	color: var(--mdlm-ev-navy);
	font-family: var(--mdlm-ev-font-text);
	font-size: .8125rem;
	font-weight: 700;
	line-height: 1.3;
}

.mdlm-past-events .mdlm-past-events__control {
	position: relative;
	display: block;
}

.mdlm-past-events .mdlm-past-events__control svg.mdlm-past-events__icon--search {
	position: absolute;
	top: 50%;
	left: .875rem;
	width: 1.125rem;
	height: 1.125rem;
	color: var(--mdlm-ev-blue);
	transform: translateY(-50%);
	pointer-events: none;
}

/* Champs : le thème Hello pose bordure grise, rayon 3 et, au clavier, contour
   noir + ombre blanche (input[type=search], select : 0,1,1) — remplacés ici. */
.mdlm-past-events :is(input, select).mdlm-past-events__input {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 2.75rem;
	margin: 0;
	padding: 0 .875rem;
	border: 1px solid var(--mdlm-ev-line-strong);
	border-radius: var(--mdlm-ev-radius-md);
	background-color: var(--mdlm-ev-white);
	box-shadow: none;
	color: var(--mdlm-ev-ink);
	font-family: var(--mdlm-ev-font-text);
	font-size: .9375rem;
	font-weight: 400;
	line-height: 1.3;
	outline: none;
	transition: border-color var(--mdlm-ev-transition), box-shadow var(--mdlm-ev-transition);
}

.mdlm-past-events input.mdlm-past-events__input--search {
	padding-left: 2.625rem;
	-webkit-appearance: none;
	appearance: none;
}

.mdlm-past-events input.mdlm-past-events__input--search::placeholder {
	color: #7F92AA;
	opacity: 1;
}

.mdlm-past-events select.mdlm-past-events__input--select {
	padding-right: 2.5rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%230A63B0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-position: right .875rem center;
	background-repeat: no-repeat;
	background-size: .75rem .5rem;
	cursor: pointer;
	text-overflow: ellipsis;
	-webkit-appearance: none;
	appearance: none;
}

.mdlm-past-events :is(input, select).mdlm-past-events__input:hover {
	border-color: #93BDE0;
}

.mdlm-past-events :is(input, select).mdlm-past-events__input:is(:focus, :focus-visible) {
	border-color: var(--mdlm-ev-blue);
	box-shadow: 0 0 0 3px rgba(23, 143, 230, .18);
	outline: none;
	outline-offset: 0;
}

.mdlm-past-events .mdlm-past-events__actions {
	display: flex;
	grid-area: actions;
	flex-wrap: wrap;
	align-items: center;
	gap: .625rem;
}

/* « Filtrer » : le thème Hello pose bordure et survol roses sur [type=submit]
   (0,2,0) — remplacés. « Réinitialiser » partage la géométrie. */
.mdlm-past-events button.mdlm-past-events__submit,
.mdlm-past-events a.mdlm-past-events__reset,
.mdlm-past-events a.mdlm-past-events__reset:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 2.75rem;
	margin: 0;
	padding: 0 1.25rem;
	border: 1px solid var(--mdlm-ev-blue-strong);
	border-radius: var(--mdlm-ev-radius-sm);
	background: var(--mdlm-ev-blue-strong);
	box-shadow: none;
	color: var(--mdlm-ev-white);
	font-family: var(--mdlm-ev-font-text);
	font-size: .9375rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color var(--mdlm-ev-transition), border-color var(--mdlm-ev-transition), color var(--mdlm-ev-transition);
}

.mdlm-past-events button.mdlm-past-events__submit:is(:hover, :focus, :active) {
	border-color: var(--mdlm-ev-navy);
	background: var(--mdlm-ev-navy);
	color: var(--mdlm-ev-white);
	outline: none;
	box-shadow: none;
}

/* « Réinitialiser » : action secondaire, blanche bordée. */
.mdlm-past-events a.mdlm-past-events__reset,
.mdlm-past-events a.mdlm-past-events__reset:visited {
	border-color: var(--mdlm-ev-line-strong);
	background: var(--mdlm-ev-white);
	color: var(--mdlm-ev-blue-ink);
}

.mdlm-past-events a.mdlm-past-events__reset:is(:hover, :focus, :active) {
	border-color: var(--mdlm-ev-blue);
	background: var(--mdlm-ev-tint);
	color: var(--mdlm-ev-navy);
	text-decoration: none;
	outline: none;
	box-shadow: none;
}

.mdlm-past-events a.mdlm-past-events__reset[hidden] {
	display: none;
}

.mdlm-past-events :is(button.mdlm-past-events__submit, a.mdlm-past-events__reset):focus-visible {
	outline: 2px solid var(--mdlm-ev-blue);
	outline-offset: 2px;
	box-shadow: none;
}

.mdlm-past-events p.mdlm-past-events__count--sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.mdlm-past-events p.mdlm-past-events__count {
	margin: 0 0 .875rem;
	padding: 0;
	color: var(--mdlm-ev-muted);
	font-family: var(--mdlm-ev-font-text);
	font-size: .875rem;
	font-weight: 600;
	line-height: 1.4;
}


/* ══ 1 ter. INTERFACE ENRICHIE (SCRIPT) ════════════════════════════════════
 * Règles actives seulement lorsque mdlm-events-past.js a pris la main
 * (.is-enhanced sur le bloc). Sans script : rien de ce qui suit ne s'applique.
 *
 * - « Filtrer » masqué (filtrage automatique) ; zone d'actions retirée de la
 *   grille tant que « Réinitialiser » est caché (.has-reset absent) : aucun espace
 *   réservé ;
 * - listes Année / Catégorie : le <select> natif est caché (hidden) et remplacé
 *   par un contrôle combobox au MÊME gabarit que le champ de recherche (44 px,
 *   bordure 1 px, rayon 12, même focus) et une liste déroulante MDLM ;
 * - suggestions de la recherche : même liste déroulante ;
 * - chargement : résultats estompés, fine barre animée, aucun saut de mise en page. */

.mdlm-past-events.is-enhanced form.mdlm-past-events__filters {
	position: relative;
	z-index: 5;
}

.mdlm-past-events.is-enhanced button.mdlm-past-events__submit {
	display: none;
}

.mdlm-past-events.is-enhanced form.mdlm-past-events__filters:not(.has-reset) {
	grid-template-areas:
		"search search"
		"year category";
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.mdlm-past-events.is-enhanced form.mdlm-past-events__filters:not(.has-reset) .mdlm-past-events__actions {
	display: none;
}

.mdlm-past-events select.mdlm-past-events__input[hidden] {
	display: none;
}

.mdlm-past-events .mdlm-past-events__combo-wrap {
	position: relative;
}

/* Contrôle : gabarit identique au champ de recherche. */
.mdlm-past-events div.mdlm-past-events__combo {
	position: relative;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	height: 2.75rem;
	padding: 0 2.5rem 0 .875rem;
	border: 1px solid var(--mdlm-ev-line-strong);
	border-radius: var(--mdlm-ev-radius-md);
	background: var(--mdlm-ev-white);
	color: var(--mdlm-ev-ink);
	font-family: var(--mdlm-ev-font-text);
	font-size: .9375rem;
	font-weight: 400;
	line-height: 1.3;
	cursor: pointer;
	outline: none;
	user-select: none;
	transition: border-color var(--mdlm-ev-transition), box-shadow var(--mdlm-ev-transition);
}

.mdlm-past-events .mdlm-past-events__combo-value {
	overflow: hidden;
	min-width: 0;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mdlm-past-events .mdlm-past-events__combo svg.mdlm-past-events__icon--chevron {
	position: absolute;
	top: 50%;
	right: .875rem;
	width: 1rem;
	height: 1rem;
	color: var(--mdlm-ev-blue-ink);
	transform: translateY(-50%);
	transition: transform var(--mdlm-ev-transition);
	pointer-events: none;
}

.mdlm-past-events .mdlm-past-events__combo-wrap.is-open svg.mdlm-past-events__icon--chevron {
	transform: translateY(-50%) rotate(180deg);
}

.mdlm-past-events div.mdlm-past-events__combo:hover {
	border-color: #93BDE0;
}

.mdlm-past-events div.mdlm-past-events__combo:is(:focus, :focus-visible),
.mdlm-past-events .mdlm-past-events__combo-wrap.is-open div.mdlm-past-events__combo {
	border-color: var(--mdlm-ev-blue);
	box-shadow: 0 0 0 3px rgba(23, 143, 230, .18);
	outline: none;
}

/* Liste déroulante (listes et suggestions). */
.mdlm-past-events ul.mdlm-past-events__listbox {
	position: absolute;
	z-index: 60;
	top: calc(100% + 6px);
	right: 0;
	left: 0;
	box-sizing: border-box;
	max-height: 17.5rem;
	margin: 0;
	padding: .375rem;
	overflow-y: auto;
	border: 1px solid var(--mdlm-ev-line-strong);
	border-radius: var(--mdlm-ev-radius-md);
	background: var(--mdlm-ev-white);
	box-shadow: 0 10px 26px rgba(11, 61, 130, .12);
	list-style: none;
	overscroll-behavior: contain;
}

.mdlm-past-events ul.mdlm-past-events__listbox[hidden] {
	display: none;
}

.mdlm-past-events li.mdlm-past-events__option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	min-height: 2.5rem;
	margin: 0;
	padding: .5rem .75rem;
	border-radius: 8px;
	color: var(--mdlm-ev-navy);
	font-family: var(--mdlm-ev-font-text);
	font-size: .9375rem;
	font-weight: 500;
	line-height: 1.3;
	list-style: none;
	cursor: pointer;
}

.mdlm-past-events li.mdlm-past-events__option::before,
.mdlm-past-events li.mdlm-past-events__option::marker {
	content: none;
}

.mdlm-past-events li.mdlm-past-events__option:hover,
.mdlm-past-events li.mdlm-past-events__option.is-active {
	background: var(--mdlm-ev-tint);
}

/* Option active au clavier : liseré intérieur, en plus du fond. */
.mdlm-past-events li.mdlm-past-events__option.is-active {
	box-shadow: inset 0 0 0 1px var(--mdlm-ev-line-strong);
}

.mdlm-past-events li.mdlm-past-events__option[aria-selected="true"]:not(.mdlm-past-events__suggestion) {
	color: var(--mdlm-ev-blue-ink);
	font-weight: 700;
}

.mdlm-past-events li.mdlm-past-events__option svg.mdlm-past-events__icon--check {
	flex: none;
	width: 1rem;
	height: 1rem;
	color: var(--mdlm-ev-blue-strong);
	visibility: hidden;
}

.mdlm-past-events li.mdlm-past-events__option[aria-selected="true"] svg.mdlm-past-events__icon--check {
	visibility: visible;
}

.mdlm-past-events li.mdlm-past-events__suggestion {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mdlm-past-events li.mdlm-past-events__suggestion mark {
	padding: 0;
	background: transparent;
	color: var(--mdlm-ev-blue-ink);
	font-weight: 800;
}

/* Chargement : résultats estompés, barre fine en tête, rien ne saute. */
.mdlm-past-events .mdlm-past-events__results {
	position: relative;
	transition: opacity .15s ease;
}

.mdlm-past-events .mdlm-past-events__results:focus {
	outline: none;
}

.mdlm-past-events.is-loading .mdlm-past-events__results {
	opacity: .55;
	pointer-events: none;
}

.mdlm-past-events.is-loading .mdlm-past-events__results::before {
	content: "";
	position: absolute;
	z-index: 2;
	top: -.5rem;
	left: 0;
	width: 100%;
	height: 3px;
	border-radius: var(--mdlm-ev-radius-pill);
	background: linear-gradient(90deg, transparent 0%, var(--mdlm-ev-blue) 50%, transparent 100%);
	background-size: 50% 100%;
	background-repeat: no-repeat;
	animation: mdlm-past-events-loading 1s linear infinite;
}

@keyframes mdlm-past-events-loading {
	from { background-position: -100% 0; }
	to { background-position: 200% 0; }
}


/* ══ 2. CARTE ══════════════════════════════════════════════════════════════ */

.mdlm-past-events article.mdlm-past-events__card {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--mdlm-ev-line);
	border-radius: var(--mdlm-ev-radius-lg);
	background: var(--mdlm-ev-white);
	box-shadow: none;
	transition: border-color var(--mdlm-ev-transition), box-shadow var(--mdlm-ev-transition), transform var(--mdlm-ev-transition);
}

.mdlm-past-events article.mdlm-past-events__card:is(:hover, :focus-within) {
	border-color: var(--mdlm-ev-line-strong);
	box-shadow: var(--mdlm-ev-shadow-hover);
	transform: translateY(-2px);
}


/* ══ 3. IMAGE ══════════════════════════════════════════════════════════════
 * Cadre 16:9 sur toutes les cartes, image ou non : les rangées restent
 * alignées. Sans image : cadre bleu ultra pâle et petit calendrier discret. */

.mdlm-past-events .mdlm-past-events__media {
	position: relative;
	flex: none;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 0;
	overflow: hidden;
	background: var(--mdlm-ev-map-placeholder);
}

.mdlm-past-events img.mdlm-past-events__image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
	object-position: center;
	transition: transform .35s ease;
}

.mdlm-past-events article.mdlm-past-events__card:hover img.mdlm-past-events__image {
	transform: scale(1.02);
}

.mdlm-past-events .mdlm-past-events__card--no-image .mdlm-past-events__media {
	background: var(--mdlm-ev-panel);
}

.mdlm-past-events .mdlm-past-events__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--mdlm-ev-line-strong);
}

.mdlm-past-events .mdlm-past-events__placeholder .mdlm-past-events__icon {
	width: 3rem;
	height: 3rem;
}

/* « Retour disponible » : pastille blanche en haut à gauche de l'image, ombre
   douce ; ne couvre qu'un coin. Doublon visuel du bouton : aria-hidden. */
.mdlm-past-events .mdlm-past-events__recap-badge {
	position: absolute;
	z-index: 1;
	top: .75rem;
	left: .75rem;
	display: inline-flex;
	align-items: center;
	gap: .375rem;
	max-width: calc(100% - 1.5rem);
	padding: .3125rem .625rem .3125rem .5rem;
	border-radius: var(--mdlm-ev-radius-pill);
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 2px 8px rgba(11, 61, 130, .18);
	color: var(--mdlm-ev-navy);
	font-family: var(--mdlm-ev-font-text);
	font-size: .75rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.mdlm-past-events .mdlm-past-events__recap-badge svg.mdlm-past-events__icon {
	flex: none;
	width: .875rem;
	height: .875rem;
	color: var(--mdlm-ev-blue-strong);
}


/* ══ 4. CONTENU ET PAVÉ DATE ═══════════════════════════════════════════════
 *   ╭──────╮  Fête du Jeu 2026
 *   │ SEPT │  12 septembre @ 14h00 - 20h00
 *   │  12  │  📍 Parc de la Ludothèque · Villecresnes
 *   │ 2026 │  (Famille & enfants) (Sorties & loisirs)
 *   ╰──────╯  [📷 Voir le retour]
 */

.mdlm-past-events .mdlm-past-events__body {
	display: flex;
	flex: 1 1 auto;
	align-items: stretch;
	gap: .875rem;
	min-width: 0;
	padding: 1.125rem 1.25rem 1.25rem;
}

.mdlm-past-events p.mdlm-past-events__date-tag {
	flex: none;
	align-self: flex-start;
	min-width: 3.5rem;
	margin: 0;
	padding: 0;
}

.mdlm-past-events .mdlm-past-events__date-tag time {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: .5rem .5rem .5rem;
	border: 1px solid var(--mdlm-ev-line);
	border-radius: var(--mdlm-ev-radius-md);
	background: var(--mdlm-ev-tint);
	text-align: center;
}

.mdlm-past-events .mdlm-past-events__date-month {
	color: var(--mdlm-ev-blue-ink);
	font-family: var(--mdlm-ev-font-text);
	font-size: .6875rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.mdlm-past-events .mdlm-past-events__date-day {
	margin-top: .1875rem;
	color: var(--mdlm-ev-navy);
	font-family: var(--mdlm-ev-font-title);
	font-size: 1.625rem;
	font-weight: 800;
	line-height: 1;
}

.mdlm-past-events .mdlm-past-events__date-year {
	margin-top: .25rem;
	color: var(--mdlm-ev-muted);
	font-family: var(--mdlm-ev-font-text);
	font-size: .6875rem;
	font-weight: 600;
	line-height: 1;
}

.mdlm-past-events .mdlm-past-events__details {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}


/* ══ 5. TITRE, DATE / HEURE, LIEU, CATÉGORIES ══════════════════════════════ */

.mdlm-past-events :is(h2, h3, h4).mdlm-past-events__title {
	margin: 0;
	padding: 0;
	color: var(--mdlm-ev-navy);
	font-family: var(--mdlm-ev-font-title);
	font-size: 1.1875rem;
	font-weight: 800;
	font-style: normal;
	line-height: 1.25;
	letter-spacing: -.005em;
	text-transform: none;
}

.mdlm-past-events a.mdlm-past-events__title-link,
.mdlm-past-events a.mdlm-past-events__title-link:visited {
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--mdlm-ev-navy);
	font: inherit;
	text-decoration: none;
	overflow-wrap: break-word;
	transition: color var(--mdlm-ev-transition);
}

.mdlm-past-events a.mdlm-past-events__title-link:is(:hover, :focus, :active) {
	color: var(--mdlm-ev-blue-ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
	outline: none;
}

.mdlm-past-events a.mdlm-past-events__title-link:focus-visible {
	border-radius: 3px;
	outline: 2px solid var(--mdlm-ev-blue);
	outline-offset: 2px;
}

.mdlm-past-events p.mdlm-past-events__schedule {
	margin: .4375rem 0 0;
	padding: 0;
	color: var(--mdlm-ev-muted);
	font-family: var(--mdlm-ev-font-text);
	font-size: .875rem;
	font-weight: 600;
	line-height: 1.4;
}

.mdlm-past-events p.mdlm-past-events__venue {
	display: flex;
	align-items: flex-start;
	gap: .375rem;
	margin: .5rem 0 0;
	padding: 0;
	color: var(--mdlm-ev-muted);
	font-family: var(--mdlm-ev-font-text);
	font-size: .8125rem;
	font-style: normal;
	line-height: 1.4;
	overflow-wrap: break-word;
}

.mdlm-past-events .mdlm-past-events__venue .mdlm-past-events__icon {
	flex: none;
	margin-top: .0625rem;
	color: var(--mdlm-ev-blue);
}

.mdlm-past-events .mdlm-past-events__venue-name {
	color: var(--mdlm-ev-navy);
	font-weight: 700;
}

.mdlm-past-events .mdlm-past-events__venue-city::before {
	content: " · ";
	content: " · " / "";
	color: var(--mdlm-ev-muted);
}

.mdlm-past-events ul.mdlm-past-events__categories {
	display: flex;
	flex-wrap: wrap;
	gap: .375rem;
	margin: .75rem 0 0;
	padding: 0;
	list-style: none;
}

/* Pastilles neutres (0.1.35) : gris-bleu, petit rayon, sans bordure — ni le bleu
   du pavé date, ni l'allure d'un bouton. */
.mdlm-past-events li.mdlm-past-events__category {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	min-height: 1.375rem;
	margin: 0;
	padding: .125rem .5rem;
	border: 0;
	border-radius: 6px;
	background: var(--mdlm-ev-slate-tint);
	color: var(--mdlm-ev-navy);
	font-family: var(--mdlm-ev-font-text);
	font-size: .71875rem;
	font-weight: 600;
	line-height: 1.25;
	list-style: none;
	overflow-wrap: anywhere;
}

.mdlm-past-events li.mdlm-past-events__category::before,
.mdlm-past-events li.mdlm-past-events__category::marker {
	content: none;
}


/* ══ 6. RETOUR DISPONIBLE ══════════════════════════════════════════════════
 * Vrai bouton d'action (0.1.35) : fond bleu soutenu, texte blanc (≈ 4,9:1),
 * pictogramme photo, survol bleu marine, anneau de focus. Ramené en bas de la
 * carte : même hauteur de rangée d'une carte à l'autre. Mène à la fiche ; aucun
 * contenu du retour ici. */

.mdlm-past-events p.mdlm-past-events__recap {
	margin: auto 0 0;
	padding: .875rem 0 0;
}

.mdlm-past-events a.mdlm-past-events__recap-link,
.mdlm-past-events a.mdlm-past-events__recap-link:visited {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	min-height: 2.5rem;
	padding: .5rem 1rem .5rem .875rem;
	border: 1px solid var(--mdlm-ev-blue-strong);
	border-radius: var(--mdlm-ev-radius-sm);
	background: var(--mdlm-ev-blue-strong);
	box-shadow: 0 2px 6px rgba(11, 61, 130, .14);
	color: var(--mdlm-ev-white);
	font-family: var(--mdlm-ev-font-text);
	font-size: .875rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color var(--mdlm-ev-transition), border-color var(--mdlm-ev-transition), color var(--mdlm-ev-transition);
}

.mdlm-past-events a.mdlm-past-events__recap-link:is(:hover, :focus, :active) {
	border-color: var(--mdlm-ev-navy);
	background: var(--mdlm-ev-navy);
	color: var(--mdlm-ev-white);
	text-decoration: none;
	outline: none;
}

.mdlm-past-events a.mdlm-past-events__recap-link:focus-visible {
	outline: 2px solid var(--mdlm-ev-blue);
	outline-offset: 2px;
}


/* ══ 7. PAGINATION ═════════════════════════════════════════════════════════
 * Langage de la navigation basse des vues TEC du site (relevé sur /evenements/,
 * mdlm-events-common.css) : filet panel-line au-dessus (24 px + 18 px), pilules
 * de 40 px blanches bordées #BBD7EF, texte #0A63B0 Nunito Sans 14 px 700,
 * chevron 7 × 12 bleu soutenu, survol bordure bleue + fond bleu très clair +
 * texte bleu marine, désactivé transparent bordé #E6F0F9 texte #A5B4C4.
 *
 *   [‹ Événements précédents]        1  2  …  5        [Événements suivants ›]
 *
 * Numéros au centre, discrets (36 px, sans bordure) ; page courante : fond bleu
 * très clair, liseré, bleu marine gras — nette mais sobre. */

.mdlm-past-events nav.mdlm-past-events__pagination {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: .5rem;
	margin: 1.5rem 0 0;
	padding: 1.125rem 0 0;
	border-top: 1px solid var(--mdlm-ev-panel-line);
}

.mdlm-past-events .mdlm-past-events__pag-side {
	display: flex;
	min-width: 0;
}

.mdlm-past-events .mdlm-past-events__pag-side--next {
	justify-content: flex-end;
}

.mdlm-past-events :is(a, span).mdlm-past-events__pag-nav {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	box-sizing: border-box;
	height: 2.5rem;
	max-width: 100%;
	margin: 0;
	padding: 0 1rem;
	border: 1px solid var(--mdlm-ev-line-strong);
	border-radius: var(--mdlm-ev-radius-pill);
	background: var(--mdlm-ev-white);
	box-shadow: none;
	color: var(--mdlm-ev-blue-ink);
	font-family: var(--mdlm-ev-font-text);
	font-size: .875rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--mdlm-ev-transition), border-color var(--mdlm-ev-transition), color var(--mdlm-ev-transition);
}

.mdlm-past-events a.mdlm-past-events__pag-nav:visited {
	color: var(--mdlm-ev-blue-ink);
}

.mdlm-past-events a.mdlm-past-events__pag-nav:is(:hover, :focus, :active) {
	border-color: var(--mdlm-ev-blue);
	background: var(--mdlm-ev-tint);
	color: var(--mdlm-ev-navy);
	text-decoration: none;
	outline: none;
}

.mdlm-past-events a.mdlm-past-events__pag-nav:focus-visible {
	outline: 2px solid var(--mdlm-ev-blue);
	outline-offset: 2px;
	box-shadow: none;
}

.mdlm-past-events span.mdlm-past-events__pag-nav--disabled {
	border-color: #E6F0F9;
	background: transparent;
	color: #A5B4C4;
	cursor: default;
}

.mdlm-past-events .mdlm-past-events__pag-nav svg.mdlm-past-events__icon {
	flex: none;
	width: 1.125rem;
	height: 1.125rem;
	margin: 0 -.25rem;
	color: var(--mdlm-ev-blue-strong);
}

.mdlm-past-events span.mdlm-past-events__pag-nav--disabled svg.mdlm-past-events__icon {
	color: #C4D2E0;
}

.mdlm-past-events ul.mdlm-past-events__pages {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: .25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mdlm-past-events ul.mdlm-past-events__pages--compact {
	display: none;
}

.mdlm-past-events ul.mdlm-past-events__pages > li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mdlm-past-events ul.mdlm-past-events__pages > li::before,
.mdlm-past-events ul.mdlm-past-events__pages > li::marker {
	content: none;
}

.mdlm-past-events :is(a, span).mdlm-past-events__page {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 2.25rem;
	height: 2.25rem;
	margin: 0;
	padding: 0 .5rem;
	border: 1px solid transparent;
	border-radius: var(--mdlm-ev-radius-pill);
	background: transparent;
	box-shadow: none;
	color: var(--mdlm-ev-blue-ink);
	font-family: var(--mdlm-ev-font-text);
	font-size: .875rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color var(--mdlm-ev-transition), border-color var(--mdlm-ev-transition), color var(--mdlm-ev-transition);
}

.mdlm-past-events a.mdlm-past-events__page:visited {
	color: var(--mdlm-ev-blue-ink);
}

.mdlm-past-events a.mdlm-past-events__page:is(:hover, :focus, :active) {
	border-color: var(--mdlm-ev-line-strong);
	background: var(--mdlm-ev-tint);
	color: var(--mdlm-ev-navy);
	text-decoration: none;
	outline: none;
}

.mdlm-past-events a.mdlm-past-events__page:focus-visible {
	outline: 2px solid var(--mdlm-ev-blue);
	outline-offset: 2px;
}

.mdlm-past-events span.mdlm-past-events__page--current {
	border-color: var(--mdlm-ev-line-strong);
	background: var(--mdlm-ev-tint);
	color: var(--mdlm-ev-navy);
	font-weight: 800;
}

.mdlm-past-events span.mdlm-past-events__page--gap {
	min-width: 1.25rem;
	padding: 0;
	color: var(--mdlm-ev-muted);
}


/* ══ 8. ÉTAT VIDE ══════════════════════════════════════════════════════════
 * Encart informatif de la journée vide (vue Jour) : fond léger, bordure pâle,
 * pictogramme dans une pastille. */

.mdlm-past-events div.mdlm-past-events__empty {
	display: flex;
	align-items: center;
	gap: .875rem;
	margin: 0;
	padding: 1rem 1.125rem;
	border: 1px solid var(--mdlm-ev-panel-line);
	border-radius: var(--mdlm-ev-radius-card);
	background: var(--mdlm-ev-hover);
	color: var(--mdlm-ev-ink);
	font-family: var(--mdlm-ev-font-text);
	font-size: .9375rem;
	line-height: 1.55;
}

.mdlm-past-events .mdlm-past-events__empty-body {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	align-items: center;
	gap: .625rem 1rem;
	min-width: 0;
}

.mdlm-past-events p.mdlm-past-events__empty-text {
	flex: 1 1 14rem;
	margin: 0;
	padding: 0;
	color: var(--mdlm-ev-ink);
	font: inherit;
}

.mdlm-past-events .mdlm-past-events__empty > svg.mdlm-past-events__icon {
	flex: none;
	width: 2.375rem;
	height: 2.375rem;
	padding: .5625rem;
	border-radius: 50%;
	background: var(--mdlm-ev-tint-strong);
	color: var(--mdlm-ev-blue-strong);
}


/* ══ 9. TEXTE RÉSERVÉ AUX LECTEURS D'ÉCRAN, PICTOGRAMMES ═══════════════════ */

.mdlm-past-events .mdlm-past-events__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

.mdlm-past-events svg.mdlm-past-events__icon {
	display: block;
	width: 1rem;
	height: 1rem;
	fill: none;
}


/* ══ 10. MOUVEMENT RÉDUIT ══════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
	.mdlm-past-events :is(article.mdlm-past-events__card, img.mdlm-past-events__image, a.mdlm-past-events__title-link, a.mdlm-past-events__recap-link, a.mdlm-past-events__page, a.mdlm-past-events__pag-nav, input.mdlm-past-events__input, select.mdlm-past-events__input, div.mdlm-past-events__combo, button.mdlm-past-events__submit, a.mdlm-past-events__reset, .mdlm-past-events__results, svg.mdlm-past-events__icon--chevron) {
		transition: none;
	}

	.mdlm-past-events article.mdlm-past-events__card:is(:hover, :focus-within),
	.mdlm-past-events article.mdlm-past-events__card:hover img.mdlm-past-events__image {
		transform: none;
	}

	.mdlm-past-events.is-loading .mdlm-past-events__results::before {
		animation: none;
		background: var(--mdlm-ev-blue);
		opacity: .5;
	}
}


/* ══ 11. PALIERS ═══════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
	.mdlm-past-events {
		--mdlm-past-gap: 1.25rem;
		--mdlm-past-cols: 2;
	}

	/* Filtres sur deux colonnes : recherche, puis année et catégorie, puis actions. */
	.mdlm-past-events form.mdlm-past-events__filters {
		grid-template-areas:
			"search search"
			"year category"
			"actions actions";
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.mdlm-past-events.is-enhanced form.mdlm-past-events__filters:not(.has-reset) {
		grid-template-areas:
			"search search"
			"year category";
	}

	/* Pagination : « précédents » / « suivants » (le mot « Événements » reste lu). */
	.mdlm-past-events .mdlm-past-events__pag-label-long {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.mdlm-past-events :is(a, span).mdlm-past-events__pag-nav {
		padding: 0 .75rem;
	}
}

@media (max-width: 767px) {
	.mdlm-past-events {
		--mdlm-past-gap: 1rem;
		--mdlm-past-cols: 1;
	}

	.mdlm-past-events .mdlm-past-events__body {
		gap: .75rem;
		padding: 1rem;
	}

	/* Filtres empilés pleine largeur ; Filtrer et Réinitialiser se partagent la ligne. */
	.mdlm-past-events form.mdlm-past-events__filters,
	.mdlm-past-events.is-enhanced form.mdlm-past-events__filters:not(.has-reset) {
		grid-template-areas:
			"search"
			"year"
			"category"
			"actions";
		grid-template-columns: minmax(0, 1fr);
		gap: .75rem;
		padding: 1rem;
	}

	.mdlm-past-events.is-enhanced form.mdlm-past-events__filters:not(.has-reset) {
		grid-template-areas:
			"search"
			"year"
			"category";
	}

	.mdlm-past-events .mdlm-past-events__actions > * {
		flex: 1 1 0;
		min-width: 0;
	}

	.mdlm-past-events div.mdlm-past-events__empty {
		align-items: flex-start;
	}

	.mdlm-past-events :is(h2, h3, h4).mdlm-past-events__title {
		font-size: 1.125rem;
	}
}

@media (max-width: 600px) {
	/* Pagination : chevrons seuls dans des pilules rondes (libellé toujours lu). */
	.mdlm-past-events .mdlm-past-events__pag-label {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.mdlm-past-events :is(a, span).mdlm-past-events__pag-nav {
		justify-content: center;
		width: 2.5rem;
		padding: 0;
	}
}

@media (max-width: 400px) {
	/* Numéros compacts (1, courante, dernière) : une seule ligne à 320 px. */
	.mdlm-past-events ul.mdlm-past-events__pages--full {
		display: none;
	}

	.mdlm-past-events ul.mdlm-past-events__pages--compact {
		display: flex;
	}

	.mdlm-past-events nav.mdlm-past-events__pagination {
		gap: .25rem;
	}

	.mdlm-past-events :is(a, span).mdlm-past-events__page {
		min-width: 2rem;
		padding: 0 .375rem;
	}

	.mdlm-past-events .mdlm-past-events__body {
		padding: .875rem;
	}
}
