/* =========================================================================
   Léo Lagrange TV
   ====================================================================== */

@font-face {
	font-family: "Jost";
	src: url("fonts/jost-latin.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--rouge: #ff2627;
	--rouge-fonce: #e3191a;
	--encre: #111111;
	--texte-doux: #4a4a4a;
	--texte-discret: #5c5c5c;
	--trait: #e6e6e6;
	--fond-doux: #f4f4f4;
	--fond-vignette: #ebebeb;
	--marge: clamp(20px, 4vw, 56px);
	--police: "Neue Kabel", "Jost", system-ui, sans-serif;
	--carte-l: 196px;

	/* Habillage blanc (par défaut) */
	--fond: #ffffff;
	--surface: #ffffff;
	--trait-fort: #d6d6d6;
	--texte-corps: #333333;
	--fond-puce: #f1f1f1;
	--fond-puce-survol: #e2e2e2;
	--voile-rgb: 255, 255, 255;
	--ombre: rgba(0, 0, 0, 0.14);
	color-scheme: light;
}

/* Habillage noir : réglage par défaut dans Apparence › Personnaliser › Habillage,
   puis choix du visiteur avec le bouton soleil / lune. */
html[data-habillage="noir"] {
	background: #0e0e0e;
	--fond: #0e0e0e;
	--surface: #181818;
	--encre: #f4f4f4;
	--texte-doux: #c2c2c2;
	--texte-discret: #a6a6a6;
	--texte-corps: #dadada;
	--trait: #2a2a2a;
	--trait-fort: #3f3f3f;
	--fond-doux: #191919;
	--fond-vignette: #232323;
	--fond-puce: #262626;
	--fond-puce-survol: #363636;
	--voile-rgb: 14, 14, 14;
	--ombre: rgba(0, 0, 0, 0.55);
	color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--fond);
	color: var(--encre);
	font-family: var(--police);
	font-size: 17px;
	line-height: 1.5;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--encre); }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.1; }

.visuellement-cache {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.lien-evitement {
	position: absolute; left: 16px; top: -60px; z-index: 100;
	background: var(--encre); color: var(--fond);
	padding: 10px 16px; border-radius: 6px; text-decoration: none;
}
.lien-evitement:focus { top: 16px; color: var(--fond); }

.pastille {
	display: block; flex: none;
	width: 12px; height: 12px;
	border-radius: 50%;
	background: var(--rouge);
}
.pastille--petite { width: 9px; height: 9px; }

.principal { flex: 1 0 auto; }

/* ---------- Boutons ---------- */
.bouton {
	display: inline-flex; align-items: center; gap: 10px;
	font: inherit; font-size: 19px; font-weight: 700;
	padding: 14px 30px;
	border-radius: 999px;
	text-decoration: none;
	cursor: pointer;
	border: 1.5px solid transparent;
}
.bouton--principal { background: var(--rouge); color: #ffffff; }
.bouton--principal:hover { background: var(--rouge-fonce); color: #ffffff; }
.bouton--secondaire { background: var(--surface); color: var(--encre); border-color: var(--encre); font-weight: 600; }
.bouton--secondaire:hover { background: var(--encre); color: var(--fond); }
.bouton--petit { font-size: 16px; padding: 10px 20px; }

/* ---------- En-tête ---------- */
.entete {
	display: flex; flex-wrap: wrap; align-items: center;
	gap: 16px 40px;
	padding: 20px var(--marge);
	border-bottom: 1px solid var(--trait);
	position: relative;
}
.entete__marque { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.entete__marque .logo { height: 52px; width: auto; }
.entete__tv {
	font-size: 26px; font-weight: 700; letter-spacing: 0.02em; line-height: 1;
	border-left: 2px solid var(--encre); padding-left: 12px;
}
.entete__nav {
	display: flex; flex-wrap: wrap; align-items: center;
	gap: 8px 24px;
	flex: 1 1 480px;
	font-size: 17px;
	text-transform: lowercase;
}
.nav__lien { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.nav__lien:hover, .nav__lien[aria-current] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.nav__lien--filiere, .nav__lien--speciale { font-weight: 700; }
.nav__lien--rubrique { font-weight: 500; }
.nav__separateur { width: 1px; height: 22px; background: var(--trait-fort); display: block; }

/* Outils de l'en-tête : habillage et recherche */
.entete__outils { display: flex; align-items: center; gap: 10px; }
.outil-bouton {
	list-style: none;
	width: 48px; height: 48px; border-radius: 50%;
	border: 1px solid var(--trait-fort); background: var(--surface); color: var(--encre);
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	font: inherit;
}
.outil-bouton:hover { border-color: var(--encre); }
.outil-bouton[hidden] { display: none; }
.icone-soleil { display: none; }
html[data-habillage="noir"] .icone-soleil { display: block; }
html[data-habillage="noir"] .icone-lune { display: none; }

/* Logo : version adaptée à l'habillage */
.logo--sur-noir { display: none; }
html[data-habillage="noir"] .logo--sur-blanc { display: none; }
html[data-habillage="noir"] .logo--sur-noir { display: block; }

/* Recherche */
.recherche { position: relative; }
.recherche__bouton::-webkit-details-marker { display: none; }
.recherche[open] .recherche__bouton { background: var(--encre); color: var(--fond); border-color: var(--encre); }
.recherche__panneau {
	position: absolute; right: 0; top: 60px; z-index: 30;
	width: min(460px, calc(100vw - 2 * var(--marge)));
	background: var(--surface);
	border: 1px solid var(--trait); border-radius: 14px;
	box-shadow: 0 12px 32px var(--ombre);
	padding: 16px;
}
.recherche__form { display: flex; gap: 10px; }
.recherche__champ {
	flex: 1; min-width: 0;
	font: inherit; font-size: 17px;
	padding: 10px 16px;
	border: 1.5px solid var(--trait-fort); border-radius: 999px;
	background: var(--surface); color: var(--encre);
}
.recherche__champ:focus { border-color: var(--encre); outline: none; }

/* ---------- Héro ---------- */
.hero {
	position: relative;
	width: 100%;
	display: flex; align-items: center;
	aspect-ratio: 16 / 9;
	min-height: 520px; max-height: 820px;
	overflow: hidden;
	background: var(--fond-vignette);
}
.hero[hidden] { display: none; }
.hero__image { position: absolute; inset: 0; }
.hero__image img { width: 100%; height: 100%; object-fit: cover; }
.hero__voile {
	position: absolute; inset: 0;
	background:
		linear-gradient(90deg, rgba(var(--voile-rgb), .96) 0%, rgba(var(--voile-rgb), .82) 34%, rgba(var(--voile-rgb), 0) 64%),
		linear-gradient(0deg, rgb(var(--voile-rgb)) 0%, rgba(var(--voile-rgb), 0) 22%);
}
.hero__texte {
	position: relative;
	display: flex; flex-direction: column; gap: 20px;
	max-width: 640px;
	padding: 0 var(--marge);
}
.hero__surtitre {
	margin: 0;
	display: flex; align-items: center; gap: 10px;
	font-size: 17px; font-weight: 700;
	text-transform: lowercase;
}
.hero__titre {
	margin: 0;
	font-size: clamp(36px, 4.6vw, 68px);
	line-height: 1.02; font-weight: 700; letter-spacing: -0.015em;
	text-wrap: balance;
}
.hero__resume { margin: 0; font-size: 21px; line-height: 1.45; color: var(--texte-corps); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }

/* ---------- Rangées ---------- */
.rangees { display: flex; flex-direction: column; gap: 56px; padding: 56px 0 72px; }
.rangee { display: flex; flex-direction: column; gap: 16px; padding: 0 var(--marge); }
.rangee__tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 40px; flex-wrap: wrap; }
.rangee__titres { display: flex; flex-direction: column; gap: 10px; max-width: 680px; }
.rangee__titre {
	margin: 0;
	display: flex; align-items: center; gap: 12px;
	font-size: 28px; font-weight: 700; letter-spacing: -0.01em;
	text-transform: lowercase;
}
.rangee__intro { margin: 0; font-size: 18px; color: var(--texte-doux); }
.rangee__lien { font-size: 16px; font-weight: 600; white-space: nowrap; }
.rangee__piste { position: relative; }
.rangee__defilement {
	display: flex; gap: 18px;
	overflow-x: auto;
	padding-bottom: 4px;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.rangee__defilement::-webkit-scrollbar { display: none; }

/* Flèches de défilement */
.rangee__fleche {
	position: absolute; z-index: 2;
	top: calc(var(--carte-l) * 0.75);
	transform: translateY(-50%);
	width: 52px; height: 52px;
	border-radius: 50%;
	border: 1px solid var(--trait-fort);
	background: rgba(var(--voile-rgb), 0.96);
	color: var(--encre);
	box-shadow: 0 4px 16px var(--ombre);
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
}
.rangee__fleche:hover { background: var(--encre); border-color: var(--encre); color: var(--fond); }
.rangee__fleche--prec { left: calc(var(--marge) * -0.5); }
.rangee__fleche--suiv { right: calc(var(--marge) * -0.5); }
.rangee__fleche[hidden] { display: none; }
@media (hover: none) {
	.rangee__fleche { display: none; }   /* sur écran tactile, on fait glisser du doigt */
}

/* Section spéciale (léo lagrange, l'homme) */
.rangee--speciale { background: var(--fond-doux); padding-top: 48px; padding-bottom: 48px; }
.rangee--speciale .rangee__titre { font-size: clamp(30px, 3vw, 40px); gap: 14px; }
.rangee--speciale .rangee__titre .pastille { width: 16px; height: 16px; }
.rangees > .rangee--speciale:last-child { margin-bottom: -72px; }

/* ---------- Carte (affiche) ---------- */
.carte {
	flex: 0 0 var(--carte-l);
	display: flex; flex-direction: column; gap: 10px;
	text-decoration: none;
	scroll-snap-align: start;
}
.carte__visuel {
	display: block;
	aspect-ratio: 2 / 3;
	border-radius: 10px;
	overflow: hidden;
	background: var(--fond-vignette);
}
.leotv-affiche { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.carte:hover .leotv-affiche { transform: scale(1.04); }
.carte__titre { font-size: 15px; font-weight: 500; line-height: 1.3; }
.carte:hover .carte__titre { text-decoration: underline; }

/* Affiches de secours (tant que la vraie affiche n'existe pas) */
.leotv-affiche--composee,
.leotv-affiche--texte {
	display: flex; flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--trait);
	border-radius: 10px;
	overflow: hidden;
}
.leotv-affiche__image { display: block; aspect-ratio: 16 / 9; flex: none; background: var(--fond-vignette); }
.leotv-affiche__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.carte:hover .leotv-affiche__image img { transform: scale(1.04); }
.leotv-affiche__titre {
	position: relative;
	padding: 34px 14px 14px;
	font-size: 17px; font-weight: 700; line-height: 1.2;
	display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.leotv-affiche__titre::before {
	content: ""; position: absolute; left: 14px; top: 14px;
	width: 12px; height: 12px; border-radius: 50%;
	background: var(--rouge);
}
.leotv-affiche--texte { justify-content: flex-end; }
.leotv-affiche--texte .leotv-affiche__titre { font-size: 19px; }
/* Image recadrée avec titre incrusté sur un fond blanc en fondu */
.leotv-affiche--incrustee { position: relative; display: block; overflow: hidden; }
.leotv-affiche--incrustee img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.carte:hover .leotv-affiche--incrustee img { transform: scale(1.04); }
.leotv-affiche--incrustee .leotv-affiche__titre {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 72px 14px 14px;
	background: linear-gradient(to top, rgba(var(--voile-rgb), .9) 0%, rgba(var(--voile-rgb), .9) 42%, rgba(var(--voile-rgb), .76) 62%, rgba(var(--voile-rgb), 0) 100%);
	-webkit-line-clamp: 4;
}
.leotv-affiche--incrustee .leotv-affiche__titre::before { display: none; }

.carte:hover .leotv-affiche--composee,
.carte:hover .leotv-affiche--incrustee,
.carte:hover .leotv-affiche--texte { transform: none; }
.carte:has(.leotv-affiche--composee, .leotv-affiche--incrustee, .leotv-affiche--texte) .carte__titre { display: none; }
.carte:has(.leotv-affiche--composee, .leotv-affiche--incrustee, .leotv-affiche--texte):hover .leotv-affiche__titre { text-decoration: underline; }
.rangee--speciale .carte__visuel { background: var(--surface); }

/* ---------- Aperçu au survol ---------- */
.apercu {
	position: absolute; z-index: 40;
	width: 380px;
	background: var(--surface); color: var(--encre);
	border-radius: 14px; overflow: hidden;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
	opacity: 0; transform: translateY(10px) scale(0.92); transform-origin: center top;
	transition: opacity .32s ease, transform .38s cubic-bezier(.2, .8, .25, 1);
}
.apercu--visible { opacity: 1; transform: none; }
.apercu--fermeture { transition-duration: .2s, .2s; }
.apercu[hidden] { display: none; }
.apercu__media {
	position: relative; aspect-ratio: 16 / 9;
	background: #141414 center / cover no-repeat;
	cursor: pointer;
}
.apercu__media iframe, .apercu__media img {
	position: absolute; inset: 0;
	width: 100%; height: 100%; border: 0; object-fit: cover;
	pointer-events: none;
	opacity: 0; transition: opacity .5s ease;
}
.apercu__media .est-pret { opacity: 1; }
.apercu__son {
	position: absolute; right: 12px; bottom: 12px;
	width: 40px; height: 40px; border-radius: 50%;
	border: 1.5px solid rgba(255, 255, 255, 0.7);
	background: rgba(0, 0, 0, 0.45); color: #ffffff;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
}
.apercu__son:hover { background: rgba(0, 0, 0, 0.7); }
.apercu__corps { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; }
.apercu[aria-busy] .apercu__corps { opacity: 0.4; }
.apercu__ligne { display: flex; align-items: center; gap: 10px; }
.apercu__categorie {
	margin-left: auto;
	display: inline-flex; align-items: center; gap: 7px;
	font-size: 14px; font-weight: 700; text-transform: lowercase;
}
.apercu__categorie[hidden] { display: none; }
.apercu__titre { font-size: 20px; line-height: 1.2; font-weight: 700; text-decoration: none; }
.apercu__titre:hover { text-decoration: underline; }
.apercu__meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--texte-discret); }
.apercu__extrait {
	margin: 0; font-size: 15px; line-height: 1.5; color: var(--texte-corps);
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.apercu__extrait:empty { display: none; }

/* ---------- Page vidéo ---------- */
.video { display: flex; flex-direction: column; gap: 56px; padding: 32px 0 72px; }
.video__colonnes { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding: 0 var(--marge); }
.video__principal { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.video__lecteur:empty { display: none; }
.leotv-player {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 14px;
	overflow: hidden;
	background: #141414;
}
.leotv-player iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.leotv-player--ancien > div { position: static !important; padding: 0 !important; height: 100% !important; }
.video__infos { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
.video__categorie {
	align-self: flex-start;
	display: inline-flex; align-items: center; gap: 8px;
	font-size: 17px; font-weight: 700;
	text-decoration: none; text-transform: lowercase;
}
.video__categorie:hover { text-decoration: underline; }
.video__titre { margin: 0; font-size: clamp(28px, 3vw, 42px); font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
.video__meta { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 16px; color: var(--texte-discret); }
.video__description { font-size: 18px; line-height: 1.6; color: var(--texte-corps); max-width: 760px; }
.video__mots-cles { list-style: none; margin: 0; padding: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.video__mots-cles a {
	display: block;
	font-size: 14px; font-weight: 500;
	padding: 7px 14px; border-radius: 999px;
	background: var(--fond-puce); text-decoration: none;
}
.video__mots-cles a:hover { background: var(--fond-puce-survol); }

.a-suivre { flex: 1 1 320px; display: flex; flex-direction: column; gap: 18px; }
.a-suivre__titre { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; }
.a-suivre__liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.suivante { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; }
.suivante__visuel {
	flex: 0 0 150px; aspect-ratio: 16 / 9;
	border-radius: 6px; overflow: hidden;
	background: var(--fond-vignette);
}
.suivante__visuel img { width: 100%; height: 100%; object-fit: cover; }
.suivante__titre { font-size: 15px; font-weight: 500; line-height: 1.35; }
.suivante:hover .suivante__titre { text-decoration: underline; }

/* ---------- Pages de liste ---------- */
.archive { padding: 40px var(--marge) 72px; display: flex; flex-direction: column; gap: 32px; }
.archive__tete { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.archive__titre {
	margin: 0;
	display: flex; align-items: center; gap: 14px;
	font-size: clamp(32px, 3.4vw, 46px); font-weight: 700; letter-spacing: -0.01em;
}
.archive__titre--minuscule { text-transform: lowercase; }
.archive__intro { margin: 0; font-size: 18px; color: var(--texte-doux); }
.archive__vide { display: flex; flex-direction: column; gap: 16px; max-width: 560px; font-size: 18px; }
.grille {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 32px 20px;
}
.grille .carte { flex: none; }

.navigation.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; height: 44px; padding: 0 16px;
	border: 1px solid var(--trait-fort); border-radius: 999px;
	text-decoration: none; font-weight: 600;
}
.page-numbers.current { background: var(--encre); border-color: var(--encre); color: var(--fond); }
.page-numbers.dots { border: 0; }

/* ---------- Pages simples ---------- */
.page-simple { max-width: 760px; margin: 0 auto; padding: 48px var(--marge) 72px; }
.page-simple__titre { margin: 0 0 24px; font-size: clamp(32px, 3.4vw, 46px); }
.contenu { font-size: 18px; line-height: 1.65; }
.contenu > * { max-width: 100%; }
.contenu a { text-underline-offset: 3px; }
.liste-simple { padding: 16px 0; border-bottom: 1px solid var(--trait); }

/* ---------- Pied de page ---------- */
.pied {
	border-top: 1px solid var(--trait);
	padding: 32px var(--marge);
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 20px 40px;
}
.pied .logo { height: 40px; width: auto; }
.pied__liens { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; }

/* ---------- Petits écrans ---------- */
@media (max-width: 719px) {
	.entete { gap: 14px 16px; }
	.entete__marque .logo { height: 40px; }
	.entete__tv { font-size: 21px; }
	.entete__nav { order: 3; flex-basis: 100%; gap: 6px 18px; font-size: 16px; }
	.entete__outils { margin-left: auto; }

	.hero { display: block; aspect-ratio: auto; min-height: 0; max-height: none; background: none; }
	.hero__image { position: relative; aspect-ratio: 16 / 9; background: var(--fond-vignette); }
	.hero__voile { display: none; }
	.hero__texte { padding: 20px var(--marge) 0; gap: 14px; }
	.hero__resume { font-size: 18px; }
	.bouton { font-size: 17px; padding: 12px 22px; }

	.rangees { gap: 40px; padding-top: 40px; }
	.rangee__titre { font-size: 24px; }
	:root { --carte-l: min(42vw, 196px); }
	.grille { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
	.suivante__visuel { flex-basis: 120px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
	.apercu { transform: none; }
}
