/* Composant « Trier par » (components/tri_resultats.php) + en-tête titre / tri des pages de résultats. */

.entete_resultats {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--space-4);
}

/* Le titre prend la place restante (et passe à la ligne s'il est long) ; les outils gardent leur taille. */
.entete_resultats > :first-child {
	flex: 1 1 420px;
	min-width: 0;
}

.entete_resultats > .entete_resultats_outils {
	flex: 0 0 auto;
}

.tri_resultats {
	margin: 0;
}

.tri_resultats_bloc {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: var(--tap-target);
	padding: 0 40px 0 14px;
	box-sizing: border-box;
	background: var(--chr-blanc);
	border: 1px solid var(--chr-nappe);
	border-radius: var(--radius-md);
	font-family: var(--font-sans);
	font-size: 15px;
}

.tri_resultats_bloc:focus-within {
	outline: var(--focus-ring);
	outline-offset: var(--focus-offset);
}

.tri_resultats_libelle {
	font-family: var(--font-sans);
	font-size: 15px;
	font-weight: var(--fw-medium);
	color: var(--chr-ardoise);
}

.tri_resultats_valeur {
	font-family: var(--font-sans);
	font-size: 15px;
	font-weight: var(--fw-bold);
	color: var(--chr-encre);
}

.tri_resultats_chevron {
	position: absolute;
	right: 14px;
	color: var(--chr-encre);
	pointer-events: none;
}

.tri_resultats_chevron * {
	color: inherit;
}

/* La liste native couvre tout le bloc (invisible) : un clic n'importe où l'ouvre. */
.tri_resultats_bloc select {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

/* Écran étroit : les filtres passent sous l'en-tête ; le tri est centré et séparé du panneau. */
@media (max-width: 900px) {
	.entete_resultats {
		justify-content: center;
		margin-bottom: var(--space-6);
	}

	.entete_resultats > .entete_resultats_outils {
		justify-content: center;
	}
}
