/* ═══════════════════════════════════════════════════════
   BreVTT — Feuille de style principale
   Palette : Nature/Terre + Neutre/Propre
   ═══════════════════════════════════════════════════════ */

/* ── Variables ───────────────────────────────────────── */
:root {
	/* Couleurs */
	--blanc:          #FFFFFF;
	--gris_clair:     #F4F5F2;
	--gris_bord:      #E5E7E0;
	--gris_moyen:     #6B7266;
	--gris_fonce:     #1F2918;

	--vert_foret:     #3A6B35;
	--vert_fonce:     #2A5028;
	--vert_clair:     #6DA85F;
	--vert_pale:      #EDF4EB;

	--ocre:           #C17B2F;
	--ocre_clair:     #F5DFA8;
	--ocre_pale:      #FDF6E8;

	--terre:          #8B5E3C;
	--sable:          #F0E8D8;

	--rouge_alerte:   #C0392B;
	--rouge_pale:     #FDECEA;

	/* Typographie — stack système */
	--font_titre:     ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font_corps:     ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

	/* Espacements */
	--gap_xs:   4px;
	--gap_sm:   8px;
	--gap_md:   16px;
	--gap_lg:   24px;
	--gap_xl:   40px;
	--gap_xxl:  72px;

	/* Rayon */
	--r_sm:  6px;
	--r_md:  12px;
	--r_lg:  20px;
	--r_xl:  32px;

	/* Ombres */
	--shadow_sm:  0 1px 3px rgba(31,41,24,.07), 0 1px 2px rgba(31,41,24,.04);
	--shadow_md:  0 4px 12px rgba(31,41,24,.08), 0 2px 4px rgba(31,41,24,.05);
	--shadow_lg:  0 12px 32px rgba(31,41,24,.10), 0 4px 8px rgba(31,41,24,.06);

	/* Layout */
	--max_width: 1200px;
	--header_h:  64px;
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--font_corps);
	font-size: 16px;
	line-height: 1.6;
	color: var(--gris_fonce);
	background: var(--blanc);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }

/* ── Utilitaires ─────────────────────────────────────── */
.container {
	max-width: var(--max_width);
	margin: 0 auto;
	padding: 0 var(--gap_lg);
}

/* ═══════════════════════════════════════════ HEADER ══ */
.site_header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--header_h);
	background: rgba(255,255,255,.92);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--gris_bord);
	box-shadow: var(--shadow_sm);
}

.header_inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
}

.logo {
	font-family: var(--font_titre);
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.5px;
	line-height: 1;
}

.logo_bre { color: var(--gris_fonce); }
.logo_vtt { color: var(--vert_foret); }

.main_nav {
	display: flex;
	gap: var(--gap_md);
	align-items: center;
}

.nav_link {
	font-size: 14px;
	font-weight: 500;
	color: var(--gris_moyen);
	padding: 6px 12px;
	border-radius: var(--r_sm);
	transition: color .2s, background .2s;
}

.nav_link:hover,
.nav_link.active {
	color: var(--vert_foret);
	background: var(--vert_pale);
}

.burger_btn {
	display: none;
	flex-direction: column;
	gap: 5px;
	padding: 8px;
	border-radius: var(--r_sm);
}

.burger_btn span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--gris_fonce);
	border-radius: 2px;
	transition: transform .3s, opacity .3s;
}

/* ═══════════════════════════════════════════════ HERO ══ */
.hero {
	position: relative;
	overflow: hidden;
	background: var(--gris_clair);
	padding: var(--gap_xxl) 0 var(--gap_xl);
	border-bottom: 1px solid var(--gris_bord);
}

.hero_bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.hero_shape {
	position: absolute;
	border-radius: 50%;
	opacity: .12;
}

.hero_shape_1 {
	width: 600px; height: 600px;
	background: radial-gradient(circle, var(--vert_clair), transparent 70%);
	top: -200px; right: -100px;
}

.hero_shape_2 {
	width: 400px; height: 400px;
	background: radial-gradient(circle, var(--ocre), transparent 70%);
	bottom: -150px; left: -80px;
}

.hero_dots {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(circle, var(--gris_bord) 1px, transparent 1px);
	background-size: 28px 28px;
	opacity: .6;
}

.hero_content {
	position: relative;
	z-index: 1;
}

.hero_badge {
	display: inline-flex;
	align-items: center;
	gap: var(--gap_sm);
	font-size: 13px;
	font-weight: 600;
	color: var(--vert_foret);
	background: var(--vert_pale);
	border: 1px solid rgba(58,107,53,.2);
	padding: 4px 14px;
	border-radius: 100px;
	margin-bottom: var(--gap_lg);
	letter-spacing: .3px;
}

.hero_title {
	font-family: var(--font_titre);
	font-size: clamp(36px, 6vw, 64px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -1.5px;
	color: var(--gris_fonce);
	margin-bottom: var(--gap_md);
	text-wrap: balance;
}

.hero_title em {
	font-style: normal;
	color: var(--vert_foret);
	position: relative;
}

.hero_title em::after {
	content: '';
	position: absolute;
	bottom: 4px;
	left: 0; right: 0;
	height: 6px;
	background: var(--ocre_clair);
	z-index: -1;
	border-radius: 3px;
}

.hero_subtitle {
	font-size: 18px;
	color: var(--gris_moyen);
	max-width: 560px;
	margin-bottom: var(--gap_xl);
	text-wrap: pretty;
}

/* ── Barre de recherche ──────────────────────────────── */
.search_bar {
	display: flex;
	gap: var(--gap_sm);
	background: var(--blanc);
	border: 1.5px solid var(--gris_bord);
	border-radius: var(--r_xl);
	padding: 8px;
	box-shadow: var(--shadow_lg);
	max-width: 680px;
	flex-wrap: wrap;
}

.search_field {
	flex: 1;
	display: flex;
	align-items: center;
	gap: var(--gap_sm);
	padding: 0 var(--gap_md);
	min-width: 180px;
}

.search_icon {
	width: 18px; height: 18px;
	color: var(--gris_moyen);
	flex-shrink: 0;
}

.search_field input {
	flex: 1;
	border: none;
	outline: none;
	font-size: 15px;
	color: var(--gris_fonce);
	background: transparent;
}

.search_field input::placeholder { color: var(--gris_moyen); }

.search_radius {
	display: flex;
	align-items: center;
	gap: var(--gap_sm);
	padding: 0 var(--gap_md);
	border-left: 1px solid var(--gris_bord);
}

.search_radius label {
	font-size: 13px;
	color: var(--gris_moyen);
	white-space: nowrap;
}

.search_radius select {
	border: none;
	outline: none;
	font-size: 14px;
	font-weight: 500;
	color: var(--gris_fonce);
	background: transparent;
}

/* ── Boutons ─────────────────────────────────────────── */
.btn_primary {
	display: inline-flex;
	align-items: center;
	gap: var(--gap_sm);
	background: var(--vert_foret);
	color: var(--blanc);
	font-size: 14px;
	font-weight: 600;
	padding: 10px 20px;
	border-radius: var(--r_lg);
	transition: background .2s, transform .15s;
	white-space: nowrap;
}

.btn_primary svg { width: 16px; height: 16px; }

.btn_primary:hover { background: var(--vert_fonce); }
.btn_primary:active { transform: scale(0.96); }

.btn_large { padding: 14px 28px; font-size: 16px; }
.btn_large svg { width: 20px; height: 20px; }

.btn_outline {
	display: inline-flex;
	align-items: center;
	gap: var(--gap_sm);
	color: var(--vert_foret);
	font-size: 14px;
	font-weight: 600;
	padding: 8px 16px;
	border: 1.5px solid var(--vert_foret);
	border-radius: var(--r_md);
	transition: background .2s, color .2s, transform .15s;
}

/* Sans cette règle, une icône inline sans attribut width/height se déploie à la
   taille d'un objet remplacé par défaut — 59 px de haut dans ce conteneur flex.
   `.btn_primary` avait la sienne, `.btn_outline` non : le pictogramme du bouton
   « Tous les événements » de la page favoris s'affichait quatre fois trop grand. */
.btn_outline svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.btn_outline:hover {
	background: var(--vert_foret);
	color: var(--blanc);
}

.btn_outline:active { transform: scale(0.96); }

/* ── Filtres rapides ─────────────────────────────────── */
.quick_filters {
	display: flex;
	align-items: center;
	gap: var(--gap_sm);
	margin-top: var(--gap_lg);
	flex-wrap: wrap;
}

.filter_label {
	font-size: 13px;
	color: var(--gris_moyen);
	font-weight: 500;
}

.filter_chip {
	font-size: 13px;
	font-weight: 500;
	color: var(--gris_moyen);
	background: var(--blanc);
	border: 1.5px solid var(--gris_bord);
	padding: 5px 14px;
	border-radius: 100px;
	transition: all .2s;
	min-height: 32px;
}

.filter_chip:hover {
	border-color: var(--vert_foret);
	color: var(--vert_foret);
}

.filter_chip.active {
	background: var(--vert_foret);
	border-color: var(--vert_foret);
	color: var(--blanc);
}

/* ═══════════════════════════════════ SECTION EVENTS ══ */
.section_events {
	padding: var(--gap_xxl) 0;
}

.section_header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--gap_md);
	margin-bottom: var(--gap_xl);
	flex-wrap: wrap;
}

.section_title {
	font-family: var(--font_titre);
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -0.5px;
	color: var(--gris_fonce);
	text-wrap: balance;
}

.section_meta {
	font-size: 14px;
	color: var(--gris_moyen);
	flex: 1;
	padding-left: var(--gap_md);
}

/* ── Bannière localisation ───────────────────────────── */
.location_banner {
	display: flex;
	align-items: center;
	gap: var(--gap_sm);
	background: var(--vert_pale);
	border: 1px solid rgba(58,107,53,.2);
	padding: 10px 16px;
	border-radius: var(--r_md);
	margin-bottom: var(--gap_lg);
	font-size: 14px;
	color: var(--vert_fonce);
}

.location_banner svg { width: 16px; height: 16px; flex-shrink: 0; }

.location_clear {
	margin-left: auto;
	font-size: 12px;
	color: var(--gris_moyen);
	padding: 2px 8px;
	border: 1px solid var(--gris_bord);
	border-radius: 100px;
	background: var(--blanc);
	transition: all .2s;
}

.location_clear:hover { border-color: var(--rouge_alerte); color: var(--rouge_alerte); }

/* ── Grille cartes événements ────────────────────────── */
.events_grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--gap_lg);
}

/* ── Carte événement ─────────────────────────────────── */
.event_card {
	background: var(--blanc);
	border: 1.5px solid var(--gris_bord);
	border-radius: var(--r_lg);
	overflow: hidden;
	box-shadow: var(--shadow_sm);
	transition: transform .2s, box-shadow .2s, border-color .2s;
	display: flex;
	flex-direction: column;
	animation: card_in .4s ease both;
}

@keyframes card_in {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: translateY(0); }
}

.event_card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow_lg);
	border-color: rgba(58,107,53,.25);
}

.event_card.is_annule {
	opacity: .6;
	filter: grayscale(.4);
}

/* En-tête colorée de la carte */
.card_header {
	padding: var(--gap_md) var(--gap_md) var(--gap_sm);
	background: var(--gris_clair);
	border-bottom: 1px solid var(--gris_bord);
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--gap_sm);
}

.card_date_block {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: var(--blanc);
	border: 1.5px solid var(--gris_bord);
	border-radius: var(--r_md);
	padding: 8px 12px;
	min-width: 52px;
	box-shadow: var(--shadow_sm);
}

.card_date_jour {
	font-family: var(--font_titre);
	font-size: 24px;
	font-weight: 800;
	line-height: 1;
	color: var(--vert_foret);
	font-variant-numeric: tabular-nums;
}

.card_date_mois {
	font-size: 11px;
	font-weight: 600;
	color: var(--gris_moyen);
	text-transform: uppercase;
	letter-spacing: .5px;
}

.card_tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gap_xs);
	flex: 1;
	justify-content: flex-end;
}

/* ── Corps de la carte ───────────────────────────────── */
.card_body {
	padding: var(--gap_md);
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: var(--gap_sm);
}

.card_titre {
	font-family: var(--font_titre);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--gris_fonce);
	text-wrap: balance;
}

.card_lieu {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	color: var(--gris_moyen);
}

.card_lieu svg { width: 13px; height: 13px; flex-shrink: 0; }

.card_parcours {
	display: flex;
	gap: var(--gap_xs);
	flex-wrap: wrap;
	margin-top: auto;
	padding-top: var(--gap_xs);
}

/* ── Pied de carte ───────────────────────────────────── */
.card_footer {
	padding: var(--gap_sm) var(--gap_md);
	border-top: 1px solid var(--gris_bord);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.card_footer_left {
	display:                 flex;
	align-items:             center;
	gap:                     6px;
	flex-wrap:               wrap;
}


.card_tarif {
	font-size: 13px;
	font-weight: 600;
}

.card_tarif.gratuit { color: var(--vert_foret); }
.card_tarif.payant  { color: var(--ocre); }
.card_tarif.libre   { color: var(--gris_moyen); }

.card_cta {
	font-size: 12px;
	font-weight: 600;
	color: var(--vert_foret);
	padding: 5px 12px;
	border: 1.5px solid var(--vert_foret);
	border-radius: var(--r_sm);
	transition: all .2s;
	min-height: 32px;
	display: inline-flex;
	align-items: center;
}

.card_cta:hover {
	background: var(--vert_foret);
	color: var(--blanc);
}

/* ── Tags / Badges ───────────────────────────────────── */
.tag {
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 9px;
	border-radius: 100px;
	letter-spacing: .3px;
	text-transform: uppercase;
}

.tag_vtt      { background: var(--vert_pale);  color: var(--vert_fonce); }
.tag_gravel   { background: var(--ocre_pale);  color: var(--ocre); }
.tag_cyclo    { background: var(--sable);      color: var(--terre); }
.tag_type     { background: var(--gris_clair); color: var(--gris_moyen); }
.tag_annule   { background: var(--rouge_pale); color: var(--rouge_alerte); }

.pill {
	font-size: 11px;
	font-weight: 500;
	background: var(--gris_clair);
	color: var(--gris_moyen);
	padding: 2px 8px;
	border-radius: 100px;
	border: 1px solid var(--gris_bord);
}

/* ── Pastilles de parcours colorées par discipline ────
   Même famille de teintes que les tags d'activité (.tag_vtt & co) pour qu'un
   « 45 km » vert se rattache d'un coup d'œil au badge VTT du même événement.
   Le fond reste pâle : ces pastilles arrivent souvent par paquets de trois ou
   quatre sur une même ligne, un aplat saturé rendrait la liste illisible.
   Une discipline non colorée (marche, trail) garde le gris de `.pill`. */
.pill_vtt {
	background: var(--vert_pale);
	color: var(--vert_fonce);
	border-color: rgba(58, 107, 53, .28);
	font-weight: 600;
}

.pill_gravel {
	background: var(--ocre_pale);
	color: var(--ocre);
	border-color: rgba(193, 123, 47, .32);
	font-weight: 600;
}

.pill_cyclo {
	background: var(--sable);
	color: var(--terre);
	border-color: rgba(139, 94, 60, .30);
	font-weight: 600;
}

/* ─── Empty state ────────────────────────────────────── */
.empty_state {
	text-align: center;
	padding: var(--gap_xxl) var(--gap_lg);
}

.empty_icon {
	font-size: 48px;
	margin-bottom: var(--gap_md);
}

.link_btn {
	color: var(--vert_foret);
	text-decoration: underline;
	font-weight: 600;
}

/* ═══════════════════════════════════ SECTION CARTE ══ */
.section_map_preview {
	background: var(--gris_fonce);
	padding-top: var(--gap_xxl);
}

.section_map_preview .section_header {
	padding: 0 var(--gap_lg);
	max-width: var(--max_width);
	margin: 0 auto var(--gap_xl);
}

.section_map_preview .section_title { color: var(--blanc); }
.section_map_preview .btn_outline {
	border-color: rgba(255,255,255,.3);
	color: var(--blanc);
}

.section_map_preview .btn_outline:hover {
	background: var(--blanc);
	color: var(--gris_fonce);
}

.map_preview_wrap {
	position: relative;
	height: 400px;
}

#map_preview {
	width: 100%;
	height: 100%;
}

.map_overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding-bottom: var(--gap_xl);
	background: linear-gradient(to top, rgba(31,41,24,.6) 0%, transparent 50%);
	pointer-events: none;
}

.map_overlay .btn_primary {
	pointer-events: all;
	box-shadow: var(--shadow_lg);
}

/* ═══════════════════════════════════════ SECTION STATS ══ */
.section_stats {
	padding: var(--gap_xxl) 0;
	background: var(--gris_clair);
	border-top: 1px solid var(--gris_bord);
	border-bottom: 1px solid var(--gris_bord);
}

.stats_grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--gap_lg);
}

.stat_card {
	text-align: center;
	padding: var(--gap_lg);
}

.stat_number {
	font-family: var(--font_titre);
	font-size: 48px;
	font-weight: 800;
	color: var(--vert_foret);
	line-height: 1;
	font-variant-numeric: tabular-nums;
	margin-bottom: var(--gap_sm);
}

.stat_label {
	font-size: 14px;
	color: var(--gris_moyen);
	font-weight: 500;
}

/* ═══════════════════════════════════════════ FOOTER ══ */
.site_footer {
	background: var(--gris_fonce);
	color: rgba(255,255,255,.7);
	padding: var(--gap_xl) 0;
}

.footer_inner {
	display: flex;
	flex-direction: column;
	gap: var(--gap_lg);
	align-items: center;
	text-align: center;
}

.footer_logo .logo_bre { color: rgba(255,255,255,.8); }
.footer_logo .logo_vtt { color: var(--vert_clair); }
.footer_logo p {
	font-size: 13px;
	margin-top: var(--gap_sm);
	color: rgba(255,255,255,.5);
}

.footer_nav {
	display: flex;
	gap: var(--gap_lg);
	flex-wrap: wrap;
	justify-content: center;
}

.footer_nav a {
	font-size: 13px;
	font-weight: 500;
	transition: color .2s;
}

.footer_nav a:hover { color: var(--vert_clair); }

.footer_copy {
	font-size: 12px;
	color: rgba(255,255,255,.35);
}

.footer_copy a {
	color: var(--vert_clair);
	text-decoration: underline;
}

/* ═══════════════════════════════════════════ LEAFLET ══ */
.leaflet-container { font-family: var(--font_corps) !important; }

.marker_popup {
	font-family: var(--font_corps);
}

.marker_popup strong {
	font-family: var(--font_titre);
	color: var(--gris_fonce);
	display: block;
	margin-bottom: 4px;
}

.marker_popup .popup_meta {
	font-size: 12px;
	color: var(--gris_moyen);
}

/* ══════════════════════════════════════════ RESPONSIVE ══ */

/* Tablette */
@media (max-width: 900px) {
	.stats_grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile */
@media (max-width: 640px) {
	:root { --gap_xxl: 48px; }

	.burger_btn { display: flex; }

	.main_nav {
		display: none;
		position: fixed;
		top: var(--header_h);
		left: 0; right: 0;
		background: var(--blanc);
		border-bottom: 1px solid var(--gris_bord);
		flex-direction: column;
		padding: var(--gap_md);
		gap: var(--gap_xs);
		box-shadow: var(--shadow_lg);
		z-index: 200; /* Au-dessus de toutes les barres sticky (faq_nav, filtres_bar, etc.) */
	}

	.main_nav.is_open { display: flex; }

	.nav_link { padding: 10px 16px; font-size: 15px; }

	.hero { padding: var(--gap_xl) 0 var(--gap_lg); }

	.hero_title { letter-spacing: -1px; }

	.search_bar {
		border-radius: var(--r_lg);
		flex-direction: column;
		padding: var(--gap_sm);
	}

	.search_field { padding: var(--gap_sm) var(--gap_sm); }

	.search_radius {
		border-left: none;
		border-top: 1px solid var(--gris_bord);
		padding: var(--gap_sm);
	}

	.btn_primary { width: 100%; justify-content: center; }

	.section_header {
		flex-direction: column;
		gap: var(--gap_sm);
	}

	.section_meta { padding-left: 0; }

	.events_grid {
		grid-template-columns: 1fr;
	}

	.stats_grid {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--gap_sm);
	}

	.stat_number { font-size: 36px; }

	.map_preview_wrap { height: 280px; }
}

/* ═══════════════════════════════════════════ FAVORIS ══ */

/* ── Header actions (favoris + burger) ───────────────── */
.header_actions {
	display: flex;
	align-items: center;
	gap: var(--gap_sm);
	flex-shrink: 0; /* Empêche la compression sur petits écrans */
}

/* Icône ❤️ header */
.nav_favoris {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px; height: 36px;
	border-radius: var(--r_sm);
	color: var(--gris_moyen);
	transition: color .2s, background .2s;
}

.nav_favoris svg {
	width: 20px; height: 20px;
	transition: fill .2s, color .2s, transform .2s;
}

.nav_favoris:hover {
	color: #e05a7a;
	background: #fff0f3;
}

.nav_favoris:hover svg { transform: scale(1.15); }

/* Quand il y a des favoris : cœur plein */
.nav_favoris.has_favoris {
	color: #e05a7a;
}

.nav_favoris.has_favoris svg {
	fill: currentColor;
}

/* Badge compteur */
.favoris_badge {
	position: absolute;
	top: 1px; right: 1px;
	min-width: 16px; height: 16px;
	background: #e05a7a;
	color: var(--blanc);
	font-size: 10px;
	font-weight: 700;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 3px;
	border: 1.5px solid var(--blanc);
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

/* ── Bouton ❤️ sur les cartes événement ──────────────── */
.card_footer_actions {
	display: flex;
	align-items: center;
	gap: var(--gap_sm);
}

/* Le cœur porte déjà sa couleur au repos, pas seulement au survol : en gris il
   se confondait avec les icônes décoratives et passait inaperçu. C'est une
   action, elle s'annonce comme telle. Le plein réservé aux favoris enregistrés
   garde la distinction entre « on peut cliquer » et « c'est déjà fait ». */
.btn_favori {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px; height: 32px;
	border-radius: var(--r_sm);
	color: #e05a7a;
	background: #fff5f7;
	border: 1.5px solid #f7d4dd;
	transition: color .2s, background .2s, border-color .2s, transform .15s;
	flex-shrink: 0;
}

.btn_favori svg {
	width: 15px; height: 15px;
	transition: fill .2s, transform .2s;
}

.btn_favori:hover {
	background: #ffe4ea;
	border-color: #f5c0ce;
}

/* Déjà en favori : cœur plein sur fond soutenu, lisible d'un coup d'œil dans
   une liste de vingt lignes. */
.btn_favori.is_fav {
	color: var(--blanc);
	background: #e05a7a;
	border-color: #e05a7a;
}

/* Micro-animation au clic */
@keyframes favori_pop {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.35); }
	70%  { transform: scale(0.9); }
	100% { transform: scale(1); }
}

.btn_favori_pop {
	animation: favori_pop .35s cubic-bezier(.4,0,.2,1);
}

/* ── Page favoris active dans nav ────────────────────── */
.nav_favoris.page_active {
	color: #e05a7a;
	background: #fff0f3;
}

/* ══════════════════════════════════════ RATIO D+/KM ══ */
.ratio_badge {
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 100px;
	letter-spacing: .3px;
	text-transform: uppercase;
	margin-top: var(--gap_xs);
}

.ratio_plat  { background:#EDF4EB; color:#2A5028; }
.ratio_roulant { background:#FFF8E1; color:#795548; }
.ratio_val   { background:#FFF3E0; color:#E65100; }
.ratio_mont  { background:#FBE9E7; color:#BF360C; }
.ratio_ext   { background:#FCE4EC; color:#880E4F; }

/* ══════════════════════════════════════════ PAYS ══ */
.tag_pays {
	background: #E8EAF6;
	color: #283593;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 100px;
	letter-spacing: .3px;
}

/* ── Input dénivelé liste ────────────────────────────── */
.filtre_denivele_input {
	width: 80px;
	border: 1.5px solid var(--gris_bord);
	border-radius: var(--r_sm);
	padding: 6px 8px;
	font-size: 13px;
	font-family: var(--font_corps);
	color: var(--gris_fonce);
	background: var(--gris_clair);
	outline: none;
	transition: border-color .2s;
}

.filtre_denivele_input:focus {
	border-color: var(--vert_foret);
	background: var(--blanc);
}

/* Dénivelé range dans sidebar carte */
.denivele_range {
	display: flex;
	align-items: center;
	gap: var(--gap_sm);
}

/* ══════════════════════════════ RATIO — BARRE DE SCORE ══ */

/* Remplace les anciens badges texte par une barre de progression */
.ratio_bar_wrap {
	display: flex;
	align-items: center;
	gap: var(--gap_sm);
	margin-top: var(--gap_sm);
}

.ratio_bar_label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
	min-width: 72px;
	color: var(--gris_fonce);
}

.ratio_bar_track {
	flex: 1;
	height: 6px;
	background: var(--gris_bord);
	border-radius: 3px;
	overflow: hidden;
}

.ratio_bar_fill {
	height: 100%;
	border-radius: 3px;
	transition: width .4s ease;
}

/* Couleurs de la barre selon le score */
.ratio_bar_fill.ratio_plat    { background: #66BB6A; }
.ratio_bar_fill.ratio_roulant { background: #FFA726; }
.ratio_bar_fill.ratio_val     { background: #FF7043; }
.ratio_bar_fill.ratio_mont    { background: #EF5350; }
.ratio_bar_fill.ratio_ext     { background: #B71C1C; }

.ratio_bar_score {
	font-size: 11px;
	font-weight: 700;
	color: var(--gris_moyen);
	min-width: 24px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* Sur les cartes événement — version compacte */
.event_card .ratio_bar_wrap {
	margin-top: var(--gap_xs);
}

.event_card .ratio_bar_label { font-size: 10px; min-width: 60px; }
.event_card .ratio_bar_track { height: 5px; }
.event_card .ratio_bar_score { font-size: 10px; }

/* Ancien ratio_badge gardé pour compatibilité tableau */
.ratio_badge {
	display: none; /* Remplacé par ratio_bar_wrap */
}

/* ── Select filtre (partagé toutes pages) ───────────────── */
.filtre_select {
	border: 1.5px solid var(--gris_bord);
	border-radius: var(--r_sm);
	padding: 6px 28px 6px 10px;
	font-size: 13px;
	font-family: var(--font_corps);
	color: var(--gris_fonce);
	background: var(--gris_clair) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7266' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E") no-repeat right 8px center;
	appearance: none;
	outline: none;
	cursor: pointer;
	transition: border-color .2s, background-color .2s;
}
.filtre_select:focus {
	border-color: var(--vert_foret);
	background-color: var(--blanc);
}

/* -------------------------------------------------------------------------------------------------- */
/* NOCTURNE + MÉTÉO                                                                                   */
/* -------------------------------------------------------------------------------------------------- */

.tag_nocturne {
	background:              #1a1a2e;
	color:                   #FFF;
	border:                  1px solid #4c1d95;
}

/* Widget météo inline dans les cards */
.meteo_widget {
	display:                 inline-flex;
	align-items:             center;
	gap:                     4px;
	font-size:               11px;
	font-weight:             600;
	padding:                 2px 7px;
	border-radius:           20px;
	background:              var(--gris_clair);
	border:                  1px solid var(--gris_bord);
	color:                   var(--gris_fonce);
	white-space:             nowrap;
	cursor:                  help;
	vertical-align:          middle;
}

.meteo_widget .meteo_icon { font-size: 13px; }
.meteo_widget .meteo_temp { font-weight: 700; color: var(--vert_foret); }

.meteo_widget.loading {
	color:                   var(--gris_moyen);
	font-style:              italic;
}

/* Filtre favoris carte — bouton toggle */
.filter_chip_fav {
	display:                 inline-flex;
	align-items:             center;
	gap:                     5px;
	padding:                 6px 14px;
	border-radius:           20px;
	font-size:               13px;
	font-weight:             600;
	border:                  1.5px solid var(--gris_bord);
	background:              var(--blanc);
	color:                   var(--gris_moyen);
	cursor:                  pointer;
	transition:              all .2s;
}

.filter_chip_fav svg {
	width:                   13px;
	height:                  13px;
	fill:                    none;
	stroke:                  currentColor;
	stroke-width:            2;
}

.filter_chip_fav.active {
	background:              #fff0f4;
	border-color:            #e05a7a;
	color:                   #e05a7a;
}

.filter_chip_fav.active svg {
	fill:                    #e05a7a;
	stroke:                  #e05a7a;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* DOUBLE SLIDER DÉNIVELÉ D+ — partagé liste + carte                           */
/* ─────────────────────────────────────────────────────────────────────────── */

.denivele_range_track {
	position:                relative;
	height:                  20px;
	background:              transparent;
	border-radius:           2px;
	margin:                  8px 0;
	display:                 flex;
	align-items:             center;
}

.denivele_range_track::before {
	content:                 '';
	position:                absolute;
	left:                    0;
	right:                   0;
	top:                     50%;
	transform:               translateY(-50%);
	height:                  4px;
	background:              var(--gris_bord);
	border-radius:           2px;
	pointer-events:          none;
}

.denivele_range_fill {
	position:                absolute;
	top:                     50%;
	transform:               translateY(-50%);
	height:                  4px;
	background:              var(--vert_foret);
	border-radius:           2px;
	pointer-events:          none;
}

.denivele_range_track input[type=range] {
	position:                absolute;
	width:                   100%;
	height:                  20px;
	top:                     50%;
	left:                    0;
	transform:               translateY(-50%);
	appearance:              none;
	-webkit-appearance:      none;
	background:              transparent;
	pointer-events:          none;
	margin:                  0;
	z-index:                 1;
}

.denivele_range_track input[type=range]:last-of-type {
	z-index:                 2;
}

.denivele_range_track input[type=range]::-webkit-slider-thumb {
	appearance:              none;
	-webkit-appearance:      none;
	width:                   18px;
	height:                  18px;
	border-radius:           50%;
	background:              var(--vert_foret);
	border:                  2.5px solid var(--blanc);
	box-shadow:              0 1px 4px rgba(0,0,0,.2);
	pointer-events:          all;
	cursor:                  pointer;
	transition:              transform .15s;
	touch-action:            none;
}

.denivele_range_track input[type=range]::-webkit-slider-thumb:hover {
	transform:               scale(1.2);
}

.denivele_range_track input[type=range]::-moz-range-thumb {
	width:                   18px;
	height:                  18px;
	border-radius:           50%;
	background:              var(--vert_foret);
	border:                  2.5px solid var(--blanc);
	box-shadow:              0 1px 4px rgba(0,0,0,.2);
	pointer-events:          all;
	cursor:                  pointer;
	transition:              transform .15s;
}

.denivele_range_track input[type=range]::-moz-range-track {
	background:              transparent;
}

.denivele_ticks,
.rayon_ticks {
	display:                 flex;
	justify-content:         space-between;
	font-size:               10px;
	color:                   var(--gris_moyen);
	padding:                 0 2px;
	margin-top:              2px;
}


/* ─────────────────────────────────────────────────────────────────────────── */
/* BOUTONS HEADER AUTH — partagés sur toutes les pages                         */
/* ─────────────────────────────────────────────────────────────────────────── */

.btn_sm
{
	padding:                 7px 14px;
	font-size:               13px;
	border-radius:           var(--r_md);
	font-weight:             600;
	transition:              background .2s, color .2s, border-color .2s, transform .15s;
	white-space:             nowrap;
}

.btn_sm.active_auth
{
	box-shadow:              0 0 0 2px var(--vert_foret);
}

/* Assurer que btn_outline est inline-flex quand utilisé en .btn_sm */
.btn_outline.btn_sm
{
	display:                 inline-flex;
	align-items:             center;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* FIX hidden — priorité sur tout display: flex/grid                           */
/* ─────────────────────────────────────────────────────────────────────────── */

[hidden] { display: none !important; }

/* ─────────────────────────────────────────────────────────────────────────── */
/* HEADER AUTH — Avatar dropdown + icône déconnexion                           */
/* ─────────────────────────────────────────────────────────────────────────── */

.header_user_wrap
{
	position:                relative;
}

.header_avatar_btn
{
	display:                 inline-flex;
	align-items:             center;
	gap:                     7px;
	padding:                 5px 10px 5px 5px;
	border-radius:           var(--r_lg);
	border:                  1.5px solid var(--gris_bord);
	background:              var(--blanc);
	color:                   var(--gris_fonce);
	font-size:               13px;
	font-weight:             600;
	transition:              border-color .2s, background .2s;
	cursor:                  pointer;
	white-space:             nowrap;
	max-width:               180px;
}

.header_avatar_btn:hover
{
	border-color:            var(--vert_foret);
	background:              var(--vert_pale);
}

.header_avatar
{
	width:                   28px;
	height:                  28px;
	border-radius:           50%;
	background:              var(--vert_foret);
	color:                   var(--blanc);
	font-size:               11px;
	font-weight:             800;
	display:                 inline-flex;
	align-items:             center;
	justify-content:         center;
	flex-shrink:             0;
	letter-spacing:          -.5px;
}

.header_avatar_name
{
	overflow:                hidden;
	text-overflow:           ellipsis;
	white-space:             nowrap;
}

.header_avatar_caret
{
	flex-shrink:             0;
	color:                   var(--gris_moyen);
	transition:              transform .2s;
}

.header_avatar_btn[aria-expanded="true"] .header_avatar_caret
{
	transform:               rotate(180deg);
}

/* Dropdown menu */
.header_dropdown
{
	position:                absolute;
	top:                     calc(100% + 8px);
	right:                   0;
	min-width:               200px;
	background:              var(--blanc);
	border:                  1.5px solid var(--gris_bord);
	border-radius:           var(--r_lg);
	box-shadow:              var(--shadow_lg);
	padding:                 var(--gap_xs);
	z-index:                 200;
	animation:               dropdown_in .15s ease;
}

@keyframes dropdown_in
{
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.header_dropdown_item
{
	display:                 flex;
	align-items:             center;
	gap:                     var(--gap_sm);
	width:                   100%;
	padding:                 9px 12px;
	border-radius:           var(--r_md);
	font-size:               13px;
	font-weight:             500;
	color:                   var(--gris_fonce);
	background:              none;
	border:                  none;
	cursor:                  pointer;
	text-align:              left;
	transition:              background .15s, color .15s;
	text-decoration:         none;
}

.header_dropdown_item:hover
{
	background:              var(--gris_clair);
	color:                   var(--vert_foret);
}

.header_dropdown_sep
{
	height:                  1px;
	background:              var(--gris_bord);
	margin:                  var(--gap_xs) var(--gap_sm);
}

.header_dropdown_logout
{
	color:                   var(--gris_moyen);
}

.header_dropdown_logout:hover
{
	background:              var(--rouge_pale);
	color:                   var(--rouge_alerte);
}

/* Icône déconnexion rapide */
.header_logout_icon
{
	display:                 flex;
	align-items:             center;
	justify-content:         center;
	width:                   34px;
	height:                  34px;
	border-radius:           var(--r_sm);
	color:                   var(--gris_moyen);
	background:              none;
	border:                  none;
	cursor:                  pointer;
	transition:              color .2s, background .2s;
	flex-shrink:             0;
}

.header_logout_icon:hover
{
	color:                   var(--rouge_alerte);
	background:              var(--rouge_pale);
}

/* Mobile : masquer le nom dans l'avatar btn */
@media (max-width: 640px)
{
	.header_avatar_name,
	.header_avatar_caret  { display: none; }
	.header_avatar_btn    { padding: 4px; border: none; background: none; }
	.header_avatar_btn:hover { background: var(--vert_pale); }
	.btn_proposer_header  { display: none; }
}




