/* ==========================================================================
   Page Loader — Sande Paris
   Accueil uniquement, une fois par navigateur (localStorage).
   ========================================================================== */

#sp-page-loader {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	inset: 0;
	width: 100%;
	/* Mobile : 100vh ≠ hauteur visible (barre d’URL). inset + dvh / fill-available. */
	height: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	min-height: -webkit-fill-available;
	background: #0a0a0a;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transform: translateY(0);
	transition: transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
	pointer-events: all;
	overflow: hidden;
}

#sp-page-loader.is-leaving {
	transform: translateY(-100%);
}

/* Masquage immédiat : la classe est posée par le script inline en <head>
   avant tout rendu, ce qui évite le flash lors des visites suivantes. */
html.sp-loader-done #sp-page-loader {
	display: none !important;
}

/* ── Média fond (vidéo / YouTube) ── */
.sp-loader__media {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.sp-loader__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border: 0;
}

/* YouTube : iframe plus grande que le viewport pour cover HD, sans upscale flou */
.sp-loader__video--youtube {
	top: 50%;
	left: 50%;
	right: auto;
	bottom: auto;
	width: max(100vw, 177.78vh);
	height: max(100vh, 56.25vw);
	min-width: 0;
	min-height: 0;
	transform: translate(-50%, -50%);
}

/* ── Overlay entre vidéo et UI ── */
.sp-loader__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

/* ── UI (logo / barre / %) ── */
.sp-loader__ui {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 40px;
}

/* ── Logo ── */
.sp-loader__label {
	position: relative;
	display: inline-block;
	width: min(180px, 48vw);
	line-height: 0;
}

.sp-loader__logo {
	display: block;
	width: 100%;
	height: auto;
}

.sp-loader__logo--bg {
	opacity: 0.22;
}

.sp-loader__label-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	width: 0%;
	height: 100%;
}

.sp-loader__logo--fill {
	position: absolute;
	top: 0;
	left: 0;
	width: min(180px, 48vw);
	max-width: none;
	opacity: 1;
}

/* ── Barre de progression ── */
.sp-loader__track {
	width: 120px;
	height: 0.5px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;
}

.sp-loader__bar {
	width: 0%;
	height: 100%;
	background: rgba(240, 234, 216, 0.5);
	transition: width 80ms linear;
}

/* ── Pourcentage ── */
.sp-loader__pct {
	font-size: 11px;
	letter-spacing: 0.2em;
	color: rgba(255, 255, 255, 0.25);
	font-family: sans-serif;
	text-transform: uppercase;
}
