/* ==================================================
   UGCS — HORAIRES (front)
   ================================================== */

.ugcs-horaires {
	width: 100%;
	max-width: 1440px;

	margin: 40px auto 0;
	padding: 0;

	font-family: var(--global-body-font-family);

	color: #10162F;
}

.ugcs-horaires__header {
	margin-bottom: 32px;
}

.ugcs-horaires__eyebrow {
	margin: 0 0 10px;

	font-size: 16px;
	line-height: 1.3;
	font-weight: 600;

	color: #5B2167;
}

/*
 * Titre de section : typographie laissée à Kadence (Customizer, seule
 * source de vérité). Trait violet = ::after commun de .ugcs-titre-signe
 * (assets/css/titres.css du thème kadence-ugcs), à la place de l'ancien
 * span .ugcs-horaires__title-line (54 × 4 arrondi).
 */
.ugcs-horaires__title {
	margin: 0;

	color: #10162F;
}

.ugcs-horaires__intro {
	max-width: 900px;

	margin-top: 40px !important;
	margin-right: 0;
	margin-bottom: 0;
	margin-left: 0;

	font-size: 18px;
	line-height: 1.55;
	font-weight: 400;

	color: #34384B;
}

.ugcs-horaires__filters {
	display: flex;
	flex-wrap: wrap;

	gap: 8px;

	margin: 22px 0 0;
}

.ugcs-horaires__filter {
	padding: 8px 18px;

	background-color: #FFFFFF;

	border: 1px solid #A35BB5;
	border-radius: 999px;

	font-family: var(--global-body-font-family);
	font-size: 14px;
	font-weight: 600;

	color: #5B2167;

	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ugcs-horaires__filter:hover {
	background-color: #A35BB5;
	border-color: #A35BB5;

	color: #FFFFFF;
}

.ugcs-horaires__filter:focus-visible {
	outline: 2px solid #5B2167;
	outline-offset: 2px;
}

.ugcs-horaires__filter.is-active {
	background-color: #5B2167;
	border-color: #5B2167;

	color: #FFFFFF;
}

.ugcs-horaires__filter.is-active:hover {
	background-color: #5B2167;
	border-color: #5B2167;
}

.screen-reader-text {
	position: absolute !important;

	width: 1px;
	height: 1px;

	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.ugcs-horaires__table-wrapper {
	width: 100%;

	margin-top: 22px;

	overflow: hidden;

	background-color: #FFFFFF;

	border: 1px solid #DFD6E3;
	border-radius: 12px;
}

.ugcs-horaires__filters + .ugcs-horaires__table-wrapper,
.ugcs-horaires__filter-status + .ugcs-horaires__table-wrapper {
	margin-top: 18px;
}

.ugcs-horaires__table {
	width: 100%;

	margin: 0;
	border: 0;

	border-collapse: collapse;
	border-spacing: 0;

	table-layout: fixed;

	background-color: #FFFFFF;
}

.ugcs-horaires__time-heading,
.ugcs-horaires__time {
	width: 140px;
}

.ugcs-horaires__table thead {
	background-color: #5B2167;
}

.ugcs-horaires__table th {
	border: 0;
}

.ugcs-horaires__table thead th {
	padding: 20px 12px;

	border-left: 1px solid rgba(255, 255, 255, 0.38);

	text-align: center;
	vertical-align: middle;

	font-size: 15px;
	line-height: 1.2;
	font-weight: 700;

	color: #FFFFFF;
	text-transform: uppercase;
}

.ugcs-horaires__table thead th:first-child {
	border-left: 0;
}

.ugcs-horaires__table tbody tr:nth-child(odd) {
	background-color: #FBF9FC;
}

.ugcs-horaires__table tbody tr:nth-child(even) {
	background-color: #FFFFFF;
}

.ugcs-horaires__table tbody td,
.ugcs-horaires__table tbody th {
	padding: 18px 16px;

	border: 0;
	border-top: 1px solid #E7E2E9;
	border-left: 1px solid #E7E2E9;

	vertical-align: middle;
}

.ugcs-horaires__table tbody th:first-child {
	border-left: 0;
}

.ugcs-horaires__time {
	padding-left: 18px !important;
	padding-right: 18px !important;

	text-align: center;

	font-size: 15px;
	line-height: 1.3;
	font-weight: 700;

	color: #10162F;
	white-space: nowrap;
}

.ugcs-horaires__sessions {
	display: flex;
	flex-direction: column;
	align-items: stretch;

	gap: 8px;
}

.ugcs-horaires__session {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	width: 100%;
	min-height: 36px;

	padding: 7px 10px;

	background-color: #FBF8FC;

	border: 1px solid #DECBE4;
	border-radius: 7px;

	text-align: center;

	font-size: 14px;
	line-height: 1.25;
	font-weight: 600;

	color: #5B2167;
}

.ugcs-horaires__session-freq {
	margin-top: 2px;

	font-size: 11px;
	font-weight: 500;

	color: #8A5A99;
}

@media (hover: hover) {
	.ugcs-horaires__table tbody tr {
		transition: background-color 0.18s ease;
	}

	.ugcs-horaires__table tbody tr:hover {
		background-color: #F3ECF6;
	}
}

.ugcs-horaires__note {
	margin: 32px 0 0;

	text-align: right;

	font-size: 14px;
	line-height: 1.45;

	color: #686A78;
}

.ugcs-horaires__note--empty {
	text-align: center;
}

@media (max-width: 1100px) {
	.ugcs-horaires__table-wrapper {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.ugcs-horaires__table {
		min-width: 1050px;
	}
}

@media (max-width: 767px) {
	.ugcs-horaires__header {
		margin-bottom: 26px;
	}

	.ugcs-horaires__eyebrow {
		margin-bottom: 8px;
		font-size: 14px;
	}

	.ugcs-horaires__intro {
		margin-top: 26px;

		font-size: 16px;
		line-height: 1.5;
	}

	/*
	 * On conserve la logique planning : le tableau reste scrollable
	 * horizontalement plutôt que transformé en cartes, pour ne pas
	 * perdre la relation jour <-> horaire (cf. cahier des charges).
	 */
	.ugcs-horaires__table-wrapper {
		overflow-x: auto;
		border-radius: 10px;
	}

	.ugcs-horaires__table {
		min-width: 980px;
	}

	.ugcs-horaires__table thead th {
		padding: 16px 10px;
		font-size: 13px;
	}

	.ugcs-horaires__table tbody td,
	.ugcs-horaires__table tbody th {
		padding: 14px 12px;
	}

	.ugcs-horaires__time-heading,
	.ugcs-horaires__time {
		width: 122px;

		/* Colonne horaires collante au scroll horizontal (point 56 du cahier). */
		position: sticky;
		left: 0;

		background-color: inherit;
		z-index: 1;
	}

	.ugcs-horaires__time {
		font-size: 14px;
	}

	.ugcs-horaires__session {
		min-height: 32px;

		padding: 6px 8px;

		font-size: 13px;
	}

	.ugcs-horaires__note {
		font-size: 13px;
	}
}
