/*
 * novfr — Tableaux d'articles lisibles sur mobile
 * Chargé par inc/novfr-tableaux-mobile.php, sur les articles uniquement.
 * Ordinateur et tablette : tableau classique, défilement horizontal si besoin.
 * Sous 690 px (point de rupture mobile de Blocksy) : chaque ligne devient une carte.
 */

/* Conteneur : défilement horizontal de secours */
.nv-table {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.nv-table table {
	margin: 0;
	min-width: 560px;
}

/* Mobile : une carte par ligne */
@media (max-width: 689.98px) {

	.nv-table--cards {
		overflow: visible;
	}

	.nv-table--cards table {
		min-width: 0;
		--theme-table-border-width: 0;
	}

	.nv-table--cards table,
	.nv-table--cards tbody,
	.nv-table--cards tr,
	.nv-table--cards td,
	.nv-table--cards tbody th {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}

	/* En-tête masqué à l'écran, conservé pour les lecteurs d'écran */
	.nv-table--cards thead {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
		border: 0;
	}

	.nv-table--cards tr {
		margin: 0 0 12px;
		padding: 14px 16px;
		border: 1px solid var(--theme-border-color, #e1e8ed);
		border-radius: 8px;
		background: var(--theme-palette-color-7, #fafbfc);
	}

	.nv-table--cards tr:last-child {
		margin-bottom: 0;
	}

	.nv-table--cards td,
	.nv-table--cards tbody th {
		padding: 0;
		border: 0;
		text-align: left;
		font-weight: inherit;
	}

	.nv-table--cards tr > * + * {
		margin-top: 10px;
	}

	/* Intitulé de colonne rappelé au-dessus de chaque valeur */
	.nv-table--cards td::before,
	.nv-table--cards tbody th::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 2px;
		font-size: 0.8em;
		font-weight: 600;
		line-height: 1.4;
		color: var(--theme-headings-color, #192a3d);
	}

	/* 1re colonne : titre de la carte */
	.nv-table--cards tr > :first-child {
		padding-bottom: 10px;
		border-bottom: 1px solid var(--theme-border-color, #e1e8ed);
		font-weight: 600;
		color: var(--theme-headings-color, #192a3d);
	}

	.nv-table--cards tr > :first-child::before {
		content: none;
	}
}
