/* K-Table — styles front minimalistes. */

.ktable-wrap {
	margin: 1.2em 0;
	font-size: 0.95rem;
}

.ktable-title {
	font-weight: 600;
	font-size: 1.1em;
	margin-bottom: 0.5em;
}

.ktable-toolbar {
	display: flex;
	align-items: center;
	gap: 0.75em;
	margin-bottom: 0.6em;
}

.ktable-search {
	flex: 0 1 260px;
	max-width: 100%;
	padding: 0.4em 0.6em;
	border: 1px solid #cfd4da;
	border-radius: 6px;
	font: inherit;
}

.ktable-count {
	color: #6b7280;
	font-size: 0.85em;
}

.ktable-scroll-wrap {
	position: relative;
}

.ktable-scroll {
	overflow-x: auto;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}

.ktable-fade {
	display: none;
}

.ktable-scroll-hint {
	display: none;
	margin: 0.5em 0 0;
	color: #646970;
	font-size: 12px;
	line-height: 1.5;
}

table.ktable {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	background: #fff;
}

.ktable-caption {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

table.ktable th,
table.ktable td {
	text-align: left;
	padding: 0.55em 0.8em;
	overflow-wrap: break-word;
	border-bottom: 1px solid #eef0f2;
	vertical-align: top;
}

table.ktable thead th {
	background: #f7f8fa;
	font-weight: 600;
	white-space: normal;
	border-bottom: 2px solid #e5e7eb;
	position: sticky;
	top: 0;
}

table.ktable th.ktable-sortable {
	cursor: pointer;
	user-select: none;
}

table.ktable th.ktable-sortable:hover {
	background: #eef1f5;
}

/* Vrai bouton dans l'en-tête : la sémantique de colonne est conservée. */
.ktable-sort-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: inherit;
	cursor: pointer;
}

.ktable-sort-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.ktable-arrow {
	display: inline-block;
	width: 0.8em;
	margin-left: 0.35em;
	color: #9aa2ad;
	font-size: 0.85em;
}

th.ktable-asc .ktable-arrow,
th.ktable-desc .ktable-arrow { font-size: 0; }
th.ktable-asc .ktable-arrow::after { content: "▲"; font-size: 0.85em; color: #374151; }
th.ktable-desc .ktable-arrow::after { content: "▼"; font-size: 0.85em; color: #374151; }

table.ktable tbody tr:nth-child(even) td {
	background: #fbfcfd;
}

table.ktable tbody tr:hover td {
	background: #f2f6fb;
}

/* Couleur héritée du thème : ne jamais coder la couleur d'un lien en dur. */
table.ktable a {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
table.ktable a:hover {
	text-decoration-thickness: 2px;
}

table.ktable .ktable-email,
table.ktable .ktable-url {
	overflow-wrap: break-word;
	word-break: normal;
}
table.ktable .ktable-email {
	white-space: nowrap;
}

.ktable-empty {
	color: #6b7280;
	font-style: italic;
	margin: 0.6em 0;
}

.ktable-total {
	color: #4b5563;
	font-size: 0.9em;
	margin-bottom: 0.5em;
}

/* Bordures visibles (grille complète). */
table.ktable-bordered th,
table.ktable-bordered td {
	border: 1px solid #d1d5db;
}
table.ktable-bordered thead th {
	border-bottom: 2px solid #b8bfc9;
}

/* Sans bordures de cellules. */
table.ktable-borderless th,
table.ktable-borderless td {
	border: 0;
}
table.ktable-borderless thead th {
	border-bottom: 1px solid #e5e7eb;
}

tr.ktable-hidden {
	display: none;
}

/* Petits écrans : compact, le conteneur reste défilable horizontalement. */
@media (max-width: 600px) {
	/* Lisibilité pour le public visé : jamais moins de 14 px. */
	.ktable-wrap {
		font-size: 1rem;
	}

	/* Pas de largeur minimale forcée : un petit tableau tient, un grand défile. */
	table.ktable {
		min-width: 0;
		table-layout: auto;
	}

	table.ktable th,
	table.ktable td {
		padding: 0.45em 0.4em;
	}

	.ktable-count {
		font-size: 0.9em;
	}

	.ktable-scroll-hint {
		font-size: 0.875rem;
	}

	.ktable-toolbar {
		gap: 0.4em;
	}

	.ktable-fade {
		display: block;
		position: absolute;
		top: 1px;
		right: 1px;
		bottom: 1px;
		width: 28px;
		border-radius: 0 8px 8px 0;
		background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 85%);
		pointer-events: none;
	}

	.ktable-scroll-hint {
		display: block;
	}
}

/* ==== 0.4.2 — finition ==== */
.ktable-search {
	padding-left: 2.1em;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5'/%3E%3Cpath d='M13 13l4.5 4.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 0.65em center;
	background-size: 1em;
}
.ktable-search:focus {
	border-color: #2563eb;
	outline: 2px solid #2563eb;
	outline-offset: 1px;
}
.ktable-scroll {
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
.ktable-scroll:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}
table.ktable td {
	line-height: 1.45;
}
table.ktable .ktable-type-number {
	font-variant-numeric: tabular-nums;
}

/* Colonne masquée sur téléphone (réglage par colonne). */
@media (max-width: 600px) {
	table.ktable th.ktable-hide-mobile,
	table.ktable td.ktable-hide-mobile {
		display: none;
	}
}
