/* Agenda /evenements/ : sans bandeau d'annuaire, la grille n'a pas d'autre
   conteneur (les catégories et les lieux ont le leur). Même largeur que le
   gabarit d'archive Eventlist d'origine ; sous 1024 px, la marge vient du
   thème (style.css). */

body.post-type-archive-event,
body.tax-event_cat,
body.tax-event_loc {
	background-color: var(--fl-color-page);
}

@media (max-width: 1024px) {
	.el_wrap_site {
		padding: 0 20px;
	}
}

.location-tabs-section {
	max-width: 1190px;
	margin: 100px auto;
}

.location-tabs-section h2.events-title-archive {
	margin: 0 0 8px !important;
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
}

.tab-nav {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	border-bottom: 2px solid #dee2e6;
	margin-bottom: 20px;
}

.tab-nav-item {
	margin-right: 10px;
	outline: none;
}

.tab-button {
	background: none;
	border: none;
	padding: 8px 14px;
	outline: none !important;
	cursor: pointer;
	font-size: 14px;
	color: #666;
	border-bottom: 2px solid transparent;
	box-shadow: none !important;
}

.tab-button::-moz-focus-inner {
	border: 0 !important;
	outline: none !important;
}

.tab-button:-moz-focusring {
	outline: none !important;
}

.tab-button:hover {
	color: #007cba;
}

.tab-button.active {
	color: var(--fl-color-ink);
	border-bottom-color: var(--fl-color-ink);
	font-weight: 600;
}

.tab-panel {
	display: none;
}

.tab-panel.active {
	display: block;
}

.location-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 8px;
}

.location-link {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto;
	align-items: center;
	column-gap: 8px;
	row-gap: 0;
	padding: 8px 12px;
	background: var(--fl-color-surface);
	border: 1px solid #eeeeee;
	border-radius: 5px;
	text-decoration: none;
	font-weight: 500;
}

.location-link:hover {
	background: var(--fl-color-page);
	text-decoration: none;
}

.location-name {
	grid-column: 1;
	grid-row: 1;
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: var(--fl-color-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.location-category {
	grid-column: 1;
	grid-row: 2;
	display: block;
	font-size: 11px;
	font-weight: 400;
	color: #666;
	opacity: 0.8;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.location-link__chevron {
	grid-column: 2;
	grid-row: 1 / span 2;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--fl-color-muted);
}

.location-link__chevron-icon {
	display: block;
	width: 14px;
	height: 14px;
}

.no-locations {
	color: #666;
	text-align: center;
	padding: 20px;
}

#toggleCities {
	background: none;
	color: var(--fl-color-ink);
	border: none;
	outline: none;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 8px;
}

#toggleCities:hover {
	color: var(--fl-color-accent);
}

#toggleCities::after {
	content: "▼";
	font-size: 12px;
	transition: transform 0.3s ease;
}

#toggleCities.showing-more::after {
	content: "▲";
}

.el-pagination .page-numbers li .page-numbers.current {
	color: var(--fl-color-ink) !important;
}

.fl-site__content > .el_wrap_site {
	max-width: 1190px;
	margin-inline: auto;
}

@media (min-width: 1025px) {
	.fl-site__content > .el_wrap_site {
		padding-inline: var(--fl-space-sm);
	}
}

/* Texte SEO d'une catégorie, d'un lieu ou de l'agenda : images en colonne
   dans le texte, à droite puis à gauche, pleine largeur sur mobile. */
.taxonomy-description::after {
	content: "";
	display: table;
	clear: both;
}

.taxonomy-description h2,
.taxonomy-description h3 {
	clear: both;
	margin: var(--fl-space-4xl) 0 var(--fl-space-lg);
}

.taxonomy-description > :first-child {
	margin-top: 0;
}

.taxonomy-description p {
	margin: 0 0 var(--fl-space-lg);
}

.taxonomy-description figure {
	width: 40%;
	max-width: 420px;
	margin: var(--fl-space-2xs) 0 var(--fl-space-lg) var(--fl-space-2xl);
	float: right;
}

.taxonomy-description figure:nth-of-type(even) {
	float: left;
	margin: var(--fl-space-2xs) var(--fl-space-2xl) var(--fl-space-lg) 0;
}

.taxonomy-description figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--fl-radius-lg);
}

/* Image en fin de texte : rien à enrouler autour, elle est centrée. */
.taxonomy-description > figure:last-child {
	float: none;
	margin: var(--fl-space-lg) auto 0;
}

@media (max-width: 767px) {
	.taxonomy-description figure,
	.taxonomy-description figure:nth-of-type(even) {
		width: 100%;
		max-width: none;
		margin: var(--fl-space-md) 0 var(--fl-space-lg);
		float: none;
	}
}

/* Fil d'Ariane d'une catégorie ou d'une page catégorie + lieu, sans bandeau
   de lieu : garde l'espace de 30 px qu'il avait sous lui avant la primitive
   (la primitive le remet à 0 dans son conteneur). */
.fl-ui-breadcrumb__wrap .fl-ui-breadcrumb.fl-events-archive__breadcrumb {
	margin-bottom: calc(var(--fl-space-2xl) + var(--fl-space-xs));
}

/* Agenda /evenements/ : fil d'Ariane, titre de page et recherche, sans hero. */
.fl-events-agenda-header {
	display: flex;
	flex-direction: column;
	gap: var(--fl-space-md);
	padding-top: var(--fl-space-2xl);
	margin-bottom: var(--fl-space-2xl);
}

.fl-events-agenda-header .fl-events-agenda-header__breadcrumb {
	margin: 0;
}

/* Spécificité au-dessus de body.post-type-archive-event .fl-event-search (search-bar.css). */
.fl-site__content .fl-events-agenda-header .fl-event-search {
	margin: var(--fl-space-xs) 0 0;
}

