/* Calendrier des événements — [mpe_calendrier] (inc/calendrier.php). */

/* Largeur : le groupe « large » (1200px) qui contient le shortcode ajoute une marge interne de 48px de chaque côté ;
   on la retire pour s'aligner sur le bandeau Partenaires et le pied de page (1200px). Même règle : actualites.css. */
.entry-content > .wp-block-group:has(> .mpe-cal) { padding-left: 0 !important; padding-right: 0 !important; }
/* En dessous de 1240px, le groupe déborde de 20px de chaque côté (marge négative d'Astra) : on remet 20px de marge
   interne pour que le contenu ne colle pas aux bords de l'écran. */
@media (max-width: 1239px) {
	.entry-content > .wp-block-group:has(> .mpe-cal) { padding-left: 20px !important; padding-right: 20px !important; }
}

.mpe-cal {
	--cal-bleu: #1f53f3;
	--cal-nuit: #000034;
	--cal-texte: #334155;
	--cal-doux: #64748b;
	--cal-fond: #f0f5fa;
	--cal-bord: #e2e8f0;
	--cal-race: #1f53f3;
	/* Une seule couleur pour tous les types (plus de vert pour les stages ni de violet pour les événements). */
	--cal-stage: var(--cal-race);
	--cal-event: var(--cal-race);
	--cal-other: var(--cal-race);
	--cal-or: #d4a72c;
	--cal-argent: #94a3b8;
	--cal-bronze: #b8763e;
	--cal-rayon: 10px; /* comme les portraits de l'équipe (mpe-grille-equipe) */
	color: var(--cal-texte);
	max-width: 1200px;
	margin: 0 auto;
}

/* Couleur par type. */
.mpe-cal .mpe-cal-t-race  { --t: var(--cal-race); }
.mpe-cal .mpe-cal-t-stage { --t: var(--cal-stage); }
.mpe-cal .mpe-cal-t-event { --t: var(--cal-event); }
.mpe-cal .mpe-cal-t-other { --t: var(--cal-other); }

.mpe-cal-ico { width: 1em; height: 1em; flex: none; }

/* ---------- Filtres : barre blanche collante (même langage que les filtres de la page Actualités) ---------- */

.mpe-cal-filtres {
	position: sticky;
	top: var(--mpe-cal-sticky, 0px);
	transition: top .25s ease; /* suit le fondu de l'en-tête masqué / réaffiché au défilement */
	z-index: 5;
	margin-bottom: 8px;
	color: var(--cal-nuit);
	background: #fff;
	/* Fond blanc et filet gris en bas, étendus jusqu'aux bords de l'écran (visibles quand la barre colle), sans débordement horizontal. */
	border-image: linear-gradient(#fff calc(100% - 1px), var(--cal-bord) calc(100% - 1px)) fill 0 / 0 / 0 100vw;
}
.mpe-cal-ligne {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	padding: 10px 0;
}

.mpe-cal button.mpe-cal-vue,
.mpe-cal button.mpe-cal-type,
.mpe-cal button.mpe-cal-voir-carte {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font: inherit;
	line-height: 1.2;
	white-space: nowrap;
	background: transparent;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s, opacity .15s;
}
.mpe-cal button:focus-visible,
.mpe-cal a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.mpe-cal button:focus:not(:focus-visible),
.mpe-cal a:focus:not(:focus-visible) { outline: none; } /* pas de cadre au clic souris (le thème en ajoute un) */

/* Onglets « À venir » / « Passés » : bleu nuit, soulignés. */
.mpe-cal-vues { display: flex; gap: 4px 28px; }
.mpe-cal button.mpe-cal-vue {
	padding: 8px 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--cal-nuit);
	border-bottom: 2px solid transparent;
}
.mpe-cal button.mpe-cal-vue:hover { color: var(--cal-bleu); }
.mpe-cal button.mpe-cal-vue[aria-pressed="true"] { color: var(--cal-nuit); border-bottom-color: var(--cal-nuit); }
.mpe-cal button.mpe-cal-vue[aria-pressed="false"] { color: var(--cal-doux); }
.mpe-cal button.mpe-cal-vue[aria-pressed="false"]:hover { color: var(--cal-bleu); }
.mpe-cal-nb { font-size: .78em; font-weight: 600; opacity: .7; font-variant-numeric: tabular-nums; }
.mpe-cal-nb:empty { display: none; }

.mpe-cal-outils { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }

/* Types : pastilles grises, la sélection en bleu nuit (comme les catégories des actualités). */
.mpe-cal-types { display: flex; flex-wrap: wrap; gap: 8px; }
/* Types : même style que les filtres de la page Actualités (bleu clair, texte bleu ; actif en bleu plein). */
.mpe-cal button.mpe-cal-type {
	padding: 9px 15px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	color: var(--cal-bleu);
	background: #e3ebfd;
	border-radius: 999px;
	box-shadow: none;
}
.mpe-cal button.mpe-cal-type:hover { color: var(--cal-bleu); background: #cfdcfc; }
.mpe-cal button.mpe-cal-type[aria-pressed="true"] { color: #fff; background: var(--cal-bleu); }
.mpe-cal button.mpe-cal-type[hidden] { display: none; }

/* Saison (passés) + carte : pilule à contour. */
.mpe-cal-saison {
	display: inline-flex;
	align-items: stretch;
	overflow: hidden;
	color: var(--cal-nuit);
	background: #fff;
	border: 1px solid var(--cal-bord);
	border-radius: 999px;
}
.mpe-cal-saison[hidden],
.mpe-cal-annee-choix[hidden] { display: none; }
.mpe-cal-annee-choix { display: inline-flex; align-items: center; }
.mpe-cal .mpe-cal-select-annee {
	height: 100%;
	min-height: 34px;
	margin: 0;
	padding: 0 30px 0 16px;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	color: var(--cal-nuit);
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000034' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	appearance: none;
	cursor: pointer;
}
.mpe-cal button.mpe-cal-voir-carte {
	padding: 8px 16px 8px 14px;
	font-size: 14px;
	font-weight: 700;
	color: var(--cal-nuit);
}
.mpe-cal-annee-choix:not([hidden]) + .mpe-cal-voir-carte,
.mpe-cal-annee-choix:not([hidden]) ~ .mpe-cal-voir-carte { border-left: 1px solid var(--cal-bord); }
.mpe-cal button.mpe-cal-voir-carte:hover { color: var(--cal-bleu); }
.mpe-cal button.mpe-cal-voir-carte[hidden] { display: none; }
.mpe-cal-voir-carte .mpe-cal-ico { font-size: 18px; }

/* Sommaire des mois : ancres ; le mois affiché à l'écran est souligné. */
.mpe-cal-sommaire {
	display: flex;
	gap: 22px;
	overflow-x: auto;
	scrollbar-width: none;
	border-top: 1px solid var(--cal-bord);
	mask-image: linear-gradient(90deg, #000 94%, transparent);
}
.mpe-cal-sommaire[hidden] { display: none; }
.mpe-cal-sommaire::-webkit-scrollbar { display: none; }
.mpe-cal .mpe-cal-m {
	flex: none;
	padding: 10px 0 8px;
	font-size: 14px;
	font-weight: 600;
	color: var(--cal-doux);
	text-decoration: none !important; /* le thème souligne les liens du contenu */
	white-space: nowrap;
	border-bottom: 2px solid transparent;
	transition: color .15s, border-color .15s;
}
.mpe-cal .mpe-cal-m:hover,
.mpe-cal .mpe-cal-m:focus-visible { color: var(--cal-bleu); }
.mpe-cal .mpe-cal-m:focus:not(:focus-visible) { outline: none !important; box-shadow: none !important; }
.mpe-cal .mpe-cal-m.is-actif { color: var(--cal-nuit); font-weight: 700; border-bottom-color: var(--cal-nuit); }

/* Groupes : place pour la barre collante lors d'un saut d'ancre (sans JS). */
.mpe-cal-groupe { scroll-margin-top: calc(var(--mpe-cal-sticky, 0px) + 130px); }

/* Fenêtre carte : largeur réduite pour que l'image entière tienne en hauteur (--ratio = largeur / hauteur de l'image,
   --cadre = hauteur de l'en-tête et des crédits). */
.mpe-cal-dialog {
	--cadre: 130px;
	width: min(1200px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	padding: 0;
	overflow: auto;
	color: var(--cal-texte);
	background: #fff;
	border: 0;
	border-radius: var(--cal-rayon);
	box-shadow: 0 30px 80px -20px rgba(0, 0, 52, .5);
}
.mpe-cal-dialog[style*="--ratio"] { width: min(1200px, calc(100vw - 32px), calc((100dvh - 32px - var(--cadre)) * var(--ratio))); }
.mpe-cal-dialog::backdrop { background: rgba(0, 0, 52, .6); backdrop-filter: blur(3px); }
.mpe-cal-dialog[open] { animation: mpe-cal-ouvre .2s ease-out; }
@keyframes mpe-cal-ouvre { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.mpe-cal-dialog-tete {
	position: sticky; top: 0; z-index: 1;
	display: flex; align-items: center; gap: 16px;
	padding: 12px 12px 12px 20px;
	background: #fff; border-bottom: 1px solid var(--cal-bord);
}
.mpe-cal .mpe-cal-dialog-tete p { flex: 1; margin: 0; font-weight: 800; color: var(--cal-nuit); }
.mpe-cal .mpe-cal-dialog-tete a { font-size: 14px; font-weight: 700; color: var(--cal-bleu); text-decoration: none; }
.mpe-cal button.mpe-cal-fermer {
	display: grid; place-items: center; width: 40px; height: 40px; margin: 0; padding: 0;
	font-size: 20px; color: var(--cal-nuit); background: var(--cal-fond); border: 0; border-radius: 50%; cursor: pointer;
}
.mpe-cal button.mpe-cal-fermer:hover { background: var(--cal-bord); }
.mpe-cal-dialog-img { display: block; width: 100%; height: auto; }
/* Toucher / cliquer la carte : image seule dans un nouvel onglet, où l'on peut zoomer. */
.mpe-cal-dialog-zoom { display: block; cursor: zoom-in; }
.mpe-cal-dialog-zoom:focus-visible { outline: 3px solid var(--cal-bleu); outline-offset: -3px; }
.mpe-cal .mpe-cal-dialog-credits { margin: 0; padding: 10px 20px 14px; font-size: 13px; font-style: italic; color: var(--cal-doux); }

.mpe-cal-compteur { margin: 16px 2px 0; font-size: 14px; color: var(--cal-doux); }
.mpe-cal-compteur:empty { display: none; }

/* ---------- Groupes par mois ---------- */

.mpe-cal-groupe { margin-top: 44px; }
.mpe-cal .mpe-cal-titre-mois {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 16px;
	font-size: clamp(22px, 2.4vw, 28px);
	color: var(--cal-nuit);
}
.mpe-cal-titre-mois span { font-size: .6em; font-weight: 500; color: var(--cal-doux); }
/* 29/11 : plus de filet après le titre du mois (trop de traits avec les cartes encadrées) : l'espace au-dessus suffit. */

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

/* ---------- Carte ---------- */

.mpe-cal-carte {
	position: relative;
	display: flex;
	flex-direction: column;
}
.mpe-cal-carte[hidden] { display: none; }

/* Visuel : image (ou dégradé du type), pastille de type et tuile de date ; textes en dessous (comme « Les autres rendez-vous »). */
.mpe-cal-visuel {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	aspect-ratio: 16 / 10;
	padding: 12px;
	overflow: hidden;
	isolation: isolate;
	color: #fff;
	border-radius: var(--cal-rayon);
	background:
		radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--t) 60%, #fff) 0%, transparent 55%),
		linear-gradient(160deg, var(--t) 0%, color-mix(in srgb, var(--t) 35%, var(--cal-nuit)) 100%);
}
.mpe-cal-img {
	position: absolute; inset: 0; z-index: -2;
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.mpe-cal-carte:hover .mpe-cal-img { transform: scale(1.05); }
/* Image portrait : entière, le vide rempli par la même image floutée (comme les cartes d'actualités, mpe_actu_fond_flou()). */
.mpe-cal-visuel .mpe-fond-flou { position: absolute; inset: -48px; z-index: -3; background: var(--fond) center / cover no-repeat; filter: blur(40px) saturate(1.2); opacity: .9; transform: translateZ(0); pointer-events: none; }
.mpe-cal-img.is-portrait { object-fit: contain; }
/* Cartes sans image : nid d'abeille discret (motif MPE) qui s'efface vers le bas + profil de parcours stylisé (mpe_calendrier_motif()). */
.mpe-cal-motif { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.mpe-cal-motif::before {
	content: ""; position: absolute; inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 L56 16 L56 48.5 L28 64.5 L0 48.5 L0 16 Z M28 64.5 L28 97' fill='none' stroke='%23ffffff' stroke-width='1.2'/%3E%3C/svg%3E");
	background-size: 34px 59px;
	opacity: .12;
	-webkit-mask-image: linear-gradient(200deg, #000 0%, transparent 70%);
	mask-image: linear-gradient(200deg, #000 0%, transparent 70%);
}
.mpe-cal-profil { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; }

/* Haut : type + état (verre dépoli). */
.mpe-cal-haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mpe-cal-badge,
.mpe-cal-etat {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 11px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .01em;
	color: #fff;
	background: rgba(255, 255, 255, .16);
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 999px;
	backdrop-filter: blur(12px) saturate(1.4);
	-webkit-backdrop-filter: blur(12px) saturate(1.4);
}
.mpe-cal-badge .mpe-cal-pastille { background: color-mix(in srgb, var(--t) 40%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--t) 45%, transparent); }
/* Pastille de type, pleine : course en rose, stage en bleu foncé, le reste en bleu du site. */
.mpe-cal-badge { color: #fff; background: var(--cal-bleu); border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.mpe-cal-t-race .mpe-cal-badge { color: #fff; background: #ff00a3; }
.mpe-cal-t-stage .mpe-cal-badge { color: #fff; background: var(--cal-nuit); }
.mpe-cal-badge .mpe-cal-pastille { display: none; }
.mpe-cal-etat[hidden] { display: none; }
.mpe-cal-etat { white-space: nowrap; }
.mpe-cal-carte.is-encours .mpe-cal-etat { background: #e11d48; border-color: transparent; }
.mpe-cal-carte.is-encours .mpe-cal-etat::before {
	content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: mpe-cal-pulse 1.4s infinite;
}
.mpe-cal-carte.is-prochain .mpe-cal-etat { color: var(--cal-nuit); background: #fff; border-color: transparent; }
@keyframes mpe-cal-pulse { 50% { opacity: .3; } }

/* Tuile de date, en bas à gauche du visuel. */
.mpe-cal-date {
	align-self: flex-start;
	display: grid;
	justify-items: center;
	flex: none;
	min-width: 56px;
	padding: 7px 8px 8px;
	color: var(--cal-nuit);
	background: #fff;
	border-radius: 8px;
	line-height: 1;
	text-align: center;
	box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .45);
}
.mpe-cal-mois-court { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--t); }
.mpe-cal-jour { margin-top: 3px; font-size: 22px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mpe-cal-titres { min-width: 0; }
.mpe-cal-titres { display: grid; gap: 3px; }
.mpe-cal .mpe-cal-nom { margin: 0 0 2px; font-size: 18px; line-height: 1.2; color: var(--cal-nuit); text-wrap: balance; }
.mpe-cal .mpe-cal-nom a { color: inherit; text-decoration: none; transition: color .15s; }
.mpe-cal .mpe-cal-carte:hover .mpe-cal-nom a { color: var(--cal-bleu); }
.mpe-cal-nom a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* carte entière cliquable */
.mpe-cal .mpe-cal-lieu { margin: 0; font-size: 13px; color: var(--cal-doux); }

/* Corps. */
.mpe-cal-corps { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 14px 0 4px; }
.mpe-cal .mpe-cal-quand { margin: 0; font-size: 13px; color: var(--cal-doux); }


/* ---------- Résultat ---------- */

.mpe-cal-perf {
	--m: var(--cal-bleu);
	--m-fond: var(--cal-fond);
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 10px 10px 10px;
	background: var(--m-fond);
	border-radius: var(--cal-rayon);
}
.mpe-cal-perf-1 { --m: var(--cal-or); --m-fond: #fdf7e4; }
.mpe-cal-perf-2 { --m: var(--cal-argent); --m-fond: #f2f5f9; }
.mpe-cal-perf-3 { --m: var(--cal-bronze); --m-fond: #fbf2ea; }
.mpe-cal-rang {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 44px; height: 44px;
	font-size: 16px; font-weight: 800; line-height: 1;
	color: var(--cal-nuit); background: #fff;
	border-radius: 6px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 52, .08);
}
.mpe-cal-rang sup { position: relative; top: -.45em; font-size: .6em; line-height: 0; vertical-align: baseline; }
.mpe-cal-perf-1 .mpe-cal-rang { color: #5c4300; background: linear-gradient(145deg, #fbe7a1, var(--cal-or)); box-shadow: 0 6px 14px -6px var(--cal-or); }
.mpe-cal-perf-2 .mpe-cal-rang { color: #1e293b; background: linear-gradient(145deg, #f8fafc, var(--cal-argent)); box-shadow: 0 6px 14px -6px var(--cal-argent); }
.mpe-cal-perf-3 .mpe-cal-rang { color: #4a2508; background: linear-gradient(145deg, #f3d3b3, var(--cal-bronze)); box-shadow: 0 6px 14px -6px var(--cal-bronze); }
.mpe-cal-qui { display: grid; gap: 2px; flex: 1; min-width: 0; line-height: 1.2; }
.mpe-cal-perf-titre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cal-doux); }
.mpe-cal .mpe-cal-qui a,
.mpe-cal-qui strong { position: relative; z-index: 2; font-size: 16px; font-weight: 800; color: var(--cal-nuit); text-decoration: none; }
.mpe-cal .mpe-cal-qui a:hover { color: var(--cal-bleu); }
.mpe-cal a.mpe-cal-perf-lien {
	position: relative; z-index: 2;
	display: grid; place-items: center; flex: none;
	width: 36px; height: 36px;
	font-size: 16px; color: var(--cal-nuit); background: #fff;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 52, .1);
	transition: background .15s, color .15s, transform .15s;
}
.mpe-cal a.mpe-cal-perf-lien:hover { color: #fff; background: var(--cal-nuit); transform: translateX(2px); }

.mpe-cal .mpe-cal-statut,
.mpe-cal .mpe-cal-attente { margin: 0; font-size: 13px; font-weight: 600; }
.mpe-cal .mpe-cal-statut { align-self: flex-start; padding: 5px 11px; color: #9f1239; background: #ffe4e6; border-radius: 999px; }
.mpe-cal-attente { display: none; align-self: flex-start; padding: 5px 11px; color: var(--cal-doux); background: var(--cal-fond); border-radius: 999px; }
.mpe-cal-carte.is-passe .mpe-cal-attente { display: block; }
.mpe-cal-carte.is-cancelled .mpe-cal-nom { text-decoration: line-through; text-decoration-thickness: 2px; }

.mpe-cal a.mpe-cal-cr {
	position: relative; z-index: 2;
	display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
	font-size: 14px; font-weight: 700; color: var(--cal-bleu); text-decoration: none;
}
.mpe-cal-cr .mpe-cal-ico { transition: transform .15s; }
.mpe-cal-cr:hover .mpe-cal-ico { transform: translateX(3px); }

/* ---------- Vide ---------- */

.mpe-cal-aucun { margin-top: 32px; padding: 40px 20px; text-align: center; background: var(--cal-fond); border-radius: var(--cal-rayon); }
.mpe-cal-aucun[hidden] { display: none; }
.mpe-cal-aucun p { margin: 0 0 12px; }
.mpe-cal button.mpe-cal-reinit { padding: 10px 18px; font: inherit; font-weight: 700; color: #fff; background: var(--cal-bleu); border: 0; border-radius: 999px; cursor: pointer; }

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
	.mpe-cal-filtres { position: static; }
	.mpe-cal-ligne { display: grid; }
	.mpe-cal-outils { justify-content: space-between; }
	.mpe-cal-types { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.mpe-cal-sommaire { display: none; } /* le défilement suffit */
	.mpe-cal-groupe { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
	.mpe-cal *, .mpe-cal *::before { transition: none !important; animation: none !important; }
}

/* ---------- Tailles des paragraphes ----------
   Le CSS additionnel du site impose « .wp-block-group p { font-size: 18px !important } » :
   chaque paragraphe du calendrier déclare sa taille dans --fs, appliquée ici en !important. */
.mpe-cal p { font-size: var(--fs, 1rem) !important; }
.mpe-cal .mpe-cal-compteur { --fs: 14px; }
.mpe-cal .mpe-cal-lieu,
.mpe-cal .mpe-cal-quand,
.mpe-cal .mpe-cal-statut,
.mpe-cal .mpe-cal-attente,
.mpe-cal .mpe-cal-dialog-credits { --fs: 13px; }
.mpe-cal .mpe-cal-dialog-tete p { --fs: 16px; }
@media (max-width: 640px) {
	.mpe-cal .mpe-cal-dialog-tete p { --fs: 15px; }
	.mpe-cal-visuel { min-height: 220px; }
}

/* ---------- Onglets ---------- */
.mpe-cal-liste[hidden] { display: none; }

/* ---------- Intersaison : plus aucun événement à venir ----------
   Grande photo (assets/img/calendrier-intersaison.webp) avec voile bleu nuit à gauche, texte et bouton par-dessus. */
.mpe-cal-aucun--intersaison {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(360px, 42vw, 520px);
	overflow: hidden;
	padding: clamp(28px, 4vw, 56px);
	text-align: left;
	background: var(--cal-nuit);
	border-radius: 20px;
	isolation: isolate;
}
.mpe-cal-aucun--intersaison[hidden] { display: none; }
.mpe-cal-intersaison__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.mpe-cal-aucun--intersaison::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(0, 0, 52, .88) 0%, rgba(0, 0, 52, .55) 45%, rgba(0, 0, 52, 0) 75%), linear-gradient(0deg, rgba(0, 0, 52, .6) 0%, rgba(0, 0, 52, 0) 50%);
}
.mpe-cal-intersaison__texte { max-width: 480px; color: #fff; }
.mpe-cal .mpe-cal-intersaison__kicker { --fs: 14px; margin: 0 0 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #ff00a3; }
.mpe-cal .mpe-cal-intersaison__titre { --fs: clamp(28px, 3.4vw, 40px); margin: 0 0 10px; font-family: Toroka, Helvetica, Arial, sans-serif; font-weight: 700; line-height: 1.05; color: #fff; }
.mpe-cal .mpe-cal-intersaison__texte p:not([class]) { --fs: 17px; margin: 0 0 24px; line-height: 1.5; color: rgba(255, 255, 255, .85); }
.mpe-cal .mpe-cal-aucun--intersaison button.mpe-cal-reinit { padding: 13px 22px; color: #000034; background: #fff; }
.mpe-cal .mpe-cal-aucun--intersaison button.mpe-cal-reinit:hover { color: #fff; background: var(--cal-bleu); }
.mpe-cal .mpe-cal-intersaison__credit { --fs: 11px; position: absolute; right: 14px; bottom: 10px; margin: 0; color: rgba(255, 255, 255, .6); }
@media (max-width: 640px) {
	.mpe-cal-aucun--intersaison { min-height: 420px; border-radius: 16px; }
	.mpe-cal-aucun--intersaison::before { background: linear-gradient(0deg, rgba(0, 0, 52, .92) 0%, rgba(0, 0, 52, .55) 55%, rgba(0, 0, 52, .1) 100%); }
	.mpe-cal-intersaison__img { object-position: 70% 50%; }
	.mpe-cal .mpe-cal-intersaison__credit { top: 10px; bottom: auto; } /* en haut : le bouton occupe le bas */
}

/* ---------- Barre de filtres (maquette) : ligne grise pleine largeur pour les onglets et les types,
   onglet actif souligné en bleu, nombre entre parenthèses ; ligne des mois blanche, mois actif en bleu. ---------- */
.mpe-cal-ligne {
	padding: 20px 0 0;
	align-items: stretch;
	border-image: linear-gradient(#f2f3f7, #f2f3f7) fill 0 / 0 / 0 100vw; /* fond gris jusqu'aux bords de l'écran */
}
.mpe-cal-vues { align-items: flex-end; gap: 4px 32px; }
.mpe-cal button.mpe-cal-vue { padding: 6px 0 18px; font-size: 15px; background: transparent !important; box-shadow: none !important; border-bottom: 3px solid transparent; }
.mpe-cal button.mpe-cal-vue[aria-pressed="true"] { color: var(--cal-nuit); border-bottom-color: var(--cal-bleu); }
.mpe-cal button.mpe-cal-vue[aria-pressed="false"] { font-weight: 500; color: var(--cal-doux); }
.mpe-cal-nb { font-size: 1em; font-weight: inherit; opacity: 1; }
.mpe-cal-nb::before { content: "("; }
.mpe-cal-nb::after { content: ")"; }
.mpe-cal-outils { align-self: center; padding-bottom: 18px; }
.mpe-cal-sommaire { gap: 26px; border-top: 0; }
.mpe-cal .mpe-cal-m { padding: 14px 0 12px; font-size: 15px; font-weight: 500; border-bottom: 0; }
.mpe-cal .mpe-cal-m.is-actif { color: var(--cal-bleu); font-weight: 700; }

/* ---------- Rien à venir pour ce type : « Faites venir l'équipe près de chez vous » ---------- */
.mpe-cal-aucun--organiser {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 20px 32px;
	padding: clamp(24px, 3vw, 40px);
	text-align: left;
	background: #f1f3f9; /* aplat, même gris bleuté que les blocs résultat des cartes */
	border-radius: 20px;
}
.mpe-cal-aucun--organiser[hidden] { display: none; }
.mpe-cal-organiser__picto {
	width: 88px;
	height: 88px;
	padding: 18px;
	box-sizing: border-box;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 6px 20px rgba(0, 0, 52, .08);
}
.mpe-cal .mpe-cal-organiser__texte p { margin: 0; }
.mpe-cal .mpe-cal-organiser__kicker { --fs: 13px; margin: 0 0 6px !important; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #ff00a3; }
.mpe-cal .mpe-cal-organiser__titre { --fs: clamp(22px, 2.4vw, 28px); margin: 0 0 8px !important; font-family: Toroka, Helvetica, Arial, sans-serif; font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; line-height: 1.1; color: var(--cal-nuit); }
.mpe-cal .mpe-cal-organiser__texte p:not([class]) { --fs: 16px; max-width: 560px; font-size: 16px; line-height: 1.45; color: #4a4a5e; }
.mpe-cal-organiser__actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.mpe-cal a.mpe-cal-organiser__cta {
	display: inline-flex;
	justify-content: center;
	padding: 13px 22px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	color: #fff;
	text-decoration: none !important;
	background: var(--cal-bleu);
	border-radius: 999px;
	transition: background .15s;
}
.mpe-cal a.mpe-cal-organiser__cta:hover { color: #fff; background: var(--cal-nuit); }
.mpe-cal .mpe-cal-aucun--organiser button.mpe-cal-reinit { justify-content: center; padding: 12px 22px; color: var(--cal-nuit); background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 52, .12); }
.mpe-cal .mpe-cal-aucun--organiser button.mpe-cal-reinit:hover { color: var(--cal-bleu); }
@media (max-width: 782px) {
	.mpe-cal-aucun--organiser { grid-template-columns: 1fr; justify-items: start; }
	.mpe-cal-organiser__picto { width: 64px; height: 64px; padding: 13px; }
	.mpe-cal-organiser__actions { width: 100%; }
}

/* Intersaison : lien secondaire sous le bouton. */
.mpe-cal a.mpe-cal-intersaison__organiser { display: block; margin-top: 16px; font-weight: 700; color: #fff; text-decoration: none !important; }
.mpe-cal a.mpe-cal-intersaison__organiser:hover { text-decoration: underline !important; }


/* Moins d'espace entre les dernières cartes et le bandeau « Partenaires » : pas de marge basse (48 px) sur le groupe de la page. */
.entry-content .wp-block-group:has(> .mpe-cal) { padding-bottom: 0 !important; }
.mpe-cal { padding-bottom: 8px; }

/* ---------- Cartes encadrées (octobre 2026) ----------
   Un cadre fin englobe l'image, le titre (sous l'image), la date / la localisation et le statut ou le résultat. */
.mpe-cal-carte {
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--cal-bord);
	border-radius: 16px;
	transition: border-color .2s, box-shadow .2s;
}
.mpe-cal-carte:hover { border-color: #cfd8e6; box-shadow: 0 10px 28px -16px rgba(0, 0, 52, .35); }
.mpe-cal-carte .mpe-cal-visuel { border-radius: 0; }
.mpe-cal-corps { padding: 16px 16px 16px; }
.mpe-cal-corps > :last-child { margin-bottom: 0; }
.mpe-cal-grille { gap: 24px; }

/* Localisation : picto épingle à gauche (comme l'annuaire des partenaires). */
.mpe-cal .mpe-cal-lieu { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.mpe-cal .mpe-cal-lieu::before {
	content: "";
	flex: none;
	width: 14px;
	height: 14px;
	background-color: var(--cal-nuit);
	-webkit-mask: url("data:image/svg+xml,%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='M12 21s-7-6.6-7-12a7 7 0 0 1 14 0c0 5.4-7 12-7 12Z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%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='M12 21s-7-6.6-7-12a7 7 0 0 1 14 0c0 5.4-7 12-7 12Z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Statut « Résultats à venir » et résultat : pleine largeur en bas de la carte. */
.mpe-cal-corps .mpe-cal-attente,
.mpe-cal-corps .mpe-cal-statut { align-self: stretch; padding: 9px 12px; border-radius: 10px; }
.mpe-cal-corps .mpe-cal-perf { margin-top: auto; }

/* Meilleur résultat (maquette) : bandeau bleu clair sur une ligne — rang en pastille rose, « Coureuse · meilleure MPE », flèche. */
.mpe-cal-corps .mpe-cal-perf,
.mpe-cal-corps .mpe-cal-perf-1,
.mpe-cal-corps .mpe-cal-perf-2,
.mpe-cal-corps .mpe-cal-perf-3 { gap: 10px; padding: 8px 12px 8px 8px; background: #e3ebfd; border-radius: 10px; }
.mpe-cal-corps .mpe-cal-rang,
.mpe-cal-corps .mpe-cal-perf-1 .mpe-cal-rang,
.mpe-cal-corps .mpe-cal-perf-2 .mpe-cal-rang,
.mpe-cal-corps .mpe-cal-perf-3 .mpe-cal-rang {
	width: auto; min-width: 34px; height: 26px; padding: 0 8px;
	font-size: 13px; color: #fff; background: #ff00a3; border-radius: 7px; box-shadow: none;
}
.mpe-cal-corps .mpe-cal-rang sup { top: -.35em; }
.mpe-cal-corps .mpe-cal-qui { display: block; overflow: hidden; font-size: 14px; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; color: var(--cal-nuit); }
.mpe-cal .mpe-cal-corps .mpe-cal-qui a,
.mpe-cal-corps .mpe-cal-qui strong { font-size: 14px; font-weight: 500; }
.mpe-cal-corps .mpe-cal-perf-titre { font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--cal-nuit); }
.mpe-cal .mpe-cal-corps .mpe-cal-perf-lien { width: auto; height: auto; font-size: 18px; color: var(--cal-nuit); background: none; box-shadow: none; }
.mpe-cal .mpe-cal-corps a.mpe-cal-perf-lien:hover { color: var(--cal-bleu); background: none; }

/* Localisation : texte et picto bleu nuit. */
.mpe-cal .mpe-cal-corps .mpe-cal-lieu { font-size: 14px; color: var(--cal-nuit); }
.mpe-cal .mpe-cal-corps .mpe-cal-lieu::before { width: 16px; height: 16px; }
.mpe-cal .mpe-cal-lieu-texte { min-width: 0; }
.mpe-cal .mpe-cal-quand-inline { color: var(--cal-doux); white-space: nowrap; }

/* Catégorie UCI (champ « Catégorie UCI » des courses) : pastille en verre dépoli sombre, en haut à droite de la photo. */
.mpe-cal-haut-droite { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.mpe-cal-uci {
	display: inline-flex;
	align-items: center;
	padding: 6px 11px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	color: #fff;
	background: rgba(0, 0, 52, .45);
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 999px;
	backdrop-filter: blur(10px) saturate(1.3);
	-webkit-backdrop-filter: blur(10px) saturate(1.3);
}


/* « Résultats à venir » / statut : même hauteur, même taille et même graisse que le bandeau « meilleure MPE ». */
.mpe-cal .mpe-cal-corps .mpe-cal-attente,
.mpe-cal .mpe-cal-corps .mpe-cal-statut {
	--fs: 14px;
	box-sizing: border-box;
	min-height: 42px;
	padding: 8px 12px;
	font-weight: 500;
	line-height: 1.3;
	border-radius: 10px;
}
.mpe-cal-carte.is-passe .mpe-cal-corps .mpe-cal-attente { display: flex; align-items: center; }
.mpe-cal .mpe-cal-corps .mpe-cal-statut { display: flex; align-items: center; }
.mpe-cal-corps .mpe-cal-perf { box-sizing: border-box; min-height: 42px; }
.mpe-cal-corps .mpe-cal-perf { height: 42px; padding-top: 0; padding-bottom: 0; }
.mpe-cal .mpe-cal-corps .mpe-cal-perf-lien { height: 24px; line-height: 0; }

/* Nombre d'événements : masqué à l'écran (déjà dans les onglets « À venir (n) » / « Passés (n) »),
   gardé pour les lecteurs d'écran (annonce du résultat d'un filtre). */
.mpe-cal .mpe-cal-compteur {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.mpe-cal-filtres + .mpe-cal-compteur + .mpe-cal-liste { margin-top: 24px; }

/* Meilleur résultat (maquette v2) : fond gris bleuté, rang rose, nom de la coureuse en gras, flèche. */
.mpe-cal-corps .mpe-cal-perf,
.mpe-cal-corps .mpe-cal-perf-1,
.mpe-cal-corps .mpe-cal-perf-2,
.mpe-cal-corps .mpe-cal-perf-3 { background: #f1f3f9; }
.mpe-cal .mpe-cal-corps .mpe-cal-qui a,
.mpe-cal-corps .mpe-cal-qui strong { font-weight: 700; }
.mpe-cal-corps .mpe-cal-rang sup { position: relative; top: -.4em; margin-left: 1px; font-size: .7em; line-height: 0; vertical-align: baseline; }
/* « Résultats à venir » : même fond que le meilleur résultat. */
.mpe-cal .mpe-cal-corps .mpe-cal-attente { background: #f1f3f9; }
/* Flèche du meilleur résultat centrée verticalement (elle était 3 px trop haut). */
.mpe-cal .mpe-cal-corps .mpe-cal-perf-lien { display: flex; align-items: center; justify-content: center; }
.mpe-cal .mpe-cal-corps .mpe-cal-perf-lien svg { display: block; }
/* Statuts « Course annulée » / « L'équipe n'a pas pris le départ » : même rendu que « Résultats à venir ». */
.mpe-cal .mpe-cal-corps .mpe-cal-statut { color: var(--cal-doux); background: #f1f3f9; }

/* Dates sur plusieurs jours (« 10–13 ») : tiret plus fin, plus court et plus clair que les chiffres. */
.mpe-tiret { display: inline-block; margin: 0 .06em; font-size: .75em; font-weight: 700; vertical-align: .12em; opacity: .7; }


/* Survol de la carte : ni ombre ni cadre plus foncé, seulement le zoom de l'image (et le titre en bleu). */
.mpe-cal-carte:hover { box-shadow: none; border-color: var(--cal-bord); }

/* Catégorie UCI dans la pastille du type (« Course · 2.Pro »). */
.mpe-cal-badge-sep { margin: 0; opacity: .7; }
.mpe-cal-badge { gap: 3px; } /* point séparateur « Course · 1.1 » plus serré */


/* Drapeau du pays : remplace le picto « lieu » (le gap du flex fait l'espacement). */
.mpe-cal .mpe-cal-lieu:has(.mpe-drapeau)::before { display: none; }
.mpe-cal .mpe-cal-lieu .mpe-drapeau { margin-right: 0; width: 18px; height: 12px; }

/* ==========================================================================
   Vignette date — même design sur l'accueil (.mpe-ht2-agenda__date) et sur la page calendrier (.mpe-cal-date).
   Largeur fixe ; sur plusieurs jours (« FÉVR. 11-14 »), chiffres plus petits et tiret fin, même largeur.
   Bloc identique dans accueil-equipe.css et calendrier.css : modifier les deux.
   ========================================================================== */
.mpe-ht2-agenda__date, .mpe-cal-date {
	display: grid; place-items: center; align-content: center; gap: 1px; box-sizing: border-box;
	width: 60px; min-width: 60px; height: 56px; padding: 6px 4px; border-radius: 8px;
	background: #fff; color: #000034; line-height: 1; text-align: center;
	box-shadow: 0 4px 14px rgba(0, 0, 52, .3);
}
.mpe-ht2-agenda__date > span, .mpe-cal-date .mpe-cal-mois-court {
	margin: 0; font-family: "Plus Jakarta Sans", sans-serif; font-size: 9px; font-weight: 700; line-height: 1;
	letter-spacing: .04em; text-transform: uppercase; color: #000034;
}
.mpe-ht2-agenda__date strong, .mpe-cal-date .mpe-cal-jour {
	margin: 0; font-family: Toroka, Helvetica, Arial, sans-serif; font-size: 26px; font-weight: 700; line-height: 1.1;
	letter-spacing: 0; white-space: nowrap; color: #000034;
}
.mpe-ht2-agenda__date strong.is-plage, .mpe-cal-date .mpe-cal-jour:has(.mpe-tiret) { font-size: 17px; line-height: 1.5; }
.mpe-ht2-agenda__date .mpe-tiret, .mpe-cal-date .mpe-tiret {
	display: inline-block; margin: 0 .06em; font-size: .7em; font-weight: 400; vertical-align: .15em; opacity: 1;
}

/* 22/11 : chiffres des vignettes date en Plus Jakarta Sans (plus de Toroka) — même règle dans accueil-equipe.css et calendrier.css. */
.mpe-ht2-agenda__date strong, .mpe-cal-date .mpe-cal-jour { font-family: "Plus Jakarta Sans", sans-serif !important; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* Participation en attente de validation (champ « Statut ») : pastille ambre « À confirmer » en haut à droite. */
.mpe-cal-attente {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 11px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	color: #000034;
	background: #FFC53D;
	border-radius: 999px;
}
.mpe-cal-attente svg { flex: none; }

/* Tablette portrait : trois cartes par ligne (deux grandes cartes de 350 px avant). */
@media (min-width: 641px) and (max-width: 921px) {
	.mpe-cal-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
}
/* Cartes étroites : « Prochain rendez-vous » passe sous la pastille de type au lieu de la chevaucher. */
.mpe-cal-haut { flex-wrap: wrap; }
/* 27/11 : « À confirmer » (participation en attente de validation) en pastille blanche, comme « Prochain rendez-vous ».
   Les deux pastilles s'empilent à droite quand la prochaine course n'est pas encore confirmée. */
.mpe-cal-haut-droite { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-left: auto; }
.mpe-cal-haut-droite .mpe-cal-attente { color: var(--cal-nuit); background: #fff; }

/* ---------- Pied de carte (29/11, proto « Calendrier MPE – proposition Liste et Mois ») ----------
   Filet en haut, puis : à venir → compte à rebours (prochain rendez-vous, J-14 et moins) ou « Voir la fiche » + flèche ronde ;
   passé → rang en vignette (or / argent / bronze + médaille, bleu pour le top 10, gris au-delà), coureuse, « Top 10 · classement », flèche. */
.mpe-cal .mpe-cal-corps .mpe-cal-pied {
	display: flex; align-items: center; gap: 12px;
	box-sizing: border-box; height: auto; min-height: 62px;
	margin-top: auto; padding: 14px 0 0;
	background: none; border-top: 1px solid var(--cal-bord); border-radius: 0;
}
.mpe-cal-carte.is-passe .mpe-cal-pied--avenir,
.mpe-cal-pied--avenir.is-sans-lien:not(:has(.mpe-cal-compte:not([hidden]))) { display: none !important; }
.mpe-cal-voir { font-size: 14px; font-weight: 700; color: var(--cal-bleu); }
.mpe-cal-carte.has-compte .mpe-cal-voir { display: none; }
.mpe-cal-compte { display: inline-flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; color: var(--cal-doux); }
.mpe-cal-compte[hidden] { display: none; }
.mpe-cal-compte b { font-size: 22px; font-weight: 800; line-height: 1; color: #ff00a3; }
.mpe-cal-compte.is-bientot { padding: 4px 10px; font-weight: 700; color: var(--cal-bleu); background: #e7eeff; border-radius: 999px; }

/* Flèche ronde : décorative (« à venir ») ou lien vers les résultats (« passé »). */
.mpe-cal-go,
.mpe-cal .mpe-cal-corps .mpe-cal-pied .mpe-cal-perf-lien {
	display: grid; place-items: center; flex: none;
	width: 38px; height: 38px; margin-left: auto;
	font-size: 18px; line-height: 0; color: var(--cal-nuit); background: var(--cal-fond);
	border-radius: 50%; box-shadow: none;
	transition: background .2s, color .2s;
}
.mpe-cal-carte:hover .mpe-cal-go,
.mpe-cal .mpe-cal-corps a.mpe-cal-perf-lien:hover { color: #fff; background: var(--cal-bleu); transform: none; }

/* Rang. */
.mpe-cal .mpe-cal-corps .mpe-cal-pied .mpe-cal-rang {
	position: relative;
	width: 48px; min-width: 48px; height: 48px; padding: 0;
	font-size: 21px; font-weight: 800; color: var(--cal-nuit); background: var(--cal-fond);
	border-radius: 12px; box-shadow: none;
}
.mpe-cal .mpe-cal-corps .mpe-cal-pied .mpe-cal-rang sup { top: -.55em; margin-left: 1px; font-size: .55em; }
.mpe-cal .mpe-cal-corps .mpe-cal-perf--top .mpe-cal-rang { color: #fff; background: var(--cal-bleu); }
.mpe-cal .mpe-cal-corps .mpe-cal-perf-1 .mpe-cal-rang { color: #4a3500; background: #f5c542; }
.mpe-cal .mpe-cal-corps .mpe-cal-perf-2 .mpe-cal-rang { color: #26303f; background: #cfd6e0; }
.mpe-cal .mpe-cal-corps .mpe-cal-perf-3 .mpe-cal-rang { color: #3d1f08; background: #d99a6c; }
.mpe-cal-rang-coin {
	position: absolute; top: -7px; right: -8px;
	display: grid; place-items: center;
	width: 24px; height: 24px;
	color: var(--cal-nuit); background: #fff; border-radius: 50%;
	box-shadow: 0 2px 6px rgba(0, 0, 52, .2);
}
.mpe-cal-rang-coin .mpe-cal-ico { width: 14px; height: 14px; }
.mpe-cal-rang-coin .mpe-medaille-chocolat { margin: 0; vertical-align: 0; }
.mpe-cal-rang-coin .mpe-medaille-chocolat svg { width: 20px; height: 20px; }

/* Coureuse et sous-titre. */
.mpe-cal .mpe-cal-corps .mpe-cal-pied .mpe-cal-qui { display: grid; gap: 2px; overflow: visible; white-space: normal; line-height: 1.25; }
.mpe-cal .mpe-cal-corps .mpe-cal-pied .mpe-cal-qui a,
.mpe-cal .mpe-cal-corps .mpe-cal-pied .mpe-cal-qui strong { overflow: hidden; font-size: 15px; font-weight: 700; color: var(--cal-nuit); white-space: nowrap; text-overflow: ellipsis; }
.mpe-cal-perf-sous { font-size: 13px; color: var(--cal-doux); }
/* À venir : le pied remplace « Résultats à venir » (gardé sur les courses passées sans résultat). */
.mpe-cal .mpe-cal-carte:not(.is-passe) .mpe-cal-corps p.mpe-cal-attente { display: none; }

/* 29/11 : sans résultat (résultats à venir, annulée, pas au départ) — même pied que le résultat, vignette picto grise. */
.mpe-cal-carte:not(.is-passe) .mpe-cal-pied--attente { display: none; }
.mpe-cal-pied-ico {
	display: grid; place-items: center; flex: none;
	width: 48px; height: 48px;
	font-size: 22px; color: var(--cal-doux); background: var(--cal-fond);
	border-radius: 12px;
}
.mpe-cal-pied--statut .mpe-cal-pied-ico { color: #be123c; background: #ffe4e6; }
.mpe-cal .mpe-cal-corps .mpe-cal-pied--attente .mpe-cal-qui strong,
.mpe-cal .mpe-cal-corps .mpe-cal-pied--statut .mpe-cal-qui strong { position: static; }

/* 29/11 : vignette date sur plusieurs jours — « 22 » puis « → 30 » en dessous (mpe_calendrier_jours()), au moins carrée.
   Même règle dans accueil-equipe.css et calendrier.css. */
.mpe-ht2-agenda__date:has(.mpe-jour-fin), .mpe-cal-date:has(.mpe-jour-fin) { height: auto; min-height: 60px; padding-top: 7px; padding-bottom: 7px; }
.mpe-ht2-result__photo > .mpe-ht2-result__date:has(.mpe-jour-fin) { width: 60px; height: auto; padding: 7px 4px; }
.mpe-jour-fin {
	display: block; margin-top: 2px;
	font-size: max(11px, .42em); font-weight: 700; line-height: 1.1; letter-spacing: 0;
	white-space: nowrap; color: #64748b;
}
.mpe-ht2-agenda__date strong .mpe-jour-fin, .mpe-ht2-agenda__date strong .mpe-jour-fin span { margin: 2px 0 0; font-size: max(11px, .42em); font-weight: 700; letter-spacing: 0; text-transform: none; color: #64748b; }
.mpe-ht2-agenda__date strong .mpe-jour-fin span { display: inline; margin: 0; font-size: inherit; }

/* 29/11 : date et lieu sous le titre, picto bleu à gauche (comme l'appli), drapeau devant le pays. */
.mpe-cal .mpe-cal-titres .mpe-cal-info { display: flex; align-items: flex-start; gap: 7px; margin: 6px 0 0; --fs: 13px; font-size: 13px; /* .mpe-cal p impose var(--fs) en !important */ line-height: 1.4; color: var(--cal-texte); }
.mpe-cal .mpe-cal-titres .mpe-cal-info + .mpe-cal-info { margin-top: 4px; }
.mpe-cal .mpe-cal-titres .mpe-cal-info > .mpe-cal-ico { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--cal-bleu); }
.mpe-cal-pays { white-space: nowrap; }
.mpe-cal .mpe-cal-pays .mpe-drapeau { margin: 0 0 0 5px; }

/* 29/11 (proto) : vignette date en haut à gauche de la photo ; type et « À confirmer » en pastilles claires au-dessus du titre. */
.mpe-cal-haut { align-items: flex-start; }
.mpe-cal-kick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.mpe-cal-pilule {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 4px 10px;
	font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap;
	color: var(--cal-nuit); background: #e7e8f3;
	border-radius: 999px;
}
.mpe-cal-t-race .mpe-cal-pilule--type { color: #fff; background: #ff00a3; } /* rose MPE plein, comme l'ancienne pastille sur la photo */
.mpe-cal-t-event .mpe-cal-pilule--type { color: #1d47c9; background: #e7eeff; }
.mpe-cal-pilule--attente { color: #000034; background: #ffc53d; } /* jaune vif, comme l'ancienne pastille */
.mpe-cal-pilule--attente svg { flex: none; }

/* 29/11 : titre des cartes en extra-gras (800 au lieu de 700), 20px comme les cartes actualité (18px avant). */
.mpe-cal .mpe-cal-nom { font-size: 20px; font-weight: 800; }
/* 29/11 : marges haut / bas égales (4px) : les capitales sont centrées dans la pastille (mesuré : 6,6 px au-dessus, 6,7 px en dessous),
   le picto horloge aussi (centré par align-items). Le décalage 5px / 3px testé avant mettait le texte trop bas. */

/* ==========================================================================
   29/11 : vue Mois (proto « Calendrier MPE – proposition Liste et Mois »).
   Bascule Liste / Mois dans la barre de filtres ; grille construite par calendrier.js (creerVueMois()).
   Couleurs : course rose MPE, « à confirmer » rose en pointillés, stage marine, événement bleu MPE.
   ========================================================================== */
.mpe-cal-affichages { display: inline-flex; padding: 3px; background: #fff; border: 1px solid var(--cal-bord); border-radius: 999px; }
.mpe-cal button.mpe-cal-affichage {
	appearance: none; display: inline-flex; align-items: center; gap: 6px; margin: 0;
	padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1; letter-spacing: 0; text-transform: none;
	color: var(--cal-doux); background: transparent; border: 0; border-radius: 999px; box-shadow: none; cursor: pointer;
}
.mpe-cal button.mpe-cal-affichage:hover { color: var(--cal-nuit); background: var(--cal-fond); }
.mpe-cal button.mpe-cal-affichage[aria-pressed="true"] { color: #fff; background: var(--cal-nuit); }
.mpe-cal-affichage .mpe-cal-ico { width: 16px; height: 16px; }
/* En vue Mois : pas d'onglets À venir / Passés ni de saison (la grille couvre tout). */
.mpe-cal.is-mois .mpe-cal-vues,
.mpe-cal.is-mois .mpe-cal-saison { display: none; }
.mpe-cal.is-mois .mpe-cal-ligne { justify-content: flex-end; }

.mpe-cal-mois { --rose: #ff00a3; --tbc: #c4007d; position: relative; margin-top: 24px; }
.mpe-cal-mois[hidden] { display: none; }
.mpe-cal .mpe-cal-mois button { font: inherit; letter-spacing: 0; text-transform: none; box-shadow: none; cursor: pointer; }
.mpe-calm-ico { width: 18px; height: 18px; flex: none; }

/* En-tête : ‹ › Mois AAAA ⌄ · Aujourd'hui · légende. */
.mpe-calm-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 16px; }
.mpe-cal .mpe-cal-mois .mpe-calm-nav {
	display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
	color: var(--cal-nuit); background: #fff; border: 1px solid var(--cal-bord); border-radius: 50%;
}
.mpe-cal .mpe-cal-mois .mpe-calm-nav:hover { border-color: var(--cal-nuit); background: #fff; }
.mpe-calm-choisir { position: relative; }
.mpe-cal .mpe-cal-mois .mpe-calm-titre {
	display: inline-flex; align-items: center; gap: 8px; margin: 0 -6px; padding: 4px 8px;
	font-size: clamp(24px, 3vw, 32px); font-weight: 800; line-height: 1.1; color: var(--cal-nuit);
	background: transparent; border: 0; border-radius: 12px;
}
.mpe-cal .mpe-cal-mois .mpe-calm-titre:hover { background: var(--cal-fond); }
.mpe-calm-titre em { font-style: normal; font-weight: 500; color: var(--cal-doux); }
.mpe-calm-chev { width: 22px; height: 22px; color: var(--cal-doux); transition: transform .2s; }
.mpe-calm-titre[aria-expanded="true"] .mpe-calm-chev { transform: rotate(180deg); }
.mpe-cal .mpe-cal-mois .mpe-calm-auj {
	padding: 9px 15px; font-size: 14px; font-weight: 600; line-height: 1;
	color: var(--cal-nuit); background: #fff; border: 1px solid var(--cal-bord); border-radius: 999px;
}
.mpe-cal .mpe-cal-mois .mpe-calm-auj:hover { border-color: var(--cal-nuit); background: #fff; }
.mpe-cal .mpe-calm-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 0 auto; font-size: 13px; color: var(--cal-doux); }
.mpe-calm-legende span { display: inline-flex; align-items: center; gap: 6px; }
.mpe-calm-legende span::before { content: ""; width: 20px; height: 11px; border-radius: 4px; background: var(--rose); }
.mpe-calm-legende .is-tbc::before { background: #fff; border: 1.5px dashed var(--rose); }
.mpe-calm-legende .is-stage::before { background: var(--cal-nuit); }
.mpe-calm-legende .is-event::before { background: var(--cal-bleu); }

/* Liste des mois (clic sur le titre). */
.mpe-calm-panneau {
	position: absolute; z-index: 30; top: calc(100% + 8px); left: -8px;
	width: min(380px, calc(100vw - 32px)); padding: 14px;
	background: #fff; border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 52, .22), 0 2px 8px rgba(0, 0, 52, .08);
}
.mpe-calm-panneau[hidden] { display: none; }
.mpe-cal .mpe-calm-annee { margin: 4px 4px 8px; font-size: 13px; font-weight: 800; color: var(--cal-doux); }
.mpe-cal .mpe-calm-mois-liste + .mpe-calm-annee { margin-top: 14px; }
.mpe-calm-mois-liste { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.mpe-cal .mpe-cal-mois .mpe-calm-choix {
	min-height: 44px; padding: 10px 4px; font-size: 14px; font-weight: 700; line-height: 1;
	color: var(--cal-nuit); background: var(--cal-fond); border: 0; border-radius: 10px;
}
.mpe-cal .mpe-cal-mois .mpe-calm-choix:hover { color: var(--cal-bleu); background: #e3ebfd; }
.mpe-cal .mpe-cal-mois .mpe-calm-choix.is-vide { font-weight: 600; color: #a7b0c0; background: transparent; }
.mpe-cal .mpe-cal-mois .mpe-calm-choix.is-auj { box-shadow: inset 0 0 0 2px var(--cal-bleu); }
.mpe-cal .mpe-cal-mois .mpe-calm-choix.is-actif { color: #fff; background: var(--cal-nuit); }

/* Grille. */
.mpe-calm-grille { overflow: hidden; background: #fff; border: 1px solid var(--cal-bord); border-radius: 16px; }
.mpe-calm-jours, .mpe-calm-sem { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mpe-calm-jours span { padding: 10px 10px 8px; font-size: 12px; font-weight: 700; color: var(--cal-doux); border-bottom: 1px solid var(--cal-bord); }
.mpe-calm-jours span:nth-child(n+6) { background: #f7f9fc; }
.mpe-calm-sem {
	grid-auto-rows: min-content; min-height: 118px; border-bottom: 1px solid var(--cal-bord);
	background:
		repeating-linear-gradient(90deg, transparent 0 calc(100% / 7 - 1px), var(--cal-bord) calc(100% / 7 - 1px) calc(100% / 7)),
		linear-gradient(90deg, transparent calc(500% / 7), #f7f9fc 0);
}
.mpe-calm-sem:last-child { border-bottom: 0; }
.mpe-calm-num { grid-row: 1; display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 4px; font-size: 13px; }
.mpe-calm-num b { font-weight: 700; color: var(--cal-nuit); }
.mpe-calm-num.is-hors b { color: #b3bac8; }
.mpe-calm-num.is-auj b { display: grid; place-items: center; width: 26px; height: 26px; margin: -3px -4px; color: #fff; background: var(--cal-bleu); border-radius: 50%; }
.mpe-cal .mpe-cal-mois .mpe-calm-plus { padding: 2px 5px; font-size: 12px; font-weight: 700; color: var(--cal-bleu); background: transparent; border: 0; border-radius: 6px; }
.mpe-cal .mpe-cal-mois .mpe-calm-plus:hover { background: #e3ebfd; }

.mpe-cal .mpe-cal-mois .mpe-calm-ev {
	display: flex; align-items: center; gap: 6px; min-width: 0; margin: 2px 5px; padding: 4px 8px;
	font-size: 12.5px; font-weight: 600; line-height: 1.3; text-align: left; white-space: nowrap;
	color: #fff; background: var(--rose); border: 1.5px solid transparent; border-radius: 6px;
}
.mpe-calm-ev .mpe-calm-uci { flex: none; font-weight: 800; opacity: .85; }
.mpe-calm-ev .mpe-calm-nom { overflow: hidden; text-overflow: ellipsis; }
/* 29/11 : course seule dans sa case : nom en entier, sur 3 lignes au plus (inc. calendrier.js, is-seul). */
.mpe-cal .mpe-cal-mois .mpe-calm-ev.is-seul { align-items: flex-start; white-space: normal; }
.mpe-calm-ev.is-seul .mpe-calm-nom { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
.mpe-cal .mpe-cal-mois .mpe-calm-ev.is-tbc { color: var(--tbc); background: #fff; border: 1.5px dashed var(--rose); }
.mpe-cal .mpe-cal-mois .mpe-calm-ev.is-stage { background: var(--cal-nuit); }
.mpe-cal .mpe-cal-mois .mpe-calm-ev.is-event { background: var(--cal-bleu); }
.mpe-cal .mpe-cal-mois .mpe-calm-ev.is-other { background: var(--cal-doux); }
.mpe-calm-ev.is-passe { opacity: .72; }
.mpe-calm-ev.is-annule .mpe-calm-nom { text-decoration: line-through; }
.mpe-cal .mpe-cal-mois .mpe-calm-ev.is-suite { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.mpe-cal .mpe-cal-mois .mpe-calm-ev.is-continue { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.mpe-cal .mpe-cal-mois .mpe-calm-ev:hover { opacity: 1; filter: brightness(1.08); }
.mpe-calm-rang { flex: none; margin-left: auto; padding: 0 6px; font-size: 11px; font-weight: 800; color: var(--cal-nuit); background: #fff; border-radius: 999px; }
.mpe-calm-rang sup { font-size: .75em; }
.mpe-calm-aide { margin: 14px 2px 0; font-size: 13px; color: var(--cal-doux); }

/* Petite fenêtre (événement, ou liste du jour pour « +N »). */
.mpe-calm-pop { position: absolute; z-index: 40; width: 340px; overflow: hidden; background: #fff; border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 52, .22), 0 2px 8px rgba(0, 0, 52, .08); }
.mpe-calm-pop-tete { position: relative; padding: 16px 52px 14px 18px; color: #fff; background: var(--rose) center 40% / cover no-repeat; }
.mpe-calm-pop-tete.has-img { padding-top: 70px; }
.mpe-calm-pop-tete.is-tbc { background-color: var(--tbc); }
.mpe-calm-pop-tete.is-stage { background-color: var(--cal-nuit); }
.mpe-calm-pop-tete.is-event { background-color: var(--cal-bleu); }
.mpe-calm-pop-tete.is-other { background-color: var(--cal-doux); }
.mpe-calm-pop-tete .mpe-cal-kick { margin-bottom: 8px; }
.mpe-calm-pop-tete .mpe-cal-pilule--type { color: #fff; background: rgba(255, 255, 255, .22); }
.mpe-cal .mpe-calm-pop-titre { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.15; color: #fff; }
.mpe-cal .mpe-cal-mois .mpe-calm-fermer {
	position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
	color: #fff; background: rgba(255, 255, 255, .22); border: 0; border-radius: 50%;
}
.mpe-calm-fermer .mpe-calm-ico { width: 16px; height: 16px; }
.mpe-calm-pop-corps { padding: 14px 18px 18px; }
.mpe-calm-pop-corps .mpe-cal-info + .mpe-cal-info { margin-top: 6px; }
.mpe-cal .mpe-calm-pop-corps .mpe-cal-info { display: flex; align-items: flex-start; gap: 7px; margin: 0; --fs: 14px; font-size: 14px; line-height: 1.4; color: var(--cal-texte); }
.mpe-calm-pop-corps .mpe-cal-info > .mpe-cal-ico { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--cal-bleu); }
.mpe-cal .mpe-calm-pop-corps .mpe-cal-pied { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--cal-bord); }
.mpe-calm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mpe-cal a.mpe-calm-fiche { display: inline-flex; align-items: center; padding: 10px 18px; font-size: 14px; font-weight: 700; line-height: 1; color: #fff; background: var(--cal-bleu); border-radius: 999px; text-decoration: none; }
.mpe-cal a.mpe-calm-fiche:hover { color: #fff; background: var(--cal-nuit); }
.mpe-cal .mpe-cal-mois .mpe-calm-ics {
	display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; font-size: 13px; font-weight: 600; line-height: 1;
	color: var(--cal-nuit); background: #fff; border: 1px solid var(--cal-bord); border-radius: 999px;
}
.mpe-calm-ics .mpe-calm-ico { width: 16px; height: 16px; color: var(--cal-bleu); }
.mpe-calm-jour-liste { display: grid; gap: 2px; padding: 8px 10px 12px; }
.mpe-cal .mpe-cal-mois .mpe-calm-jour-liste button {
	display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; font-size: 14px; font-weight: 600; text-align: left;
	color: var(--cal-nuit); background: transparent; border: 0; border-radius: 8px;
}
.mpe-cal .mpe-cal-mois .mpe-calm-jour-liste button:hover { background: var(--cal-fond); }
.mpe-calm-jour-liste i, .mpe-calm-points i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--rose); }
.mpe-calm-jour-liste i.is-tbc { background: #fff; border: 2px dashed var(--rose); }
.mpe-calm-jour-liste i.is-stage, .mpe-calm-points i.is-stage { background: var(--cal-nuit); }
.mpe-calm-jour-liste i.is-event, .mpe-calm-points i.is-event { background: var(--cal-bleu); }

/* Mobile : mini-calendrier à points + liste ; la fenêtre s'ouvre en bas d'écran. */
.mpe-calm-mini, .mpe-calm-agenda { display: none; }
@media (max-width: 700px) {
	.mpe-calm-grille, .mpe-calm-legende, .mpe-calm-aide { display: none !important; }
	.mpe-calm-mini, .mpe-calm-agenda { display: block; }
	.mpe-calm-tete { position: relative; }
	.mpe-calm-choisir { position: static; }
	.mpe-calm-panneau { left: 0; right: 0; width: auto; top: 52px; }
	.mpe-calm-mini { padding: 8px; background: #fff; border: 1px solid var(--cal-bord); border-radius: 16px; }
	.mpe-calm-mini-jours, .mpe-calm-mini-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
	.mpe-calm-mini-jours span { padding: 4px 0 6px; font-size: 11px; font-weight: 700; text-align: center; color: var(--cal-doux); }
	.mpe-cal .mpe-cal-mois .mpe-calm-jour {
		display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 48px; padding: 6px 0 8px;
		font-size: 15px; color: var(--cal-nuit); background: transparent; border: 0; border-radius: 12px;
	}
	.mpe-calm-jour b { font-weight: 600; }
	.mpe-cal .mpe-cal-mois .mpe-calm-jour.is-hors { color: #b3bac8; }
	.mpe-cal .mpe-cal-mois .mpe-calm-jour.is-auj b { font-weight: 800; color: var(--cal-bleu); }
	.mpe-cal .mpe-cal-mois .mpe-calm-jour.is-sel { color: #fff; background: var(--cal-nuit); }
	.mpe-cal .mpe-cal-mois .mpe-calm-jour.is-sel b { color: #fff; }
	.mpe-calm-points { display: flex; gap: 3px; height: 6px; }
	.mpe-calm-points i { width: 6px; height: 6px; }
	.mpe-calm-points i.is-tbc { background: var(--rose); }
	.mpe-calm-jour.is-sel .mpe-calm-points i.is-stage { background: #fff; }
	.mpe-cal .mpe-calm-agenda-titre { margin: 20px 0 10px; font-size: 16px; font-weight: 800; color: var(--cal-nuit); }
	.mpe-cal .mpe-cal-mois .mpe-calm-tout { padding: 0 0 0 6px; font-size: 13px; font-weight: 700; color: var(--cal-bleu); background: transparent; border: 0; }
	.mpe-cal .mpe-cal-mois .mpe-calm-ligne {
		display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%;
		margin-bottom: 10px; padding: 10px 12px; text-align: left; color: var(--cal-nuit);
		background: #fff; border: 1px solid var(--cal-bord); border-radius: 14px;
	}
	.mpe-calm-vig {
		display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 52px;
		font-size: 18px; font-weight: 800; line-height: 1.1; color: #fff; background: var(--rose); border-radius: 10px;
	}
	.mpe-calm-vig small { font-size: 10px; font-weight: 700; opacity: .85; }
	.mpe-calm-ligne.is-tbc .mpe-calm-vig { color: var(--tbc); background: #fff; border: 1.5px dashed var(--rose); }
	.mpe-calm-ligne.is-stage .mpe-calm-vig { background: var(--cal-nuit); }
	.mpe-calm-ligne.is-event .mpe-calm-vig { background: var(--cal-bleu); }
	.mpe-calm-ligne.is-other .mpe-calm-vig { background: var(--cal-doux); }
	.mpe-calm-ligne-txt { display: grid; gap: 2px; min-width: 0; }
	.mpe-calm-ligne-txt b { font-size: 15px; font-weight: 800; line-height: 1.25; }
	.mpe-calm-ligne-txt span { font-size: 13px; color: var(--cal-doux); }
	.mpe-calm-ligne.is-annule b { text-decoration: line-through; }
	.mpe-calm-ligne .mpe-calm-rang { color: var(--cal-nuit); background: var(--cal-fond); }
	.mpe-cal .mpe-calm-vide { margin: 0; padding: 20px; text-align: center; color: var(--cal-doux); }
	.mpe-calm-pop { position: fixed; left: 0; right: 0; bottom: 0; top: auto !important; width: auto; max-height: 85vh; overflow: auto; border-radius: 20px 20px 0 0; }
	.mpe-cal-mois.has-pop::after { content: ""; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 52, .4); }
}
@media (prefers-reduced-motion: reduce) { .mpe-calm-chev { transition: none; } }
/* Mobile : bascule Liste / Mois sur sa propre ligne, les types défilent dessous (sinon la bascule était rognée à gauche). */
@media (max-width: 640px) {
	.mpe-cal .mpe-cal-outils { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.mpe-cal-affichages { justify-self: start; }
	.mpe-cal.is-mois .mpe-cal-ligne { justify-content: normal; }
}

/* 29/11 : barre de types fixe ; en Liste, type absent de l'onglet grisé (la barre ne saute plus entre Liste et Mois). */
.mpe-cal button.mpe-cal-type.is-vide,
.mpe-cal button.mpe-cal-type.is-vide:hover { color: #94a3b8; background: #f1f3f7; cursor: default; }

/* 29/11 : petit séparateur vertical entre la bascule Liste / Mois et les types (pas sur mobile, où ils sont empilés). */
@media (min-width: 641px) {
	.mpe-cal-affichages { position: relative; margin-right: 17px; }
	.mpe-cal-affichages::after { content: ""; position: absolute; top: 50%; right: -17px; width: 1px; height: 24px; background: #d5dbe5; transform: translateY(-50%); }
}
