/* ============================================================
   Prototype v101 : page projet (projet101.php), après v101.css.
   ============================================================ */

/* ---- Fond d'écran : le visuel en cours, très flou, derrière toute la page ----
   Seule l'opacité des couches est animée : chaque flou n'est calculé qu'une fois. */
.pj-fond { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.pj-fond img {
	position: absolute;
	inset: -12%;
	width: 124%; height: 124%;
	object-fit: cover;
	filter: blur(64px) saturate(1.25);
	opacity: 0;
	transition: opacity 1.4s ease;
}
.pj-fond img.on { opacity: .5; }
/* Bords assombris : le texte reste lisible quelle que soit l'image. */
.pj-fond::after {
	content: '';
	position: absolute; inset: 0;
	background: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, .15), rgba(0, 0, 0, .7) 75%);
}
@media (max-width: 760px) { .pj-fond img { filter: blur(40px) saturate(1.25); } }

/* ---- Ouverture : titre, puis la couverture qui sort du flou ---- */
.pj-hero {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: clamp(24px, 4vh, 48px);
	padding: clamp(110px, 15vh, 150px) var(--marge) clamp(40px, 7vh, 80px);
	text-align: center;
}
.pj-titre { display: flex; flex-direction: column; gap: 6px; }
.pj-client {
	font-weight: 500;
	font-size: clamp(40px, 6.4vw, 112px);
	line-height: .98;
	letter-spacing: -.045em;
}
.pj-projet {
	font-weight: 300;
	font-size: clamp(20px, 2.4vw, 38px);
	letter-spacing: -.02em;
	color: rgba(255, 255, 255, .75);
}
.pj-couv { margin: 0; }
.pj-couv img {
	width: auto; height: auto;
	max-width: min(78vw, 1200px);
	max-height: 58vh;
	max-height: 58svh;
	border-radius: var(--rayon);
	box-shadow: 0 40px 120px rgba(0, 0, 0, .5);
}
/* Entrée : les lignes du titre puis la couverture sortent du flou (animation CSS, sans script). */
.pj-client, .pj-projet, .pj-couv { animation: pj-entree 1.2s var(--ease) both; }
.pj-projet { animation-delay: .15s; }
.pj-couv { animation-duration: 1.6s; animation-delay: .3s; }
@keyframes pj-entree { from { opacity: 0; filter: blur(16px); transform: translateY(18px) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .pj-client, .pj-projet, .pj-couv { animation: none; } }

/* ---- Informations ---- */
.pj-infos {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: clamp(32px, 6vw, 110px);
	padding: clamp(60px, 10vh, 130px) var(--marge);
}
.pj-meta dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 12px 22px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.pj-meta dt { color: rgba(255, 255, 255, .45); }
.pj-meta dd { margin: 0; color: var(--encre); letter-spacing: .06em; }
.pj-tech { margin-top: 28px; }
.pj-texte { display: flex; flex-direction: column; gap: 20px; }
.pj-pitch {
	margin-bottom: 12px;
	font-weight: 300;
	font-size: clamp(24px, 2.8vw, 44px);
	line-height: 1.18;
	letter-spacing: -.03em;
}
.pj-texte > p:not(.pj-pitch) { max-width: 760px; color: rgba(255, 255, 255, .78); font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; }
.pj-livrables-t {
	margin-top: 28px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .45);
}
.pj-livrables { max-width: 760px; font-size: 15px; }
.pj-livrables li { padding: 11px 0; border-top: 1px solid var(--ligne); }
.pj-livrables li:last-child { border-bottom: 1px solid var(--ligne); }
@media (max-width: 860px) { .pj-infos { grid-template-columns: 1fr; } }

/* ---- Galerie : liste simple sans JavaScript ---- */
.pj-scene { position: relative; padding: 0 var(--marge) clamp(60px, 10vh, 120px); }
.pj-vis { margin: 0 auto; width: fit-content; }
.pj-vis + .pj-vis { margin-top: clamp(24px, 4vh, 48px); }
.pj-vis img, .pj-vis video {
	display: block;
	/* Largeur calculée depuis les proportions (--ar) : la place est réservée avant le chargement,
	   le visuel tient dans 86 % de la largeur et 80 % de la hauteur de l'écran. */
	width: min(86vw, 1500px, calc(80vh * var(--ar, 1.5)));
	width: min(86vw, 1500px, calc(80svh * var(--ar, 1.5)));
	height: auto;
	aspect-ratio: var(--ar, 1.5);
	border-radius: calc(var(--rayon) * .7);
	background: #000;
}
.pj-compteur { display: none; }

/* ---- Galerie traversée, un visuel à la fois (classe posée par projet101.js) ---- */
.pj-galerie {
	--pj-entree: .5;
	--pj-pas: .85;
	--pj-queue: .35;
}
.pj-galerie.pj-actif {
	height: calc((var(--pj-entree) + (var(--n) - 1) * var(--pj-pas) + var(--pj-queue) + 1) * 100vh);
	height: calc((var(--pj-entree) + (var(--n) - 1) * var(--pj-pas) + var(--pj-queue) + 1) * 100svh);
}
.pj-actif .pj-scene {
	position: sticky;
	top: 0;
	height: 100vh;
	height: 100svh;
	padding: 0;
	overflow: hidden;
}
.pj-actif .pj-vis {
	position: absolute;
	left: 50%; top: 52%;
	margin: 0;
	transform: translate3d(-50%, -50%, 0) scale(var(--s, .2));
	opacity: var(--o, 0);
	filter: blur(var(--b, 0px));
	will-change: transform, opacity, filter;
	pointer-events: none;
}
.pj-actif .pj-vis.on { pointer-events: auto; }
.pj-actif .pj-vis img, .pj-actif .pj-vis video { width: min(86vw, 1500px, calc(74svh * var(--ar, 1.5))); box-shadow: 0 40px 120px rgba(0, 0, 0, .5); }
.pj-actif .pj-compteur {
	display: block;
	position: absolute;
	right: var(--marge);
	bottom: clamp(24px, 5vh, 56px);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .16em;
	color: rgba(255, 255, 255, .5);
}
.pj-compteur span { color: var(--encre); }

/* ---- Projet suivant ---- */
.pj-suite {
	min-height: 90vh;
	min-height: 90svh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(80px, 12vh, 140px) var(--marge) clamp(28px, 5vh, 48px);
	text-align: center;
}
.pj-suivant { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pj-suite-label { font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.pj-suite-nom {
	font-weight: 500;
	font-size: clamp(44px, 8vw, 140px);
	line-height: .95;
	letter-spacing: -.05em;
	transition: letter-spacing .8s var(--ease);
}
.pj-suite-nom em { display: block; margin-top: 10px; font-style: normal; font-weight: 300; font-size: .28em; letter-spacing: -.02em; color: rgba(255, 255, 255, .72); }
.pj-suivant:hover .pj-suite-nom { letter-spacing: -.035em; }
.pj-suite-img { margin-top: 18px; width: min(360px, 60vw); aspect-ratio: 16 / 10; border-radius: calc(var(--rayon) * .7); }
.pj-suite-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.pj-suivant:hover .pj-suite-img img { transform: scale(1.06); }
.pj-suite-bas {
	display: flex;
	justify-content: space-between;
	margin-top: clamp(56px, 10vh, 110px);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.pj-suite-bas a { opacity: .7; transition: opacity .3s; }
.pj-suite-bas a:hover { opacity: 1; }

.p-404 { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 140px var(--marge) 80px; }

/* ---- Page 404 (404.php) : « 4•4 », le zéro est le voyant du logo ---- */
.e404 {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	padding: clamp(120px, 16vh, 160px) var(--marge) clamp(60px, 10vh, 100px);
	text-align: center;
}
.e404-code {
	display: flex;
	align-items: center;
	gap: .08em;
	font-weight: 300;
	font-size: clamp(110px, 22vw, 320px);
	line-height: .85;
	letter-spacing: -.06em;
	animation: pj-entree 1.2s var(--ease) both;
}
.e404-code i {
	width: .62em; height: .62em;
	border-radius: 50%;
	background: var(--vert);
	box-shadow: 0 0 .4em rgba(51, 238, 0, .35);
	animation: voyant 3.2s ease-in-out infinite;
}
.e404-titre {
	margin-top: 10px;
	font-weight: 500;
	font-size: clamp(28px, 3.6vw, 56px);
	letter-spacing: -.035em;
	animation: pj-entree 1.2s var(--ease) .15s both;
}
.e404-texte { max-width: 34em; color: rgba(255, 255, 255, .75); font-size: clamp(16px, 1.3vw, 19px); animation: pj-entree 1.2s var(--ease) .25s both; }
.e404-liens { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; margin-top: 10px; animation: pj-entree 1.2s var(--ease) .35s both; }
.e404 .btn { background: var(--vert); color: var(--noir); }
.e404 .btn:hover { background: var(--blanc); }
.e404-lien { font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.e404-lien:hover { opacity: 1; }
.e404-sug {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-top: clamp(40px, 7vh, 72px);
	animation: pj-entree 1.2s var(--ease) .5s both;
}
.e404-sug-label { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.e404-sug .cas-img { width: min(300px, 70vw); aspect-ratio: 16 / 10; border-radius: calc(var(--rayon) * .6); }
.e404-sug-nom { font-weight: 500; font-size: 17px; letter-spacing: -.02em; }
.e404-sug-nom em { display: block; font-style: normal; font-weight: 300; color: rgba(255, 255, 255, .7); }
@media (prefers-reduced-motion: reduce) { .e404-code, .e404-code i, .e404-titre, .e404-texte, .e404-liens, .e404-sug { animation: none; } }

/* ---- Écran tactile : visuels en liste au défilement natif (classe posée par projet101.js) ---- */
.pj-liste .pj-vis {
	opacity: 0;
	filter: blur(14px);
	transform: translateY(24px) scale(.96);
	transition: opacity .9s ease, filter 1s ease, transform 1.1s var(--ease);
}
.pj-liste .pj-vis.vu { opacity: 1; filter: none; transform: none; }
