/*
 * Bloc Filtres Totemia. Mise en page de la maquette Framer du 11/10/2026
 * (carte, en-tête « Filtres », Période en onglets, « Autres critères »), avec
 * la police et les couleurs du site : Poppins, bleu nuit #1E2C63 (titres),
 * bordeaux #91284D (choix actifs), bleu roi #0C41B8 (bouton, comme
 * « Découvrir »). Titres des sections en gras, valeurs en graisse normale
 * (demande de Mathieu du 11/10/2026). Animations 0,1 s, coupées si l'appareil en demande moins.
 * Règle : jamais d'opacité ni de transformation sur .tf lui-même (le panneau
 * mobile perdrait sa priorité d'affichage, bug vu par Lam le 09/10/2026).
 */
.tf {
	--tf-night: #1e2c63;
	--tf-text: #2b3245;
	--tf-muted: #6d7789;
	--tf-faint: #a9afbd;
	--tf-line: #e6e9f0;
	--tf-soft: #f4f5f9;
	--tf-bordeaux: #91284d;
	--tf-bordeaux-soft: #f7ecf0;
	--tf-royal: #0c41b8;
	background: #fff;
	border: 1px solid var(--tf-line);
	border-radius: 16px;
	box-shadow: 0 1px 3px rgba(30, 44, 99, .05);
	color: var(--tf-text);
	font-family: Poppins, "Open Sans", sans-serif;
	font-size: 13px;
	padding: 18px 16px 16px;
}

.tf a,
.tf a:hover,
.tf a:focus {
	text-decoration: none;
}

.tf :focus-visible {
	outline: 2px solid var(--tf-royal);
	outline-offset: 2px;
}

/* ---------- En-tête : Filtres (N) · Tout effacer ---------- */

.tf-head {
	align-items: center;
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
}

.tf-head__icon {
	fill: none;
	flex: none;
	height: 18px;
	stroke: var(--tf-night);
	stroke-linecap: round;
	stroke-width: 2;
	width: 18px;
}

.tf-head__title {
	color: var(--tf-night);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
}

.tf-head__count {
	background: var(--tf-bordeaux-soft);
	border-radius: 6px;
	color: var(--tf-bordeaux);
	font-size: 12px;
	font-weight: 600;
	line-height: 20px;
	padding: 0 7px;
}

.tf-head__clear {
	color: var(--tf-muted);
	font-size: 12px;
	font-weight: 600;
	margin-left: auto;
	padding: 4px 6px;
}

.tf-head__clear:hover {
	color: var(--tf-bordeaux);
}

.tf-panel__close {
	display: none;
}

/* ---------- Étiquettes des filtres actifs ---------- */

.tf-tags {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding-bottom: 14px;
}

.tf-tags[hidden] {
	display: none;
}

.tf-tag {
	align-items: center;
	animation: tf-fade .1s ease-out;
	background: #f7ecf0;
	border-radius: 8px;
	color: #91284d;
	display: inline-flex;
	font-family: Poppins, "Open Sans", sans-serif;
	font-size: 12px;
	font-weight: 600;
	gap: 6px;
	padding: 5px 8px 5px 10px;
	text-decoration: none;
	white-space: nowrap;
}

.tf-tag:hover,
.tf-tag:focus {
	background: #91284d;
	color: #fff;
	text-decoration: none;
}

.tf-tag__remove {
	fill: none;
	height: 12px;
	stroke: currentColor;
	stroke-width: 2.6;
	width: 12px;
}

/* Dans le bloc, « Tout effacer » est dans l'en-tête. */
.tf .tf-tags__clear {
	display: none;
}

/* Copie au-dessus des résultats : sur mobile seulement (ligne qui défile sous « Filtrer »). */
.tf-tags--outside {
	padding: 0 16px 12px;
}

.tf-tags--outside .tf-tags__clear {
	color: #0c41b8;
	font-family: Poppins, "Open Sans", sans-serif;
	font-size: 12px;
	font-weight: 600;
	text-decoration: underline;
	white-space: nowrap;
}

@media (min-width: 768px) {
	.tf-tags--outside {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.tf-tags--outside {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.tf-tags--outside::-webkit-scrollbar {
		display: none;
	}
}

/* ---------- Sections ---------- */

.tf-section {
	border-top: 1px solid var(--tf-line);
}

.tf-section__head {
	align-items: center;
	cursor: pointer;
	display: flex;
	gap: 8px;
	list-style: none;
	padding: 14px 0;
	user-select: none;
}

.tf-section__head::-webkit-details-marker {
	display: none;
}

.tf-section__title {
	color: var(--tf-night);
	flex: 1;
	font-size: 14px;
	font-weight: 700;
}

.tf-section__badge {
	background: var(--tf-bordeaux);
	border-radius: 10px;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	min-width: 18px;
	padding: 0 5px;
	text-align: center;
}

.tf-section__unit {
	color: var(--tf-faint);
	font-size: 11px;
}

.tf-section__chevron {
	fill: none;
	flex: none;
	height: 16px;
	stroke: var(--tf-night);
	stroke-width: 2;
	transition: transform .1s;
	width: 16px;
}

.tf-section[open] > .tf-section__head .tf-section__chevron {
	transform: rotate(180deg);
}

.tf-section__body {
	padding-bottom: 16px;
}

/* « Autres critères » : titre discret, sections compactes et repliées */
.tf-others {
	border-top: 1px solid var(--tf-line);
	color: var(--tf-muted);
	font-size: 11px;
	letter-spacing: .04em;
	margin: 0;
	padding: 14px 0 2px;
	text-transform: uppercase;
}

.tf-others + .tf-section {
	border-top: 0;
}

.tf-section--secondary > .tf-section__head {
	padding: 11px 0;
}

/* ---------- Âge : 8 colonnes sur 2 lignes ---------- */

.tf-age {
	display: grid;
	gap: 6px;
	grid-template-columns: repeat(8, minmax(0, 1fr));
}

.tf-age__tile {
	align-items: center;
	background: #fff;
	border: 1px solid var(--tf-line);
	border-radius: 6px;
	color: var(--tf-night);
	display: flex;
	font-size: 12px;
	font-weight: 400;
	height: 32px;
	justify-content: center;
	transition: background-color .1s, border-color .1s, color .1s;
}

a.tf-age__tile:hover {
	border-color: var(--tf-bordeaux);
	color: var(--tf-bordeaux);
}

.tf-age__tile--on,
a.tf-age__tile--on:hover {
	background: var(--tf-bordeaux);
	border-color: var(--tf-bordeaux);
	color: #fff;
}

/* ---------- Période : onglets Par mois / Dates précises ---------- */

.tf-tabs {
	background: var(--tf-soft);
	border-radius: 8px;
	display: flex;
	gap: 2px;
	margin-bottom: 10px;
	padding: 3px;
}

.tf-tab {
	background: none;
	border: 0;
	border-radius: 6px;
	color: var(--tf-muted);
	flex: 1;
	font: inherit;
	font-size: 12px;
	font-weight: 400;
	padding: 7px 8px;
	transition: background-color .1s, color .1s;
}

.tf-tab--on {
	background: #fff;
	box-shadow: 0 1px 2px rgba(30, 44, 99, .08);
	color: var(--tf-bordeaux);
}

.tf:not(.tf--js) .tf-tabs {
	display: none;
}

.tf--js [data-hidden="true"] {
	display: none;
}

.tf:not(.tf--js) .tf-tabpanel + .tf-tabpanel {
	margin-top: 12px;
}

.tf-months {
	display: grid;
	gap: 6px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Puces : mois, durée, activités */
.tf-chip,
.tf-pill {
	align-items: center;
	background: #fff;
	border: 1px solid var(--tf-line);
	border-radius: 6px;
	color: var(--tf-night);
	display: inline-flex;
	font-size: 12px;
	font-weight: 400;
	justify-content: center;
	padding: 7px 10px;
	text-align: center;
	transition: background-color .1s, border-color .1s, color .1s;
	white-space: nowrap;
}

a.tf-chip:hover,
a.tf-pill:hover {
	border-color: var(--tf-bordeaux);
	color: var(--tf-bordeaux);
}

.tf-chip--on,
.tf-pill--on,
a.tf-chip--on:hover,
a.tf-pill--on:hover {
	background: var(--tf-bordeaux-soft);
	border-color: var(--tf-bordeaux);
	color: var(--tf-bordeaux);
}

.tf-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

/* ---------- Choix barrés (aucun séjour) ---------- */

.tf-age__tile--vide,
.tf-chip--vide,
.tf-pill--vide,
.tf-tile--vide,
.tf-opt--vide {
	color: var(--tf-faint);
	cursor: not-allowed;
	text-decoration: line-through;
}

.tf-age__tile--vide,
.tf-chip--vide,
.tf-pill--vide,
.tf-tile--vide {
	background: var(--tf-soft);
}

/* ---------- Cases à cocher (catégorie, listes, options) ---------- */

.tf-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.tf-list--children {
	margin-left: 24px;
}

.tf-opt {
	align-items: center;
	border-radius: 6px;
	color: var(--tf-night);
	display: flex;
	font-size: 13px;
	font-weight: 400;
	gap: 10px;
	padding: 5px 2px;
}

a.tf-opt:hover {
	color: var(--tf-bordeaux);
}

.tf-opt[hidden] {
	display: none;
}

.tf-box {
	border: 1.5px solid #c9ced9;
	border-radius: 4px;
	flex: none;
	height: 16px;
	position: relative;
	transition: background-color .1s, border-color .1s;
	width: 16px;
}

.tf-opt--on .tf-box {
	background: var(--tf-bordeaux);
	border-color: var(--tf-bordeaux);
}

.tf-opt--on .tf-box::after {
	border: solid #fff;
	border-width: 0 2px 2px 0;
	content: "";
	height: 8px;
	left: 4.5px;
	position: absolute;
	top: 1.5px;
	transform: rotate(45deg);
	width: 4px;
}

.tf-opt--on .tf-opt__label {
	color: var(--tf-bordeaux);
	font-weight: 400;
}

.tf-opt__label {
	flex: 1;
	min-width: 0;
}

/* Parent (« Sports neige et montagne », « France ») : seulement dans les résultats d'une recherche. */
.tf-opt__parent {
	display: none;
}

.tf-section--searching .tf-opt__parent {
	color: var(--tf-faint);
	display: block;
	font-size: 11px;
	font-weight: 400;
}

.tf-opt__count {
	color: var(--tf-faint);
	font-size: 12px;
}

.tf-icon {
	color: var(--tf-night);
	flex: none;
	height: 18px;
	width: 18px;
}

.tf-opt--on .tf-icon,
.tf-tile--on .tf-icon {
	color: var(--tf-bordeaux);
}

.tf-opt--vide .tf-icon,
.tf-tile--vide .tf-icon {
	color: var(--tf-faint);
}

/* Arbre des catégories */
.tf-tree__node {
	position: relative;
}

.tf-tree__children {
	margin-left: 24px;
}

.tf-tree__toggle {
	cursor: pointer;
	height: 26px;
	list-style: none;
	position: absolute;
	right: 0;
	top: 2px;
	width: 26px;
}

.tf-tree__toggle::-webkit-details-marker {
	display: none;
}

.tf-tree__toggle::after {
	color: var(--tf-muted);
	content: "+";
	display: block;
	font-size: 15px;
	line-height: 26px;
	text-align: center;
}

.tf-tree__children[open] > .tf-tree__toggle::after {
	content: "\2212";
}

.tf-tree__node > .tf-opt {
	padding-right: 30px;
}

/* Lien « seul » : cette catégorie uniquement (à gauche du + / −). */
.tf-tree__node--only > .tf-opt {
	padding-right: 64px;
}

.tf-only {
	color: var(--tf-royal);
	font-size: 11px;
	line-height: 26px;
	position: absolute;
	right: 28px;
	top: 2px;
}

.tf-only:hover {
	color: var(--tf-bordeaux);
	text-decoration: underline;
}

/* Sur PC, visible au survol de la ligne (ou au clavier) pour ne pas charger la liste.
   Sur écran tactile (pas de survol), toujours visible. */
@media (hover: hover) {
	.tf-only {
		opacity: 0;
	}

	.tf-opt:hover + .tf-only,
	.tf-only:hover,
	.tf-only:focus-visible {
		opacity: 1;
	}
}

/* ---------- Tuiles (Nos sélections, Environnement) : 2 x 2, pictogramme à gauche ---------- */

.tf-tiles {
	display: grid;
	gap: 6px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tf-tile {
	align-items: center;
	background: #fff;
	border: 1px solid var(--tf-line);
	border-radius: 8px;
	color: var(--tf-night);
	display: flex;
	gap: 8px;
	min-width: 0;
	padding: 8px 10px;
	transition: background-color .1s, border-color .1s, color .1s;
}

a.tf-tile:hover {
	border-color: var(--tf-bordeaux);
	color: var(--tf-bordeaux);
}

.tf-tile--on,
a.tf-tile--on:hover {
	background: var(--tf-bordeaux-soft);
	border-color: var(--tf-bordeaux);
	color: var(--tf-bordeaux);
}

.tf-tile__label {
	font-size: 12px;
	font-weight: 400;
	line-height: 1.25;
	min-width: 0;
}

/* ---------- Recherche, champs, boutons ---------- */

.tf-search {
	margin-bottom: 10px;
	position: relative;
}

.tf-search__icon {
	fill: none;
	height: 16px;
	left: 10px;
	position: absolute;
	stroke: var(--tf-faint);
	stroke-width: 2;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
}

.tf-input {
	background: #fff;
	border: 1px solid var(--tf-line);
	border-radius: 8px;
	color: var(--tf-night);
	font: inherit;
	font-size: 13px;
	font-weight: 400;
	height: 40px;
	min-width: 0;
	padding: 0 12px;
	width: 100%;
}

.tf-input::placeholder {
	color: var(--tf-night);
	opacity: .8;
}

.tf-input:focus {
	border-color: var(--tf-bordeaux);
	outline: none;
}

.tf-search__input {
	padding-left: 32px;
}

.tf-search__input::placeholder {
	color: var(--tf-faint);
	opacity: 1;
}

.tf-search__empty {
	color: var(--tf-muted);
	margin: 0 0 8px;
}

.tf-fields {
	display: grid;
	gap: 10px;
	grid-template-columns: 1fr 1fr;
}

.tf-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	min-width: 0;
}

.tf-field__label {
	color: var(--tf-muted);
	font-size: 11px;
	font-weight: 400;
}

.tf-money {
	position: relative;
}

.tf-money .tf-input {
	padding-right: 26px;
}

.tf-money__unit {
	color: var(--tf-muted);
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
}

.tf-actions {
	align-items: center;
	display: flex;
	gap: 12px;
	margin-top: 10px;
}

.tf-apply {
	background: var(--tf-royal);
	border: 0;
	border-radius: 8px;
	color: #fff;
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	padding: 7px 14px;
}

.tf-clear {
	color: var(--tf-bordeaux);
	font-size: 12px;
	text-decoration: underline;
}

/* Avec JavaScript, prix et dates s'appliquent tout seuls. */
.tf--js .tf-apply {
	display: none;
}

.tf-more {
	margin-top: 8px;
}

.tf-more__show,
.tf-more__hide {
	background: none;
	border: 0;
	color: var(--tf-royal);
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 0;
}

.tf-more__remaining {
	color: var(--tf-muted);
	font-weight: 400;
}

/* Lignes au-delà de la limite : cachées seulement quand le JavaScript est là. */
.tf--js .tf-extra:not(.tf-extra--shown) {
	display: none;
}

.tf:not(.tf--js) .tf-more,
.tf:not(.tf--js) .tf-search,
.tf:not(.tf--js) .tf-price__slider {
	display: none;
}

/* ---------- Budget : poignées ---------- */

.tf-price__slider {
	height: 24px;
	margin-top: 12px;
	position: relative;
}

.tf-price__range {
	-webkit-appearance: none;
	appearance: none;
	background: none;
	height: 24px;
	left: 0;
	margin: 0;
	pointer-events: none;
	position: absolute;
	top: 0;
	width: 100%;
}

.tf-price__range::-webkit-slider-runnable-track {
	background: transparent;
	border-radius: 2px;
	height: 3px;
}

.tf-price__range::-moz-range-track {
	background: transparent;
	border-radius: 2px;
	height: 3px;
}

.tf-price__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	background: #fff;
	border: 2px solid var(--tf-bordeaux);
	border-radius: 50%;
	cursor: pointer;
	height: 18px;
	margin-top: -7.5px;
	pointer-events: auto;
	width: 18px;
}

.tf-price__range::-moz-range-thumb {
	background: #fff;
	border: 2px solid var(--tf-bordeaux);
	border-radius: 50%;
	cursor: pointer;
	height: 14px;
	pointer-events: auto;
	width: 14px;
}

/* Trait du curseur dessiné à part (les deux curseurs superposés n ont pas de trait :
   sinon celui du second passait par-dessus le rond du premier). Partie bordeaux entre
   les deux ronds ; 9 px = demi-rond, pour s aligner sur le centre des ronds. */
.tf-price__track,
.tf-price__fill {
	border-radius: 2px;
	height: 3px;
	pointer-events: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}

.tf-price__track {
	background: var(--tf-line);
	left: 9px;
	right: 9px;
}

.tf-price__fill {
	background: var(--tf-bordeaux);
	left: calc(9px + (100% - 18px) * var(--tf-lo, 0));
	right: calc(9px + (100% - 18px) * (1 - var(--tf-hi, 1)));
}

/* Rond du bas au-dessus quand il est poussé à droite (sinon on ne peut plus l attraper). */
.tf-price__range--min.tf-price__range--top {
	z-index: 2;
}

/* ---------- Bouton « Afficher les séjours » ---------- */

.tf-panel__foot {
	padding-top: 14px;
}

.tf-show-results {
	align-items: center;
	background: var(--tf-royal);
	border: 0;
	border-radius: 8px;
	color: #fff;
	display: flex;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	gap: 8px;
	justify-content: center;
	padding: 12px 16px;
	transition: background-color .1s;
	width: 100%;
}

.tf-show-results__arrow {
	fill: none;
	height: 16px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2.2;
	width: 16px;
}

.tf-show-results:disabled {
	background: #c3c8d4;
	cursor: not-allowed;
}

.tf-show-results:disabled .tf-show-results__arrow {
	display: none;
}

/* ---------- Panneau mobile plein écran ---------- */

.tf--panel-open {
	border: 0;
	border-radius: 0;
	bottom: 0;
	box-shadow: none;
	left: 0;
	padding: 0;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 2000;
}

.tf--panel-open > .tf-panel {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.tf--panel-open .tf-head {
	border-bottom: 1px solid var(--tf-line);
	flex: none;
	margin: 0;
	padding: 12px 16px;
}

.tf--panel-open .tf-panel__close {
	background: none;
	border: 0;
	display: block;
	height: 40px;
	margin-right: -8px;
	padding: 8px;
	width: 40px;
}

.tf--panel-open .tf-head__title + .tf-panel__close {
	margin-left: auto;
}

.tf-panel__close svg {
	fill: none;
	height: 24px;
	stroke: var(--tf-night);
	stroke-width: 2;
	width: 24px;
}

.tf--panel-open > .tf-panel > .tf-tags {
	border-bottom: 1px solid var(--tf-line);
	flex: none;
	padding: 10px 16px;
}

.tf--panel-open .tf-sections {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 16px;
	-webkit-overflow-scrolling: touch;
}

.tf--panel-open .tf-sections > .tf-section:first-child {
	border-top: 0;
}

.tf--panel-open .tf-panel__foot {
	border-top: 1px solid var(--tf-line);
	flex: none;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}

html.tf-noscroll,
html.tf-noscroll body {
	overflow: hidden;
}

/* Mobile : avec JavaScript, le bloc ne s'affiche que dans le panneau (bouton « Filtrer »). */
@media (max-width: 767px) {
	.tf--js:not(.tf--panel-open) {
		display: none;
	}
}

/* ---------- Chargement : seul le contenu des sections est atténué ---------- */

.tf--loading .tf-section__body {
	opacity: .55;
	transition: opacity .1s;
}

/* ---------- Recherche dans les listes ---------- */

.tf .tf-nomatch,
.tf--js .tf-section--searching .tf-nomatch {
	display: none !important;
}

.tf--js .tf-section--searching .tf-extra:not(.tf-nomatch),
.tf--js .tf-section--searching [hidden][data-search]:not(.tf-nomatch) {
	display: flex !important;
}

.tf--js .tf-section--searching .tf-pill.tf-extra:not(.tf-nomatch) {
	display: inline-flex !important;
}

.tf-section--searching .tf-more {
	display: none;
}

/* ---------- Animations 0,1 s ---------- */

@keyframes tf-pop {
	from { transform: scale(.96); }
	to { transform: scale(1); }
}

@keyframes tf-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes tf-flash {
	0%, 60% { color: #91284d; }
	100% { color: inherit; }
}

.tf-pop {
	animation: tf-pop .1s ease-out;
}

.tf-fade-in {
	animation: tf-fade .1s ease-out;
}

.tf-flash {
	animation: tf-flash .6s ease-out;
}

@media (prefers-reduced-motion: reduce) {
	.tf *,
	.tf *::after {
		transition: none !important;
	}

	.tf-pop,
	.tf-fade-in,
	.tf-flash,
	.tf-tag {
		animation: none !important;
	}
}

/* Nombre de choix cochés : seulement quand la section est repliée (maquette Framer). */
.tf-section[open] > .tf-section__head .tf-section__badge {
	display: none;
}

/* Ancien fragment « bouton mobile filtres » des pages de contenu : masqué quand le bloc est là (filters.js). */
.tf-old-hidden {
	display: none !important;
}