/* =========================================================
   KORIUM TECH · v4 · W4 + E1 « Korium dans le monde »
   Section export plein écran en marine profond (#003058), globe three.js.
   Base = mode calme et sans JS : image fixe + liste lisible.
   Mode vivant (JS, mouvement autorisé, pas de html.calme) : scène collante,
   étapes qui défilent par-dessus, globe piloté par globe.js.
   Contrastes mesurés sur #003058 : blanc 13,4:1 · texte 78 % 8,7:1 · #5CBDF5 6,4:1 · #CFE9FA 10,7:1 · légende 72 % 7:1.
   Étapes inactives à 72 % d'opacité : texte 5,2:1, pastilles 5,3:1 (jamais sous 4,5:1).
   ========================================================= */

.monde {
  --mc-txt: rgba(255, 255, 255, 0.78);
  --mc-acc: #5CBDF5;
  --mc-pale: #CFE9FA;
  position: relative; padding-block: 0; isolation: isolate;
  background: var(--marine); color: #fff; overflow-x: clip;
}
.monde h2, .monde h3, .monde strong, .monde b { color: #fff; }
.monde p { color: var(--mc-txt); }
.monde ::selection { background: rgba(92, 189, 245, 0.35); color: #fff; }

/* ---------- En-tête ---------- */
.monde__sur { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font: 500 0.8rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--mc-acc) !important; }
.monde__mring { width: 18px; height: 18px; flex: none; }
.monde__mring .monde__onde { display: none; }
.monde__tete h2 { max-width: 13ch; margin-bottom: 22px; }
.monde__intro { max-width: 40ch; font-size: 1.1rem; }

/* ---------- Étapes ---------- */
.monde__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.monde__meta span { padding: 5px 12px; border-radius: 999px; background: rgba(92, 189, 245, 0.16); font: 500 0.82rem/1.3 var(--sans); color: var(--mc-pale); }
.monde__meta span + span { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); color: #fff; }
.monde__et h3 { max-width: 20ch; margin-bottom: 16px; font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.5rem); font-weight: 300; line-height: 1.12; letter-spacing: -0.025em; }
.monde__et p { max-width: 46ch; }
.monde__chiffre {
  display: flex; align-items: baseline; gap: 0.1em; margin: 6px 0 20px; white-space: nowrap;
  font: 300 clamp(5.2rem, 2rem + 12.5vw, 15.5rem)/0.86 var(--serif); letter-spacing: -0.055em; color: #fff !important;
  font-variant-numeric: tabular-nums;
}
.monde__u { font-size: 0.34em; letter-spacing: -0.01em; color: var(--mc-acc); }
.monde p.monde__legende { margin-top: 14px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.72); }

/* ---------- Mise en page de base (mode calme, sans JS) ---------- */
.monde__in {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(32px, 5vw, 96px);
  max-width: 1360px; margin-inline: auto; padding: var(--sec) var(--pad);
}
.monde__tete { grid-column: 1; grid-row: 1; margin-bottom: clamp(28px, 4vw, 48px); }
.monde__etapes { grid-column: 1; grid-row: 2; }
.monde__et { padding-block: clamp(22px, 3vw, 34px); border-top: 1px solid rgba(255, 255, 255, 0.14); }
.monde__scene { grid-column: 2; grid-row: 1 / span 2; align-self: start; position: sticky; top: 14vh; }
.monde__img--depart, .monde__cv, .monde__voile, .monde__pins { display: none; }
.monde__img--resume { width: 100%; height: auto; aspect-ratio: 1; }
@media (max-width: 860px) {
  .monde__in { grid-template-columns: minmax(0, 1fr); }
  .monde__scene { grid-column: 1; grid-row: 2; position: static; width: 100%; max-width: 520px; margin: 0 auto 12px; }
  .monde__etapes { grid-row: 3; }
}

/* ---------- Repères sur le globe (anneau ouvert du logo + étiquette) ---------- */
.monde__pins { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.monde__pin { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; }
.monde__ring { position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; max-width: none; overflow: visible; }
.monde__onde { opacity: 0; transform-box: fill-box; transform-origin: center; }
.monde__pin.is-onde .monde__onde { animation: monde-onde 1.5s var(--ease) both; }
.monde__pin--base.is-vu .monde__onde { animation: monde-onde 2.8s var(--ease) infinite; }
@keyframes monde-onde { 0% { opacity: 0.85; transform: scale(1); } 100% { opacity: 0; transform: scale(3.4); } }
.monde__lab {
  position: absolute; left: 22px; top: 0; transform: translateY(-50%); display: flex; flex-direction: column;
  white-space: nowrap; font: 500 0.95rem/1.2 var(--sans); text-shadow: 0 1px 14px rgba(0, 24, 48, 0.95), 0 0 4px rgba(0, 24, 48, 0.8);
}
.monde__lab b { font-weight: 600; color: #fff; }
.monde__lab i { font-style: normal; font-size: 0.8rem; letter-spacing: 0.02em; color: var(--mc-pale); }
.monde__pin--zone .monde__lab { left: 0; transform: translate(-50%, -50%); padding: 5px 12px 4px; border-radius: 999px; background: rgba(0, 36, 68, 0.78); box-shadow: inset 0 0 0 1px rgba(207, 233, 250, 0.28); text-shadow: none; }
.monde__pin--zone b { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mc-pale); }

/* =========================================================
   Mode vivant : seulement avec JS, sans mouvement réduit, sans html.calme
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.calme) .monde:not(.monde--calme) .monde__in { grid-template-columns: minmax(0, 1fr); max-width: none; padding: 0; }
  .js:not(.calme) .monde:not(.monde--calme) .monde__tete {
    grid-column: 1; grid-row: 1; z-index: 3; margin: 0; min-height: 70vh; min-height: 70svh;
    padding: clamp(110px, 20vh, 220px) var(--pad) 0; max-width: calc(36rem + 2 * var(--pad));
  }
  .js:not(.calme) .monde:not(.monde--calme) .monde__etapes { grid-column: 1; grid-row: 2; z-index: 3; padding: 0 var(--pad); }
  .js:not(.calme) .monde:not(.monde--calme) .monde__et { display: flex; align-items: center; min-height: 100vh; min-height: 100svh; padding-block: 0; border: 0; }
  .js:not(.calme) .monde:not(.monde--calme) .monde__carte { max-width: 33rem; transition: opacity 0.7s var(--ease), transform 0.9s var(--ease); }
  .js:not(.calme) .monde.is-pret:not(.monde--calme) .monde__et:not(.is-on) .monde__carte { opacity: 0.72; transform: translateY(16px); }
  .js:not(.calme) .monde:not(.monde--calme) .monde__et--km .monde__carte { max-width: none; }
  .js:not(.calme) .monde:not(.monde--calme) .monde__et--km { min-height: 120vh; min-height: 120svh; }

  /* la scène reste collée pendant tout le voyage */
  .js:not(.calme) .monde:not(.monde--calme) .monde__scene {
    grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 0; z-index: 1; align-self: start;
    width: 100%; height: 100vh; height: 100svh; margin: 0; max-width: none; overflow: hidden; container-type: size;
    --S: min(100cqw, 100cqh);
    /* état 0 du globe (lu aussi par globe.js) : l'image d'attente est calée dessus au pixel */
    --g0-lat: 44; --g0-lon: 4; --g0-r: 0.40; --g0-cx: 0.68; --g0-cy: 0.54;
  }
  .js:not(.calme) .monde:not(.monde--calme) .monde__img--resume { display: none; }
  .js:not(.calme) .monde:not(.monde--calme) .monde__cv { display: block; position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; opacity: 0; transition: opacity 0.9s var(--ease); }
  .js:not(.calme) .monde:not(.monde--calme) .monde__pins { display: block; }
  .js:not(.calme) .monde:not(.monde--calme) .monde__voile {
    display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
      linear-gradient(90deg, var(--marine) 0%, rgba(0, 48, 88, 0.88) 24%, rgba(0, 48, 88, 0) 50%),
      linear-gradient(0deg, var(--marine) 0%, rgba(0, 48, 88, 0) 13%),
      linear-gradient(180deg, var(--marine) 0%, rgba(0, 48, 88, 0) 11%);
  }
  .js:not(.calme) .monde:not(.monde--calme) .monde__img--depart {
    display: block; position: absolute; transition: opacity 0.9s var(--ease);
    width: calc(var(--S) * var(--g0-r) * 2.5); height: calc(var(--S) * var(--g0-r) * 2.5);
    left: calc(var(--g0-cx) * 100cqw - var(--S) * var(--g0-r) * 1.25);
    top: calc(var(--g0-cy) * 100cqh - var(--S) * var(--g0-r) * 1.25);
  }
  .js:not(.calme) .monde:not(.monde--calme) .monde__img--depart img { width: 100%; height: 100%; }
  .js:not(.calme) .monde.is-pret:not(.monde--calme) .monde__cv { opacity: 1; }
  .js:not(.calme) .monde.is-pret:not(.monde--calme) .monde__img--depart { opacity: 0; }
}

/* Téléphone et tablette étroite : texte d'abord, globe plus petit en haut, les étapes passent dessous */
@media (prefers-reduced-motion: no-preference) and (max-width: 860px) {
  .js:not(.calme) .monde:not(.monde--calme) .monde__in { display: flex; flex-direction: column; }
  .js:not(.calme) .monde:not(.monde--calme) .monde__tete { order: 0; min-height: 0; max-width: none; padding: clamp(84px, 14vh, 120px) var(--pad) 26px; }
  .js:not(.calme) .monde:not(.monde--calme) .monde__scene {
    order: 1; height: 46vh; height: 46svh; background: var(--marine);
    --g0-r: 0.40; --g0-cx: 0.5; --g0-cy: 0.52;
  }
  .js:not(.calme) .monde:not(.monde--calme) .monde__etapes { order: 2; position: relative; z-index: 0; padding-bottom: 14vh; padding-bottom: 14svh; }
  .js:not(.calme) .monde:not(.monde--calme) .monde__et { align-items: flex-start; min-height: 46vh; min-height: 46svh; padding-top: 20px; }
  .js:not(.calme) .monde:not(.monde--calme) .monde__et--km { min-height: 52vh; min-height: 52svh; }
  .js:not(.calme) .monde:not(.monde--calme) .monde__voile {
    background: linear-gradient(0deg, var(--marine) 0%, rgba(0, 48, 88, 0) 16%), linear-gradient(180deg, var(--marine) 0%, rgba(0, 48, 88, 0) 10%);
  }
  .monde__lab { left: 18px; font-size: 0.85rem; }
  .monde__lab i { font-size: 0.74rem; }
  .monde__ring { left: -11px; top: -11px; width: 22px; height: 22px; }
}
@media (max-width: 860px) {
  .monde__chiffre { font-size: clamp(4.6rem, 1rem + 19vw, 9rem); }
}

