/*
 * Panneau de filtres sur mobile, immo et invest (2026-11-03, lot C du plan).
 * Les pastilles à popover deviennent des lignes qui se déplient dans le panneau.
 * Chargé après listing.css, qui définit les mêmes sélecteurs.
 */
@media (max-width: 768px) {
	.ih-filters__panelbody .ih-filters__chips {
		display: block;
		margin-top: 16px;
		border-top: 1px solid var(--ih-line);
	}
	.ih-filters__panelbody .ih-filter-chip {
		display: block;
		border-bottom: 1px solid var(--ih-line);
	}
	.ih-filters__panelbody .ih-filter-chip .ih-filter-chip__btn {
		display: flex;
		width: 100%;
		min-height: 52px;
		padding: 12px 0;
		gap: 10px;
		border: 0;
		border-radius: 0;
		background: none;
		color: var(--ih-ink);
		font-size: 15px;
		font-weight: 600;
		text-align: left;
	}
	.ih-filters__panelbody .ih-filter-chip__value {
		color: var(--ih-cyan-700);
		font-size: 13px;
		opacity: 1;
	}
	/* Le chevron part à droite et se retourne quand la ligne est dépliée. */
	.ih-filters__panelbody .ih-filter-chip__btn > svg:last-child {
		margin-left: auto;
		transition: transform .15s ease;
	}
	.ih-filters__panelbody .ih-filter-chip.is-open .ih-filter-chip__btn > svg:last-child {
		transform: rotate(180deg);
	}
	.ih-filters__panelbody .ih-filter-chip .ih-pop__panel {
		display: none;
		position: static;
		width: auto;
		min-width: 0;
		max-width: none;
		padding: 0 0 16px;
		background: none;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		pointer-events: auto;
		transform: none;
		transition: none;
	}
	.ih-filters__panelbody .ih-filter-chip.is-open .ih-pop__panel { display: block; }

	/* Un seul bouton pour appliquer : celui du pied de panneau. */
	.ih-filters__panelbody .ih-filter-chip .ih-pop__actions { display: none; }
	.ih-filters__panelbody .ih-filter-chip .ih-pop__title { display: none; }

	.ih-filters__panelbody .ih-pop__cols { grid-template-columns: 1fr; }
	.ih-filters__panelbody .ih-pop__check { min-height: 44px; }
	.ih-filters__panelbody .ih-pop__check input { width: 20px; height: 20px; flex: none; }
	/* Une seule barre de défilement : seule la longue liste à recherche (Département) garde la sienne. */
	.ih-filters__panelbody .ih-filter-chip .ih-pop__list { max-height: none; overflow: visible; }
	.ih-filters__panelbody .ih-filter-chip .ih-pop__list[data-ih-pop-filterlist] { max-height: 320px; overflow-y: auto; }
	.ih-filters__panelbody .ih-pop__preset { min-height: 40px; }
	.ih-filters__panelbody .ih-pop__range input,
	.ih-filters__panelbody .ih-pop__searchinput { min-height: 44px; font-size: 16px; }

	/* Le bouton s'écrasait à 17 px dans le pied de panneau : une hauteur fixe l'en empêche. */
	.ih-filters__panelfoot .ih-filters__apply,
	.ih-filters__panelfoot .ih-filters__panelapply {
		flex: 1 1 auto;
		min-height: 48px;
		height: auto;
		justify-content: center;
		font-size: 15px;
		font-weight: 700;
	}
	.ih-filters__panelfoot .is-compte { opacity: .65; }

	/* Vue carte : la carte passe avant le titre et les statistiques. */
	body.ih-map-view .ih-listing-hero,
	body.ih-map-view .ih-zones-hero,
	body.ih-map-view .ih-listing-results__header { display: none; }
	/* Sur invest, le choix des couches recouvrait le haut de la carte. */
	.ih-listing-map .leaflet-control-layers { display: none; }

	/* Bulles de regroupement aux couleurs du site : le jeu par défaut de Leaflet (vert, jaune, orange)
	   l'emportait sur listing.css, chargé avant lui. */
	.leaflet-container .marker-cluster-small,
	.leaflet-container .marker-cluster-medium,
	.leaflet-container .marker-cluster-large { background-color: rgba(18, 32, 58, .22); }
	.leaflet-container .marker-cluster-small div,
	.leaflet-container .marker-cluster-medium div,
	.leaflet-container .marker-cluster-large div {
		background-color: var(--ih-ink);
		color: #fff;
		font-family: var(--ih-font-mono);
		font-weight: 600;
	}
}
