/* Faure Références — reprend la présentation de l'ancien tableau wpDataTables. */
.fe-ref {
	--fe-text: #888;
	--fe-head: #333;
	--fe-line: #e0e0e0;
	--fe-head-line: #ccc;
	--fe-stripe: #f5f5f5;
	--fe-accent: #6ab04c;
	font-size: 14px;
	margin: 0 0 2em;
}

.fe-ref__title { margin: 0 0 1em; }

/* Filtres */
.fe-ref__filters {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 24px 40px;
	margin: 0 0 32px;
	padding: 0 20px;
}
.fe-ref__filter label {
	display: block;
	font-weight: 700;
	color: #777;
	margin-bottom: 6px;
}
.fe-ref__filter input {
	width: 100%;
	box-sizing: border-box;
	border: 0;
	border-bottom: 1px solid var(--fe-head-line);
	border-radius: 0;
	background: transparent;
	padding: 6px 0;
	font: inherit;
	color: #555;
	box-shadow: none;
}
.fe-ref__filter input:focus {
	outline: none;
	border-bottom-color: var(--fe-accent);
}
.fe-ref__filter--actions { display: flex; align-items: flex-end; }
.fe-ref__clear {
	background: none;
	border: 1px solid var(--fe-head-line);
	border-radius: 3px;
	padding: 6px 16px;
	font: inherit;
	color: #555;
	cursor: pointer;
}
.fe-ref__clear:hover { border-color: var(--fe-accent); color: var(--fe-accent); }

/* Barre : nombre de lignes + recherche */
.fe-ref__toolbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
	color: #666;
}
.fe-ref__length select {
	margin: 0 4px;
	padding: 4px 6px;
	width: auto;
	display: inline-block;
}
.fe-ref__search input {
	min-width: 220px;
	padding: 6px 10px;
	border: 1px solid var(--fe-head-line);
	border-radius: 3px;
	font: inherit;
}

/* Tableau */
.fe-ref__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fe-ref__table {
	width: 100%;
	min-width: 760px;
	border-collapse: collapse;
	margin: 0;
}
.fe-ref__table th,
.fe-ref__table td {
	text-align: left;
	border: 0;
	border-bottom: 1px solid var(--fe-line);
	padding: 6px 10px;
	vertical-align: top;
}
.fe-ref__table td { color: var(--fe-text); }
.fe-ref__table tbody tr:nth-child(odd) td { background: var(--fe-stripe); }
.fe-ref__table tbody tr:hover td { background: #ebf3e6; color: #555; }
.fe-ref__table th {
	background: #fff;
	border-bottom: 2px solid var(--fe-head-line);
	padding: 0;
	white-space: nowrap;
}
.fe-ref__table th button {
	all: unset;
	box-sizing: border-box;
	display: block;
	width: 100%;
	padding: 8px 22px 8px 10px;
	font-weight: 700;
	color: var(--fe-head);
	cursor: pointer;
	position: relative;
}
.fe-ref__table th button::after {
	content: "⇅";
	position: absolute;
	right: 6px;
	opacity: .3;
	font-weight: 400;
}
.fe-ref__table th[aria-sort="ascending"] button::after { content: "▲"; opacity: .8; font-size: .7em; top: 50%; transform: translateY(-50%); }
.fe-ref__table th[aria-sort="descending"] button::after { content: "▼"; opacity: .8; font-size: .7em; top: 50%; transform: translateY(-50%); }
.fe-ref__table th button:focus-visible { outline: 2px solid var(--fe-accent); outline-offset: -2px; }
.fe-ref__table .is-num { text-align: right; }
.fe-ref__empty { text-align: center !important; padding: 20px !important; }

/* Pied : info + pagination */
.fe-ref__footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 14px;
	color: #666;
	font-size: 13px;
}
.fe-ref__pages { display: flex; flex-wrap: wrap; gap: 2px; }
.fe-ref__pages button {
	min-width: 34px;
	padding: 6px 10px;
	border: 0;
	border-radius: 2px;
	background: transparent;
	color: #666;
	font: inherit;
	cursor: pointer;
}
.fe-ref__pages button:hover:not(:disabled) { background: #f0f0f0; }
.fe-ref__pages button.is-current { background: #e8e8e8; color: #333; }
.fe-ref__pages button:disabled { opacity: .35; cursor: default; }
.fe-ref__ellipsis { padding: 6px 4px; }

/* Mobile : une fiche par référence */
@media (max-width: 700px) {
	.fe-ref__filters { padding: 0; gap: 16px; }
	.fe-ref__search input { min-width: 0; width: 100%; }
	.fe-ref__search { flex: 1 1 100%; }
	.fe-ref__table { min-width: 0; }
	.fe-ref__table thead { display: none; }
	.fe-ref__table, .fe-ref__table tbody, .fe-ref__table tr, .fe-ref__table td { display: block; width: 100%; box-sizing: border-box; }
	.fe-ref__table tr { border: 1px solid var(--fe-line); margin-bottom: 10px; }
	.fe-ref__table tbody tr:nth-child(odd) td { background: transparent; }
	.fe-ref__table td {
		display: flex;
		gap: 10px;
		text-align: left !important;
		border-bottom: 1px solid #f0f0f0;
	}
	.fe-ref__table td::before {
		content: attr(data-label);
		flex: 0 0 42%;
		font-weight: 700;
		color: var(--fe-head);
	}
	.fe-ref__table td.fe-ref__empty::before { content: none; }
	.fe-ref__footer { justify-content: center; text-align: center; }
}
