/* ==========================================================================
   All Is Fake — feuille de style principale
   Sommaire : 1. Polices · 2. Variables · 3. Base · 4. Utilitaires
              5. En-tête · 6. Boutons · 7. Fiche · 8. Partage
              9. Rangée et cartes · 10. Liste provisoire · 11. Pied de page
              12. Héro · 13. Pages Nature et grille · 14. Popup et fiche mobile
   ========================================================================== */

/* 1. Polices (hébergées sur le site, licence SIL OFL) ===================== */

@font-face {
	font-family: "Anton";
	src: url("../fonts/anton-latin.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

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

/* 2. Variables =========================================================== */

:root {
	color-scheme: dark;

	/* Couleurs */
	--noir: #121210;
	--surface: #1d1d1a;
	--surface-haute: #272723;
	--bord: #34342f;
	--texte: #f2f2ec;
	--texte-2: #a3a399;
	--citron: #dfff00;

	/* Typographie */
	--police-titre: "Anton", "Impact", "Arial Narrow", sans-serif;
	--police-texte: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	/* Espacements */
	--marge: clamp(1rem, 4vw, 3.5rem);
	--largeur-max: 1440px;
	--rayon: 6px;
	--hauteur-entete: 4.25rem;

	/* Marge gauche des rangées, alignée sur le contenu même sur très grand écran. */
	--gouttiere: max(var(--marge), calc((100% - var(--largeur-max)) / 2 + var(--marge)));
}

/* 3. Base ================================================================ */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: var(--hauteur-entete);
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--noir);
	color: var(--texte);
	font-family: var(--police-texte);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.principal {
	flex: 1;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

a:hover {
	color: var(--citron);
}

h1,
h2,
h3 {
	margin: 0;
	line-height: 1.15;
	font-weight: 650;
}

p,
ul {
	margin: 0;
}

[hidden] {
	display: none !important;
}

::selection {
	background: var(--citron);
	color: var(--noir);
}

:focus-visible {
	outline: 2px solid var(--citron);
	outline-offset: 3px;
	border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* 4. Utilitaires ========================================================= */

.conteneur {
	width: 100%;
	max-width: var(--largeur-max);
	margin-inline: auto;
	padding-inline: max(var(--marge), env(safe-area-inset-left));
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.lien-evitement {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 100;
	padding: 0.6rem 1rem;
	background: var(--citron);
	color: var(--noir);
	font-weight: 650;
	text-decoration: none;
	border-radius: var(--rayon);
	transform: translateY(-200%);
}

.lien-evitement:focus {
	transform: none;
	color: var(--noir);
}

/* 5. En-tête ============================================================= */

.entete {
	position: sticky;
	top: 0;
	z-index: 50;
	padding-top: env(safe-area-inset-top);
	background: linear-gradient(to bottom, rgb(18 18 16 / 0.96) 40%, rgb(18 18 16 / 0.75));
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.entete__barre {
	display: flex;
	align-items: center;
	gap: clamp(1.25rem, 4vw, 3rem);
	min-height: var(--hauteur-entete);
}

.entete__logo {
	flex-shrink: 0;
	font-family: var(--police-titre);
	font-size: 1.65rem;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--citron);
	text-decoration: none;
}

.entete__logo:hover {
	color: var(--texte);
}

.entete__nav {
	overflow-x: auto;
	scrollbar-width: none;
}

/* Sur petit écran, le menu défile : un fondu signale la suite. */
@media (max-width: 700px) {
	.entete__nav {
		-webkit-mask-image: linear-gradient(to right, #000 80%, transparent);
		mask-image: linear-gradient(to right, #000 80%, transparent);
	}
}

.entete__nav::-webkit-scrollbar {
	display: none;
}

.entete__nav ul {
	display: flex;
	gap: clamp(1rem, 2.5vw, 1.75rem);
	padding: 0.25rem 2rem 0.25rem 0;
	list-style: none;
}

.entete__nav a {
	display: block;
	padding-block: 0.4rem;
	font-size: 0.95rem;
	color: var(--texte-2);
	text-decoration: none;
	white-space: nowrap;
}

.entete__nav a:hover {
	color: var(--texte);
}

.entete__nav a[aria-current] {
	color: var(--texte);
	font-weight: 650;
	box-shadow: inset 0 -2px 0 var(--citron);
}

/* 6. Boutons ============================================================= */

.bouton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0.55rem 1rem;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 550;
	color: var(--texte);
	background: var(--surface);
	border: 1px solid var(--bord);
	border-radius: var(--rayon);
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.bouton:hover {
	color: var(--texte);
	border-color: var(--citron);
	background: var(--surface-haute);
}

.bouton--principal {
	padding-inline: 1.5rem;
	font-size: 1rem;
	font-weight: 700;
	color: var(--noir);
	background: var(--citron);
	border-color: var(--citron);
}

.bouton--principal:hover {
	color: var(--noir);
	background: #ecff5c;
	border-color: #ecff5c;
}

/* 7. Fiche =============================================================== */

.fiche {
	position: relative;
	isolation: isolate;
	overflow: clip; /* « clip » et non « hidden » : l'affiche reste collante au défilement. */
	padding-block: clamp(1.5rem, 5vw, 4.5rem) clamp(2.5rem, 6vw, 5rem);
}

/* Les couleurs de l'affiche débordent dans la page, très floutées. */
.fiche__fond {
	position: absolute;
	inset: -10% -10% auto;
	z-index: -1;
	height: min(110vh, 1100px);
	background-size: cover;
	background-position: center 30%;
	filter: blur(60px) saturate(1.4);
	opacity: 0.5;
	transform: scale(1.15);
	-webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 85%);
	mask-image: linear-gradient(to bottom, #000 30%, transparent 85%);
}

.fiche__grille {
	display: grid;
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: start;
}

.fiche__affiche {
	margin: 0 auto;
	width: min(70vw, 340px);
}

.fiche__affiche img {
	width: 100%;
	border-radius: var(--rayon);
	box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 0.55);
}

.fiche__infos {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	min-width: 0;
	container-type: inline-size;
}

.fiche__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.4rem 1.5rem;
	font-size: 0.95rem;
	color: var(--texte-2);
}

/* Nature, année et production : même traitement, en grisé. Les liens sont soulignés. */
.fiche__meta a {
	color: inherit;
}

.fiche__meta a:hover {
	color: var(--citron);
}

.fiche__titre {
	/*
	 * Le titre est l'élément fort de la page, comme le titre d'une affiche.
	 * Sa taille s'adapte au mot le plus long (--lettres, calculé en PHP) :
	 * une lettre d'Anton mesure en moyenne 0,47 em, 0,52 laisse une marge.
	 */
	margin-top: -0.5rem;
	font-family: var(--police-titre);
	font-weight: 400;
	font-size: clamp(2rem, calc(100cqi / (var(--lettres, 10) * 0.52)), 7.5rem);
	line-height: 0.92;
	letter-spacing: 0.005em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
	hyphens: auto;
	text-wrap: balance;
}

.fiche__sous-titre {
	max-width: 40ch;
	margin-top: -0.5rem;
	font-size: clamp(1.15rem, 2vw, 1.4rem);
	font-weight: 500;
	line-height: 1.35;
	text-wrap: balance;
}

.fiche__resume {
	max-width: 62ch;
	font-size: 1.05rem;
	color: #d9d9d1;
}

.fiche__resume p + p {
	margin-top: 1em;
}

.fiche__avec {
	max-width: 62ch;
	font-size: 0.95rem;
	color: var(--texte-2);
}

.fiche__avec-intitule {
	margin-right: 0.35rem;
}

.fiche__avec a {
	color: var(--texte);
}

.fiche__avec a:hover {
	color: var(--citron);
}

.fiche__genres {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
}

.fiche__genres a {
	display: inline-block;
	padding: 0.3rem 0.85rem;
	font-size: 0.875rem;
	text-decoration: none;
	border: 1px solid var(--bord);
	border-radius: 999px;
}

.fiche__genres a:hover {
	border-color: var(--citron);
}

.fiche__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

.fiche__ressources {
	max-width: 62ch;
	padding-top: 1.5rem;
	border-top: 1px solid var(--bord);
}

.fiche__ressources h2 {
	margin-bottom: 0.75rem;
	font-size: 1.1rem;
}

.fiche__ressources ul {
	padding: 0;
	list-style: none;
}

.fiche__ressources li + li {
	margin-top: 0.4rem;
}

.fiche__ressources a {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.6rem;
	padding-block: 0.2rem;
}

.fiche__mention {
	max-width: 62ch;
	font-size: 0.85rem;
	color: var(--texte-2);
}

@media (min-width: 900px) {
	.fiche__grille {
		grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
	}

	.fiche__affiche {
		position: sticky;
		top: calc(var(--hauteur-entete) + 2rem);
		width: 100%;
		margin: 0;
	}

	.fiche__infos {
		padding-top: 0.5rem;
	}
}

/* 8. Partage ============================================================= */

/* Discret : une ligne de liens en grisé, sans boutons. */
.partage {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 1rem;
	font-size: 0.85rem;
	color: var(--texte-2);
}

.partage__reseaux {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 0.9rem;
}

.partage__intitule {
	margin: 0;
}

.partage__liste {
	display: flex;
	flex-wrap: wrap;
	gap: 0 0.9rem;
	padding: 0;
	list-style: none;
}

.partage__lien,
.partage__natif {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 2rem;
	padding: 0;
	font: inherit;
	color: var(--texte);
	background: none;
	border: 0;
	text-decoration: underline;
	text-decoration-color: var(--bord);
	text-underline-offset: 0.25em;
	cursor: pointer;
}

.partage__lien:hover,
.partage__natif:hover {
	color: var(--citron);
	text-decoration-color: currentColor;
}

.partage__statut {
	font-size: 0.85rem;
	color: var(--citron);
}

.partage__statut:empty {
	display: none;
}

/* 9. Rangée et cartes ==================================================== */

.rangees {
	padding-block: 1.5rem 2rem;
}

.rangee {
	padding-block: 0.75rem 1.75rem;
}

.rangee__titre {
	margin-bottom: 0.85rem;
	font-size: clamp(1.1rem, 1.8vw, 1.4rem);
}

.rangee__cadre {
	position: relative;
}

.rangee__piste {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: clamp(128px, 15vw, 210px);
	gap: 0.6rem;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--gouttiere);
	padding-inline: var(--gouttiere);
	padding-bottom: 0.75rem;
	scrollbar-width: none;
}

.rangee__piste::-webkit-scrollbar {
	display: none;
}

/* Flèches : visibles au survol de la rangée, sur ordinateur. */
.rangee__fleche {
	position: absolute;
	top: 0;
	bottom: 0.75rem;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: max(3rem, calc(var(--gouttiere) - 0.6rem));
	padding: 0;
	color: var(--texte);
	background: rgb(18 18 16 / 0.7);
	border: 0;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s, background-color 0.2s, color 0.2s;
}

.rangee__fleche--prec {
	left: 0;
}

.rangee__fleche--suiv {
	right: 0;
}

.rangee__cadre:hover .rangee__fleche,
.rangee__fleche:focus-visible {
	opacity: 1;
}

.rangee__fleche:hover {
	color: var(--citron);
	background: rgb(18 18 16 / 0.88);
}

.carte {
	display: block;
	scroll-snap-align: start;
	border-radius: var(--rayon);
	overflow: hidden;
	background: var(--surface);
	aspect-ratio: 2 / 3;
}

.carte__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease, opacity 0.25s;
}

.carte:hover .carte__image {
	transform: scale(1.04);
}

/* 10. Liste provisoire (index.php, remplacée à l'étape 4) ================ */

.principal > ul {
	display: grid;
	gap: 2rem;
	max-width: 900px;
	margin: 2rem auto;
	padding: 0 var(--marge);
	list-style: none;
}

/* 11. Pied de page ======================================================= */

.pied {
	margin-top: 2rem;
	padding-block: 3rem calc(2.5rem + env(safe-area-inset-bottom));
	border-top: 1px solid var(--bord);
	font-size: 0.875rem;
	color: var(--texte-2);
}

.pied__contenu {
	display: grid;
	gap: 1.25rem;
}

.pied__logo {
	font-family: var(--police-titre);
	font-size: 1.4rem;
	line-height: 1;
	text-transform: uppercase;
	color: var(--texte);
}

.pied__mention {
	max-width: 62ch;
}

.pied__reseaux,
.pied__menu ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	padding: 0;
	list-style: none;
}

.pied a {
	color: var(--texte);
}

.pied a:hover {
	color: var(--citron);
}

/* 12. Héro =============================================================== */

.hero {
	position: relative;
	isolation: isolate;
	overflow: clip;
	display: flex;
	align-items: flex-end;
	padding-block: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
}

/* Avec visuel horizontal : image plein cadre, assombrie à gauche et en bas. */
.hero--paysage {
	min-height: min(80vh, 760px);
}

.hero__visuel {
	position: absolute;
	inset: 0;
	z-index: -2;
}

.hero__visuel img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
}

.hero--paysage::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(to right, rgb(18 18 16 / 0.92) 0%, rgb(18 18 16 / 0.55) 40%, transparent 72%),
		linear-gradient(to top, var(--noir) 0%, transparent 40%);
}

/* Sans visuel horizontal : fond flouté des couleurs de l'affiche. */
.hero__fond {
	position: absolute;
	inset: -10%;
	z-index: -1;
	background-size: cover;
	background-position: center 30%;
	filter: blur(60px) saturate(1.4);
	opacity: 0.55;
	transform: scale(1.15);
	/* Le fond déborde de 10 % : le fondu s'achève avant le bas du Héro, sans ligne de coupure. */
	-webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 80%);
	mask-image: linear-gradient(to bottom, #000 30%, transparent 80%);
}

.hero__grille {
	display: grid;
	gap: clamp(1.5rem, 4vw, 4rem);
	align-items: end;
}

.hero__contenu {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	max-width: 42rem;
	min-width: 0;
	container-type: inline-size;
}

.hero__titre {
	font-family: var(--police-titre);
	font-weight: 400;
	font-size: clamp(2rem, calc(100cqi / (var(--lettres, 10) * 0.52)), 6.5rem);
	line-height: 0.92;
	text-transform: uppercase;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

.hero__titre a {
	text-decoration: none;
}

.hero__titre a:hover {
	color: var(--texte);
}

.hero__sous-titre {
	font-size: clamp(1.05rem, 1.8vw, 1.3rem);
	font-weight: 500;
	line-height: 1.35;
	text-wrap: balance;
}

.hero__resume {
	max-width: 56ch;
	color: #d9d9d1;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.hero__actions {
	margin-top: 0.5rem;
}

.hero__affiche {
	justify-self: center;
	width: min(56vw, 240px);
	order: -1;
}

.hero__affiche img {
	width: 100%;
	border-radius: var(--rayon);
	box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 0.55);
}

@media (min-width: 900px) {
	.hero--affiche {
		min-height: min(72vh, 680px);
		align-items: center;
	}

	.hero--affiche .hero__grille {
		grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
		align-items: center;
	}

	.hero__affiche {
		order: 0;
		width: 100%;
		justify-self: end;
	}
}

/* 13. Pages Nature et grille ============================================= */

.entete-page {
	padding-top: clamp(1rem, 3vw, 2rem);
}

.entete-page__titre {
	font-family: var(--police-titre);
	font-weight: 400;
	font-size: clamp(2rem, 5vw, 3.25rem);
	line-height: 1;
	text-transform: uppercase;
}

.catalogue {
	padding-block: 1rem 3rem;
}

.grille-affiches {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(clamp(128px, 15vw, 200px), 1fr));
	gap: 0.6rem;
}

.pagination {
	margin-top: 2rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding-inline: 0.75rem;
	text-decoration: none;
	border: 1px solid var(--bord);
	border-radius: var(--rayon);
}

.pagination .page-numbers.current {
	color: var(--noir);
	background: var(--citron);
	border-color: var(--citron);
	font-weight: 700;
}

/* 14. Popup et fiche mobile ============================================== */

.apercu {
	overflow: hidden;
	color: var(--texte);
	background: var(--surface);
	border-radius: 8px;
	box-shadow: 0 1.5rem 3.5rem rgb(0 0 0 / 0.65);
}

.apercu--popup {
	position: absolute;
	z-index: 60;
	cursor: pointer;
	opacity: 0;
	transform: scale(0.82);
	transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.apercu--popup.est-ouverte {
	opacity: 1;
	transform: none;
}

.apercu__visuel {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--noir);
}

.apercu__visuel--paysage img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.apercu__visuel--affiche {
	display: flex;
	align-items: center;
	justify-content: center;
}

.apercu__visuel--affiche img {
	position: relative;
	height: 86%;
	width: auto;
	border-radius: 3px;
	box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 0.5);
}

.apercu__fond {
	position: absolute;
	inset: -20%;
	background-size: cover;
	background-position: center;
	filter: blur(24px) saturate(1.3);
	opacity: 0.6;
}

.apercu__corps {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem 1.1rem 1.2rem;
	container-type: inline-size;
}

.apercu__meta,
.apercu__genres {
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 1rem;
	font-size: 0.8rem;
	color: var(--texte-2);
}

.apercu__titre {
	font-family: var(--police-titre);
	font-size: clamp(1.4rem, calc(100cqi / (var(--lettres, 10) * 0.52)), 2.4rem);
	line-height: 0.95;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.apercu__sous-titre {
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.35;
}

.apercu__resume {
	font-size: 0.85rem;
	line-height: 1.5;
	color: #cfcfc6;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.apercu__bouton {
	align-self: flex-start;
	min-height: 2.5rem;
	margin-top: 0.35rem;
	font-size: 0.9rem;
}

.feuille {
	position: fixed;
	inset: 0;
	z-index: 80;
}

.feuille__voile {
	position: absolute;
	inset: 0;
	background: rgb(0 0 0 / 0.65);
	opacity: 0;
	transition: opacity 0.25s;
}

.feuille__panneau {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	width: min(100%, 520px);
	max-height: 90vh;
	margin-inline: auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding-bottom: env(safe-area-inset-bottom);
	border-radius: 14px 14px 0 0;
	transform: translateY(100%);
	transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.feuille.est-ouverte .feuille__voile {
	opacity: 1;
}

.feuille.est-ouverte .feuille__panneau {
	transform: none;
}

.feuille__fermer {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	color: var(--texte);
	background: rgb(18 18 16 / 0.75);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.feuille .apercu__titre {
	font-size: clamp(1.75rem, calc(100cqi / (var(--lettres, 10) * 0.52)), 3rem);
}

.feuille .apercu__resume {
	-webkit-line-clamp: 6;
	line-clamp: 6;
}

.feuille .apercu__bouton {
	align-self: stretch;
	margin-top: 0.75rem;
}

.sans-defilement {
	overflow: hidden;
}
