.rainbow-stripe {
	height: 6px;
	background: linear-gradient(
		90deg,
		#F9BF17 0%, #F9BF17 20%,
		#18AAB0 20%, #18AAB0 40%,
		#80BF30 40%, #80BF30 60%,
		#EC511B 60%, #EC511B 80%,
		#870047 80%, #870047 100%
	);
}

/* Indique la page actuelle dans la navigation */
.wp-block-pages-list__item.current-menu-item > .wp-block-pages-list__item__link,
.wp-block-pages-list__item.current-menu-ancestor > .wp-block-pages-list__item__link {
	color: #870047;
	font-weight: 800;
	position: relative;
}

.wp-block-pages-list__item.current-menu-item > .wp-block-pages-list__item__link::after,
.wp-block-pages-list__item.current-menu-ancestor > .wp-block-pages-list__item__link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -4px;
	height: 3px;
	border-radius: 999px;
	background-color: #F9BF17;
}

/* Logo du header : centré entre le bord gauche et le menu, taille fluide, au moins 50% de la largeur disponible */
.header-logo-zone {
	flex: 1 1 50%;
	min-width: 220px;
	display: flex;
	justify-content: center;
}

.header-logo {
	width: 100%;
	max-width: 480px;
	margin: 0 auto;
}

.header-logo img {
	width: 100%;
	height: auto;
	display: block;
}

/* Menu centré dans l'espace restant à côté du logo */
.header-nav-zone {
	flex: 1 1 auto;
	min-width: 0;
}

.telethon-hero {
	position: relative;
	overflow: hidden;
}

.telethon-hero > * {
	position: relative;
	z-index: 1;
}

/* Petit effet ludique sur les cartes de la page d'accueil */
.wp-block-column.has-background {
	transition: transform 0.2s ease;
}

.wp-block-column.has-background:hover {
	transform: translateY(-4px);
}

/* Carte des communes */
.communes-map-wrap {
	position: relative;
	max-width: 640px;
	margin: 2rem auto 3rem;
}

.communes-map {
	width: 100%;
	height: auto;
	display: block;
}

.map-commune {
	fill: #FEF6DD;
	stroke: #FFFFFF;
	stroke-width: 2;
	transition: fill 0.15s ease;
}

.map-commune-link:nth-child(5n+2) .map-commune { fill: #FBEAF1; }
.map-commune-link:nth-child(5n+3) .map-commune { fill: #E3F4F4; }
.map-commune-link:nth-child(5n+4) .map-commune { fill: #EEF6E1; }
.map-commune-link:nth-child(5n+5) .map-commune { fill: #FCE9DF; }

.map-commune-link {
	cursor: pointer;
}

.map-commune-link:hover .map-commune,
.map-commune-link:focus-visible .map-commune {
	fill: #F9BF17;
}

.map-commune-link:nth-child(5n+2):hover .map-commune,
.map-commune-link:nth-child(5n+2):focus-visible .map-commune {
	fill: #870047;
}

.map-commune-link:nth-child(5n+3):hover .map-commune,
.map-commune-link:nth-child(5n+3):focus-visible .map-commune {
	fill: #18AAB0;
}

.map-commune-link:nth-child(5n+4):hover .map-commune,
.map-commune-link:nth-child(5n+4):focus-visible .map-commune {
	fill: #80BF30;
}

.map-commune-link:nth-child(5n+5):hover .map-commune,
.map-commune-link:nth-child(5n+5):focus-visible .map-commune {
	fill: #EC511B;
}

.map-commune-link.is-active .map-commune {
	fill: #18AAB0;
	filter: none;
}

/* Infobulle au survol d'une commune */
.commune-tooltip {
	position: absolute;
	transform: translate(-50%, calc(-100% - 14px));
	pointer-events: none;
	background-color: #870047;
	color: #FFFFFF;
	font-weight: 800;
	font-size: 1.15rem;
	padding: 0.4rem 1rem;
	border-radius: 999px;
	white-space: nowrap;
	opacity: 0;
	transition: opacity 0.1s ease;
	z-index: 2;
}

.commune-tooltip.is-visible {
	opacity: 1;
}

/* Pastilles de catégories (ex. Combronde) */
.category-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin: 2rem 0 3rem;
}

.category-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.75rem 1.4rem;
	border-radius: 999px;
	background-color: #FEF6DD;
	color: #870047;
	text-decoration: none;
	font-weight: 700;
	font-size: 1.05rem;
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.category-badge:hover,
.category-badge:focus-visible {
	background-color: #F9BF17;
	transform: translateY(-2px);
}

.category-badge:nth-child(4n+2) { background-color: #FBEAF1; }
.category-badge:nth-child(4n+3) { background-color: #E3F4F4; }
.category-badge:nth-child(4n+4) { background-color: #EEF6E1; }

.category-badge .emoji {
	font-size: 1.3rem;
}

/* Sections en accordéon (communes, catégories...) */
.accordion-item {
	border-bottom: 1px solid #F4F4F2;
	padding: 1rem 0;
	scroll-margin-top: 2rem;
}

.accordion-item summary {
	cursor: pointer;
	font-weight: 800;
	font-size: 1.2rem;
	color: #870047;
	list-style: none;
}

.accordion-item summary::-webkit-details-marker {
	display: none;
}

.accordion-item summary::before {
	content: "+";
	display: inline-block;
	width: 1.2em;
	color: #F9BF17;
	font-weight: 800;
}

.accordion-item[open] summary::before {
	content: "–";
}

.accordion-item p {
	margin-top: 0.75rem;
}

.accordion-item h4 {
	margin-top: 1.5rem;
	margin-bottom: 0;
	color: #870047;
	font-weight: 800;
	font-size: 1.05rem;
}

/* Grille de cartes limitée à 2 colonnes (ex. page Le Programme) */
.program-cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	align-items: stretch;
	gap: 2rem;
	margin: 2rem 0;
}

.program-cards > * {
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
	margin: 0 !important;
}

.program-cards > * > .wp-block-buttons {
	margin-top: auto;
	padding-top: 1rem;
}

.program-cards > *:not(:last-child) {
	align-items: flex-start;
	text-align: left;
}

.program-cards > *:not(:last-child) .wp-block-buttons {
	justify-content: flex-start;
}

.program-cards > :last-child:nth-child(odd) {
	grid-column: 1 / -1;
}

.program-cards > .trail-logo-card {
	align-items: center;
	justify-content: center;
	text-align: center;
}

@media (max-width: 640px) {
	.program-cards {
		grid-template-columns: 1fr;
	}

	.program-cards > :last-child:nth-child(odd) {
		grid-column: auto;
	}
}
