/* ==========================================================================
   Paliers photographiques et bannière

   Le rythme de la page d'accueil alterne deux natures de bloc : des paliers
   qui montrent une photographie en grand, presque sans voile, et des chapitres
   de contenu posés sur un aplat franc. Une image placée derrière du texte doit
   être assombrie en permanence — donc n'est jamais vraiment vue. En les
   séparant, chacune fait son métier.
   ========================================================================== */

/* --- Bannière ---------------------------------------------------------------- */

.hero.has-photo {
	background: var(--ina-noir);
}

.hero__media {
	position: absolute;
	/* Débord vertical : la parallaxe déplace l'image, il lui faut de la marge
	   sous peine de découvrir le fond en haut ou en bas du cadre. */
	inset: -8% 0;
	overflow: hidden;
	will-change: transform;
}

.hero__photo,
.hero__media svg {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Le voile ne couvre que le flanc gauche, qui porte le titre. Le reste de la
   photographie garde sa lumière. */
.hero__veil {
	position: absolute;
	inset: 0;
	background: linear-gradient(to right, rgba(13, 13, 13, 0.88) 0%, rgba(13, 13, 13, 0.62) 34%, rgba(13, 13, 13, 0.18) 66%, rgba(13, 13, 13, 0) 100%),
		linear-gradient(to top, rgba(13, 13, 13, 0.78) 0%, rgba(13, 13, 13, 0.15) 46%, rgba(13, 13, 13, 0) 68%),
		linear-gradient(to bottom, rgba(13, 13, 13, 0.55) 0%, rgba(13, 13, 13, 0) 26%);
	pointer-events: none;
}

.hero.has-photo .hero__rule {
	opacity: 0.5;
}

/* --- Paliers ------------------------------------------------------------------- */

.interstitial {
	position: relative;
	height: 86vh;
	height: calc(var(--svh, 1vh) * 86);
	overflow: hidden;
	background: var(--ina-noir);
}

.interstitial__media {
	position: absolute;
	inset: -8% 0;
	overflow: hidden;
	will-change: transform;
}

.interstitial__photo,
.interstitial__media svg {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Voile réduit au strict nécessaire : un pied de cadre assombri pour porter la
   légende, et une amorce en haut pour que l'en-tête reste lisible en passant. */
.interstitial__veil {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(13, 13, 13, 0.82) 0%, rgba(13, 13, 13, 0.25) 32%, rgba(13, 13, 13, 0) 55%),
		linear-gradient(to bottom, rgba(13, 13, 13, 0.42) 0%, rgba(13, 13, 13, 0) 22%),
		/* Coin inférieur gauche : la légende peut tomber sur une zone claire
		   de la photographie — un littoral, un ciel — et s'y perdre. */
		radial-gradient(120% 90% at 0% 100%, rgba(13, 13, 13, 0.72) 0%, rgba(13, 13, 13, 0) 62%);
	pointer-events: none;
}

.interstitial__caption {
	position: absolute;
	inset: auto 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding-bottom: clamp(2rem, 1.4rem + 3vw, 4rem);
	color: var(--ina-ivoire);
}

.interstitial__step {
	color: var(--ina-terracotta-light);
}

.interstitial__place {
	max-width: 22ch;
	text-wrap: balance;
}

.interstitial__note {
	color: var(--ina-pierre);
	max-width: 44ch;
}

/* --- Rythme des chapitres -------------------------------------------------------
   Les aplats alternent pour que deux chapitres voisins ne se confondent pas :
   navy, papier, navy, papier. Les paliers photographiques s'intercalent entre
   eux et fournissent la respiration. */

.ina-home .intro,
.ina-home .engagements,
.ina-home .actualites {
	background: var(--ina-travertin-pale);
}

.ina-home .principles {
	background: var(--ina-ivoire);
}

/* --- Sans mouvement ---------------------------------------------------------------
   La parallaxe disparaît ; les paliers restent, simplement immobiles. */

.no-motion .hero__media,
.no-motion .interstitial__media,
.no-js .hero__media,
.no-js .interstitial__media {
	inset: 0;
	transform: none !important;
}

/* --- Mobile -------------------------------------------------------------------------
   Paliers plus courts : sur un écran étroit, une image de 86 vh oblige à trois
   gestes pour la franchir. */

@media (max-width: 767px) {
	.interstitial {
		height: calc(var(--svh, 1vh) * 62);
	}

	.interstitial__veil {
		background: linear-gradient(to top, rgba(13, 13, 13, 0.88) 0%, rgba(13, 13, 13, 0.3) 40%, rgba(13, 13, 13, 0) 62%),
			linear-gradient(to bottom, rgba(13, 13, 13, 0.45) 0%, rgba(13, 13, 13, 0) 24%);
	}

	.hero__veil {
		background: linear-gradient(to top, rgba(13, 13, 13, 0.9) 0%, rgba(13, 13, 13, 0.5) 48%, rgba(13, 13, 13, 0.15) 72%),
			linear-gradient(to bottom, rgba(13, 13, 13, 0.6) 0%, rgba(13, 13, 13, 0.1) 30%);
	}
}
