/* Scrollytelling section — sticky right scene, scrollable left steps */

.parcours-stage { position: relative; }

/* Step blocks (left column) — each takes ~80vh so the user scrolls through them */
.parcours-step {
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
}
.parcours-step .step-inner {
  transition: opacity 0.6s cubic-bezier(.16,1,.3,1), transform 0.6s cubic-bezier(.16,1,.3,1);
  opacity: 0.35;
  transform: translateX(-20px);
}
.parcours-step.is-active .step-inner {
  opacity: 1;
  transform: translateX(0);
}

/* Sector marker (the small number/eyebrow on the left) gets a teal accent when active */
.parcours-step .sector-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.parcours-step .sector-eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 2px;
  background: currentColor;
  opacity: 0.5;
  transition: background 0.4s, opacity 0.4s, width 0.4s;
}
.parcours-step.is-active .sector-eyebrow::before {
  background: #14b8a6;
  opacity: 1;
  width: 2.5rem;
}

/* Scene-layer crossfade — short so it doesn't overlap during rapid scroll */
.scene-layer {
  transition: opacity 0.28s ease-out;
}

/* Step indicators per sector — only the active sector's are visible */
.parcours-steps[data-sector] {
  transition: opacity 0.4s ease;
}
.parcours-steps[data-sector]:not(.is-visible) {
  display: none;
}

/* Mobile (≤767px): parcours.js relocates each scene canvas inline ABOVE its
   matching step (instead of the desktop sticky-and-swap). All 4 scenes
   become visible as the user scrolls, each one running only while in view. */
@media (max-width: 767px) {
  /* Steps stack naturally, no need to fight the desktop entrance animation
     because parcours.js's mobile branch never adds .is-active. We just
     reset opacity to fully visible so the text is always readable.
     IMPORTANT: override the desktop `display: flex` so the inline scene
     wrapper sits ABOVE the text instead of as a tiny flex item beside it. */
  .parcours-step {
    display: block;
    min-height: auto;
    padding: 1rem 0;
  }
  .parcours-step .step-inner { opacity: 1; transform: none; }

  /* Inline scene wrapper, injected by parcours.js as the first child of
     each .parcours-step (before .step-inner). Sized for portrait phones. */
  .parcours-step-scene {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 48vh;
    margin-bottom: 1.25rem;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgb(226 232 240);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06),
                0 18px 36px -16px rgba(15, 23, 42, 0.18);
    background: #9bb3c4; /* matches scene-common.js default bg, avoids FOUC */
  }
  /* The renderer canvas inside fills the wrapper. */
  .parcours-step-scene > div { width: 100%; height: 100%; }
  .parcours-step-scene canvas { display: block; width: 100% !important; height: 100% !important; }

  /* JS hides the original desktop sticky container, but keep a CSS fallback
     in case JS fails (so we don't get an empty stretch at the bottom). */
  .parcours-sticky { display: none; }

  /* Indicator pills row would be cramped at 390px and duplicates info that's
     already in each step block — hide on mobile. */
  .parcours-steps[data-sector] { display: none; }
}
