/* FPA — tri/recherche/filtres des tableaux front-office (voir fpa-table-tools.js) */

.fpa-tt-barre {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin-bottom: 10px;
}

.fpa-tt-champ {
	display: block;
	margin: 0;
}

.fpa-tt-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.fpa-tt-recherche,
.fpa-tt-filtre {
	font: inherit;
	font-size: 13px;
	padding: 6px 10px;
	border: 1px solid var(--fpa-card-line, #E9ECED);
	border-radius: 8px;
	background: #fff;
	color: var(--fpa-navy, #12232A);
	min-width: 0;
}

.fpa-tt-recherche {
	min-width: 180px;
}

.fpa-tt-filtre {
	max-width: 160px;
}

.fpa-tt-recherche:focus,
.fpa-tt-filtre:focus {
	outline: 2px solid var(--fpa-accent, #007E9E);
	outline-offset: 1px;
}

.fpa-tt-compteur {
	font-size: 12.5px;
	color: var(--fpa-navy-soft, #52646D);
	margin-left: auto;
	white-space: nowrap;
}

.fpa-tt-reset {
	font-size: 12.5px;
	padding: 6px 12px;
}

.fpa-tt-th-bouton {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font: inherit;
	font-weight: 700;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	text-align: left;
}

.fpa-tt-th-bouton:hover,
.fpa-tt-th-bouton:focus-visible {
	text-decoration: underline;
}

th[aria-sort] .fpa-tt-th-bouton::after {
	content: "";
	width: 0;
	height: 0;
	margin-left: 2px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	opacity: .35;
}

th[aria-sort="none"] .fpa-tt-th-bouton::after {
	border-bottom: 5px solid currentColor;
}

th[aria-sort="ascending"] .fpa-tt-th-bouton::after {
	border-bottom: 5px solid currentColor;
	opacity: 1;
}

th[aria-sort="descending"] .fpa-tt-th-bouton::after {
	border-top: 5px solid currentColor;
	opacity: 1;
}

@media (max-width: 640px) {
	.fpa-tt-barre {
		flex-direction: column;
		align-items: stretch;
	}
	.fpa-tt-recherche,
	.fpa-tt-filtre {
		max-width: none;
		width: 100%;
	}
	.fpa-tt-compteur {
		margin-left: 0;
	}
}
