/*
 * Rates tables (FR "tarifs", EN "rates"): one table per circuit, cabins grouped by category.
 * Loaded only when a Custom HTML block holding the tables renders (inc/assets.php).
 */
.rates {
	max-width: 940px;
	margin: 40px auto 0;
}

.rates-circuit {
	margin-bottom: 50px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--wp--preset--color--base);
	box-shadow: 0 8px 24px color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent);
}

.rates-circuit__head {
	padding: 22px 24px;
	background: var(--wp--preset--color--primary);
	text-align: center;
}

.rates-circuit--grand-tour .rates-circuit__head {
	background: var(--wp--preset--color--primary-mid);
}

.rates .rates-circuit__name {
	margin: 0;
	color: var(--wp--preset--color--base);
	font-size: 26px;
	letter-spacing: 0;
}

.rates .rates-circuit__route {
	margin: 6px 0 0;
	color: color-mix(in srgb, var(--wp--preset--color--base) 85%, transparent);
	font-size: var(--wp--preset--font-size--medium);
	letter-spacing: 0.04em;
}

.rates .rates-table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	table-layout: fixed;
}

.rates .rates-table th,
.rates .rates-table td {
	padding: 14px 24px;
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--sand-line);
	background: transparent;
	vertical-align: middle;
}

.rates .rates-table thead th {
	padding-top: 12px;
	padding-bottom: 12px;
	background: var(--wp--preset--color--sand-light);
	color: var(--wp--preset--color--sand-text);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-align: center;
	text-transform: uppercase;
}

.rates .rates-table thead th.rates-table__cabin {
	width: 40%;
	text-align: left;
}

.rates .rates-table tbody th[scope="row"] {
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	text-align: left;
}

.rates .rates-table td {
	text-align: center;
}

.rates .rates-table .rates-table__group th {
	padding-top: 10px;
	padding-bottom: 10px;
	background: var(--wp--preset--color--sand);
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium-plus);
	font-weight: 700;
	text-align: left;
}

.rates .rates-table tbody tr:last-child th,
.rates .rates-table tbody tr:last-child td {
	border-bottom: 0;
}

.rates-eur {
	display: block;
	color: var(--wp--preset--color--primary);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
}

.rates-xpf {
	display: block;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
	font-size: var(--wp--preset--font-size--small);
	white-space: nowrap;
}

.rates-none {
	color: var(--wp--preset--color--muted);
	font-size: 20px;
}

/* A single price spanning both price columns (family cabins): no column header describes it,
   so it shows its own label on every screen size. */
.rates .rates-table td.rates-table__span::before {
	content: attr(data-label);
	display: block;
	margin-bottom: 2px;
	color: var(--wp--preset--color--sand-text);
	font-size: 11px;
	line-height: 1.6;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Mobile: the cabin name spans the row, its two prices sit below with their column label.
   Each label is centred in a two-line box, so a label wrapping on two lines keeps both
   prices aligned and the one-line label level with it. */
@media (max-width: 599px) {
	.rates .rates-table thead {
		display: none;
	}

	.rates .rates-table,
	.rates .rates-table tbody {
		display: block;
	}

	.rates .rates-table tr {
		display: grid;
		grid-template-columns: 1fr 1fr;
		border-bottom: 1px solid var(--wp--preset--color--sand-line);
	}

	.rates .rates-table tbody tr:last-child {
		border-bottom: 0;
	}

	.rates .rates-table th,
	.rates .rates-table td {
		border-bottom: 0;
		padding: 8px 16px;
	}

	.rates .rates-table tbody th[scope="row"],
	.rates .rates-table .rates-table__group th {
		grid-column: 1 / -1;
	}

	.rates .rates-table tbody th[scope="row"] {
		padding-top: 14px;
		padding-bottom: 0;
	}

	.rates .rates-table td {
		padding-bottom: 14px;
	}

	.rates .rates-table td::before {
		content: attr(data-label);
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 3.2em;
		margin-bottom: 2px;
		color: var(--wp--preset--color--sand-text);
		font-size: 11px;
		line-height: 1.6;
		letter-spacing: 0.06em;
		text-transform: uppercase;
	}

	.rates .rates-table td.rates-table__span {
		grid-column: 1 / -1;
	}

	.rates .rates-table td.rates-table__span::before {
		min-height: 0;
	}

	.rates-circuit__head {
		padding: 18px 16px;
	}

	.rates .rates-circuit__name {
		font-size: 22px;
	}
}
