/**
 * 40-accueil.css — Page d'accueil : le carrousel de la une, les rubriques,
 * la newsletter.
 *
 * @package Tresor_Sublime
 */

/* .ts-principal--bandeau est déclaré dans 20-layout.css : il sert aussi aux
   pages « À propos » et « La réalité mohammadienne », où cette feuille-ci
   n'est pas chargée. */

.ts-accueil-intro {
	padding-block: var(--ts-5);
}

/* ==============================================================
 * LA UNE — carrousel enluminé
 *
 * Les diapositives sont empilées dans la même cellule de grille : la
 * hauteur du bloc est celle de la plus haute, il n'y a donc aucun saut
 * de mise en page au changement de diapositive.
 * ============================================================ */

.ts-heros {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(80% 120% at 82% -10%, rgba(176, 141, 60, 0.16) 0%, transparent 62%),
		linear-gradient(168deg, var(--ts-panneau) 0%, var(--ts-panneau-2) 100%);
	color: var(--ts-panneau-encre);
	border-bottom: 1px solid var(--ts-panneau-filet);
	padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.ts-heros__scene {
	position: relative;
}

.ts-heros__pistes {
	display: grid;
}

.ts-heros__slide {
	grid-area: 1 / 1;
	display: grid;
	grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
	gap: clamp(1.75rem, 4vw, 3.5rem);
	align-items: center;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.65s ease, visibility 0.65s ease;
}

.ts-heros__slide.est-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* --- L'image, montée comme un tirage sous passe-partout ------ */

.ts-heros__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--ts-rayon);
	background-color: var(--ts-panneau-2);
}

/* Le filet de laiton en retrait : le cadre du tirage. */
.ts-heros__media::after {
	content: "";
	position: absolute;
	inset: 0.85rem;
	border: 1px solid rgba(220, 187, 104, 0.42);
	border-radius: var(--ts-rayon);
	pointer-events: none;
}

.ts-heros__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
	transform: scale(1.05);
	transition: transform 9s linear;
}

.ts-heros__slide.est-active .ts-heros__img {
	transform: scale(1);
}

.ts-heros__media--vide {
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--ts-titre);
	font-size: 4rem;
	color: rgba(220, 187, 104, 0.3);
}

/* --- Le texte ---------------------------------------------- */

.ts-heros__texte {
	min-width: 0;
}

/* Entrée décalée des éléments : le texte se pose après l'image. */
.ts-heros__texte > * {
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.ts-heros__slide.est-active .ts-heros__texte > * {
	opacity: 1;
	transform: none;
}

.ts-heros__slide.est-active .ts-heros__texte > *:nth-child(1) { transition-delay: 0.06s; }
.ts-heros__slide.est-active .ts-heros__texte > *:nth-child(2) { transition-delay: 0.12s; }
.ts-heros__slide.est-active .ts-heros__texte > *:nth-child(3) { transition-delay: 0.18s; }
.ts-heros__slide.est-active .ts-heros__texte > *:nth-child(4) { transition-delay: 0.24s; }
.ts-heros__slide.est-active .ts-heros__texte > *:nth-child(5) { transition-delay: 0.30s; }
.ts-heros__slide.est-active .ts-heros__texte > *:nth-child(6) { transition-delay: 0.36s; }

/* Le rang de la diapositive, en chiffres de titrage. */
.ts-heros__rang {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	margin: 0 0 var(--ts-2);
	font-family: var(--ts-titre);
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.ts-heros__rang-n {
	font-size: 2.4rem;
	color: var(--ts-laiton-clair);
}

.ts-heros__rang-t {
	font-family: var(--ts-rubr);
	font-size: 0.7rem;
	letter-spacing: 0.16em;
	color: var(--ts-panneau-douce);
}

/* Un filet part du numéro vers la droite : la ligne de titrage. */
.ts-heros__rang::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, var(--ts-panneau-filet), transparent);
	margin-bottom: 0.35rem;
}

.ts-heros .ts-rubrique,
.ts-heros .ts-rubrique a {
	color: var(--ts-laiton-clair);
}

.ts-heros__titre {
	margin: var(--ts-1) 0 var(--ts-2);
	font-size: clamp(2rem, 1.3rem + 2.9vw, 3.4rem);
	line-height: 1.06;
	color: var(--ts-panneau-encre);
}

.ts-heros__titre a {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(var(--ts-laiton-clair), var(--ts-laiton-clair));
	background-repeat: no-repeat;
	background-position: 0 92%;
	background-size: 0 1px;
	transition: background-size 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.ts-heros__titre a:hover,
.ts-heros__titre a:focus {
	background-size: 100% 1px;
}

.ts-heros .ts-meta {
	color: var(--ts-panneau-douce);
}

.ts-heros .ts-meta a {
	color: inherit;
}

.ts-heros__extrait {
	max-width: 46ch;
	margin: var(--ts-2) 0 var(--ts-3);
	font-size: var(--ts-t-1);
	color: var(--ts-panneau-douce);
}

/* --- Commandes ---------------------------------------------- */

.ts-heros__commandes {
	display: flex;
	align-items: center;
	gap: var(--ts-2);
	margin-top: var(--ts-4);
	padding-top: var(--ts-2);
}

.ts-heros__fleche,
.ts-heros__pause {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	flex: 0 0 auto;
	border: 1px solid var(--ts-panneau-filet);
	border-radius: 50%;
	background: none;
	color: var(--ts-panneau-encre);
	cursor: pointer;
	transition: background-color var(--ts-transit), color var(--ts-transit), border-color var(--ts-transit);
}

.ts-heros__fleche:hover,
.ts-heros__fleche:focus,
.ts-heros__pause:hover,
.ts-heros__pause:focus {
	background-color: var(--ts-laiton-clair);
	border-color: var(--ts-laiton-clair);
	color: var(--ts-panneau-2);
}

.ts-heros__fleche--prec svg {
	transform: rotate(180deg);
}

/* La pause se tient à l'écart : elle ne fait pas partie du parcours. */
.ts-heros__pause {
	margin-left: auto;
}

.ts-heros__fleche svg {
	width: 18px;
	height: 18px;
}

/* Le bouton pause : deux barres, puis un triangle une fois en pause. */
.ts-heros__pause-icone {
	display: block;
	width: 11px;
	height: 13px;
	border-left: 3px solid currentColor;
	border-right: 3px solid currentColor;
}

.ts-heros__pause[aria-pressed="true"] .ts-heros__pause-icone {
	width: 0;
	height: 0;
	border: 7px solid transparent;
	border-left: 12px solid currentColor;
	border-right: 0;
	margin-left: 3px;
}

.ts-heros__puces {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0.35rem;
	padding: 0;
	list-style: none;
}

.ts-heros__puces li {
	margin: 0;
}

.ts-heros__puce {
	display: block;
	width: 9px;
	height: 9px;
	padding: 0;
	border: 1px solid var(--ts-panneau-douce);
	border-radius: 0;
	background: none;
	cursor: pointer;
	transform: rotate(45deg);
	transition: background-color var(--ts-transit), border-color var(--ts-transit), transform var(--ts-transit);
}

.ts-heros__puce:hover,
.ts-heros__puce:focus {
	border-color: var(--ts-laiton-clair);
	background-color: var(--ts-laiton-clair);
}

.ts-heros__puce.est-active {
	background-color: var(--ts-laiton-clair);
	border-color: var(--ts-laiton-clair);
	transform: rotate(45deg) scale(1.35);
}

/* --- Jauge de défilement ------------------------------------ */

.ts-heros__jauge {
	position: relative;
	height: 1px;
	margin-top: var(--ts-2);
	background-color: var(--ts-panneau-filet);
	overflow: hidden;
}

.ts-heros__jauge span {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background-color: var(--ts-laiton-clair);
}

.ts-heros__jauge span.est-en-cours {
	transition: width linear;
}

/* --- Petits écrans ------------------------------------------ */

@media (max-width: 860px) {
	.ts-heros__slide {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--ts-3);
	}

	.ts-heros__media {
		aspect-ratio: 16 / 10;
	}

	.ts-heros__media::after {
		inset: 0.6rem;
	}

	.ts-heros__rang-n {
		font-size: 1.9rem;
	}
}

@media (max-width: 640px) {
	.ts-heros__commandes {
		margin-top: var(--ts-3);
		gap: 0.6rem;
	}

	/* Les cibles restent au format du pouce, même resserrées. */
	.ts-heros__fleche,
	.ts-heros__pause {
		width: 44px;
		height: 44px;
	}

	.ts-heros__extrait {
		margin-bottom: var(--ts-2);
	}

	.ts-heros__rang {
		margin-bottom: var(--ts-1);
	}

	/* Trois lignes suffisent à donner envie ; le reste est dans l'article. */
	.ts-heros__extrait {
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
}

@media (max-width: 400px) {
	.ts-heros__commandes {
		gap: 0.4rem;
	}

	.ts-heros__puces {
		margin-inline: 0.15rem;
		gap: 0.45rem;
	}
}

/* --- Mouvement réduit : on garde le fondu, on retire le reste - */

@media (prefers-reduced-motion: reduce) {
	.ts-heros__img,
	.ts-heros__texte > * {
		transform: none !important;
		transition: none !important;
	}

	.ts-heros__jauge {
		display: none;
	}
}

/* ==============================================================
 * DERNIÈRES PUBLICATIONS
 * ============================================================ */

.ts-recents {
	padding-block: var(--ts-5);
}

.ts-section__entete {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--ts-2);
	margin-bottom: var(--ts-3);
	padding-bottom: var(--ts-2);
	border-bottom: 1px solid var(--ts-filet-fort);
}

.ts-section__titre {
	margin: 0;
	font-size: var(--ts-t-3);
}

.ts-section__lien {
	font-family: var(--ts-rubr);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ts-laiton);
}

.ts-section__lien:hover,
.ts-section__lien:focus {
	color: var(--ts-vert);
	text-decoration: underline;
}

/* ==============================================================
 * PAR RUBRIQUE — trois colonnes, sans vignette
 * ============================================================ */

.ts-rubriques {
	padding-block: var(--ts-5);
	border-top: 1px solid var(--ts-filet);
}

.ts-rubriques__grille {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	gap: var(--ts-4) var(--ts-5);
}

.ts-rubrique-bloc__titre {
	margin: 0 0 var(--ts-2);
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--ts-filet);
	font-size: var(--ts-t-2);
}

.ts-rubrique-bloc__titre a {
	color: var(--ts-encre);
	text-decoration: none;
}

.ts-rubrique-bloc__titre a:hover,
.ts-rubrique-bloc__titre a:focus {
	color: var(--ts-vert);
}

.ts-rubrique-bloc ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ts-rubrique-bloc li {
	display: grid;
	grid-template-columns: 1.4rem minmax(0, 1fr);
	gap: 0.6rem;
	align-items: baseline;
	margin: 0;
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--ts-filet);
}

.ts-rubrique-bloc li:last-child {
	border-bottom: 0;
}

.ts-rubrique-bloc .ts-ornement {
	font-size: 0.85rem;
}

.ts-rubrique-bloc a {
	font-family: var(--ts-titre);
	font-size: 1.06rem;
	line-height: 1.3;
	color: var(--ts-encre);
	text-decoration: none;
}

.ts-rubrique-bloc a:hover,
.ts-rubrique-bloc a:focus {
	color: var(--ts-vert);
	text-decoration: underline;
	text-decoration-color: var(--ts-laiton);
}

.ts-rubrique-bloc .ts-meta {
	margin-top: 0.2rem;
	font-size: 0.68rem;
}
