/* =========================================================================
   Portfolio Alexis — feuille de style principale
   Référence visuelle : maquette Claude Design « Portfolio Alexis Girout »
   ========================================================================= */

/* ----- 1. Configuration : couleurs, typos, espacements ------------------- */
:root {
	/* Fonds */
	--ag-bg: #1c1c1c;
	--ag-bg-deep: #141414;
	--ag-bg-panel: #111111;
	--ag-surface: rgba(28, 28, 28, 0.72);

	/* Texte */
	--ag-text: #efefef;
	--ag-text-soft: #d2d2d2;
	--ag-text-muted: #c9c9c9;
	--ag-text-dim: #8a8a8a;
	--ag-text-faint: #6d6d6d;

	/* Accent (maquette : #E39B22 ; variantes prévues #D8543A / #7FA5B3 / #EFEFEF) */
	--ag-accent: #e39b22;
	--ag-accent-contrast: #1c1c1c;

	/* Lignes */
	--ag-line: #2e2e2e;
	--ag-line-soft: #333333;
	--ag-line-strong: #444444;

	/* Typographies */
	/* Familles : déclarées dans theme.json (settings.typography.fontFamilies),
	   WordPress génère les @font-face et les charge côté front + éditeur.
	   - Titres : Anton (auto-hébergée, graisse unique 400), capitales condensées.
	   - Textes : Fredoka (variable, auto-hébergée). */
	--ag-font-display: 'Anton', var(--wp--preset--font-family--anton, 'Arial Narrow'), 'Haettenschweiler', Impact, sans-serif;
	--ag-font-body: 'Fredoka', var(--wp--preset--font-family--fredoka, 'Helvetica Neue'), Arial, sans-serif;
	/* Plus de police monospace : hors h1/h2, tout est en Fredoka.
	   --ag-font-mono reste un alias pour ne pas casser les règles existantes. */
	--ag-font-mono: var(--ag-font-body);

	/* Crénage des titres — un seul point de réglage. Anton est déjà condensée. */
	--ag-title-tracking: -0.01em;

	/* Hauteur de fenêtre utile pour le rail plein écran. La barre d'admin
	   WordPress (utilisateur connecté) décale la page : `.admin-bar` la
	   retranche plus bas pour que le HUD du bas reste visible. */
	--ag-vh: 100vh;

	/* Rythme */
	--ag-pad-x: 6vw;
	--ag-pad-bottom: 96px;

	/* --- Animation : un seul jeu de courbes et de durées ---
	   --ag-ease        : décélération douce, défaut pour tout le micro-hover
	   --ag-ease-inout  : accélère puis freine, réservé aux grandes transitions (rail)
	   --ag-dur-1 / 2 / 3 : rapide (couleur, bordure) / standard (révélation) / lent (fondu, jauge) */
	--ag-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ag-ease-inout: cubic-bezier(0.62, 0, 0.36, 1);
	--ag-dur-1: 160ms;
	--ag-dur-2: 280ms;
	--ag-dur-3: 520ms;
	--ag-dur-rail: 760ms;
}

/* ----- 2. Base --------------------------------------------------------- */
* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	background: var(--ag-bg);
	color: var(--ag-text);
	font-family: var(--ag-font-body);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

/* Le rail plein écran verrouille le défilement ; les pages classiques
   (page.php) doivent rester défilables même avec JS, tout comme le mode
   pile verticale (mobile) — d'où le :not(.ag-stacked) : sans lui, cette
   règle à 3 classes prime sur « body.ag-stacked { overflow: visible } »
   (2 classes) et bloque le scroll en mobile, quelle que soit sa position
   dans la feuille de style. */
body.ag-js.ag-front:not(.ag-stacked) {
	overflow: hidden;
}

a {
	color: var(--ag-accent);
	text-decoration: none;
}

a:hover {
	color: var(--ag-text);
}

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

.ag-accent {
	color: var(--ag-accent);
}

.ag-eyebrow {
	margin: 0;
	font-family: var(--ag-font-mono);
	font-size: 12px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ag-text-dim);
}

.ag-h2 {
	margin: 0;
	font-family: var(--ag-font-display);
	font-weight: 400;
	font-size: clamp(34px, 4.4vw, 72px);
	line-height: 0.9;
	letter-spacing: var(--ag-title-tracking);
	text-transform: uppercase;
}

/* Seuls h1/h2 sont en Anton ; h3…h6 (titres de cartes, etc.) en Fredoka. */
h3,
h4,
h5,
h6 {
	font-family: var(--ag-font-body);
}

/* ----- 3. Scène + rail horizontal ------------------------------------- */
.ag-stage {
	position: relative;
	width: 100vw;
	height: var(--ag-vh);
	overflow: hidden;
	background: var(--ag-bg);
}

/* Décalage imposé par la barre d'administration WordPress (front, connecté). */
.admin-bar {
	--ag-vh: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
	.admin-bar {
		--ag-vh: calc(100vh - 46px);
	}
}

.ag-rail {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: row;
	width: 100vw;
	height: var(--ag-vh);
	will-change: transform;
}

/* Aperçu vidéo joué en fond de page au survol d'une carte (section 02). */
.ag-hover-preview {
	position: absolute;
	inset: 0;
	z-index: 1;
	overflow: hidden;
	background: var(--ag-bg-panel);
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--ag-dur-3) var(--ag-ease);
}

.ag-hover-preview.is-visible {
	opacity: 1;
}

.ag-hover-preview__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	pointer-events: none;
}

.ag-hover-preview__scrim {
	position: absolute;
	inset: 0;
	background: rgba(20, 20, 20, 0.62);
}

body.ag-js .ag-rail {
	transition: transform var(--ag-dur-rail) var(--ag-ease-inout);
}

.ag-section {
	position: relative;
	flex: 0 0 100vw;
	width: 100vw;
	height: var(--ag-vh);
	overflow: hidden;
}

.ag-section__inner {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100%;
	padding: 0 var(--ag-pad-x) var(--ag-pad-bottom);
}

.ag-section__head {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 720px;
}

/* Sans JS : on retombe sur un défilement horizontal natif classique. */
body.ag-no-js .ag-stage {
	overflow-x: auto;
}

/* ----- 4. Section 01 — Showreel -------------------------------------- */
.ag-section--showreel {
	display: flex;
	align-items: center;
	/* Marge basse resserrée sur les fenêtres courtes plutôt que fixe : la
	   section est en overflow:hidden, un contenu trop haut serait rogné. */
	padding: 0 var(--ag-pad-x) clamp(24px, 6vh, var(--ag-pad-bottom));
}

.ag-showreel__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	background: var(--ag-bg-panel);
}

.ag-showreel__bg-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.ag-showreel__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		rgba(20, 20, 20, 0.92) 0%,
		rgba(20, 20, 20, 0.72) 46%,
		rgba(20, 20, 20, 0.42) 100%
	);
}

.ag-showreel__content {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	/* Se resserre sur les fenêtres basses (section en overflow:hidden, pas de
	   scroll) : le rythme suit la hauteur dispo, pas seulement la largeur. */
	gap: clamp(14px, 3vh, 26px);
	max-width: 620px;
}

.ag-showreel__logo {
	display: flex;
	align-items: center;
	/* Réserve la hauteur de la plus grande déclinaison : pas de saut de mise
	   en page quand l'easter egg fait défiler les logos. */
	min-height: clamp(56px, 6.6vw, 76px);
	margin-bottom: 2px;
}

.ag-showreel__logo img {
	display: block;
	width: auto;
	height: clamp(44px, 5.4vw, 60px);
	max-width: min(260px, 62vw);
	object-fit: contain;
	object-position: left center;
	opacity: 0.95;
}

/* Easter egg : les déclinaisons livrées sont des carrés 1080². On les cadre
   dans une boîte fixe pour qu'elles occupent toutes le même gabarit. */
.ag-showreel__logo img.ag-showreel__logo--squared {
	height: clamp(56px, 6.6vw, 76px);
	width: clamp(56px, 6.6vw, 76px);
}

/* Easter egg : trois clics rapprochés font défiler les déclinaisons du logo. */
.ag-showreel__logo img.ag-logo--flip {
	animation: ag-logo-flip 0.44s var(--ag-ease);
}

@keyframes ag-logo-flip {
	0% {
		transform: perspective(320px) rotateY(0);
	}
	50% {
		transform: perspective(320px) rotateY(90deg);
	}
	100% {
		transform: perspective(320px) rotateY(0);
	}
}

.ag-showreel__title {
	margin: 0;
	font-family: var(--ag-font-display);
	font-weight: 400;
	font-size: clamp(52px, 7.2vw, 124px);
	line-height: 0.86;
	letter-spacing: var(--ag-title-tracking);
	text-transform: uppercase;
}

.ag-showreel__title-line {
	display: block;
	margin-left: 2px;
}

.ag-showreel__lede {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 340px;
}

.ag-showreel__baseline {
	margin: 0;
	font-size: 16px;
	line-height: 1.55;
	color: var(--ag-text-muted);
	text-wrap: pretty;
}

.ag-showreel__meta {
	position: absolute;
	right: var(--ag-pad-x);
	bottom: var(--ag-pad-bottom);
	z-index: 3;
	margin: 0;
	font-family: var(--ag-font-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-align: right;
	color: var(--ag-text-dim);
}

/* Bouton CTA */
.ag-cta {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 16px;
	margin-top: 4px;
	padding: 15px 28px 15px 20px;
	background: rgba(20, 20, 20, 0.45);
	border: 1px solid rgba(227, 155, 34, 0.6);
	color: var(--ag-text);
	font-family: var(--ag-font-mono);
	font-size: 12px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	cursor: pointer;
	backdrop-filter: blur(4px);
	transition: background var(--ag-dur-2) var(--ag-ease),
		border-color var(--ag-dur-2) var(--ag-ease),
		color var(--ag-dur-2) var(--ag-ease),
		transform var(--ag-dur-2) var(--ag-ease);
}

.ag-cta:hover,
.ag-cta:focus-visible {
	background: var(--ag-accent);
	border-color: var(--ag-accent);
	color: var(--ag-accent-contrast);
	transform: translateY(-2px);
	outline: none;
}

.ag-cta__icon {
	width: 0;
	height: 0;
	border-top: 10px solid transparent;
	border-bottom: 10px solid transparent;
	border-left: 16px solid var(--ag-accent);
	transition: border-left-color var(--ag-dur-2) var(--ag-ease);
}

.ag-cta:hover .ag-cta__icon,
.ag-cta:focus-visible .ag-cta__icon {
	border-left-color: var(--ag-accent-contrast);
}

/* Lecteur plein écran */
.ag-player {
	position: fixed;
	inset: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Marge haute : dégage le bouton fermer, qui ne chevauche donc plus la vidéo. */
	padding: 76px 6vw 6vh;
	background: rgba(12, 12, 12, 0.96);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--ag-dur-2) var(--ag-ease),
		visibility 0s linear var(--ag-dur-2);
}

.ag-player[hidden] {
	display: none;
}

.ag-player.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity var(--ag-dur-2) var(--ag-ease);
}

.ag-player__frame {
	/* Plus grande boîte 16/9 qui tient à l'écran sous le bouton fermer. */
	width: min(100%, 1500px, calc((100vh - 150px) * 16 / 9));
	aspect-ratio: 16 / 9;
	border: 1px solid var(--ag-line);
	transform: scale(0.97);
	transition: transform var(--ag-dur-2) var(--ag-ease);
}

.ag-player.is-open .ag-player__frame {
	transform: scale(1);
}

.ag-player__frame iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.ag-player__close {
	position: absolute;
	top: 28px;
	right: 6vw;
	padding: 10px 18px;
	background: none;
	border: 1px solid var(--ag-line-strong);
	color: var(--ag-text);
	font-family: var(--ag-font-mono);
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	cursor: pointer;
}

.ag-player__close {
	transition: border-color var(--ag-dur-2) var(--ag-ease), color var(--ag-dur-2) var(--ag-ease);
}

.ag-player__close:hover {
	border-color: var(--ag-accent);
	color: var(--ag-accent);
}

/* Visionneuse d'images (galerie photo) */
.ag-lightbox {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(48px, 8vh, 96px) clamp(48px, 8vw, 120px);
	background: rgba(10, 10, 10, 0.97);
	opacity: 0;
	visibility: hidden;
	/* Le swipe de navigation ne doit pas faire défiler la page derrière
	   (overflow:hidden sur <html> ne suffit pas sur iOS). */
	touch-action: none;
	overscroll-behavior: contain;
	transition: opacity var(--ag-dur-2) var(--ag-ease),
		visibility 0s linear var(--ag-dur-2);
}

.ag-lightbox[hidden] {
	display: none;
}

.ag-lightbox.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity var(--ag-dur-2) var(--ag-ease);
}

html.ag-lightbox-open {
	overflow: hidden;
}

.ag-lightbox__stage {
	margin: 0;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.ag-lightbox__img {
	max-width: 100%;
	max-height: calc(100vh - clamp(120px, 20vh, 220px));
	object-fit: contain;
	border: 1px solid var(--ag-line);
	transform: scale(0.98);
	transition: transform var(--ag-dur-2) var(--ag-ease);
}

.ag-lightbox.is-open .ag-lightbox__img {
	transform: scale(1);
}

.ag-lightbox__caption {
	max-width: 60ch;
	text-align: center;
	font-family: var(--ag-font-mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	color: var(--ag-text-dim);
}

.ag-lightbox__close,
.ag-lightbox__nav {
	position: absolute;
	/* Au-dessus de l'image et lisibles par-dessus (sur mobile l'image
	   occupe toute la largeur et passait sous la flèche gauche). */
	z-index: 2;
	background: rgba(12, 12, 12, 0.62);
	border: 1px solid var(--ag-line-strong);
	color: var(--ag-text);
	cursor: pointer;
	transition: border-color var(--ag-dur-1) var(--ag-ease),
		color var(--ag-dur-1) var(--ag-ease),
		background var(--ag-dur-1) var(--ag-ease);
}

.ag-lightbox__close:hover,
.ag-lightbox__close:focus-visible,
.ag-lightbox__nav:hover,
.ag-lightbox__nav:focus-visible {
	border-color: var(--ag-accent);
	color: var(--ag-accent);
	outline: none;
}

.ag-lightbox__close {
	top: clamp(16px, 4vh, 32px);
	right: clamp(16px, 4vw, 40px);
	width: 42px;
	height: 42px;
	font-size: 20px;
	line-height: 1;
}

.ag-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 64px;
	font-size: 28px;
	line-height: 1;
}

.ag-lightbox__nav--prev {
	left: clamp(8px, 2vw, 28px);
}

.ag-lightbox__nav--next {
	right: clamp(8px, 2vw, 28px);
}

.ag-lightbox__nav[hidden] {
	display: none;
}

.ag-lightbox__counter {
	position: absolute;
	bottom: clamp(16px, 4vh, 32px);
	left: 50%;
	transform: translateX(-50%);
	font-family: var(--ag-font-mono);
	font-size: 11px;
	letter-spacing: 0.2em;
	color: var(--ag-text-faint);
}

@media (max-width: 600px) {
	.ag-lightbox {
		padding: 64px 12px;
	}

	.ag-lightbox__nav {
		width: 40px;
		height: 52px;
		font-size: 22px;
	}
}

/* ----- 4 bis. Section 02 — Réalisations (une seule zone scrollable) --- */
.ag-section--realisations {
	overflow: hidden;
}

/* Zone de défilement unique : bloc vidéo puis bloc photo. */
.ag-vscroll {
	height: var(--ag-vh);
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	outline: none;
	padding: 0 var(--ag-pad-x) clamp(72px, 11vh, 120px);
}

.ag-vscroll::-webkit-scrollbar {
	display: none;
}

.ag-vblock {
	display: flow-root;
}

.ag-vblock + .ag-vblock {
	margin-top: clamp(40px, 7vh, 88px);
}

/* En-tête de bloc : simple, défile normalement avec sa grille. */
.ag-vblock__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 24px;
	padding: clamp(56px, 9vh, 96px) 0 clamp(16px, 2.4vh, 26px);
}

.ag-vblock:first-child .ag-vblock__head {
	padding-top: clamp(64px, 10vh, 104px);
}

.ag-vblock__head .ag-eyebrow {
	padding-bottom: 6px;
}

/* Grille des réalisations vidéo */
.ag-vgrid--video {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(14px, 2vw, 24px);
}

.ag-vcard {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 10px;
	background: none;
	border: 0;
	padding: 0;
	text-align: left;
	color: inherit;
	font: inherit;
	cursor: pointer;
	transition: transform var(--ag-dur-2) var(--ag-ease), opacity var(--ag-dur-2) var(--ag-ease);
}

.ag-vcard:hover,
.ag-vcard:focus-visible {
	transform: translateY(-4px);
	outline: none;
}

.ag-vgrid--video.has-preview .ag-vcard:not(.is-previewing) {
	opacity: 0.4;
}

.ag-vcard__media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 1px solid var(--ag-line);
	background: repeating-linear-gradient(135deg, #262626 0 9px, #202020 9px 18px);
}

.ag-vcard__thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ag-vcard__ph {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-family: var(--ag-font-body);
	font-weight: 500;
	font-size: 10px;
	letter-spacing: 0.16em;
	color: var(--ag-text-faint);
}

.ag-vcard__num,
.ag-vcard__dur {
	position: absolute;
	z-index: 2;
	font-family: var(--ag-font-body);
	font-weight: 500;
	font-size: 10px;
	letter-spacing: 0.16em;
}

.ag-vcard__num {
	top: 10px;
	left: 10px;
	color: var(--ag-accent);
}

.ag-vcard__dur {
	right: 10px;
	bottom: 10px;
	color: var(--ag-text-muted);
}

.ag-vcard__play {
	position: absolute;
	z-index: 2;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-top: 9px solid transparent;
	border-bottom: 9px solid transparent;
	border-left: 15px solid var(--ag-text);
	transform: translate(-40%, -50%) scale(0.6);
	opacity: 0;
	transition: opacity var(--ag-dur-2) var(--ag-ease), transform var(--ag-dur-2) var(--ag-ease);
}

.ag-vcard:hover .ag-vcard__play,
.ag-vcard:focus-visible .ag-vcard__play {
	opacity: 0.9;
	transform: translate(-40%, -50%) scale(1);
}

.ag-vcard__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 9px 11px;
	border-left: 2px solid transparent;
	background: transparent;
	transition: background var(--ag-dur-2) var(--ag-ease),
		border-color var(--ag-dur-2) var(--ag-ease);
}

.ag-vcard:hover .ag-vcard__body,
.ag-vcard:focus-visible .ag-vcard__body {
	background: var(--ag-surface);
	border-color: var(--ag-accent);
}

.ag-vcard__title {
	margin: 0;
	font-family: var(--ag-font-body);
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 0;
}

.ag-vcard__meta {
	font-weight: 500;
	font-size: 12px;
	letter-spacing: 0.16em;
}

/* --------------------------------------------------------------------- *
 * Corners « viseur » repris du logo, révélés au survol d'une carte vidéo.
 * Un en haut à droite, un en bas à gauche ; ils glissent en diagonale.
 * --------------------------------------------------------------------- */
.ag-vcard__media::before,
.ag-vcard__media::after {
	content: "";
	position: absolute;
	z-index: 3;
	width: 14px;
	height: 14px;
	border: 2px solid var(--ag-accent);
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--ag-dur-2) var(--ag-ease),
		transform var(--ag-dur-2) var(--ag-ease);
}

.ag-vcard__media::after {
	top: 6px;
	right: 6px;
	border-left: 0;
	border-bottom: 0;
	transform: translate(6px, -6px);
}

.ag-vcard__media::before {
	bottom: 6px;
	left: 6px;
	border-right: 0;
	border-top: 0;
	transform: translate(-6px, 6px);
}

.ag-vcard:hover .ag-vcard__media::before,
.ag-vcard:hover .ag-vcard__media::after,
.ag-vcard:focus-visible .ag-vcard__media::before,
.ag-vcard:focus-visible .ag-vcard__media::after {
	opacity: 1;
	transform: translate(0, 0);
}

.ag-vcard:hover .ag-vcard__media::before,
.ag-vcard:focus-visible .ag-vcard__media::before {
	transition-delay: 55ms;
}

/* --------------------------------------------------------------------- *
 * Bloc photo : une carte par catégorie. Au repos, badge en bas ; au survol,
 * filtre accent sur la photo + nom en grand.
 * --------------------------------------------------------------------- */
.ag-catgrid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(10px, 1.4vw, 18px);
}

.ag-catcard {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	margin: 0;
	border: 1px solid var(--ag-line);
	background: repeating-linear-gradient(135deg, #262626 0 9px, #202020 9px 18px);
	cursor: pointer;
}

.ag-catcard:focus-visible {
	outline: 2px solid var(--ag-accent);
	outline-offset: 2px;
}

.ag-catcard__img,
.ag-catcard__ph {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.ag-catcard__img {
	object-fit: cover;
	filter: brightness(0.82);
	transition: transform var(--ag-dur-3) var(--ag-ease),
		filter var(--ag-dur-3) var(--ag-ease);
}

.ag-catcard:hover .ag-catcard__img,
.ag-catcard:focus-visible .ag-catcard__img {
	transform: scale(1.05);
	filter: brightness(0.42);
}

/* Filtre accent qui apparaît au survol. */
.ag-catcard::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		0deg,
		rgba(227, 155, 34, 0.32) 0%,
		rgba(12, 12, 12, 0.32) 100%
	);
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--ag-dur-3) var(--ag-ease);
}

.ag-catcard:hover::after,
.ag-catcard:focus-visible::after {
	opacity: 1;
}

.ag-catcard__count {
	position: absolute;
	top: 10px;
	left: 12px;
	z-index: 3;
	font-family: var(--ag-font-body);
	font-weight: 500;
	font-size: 10px;
	letter-spacing: 0.16em;
	color: var(--ag-accent);
}

/* Badge : état par défaut, centré en bas. */
.ag-catcard__badge {
	position: absolute;
	left: 50%;
	bottom: 12px;
	z-index: 3;
	max-width: calc(100% - 24px);
	padding: 5px 12px;
	background: rgba(12, 12, 12, 0.78);
	color: var(--ag-text);
	font-family: var(--ag-font-body);
	font-weight: 500;
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transform: translateX(-50%);
	transition: opacity var(--ag-dur-2) var(--ag-ease),
		transform var(--ag-dur-2) var(--ag-ease);
}

.ag-catcard:hover .ag-catcard__badge,
.ag-catcard:focus-visible .ag-catcard__badge {
	opacity: 0;
	transform: translateX(-50%) translateY(8px);
}

/* Nom en grand : révélé au survol, centré. */
.ag-catcard__name {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 18px;
	text-align: center;
	color: var(--ag-text);
	font-family: var(--ag-font-display);
	font-weight: 500;
	font-size: clamp(22px, 2.4vw, 36px);
	line-height: 1.05;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
	opacity: 0;
	transform: scale(0.86);
	transition: opacity var(--ag-dur-3) var(--ag-ease),
		transform var(--ag-dur-3) var(--ag-ease);
}

.ag-catcard:hover .ag-catcard__name,
.ag-catcard:focus-visible .ag-catcard__name {
	opacity: 1;
	transform: scale(1);
}

/* Bloc de clôture — appel au contact (fin de la zone scrollable). */
.ag-vcta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: clamp(12px, 1.8vh, 20px);
	padding-top: clamp(28px, 4vh, 48px);
	border-top: 1px solid var(--ag-line);
}

.ag-vcta__title {
	font-size: clamp(30px, 3.6vw, 56px);
	line-height: 0.95;
}

.ag-vcta__text {
	max-width: 46ch;
	margin: 0;
	color: var(--ag-text-soft);
	font-size: 1.0625rem;
	line-height: 1.55;
}

/* Variante « flèche » du bouton CTA (au lieu de la triangle lecture). */
.ag-cta--arrow {
	gap: 12px;
	padding: 15px 22px 15px 26px;
}

.ag-cta__arrow {
	color: var(--ag-accent);
	font-size: 15px;
	line-height: 1;
	transition: transform var(--ag-dur-2) var(--ag-ease),
		color var(--ag-dur-2) var(--ag-ease);
}

.ag-cta:hover .ag-cta__arrow,
.ag-cta:focus-visible .ag-cta__arrow {
	color: var(--ag-accent-contrast);
	transform: translateX(4px);
}

/* État vide d'un panneau (aucune réalisation du type) */
.ag-empty {
	display: flex;
	align-items: center;
	min-height: min(180px, 22vh);
	margin: 0;
	padding: 0 2px;
	border-left: 2px solid var(--ag-line-strong);
	padding-left: 18px;
	font-family: var(--ag-font-mono);
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ag-text-dim);
}

/* Points d'état (bloc vidéo / bloc photo) */
.ag-vdots {
	position: absolute;
	/* Indicateur périphérique : calé près du bord droit, pas sur la marge
	   de contenu (--ag-pad-x est trop large ici). */
	right: clamp(16px, 1.8vw, 30px);
	top: 50%;
	z-index: 5;
	display: flex;
	flex-direction: column;
	gap: 10px;
	transform: translateY(-50%);
	pointer-events: none;
}

.ag-vdots__dot {
	width: 2px;
	height: 28px;
	background: #3a3a3a;
	transition: background var(--ag-dur-2) var(--ag-ease);
}

.ag-vdots__dot.is-active {
	background: var(--ag-accent);
}

/* ----- 4 ter. Section 03 — À propos -------------------------------- */
.ag-about {
	position: relative;
	z-index: 3;
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 6vw;
	height: 100%;
	padding: 0 var(--ag-pad-x) var(--ag-pad-bottom);
}

.ag-about__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: min(60vh, 520px);
	border: 1px solid var(--ag-line);
	background: repeating-linear-gradient(135deg, #262626 0 9px, #202020 9px 18px);
	/* pas d'overflow:hidden -> les corners peuvent déborder à l'extérieur */
}

.ag-about__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Corners « viseur » à l'extérieur du portrait, révélés à l'arrivée sur la
   section (classe .is-revealed posée par section-reveal.js). Même motif que
   les cards, mais entrée plus ample + délai pour être vue après la bascule. */
.ag-about__media::before,
.ag-about__media::after {
	content: "";
	position: absolute;
	z-index: 2;
	width: 30px;
	height: 30px;
	border: 2px solid var(--ag-accent);
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--ag-dur-3) var(--ag-ease),
		transform var(--ag-dur-3) var(--ag-ease);
}

/* Ancrés en dehors des coins de l'image. */
.ag-about__media::after {
	top: -12px;
	right: -12px;
	border-left: 0;
	border-bottom: 0;
	transform: translate(44px, -44px) scale(0.6);
}

.ag-about__media::before {
	bottom: -12px;
	left: -12px;
	border-right: 0;
	border-top: 0;
	transform: translate(-44px, 44px) scale(0.6);
}

.ag-about__media.is-revealed::before,
.ag-about__media.is-revealed::after {
	opacity: 1;
	transform: translate(0, 0) scale(1);
	/* Délai : on laisse la section finir de se mettre en place. */
	transition-delay: 320ms;
}

.ag-about__media.is-revealed::before {
	transition-delay: 460ms;
}

.ag-about__ph {
	font-family: var(--ag-font-mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	color: var(--ag-text-faint);
}

.ag-about__body {
	display: flex;
	flex-direction: column;
	gap: clamp(12px, 2vh, 26px);
	max-width: 560px;
}

.ag-about__title {
	font-size: clamp(38px, 4.4vw, 72px);
}

.ag-about__text {
	margin: 0;
	font-size: 17px;
	line-height: 1.6;
	color: var(--ag-text-soft);
	text-wrap: pretty;
}

.ag-about__text--muted {
	color: var(--ag-text-dim);
}

.ag-about__services {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

.ag-tag {
	padding: 6px 11px;
	border: 1px solid var(--ag-line-soft);
	font-family: var(--ag-font-mono);
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ag-text-muted);
	transition: border-color var(--ag-dur-2) var(--ag-ease),
		color var(--ag-dur-2) var(--ag-ease),
		transform var(--ag-dur-2) var(--ag-ease);
}

.ag-tag:hover {
	border-color: var(--ag-accent);
	color: var(--ag-accent);
	transform: translateY(-2px);
}

/* ----- 4 quater. Section 04 — Contact ------------------------------ */
.ag-contact {
	position: relative;
	z-index: 3;
	display: grid;
	grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1fr);
	align-items: center;
	gap: clamp(32px, 5vw, 6vw);
	height: 100%;
	padding: 80px var(--ag-pad-x) 116px;
	overflow: hidden;
}

.ag-contact__intro {
	display: flex;
	flex-direction: column;
	gap: clamp(10px, 1.6vh, 18px);
}

.ag-contact__title {
	font-size: clamp(34px, 3.6vw, 58px);
	line-height: 0.92;
}

.ag-contact__mail {
	align-self: flex-start;
	padding-bottom: 4px;
	border-bottom: 2px solid var(--ag-accent);
	color: var(--ag-text);
	font-size: clamp(15px, 1.5vw, 20px);
	font-weight: 400;
	transition: color var(--ag-dur-2) var(--ag-ease);
}

.ag-contact__mail:hover {
	color: var(--ag-accent);
}

/* Réseaux sociaux — boutons icône + nom, mis en avant (section Contact) */
.ag-socials {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: clamp(4px, 1.2vh, 12px);
}

.ag-socials__label {
	color: var(--ag-text-dim);
}

.ag-socials__list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ag-social {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 9px 15px;
	border: 1px solid var(--ag-line-strong);
	color: var(--ag-text-soft);
	font-family: var(--ag-font-mono);
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	transition: border-color var(--ag-dur-2) var(--ag-ease),
		background var(--ag-dur-2) var(--ag-ease),
		color var(--ag-dur-2) var(--ag-ease);
}

.ag-social__icon {
	display: inline-flex;
	color: var(--ag-accent);
	transition: color var(--ag-dur-2) var(--ag-ease);
}

.ag-social__svg {
	display: block;
	width: 20px;
	height: 20px;
}

.ag-social:hover,
.ag-social:focus-visible {
	background: var(--ag-accent);
	border-color: var(--ag-accent);
	color: var(--ag-accent-contrast);
	outline: none;
}

.ag-social:hover .ag-social__icon,
.ag-social:focus-visible .ag-social__icon {
	color: var(--ag-accent-contrast);
}

.ag-social--static {
	opacity: 0.55;
}

.ag-contact__panel {
	position: relative;
	align-self: center;
	max-height: 100%;
	/* Vertical uniquement, et sur écran vraiment court : `auto` sur les deux
	   axes déclenchait deux scrollbars fantômes (le contenu tient tout juste,
	   la moindre différence d'arrondi lançait une boucle horizontale/verticale). */
	overflow-x: clip;
	overflow-y: auto;
	border: 1px solid var(--ag-line);
	background: var(--ag-surface);
	padding: clamp(16px, 2.2vh, 26px);
}

.ag-contact__corner {
	position: absolute;
	width: 20px;
	height: 20px;
	/* Callés à l'intérieur : un débord (négatif) gonflait scrollWidth/Height
	   du panneau et faisait apparaître des scrollbars. */
	pointer-events: none;
}

.ag-contact__corner--tl {
	top: 0;
	left: 0;
	border-top: 2px solid var(--ag-accent);
	border-left: 2px solid var(--ag-accent);
}

.ag-contact__corner--br {
	right: 0;
	bottom: 0;
	border-right: 2px solid var(--ag-accent);
	border-bottom: 2px solid var(--ag-accent);
}

/* --- Habillage Contact Form 7 --- */
.ag-cf .wpcf7-form,
.ag-cf.ag-cf--fallback {
	display: flex;
	flex-direction: column;
	gap: clamp(9px, 1.5vh, 14px);
}

.ag-cf .wpcf7-form p {
	margin: 0;
}

.ag-cf-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.ag-cf-field {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 6px;
}

.ag-cf-label {
	font-family: var(--ag-font-mono);
	font-size: 10px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ag-text-dim);
}

.ag-cf input[type='text'],
.ag-cf input[type='email'],
.ag-cf select,
.ag-cf textarea {
	width: 100%;
	min-width: 0;
	padding: 9px 12px;
	border: 1px solid var(--ag-line-soft);
	background: var(--ag-bg);
	color: var(--ag-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	outline: none;
	border-radius: 0;
	transition: border-color var(--ag-dur-1) var(--ag-ease);
}

.ag-cf textarea {
	min-height: 64px;
	resize: none;
}

.ag-cf input:focus,
.ag-cf select:focus,
.ag-cf textarea:focus {
	border-color: var(--ag-accent);
}

.ag-cf-actions {
	display: flex;
	align-items: center;
	margin-top: 2px;
}

/* La note pousse tout le reste (spinner CF7 + bouton) contre le bord droit. */
.ag-cf-note {
	margin-right: auto;
	font-family: var(--ag-font-mono);
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ag-text-faint);
}

/* Le spinner reste dans le flux mais avant le bouton : le bouton finit collé à droite. */
.ag-cf-actions .wpcf7-spinner {
	order: 1;
}

.ag-cf-actions .wpcf7-submit {
	order: 2;
}

.ag-cf .wpcf7-submit {
	padding: 13px 24px;
	border: 1px solid var(--ag-accent);
	background: var(--ag-accent);
	color: var(--ag-accent-contrast);
	font-family: var(--ag-font-mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background var(--ag-dur-2) var(--ag-ease), color var(--ag-dur-2) var(--ag-ease);
}

.ag-cf .wpcf7-submit:hover {
	background: transparent;
	color: var(--ag-accent);
}

/* Au repos, le spinner CF7 ne réserve aucune place -> bouton collé à droite. */
.ag-cf .wpcf7-form:not(.submitting) .wpcf7-spinner {
	width: 0;
	margin: 0;
	overflow: hidden;
}

.ag-cf .wpcf7-form.submitting .wpcf7-spinner {
	width: 24px;
	margin: 0 12px 0 0;
}

.ag-cf .wpcf7-response-output {
	margin: 6px 0 0;
	padding: 10px 12px;
	border: 1px solid var(--ag-line-soft);
	font-family: var(--ag-font-mono);
	font-size: 11px;
	letter-spacing: 0.04em;
	color: var(--ag-text-soft);
}

.ag-cf .wpcf7-not-valid-tip {
	margin-top: 5px;
	color: #d8543a;
	font-family: var(--ag-font-mono);
	font-size: 10px;
	letter-spacing: 0.04em;
}

.ag-cf .wpcf7-not-valid {
	border-color: #d8543a;
}

.ag-cf-field .wpcf7-form-control-wrap {
	display: block;
}

/* ----- 5. HUD (overlays d'interface) -------------------------------- */
.ag-scanlines {
	position: absolute;
	inset: 0;
	z-index: 6;
	pointer-events: none;
	background: repeating-linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.018) 0 1px,
		transparent 1px 3px
	);
}

.ag-hud-top {
	position: absolute;
	right: var(--ag-pad-x);
	top: 34px;
	z-index: 8;
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--ag-font-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ag-text-faint);
}

.ag-hud-bottom {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 8;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	padding: 13px var(--ag-pad-x);
	background: rgba(15, 15, 15, 0.9);
	backdrop-filter: blur(12px) saturate(1.4);
	-webkit-backdrop-filter: blur(12px) saturate(1.4);
	border-top: 1px solid var(--ag-line-strong);
}

.ag-nav {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: nowrap;
	min-width: 0;
}

.ag-nav__item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
	font-family: var(--ag-font-mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--ag-text-dim);
	transition: color var(--ag-dur-2) var(--ag-ease);
}

.ag-nav__num {
	font-variant-numeric: tabular-nums;
}

.ag-nav__label {
	margin-left: 2px;
}

.ag-nav__dot {
	width: 6px;
	height: 6px;
	flex-shrink: 0;
	background: currentColor;
	transition: transform var(--ag-dur-2) var(--ag-ease);
}

.ag-nav__item.is-active .ag-nav__dot {
	transform: scale(1.5);
}

.ag-nav__item:hover,
.ag-nav__item.is-active {
	color: var(--ag-accent);
}

.ag-progress {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
	/* Easter egg : la barre se « gratte » à la souris (cf. horizontal-scroll.js).
	   Zone de préhension élargie sans décaler la mise en page. */
	padding: 12px 0;
	margin: -12px 0;
	cursor: ew-resize;
	touch-action: none;
}

.ag-progress__time {
	font-family: var(--ag-font-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	color: var(--ag-text-dim);
	white-space: nowrap;
}

.ag-progress__track {
	position: relative;
	display: block;
	width: 140px;
	height: 2px;
	background: var(--ag-line-soft);
}

.ag-progress__bar {
	position: relative;
	display: block;
	height: 100%;
	width: 0;
	background: var(--ag-accent);
	transition: width var(--ag-dur-3) var(--ag-ease-inout);
}

/* Tête de lecture façon banc de montage, au bord droit de la barre. */
.ag-progress__bar::after {
	content: "";
	position: absolute;
	top: -3px;
	bottom: -3px;
	right: -1px;
	width: 2px;
	background: var(--ag-accent);
}

body.ag-scrubbing {
	cursor: ew-resize;
	user-select: none;
	-webkit-user-select: none;
}

.ag-pulse {
	color: var(--ag-accent);
	animation: ag-pulse 2.6s var(--ag-ease-inout) infinite;
}

@keyframes ag-pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.4;
	}
}

/* ----- 5 bis. Barre de navigation mobile (menu vertical classique) ---
   Masquée sur desktop (rail) ; affichée en pile verticale. */
.ag-topbar {
	display: none;
}

body.ag-stacked .ag-topbar {
	position: sticky;
	top: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px var(--ag-pad-x);
	background: rgba(18, 18, 18, 0.92);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--ag-line);
}

/* La barre d'admin WordPress reste fixe au-dessus de 782 px : on décale la
   barre collante d'autant pour qu'elle ne passe pas dessous. */
.admin-bar.ag-stacked .ag-topbar {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar.ag-stacked .ag-topbar {
		top: 0;
	}
}

.ag-topbar__brand {
	display: inline-flex;
	align-items: center;
	color: var(--ag-text);
	font-family: var(--ag-font-body);
	font-weight: 600;
	font-size: 17px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ag-topbar__brand img {
	display: block;
	width: auto;
	height: 24px;
}

.ag-topbar__toggle {
	position: relative;
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	background: none;
	border: 1px solid var(--ag-line-strong);
	cursor: pointer;
	transition: border-color var(--ag-dur-1) var(--ag-ease);
}

.ag-topbar__toggle:hover,
.ag-topbar__toggle:focus-visible {
	border-color: var(--ag-accent);
	outline: none;
}

.ag-topbar__bars,
.ag-topbar__bars::before,
.ag-topbar__bars::after {
	position: absolute;
	left: 50%;
	width: 18px;
	height: 2px;
	margin-left: -9px;
	background: var(--ag-text);
	transition: transform var(--ag-dur-2) var(--ag-ease),
		background var(--ag-dur-1) var(--ag-ease);
}

.ag-topbar__bars {
	top: 50%;
	margin-top: -1px;
}

.ag-topbar__bars::before {
	content: "";
	top: -6px;
}

.ag-topbar__bars::after {
	content: "";
	top: 6px;
}

.ag-topbar.is-open .ag-topbar__bars {
	background: transparent;
}

.ag-topbar.is-open .ag-topbar__bars::before {
	transform: translateY(6px) rotate(45deg);
}

.ag-topbar.is-open .ag-topbar__bars::after {
	transform: translateY(-6px) rotate(-45deg);
}

.ag-topbar__menu {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	overflow: hidden;
	max-height: 0;
	background: var(--ag-bg-deep);
	border-bottom: 1px solid var(--ag-line);
	transition: max-height var(--ag-dur-3) var(--ag-ease-inout);
}

.ag-topbar.is-open .ag-topbar__menu {
	max-height: 70vh;
}

.ag-topbar__menu ul {
	margin: 0;
	padding: 6px var(--ag-pad-x) 18px;
	list-style: none;
}

.ag-topbar__link {
	display: flex;
	align-items: baseline;
	gap: 12px;
	padding: 16px 0;
	border-bottom: 1px solid var(--ag-line);
	color: var(--ag-text-soft);
	font-family: var(--ag-font-body);
	font-weight: 600;
	font-size: clamp(22px, 7vw, 30px);
	line-height: 1.1;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	transition: color var(--ag-dur-1) var(--ag-ease);
}

.ag-topbar__menu li:last-child .ag-topbar__link {
	border-bottom: 0;
}

.ag-topbar__link-num {
	flex-shrink: 0;
	font-family: var(--ag-font-mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	color: var(--ag-text-dim);
}

.ag-topbar__link:hover,
.ag-topbar__link:focus-visible,
.ag-topbar__link.is-active {
	color: var(--ag-accent);
	outline: none;
}

/* Défilement doux vers les ancres (respecte le mouvement réduit plus bas). */
html {
	scroll-behavior: smooth;
}

body.ag-stacked .ag-section {
	scroll-margin-top: 68px;
}

/* Repli sans JS : la barre est visible et le menu déplié. */
@media (max-width: 900px) {
	body.ag-no-js .ag-topbar {
		position: static;
		display: flex;
		flex-wrap: wrap;
	}

	body.ag-no-js .ag-topbar__toggle {
		display: none;
	}

	body.ag-no-js .ag-topbar__menu {
		position: static;
		max-height: none;
		width: 100%;
	}
}

/* ----- 5 ter. Mentions cookies + pied de page légal ---------------- */

/* Mention discrète affichée avant tout chargement du lecteur YouTube. */
.ag-legal-note {
	/* Assez large pour tenir sur une ligne dès que la colonne le permet
	   (contrainte réelle : le max-width de .ag-showreel__content). */
	max-width: 60ch;
	font-family: var(--ag-font-mono);
	font-size: 11px;
	line-height: 1.5;
	letter-spacing: 0.04em;
	color: var(--ag-text-faint);
	/* Petite marge haute : dans le showreel elle s'ajoute au gap du conteneur
	   flex (déjà resserré) ; dans le bloc vidéo (flow normal) elle suffit seule. */
	margin: 10px 0 0;
}

/* Dans le bloc « Réalisations vidéo », la mention précède la grille :
   il lui faut aussi une marge basse pour la détacher des cartes. */
.ag-legal-note--block {
	margin-bottom: clamp(16px, 3vh, 28px);
}

/* Ligne légale : © + liens. Discrète, calée en bas du panneau Contact. */
.ag-legal {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 18px;
	font-family: var(--ag-font-mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ag-text-faint);
}

.ag-legal__copy {
	white-space: nowrap;
}

.ag-legal__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
}

.ag-legal__link {
	color: var(--ag-text-dim);
	transition: color var(--ag-dur-1) var(--ag-ease);
}

.ag-legal__link:hover,
.ag-legal__link:focus-visible {
	color: var(--ag-accent);
}

/* Ligne légale ancrée au bas de la section Contact, juste au-dessus du
   HUD de navigation (~44 px de haut) pour ne pas empiéter sur le formulaire. */
.ag-legal--contact {
	position: absolute;
	left: var(--ag-pad-x);
	right: var(--ag-pad-x);
	bottom: clamp(52px, 8vh, 64px);
	z-index: 4;
}

/* ----- 5 quater. Page classique (documents légaux) ---------------- */
.ag-page {
	max-width: 760px;
	margin: 0 auto;
	padding: clamp(28px, 6vh, 64px) var(--ag-pad-x) clamp(64px, 12vh, 120px);
}

.ag-page__bar {
	margin-bottom: clamp(32px, 7vh, 72px);
}

.ag-page__home {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	color: var(--ag-text-dim);
	font-family: var(--ag-font-mono);
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	transition: color var(--ag-dur-1) var(--ag-ease);
}

.ag-page__home:hover {
	color: var(--ag-accent);
}

.ag-page__home .ag-logo {
	width: auto;
	height: 34px;
}

.ag-page__title {
	margin: 0 0 clamp(24px, 5vh, 48px);
	font-family: var(--ag-font-display);
	font-weight: 400;
	font-size: clamp(34px, 5vw, 64px);
	line-height: 0.95;
	letter-spacing: var(--ag-title-tracking);
	text-transform: uppercase;
}

/* Contenu éditorial (the_content) — rendu lisible sur fond sombre. */
.ag-prose {
	color: var(--ag-text-soft);
	font-size: 1rem;
	line-height: 1.7;
}

.ag-prose > * + * {
	margin-top: 1.1em;
}

.ag-prose h2 {
	margin: 2em 0 0.6em;
	font-family: var(--ag-font-display);
	font-weight: 400;
	font-size: clamp(20px, 2.4vw, 28px);
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: var(--ag-text);
}

.ag-prose h3 {
	margin: 1.6em 0 0.4em;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--ag-text);
}

.ag-prose a {
	color: var(--ag-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ag-prose a:hover {
	color: var(--ag-text);
}

.ag-prose ul,
.ag-prose ol {
	margin-left: 1.2em;
}

.ag-prose li + li {
	margin-top: 0.4em;
}

.ag-page__updated {
	margin: clamp(40px, 8vh, 72px) 0 0;
	font-family: var(--ag-font-mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ag-text-faint);
}

.ag-page__footer {
	margin-top: clamp(48px, 10vh, 96px);
	padding-top: clamp(20px, 4vh, 32px);
	border-top: 1px solid var(--ag-line);
}

/* ----- 6. Fallback génériques -------------------------------------- */
.ag-fallback {
	max-width: 720px;
	margin: 0 auto;
	padding: 120px 6vw;
}

/* ----- 7. Mode « pile verticale » (mobile / étroit / mouvement réduit) ---
   Activé par JS via body.ag-stacked (voir horizontal-scroll.js), et en
   repli sans JS via les media queries plus bas. */
body.ag-stacked {
	overflow: visible;
}

body.ag-stacked .ag-stage {
	width: 100%;
	height: auto;
	min-height: 0;
	/* Rogne les débordements horizontaux décoratifs (coins « viseur » des
	   sections À propos / Contact qui dépassent de quelques px) sans créer
	   de conteneur de défilement — la barre supérieure sticky est hors de
	   .ag-stage, donc non affectée. */
	overflow-x: clip;
	overflow-y: visible;
}

body.ag-stacked .ag-rail {
	flex-direction: column;
	width: 100%;
	height: auto;
	transform: none !important;
	transition: none;
	will-change: auto;
}

/* Chaque section prend la hauteur de son contenu (plus de 100vh forcé),
   avec une marge basse qui dégage la barre de navigation fixe. */
body.ag-stacked .ag-section {
	flex: 0 0 auto;
	width: 100%;
	height: auto;
	min-height: 0;
	overflow: visible;
	padding: clamp(80px, 13vh, 120px) var(--ag-pad-x) clamp(104px, 15vh, 140px);
}

body.ag-stacked .ag-section + .ag-section {
	border-top: 1px solid var(--ag-line);
}

/* Section 01 — Showreel : garde le plein écran, contenu centré. */
body.ag-stacked .ag-section--showreel {
	min-height: 100svh;
	padding-top: 84px;
}

/* Section 02 — Réalisations : la zone de défilement s'aplatit dans la page. */
body.ag-stacked .ag-vscroll {
	height: auto;
	overflow: visible;
	padding: 0;
}

body.ag-stacked .ag-vblock__head,
body.ag-stacked .ag-vblock:first-child .ag-vblock__head {
	padding-top: 0;
}

body.ag-stacked .ag-vblock + .ag-vblock {
	margin-top: clamp(40px, 9vw, 64px);
}

body.ag-stacked .ag-vdots {
	display: none;
}

/* Sections 03 / 04 : grilles à hauteur libre, alignées en haut. */
body.ag-stacked .ag-about,
body.ag-stacked .ag-contact {
	height: auto;
	align-content: start;
	align-items: start;
	padding: 0;
}

body.ag-stacked .ag-contact__panel {
	max-height: none;
	overflow: visible;
}

/* En pile, la ligne légale reprend le flux et devient un vrai pied de page. */
body.ag-stacked .ag-legal--contact {
	position: static;
	width: 100%;
	margin-top: clamp(40px, 9vw, 64px);
	padding-top: clamp(18px, 5vw, 28px);
	border-top: 1px solid var(--ag-line);
}

/* L'aperçu vidéo en fond n'a pas de sens sans survol (tactile). */
body.ag-stacked .ag-hover-preview {
	display: none;
}

/* En pile : le HUD façon « app » disparaît, la navigation passe dans la
   barre supérieure (.ag-topbar). */
body.ag-stacked .ag-hud-top,
body.ag-stacked .ag-hud-bottom {
	display: none;
}

/* En pile, .ag-stage a une hauteur « auto » : le voile de scanlines en
   position absolue le couvre déjà entièrement. Le passer en `fixed`
   l'ancrait au viewport, scrollbar comprise → débordement horizontal. */
body.ag-stacked .ag-scanlines {
	position: absolute;
}

/* ----- 7 bis. Ajustements purement visuels sur petit écran -------- */
@media (max-width: 900px) {
	.ag-vgrid--video,
	.ag-catgrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ag-about {
		grid-template-columns: 1fr;
		gap: clamp(18px, 4vh, 32px);
	}

	.ag-about__media {
		height: min(38vh, 300px);
	}

	.ag-contact {
		grid-template-columns: 1fr;
		gap: clamp(20px, 4vh, 34px);
	}

	.ag-cf-row {
		grid-template-columns: 1fr;
	}

	.ag-showreel__title {
		font-size: clamp(44px, 13vw, 92px);
	}

	.ag-showreel__meta {
		display: none;
	}

	.ag-section__head--row {
		gap: 12px 20px;
	}

	/* Rythme encore plus resserré sous 900 px (téléphone en paysage compris). */
	.ag-showreel__content {
		gap: clamp(14px, 2.4vh, 22px);
	}

	.ag-legal-note {
		font-size: 10px;
	}
}

@media (max-width: 620px) {
	.ag-catgrid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 480px) {
	.ag-vgrid--video {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ----- 7bis. Page maintenance ------------------------------------- */
.ag-maint {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 100vh;
	min-height: 100svh;
	padding: 12vh var(--ag-pad-x);
	background: var(--ag-bg-panel);
	overflow: hidden;
}

.ag-maint__content {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	gap: 22px;
	max-width: 560px;
}

.ag-maint__logo .ag-logo {
	height: clamp(40px, 5vw, 56px);
	width: auto;
	margin-bottom: 6px;
}

.ag-maint__title {
	margin: 0;
	font-family: var(--ag-font-display);
	font-weight: 400;
	font-size: clamp(38px, 6vw, 84px);
	line-height: 0.92;
	letter-spacing: var(--ag-title-tracking);
	text-transform: uppercase;
}

.ag-maint__text {
	margin: 0;
	max-width: 46ch;
	color: var(--ag-text-soft);
	font-size: 1.0625rem;
	line-height: 1.6;
}

.ag-maint__login {
	align-self: flex-start;
	margin-top: 8px;
	padding-bottom: 3px;
	font-family: var(--ag-font-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ag-text-dim);
	border-bottom: 1px solid var(--ag-line-strong);
	transition:
		color var(--ag-dur-1) var(--ag-ease),
		border-color var(--ag-dur-1) var(--ag-ease);
}

.ag-maint__login:hover,
.ag-maint__login:focus-visible {
	color: var(--ag-text);
	border-color: var(--ag-accent);
}

@media (max-width: 600px) {
	.ag-maint {
		padding: 10vh var(--ag-pad-x);
	}
}

/* Repli sans JS : mouvement réduit -> on empile aussi. */
@media (prefers-reduced-motion: reduce) {
	body.ag-no-js .ag-stage {
		height: auto;
		overflow: visible;
	}

	body.ag-no-js .ag-rail {
		flex-direction: column;
		width: 100%;
		height: auto;
		transform: none;
		transition: none;
	}

	body.ag-no-js .ag-section {
		flex-basis: auto;
		height: auto;
		min-height: 100vh;
	}
}

/* ----- 8. Mouvement réduit : on neutralise toutes les animations ---- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
		scroll-behavior: auto !important;
	}

	.ag-pulse {
		animation: none;
		opacity: 0.7;
	}

	.ag-vcard:hover,
	.ag-cta:hover,
	.ag-tag:hover {
		transform: none;
	}

	/* Boucle de fond du showreel : masquée, le fond sombre suffit. */
	.ag-showreel__bg-video {
		display: none;
	}
}
