/* Affiche — portfolio typographique */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.af-body { margin: 0; padding: 0; }

.af {
	--af-fs: clamp(11px, var(--af-fs-vw, .87vw), 16px);
	--af-lh: 1.1;
	--af-line: calc(var(--af-fs) * var(--af-lh));
	--af-edge: clamp(10px, .95vw, 18px);
	--af-col: 55.5vw;
	--af-ink: color-mix(in srgb, var(--af-text, #000) 85%, transparent);
	--af-muted-c: color-mix(in srgb, var(--af-text, #000) 40%, transparent);
	position: relative;
	min-height: 100vh;
	background: var(--af-bg, #275385);
	color: var(--af-ink);
	font-family: var(--af-body-font, "Helvetica Neue", Arial, sans-serif);
	font-size: var(--af-fs);
	font-weight: 500;
	line-height: var(--af-lh);
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "ss01" 0;
}
.af *, .af *::before, .af *::after { box-sizing: border-box; }
.af a { color: inherit; text-decoration: none; }
.af a:hover { text-decoration: underline; text-decoration-thickness: from-font; text-underline-offset: .15em; }
.af p { margin: 0 0 var(--af-line); }
.af p:last-child { margin-bottom: 0; }
.af img { display: block; max-width: 100%; height: auto; }
.af h1, .af h2, .af h3 { margin: 0; font: inherit; }
.af b, .af strong, .af .af-h { font-weight: 700; }
.af-muted { color: var(--af-muted-c); }

/* Grain */
.af--grain::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	opacity: .22;
	mix-blend-mode: multiply;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	background-size: 256px;
}

/* Vidéo de fond ---------------------------------------------------------- */
.af-bgvideo { left: 0; width: 100%; z-index: 0; overflow: hidden; pointer-events: none; }
.af-bgvideo--screen { position: absolute; top: 0; height: 100vh; height: 100svh; }
body.admin-bar .af-bgvideo--screen { height: calc(100vh - 32px); height: calc(100svh - 32px); }
.af-bgvideo--page { position: fixed; top: 0; bottom: 0; }
body.admin-bar .af-bgvideo--page { top: 32px; }
.af-bgvideo__media, .af-bgvideo__poster { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.af-bgvideo__poster { display: none; }
.af-bgvideo__veil { position: absolute; inset: 0; background: var(--af-bg, #275385); }
.af--grain::before { z-index: 1; }
.af-main { z-index: 2; }
@media (prefers-reduced-motion: reduce) {
	.af-bgvideo--motion .af-bgvideo__media { display: none; }
	.af-bgvideo--motion .af-bgvideo__poster { display: block; }
}

/* Cadre fixe ------------------------------------------------------------ */
.af-frame { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
body.admin-bar .af-frame { top: 32px; }
.af-c { position: absolute; pointer-events: auto; white-space: nowrap; line-height: var(--af-lh); }
.af-c--tl { top: var(--af-edge); left: var(--af-edge); }
.af-c--tr { top: var(--af-edge); right: var(--af-edge); }
.af-c--ml { top: 50%; left: var(--af-edge); transform: translateY(-50%); }
.af-c--mr { top: 50%; right: var(--af-edge); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.af-c--bl { bottom: var(--af-edge); left: var(--af-edge); }
.af-c--br { bottom: var(--af-edge); right: var(--af-edge); }
.af-arrow { width: .72em; height: .72em; margin-left: .18em; vertical-align: -.02em; }

/* Colonne centrale ------------------------------------------------------ */
.af-main { position: relative; z-index: 1; width: var(--af-col); margin: 0 auto; }

/* En-tête */
.af-hero { padding-top: var(--af-edge); text-align: center; }
.af-hero__sub { margin: 0 !important; }
/* Avec une vidéo « plein écran à l'ouverture » : l'en-tête occupe au moins tout le premier écran,
   les projets commencent sous la vidéo. */
.af-hero--video { min-height: 100vh; min-height: 100svh; }
body.admin-bar .af-hero--video { min-height: calc(100vh - 32px); min-height: calc(100svh - 32px); }
.af .af-hero__title {
	margin-top: calc(5.3vw - var(--af-line)) !important;
	color: var(--af-title, #111);
	font-family: var(--af-hero-font);
	font-weight: var(--af-hero-weight, 700) !important;
	font-stretch: var(--af-hero-stretch, normal);
	font-size: var(--af-hero-vw, 15vw);
	line-height: .78;
	letter-spacing: -.025em;
	text-transform: none;
	font-kerning: normal;
}
.af-fit { display: block; margin: 0 auto 3.4vw; }
.af-fit__line { display: block; white-space: nowrap; letter-spacing: -.025em; }
.af .af-hero__title--fit .af-fit { visibility: hidden; }
.af .af-hero__title--fit.is-fitted .af-fit { visibility: visible; }
.af-hero__logo { margin: 4.5vw auto 0; display: flex; justify-content: center; }
.af-hero__logo img { width: auto; max-width: 38%; max-height: 14vw; }

/* Projets */
.af-projects { padding-top: 6.6vw; }
.af-project { margin-bottom: calc(var(--af-line) * 5); }
.af-slides {
	position: relative;
	aspect-ratio: var(--af-ratio, 3/2);
	background: color-mix(in srgb, var(--af-text, #000) 12%, transparent);
	overflow: hidden;
}
.af-slide { position: absolute; inset: 0; margin: 0; visibility: hidden; }
.af-slide.is-active { visibility: visible; }
.af-slide img { width: 100%; height: 100%; max-width: none; object-fit: var(--af-fit, cover); }
.af-zone {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 50%;
	padding: 0;
	border: 0;
	background: transparent;
	appearance: none;
}
.af-zone--prev { left: 0; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M22 16H9m6-6-6 6 6 6' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Cpath d='M22 16H9m6-6-6 6 6 6' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3C/svg%3E") 16 16, w-resize; }
.af-zone--next { right: 0; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M10 16h13m-6-6 6 6-6 6' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Cpath d='M10 16h13m-6-6 6 6-6 6' fill='none' stroke='%23000' stroke-width='1.3'/%3E%3C/svg%3E") 16 16, e-resize; }
.af-zone:focus-visible { outline: 1px solid currentColor; outline-offset: -4px; }

.af-cap { display: grid; grid-template-columns: 50% minmax(0, 1fr); margin-top: calc(var(--af-line) * 1.4); }
.af-cap__left { padding-right: var(--af-fs); }
.af-cap__text { margin-top: var(--af-line); }
.af-cap__text > * { margin-top: 0; }

/* Informations / CV */
.af-about {
	position: relative;
	display: grid;
	grid-template-columns: 50% 25% 25%;
	align-items: start;
	min-height: 100vh;
	padding-top: var(--af-edge);
	padding-bottom: calc(var(--af-edge) * 2 + var(--af-line) * 2);
	margin-top: calc(var(--af-line) * 4);
}
.af-about__info { padding-right: 15%; }
.af-about__col { padding-right: var(--af-fs); }
.af-h { margin-bottom: var(--af-line) !important; }
.af-cv { margin-bottom: calc(var(--af-line) * 2); }
.af-prose > :first-child { margin-top: 0; }
.af-prose ul, .af-prose ol { margin: 0 0 var(--af-line); padding-left: 1.1em; }
.af-top {
	position: absolute;
	left: 50%;
	bottom: var(--af-edge);
	transform: translateX(-50%);
	white-space: nowrap;
}

/* Mobile ------------------------------------------------------------------- */
@media (max-width: 800px) {
	.af { --af-fs: 14px; --af-edge: 12px; --af-col: calc(100vw - 24px); }
	body.admin-bar .af-frame { top: 46px; }
	body.admin-bar .af-bgvideo--page { top: 46px; }
	.af-c--ml, .af-c--mr { display: none; }
	.af-hero { padding-top: calc(var(--af-edge) + var(--af-line) * 2); }
	.af .af-hero__title { margin-top: calc(var(--af-line) * 2) !important; }
	.af-fit { margin-bottom: 6vw; }
	.af-hero__logo img { max-width: 60%; max-height: none; }
	.af-projects { padding-top: 12vw; }
	.af-project { margin-bottom: calc(var(--af-line) * 4); }
	.af-cap { grid-template-columns: 1fr 1fr; }
	.af-about { grid-template-columns: 1fr 1fr; row-gap: calc(var(--af-line) * 2); min-height: 0; padding-top: calc(var(--af-edge) + var(--af-line) * 2); padding-bottom: calc(var(--af-edge) * 3 + var(--af-line) * 4); }
	.af-about__info { grid-column: 1 / -1; padding-right: 0; }
	.af { padding-bottom: calc(var(--af-edge) + var(--af-line)); }
}
