/* Multi Events Calendar. */

.mecal {
	margin: 1.5em 0;
}

.mecal-theme-minimal .mecal-item,
.mecal-theme-minimal .mecal-calendar-day {
	background: transparent;
}

.mecal-theme-editorial .mecal-item,
.mecal-theme-editorial .mecal-calendar-day {
	background: #fffdf8;
	border-color: #d9d0c3;
}

.mecal-theme-contrast .mecal-item,
.mecal-theme-contrast .mecal-calendar-day {
	background: #1d1d1d;
	border-color: #1d1d1d;
	color: #f7f4ef;
}

.mecal-heading {
	margin: 0 0 0.8em;
}

.mecal-notice {
	padding: 0.75em 1em;
	border: 1px dashed #c3c4c7;
	color: #50575e;
}

.mecal-ical {
	margin: -0.25em 0 1em;
}

.mecal-ical-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.42em 0.8em;
	border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
	border-radius: 6px;
	color: inherit;
	font-size: 0.86em;
	font-weight: 600;
	text-decoration: none;
}

.mecal-ical-link::before {
	content: "+";
	font-weight: 800;
}

.mecal-ical-link:hover,
.mecal-ical-link:focus {
	border-color: currentColor;
	text-decoration: none;
}

.mecal-items {
	display: grid;
	gap: 14px;
}

.mecal-view-cards .mecal-items {
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

/* Un seul événement ou deux : colonnes fixes plutôt qu'auto-fit, pour
   éviter qu'une carte isolée s'étire sur toute la largeur (auto-fit
   dilate le seul/dernier item pour combler les pistes vides). */
.mecal-view-cards .mecal-items:has(> .mecal-item:only-child),
.mecal-view-cards .mecal-items:has(> .mecal-item:nth-child(2):last-child) {
	grid-template-columns: repeat(2, minmax(230px, 1fr));
}

/* ----------------------------------------------------------------------
 * Carousel view — a scroll-snapping strip of card items with prev/next
 * controls (MECAL_Renderer::carousel()). JS in mecal-images.js reveals the
 * buttons and scrolls; without JS the strip is still swipeable.
 * ------------------------------------------------------------------- */
.mecal-carousel {
	display: flex;
	align-items: stretch;
	gap: 6px;
	position: relative;
}

.mecal-view-carousel .mecal-items {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding-bottom: 8px;
	scrollbar-width: thin;
	flex: 1 1 auto;
	min-width: 0;
}

.mecal-view-carousel .mecal-item {
	flex: 0 0 min(80vw, 300px);
	scroll-snap-align: start;
}

.mecal-carousel-btn {
	flex: 0 0 auto;
	align-self: center;
	width: 2.2em;
	height: 2.2em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, Canvas 80%, transparent);
	color: inherit;
	font-size: 1.3em;
	line-height: 1;
	cursor: pointer;
}

.mecal-carousel-btn:hover,
.mecal-carousel-btn:focus {
	background: color-mix(in srgb, currentColor 8%, Canvas);
	border-color: color-mix(in srgb, currentColor 40%, transparent);
}

.mecal-item {
	display: grid;
	gap: 14px;
	padding: 16px 0;
	border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.mecal-view-list .mecal-item {
	align-items: start;
}

.mecal-view-list .mecal-item.mecal-has-image {
	grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
}

.mecal-view-list .mecal-item.mecal-no-image {
	grid-template-columns: minmax(0, 1fr);
}

.mecal-view-cards .mecal-item {
	grid-template-rows: auto 1fr;
	padding: 0;
	border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
	border-radius: 8px;
	overflow: hidden;
	background: Canvas;
}

.mecal-view-cards .mecal-item.mecal-no-image {
	grid-template-rows: 1fr;
}

/* Editorial highlight: the left border colour keys on the level, carried by a
   --mecal-feat custom property. See MECAL_Renderer::featured_levels(). */
.mecal-item.is-featured {
	--mecal-feat: #5a8fc2;
	border-left: 4px solid var(--mecal-feat);
	padding-left: 14px;
}

.mecal-item.is-featured-standard {
	--mecal-feat: #5a8fc2;
}

.mecal-item.is-featured-worth {
	--mecal-feat: #d8823a;
}

.mecal-item.is-featured-must,
.mecal-item.is-featured-favorite {
	--mecal-feat: #b2263e;
}

/* Cards already carry their own border; just thicken and colour the left edge. */
.mecal-view-cards .mecal-item.is-featured {
	padding-left: 0;
	border-left-width: 5px;
}

/* Icon-only marker on list / card items — tucked into the body's top-right. */
.mecal-feature-mark {
	float: right;
	margin-left: 0.5em;
	color: var(--mecal-feat, #5a8fc2);
	font-size: 1.15em;
	line-height: 1;
}

.mecal-feature-mark-standard {
	color: #5a8fc2;
}

.mecal-feature-mark-worth {
	color: #d8823a;
}

.mecal-feature-mark-must,
.mecal-feature-mark-favorite {
	color: #b2263e;
}

.mecal-image {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 6px;
}

.mecal-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mecal-body {
	min-width: 0;
}

.mecal-view-cards .mecal-body {
	padding: 14px;
}

.mecal-date {
	display: block;
	margin-bottom: 0.3em;
	font-size: 0.82em;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	opacity: 0.72;
}

/* "New" badge + "added / updated on" line for the recency views. */
.mecal-new-badge {
	display: inline-block;
	margin-bottom: 0.4em;
	padding: 0.1em 0.55em;
	border-radius: 999px;
	background: #1a7f4b;
	color: #fff;
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: middle;
}

.mecal-touched {
	margin: 0 0 0.25em;
	font-size: 0.8em;
	font-weight: 600;
	color: #1a7f4b;
}

/* Festival / cycle badge on list and card items: the same pill as the taxonomy
   tags, in the palette's light blue, at full strength — it announces a coherent
   run of dates, not one more classification. */
.mecal-cycles {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	margin: 0 0 0.4em;
}

.mecal-cycle-badge {
	display: inline-block;
	padding: 0.18em 0.7em;
	border: 1px solid #b0cce8;
	border-radius: 999px;
	background: #f0f5fb;
	color: #1a5c96;
	font-size: 0.82em;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	transition: background 0.12s ease, border-color 0.12s ease;
}

a.mecal-cycle-badge:hover,
a.mecal-cycle-badge:focus {
	background: #b0cce8;
	border-color: #5a8fc2;
	text-decoration: none;
}

.mecal-title {
	margin: 0;
	font-size: 1.08em;
	line-height: 1.3;
}

.mecal-title a {
	color: inherit;
	text-decoration: none;
}

.mecal-title a:hover,
.mecal-title a:focus {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mecal-meta,
.mecal-classifications,
.mecal-artists,
.mecal-ensembles,
.mecal-direction,
.mecal-excerpt {
	margin: 0.45em 0 0;
	line-height: 1.45;
}

.mecal-meta {
	font-size: 0.92em;
	opacity: 0.75;
}

.mecal-classifications {
	color: #456987;
	font-size: 0.82em;
	font-weight: 600;
}

.mecal-artists {
	font-size: 0.92em;
	font-style: italic;
	font-weight: 400;
}

.mecal-ensembles,
.mecal-direction {
	font-size: 0.88em;
	opacity: 0.82;
}

.mecal-status {
	display: inline-flex;
	margin: 0 0 0.55em;
	padding: 0.3em 0.65em;
	border-radius: 999px;
	background: #5f6b78;
	color: #fff;
	font-size: 0.75em;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.mecal-status-sold_out {
	background: #755b24;
}

.mecal-status-cancelled {
	background: #9d2f2f;
}

.mecal-status-postponed,
.mecal-status-rescheduled,
.mecal-status-program_changed {
	background: #80501c;
}

/* Editorial-highlight badge on the single event page (glyph + label + note). */
.mecal-feature-badge {
	--mecal-feat: #5a8fc2;
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.15em 0.5em;
	margin: 0 0 0.7em;
	padding: 0.35em 0.8em;
	border: 1px solid color-mix(in srgb, var(--mecal-feat) 35%, transparent);
	border-radius: 999px;
	background: color-mix(in srgb, var(--mecal-feat) 12%, transparent);
	color: color-mix(in srgb, var(--mecal-feat) 82%, #000);
}

.mecal-feature-badge-standard {
	--mecal-feat: #5a8fc2;
}

.mecal-feature-badge-worth {
	--mecal-feat: #d8823a;
}

.mecal-feature-badge-must,
.mecal-feature-badge-favorite {
	--mecal-feat: #b2263e;
}

.mecal-feature-badge-icon {
	font-size: 1.1em;
	line-height: 1;
}

.mecal-feature-badge-label {
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	font-size: 0.82em;
}

.mecal-feature-badge-note {
	opacity: 0.85;
	font-size: 0.85em;
}

.mecal-accessibility-badges {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.35em;
	margin-top: 0.45em;
}

.mecal-accessibility-badge {
	display: inline-grid;
	min-width: 1.85em;
	min-height: 1.85em;
	place-items: center;
	padding: 0.15em 0.35em;
	border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
	border-radius: 5px;
	font-size: 0.72em;
	font-weight: 750;
}

.mecal-excerpt {
	font-size: 0.95em;
}

.mecal-read-more {
	font-weight: 600;
	white-space: nowrap;
}

.mecal-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 8px;
	width: 100%;
}

.mecal-calendar-week {
	grid-template-columns: repeat(7, minmax(132px, 1fr));
	min-width: 960px;
}

.mecal-calendar-month {
	grid-template-columns: repeat(7, minmax(126px, 1fr));
	min-width: 930px;
}

.mecal-calendar-weekday {
	padding: 0.2em 0.1em 0.45em;
	font-size: 0.74em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-align: center;
	opacity: 0.6;
	border-bottom: 2px solid color-mix(in srgb, currentColor 18%, transparent);
}

.mecal-calendar-day {
	min-height: 148px;
	padding: 10px;
	border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
	border-radius: 6px;
}

.mecal-calendar-day.is-blank {
	min-height: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.mecal-calendar-date {
	margin: 0 0 0.6em;
	font-size: 0.82em;
	text-transform: uppercase;
	opacity: 0.7;
}

.mecal-calendar-date a {
	color: inherit;
	text-decoration: none;
}

.mecal-calendar-date a:hover,
.mecal-calendar-date a:focus {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mecal-calendar-event {
	display: block;
	margin: 0.35em 0 0;
	padding: 0.45em 0.55em;
	border-left: 3px solid color-mix(in srgb, currentColor 28%, transparent);
	border-radius: 4px;
	background: color-mix(in srgb, currentColor 5%, transparent);
	color: inherit;
	font-size: 0.9em;
	line-height: 1.35;
	text-decoration: none;
}

.mecal-calendar-event span {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mecal-calendar-event.is-featured {
	--mecal-feat: #5a8fc2;
	border-left-width: 4px;
	border-color: var(--mecal-feat);
}

.mecal-calendar-event.is-featured-standard {
	--mecal-feat: #5a8fc2;
}

.mecal-calendar-event.is-featured-worth {
	--mecal-feat: #d8823a;
}

.mecal-calendar-event.is-featured-must,
.mecal-calendar-event.is-featured-favorite {
	--mecal-feat: #b2263e;
}

.mecal-calendar-event-mark {
	display: inline !important;
	color: var(--mecal-feat, #5a8fc2);
	font-weight: 700;
}

.mecal-calendar-event time {
	display: block;
	margin-bottom: 0.1em;
	font-size: 0.78em;
	opacity: 0.72;
}

.mecal-calendar-more {
	display: inline-block;
	margin-top: 0.45em;
	font-size: 0.82em;
	font-weight: 700;
	text-decoration: none;
}

.mecal-template {
	box-sizing: border-box;
	width: min(100%, 1120px);
	max-width: none !important;
	margin: 0 auto;
	padding: 2rem 1.25rem;
}

.mecal-template-full {
	width: 100%;
	max-width: 100% !important;
}

.mecal-index {
	margin: 2rem 0;
}

.mecal-index-sections {
	display: grid;
	grid-template-columns: repeat(var(--mecal-index-columns, 3), minmax(0, 1fr));
	gap: 1.25rem;
}

.mecal-index-section {
	border-top: 1px solid #d8dee4;
	padding-top: 1rem;
}

.mecal-index-heading {
	font-size: 0.95rem;
	margin: 0 0 0.75rem;
	text-transform: uppercase;
}

.mecal-index-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mecal-index-list .mecal-index-list {
	border-left: 1px solid #d8dee4;
	margin: 0.45rem 0 0.45rem 0.6rem;
	padding-left: 0.75rem;
}

.mecal-index-item {
	margin: 0.25rem 0;
}

.mecal-index-row {
	align-items: center;
	display: flex;
	gap: 0.4rem;
}

.mecal-index-item a {
	align-items: center;
	color: inherit;
	display: flex;
	flex: 1 1 auto;
	gap: 0.5rem;
	justify-content: space-between;
	text-decoration: none;
}

.mecal-index-item a:hover span {
	text-decoration: underline;
}

.mecal-index-item mark {
	background: #f2f4f7;
	border-radius: 999px;
	color: #57606a;
	font-size: 0.75rem;
	padding: 0.05rem 0.45rem;
}

.mecal-index-autocomplete {
	padding: 0.25rem 0.25rem 1rem;
}

.mecal-index-autocomplete input[type="search"] {
	box-sizing: border-box;
	max-width: 32rem;
	width: 100%;
}

.mecal-index-ac-hint {
	color: #57606a;
	font-size: 0.82rem;
	margin: 0.35rem 0;
}

.mecal-index-ac-results {
	list-style: none;
	margin: 0.5rem 0 0;
	max-width: 32rem;
	padding: 0;
}

.mecal-index-ac-results li {
	border-top: 1px solid #e3e8ed;
}

.mecal-index-ac-results a {
	align-items: center;
	color: inherit;
	display: flex;
	gap: 0.75rem;
	justify-content: space-between;
	padding: 0.5rem 0.15rem;
	text-decoration: none;
}

.mecal-index-ac-results a:hover span,
.mecal-index-ac-results a:focus span {
	text-decoration: underline;
}

.mecal-index-ac-results mark {
	background: #f0f5fb;
	border-radius: 999px;
	color: #1a5c96;
	font-size: 0.72rem;
	padding: 0.05rem 0.45rem;
}

/* ----------------------------------------------------------------------
 * Archive "Explore" block — a collapsible index at the foot of the agenda
 * archive that surfaces the routed term archives (see MECAL_Templates).
 * ------------------------------------------------------------------- */
.mecal-archive-explore {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 2px solid #b0cce8;
}

.mecal-archive-explore .mecal-index {
	margin: 0;
}

.mecal-index-sections.is-collapsible {
	display: block;
	gap: 0;
}

.mecal-index-sections.is-collapsible .mecal-index-section {
	border-top: 1px solid #d8dee4;
	padding: 0;
}

.mecal-index-sections.is-collapsible summary.mecal-index-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin: 0;
	padding: 0.75rem 0.25rem;
	cursor: pointer;
	list-style: none;
}

.mecal-index-sections.is-collapsible summary.mecal-index-heading::-webkit-details-marker {
	display: none;
}

.mecal-index-sections.is-collapsible summary.mecal-index-heading::after {
	content: "+";
	flex: 0 0 auto;
	font-weight: 400;
	color: #5a8fc2;
	transition: transform 0.12s ease;
}

.mecal-index-sections.is-collapsible details[open] > summary.mecal-index-heading::after {
	content: "−";
}

.mecal-index-sections.is-collapsible summary.mecal-index-heading:hover {
	color: #1a5c96;
}

.mecal-index-count {
	background: #f0f5fb;
	border: 1px solid #b0cce8;
	border-radius: 999px;
	color: #1a5c96;
	font-size: 0.72rem;
	font-weight: 600;
	margin-left: auto;
	padding: 0.05rem 0.5rem;
}

.mecal-index-sections.is-collapsible .mecal-index-list {
	padding: 0 0.25rem 1rem;
}

.mecal-archive-template {
	overflow-x: clip;
}

.mecal-archive-template .mecal-view-week,
.mecal-archive-template .mecal-view-month {
	max-width: 100%;
	overflow-x: auto;
	padding-bottom: 0.5rem;
	scrollbar-gutter: stable;
}

.mecal-single-header {
	display: grid;
	gap: clamp(1.25rem, 4vw, 3rem);
	align-items: start;
	margin-bottom: 2rem;
}

.mecal-single-header.mecal-has-image {
	grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
}

.mecal-single-header.mecal-no-image {
	grid-template-columns: minmax(0, 1fr);
}

.mecal-single-image {
	margin: 0;
}

.mecal-single-image img {
	display: block;
	width: 100%;
	border-radius: 8px;
	object-fit: cover;
}

.mecal-single-title,
.mecal-archive-title {
	margin: 0 0 0.7em;
}

.mecal-meta-list {
	display: grid;
	gap: 0.65em;
	margin: 1rem 0;
}

.mecal-meta-list div {
	display: grid;
	grid-template-columns: minmax(110px, 0.35fr) 1fr;
	gap: 1em;
	padding-bottom: 0.65em;
	border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.mecal-meta-list dt {
	font-size: 0.78em;
	font-weight: 700;
	text-transform: uppercase;
	opacity: 0.65;
}

.mecal-meta-list dd {
	margin: 0;
}

.mecal-technical-metadata {
	display: grid;
	gap: 0.5rem;
	margin: 2rem 0 1rem;
	padding-top: 1rem;
	border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}

.mecal-technical-detail {
	font-size: 0.88em;
	opacity: 0.82;
}

.mecal-technical-detail summary {
	cursor: pointer;
	font-weight: 650;
}

.mecal-technical-detail p {
	margin: 0.45em 0 0;
}

.mecal-status-details {
	margin: 0.4em 0 0.9em;
}

.mecal-status-details summary {
	color: color-mix(in srgb, currentColor 65%, transparent);
	font-weight: 600;
}

/* Instruments, unfolded: a visible row of links rather than a closed drawer. */
.mecal-instruments-inline {
	font-size: 0.9em;
	line-height: 1.7;
}

.mecal-instruments-label {
	font-weight: 650;
	opacity: 0.75;
}

.mecal-instruments-inline .mecal-instrument-sep {
	opacity: 0.5;
}

/* ── Étiquettes de classification ───────────────────────────────────────────
   Mêmes graphismes et mêmes couleurs que les fiches d'annuaire : un genre doit
   se reconnaître d'une surface à l'autre. Les couleurs viennent de
   MECAL_Colors et arrivent par les variables --g (franc) et --gbg (pastel). */
.mecal-taxo-tags {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
}

.mecal-taxo-tag {
	font-size: 0.68em;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #5a8fc2;
	border: 1px solid #b0cce8;
	padding: 0.2em 0.55em;
	text-decoration: none;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.mecal-taxo-tag:hover {
	background: #5a8fc2;
	border-color: #5a8fc2;
	color: #fff;
}

.mecal-taxo-tag.has-color {
	background: var(--gbg);
	border-color: var(--g);
	color: #33302f;
}

.mecal-taxo-tag.has-color:hover {
	background: var(--g);
	border-color: var(--g);
	color: #fff;
}

.mecal-taxo-tag.genre-grand {
	font-weight: 600;
	padding-left: 0.65em;
	border-left: 3px solid #b0cce8;
}

.mecal-taxo-tag.genre-grand.has-color {
	border-left: 3px solid var(--g);
}

.mecal-taxo-tag .genre-lignee {
	text-transform: none;
	letter-spacing: 0;
	font-weight: 600;
	opacity: 0.65;
	margin-right: 0.15em;
}

/* Thématiques transversales : accent violet, forme pilule — distinctes des
   genres, comme dans l'annuaire. */
.mecal-taxo-tag.thematique {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	font-size: 0.78em;
	letter-spacing: normal;
	text-transform: none;
	color: #5d4e8c;
	border: 1px solid #d3c8ea;
	background: #f5f1fb;
	border-radius: 999px;
	padding: 0.25em 0.75em 0.25em 0.55em;
}

.mecal-taxo-tag.thematique:hover {
	background: #7a6cb0;
	border-color: #7a6cb0;
	color: #fff;
}

.mecal-taxo-tag.thematique:hover .thematique-pastille {
	background: #fff;
}

.mecal-taxo-tag .thematique-pastille {
	display: inline-block;
	width: 0.5em;
	height: 0.5em;
	border-radius: 50%;
	background: #7a6cb0;
	flex-shrink: 0;
}

.mecal-event-button {
	display: inline-flex;
	align-items: center;
	margin-top: 0.5rem;
	padding: 0.62em 1em;
	border-radius: 6px;
	background: #1f3148;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.mecal-event-button:hover,
.mecal-event-button:focus {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mecal-single-content {
	max-width: 760px;
}

.mecal-single-details {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 2rem;
}

.mecal-detail-card {
	border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent);
	padding-top: 1rem;
}

.mecal-detail-card h2 {
	font-size: 1.1rem;
	margin: 0 0 0.75rem;
}

.mecal-detail-card address {
	font-style: normal;
	line-height: 1.55;
}

.mecal-detail-card address span {
	display: block;
}

.mecal-detail-card dl {
	display: grid;
	gap: 0.6rem;
	margin: 0;
}

.mecal-detail-card dl div {
	display: grid;
	gap: 0.35rem;
	grid-template-columns: minmax(80px, 0.3fr) 1fr;
}

.mecal-detail-card dt {
	font-size: 0.78em;
	font-weight: 700;
	text-transform: uppercase;
	opacity: 0.65;
}

.mecal-detail-card dd {
	margin: 0;
}

.mecal-map {
	margin-top: 1rem;
}

.mecal-map iframe {
	width: 100%;
	min-height: 320px;
	border: 0;
	border-radius: 8px;
}

.mecal-archive-header {
	margin-bottom: 1.5rem;
}

/* ── Bloc « Affichage et période » ───────────────────────────────────
   Les rangées de pastilles flottaient sans cadre ni titre, après deux
   blocs bleus encadrés : l'œil ne voyait plus une commande mais un
   reliquat. Un vert d'eau les rassemble — assez proche des bleus pour
   rester de la même famille, assez distinct pour dire qu'on a changé de
   registre : on ne filtre plus, on règle l'affichage. */
.mecal-archive-controls {
	margin: 1.25rem 0;
	padding: 0.9rem 1.1rem 1rem;
	border: 1px solid #cde3dc;
	border-radius: 8px;
	background: #f2f8f6;
	color: #2f5f55;
}

.mecal-archive-controls-title {
	margin: 0 0 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #dceae5;
	font-size: 0.74em;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #2f7566;
}

/* Une rangée = une étiquette + ses pastilles. L'étiquette reprend
   l'`aria-label` que la rangée portait déjà : ce que les lecteurs
   d'écran savaient depuis toujours devient visible. */
.mecal-control-row {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.25rem 0.75rem;
	padding: 0.3rem 0;
}

.mecal-control-row + .mecal-control-row {
	border-top: 1px dotted #dceae5;
}

.mecal-control-label {
	flex: 0 0 8.5rem;
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6f9a90;
}

.mecal-archive-controls .mecal-archive-toggles {
	flex: 1 1 18rem;
	margin: 0;
}

/* Pastilles : le vert d'eau remplace le `currentColor` hérité du thème,
   qui rendait des bordures grisâtres sans rapport avec le bloc. */
.mecal-archive-controls .mecal-archive-toggles a,
.mecal-archive-controls .mecal-archive-toggles span {
	border-color: #cde3dc;
	background: #fff;
	color: #39796b;
	font-size: 0.85em;
}

.mecal-archive-controls .mecal-archive-toggles a:hover {
	border-color: #8fc2b4;
	background: #e4f1ec;
	color: #24564b;
}

.mecal-archive-controls .mecal-archive-toggles span.is-active {
	background: #39796b;
	border-color: #39796b;
	color: #fff;
}

/* La rangée des mises en avant garde ses couleurs éditoriales : elles
   disent un niveau, pas un état d'interface. */
.mecal-archive-controls .mecal-highlight-toggles span.is-active:not(.is-highlight-all) {
	background: color-mix(in srgb, var(--mecal-feat, #5a8fc2) 14%, transparent);
	border-color: var(--mecal-feat, #5a8fc2);
	color: color-mix(in srgb, var(--mecal-feat, #5a8fc2) 82%, #000);
}

/* Ligne des réglages : date de début et nombre par page. */
.mecal-archive-controls .mecal-list-controls {
	gap: 0.4rem 1.1rem;
	margin-top: 0.3rem;
	padding-top: 0.7rem;
	border-top: 1px solid #dceae5;
}

.mecal-archive-controls .mecal-list-controls label {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.85em;
}

.mecal-archive-controls .mecal-list-controls label span {
	font-size: 0.85em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6f9a90;
}

.mecal-archive-controls .mecal-list-controls input[type="date"],
.mecal-archive-controls .mecal-list-controls select {
	padding: 0.3em 0.5em;
	border: 1px solid #cde3dc;
	border-radius: 6px;
	background: #fff;
	color: #2f5f55;
	font: inherit;
	font-size: 0.95em;
}

.mecal-archive-controls .mecal-list-controls button {
	border-color: #8fc2b4;
	background: #39796b;
	color: #fff;
	font-size: 0.85em;
}

.mecal-archive-controls .mecal-list-controls button:hover {
	background: #2b6155;
	border-color: #2b6155;
}

@media (max-width: 640px) {
	.mecal-control-label {
		flex-basis: 100%;
	}
}

.mecal-archive-toggles {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.75rem 0;
}

.mecal-archive-toggles a,
.mecal-archive-toggles span {
	display: inline-flex;
	padding: 0.38em 0.75em;
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: 999px;
	color: inherit;
	font-size: 0.88em;
	line-height: 1.3;
	text-decoration: none;
}

.mecal-archive-toggles span.is-active {
	background: color-mix(in srgb, currentColor 9%, transparent);
	border-color: color-mix(in srgb, currentColor 40%, transparent);
	font-weight: 700;
}

/* Editorial-highlight toggle bar: the active pill takes the level's colour. */
.mecal-highlight-toggles .is-highlight-favorite,
.mecal-highlight-toggles .is-highlight-must {
	--mecal-feat: #b2263e;
}

.mecal-highlight-toggles .is-highlight-worth {
	--mecal-feat: #d8823a;
}

.mecal-highlight-toggles .is-highlight-featured {
	--mecal-feat: #5a8fc2;
}

.mecal-highlight-toggles span.is-active:not(.is-highlight-all) {
	background: color-mix(in srgb, var(--mecal-feat, #5a8fc2) 14%, transparent);
	border-color: var(--mecal-feat, #5a8fc2);
	color: color-mix(in srgb, var(--mecal-feat, #5a8fc2) 82%, #000);
}

.mecal-highlight-toggles a:hover {
	border-color: color-mix(in srgb, var(--mecal-feat, currentColor) 55%, transparent);
}

.mecal-period-nav,
.mecal-per-page,
.mecal-period-picker {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.mecal-period-nav {
	margin: 0.5rem 0 1rem;
}

.mecal-period-nav > a,
.mecal-period-picker button,
.mecal-per-page button {
	appearance: none;
	background: transparent;
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: 999px;
	color: inherit;
	cursor: pointer;
	font: inherit;
	letter-spacing: 0;
	line-height: 1.3;
	padding: 0.38em 0.75em;
	text-decoration: none;
	text-transform: none;
}

.mecal-period-nav > a:hover,
.mecal-period-picker button:hover,
.mecal-per-page button:hover {
	background: color-mix(in srgb, currentColor 6%, transparent);
	border-color: color-mix(in srgb, currentColor 38%, transparent);
}

.mecal-period-nav strong {
	margin: 0 0.25rem;
}

.mecal-period-picker label,
.mecal-per-page label {
	align-items: center;
	display: inline-flex;
	gap: 0.45rem;
}

.mecal-period-picker input,
.mecal-per-page select {
	max-width: 11rem;
}

.mecal-per-page {
	margin-top: 0.75rem;
}

/* ----------------------------------------------------------------------
 * Compact pagination — WordPress core paginate_links() markup
 * (.page-numbers) plus a "go to page…" field (see MECAL_Renderer).
 * ------------------------------------------------------------------- */
.mecal-results-summary {
	margin: 0 0 0.8rem;
	font-size: 0.9em;
	opacity: 0.7;
}

.mecal-pagination {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.mecal-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	max-width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
}

.mecal-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.2em;
	padding: 0.38em 0.7em;
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: 999px;
	color: inherit;
	line-height: 1.3;
	text-decoration: none;
}

.mecal-pagination a.page-numbers:hover,
.mecal-pagination a.page-numbers:focus {
	background: color-mix(in srgb, currentColor 6%, transparent);
	border-color: color-mix(in srgb, currentColor 38%, transparent);
}

.mecal-pagination .page-numbers.current {
	background: #1a5c96;
	border-color: #1a5c96;
	color: #fff;
	font-weight: 700;
}

.mecal-pagination .page-numbers.dots {
	min-width: 0;
	padding-inline: 0.15em;
	border-color: transparent;
}

.mecal-pagination-jump {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9em;
}

.mecal-pagination-jump label {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.mecal-pagination-jump input[type="number"] {
	width: 5em;
	padding: 0.3em 0.4em;
	border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
	border-radius: 6px;
	background: transparent;
	color: inherit;
	font: inherit;
}

.mecal-pagination-jump button {
	appearance: none;
	padding: 0.35em 0.85em;
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.mecal-pagination-jump button:hover {
	background: color-mix(in srgb, currentColor 6%, transparent);
}

@media (max-width: 760px) {
	.mecal-single-header,
	.mecal-single-header.mecal-has-image,
	.mecal-single-header.mecal-no-image,
	.mecal-view-list .mecal-item,
	.mecal-view-list .mecal-item.mecal-has-image,
	.mecal-view-list .mecal-item.mecal-no-image,
	.mecal-meta-list div,
	.mecal-single-details,
	.mecal-detail-card dl div {
		grid-template-columns: 1fr;
	}

	.mecal-index-sections {
		grid-template-columns: 1fr;
	}

	.mecal-template-full {
		width: 100%;
	}
}

/* ----------------------------------------------------------------------
 * Search block: an always-visible calendar pill bar sitting on top of the
 * search form, and the removable active-filter chips below it.
 * See MECAL_Search::form() / calendar_bar() / active_filters_bar().
 * ------------------------------------------------------------------- */
.mecal-search-block {
	margin: 0 0 1.2em;
}

.mecal-search-block .mecal-search-form {
	margin: 0;
}

.mecal-calendar-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	padding: 0.85em 1em;
	border: 1px solid #d9e2ee;
	border-bottom: 0;
	border-radius: 8px 8px 0 0;
	background: #e7eef7;
}

.mecal-calendar-bar + .mecal-search-form {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

.mecal-cal-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.32em 0.85em;
	border: 1px solid #b0cce8;
	border-radius: 999px;
	background: #fff;
	color: #1a5c96;
	font-size: 0.85em;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.mecal-cal-pill:hover,
.mecal-cal-pill:focus {
	background: #b0cce8;
	color: #12456f;
}

.mecal-cal-pill.is-active {
	background: #1a5c96;
	border-color: #1a5c96;
	color: #fff;
}

.mecal-cal-pill-all {
	font-weight: 700;
}

.mecal-cal-pill-all:not(.is-active) {
	background: transparent;
	border-style: dashed;
}

/* ── Raccourcis éditoriaux ───────────────────────────────────────────
   Violet, comme les thématiques de l'annuaire : un raccourci croise les
   axes au lieu d'en suivre un seul, et la couleur le dit avant le
   libellé. Le bleu est pris par les calendriers, qui sont un axe. */
.mecal-shortcuts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin: 0.6rem 0 0;
}

.mecal-shortcuts-all {
	margin: 0.6rem 0 0.2rem;
}

.mecal-shortcuts-label {
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #8d82b3;
	margin-right: 0.2rem;
}

.mecal-shortcut-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	padding: 0.32em 0.8em;
	border: 1px solid #d3c8ea;
	border-radius: 999px;
	background: #f5f1fb;
	color: #5d4e8c;
	font-size: 0.85em;
	line-height: 1.3;
	text-decoration: none;
	transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.mecal-shortcut-pill::before {
	content: "↳";
	opacity: 0.55;
}

.mecal-shortcut-pill:hover,
.mecal-shortcut-pill:focus {
	background: #e7defa;
	border-color: #b4a4dc;
	color: #4a3c75;
}

.mecal-shortcut-pill.is-active {
	background: #7a6cb0;
	border-color: #7a6cb0;
	color: #fff;
	font-weight: 600;
}

.mecal-shortcut-pill.is-active::before {
	opacity: 0.8;
}

/* Count badge on the collapsed "Filters" summary. */
.mecal-search-advanced-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5em;
	padding: 0 0.4em;
	border-radius: 999px;
	background: #1a5c96;
	color: #fff;
	font-size: 0.85em;
	font-weight: 700;
	line-height: 1.6;
}

/* Active-filter chips (calendar excluded — the bar covers it). */
.mecal-active-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em;
	margin-top: 0.7em;
}

.mecal-active-filters-label {
	font-size: 0.8em;
	font-weight: 600;
	color: #50575e;
}

.mecal-filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.25em 0.7em;
	border: 1px solid #b0cce8;
	border-radius: 999px;
	background: #f0f5fb;
	color: #1a5c96;
	font-size: 0.82em;
	text-decoration: none;
}

.mecal-filter-chip:hover {
	background: #b0cce8;
}

.mecal-filter-chip-x {
	font-weight: 700;
	opacity: 0.7;
}

.mecal-filter-chip.is-clear-all {
	background: transparent;
	border-style: dashed;
	font-weight: 600;
}

/* Archive header: back-to-agenda button + concert-map button + breadcrumb. */
.mecal-archive-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em 0.5em;
	margin-bottom: 0.6rem;
}

.mecal-archive-home {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	padding: 0.35em 0.9em;
	border: 1px solid #b0cce8;
	border-radius: 999px;
	background: #f0f5fb;
	color: #1a5c96;
	font-size: 0.86em;
	font-weight: 600;
	text-decoration: none;
}

.mecal-archive-home:hover,
.mecal-archive-home:focus {
	background: #b0cce8;
}

.mecal-archive-home-arrow {
	font-size: 1.15em;
	line-height: 1;
}

/* Concert-map button: lighter (ghost) than the back button so it stays discreet. */
.mecal-archive-map {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.35em 0.85em;
	border: 1px solid #b0cce8;
	border-radius: 999px;
	background: transparent;
	color: #1a5c96;
	font-size: 0.86em;
	font-weight: 600;
	text-decoration: none;
}

.mecal-archive-map:hover,
.mecal-archive-map:focus {
	background: #f0f5fb;
	border-color: #1a5c96;
}

.mecal-archive-map-icon {
	display: inline-flex;
	font-size: 1.05em;
	line-height: 1;
}

.mecal-archive-map-label {
	white-space: nowrap;
}

.mecal-archive-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em 0.5em;
	margin-bottom: 0.7rem;
	font-size: 0.86em;
	color: #50575e;
}

.mecal-archive-breadcrumb a {
	color: #1a5c96;
	text-decoration: none;
}

.mecal-archive-breadcrumb a:hover {
	text-decoration: underline;
}

/* Search form. */
.mecal-search-form {
	margin: 0 0 1.2em;
	padding: 1em;
	border: 1px solid #d9e2ee;
	border-radius: 8px;
	background: #f0f5fb;
}

.mecal-search-fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9em, 1fr));
	gap: 0.75em 1em;
	align-items: end;
}

.mecal-search-form label {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
	margin: 0;
	font-size: 0.82em;
	font-weight: 600;
	color: #1a5c96;
}

.mecal-search-form input,
.mecal-search-form select {
	box-sizing: border-box;
	width: 100%;
	height: 2.5em;
	padding: 0.4em 0.55em;
	border: 1px solid #b0cce8;
	border-radius: 6px;
	font-size: 0.95em;
	font-weight: 400;
	background: #fff;
}

.mecal-search-keyword {
	grid-column: 1 / -1;
}

.mecal-search-actions {
	display: flex;
	gap: 0.6em;
	align-items: center;
	margin-top: 0.85em;
}

.mecal-search-submit {
	padding: 0.5em 1.2em;
	border: none;
	border-radius: 6px;
	background: #1a5c96;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.mecal-search-submit:hover {
	background: #5a8fc2;
}

.mecal-search-reset {
	font-size: 0.85em;
	color: #50575e;
	text-decoration: underline;
}

/* ----------------------------------------------------------------------
 * Saved searches (localStorage profiles) — built by mecal-search.js
 * ------------------------------------------------------------------- */
.mecal-search-profiles {
	margin-top: 0.85em;
	padding-top: 0.7em;
	border-top: 1px solid #d9e2ee;
}

/* Recherches enregistrées : repliées, pour ne plus être prises pour la
   barre de recherche qu'elles suivent. Même grammaire que « Filtres ». */
.mecal-profiles-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	width: fit-content;
	padding: 0.3em 0.2em;
	font-size: 0.82em;
	font-weight: 600;
	color: #1a5c96;
	cursor: pointer;
	list-style: none;
}

.mecal-profiles-toggle::-webkit-details-marker {
	display: none;
}

.mecal-profiles-toggle::after {
	content: "+";
	font-weight: 700;
	color: #5a8fc2;
}

.mecal-profiles-fold[open] .mecal-profiles-toggle::after {
	content: "\2212";
}

.mecal-profiles-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5em;
	padding: 0 0.4em;
	border-radius: 999px;
	background: #1a5c96;
	color: #fff;
	font-size: 0.85em;
	font-weight: 700;
	line-height: 1.6;
}

.mecal-profiles-fold[open] .mecal-profiles-row {
	margin-top: 0.6em;
}

.mecal-profiles-row,
.mecal-profiles-save-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	align-items: center;
}

.mecal-profiles-save-form {
	margin-top: 0.5em;
}

.mecal-profiles-pick {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font-size: 0.85em;
	color: #50575e;
}

.mecal-profiles-select,
.mecal-profiles-name {
	padding: 0.3em 0.5em;
	border: 1px solid #b0cce8;
	border-radius: 6px;
	background: #fff;
}

.mecal-search-profiles button {
	padding: 0.35em 0.8em;
	border: 1px solid #b0cce8;
	border-radius: 6px;
	background: #f0f5fb;
	color: #1a5c96;
	font-size: 0.85em;
	cursor: pointer;
}

.mecal-search-profiles button:hover:not(:disabled) {
	background: #b0cce8;
}

.mecal-search-profiles button:disabled {
	opacity: 0.5;
	cursor: default;
}

.mecal-profiles-save {
	margin-left: auto;
}

.mecal-search-results {
	margin-top: 1em;
}

.mecal-search-form.is-compact .mecal-search-fields {
	grid-template-columns: 1fr;
}

/* Collapsible mode: keyword bar stays out, facets fold into a panel. */
.mecal-search-form.is-collapsible .mecal-search-fields {
	margin: 0;
}

.mecal-search-advanced {
	margin-top: 0.85em;
}

.mecal-search-advanced-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	width: fit-content;
	padding: 0.3em 0.2em;
	font-size: 0.82em;
	font-weight: 600;
	color: #1a5c96;
	cursor: pointer;
	list-style: none;
}

.mecal-search-advanced-toggle::-webkit-details-marker {
	display: none;
}

.mecal-search-advanced-toggle::after {
	content: "+";
	font-weight: 700;
	color: #5a8fc2;
}

.mecal-search-advanced[open] .mecal-search-advanced-toggle::after {
	content: "\2212";
}

.mecal-search-advanced-fields {
	margin-top: 0.75em;
}

@media (max-width: 600px) {
	.mecal-search-fields {
		grid-template-columns: 1fr;
	}
}

/* Checkbox facets (genres, regions): span the row, scroll if long. */
.mecal-search-facet-checkbox {
	grid-column: 1 / -1;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.mecal-search-facet-checkbox legend {
	padding: 0;
	margin-bottom: 0.35em;
	font-size: 0.82em;
	font-weight: 600;
	color: #1a5c96;
}

.mecal-search-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3em 1em;
	max-height: 9em;
	overflow-y: auto;
	padding: 0.2em 0.1em;
}

.mecal-search-check {
	flex-direction: row !important;
	align-items: center;
	gap: 0.4em !important;
	font-weight: 400 !important;
	color: #333 !important;
	white-space: nowrap;
}

.mecal-search-check input[type="checkbox"] {
	width: auto;
	height: auto;
	margin: 0;
}

/* Autocomplete facets (artists, venues): suggestion dropdown. */
.mecal-search-facet-autocomplete {
	position: relative;
}

.mecal-ac-list {
	position: absolute;
	z-index: 30;
	top: 100%;
	left: 0;
	right: 0;
	margin: 0.15em 0 0;
	padding: 0;
	list-style: none;
	max-height: 14em;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #b0cce8;
	border-radius: 6px;
	box-shadow: 0 4px 14px rgba(26, 92, 150, 0.15);
}

.mecal-ac-item {
	padding: 0.4em 0.6em;
	font-size: 0.92em;
	font-weight: 400;
	color: #333;
	cursor: pointer;
}

.mecal-ac-item:hover,
.mecal-ac-item.is-active {
	background: #f0f5fb;
	color: #1a5c96;
}

/* ----------------------------------------------------------------------
 * Champs à suggestions multiples (0.47.0)
 *
 * Une boîte unique contient les jetons choisis puis le champ de saisie, qui
 * prend la place restante : elle se lit comme un seul champ et grandit en
 * hauteur avec les valeurs.
 * ------------------------------------------------------------------- */
.mecal-search-facet-autocomplete.is-multi {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
	min-width: 0;
}

.mecal-search-form .mecal-ac-label {
	display: block;
	font-size: 0.82em;
	font-weight: 600;
	color: #1a5c96;
}

.mecal-ac-field {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25em;
	box-sizing: border-box;
	min-height: 2.5em;
	padding: 0.1em 0.3em;
	border: 1px solid #b0cce8;
	border-radius: 6px;
	/* Même corps que les champs voisins, qui sont dans un <label> à 0.82em. */
	font-size: 0.78em;
	background: #fff;
	cursor: text;
}

.mecal-ac-field:focus-within {
	border-color: #5a8fc2;
	box-shadow: 0 0 0 2px rgba(90, 143, 194, 0.25);
}

.mecal-ac-tokens {
	display: contents;
}

.mecal-ac-token {
	display: inline-flex;
	align-items: center;
	gap: 0.2em;
	max-width: 100%;
	padding: 0.05em 0.15em 0.05em 0.5em;
	border-radius: 3px;
	background: #e4eef8;
	color: #1a5c96;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.6;
}

.mecal-ac-token-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mecal-search-form .mecal-ac-remove {
	padding: 0 0.3em;
	border: 0;
	border-radius: 2px;
	background: transparent;
	color: #5a8fc2;
	font-size: 1.1em;
	line-height: 1;
	cursor: pointer;
}

.mecal-search-form .mecal-ac-remove:hover,
.mecal-search-form .mecal-ac-remove:focus-visible {
	background: #c9dcef;
	color: #1a5c96;
}

.mecal-search-form .mecal-ac-field .mecal-ac-input {
	flex: 1 1 6em;
	width: auto;
	min-width: 6em;
	height: 2.1em;
	font-size: 1em;
	padding: 0 0.25em;
	border: 0;
	outline: 0;
	box-shadow: none;
	background: transparent;
}

/* La liste déborde le champ si besoin : le contexte (« Finistère ·
   Bretagne · France ») ne tient pas dans une colonne de grille. */
.is-multi > .mecal-ac-list {
	right: auto;
	min-width: 100%;
	width: max-content;
	max-width: min(26em, 92vw);
}

.mecal-ac-head {
	padding: 0.35em 0.6em 0.15em;
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #7d8a99;
}

.mecal-ac-item {
	display: flex;
	align-items: baseline;
	gap: 0.5em;
}

.mecal-ac-context {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.82em;
	color: #7d8a99;
}

.mecal-ac-count {
	margin-left: auto;
	font-size: 0.78em;
	color: #7d8a99;
}

/* Calendriers actifs dans le titre du repli, quand il est fermé. */
.mecal-fold-hint {
	overflow: hidden;
	max-width: 60%;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 1.1em;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: #5c6672;
}

.mecal-fold[open] > .mecal-fold-toggle .mecal-fold-hint {
	display: none;
}

/* Double link: directory-record icon next to a linked name. */
.annuaire-lien-fiche {
	margin-left: 0.15em;
	font-size: 0.78em;
	line-height: 1;
	text-decoration: none;
	opacity: 0.65;
	vertical-align: super;
}

.annuaire-lien-fiche:hover,
.annuaire-lien-fiche:focus {
	opacity: 1;
}

/* ----------------------------------------------------------------------
 * Coloured-tag facets (genres, themes, venue types)
 *
 * The chips double as a colour legend: every used term shows its colour at
 * all times. Selection is conveyed by full opacity + an inset ring; unchecked
 * chips stay legible but visibly muted. Grand genres (is-parent) lead each
 * colour family; their used sub-genres follow in the auto-derived pastel.
 * ------------------------------------------------------------------- */
.mecal-tags-groups {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em 0.9em;
	padding: 0.2em 0.1em;
}

.mecal-tags-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.3em;
}

.mecal-tags-children {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.3em;
}

.mecal-tag-check {
	display: inline-flex !important;
	margin: 0;
	cursor: pointer;
}

/* The native checkbox is replaced by the chip itself. */
.mecal-tag-check input[type="checkbox"] {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	border: 0;
}

.mecal-tag {
	display: inline-block;
	padding: 0.18em 0.7em;
	border-radius: 999px;
	border: 1px solid rgba(26, 92, 150, 0.25);
	background: #e7eef7;
	color: #1a5c96;
	font-size: 0.82em;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
	opacity: 0.62;
	transition: opacity 0.12s ease, box-shadow 0.12s ease;
}

.mecal-tag.has-color {
	background: var(--mecal-tag-bg);
	color: var(--mecal-tag-fg);
	border-color: transparent;
}

.mecal-tag.is-child {
	font-weight: 500;
	font-size: 0.78em;
}

.mecal-tag-check:hover .mecal-tag {
	opacity: 0.85;
}

.mecal-tag-check input[type="checkbox"]:checked + .mecal-tag {
	opacity: 1;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor;
}

.mecal-tag-check input[type="checkbox"]:focus-visible + .mecal-tag {
	outline: 2px solid #1a5c96;
	outline-offset: 2px;
}

/* ----------------------------------------------------------------------
 * Niveau A — axes transversaux (thématiques, types de lieu)
 *
 * Hors du repli « Filtres », juste sous le mot-clé : peu de termes, des
 * pastilles rondes et aérées qui font écho aux calendriers et raccourcis.
 * ------------------------------------------------------------------- */
.mecal-search-transversal {
	margin: 0.75em 0 0;
}

.mecal-search-transversal + .mecal-search-advanced,
.mecal-search-transversal + .mecal-search-fields {
	margin-top: 0.75em;
}

/* ----------------------------------------------------------------------
 * Blocs repliables (niveau A et groupes) et panneaux d'axes
 *
 * Chaque bloc a son repli, titré d'un filet à la manière de TECspresso,
 * avec le nombre de critères actifs. Déplié sur grand écran, replié sur
 * portable (défauts réglables par le filtre mecal_search_fold_defaults).
 * ------------------------------------------------------------------- */
.mecal-search-blocks {
	margin-top: 0.4em;
}

.mecal-fold {
	margin: 0.55em 0 0;
}

.mecal-fold-toggle,
.mecal-panel-toggle {
	display: flex;
	align-items: center;
	gap: 0.45em;
	cursor: pointer;
	list-style: none;
	font-size: 0.8em;
	font-weight: 600;
	color: #1a5c96;
}

.mecal-fold-toggle {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.72em;
}

.mecal-fold-toggle::-webkit-details-marker,
.mecal-panel-toggle::-webkit-details-marker {
	display: none;
}

.mecal-fold-toggle::before,
.mecal-panel-toggle::before {
	content: "\25B8";
	font-size: 0.85em;
}

.mecal-fold[open] > .mecal-fold-toggle::before,
.mecal-panel[open] > .mecal-panel-toggle::before {
	transform: rotate(90deg);
}

/* Filet jusqu'au bord droit, après le titre et sa pastille. */
.mecal-fold-toggle::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #d9e2ee;
}

.mecal-fold-count {
	display: inline-block;
	min-width: 1.4em;
	padding: 0 0.4em;
	border-radius: 999px;
	background: #1a5c96;
	color: #fff;
	font-size: 0.9em;
	line-height: 1.5;
	text-align: center;
	letter-spacing: 0;
}

.mecal-fold-body {
	margin-top: 0.4em;
}

/* Le titre du repli nomme déjà l'axe : légende gardée pour les lecteurs
   d'écran seulement. */
.mecal-fold-body > fieldset > legend,
.mecal-panel-body > fieldset > legend {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Champs d'une ligne : suggestions, listes, dates. */
.mecal-group-inline {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(11em, 1fr));
	gap: 0.6em 1em;
	align-items: end;
}

/* Listes à parcourir : panneaux en colonnes (pas en grille, pour qu'un
   panneau ouvert pousse les suivants au lieu de creuser un vide). */
.mecal-group-panels {
	columns: 3 14em;
	column-gap: 0.8em;
}

@media (max-width: 700px) {
	.mecal-group-inline {
		grid-template-columns: repeat(auto-fill, minmax(8.5em, 1fr));
		gap: 0.5em 0.6em;
	}
}

.mecal-group-inline + .mecal-group-panels {
	margin-top: 0.6em;
}

.mecal-panel {
	display: block;
	break-inside: avoid;
	margin: 0 0 0.5em;
	padding: 0.3em 0.6em;
	border: 1px solid #d9e2ee;
	border-radius: 6px;
	background: #fff;
}

.mecal-panel-body {
	margin-top: 0.4em;
	max-height: 16em;
	overflow-y: auto;
}

.mecal-search-transversal .mecal-fold:first-child {
	margin-top: 0;
}

/* ----------------------------------------------------------------------
 * Niveau B — genres en flux dense
 *
 * Toutes les pastilles dans un seul flux, sans bloc par famille : une
 * famille ne passe plus à la ligne d'un seul tenant, la ligne se remplit
 * jusqu'au bout. Pastilles rectangulaires et serrées ; la couleur porte
 * la famille (franche pour le grand genre, éclaircie pour ses enfants).
 * ------------------------------------------------------------------- */
.mecal-genres-flow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 3px;
	padding: 0.1em 0;
}

.mecal-genres-flow .mecal-tag {
	padding: 0.12em 0.5em;
	border-radius: 3px;
	font-size: 0.76em;
	line-height: 1.45;
	opacity: 0.78;
}

.mecal-genres-flow .mecal-tag.is-parent {
	font-weight: 700;
}

.mecal-genres-flow .mecal-tag.is-child {
	font-size: 0.74em;
	font-weight: 500;
}

.mecal-genres-flow .mecal-tag-check:hover .mecal-tag {
	opacity: 1;
}

/* Anneau sombre et fixe : en currentColor, il était blanc — donc
   invisible — sur les grands genres, dont le texte est clair. */
.mecal-genres-flow .mecal-tag-check input[type="checkbox"]:checked + .mecal-tag {
	opacity: 1;
	box-shadow: 0 0 0 1px #fff, 0 0 0 3px #2a3440;
}

/* Orphelins : genres sans parent ni enfant, en attente de classement. */
.mecal-genres-others {
	margin: 0 0.15em 0 0.6em;
	font-size: 0.72em;
	font-style: italic;
	color: #7d8a99;
	white-space: nowrap;
}

.mecal-genres-flow .mecal-tag.is-orphan {
	background: #fff;
	border-color: #cfd6df;
	color: #5c6672;
}

/* ----------------------------------------------------------------------
 * Region accordion facet (country > region > department)
 * ------------------------------------------------------------------- */
.mecal-tree {
	max-height: 18em;
	overflow-y: auto;
	padding: 0.2em 0.1em;
}

.mecal-tree-node {
	margin: 0;
}

.mecal-tree-node > summary {
	display: flex;
	align-items: center;
	gap: 0.35em;
	list-style: none;
	cursor: pointer;
	padding: 0.12em 0;
}

.mecal-tree-node > summary::-webkit-details-marker {
	display: none;
}

/* Disclosure triangle before the checkbox row. */
.mecal-tree-node > summary::before {
	content: "▸";
	flex: 0 0 auto;
	font-size: 0.7em;
	color: #5a8fc2;
	transition: transform 0.12s ease;
}

.mecal-tree-node[open] > summary::before {
	transform: rotate(90deg);
}

.mecal-tree-children {
	padding-left: 1.1em;
	border-left: 1px solid #d9e2ee;
	margin-left: 0.35em;
}

.mecal-tree-leaf {
	padding: 0.12em 0 0.12em 1.05em;
}

.mecal-tree-check {
	display: inline-flex !important;
}

/* Master "All" toggle at the top of an explicit tree (calendar facet). */
.mecal-tree-all {
	display: inline-flex !important;
	font-weight: 600;
	padding: 0.12em 0 0.3em;
	margin-bottom: 0.3em;
	border-bottom: 1px solid #d9e2ee;
}

/* ----------------------------------------------------------------------
 * Highlights filter (single select, sits inline with the date fields)
 * ------------------------------------------------------------------- */
.mecal-search-facet-featured {
	min-width: 0;
}

/* ----------------------------------------------------------------------
 * Single event navigation — breadcrumb above the title, prev/next below
 * the content (see includes/class-mecal-event-nav.php).
 * ------------------------------------------------------------------- */
.mecal-event-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em 0.5em;
	margin: 0 0 0.6em;
	font-size: 0.9em;
}

.mecal-crumb {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	line-height: 1.4;
}

.mecal-crumb-agenda,
.mecal-crumb-festival {
	color: #1a5c96;
	font-weight: 600;
}

.mecal-crumb-agenda:hover,
.mecal-crumb-festival:hover {
	text-decoration: underline;
}

/* Calendar chips reuse the tag pill but always read at full strength. */
.mecal-crumb.mecal-tag {
	opacity: 1;
	text-decoration: none;
}

.mecal-crumb.mecal-tag:hover {
	box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(26, 92, 150, 0.35);
}

.mecal-crumb-sep {
	color: #9bb4d0;
	font-size: 0.95em;
	user-select: none;
}

.mecal-event-adjacent {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.8em;
	margin: 2em 0 0;
	padding-top: 1.2em;
	border-top: 1px solid #b0cce8;
}

.mecal-adjacent-link {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	padding: 0.7em 0.9em;
	border: 1px solid #b0cce8;
	border-radius: 8px;
	background: #f0f5fb;
	text-decoration: none;
	color: #1a5c96;
	transition: background 0.12s ease, box-shadow 0.12s ease;
}

.mecal-adjacent-link:hover {
	background: #e3edf8;
	box-shadow: 0 1px 4px rgba(26, 92, 150, 0.15);
}

.mecal-adjacent-next {
	text-align: right;
	align-items: flex-end;
}

.mecal-adjacent-link.is-empty {
	border: 1px dashed #d9e2ee;
	background: transparent;
	pointer-events: none;
}

.mecal-adjacent-kicker {
	font-size: 0.78em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #5a8fc2;
}

.mecal-adjacent-title {
	font-weight: 600;
	line-height: 1.3;
}

.mecal-adjacent-date {
	font-size: 0.85em;
	color: #5a8fc2;
}

@media (max-width: 480px) {
	.mecal-event-adjacent {
		grid-template-columns: 1fr;
	}

	.mecal-adjacent-next {
		text-align: left;
		align-items: flex-start;
	}

	.mecal-adjacent-link.is-empty {
		display: none;
	}
}

/* ----------------------------------------------------------------------
 * Term description tooltip — a focusable info indicator that surfaces the
 * WordPress description of a calendar or festival/cycle term on hover and on
 * keyboard focus (see MECAL_Templates::description_tooltip). Plain text only.
 * -------------------------------------------------------------------- */
.mecal-term-tip {
	align-items: center;
	background: #b0cce8;
	border-radius: 50%;
	color: #1a5c96;
	cursor: help;
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 0.72rem;
	font-style: normal;
	font-weight: 700;
	height: 1.15em;
	justify-content: center;
	line-height: 1;
	position: relative;
	user-select: none;
	width: 1.15em;
}

.mecal-term-tip:focus {
	outline: 2px solid #1a5c96;
	outline-offset: 2px;
}

.mecal-term-tip-mark {
	font-family: Georgia, "Times New Roman", serif;
	line-height: 1;
}

.mecal-term-tip::after {
	background: #1a3a5c;
	border-radius: 6px;
	bottom: calc(100% + 9px);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
	color: #fff;
	content: attr(data-mecal-tip);
	font-size: 0.8rem;
	font-weight: 400;
	left: 50%;
	line-height: 1.35;
	max-width: 260px;
	opacity: 0;
	padding: 0.5rem 0.65rem;
	pointer-events: none;
	position: absolute;
	text-align: left;
	transform: translateX(-50%);
	transition: opacity 0.12s ease;
	visibility: hidden;
	white-space: normal;
	width: max-content;
	z-index: 40;
}

.mecal-term-tip::before {
	border: 6px solid transparent;
	border-top-color: #1a3a5c;
	bottom: calc(100% + 3px);
	content: "";
	left: 50%;
	opacity: 0;
	position: absolute;
	transform: translateX(-50%);
	transition: opacity 0.12s ease;
	visibility: hidden;
	z-index: 41;
}

.mecal-term-tip:hover::after,
.mecal-term-tip:focus::after,
.mecal-term-tip:hover::before,
.mecal-term-tip:focus::before {
	opacity: 1;
	visibility: visible;
}

/* Near the right edge the bubble would overflow; nudge it left for the last
 * column of the index. Cheap heuristic that keeps it readable without JS. */
.mecal-index-row .mecal-term-tip::after {
	left: auto;
	right: -0.3em;
	transform: none;
}

.mecal-index-row .mecal-term-tip::before {
	left: auto;
	right: 0.2em;
	transform: none;
}
