/*
 * Bloc Tea Lectrices — « Une expérience qui va au-delà de la lecture ».
 *
 * Palette des Tea Lectrices : bleu nuit, bordeaux, doré chaud, crème, rose signature
 * (réservé aux interactions). Fond bordeaux et prune profonds, titres crème.
 * La mise en avant (relief, liseré doré, halo, ombre) suit --ltl-xp-une (0 à 1) et
 * --ltl-xp-pente (-1 à 1), posées par view.js sur chaque carte ; son amplitude dépend
 * de la largeur de l'écran (--ltl-xp-echelle, --ltl-xp-rotation, --ltl-xp-voile).
 */

@property --ltl-xp-survol {
	syntax: "<number>";
	inherits: true;
	initial-value: 0;
}

.ltl-tea-xp {
	--ltl-xp-nuit: #111b3a;
	--ltl-xp-bordeaux: #7d294b;
	--ltl-xp-or: #d9a65a;
	--ltl-xp-or-vif: #ebc27a;
	--ltl-xp-creme: #f3e8dc;
	--ltl-xp-rose: #f52c91;
	--ltl-xp-serif: Georgia, "Times New Roman", serif;
	--ltl-xp-carte: clamp(224px, 70vw, 290px);
	--ltl-xp-ecart: 14px;
	--ltl-xp-fondu: 18px;
	--ltl-xp-echelle: 0.035;
	--ltl-xp-rotation: 0deg;
	--ltl-xp-voile: 0.14;
	position: relative;
	overflow: hidden;
	padding: 60px 0 48px;
	background:
		radial-gradient(ellipse 70% 42% at 50% 0, rgba(217, 166, 90, 0.16) 0, rgba(217, 166, 90, 0) 100%),
		radial-gradient(circle at 0 100%, rgba(245, 44, 145, 0.08) 0, rgba(245, 44, 145, 0) 420px),
		linear-gradient(180deg, #561a35 0, #3f1027 55%, #2c0a1d 100%);
	color: var(--ltl-xp-creme);
}

.ltl-tea-xp [hidden] {
	display: none !important;
}

.ltl-tea-xp__contenu {
	display: flex;
	flex-direction: column;
	gap: 26px;
	max-width: var(--ltl-largeur-max);
	margin: 0 auto;
	padding-inline: var(--ltl-gouttiere);
}

/* ------------------------------------------------------------------ */
/* En-tête                                                             */
/* ------------------------------------------------------------------ */

.ltl-tea-xp__entete {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
}

.ltl-tea-xp__titre {
	color: var(--ltl-xp-creme);
	font-family: var(--ltl-xp-serif);
	font-size: clamp(31px, 8.2vw, 60px);
	font-weight: 700;
	line-height: 1.06;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.ltl-tea-xp__titre em {
	display: block;
	color: var(--ltl-xp-or);
	font-style: normal;
}

.ltl-tea-xp__ornement {
	position: relative;
	display: block;
	width: 168px;
	height: 1px;
	background: linear-gradient(90deg, rgba(217, 166, 90, 0) 0, var(--ltl-xp-or) 32%, var(--ltl-xp-or) 68%, rgba(217, 166, 90, 0) 100%);
}

.ltl-tea-xp__ornement::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	border: 1.5px solid var(--ltl-xp-or);
	background: #4f1630;
	transform: translate(-50%, -50%) rotate(45deg);
}

.ltl-tea-xp__intro {
	max-width: 54ch;
	color: rgba(243, 232, 220, 0.9);
	font-size: clamp(16px, 2.3vw, 20px);
	line-height: 1.5;
	text-wrap: pretty;
}

/* ------------------------------------------------------------------ */
/* Filtres : une ligne défilable sur mobile, centrés sur ordinateur    */
/* ------------------------------------------------------------------ */

.ltl-tea-xp__filtres {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	margin-inline: calc(var(--ltl-gouttiere) * -1);
	padding: 4px var(--ltl-gouttiere) 8px;
	overflow-x: auto;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}

.ltl-tea-xp__filtres::-webkit-scrollbar {
	display: none;
}

.ltl-tea-xp__filtre {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 10px;
	min-height: 46px;
	margin: 0;
	padding: 0 18px 0 14px;
	border: 1px solid rgba(217, 166, 90, 0.72);
	border-radius: 999px;
	background: rgba(125, 41, 75, 0.55);
	color: var(--ltl-xp-creme);
	font-family: var(--ltl-font-texte);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.ltl-tea-xp__filtre-icone {
	display: inline-flex;
	color: var(--ltl-xp-or);
}

.ltl-tea-xp__filtre-icone svg {
	width: 20px;
	height: 20px;
}

.ltl-tea-xp__filtre:hover {
	border-color: var(--ltl-xp-or-vif);
	background: var(--ltl-xp-bordeaux);
}

.ltl-tea-xp__filtre[aria-pressed="true"] {
	border-color: var(--ltl-xp-rose);
	background: var(--ltl-xp-rose);
	box-shadow: 0 10px 24px -12px rgba(245, 44, 145, 0.8);
	color: #fff;
}

.ltl-tea-xp__filtre[aria-pressed="true"] .ltl-tea-xp__filtre-icone {
	color: #fff;
}

.ltl-tea-xp__filtre:focus-visible,
.ltl-tea-xp__pause:focus-visible,
.ltl-tea-xp__nav:focus-visible,
.ltl-tea-xp__lien:focus-visible {
	outline: 3px solid var(--ltl-xp-creme);
	outline-offset: 3px;
}

/* ------------------------------------------------------------------ */
/* Galerie : deux rangées, pleine largeur                              */
/* ------------------------------------------------------------------ */

.ltl-tea-xp__galerie {
	display: grid;
	grid-template-columns: minmax(0, 1fr); /* Rangées à la largeur de l'écran, pas à celle des cartes. */
	gap: 4px;
	margin-top: 22px;
	transition: opacity 0.2s ease;
}

.ltl-tea-xp__galerie.est-en-transition {
	opacity: 0;
}

.ltl-tea-xp__rangee {
	position: relative;
}

/* Fenêtre de la rangée : défilable à la main sans JavaScript ; en défilement
 * automatique, view.js déplace la piste (overflow masqué). Marge haute et basse : place
 * pour le relief et l'ombre de la carte mise en avant. Bords en fondu. */
.ltl-tea-xp__fenetre {
	padding-block: 18px 30px;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scrollbar-width: thin;
	scrollbar-color: rgba(217, 166, 90, 0.5) transparent;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--ltl-xp-fondu), #000 calc(100% - var(--ltl-xp-fondu)), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 var(--ltl-xp-fondu), #000 calc(100% - var(--ltl-xp-fondu)), transparent 100%);
}

.ltl-tea-xp__fenetre:focus {
	outline: none;
}

.ltl-tea-xp__fenetre:focus-visible {
	box-shadow: inset 0 0 0 2px rgba(217, 166, 90, 0.9);
	border-radius: 18px;
}

.ltl-tea-xp.est-active:not(.est-manuelle) .ltl-tea-xp__fenetre {
	overflow: hidden;
}

.ltl-tea-xp.est-manuelle .ltl-tea-xp__fenetre {
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--ltl-gouttiere);
	scrollbar-width: none;
}

.ltl-tea-xp.est-manuelle .ltl-tea-xp__fenetre::-webkit-scrollbar {
	display: none;
}

.ltl-tea-xp__rangee.est-animee .ltl-tea-xp__fenetre {
	cursor: grab;
	touch-action: pan-y;
	-webkit-user-select: none;
	user-select: none;
}

.ltl-tea-xp__rangee.est-glissee .ltl-tea-xp__fenetre {
	cursor: grabbing;
}

.ltl-tea-xp__piste {
	position: relative;
	display: flex;
	gap: var(--ltl-xp-ecart);
	width: max-content;
	margin: 0 auto;
	padding: 0 var(--ltl-gouttiere);
	list-style: none;
}

.ltl-tea-xp__rangee.est-animee .ltl-tea-xp__piste {
	margin: 0;
	padding: 0;
	will-change: transform;
}

.ltl-tea-xp__element {
	--ltl-xp-une: 0;
	--ltl-xp-pente: 0;
	position: relative;
	z-index: 1;
	display: flex;
	flex: none;
	width: var(--ltl-xp-carte);
	margin: 0;
	padding: 0;
}

.ltl-tea-xp.est-manuelle .ltl-tea-xp__element {
	scroll-snap-align: center;
}

.ltl-tea-xp__element.est-une {
	z-index: 2;
}

/* ------------------------------------------------------------------ */
/* Carte                                                               */
/* ------------------------------------------------------------------ */

.ltl-tea-xp__carte {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	border: 1px solid rgba(217, 166, 90, 0.26);
	border-radius: 18px;
	background: linear-gradient(180deg, #5c1a37 0, #48122b 100%);
	box-shadow: 0 18px 36px -22px rgba(0, 0, 0, 0.7);
	transform:
		perspective(1000px)
		translateY(calc(var(--ltl-xp-survol) * -6px))
		rotateY(calc(var(--ltl-xp-pente) * var(--ltl-xp-rotation) * -1))
		scale(calc(1 + var(--ltl-xp-une) * var(--ltl-xp-echelle)));
	transition: --ltl-xp-survol 0.3s var(--ltl-ease);
	backface-visibility: hidden;
}

/* Voile discret sur les cartes éloignées du centre : la carte mise en avant ressort. */
.ltl-tea-xp__carte::before {
	content: "";
	position: absolute;
	z-index: 2;
	inset: 0;
	border-radius: inherit;
	background: #14060f;
	opacity: calc((1 - var(--ltl-xp-une)) * var(--ltl-xp-voile));
	pointer-events: none;
}

/* Liseré doré illuminé, halo et ombre profonde de la carte mise en avant. */
.ltl-tea-xp__carte::after {
	content: "";
	position: absolute;
	z-index: 3;
	inset: -1px;
	border: 1.5px solid var(--ltl-xp-or-vif);
	border-radius: 19px;
	box-shadow:
		0 0 0 1px rgba(217, 166, 90, 0.22),
		0 0 22px 1px rgba(217, 166, 90, 0.3),
		0 34px 60px -24px rgba(0, 0, 0, 0.85);
	opacity: max(var(--ltl-xp-une), calc(var(--ltl-xp-survol) * 0.55));
	pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
	.ltl-tea-xp__element:hover {
		z-index: 3;
	}

	.ltl-tea-xp__carte:hover {
		--ltl-xp-survol: 1;
	}
}

.ltl-tea-xp__visuel {
	position: relative;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: 17px 17px 0 0;
	background: radial-gradient(circle at 50% 45%, #6e2244 0, #3a0f24 75%);
}

.ltl-tea-xp__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	-webkit-user-drag: none;
}

/* Visuel d'attente (illustration à venir) : bordeaux et bleu nuit, cadre et médaillon dorés. */
.ltl-tea-xp__attente {
	position: relative;
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background:
		radial-gradient(circle at 50% 46%, rgba(217, 166, 90, 0.26) 0, rgba(217, 166, 90, 0) 46%),
		repeating-linear-gradient(135deg, rgba(217, 166, 90, 0.07) 0 1px, rgba(217, 166, 90, 0) 1px 16px),
		linear-gradient(155deg, var(--ltl-xp-bordeaux) 0, #4a1230 52%, var(--ltl-xp-nuit) 120%);
}

.ltl-tea-xp__attente::before,
.ltl-tea-xp__attente::after {
	content: "";
	position: absolute;
	border-radius: 12px;
	pointer-events: none;
}

.ltl-tea-xp__attente::before {
	inset: 12px;
	border: 1px solid rgba(217, 166, 90, 0.4);
}

.ltl-tea-xp__attente::after {
	inset: 17px;
	border: 1px solid rgba(217, 166, 90, 0.16);
}

.ltl-tea-xp__medaillon {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 92px;
	height: 92px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #8a3157 0, #4a1230 72%);
	box-shadow:
		0 0 0 1px rgba(217, 166, 90, 0.85),
		0 0 0 7px rgba(217, 166, 90, 0.1),
		0 0 0 8px rgba(217, 166, 90, 0.45),
		0 14px 30px -10px rgba(0, 0, 0, 0.6);
	color: var(--ltl-xp-or-vif);
}

.ltl-tea-xp__medaillon svg {
	width: 44px;
	height: 44px;
}

.ltl-tea-xp__corps {
	display: grid;
	flex: 1;
	grid-template-columns: minmax(0, 1fr) auto;
	align-content: start;
	column-gap: 12px;
	padding: 16px 18px 20px;
}

.ltl-tea-xp__nom {
	grid-column: 1 / -1;
	margin-bottom: 8px;
	color: var(--ltl-xp-creme);
	font-family: var(--ltl-font-texte);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.25;
}

.ltl-tea-xp__texte {
	color: rgba(243, 232, 220, 0.82);
	font-size: 14.5px;
	line-height: 1.5;
	text-wrap: pretty;
}

.ltl-tea-xp__lien {
	display: grid;
	place-items: center;
	align-self: end;
	width: 40px;
	height: 40px;
	border: 1.5px solid var(--ltl-xp-or);
	border-radius: 50%;
	color: var(--ltl-xp-or);
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ltl-tea-xp__lien svg {
	width: 18px;
	height: 18px;
}

.ltl-tea-xp__lien:hover {
	background: var(--ltl-xp-or);
	color: var(--ltl-xp-nuit);
}

/* ------------------------------------------------------------------ */
/* Boutons ‹ › d'une rangée : au survol, au clavier, en pause, à la main */
/* ------------------------------------------------------------------ */

.ltl-tea-xp__nav {
	position: absolute;
	z-index: 5;
	top: calc(50% - 6px);
	display: none;
	place-items: center;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(217, 166, 90, 0.8);
	border-radius: 50%;
	background: rgba(43, 10, 29, 0.88);
	color: var(--ltl-xp-creme);
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transform: translateY(-50%);
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.ltl-tea-xp__nav svg {
	width: 20px;
	height: 20px;
}

.ltl-tea-xp__nav--prec {
	left: max(8px, calc(var(--ltl-gouttiere) - 24px));
}

.ltl-tea-xp__nav--suiv {
	right: max(8px, calc(var(--ltl-gouttiere) - 24px));
}

.ltl-tea-xp__rangee.est-defilante .ltl-tea-xp__nav {
	display: grid;
}

.ltl-tea-xp__nav:hover {
	background: var(--ltl-xp-bordeaux);
}

.ltl-tea-xp.est-en-pause .ltl-tea-xp__nav,
.ltl-tea-xp.est-manuelle .ltl-tea-xp__nav,
.ltl-tea-xp__nav:focus-visible {
	opacity: 1;
	pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
	.ltl-tea-xp__rangee:hover .ltl-tea-xp__nav {
		opacity: 1;
		pointer-events: auto;
	}
}

/* ------------------------------------------------------------------ */
/* Pause et annonce                                                    */
/* ------------------------------------------------------------------ */

.ltl-tea-xp__commandes {
	display: flex;
	justify-content: center;
	max-width: var(--ltl-largeur-max);
	margin: 6px auto 0;
	padding-inline: var(--ltl-gouttiere);
}

.ltl-tea-xp__pause {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	padding: 0 18px 0 14px;
	border: 1px solid rgba(243, 232, 220, 0.34);
	border-radius: 999px;
	background: transparent;
	color: var(--ltl-xp-creme);
	font-family: var(--ltl-font-texte);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ltl-tea-xp__pause:hover {
	border-color: var(--ltl-xp-or);
	background: rgba(125, 41, 75, 0.45);
}

.ltl-tea-xp__pause-icone {
	width: 18px;
	height: 18px;
	color: var(--ltl-xp-or);
}

.ltl-tea-xp__pause-lecture,
.ltl-tea-xp__pause[aria-pressed="true"] .ltl-tea-xp__pause-barres {
	display: none;
}

.ltl-tea-xp__pause[aria-pressed="true"] .ltl-tea-xp__pause-lecture {
	display: inline;
}

.ltl-tea-xp__annonce {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Tablette et ordinateur                                              */
/* ------------------------------------------------------------------ */

@media (min-width: 700px) {
	.ltl-tea-xp {
		--ltl-xp-carte: clamp(250px, 31vw, 300px);
		--ltl-xp-ecart: 18px;
		--ltl-xp-fondu: 40px;
		--ltl-xp-echelle: 0.05;
		--ltl-xp-rotation: 4deg;
		--ltl-xp-voile: 0.2;
		padding: 76px 0 60px;
	}
}

@media (min-width: 900px) {
	.ltl-tea-xp__filtres {
		flex-wrap: wrap;
		justify-content: center;
		margin-inline: 0;
		padding: 4px 0;
		overflow: visible;
	}
}

@media (min-width: 1100px) {
	.ltl-tea-xp {
		--ltl-xp-carte: clamp(260px, 19.8vw, 400px);
		--ltl-xp-ecart: 20px;
		--ltl-xp-fondu: 72px;
		--ltl-xp-echelle: 0.07;
		--ltl-xp-rotation: 6deg;
		padding: 88px 0 68px;
	}

	.ltl-tea-xp__galerie {
		gap: 10px;
		margin-top: 30px;
	}

	/* Les huit filtres sur une ligne, comme sur la maquette (à la ligne si l'écran est plus étroit). */
	.ltl-tea-xp__filtres {
		gap: 8px;
		margin-inline: calc(var(--ltl-gouttiere) * -0.75);
	}

	.ltl-tea-xp__filtre {
		padding: 0 16px 0 12px;
		font-size: 14.5px;
	}
}

/* Animation réduite : aucun relief, la carte au centre garde son liseré doré. */
@media (prefers-reduced-motion: reduce) {
	.ltl-tea-xp {
		--ltl-xp-echelle: 0;
		--ltl-xp-rotation: 0deg;
	}

	.ltl-tea-xp__galerie,
	.ltl-tea-xp__carte {
		transition: none;
	}

	.ltl-tea-xp__carte:hover {
		--ltl-xp-survol: 0;
	}
}
