/* =========================================================
   KORIUM TECH · v5 « encore plus de classe » (JARV-264)
   Couche chargée après toutes les feuilles de la v4 : elle ne retire rien,
   elle monte en gamme. Mode calme : tout ce qui bouge s'arrête, la mise en
   page reste identique (aucun saut entre les modes).
   ========================================================= */

/* ---------- 1. Ouverture : l'anneau se remplit d'eau (1re page de la visite) ---------- */
.ouverture { display: none; }
.ouv .ouverture {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 400; pointer-events: none;
  background: var(--fond);
  animation: ouvSort 0.6s cubic-bezier(0.76, 0, 0.24, 1) 0.78s forwards;
}
.ouverture__anneau { width: clamp(104px, 11vw, 150px); height: auto; overflow: visible; animation: ouvAnneau 0.6s cubic-bezier(0.76, 0, 0.24, 1) 0.78s forwards; }
.ouverture__vide { fill: none; stroke: rgba(0, 48, 88, 0.12); stroke-width: 23; stroke-linecap: round; }
.ouverture__eau { fill: var(--bleu); animation: ouvMonte 0.95s cubic-bezier(0.33, 0, 0.2, 1) both; }
@keyframes ouvMonte { from { transform: translate(0, 128px); } to { transform: translate(-140px, -122px); } }
@keyframes ouvAnneau { to { transform: translateY(-34vh) scale(0.72); opacity: 0; } }
@keyframes ouvSort { to { clip-path: inset(0 0 100% 0); } }
/* la chute de l'anneau du héros prend le relais */
.ouv .eau__anneau { animation-delay: 0.86s; animation-duration: 1.1s; }
.ouv .eau__mot { transition-delay: 0.1s; }

/* ---------- 2. Héros : l'eau à pleine présence, titre plus éditorial ---------- */
.eau__voile {
  background:
    radial-gradient(ellipse 46% 40% at 50% 47%, rgba(248, 252, 254, 0.6), rgba(248, 252, 254, 0.16) 64%, rgba(248, 252, 254, 0) 84%),
    linear-gradient(180deg, rgba(244, 249, 252, 0.22) 0%, rgba(244, 249, 252, 0) 20%, rgba(244, 249, 252, 0) 76%, var(--fond) 100%);
}
.eau__scene { background-color: #DCEEF8; }
.eau__h1 { font-size: clamp(2.6rem, 0.9rem + 4.6vw, 6rem); line-height: 0.98; letter-spacing: -0.04em; text-shadow: 0 0 34px rgba(255, 255, 255, 0.85); }
.eau__sub { font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.2rem); }

/* ---------- 3. Typographie éditoriale : deux niveaux francs ---------- */
/* titres de chapitre : très grands ; les autres h2 descendent d'un cran pour créer le contraste */
h2 { font-size: clamp(2rem, 1.3rem + 2.1vw, 3.3rem); }
.p-accueil #voy-t, .p-accueil #pls-t, .p-accueil #trs-t, .p-accueil #monde-t, .p-accueil #pj-t,
.p-accueil #mt-t, .cf h2 {
  font-size: clamp(2.7rem, 0.8rem + 5.2vw, 5.6rem); line-height: 0.96; letter-spacing: -0.04em;
}
.mf__txt { font-size: clamp(2.1rem, 0.9rem + 3.5vw, 4.6rem); line-height: 1.06; letter-spacing: -0.03em; max-width: 21ch; }
.fait__val { font-size: clamp(3.4rem, 1.6rem + 4.4vw, 6.4rem) !important; letter-spacing: -0.045em; }
/* plus de petits textes gris : plancher de lecture et encre plus franche */
:root { --gris: #3A5670; }
.porte__d, .fait figcaption, .rg__d, .tete p, .cg__note, .pls__txt p, .trs__d, .lab__l li, .of__leg, figcaption { font-size: max(0.94rem, 15px); }
.ia, .eau__ia, .tag, .tags li { font-size: max(0.82rem, 13px); }

/* ---------- 4. Rythme : marine franc, moments plein écran ---------- */
/* manifeste en marine : les mots s'allument en blanc */
.mf.s--marine { padding-bottom: var(--sec) !important; }
.s--marine .mf__txt .mot { color: rgba(255, 255, 255, 0.14); }
.s--marine .mf__txt .mot.on { color: #fff; }
.s--marine .fait__val, .s--marine .fait__val span { color: #fff; }
.s--marine .fait figcaption { color: var(--sur-marine); }
.s--marine .fait figcaption strong { color: #fff; }
.s--marine .fait__vis--az b { color: #fff; }
.s--marine .fait__vis--az i { background: var(--bleu-2); }
/* 800 litres : un écran entier, le chiffre géant sur l'eau vivante */
main > section.cg.s--marine { min-height: 100svh; position: relative; isolation: isolate; }
.cg.s--marine .cg__val { font-size: clamp(6rem, 1rem + 22vw, 22rem); line-height: 0.82; }
.cg.s--marine .cg__in { position: relative; z-index: 1; }
.cg.s--marine .cg__val small { font-size: 0.24em; }

/* ---------- 5. Eau vivante (caustiques WebGL) sous les sections marine pleine page ---------- */
.v5-vive { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.6s var(--ease); }
.v5-vive.is-on { opacity: 1; }
.calme .v5-vive { display: none; }

/* ---------- 6. Transitions « eau » : la section claire coule dans la marine ---------- */
.v5-onde { position: absolute; left: 0; right: 0; height: clamp(34px, 4.4vw, 70px); z-index: 2; pointer-events: none; overflow: hidden; color: var(--onde-c, var(--fond)); }
.v5-onde--haut { top: -1px; }
.v5-onde--bas { bottom: -1px; transform: scaleY(-1); }
.v5-onde svg { position: absolute; top: 0; left: 0; width: 200%; max-width: none; height: 100%; fill: currentColor; transform-origin: 50% 0; }
.v5-onde .o2 { opacity: 0.45; }
.v5-onde svg { animation: ondeX 11s linear infinite; animation-play-state: paused; }
.v5-onde .o2 { animation-duration: 17s; animation-direction: reverse; }
.v5-onde.is-on svg { animation-play-state: running; }
@keyframes ondeX { to { transform: translateX(-50%); } }
.calme .v5-onde svg, .leger .v5-onde svg { animation: none; }

/* ---------- 7. Appel final : plein écran, eau vivante, titre géant ---------- */
.cf { min-height: 100svh; display: grid; align-items: center; position: relative; isolation: isolate; }
.cf > .wrap { position: relative; z-index: 1; }
.cf__txt > p { font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem); max-width: 52ch; }
.cf .rangee { gap: 14px; margin-top: clamp(26px, 3vw, 40px); }
.cf .rangee .b { font-size: 1.08rem; padding: 12px 12px 12px 26px; min-height: 60px; }
.cf .rangee .b:not(:has(.b__ico)) { padding: 12px 26px; }
.cf__anneau { z-index: 0; }
.cf__ring { animation: tourne 60s linear infinite; transform-origin: 50% 50%; }
@keyframes tourne { to { transform: rotate(360deg); } }
.calme .cf__ring { animation: none; }

/* ---------- 8. Survols « eau » : onde au clic, flèche aimantée, curseur ---------- */
.b, .porte, .eau__cp-b { position: relative; overflow: hidden; isolation: isolate; }
.v5-ride { position: absolute; z-index: -1; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.55) 52%, rgba(255, 255, 255, 0) 66%);
  animation: ride 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.b--clair .v5-ride, .b--verre .v5-ride, .porte .v5-ride { background: radial-gradient(circle, rgba(24, 128, 200, 0) 38%, rgba(24, 128, 200, 0.28) 52%, rgba(24, 128, 200, 0) 66%); }
@keyframes ride { to { transform: scale(40); opacity: 0; } }
.b__ico { transition: transform 0.6s var(--ease); }
.b:hover .b__ico { transform: translateX(3px) scale(1.08); }
.b:active { transform: scale(0.98); }

.v5-curseur { position: fixed; left: 0; top: 0; z-index: 300; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none;
  box-shadow: inset 0 0 0 1.5px rgba(24, 128, 200, 0.7); opacity: 0; transition: opacity 0.4s, width 0.45s var(--ease), height 0.45s var(--ease), margin 0.45s var(--ease), background 0.45s, box-shadow 0.45s; }
.v5-curseur.is-on { opacity: 1; }
.v5-curseur.is-lien { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(48, 168, 240, 0.12); box-shadow: inset 0 0 0 1.5px rgba(48, 168, 240, 0.5); }
.v5-curseur.is-sombre { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.75); }
.v5-curseur.is-sombre.is-lien { background: rgba(255, 255, 255, 0.12); }
.v5-curseur.is-masque { opacity: 0; }
@media (hover: none), (pointer: coarse) { .v5-curseur { display: none; } }
.calme .v5-curseur { display: none; }

/* ---------- 9. Pied : le nom revient en grand ---------- */
.ft__nom { margin: clamp(48px, 6vw, 96px) 0 clamp(20px, 2.4vw, 36px); overflow: hidden; }
.ft__nom img { display: block; width: 100%; height: auto; opacity: 0.94; }
.js .ft__nom img { clip-path: inset(0 100% 0 0); transition: clip-path 1.6s cubic-bezier(0.65, 0, 0.35, 1); }
.js .ft__nom.is-on img { clip-path: inset(0 0 0 0); }
.calme .ft__nom img { clip-path: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
  .ouverture, .v5-curseur, .v5-vive { display: none !important; }
  .v5-onde svg, .cf__ring { animation: none !important; }
}
.s--aqua:has(+ .monde)::after { display: none; }   /* v5 : la vague marine du globe prend le relais */
