/* TTH — Catégories : rail défilant. Palette et rythme de la page d'accueil. */

.tthc {
	--tthc-paper: #ffffff;
	--tthc-band: #f6f9fc;
	--tthc-ink: #131f35;
	--tthc-body: #707070;
	--tthc-line: #e5e5e5;
	--tthc-red: #f50000;
	--tthc-font: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--tthc-w: 172px;

	font-family: var(--tthc-font);
}

.tthc *,
.tthc *::before,
.tthc *::after {
	box-sizing: border-box;
}

.tthc__wrap {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ---------- Rail ---------- */

.tthc .tthc__rail {
	display: flex;
	gap: 0;
	margin: 0;
	padding: 4px 0 6px;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.tthc .tthc__rail::-webkit-scrollbar {
	display: none;
}

.tthc .tthc__item {
	flex: 0 0 var(--tthc-w);
	max-width: var(--tthc-w);
	margin: 0;
	padding: 0;
	list-style: none;
	scroll-snap-align: start;
}

/* Le thème force color/border/box-shadow sur tout <a> : on neutralise ici et on
   pose les couleurs sur les <span> enfants. */
.tthc .tthc__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	padding: 14px 10px 18px;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

.tthc .tthc__link:focus-visible {
	outline: 2px solid var(--tthc-ink);
	outline-offset: 2px;
}

.tthc__chip {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: var(--tthc-band);
	box-shadow: inset 0 0 0 1px var(--tthc-line);
	transition:
		background-color 0.26s ease-out,
		box-shadow 0.26s ease-out,
		transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.tthc .tthc__icon {
	width: 46px;
	height: 46px;
	max-width: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.tthc__link:hover .tthc__chip,
.tthc__link:focus-visible .tthc__chip {
	background: var(--tthc-paper);
	box-shadow: inset 0 0 0 1px var(--tthc-red);
	transform: translateY(-4px);
}

.tthc__link:hover .tthc__icon,
.tthc__link:focus-visible .tthc__icon {
	transform: scale(1.06);
}

.tthc__label {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.45;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	color: var(--tthc-ink);
	transition: color 0.22s ease-out;
}

.tthc__link:hover .tthc__label,
.tthc__link:focus-visible .tthc__label {
	color: var(--tthc-ink);
}

/* ---------- Flèches ---------- */

.tthc__nav {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 26px;
}

.tthc .tthc__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--tthc-line) !important;
	border-radius: 50%;
	background-color: var(--tthc-paper) !important;
	background-image: none !important;
	box-shadow: none !important;
	color: var(--tthc-ink);
	cursor: pointer;
	transition:
		border-color 0.24s ease-out,
		color 0.24s ease-out,
		opacity 0.24s ease-out;
	-webkit-appearance: none;
	appearance: none;
}

.tthc .tthc__arrow:hover:not([disabled]),
.tthc .tthc__arrow:focus-visible:not([disabled]) {
	border-color: var(--tthc-red) !important;
	color: var(--tthc-red) !important;
	background-color: var(--tthc-paper) !important;
}

.tthc .tthc__arrow:focus-visible {
	outline: 2px solid var(--tthc-ink);
	outline-offset: 2px;
}

.tthc .tthc__arrow[disabled] {
	opacity: 0.3;
	cursor: default;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.tthc {
		--tthc-w: 158px;
	}

	.tthc__chip {
		width: 88px;
		height: 88px;
	}
}

@media (max-width: 640px) {
	.tthc {
		--tthc-w: 132px;
	}

	.tthc__wrap {
		padding: 0 14px;
	}

	.tthc .tthc__link {
		gap: 14px;
		padding: 10px 8px 14px;
	}

	.tthc__chip {
		width: 78px;
		height: 78px;
	}

	.tthc .tthc__icon {
		width: 38px;
		height: 38px;
	}

	.tthc__label {
		font-size: 11px;
		letter-spacing: 0.05em;
	}

	.tthc__nav {
		margin-top: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tthc .tthc__rail {
		scroll-behavior: auto;
	}

	.tthc *,
	.tthc *::before,
	.tthc *::after {
		transition-duration: 0.01ms !important;
	}
}
