/* Tableaux des pages (horaires, programmes…) : présentés en carte, lisibles ligne à ligne. */
.ebtp-tableau__titre {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 30px 0 12px;
	color: var(--ebtp-encre);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
}
.ebtp-tableau__titre::before {
	content: "";
	flex: 0 0 4px;
	align-self: stretch;
	min-height: 22px;
	border-radius: 2px;
	background: var(--ebtp-tableau-c, var(--ebtp-orange));
}

.page-wrapper .col-inner > table,
.page-wrapper .entry-content > table,
.page-wrapper .col-inner > p + table {
	width: 100%;
	margin: 0 0 24px;
	border: 1px solid var(--ebtp-filet);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 8px;
	overflow: hidden;
	font-size: 15px;
	background: #fff;
}
.page-wrapper .col-inner > table td,
.page-wrapper .col-inner > table th,
.page-wrapper .entry-content > table td,
.page-wrapper .entry-content > table th {
	padding: 10px 16px;
	border: 0;
	border-bottom: 1px solid #edf0f3;
	color: #2d3946;
	line-height: 1.4;
	vertical-align: middle;
	font-variant-numeric: tabular-nums;
}
.page-wrapper .col-inner > table tr:last-child td,
.page-wrapper .entry-content > table tr:last-child td { border-bottom: 0; }
/* 1re ligne = en-tête (1ère / Terminale…) */
.page-wrapper .col-inner > table tr:first-child td,
.page-wrapper .col-inner > table th,
.page-wrapper .entry-content > table tr:first-child td {
	padding-top: 12px;
	padding-bottom: 12px;
	background: #f4f6f8;
	border-bottom: 1px solid var(--ebtp-filet);
	color: var(--ebtp-encre);
	font-weight: 700;
	line-height: 1.35;
}
.page-wrapper .col-inner > table tr:first-child td br + br,
.page-wrapper .col-inner > table tr:first-child sup br { display: none; }
/* Une ligne sur deux légèrement teintée */
.page-wrapper .col-inner > table tr:nth-child(odd):not(:first-child) td,
.page-wrapper .entry-content > table tr:nth-child(odd):not(:first-child) td { background: #fafbfc; }
.page-wrapper .col-inner > table tr:not(:first-child):hover td { background: #f1f4f7; }


@media (max-width: 549px) {
	.page-wrapper .col-inner > table { display: block; overflow-x: auto; }
	.page-wrapper .col-inner > table td { padding: 9px 10px; font-size: 14px; }
}

/* Tableaux qui ont déjà leurs couleurs (ligne ou cellule colorée dans l'éditeur) : on les respecte. */
.page-wrapper table tr[style*="background"] > td:not([style*="background"]),
.page-wrapper table tr[style*="background"]:hover > td:not([style*="background"]) { background: transparent !important; }
.page-wrapper table tr[style*="background"] > td { border-bottom-color: rgba(255, 255, 255, .18); }
.page-wrapper table tr[style*="color"] > td:not([style*="color"]) { color: inherit; }
.page-wrapper .col-inner > table td[style*="background"] { background-clip: padding-box; }
/* Cellule colorée : sa couleur l'emporte sur le fond de l'en-tête et le zébrage. */
.page-wrapper table td[style*="background"], .page-wrapper table th[style*="background"] { border-bottom-color: rgba(255, 255, 255, .2); }

/* Largeurs de colonnes enregistrées par l'éditeur (souvent absurdes : 299 %, 697px…) : ignorées,
   le navigateur répartit les colonnes selon leur contenu. */
.page-wrapper table { table-layout: auto !important; width: 100% !important; height: auto !important; }
.page-wrapper table :is(td, th, tr, col) { width: auto !important; height: auto !important; }
/* Montants, heures, dates courtes : jamais coupés (classe posée par inc/fiches.php). */
.page-wrapper table td.ebtp-valeur { white-space: nowrap; }
.page-wrapper table td.ebtp-centre,
.page-wrapper table td.ebtp-centre :is(p, span, strong, b, em, div) { text-align: center !important; }
.page-wrapper table td:first-child:not(.ebtp-centre),
.page-wrapper table td:first-child:not(.ebtp-centre) :is(p, span, strong, b, em, div) { text-align: left !important; }

/* Lignes entièrement vides (laissées comme espacement dans l'éditeur) : masquées, elles faisaient des bandes vides. */
.page-wrapper table tr:not(:has(> :is(td, th):not(:empty))) { display: none; }
