/*
 * AquaNubia — accueil « plongée ».
 * On part de la pièce (le bac posé sur son plateau orange), on zoome dans le bac,
 * on entre dans l'eau, puis on descend jusqu'au sol (le pied de page en sable).
 * Animation pilotée par le défilement, en CSS natif (scroll-driven animations).
 * Sans prise en charge, ou avec « réduire les animations », la scène reste fixe.
 *
 * Repères mesurés sur fond-bac.webp (2400 × 1604) :
 *   horizon du plateau 64,2 % de la hauteur ; bac centré à 50 % de la largeur,
 *   44,5 % de large, 37,4 % de haut, centre vertical à 51,5 % de la hauteur (image 1536 × 1024).
 */

@property --profondeur {
	syntax: "<integer>";
	inherits: true;
	initial-value: 0;
}

main.home {
	background: linear-gradient(180deg, #123637 0%, #10292b 30%, #0d2325 70%, #0b1f21 100%);
}

/* ---------- La pièce : mur blanc, plateau orange, le bac ---------- */
.dive-stage {
	--horizon: 74%;                 /* hauteur du plateau dans l'écran */
	--bac-x: 66vw;                  /* centre horizontal du bac */
	--img-l: min(119vw, 170vh);     /* largeur de l'image */
	--img-h: calc(var(--img-l) / 1.5);
	--zoom: 2.6;
	position: relative;
	isolation: isolate;
	overflow: hidden;
}
.dive-room {
	position: relative;
	height: 100vh; height: 100svh;
	overflow: hidden;
	background: linear-gradient(180deg, #fff 0 var(--horizon), #f0a401 var(--horizon));
	transform-origin: var(--bac-x) calc(var(--horizon) - .1266 * var(--img-h));
}
.dive-photo {
	position: absolute;
	width: var(--img-l); max-width: none; height: auto;
	left: calc(var(--bac-x) - var(--img-l) / 2);
	top: calc(var(--horizon) - .6416 * var(--img-h));
}

.dive-shade, .dive-light { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
/* L'eau : un voile bleu-vert en « produit » transforme le blanc en profondeur. */
.dive-shade {
	background: #0f2b2d;
	mix-blend-mode: multiply;
}
.dive-shade::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(0deg, rgb(8 22 24 / .9) 0%, transparent 45%), linear-gradient(90deg, rgb(8 22 24 / .6), transparent 60%);
}
.dive-light, .dive-light::after {
	background: url("caustiques.png") 0 0 / 760px repeat;
	mix-blend-mode: soft-light;
	mask-image: linear-gradient(180deg, #000 0%, rgb(0 0 0 / .6) 45%, transparent 85%);
}
.dive-light::after { content: ""; position: absolute; inset: 0; background-size: 520px; opacity: .7; mask-image: none; }

/* Texte d'ouverture, posé sur le mur blanc. */
.dive-surface {
	position: absolute; z-index: 2;
	top: clamp(36px, 9vh, 110px);
	left: max(var(--marge), (100% - 1200px) / 2);
	width: min(calc(var(--bac-x) - .23 * var(--img-l) - max(var(--marge), (100% - 1200px) / 2) - 24px), 620px);
	color: var(--encre);
}
.dive-surface h1 {
	font-size: clamp(2.4rem, 1rem + 4vw, 5.2rem);
	line-height: .95;
	letter-spacing: -.045em;
	font-weight: 650;
	hyphens: none;
}
.dive-by { margin-top: 22px; font-size: 1.05rem; color: #3f5652; }
.dive-scroll {
	display: none; align-items: center; gap: 10px; margin-top: 34px;
	font-size: .95rem; color: #3f5652;
	&::before { content: ""; width: 1px; height: 34px; background: currentColor; opacity: .5; }
}

/* Ce qu'on voit une fois dans l'eau (version fixe : sous la pièce). */
.dive-inside {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
	gap: clamp(28px, 5vw, 80px);
	align-items: end;
	padding: clamp(56px, 8vw, 110px) max(var(--marge), (100% - 1200px) / 2);
}
.dive-inside-text h2 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.6rem); max-width: 13ch; }
.dive-lead { margin-top: 20px; max-width: 30em; font-size: 1.15rem; line-height: 1.55; color: #cddbd5; }

.first-question {
	padding: clamp(22px, 2.6vw, 30px);
	border-radius: var(--rayon);
	background: rgb(16 41 43 / .8);
	border: 1px solid rgb(255 255 255 / .16);
	backdrop-filter: blur(14px) saturate(1.2);
	& h3 { font-size: 1.35rem; }
	& > p { margin-top: 6px; color: var(--texte-doux); font-size: .95rem; }
}

@media (prefers-reduced-motion: no-preference) {
	.dive-light { animation: reflets 46s linear infinite; }
	.dive-light::after { animation: reflets-2 31s linear infinite; }
}
@keyframes reflets { to { background-position: 760px 380px; } }
@keyframes reflets-2 { to { background-position: -520px 520px; } }

/* ---------- La plongée ---------- */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.dive { height: 230vh; view-timeline: --plongee block; }
		.dive-stage { position: sticky; top: 0; height: 100vh; height: 100svh; }
		.dive-scroll { display: inline-flex; }
		.dive-room {
			position: absolute; inset: 0; height: auto;
			will-change: transform;
			animation: zoom-bac linear both;
			animation-timeline: --plongee;
			animation-range: contain 0% contain 48%;
		}
		.dive-shade {
			--opacite: .9;
			animation: entree-eau linear both;
			animation-timeline: --plongee;
			animation-range: contain 22% contain 48%;
		}
		.dive-light {
			--opacite: .35;
			animation: entree-eau linear both, reflets 46s linear infinite;
			animation-timeline: --plongee, auto;
			animation-range: contain 30% contain 55%, normal;
		}
		.dive-surface {
			animation: surface linear both;
			animation-timeline: --plongee;
			animation-range: contain 0% contain 22%;
		}
		.dive-inside {
			position: absolute; z-index: 2; inset: 0;
			grid-template-columns: minmax(0, 560px) minmax(320px, 440px);
			place-content: center; align-items: center;
			padding-block: 24px;
			animation: dedans linear both;
			animation-timeline: --plongee;
			animation-range: contain 46% contain 64%;
		}
		.dive-inside:focus-within { animation: none; opacity: 1; transform: none; pointer-events: auto; }
	}
}
@keyframes zoom-bac {
	from { transform: none; }
	to {
		transform:
			translate(calc(50vw - var(--bac-x)), calc(50% - var(--horizon) + .1266 * var(--img-h)))
			scale(var(--zoom));
	}
}
@keyframes entree-eau { from { opacity: 0; } to { opacity: var(--opacite, 1); } }
@keyframes surface {
	from { opacity: 1; transform: none; }
	to { opacity: 0; transform: translateY(-10vh); }
}
@keyframes dedans {
	from { opacity: 0; transform: translateY(8vh); pointer-events: none; }
	to { opacity: 1; transform: none; pointer-events: auto; }
}

/* ---------- Jauge de profondeur (grands écrans) ---------- */
.depth { display: none; }
@supports (animation-timeline: scroll()) {
	@media (min-width: 1100px) and (prefers-reduced-motion: no-preference) {
		.depth {
			display: block; position: fixed; z-index: 5;
			right: 14px; top: 50%; height: 44vh; transform: translateY(-50%);
			pointer-events: none; mix-blend-mode: difference; color: #fff;
		}
		.depth-track {
			position: relative; height: 100%; width: 9px;
			background:
				linear-gradient(rgb(255 255 255 / .35), rgb(255 255 255 / .35)) center / 1px 100% no-repeat,
				repeating-linear-gradient(180deg, rgb(255 255 255 / .35) 0 1px, transparent 1px 10%) right / 5px 100% no-repeat;
		}
		.depth-mark {
			position: absolute; left: -2px; width: 13px; height: 13px; margin-top: -6px;
			border-radius: 50%; background: #fff;
			animation: descente linear both;
			animation-timeline: scroll(root);
		}
		.depth-mark::after {
			counter-reset: cm var(--profondeur);
			content: counter(cm) " cm";
			position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
			font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap;
		}
	}
}
@keyframes descente {
	from { top: 0%; --profondeur: 0; }
	to { top: 100%; --profondeur: 60; }
}

/* ---------- Après la plongée : on remonte dans la pièce (mur blanc) ---------- */
main.home { background: #fff; --orange-texte: #a85400; }
.who, .offer, .faq { background: #fff; color: var(--encre); color-scheme: light; }

/* La surface de l'eau, vue d'en dessous, au moment où l'on ressort. */
.who { position: relative; padding-block: clamp(80px, 10vw, 150px) clamp(40px, 5vw, 72px); }
.who::before {
	content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 42px;
	background: #fff;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V22c100-14 200 10 300 0s200-16 300-4 200 14 300 4 200-14 300-2v20z'/%3E%3C/svg%3E") 0 100% / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V22c100-14 200 10 300 0s200-16 300-4 200 14 300 4 200-14 300-2v20z'/%3E%3C/svg%3E") 0 100% / 100% 100% no-repeat;
}
.who-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(40px, 7vw, 120px); align-items: center; }
.who-names { font-size: clamp(3rem, 1.2rem + 5.4vw, 6.4rem); line-height: .92; letter-spacing: -.045em; font-weight: 650; color: var(--encre); }
.who-place { margin-top: 18px; font-weight: 600; color: var(--orange-texte); }
.who-text .who-lead { margin-top: clamp(32px, 4vw, 56px); font-size: clamp(1.25rem, 1rem + .7vw, 1.55rem); line-height: 1.4; letter-spacing: -.012em; color: var(--encre); max-width: 26em; }
.who-text p:not(.who-place, .who-lead) { margin-top: 1em; color: var(--texte-clair-doux); max-width: 34em; }
.who-photo img { width: 100%; height: auto; aspect-ratio: 540 / 610; object-fit: cover; border-radius: 24px; }

/* Les familles de produits : photos détourées sur blanc, listes sur fond orange pâle. */
.offer { padding-block: clamp(40px, 5vw, 72px) clamp(88px, 11vw, 150px); }
.offer-head p, .offer-note { color: var(--texte-clair-doux); }
.offer .tile { border-radius: 24px; }
.offer .tile--photo { background: #fff; border: 1px solid #e4e9e5; }
.offer .tile--photo h3 { color: var(--encre); }
.tile--liste {
	grid-column: span 5;
	display: flex; flex-direction: column;
	padding: clamp(26px, 3vw, 36px);
	background: #fff3df; color: var(--encre);
	& p { color: #6a5434; }
}
.tile-list {
	list-style: none; margin-top: auto; padding-top: 28px;
	& li {
		padding: 10px 0; border-top: 1px solid rgb(168 84 0 / .22);
		font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.2;
	}
}
.offer-note { margin-top: 28px; }

/* Les étapes : on repasse sous l'eau, avec les mêmes reflets qu'à l'ouverture. */
.steps-band {
	position: relative; isolation: isolate; overflow: hidden;
	background: var(--eau); color: var(--texte);
	padding-block: clamp(88px, 11vw, 150px);
}
.steps-band::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: url("caustiques.png") 0 0 / 1100px repeat;
	opacity: .07;
	mask-image: linear-gradient(180deg, #000, transparent 75%);
}
@media (prefers-reduced-motion: no-preference) {
	.steps-band::before { animation: reflets 60s linear infinite; }
}

/* Questions fréquentes, de nouveau dans la pièce. */
.faq { padding-block: clamp(88px, 11vw, 150px); }
.faq h2 { color: var(--encre); }
.faq-list summary::after { color: var(--orange-texte); }
.faq-list a { color: var(--orange-texte); }

/* Le plateau orange de l'image d'ouverture. */
.launch {
	position: relative;
	background: linear-gradient(180deg, #f3b21c 0, #f0a401 6px, #f0a401 100%);
	color: var(--encre); color-scheme: light;
	padding-block: clamp(80px, 9vw, 130px);
	border-top: 0;
}
.launch h2 { color: var(--encre); }
.launch .launch-grid > div > p { color: rgb(16 41 43 / .82); }
.launch .signup-form > label:not(.signup-consent) { color: var(--encre); font-weight: 600; }
.launch .signup-row input { background: #fff; border-color: transparent; color: var(--encre); }
.launch .signup-row input::placeholder { color: #6b7d78; }
.launch .signup-row button { background: var(--encre); color: #fff; }
.launch .signup-row button:hover { background: var(--eau-3); }
.launch .signup-consent { color: rgb(16 41 43 / .88); }
.launch .signup-consent input { accent-color: var(--encre); }
.launch .signup-help { color: rgb(16 41 43 / .75); }
.launch :focus-visible { outline-color: var(--encre); }

/* ---------- Écrans moyens et petits ---------- */
@media (max-width: 1100px) {
	.dive-stage { --bac-x: 62vw; --img-l: min(130vw, 160vh); --zoom: 4.5; }
}
@media (max-width: 960px) {
	.dive-inside { grid-template-columns: 1fr; gap: 24px; }
	.who-grid { grid-template-columns: 1fr; }
	.who-photo img { aspect-ratio: 4 / 3; }
	.tile--liste { grid-column: span 12; }
}
@media (max-width: 760px) {
	.dive-stage { --horizon: 66%; --bac-x: 50vw; --img-l: min(235vw, 120vh); --zoom: 4.2; }
	.dive-surface { width: auto; right: var(--marge); top: 28px; }
	.dive-scroll { display: none; }
	.dive-inside-text h2 { font-size: 1.9rem; }
	.dive-lead { font-size: 1rem; }
	@supports (animation-timeline: view()) {
		@media (prefers-reduced-motion: no-preference) {
			.dive-lead { display: none; }
			.dive-inside { padding-bottom: 20px; }
		}
	}
	.level-choices a { min-height: 48px; padding-block: 10px; }
	.first-question-note { display: none; }
}

/* ---------- Effets React Bits (montés par bits.js) ---------- */
.light-rays{position:relative;width:100%;height:100%;overflow:hidden;pointer-events:none}.light-rays__canvas{position:absolute;inset:0;display:block;width:100%;height:100%}.particles-container{position:relative;width:100%;height:100%;overflow:hidden}.particles-canvas{position:absolute;inset:0;display:block;width:100%;height:100%}.liquid-ether{position:relative;width:100%;height:100%;overflow:hidden}.liquid-ether__canvas{position:absolute;inset:0;display:block;width:100%;height:100%}.ripple-distortion{position:relative;width:100%;height:100%;overflow:hidden}.ripple-distortion canvas{display:block;width:100%;height:100%}

/* Rayons et particules : visibles seulement une fois sous l'eau. */
.dive-bits { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; }
.dive-bits-layer { position: absolute; inset: 0; }
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.dive-bits {
			--opacite: 1;
			animation: entree-eau linear both;
			animation-timeline: --plongee;
			animation-range: contain 34% contain 58%;
		}
	}
}

/* Photo à ondulations */
.who-ripple { position: relative; aspect-ratio: 540 / 610; border-radius: 24px; overflow: hidden; background: #fff; }
.who-ripple img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 960px) { .who-ripple { aspect-ratio: 4 / 3; } }

/* Eau que le curseur remue, derrière les étapes */
.steps-eau { position: absolute; inset: 0; z-index: -1; opacity: .9; pointer-events: none; }
.steps-band:has(.steps-eau.bits-on)::before { display: none; }

/* ---------- Contenu enrichi de l'accueil (8 novembre 2026) ---------- */
.dive-intro { margin-top: 22px; font-size: 1.12rem; line-height: 1.55; color: #3f5652; max-width: 30em; }
.dive-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 26px; }
.dive-actions p { margin: 0; font-size: .92rem; color: #3f5652; }

/* Les besoins : grande liste sur orange pâle, un exemple mis en avant avec photo. */
.needs { background: #fff6ea; color: var(--encre); color-scheme: light; padding-block: clamp(88px, 11vw, 150px); }
.needs-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.needs-head { position: sticky; top: 32px; }
.needs-head h2 { color: var(--encre); }
.needs-head p { margin-top: 18px; color: #5a4a33; max-width: 30em; }
.needs-head .needs-caveat { font-size: .95rem; }
.needs-head .text-link { margin-top: 14px; color: var(--orange-texte); }
.needs-list { list-style: none; }
.needs-list li {
	padding: 22px 0; border-top: 1px solid rgb(168 84 0 / .25);
	font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem); line-height: 1.35; letter-spacing: -.015em; font-weight: 550;
}
.needs-feature {
	margin-top: 12px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; align-items: center;
	padding: 18px; background: #fff; border-radius: 24px;
}
.needs-feature img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }
.needs-feature-text { font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem); font-weight: 600; letter-spacing: -.015em; line-height: 1.3; color: var(--encre); }
.needs-feature figcaption p + p { margin-top: 10px; color: var(--texte-clair-doux); }

/* Fonctionnement envisagé : bande sous l'eau, texte en deux colonnes. */
.how-head { max-width: 40rem; margin-bottom: 44px; }
.how-head p { margin-top: 16px; color: var(--texte-doux); }
.how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 72px); }
.how-grid > div { padding: 28px 0; border-top: 1px solid var(--ligne); }
.how-grid h3 { font-size: 1.35rem; }
.how-grid p { margin-top: 10px; color: var(--texte-doux); max-width: 34em; }

/* Ce que les réponses vont décider : tableau « ce que vous dites / ce que nous en ferons ». */
.answers { background: #fff; color: var(--encre); color-scheme: light; padding-block: clamp(88px, 11vw, 150px); }
.answers-head { max-width: 40rem; margin-bottom: 36px; }
.answers-head h2 { color: var(--encre); }
.answers-head p { margin-top: 16px; color: var(--texte-clair-doux); }
.answers-list { margin: 0; }
.answers-list > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 64px; padding: 22px 0; border-top: 1px solid var(--ligne-claire); }
.answers-list > div:last-child { border-bottom: 1px solid var(--ligne-claire); }
.answers-list dt { font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); font-weight: 600; letter-spacing: -.012em; line-height: 1.3; }
.answers-list dd { margin: 0; align-self: center; color: var(--texte-clair-doux); font-size: 1.05rem; }
.answers-caveat { margin-top: 24px; max-width: 46em; color: var(--texte-clair-doux); font-size: .98rem; }
.answers .roadmap { margin-top: 64px; }
.answers .roadmap li::before { background: #fff; border-color: #9aaba6; color: var(--texte-clair-doux); }
.answers .roadmap li.is-now::before { background: var(--sable); border-color: var(--sable); color: var(--encre); }
.answers .roadmap li::after { border-color: var(--ligne-claire); }
.answers .roadmap .when, .answers .roadmap p, .answers .roadmap-cta p { color: var(--texte-clair-doux); }
.answers .roadmap li.is-now .when { color: var(--orange-texte); }
.answers .roadmap h3 { color: var(--encre); }

.faq { background: #eef3ef; }

@media (max-width: 960px) {
	.needs-grid { grid-template-columns: 1fr; }
	.needs-head { position: static; }
	.needs-feature { grid-template-columns: 1fr; }
	.needs-feature img { aspect-ratio: 4 / 3; }
	.how-grid { grid-template-columns: 1fr; }
	.answers-list > div { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
	.dive-stage { --horizon: 93%; --img-l: min(150vw, 80vh); --zoom: 6.2; }
	.dive-surface h1 { font-size: 2.05rem; }
	.dive-intro { font-size: .95rem; line-height: 1.45; margin-top: 12px; }
	.dive-actions { margin-top: 18px; }
	.dive-by { margin-top: 14px; font-size: .92rem; }
}

.nowrap { white-space: nowrap; }

/* Lenis (défilement fluide de l'accueil) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth iframe { pointer-events: none; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.who-more { margin-top: 18px; color: var(--orange-texte); }

/* Photos des familles de produits (images fournies le 8 novembre 2026) : cadrage plein. */
.offer .tile--photo img { object-fit: cover; padding: 0; }
@container (min-width: 560px) { .tile--photo img { padding: 0; height: 100%; min-height: 300px; } }
