/* Yunsha.be — scènes produit (site public uniquement). Scroll sticky, pas de hijack. */
.ys-stage {
  --ys-sidebar: #151826;
  --ys-ink: #0b1f33;
  --ys-muted: #5a6f86;
  --ys-line: #e4eef8;
  --ys-accent: #0176d3;
  --ys-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ys-p: 0;
  background: #f4f8fd;
  border-top: 1px solid var(--line, #d5e5f5);
  border-bottom: 1px solid var(--line, #d5e5f5);
}
.ys-stage { height: 260vh; }
.ys-stage__pin {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  overflow: visible;
}
.ys-stage__grid {
  width: min(var(--max, 1600px), calc(100% - 2 * var(--pad, 24px)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.35fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
}
.ys-stage__copy { min-width: 0; }
.ys-stage__copy .eyebrow {
  margin-bottom: 10px;
}
.ys-copy-head,
.ys-copy-lede {
  position: relative;
}
.ys-copy-head { min-height: 4.8em; margin-bottom: 12px; }
.ys-copy-lede { min-height: 4.2em; }
.ys-step-copy,
.ys-step-lede {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  margin: 0;
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity .75s var(--ys-ease), transform .75s var(--ys-ease);
  pointer-events: none;
}
.ys-step-copy { max-width: 16ch; }
.ys-film .ys-step-copy { max-width: 14ch; font-size: clamp(1.7rem, 3.2vw, 2.55rem); }
.ys-step-lede { max-width: 36ch; }
.ys-stage[data-step="0"] .ys-step-copy[data-step="0"],
.ys-stage[data-step="1"] .ys-step-copy[data-step="1"],
.ys-stage[data-step="2"] .ys-step-copy[data-step="2"],
.ys-stage[data-step="3"] .ys-step-copy[data-step="3"],
.ys-stage[data-step="0"] .ys-step-lede[data-step="0"],
.ys-stage[data-step="1"] .ys-step-lede[data-step="1"],
.ys-stage[data-step="2"] .ys-step-lede[data-step="2"],
.ys-stage[data-step="3"] .ys-step-lede[data-step="3"] {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.ys-device {
  background: #fff;
  border: 1px solid #d7e4f2;
  border-radius: 18px;
  box-shadow:
    0 8px 24px rgba(3, 45, 96, calc(0.06 + 0.08 * var(--ys-p))),
    0 28px 80px rgba(3, 45, 96, calc(0.08 + 0.1 * var(--ys-p)));
  overflow: hidden;
  min-height: min(62vh, 560px);
  display: grid;
  grid-template-columns: 72px 1fr;
  transform: none;
}

.ys-nav {
  background: var(--ys-sidebar);
  color: #e8eaed;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.ys-nav img { width: 36px; height: 36px; }
.ys-nav span {
  width: 36px; height: 6px; border-radius: 99px;
  background: rgba(255,255,255,.16);
  transition: background .5s var(--ys-ease), transform .5s var(--ys-ease);
}
.ys-nav span.is-on {
  background: #6d8cff;
  transform: scaleX(1.08);
}
.ys-screen { padding: 16px 18px 18px; background: #f7fafd; min-width: 0; }
.ys-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ys-kpi {
  background: #fff; border: 1px solid var(--ys-line); border-radius: 12px; padding: 12px;
  opacity: .72;
  transform: translate3d(0, 10px, 0);
  transition: opacity .6s var(--ys-ease), transform .6s var(--ys-ease), box-shadow .6s var(--ys-ease), border-color .6s var(--ys-ease);
}
.ys-stage[data-step="1"] .ys-kpi,
.ys-stage[data-step="2"] .ys-kpi,
.ys-stage[data-step="3"] .ys-kpi {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.ys-kpi:nth-child(2) { transition-delay: .07s; }
.ys-kpi:nth-child(3) { transition-delay: .14s; }
.ys-kpi:nth-child(4) { transition-delay: .21s; }
.ys-kpi strong { display: block; font-size: 1.2rem; color: var(--ys-ink); font-family: Sora, sans-serif; }
.ys-kpi small { color: var(--ys-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.ys-kpi.is-alert { border-color: #f3c4c8; }
.ys-stage[data-step="3"] .ys-kpi.is-alert {
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}
.ys-hello { font-size: .95rem; font-weight: 700; color: var(--ys-ink); margin: 0 0 12px; }
.ys-side-card {
  margin-top: 12px; background: #fff; border: 1px solid var(--ys-line);
  border-radius: 12px; padding: 14px; opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity .65s var(--ys-ease) .12s, transform .65s var(--ys-ease) .12s, outline-color .5s var(--ys-ease);
}
.ys-stage[data-step="2"] .ys-side-card,
.ys-stage[data-step="3"] .ys-side-card { opacity: 1; transform: translate3d(0, 0, 0); }
.ys-pill {
  display: inline-block; font-size: .72rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; background: #fde8ea; color: #b42318;
}
.ys-stage[data-step="3"] .ys-side-card.is-focus { outline: 2px solid var(--ys-accent); }
.ys-sasha-stack { position: relative; min-height: 228px; }
.ys-modal {
  background: #fff; border-radius: 14px; border: 1px solid #dbe7f4;
  padding: 18px 18px 14px; box-shadow: 0 18px 50px rgba(15, 23, 42, .18); min-height: 220px;
}
.ys-modal h3 { font-size: 1.05rem; margin-bottom: 8px; }
.ys-modal p { font-size: .92rem; color: var(--ys-ink); }
.ys-modal__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ys-modal__btns button {
  border: 1px solid #cfdff0; background: #fff; border-radius: 999px;
  padding: 7px 12px; font-weight: 600; font-size: .85rem; color: var(--ys-ink);
  pointer-events: none;
}
.ys-modal__btns button.is-on { background: #eef4ff; border-color: var(--ys-accent); color: var(--ys-accent); }
.ys-think { color: var(--ys-muted); font-style: italic; }
.ys-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.ys-dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  animation: ys-dot 1.05s ease-in-out infinite;
}
.ys-dots i:nth-child(2) { animation-delay: .15s; }
.ys-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ys-dot {
  0%, 80%, 100% { opacity: .22; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
.ys-clientbar {
  display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px;
  font-size: .85rem; color: var(--ys-muted);
}
.ys-clientbar strong { color: var(--ys-ink); font-size: 1.05rem; }
.ys-sasha-layer {
  position: absolute;
  left: 0; right: 0; top: 0;
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(0.985);
  transform-origin: 50% 20%;
  transition: opacity .6s var(--ys-ease), transform .6s var(--ys-ease);
  pointer-events: none;
}
.ys-stage[data-step="0"] .ys-sasha-l0,
.ys-stage[data-step="1"] .ys-sasha-l1,
.ys-stage[data-step="2"] .ys-sasha-l2,
.ys-stage[data-step="3"] .ys-sasha-l3 {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}
.ys-doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.ys-doc-id { min-width: 0; }
.ys-doc-badges,
.ys-doc-nums { position: relative; }
.ys-doc-badges { min-height: 1.7em; }
.ys-doc-nums { min-height: 1.5em; margin-top: 4px; }
.ys-badge {
  font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: #eef0ff; color: #4f46c8;
  position: absolute; left: 0; top: 0;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity .5s var(--ys-ease), transform .5s var(--ys-ease);
}
.ys-badge.is-inv { background: #ece9ff; color: #5b4cdb; }
.ys-docnum {
  margin: 0; color: #0b1f33; font-weight: 700; white-space: nowrap;
  position: absolute; left: 0; top: 0;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity .5s var(--ys-ease), transform .5s var(--ys-ease);
}
.ys-stage[data-step="0"] .ys-doc-q,
.ys-stage[data-step="1"] .ys-doc-q,
.ys-stage[data-step="2"] span.ys-doc-o,
.ys-stage[data-step="2"] p.ys-doc-o,
.ys-stage[data-step="3"] span.ys-doc-i,
.ys-stage[data-step="3"] p.ys-doc-i {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.ys-row {
  display: grid; grid-template-columns: minmax(0, 1.6fr) auto auto;
  gap: 8px; font-size: .85rem; padding: 8px 0; border-bottom: 1px solid var(--ys-line);
  align-items: baseline;
}
.ys-row span:last-child { font-weight: 700; white-space: nowrap; }
.ys-row span:nth-child(2) { color: var(--ys-muted); white-space: nowrap; }
.ys-totals { text-align: right; margin-top: 12px; font-weight: 700; }
.ys-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ys-actions span {
  font-size: .8rem; font-weight: 700; padding: 8px 12px; border-radius: 10px;
  background: #eef4ff; color: var(--ys-accent); opacity: .28;
  transform: translate3d(0, 6px, 0);
  transition: opacity .5s var(--ys-ease), transform .5s var(--ys-ease);
}
.ys-stage[data-step="1"] .ys-act-1,
.ys-stage[data-step="2"] .ys-act-2,
.ys-stage[data-step="3"] .ys-act-3 {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.ys-line-hide {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition: opacity .55s var(--ys-ease), transform .55s var(--ys-ease);
}
.ys-stage[data-step="1"] .ys-line-hide,
.ys-stage[data-step="2"] .ys-line-hide,
.ys-stage[data-step="3"] .ys-line-hide {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.ys-note { margin-top: 10px; font-size: .8rem; color: var(--ys-muted); }
.ys-stage { scroll-margin-top: 128px; }
.ys-stage--compact { height: 210vh; }
.ys-film .ys-stage__pin {
  top: 128px;
  height: calc(100vh - 128px);
  height: calc(100dvh - 128px);
}
.feat-page .ys-stage__pin {
  top: 128px;
  height: calc(100vh - 128px);
  height: calc(100dvh - 128px);
}
.ys-hl {
  position: sticky;
  top: 72px;
  z-index: 22;
  background: rgba(244, 248, 253, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line, #d5e5f5);
}
.ys-hl-inner {
  width: min(var(--max, 1600px), calc(100% - 2 * var(--pad, 24px)));
  margin: 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: none;
}
.ys-hl-inner::-webkit-scrollbar { display: none; }
.ys-hl a {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 700;
  color: var(--ys-ink);
  background: #fff;
  border: 1px solid var(--ys-line);
  text-decoration: none;
  white-space: nowrap;
}
.ys-hl a:hover {
  border-color: #032d60;
}
.ys-hl a.is-on {
  background: #032d60;
  color: #fff;
  border-color: #032d60;
}
.ys-hl a.is-on:hover { color: #fff; }
.ys-hl::after {
  content: "";
  display: block;
  height: 2px;
  width: calc(var(--ys-film-p, 0) * 100%);
  background: var(--ys-accent, #0176d3);
  transition: width .12s linear;
}
.ys-layer {
  position: absolute;
  left: 0; right: 0; top: 0;
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity .6s var(--ys-ease), transform .6s var(--ys-ease);
  pointer-events: none;
}
.ys-stack { position: relative; min-height: 240px; }
.ys-stage[data-step="0"] .ys-l0,
.ys-stage[data-step="1"] .ys-l1,
.ys-stage[data-step="2"] .ys-l2,
.ys-stage[data-step="3"] .ys-l3 { opacity: 1; transform: none; }
.ys-list-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--ys-line); font-size: .9rem;
}
.ys-list-row strong { color: var(--ys-ink); }
.ys-list-row.is-on { background: #eef4ff; margin: 0 -10px; padding: 10px; border-radius: 10px; }
.ys-pay {
  background: #fff; border: 1px solid var(--ys-line); border-radius: 14px; padding: 16px;
  box-shadow: 0 16px 40px rgba(3, 45, 96, .12);
}
.ys-pay .ys-pay-amt { font-family: Sora, sans-serif; font-size: 1.35rem; color: var(--ys-ink); margin: 8px 0; }
.ys-ledger { font-size: .88rem; }
.ys-ledger div {
  display: grid; grid-template-columns: 1.4fr .7fr .7fr; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--ys-line);
}
.ys-ledger div span:nth-child(2),
.ys-ledger div span:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
.ys-pill.is-ok { background: #e6f7ed; color: #067647; }
.ys-pill.is-wait { background: #eef4ff; color: var(--ys-accent); }
.ys-stage--deep {
  background: #032d60;
  border-color: #032d60;
}
.ys-stage--deep .eyebrow { color: #8ec5ff; }
.ys-stage--deep .ys-step-copy { color: #fff; }
.ys-stage--deep .lede { color: rgba(255,255,255,.88); }
.ys-fam {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.ys-fam article {
  background: #fff;
  border: 1px solid var(--ys-line);
  border-radius: 16px;
  padding: 16px;
  min-height: 220px;
  opacity: .38;
  transform: scale(.94);
  transition: opacity .55s var(--ys-ease), transform .55s var(--ys-ease), box-shadow .55s var(--ys-ease);
}
.ys-stage[data-step="0"] .ys-fam article:nth-child(1),
.ys-stage[data-step="1"] .ys-fam article:nth-child(2),
.ys-stage[data-step="2"] .ys-fam article:nth-child(3),
.ys-stage[data-step="3"] .ys-fam article:nth-child(4) {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 24px 50px rgba(3, 45, 96, .14);
}
.ys-fam h3 { font-size: 1.02rem; margin-bottom: 8px; }
.ys-fam p { margin: 0; font-size: .9rem; }
@media (max-width: 991px) {
  .ys-stage { height: auto; }
  .ys-stage__pin { position: relative; top: 0; height: auto; padding: 40px 0 48px; overflow: visible; }
  .feat-page .ys-stage__pin { top: 0; height: auto; padding: 72px 0 48px; }
  .ys-stage__grid { grid-template-columns: 1fr; }
  .ys-kpis { grid-template-columns: 1fr 1fr; }
  .ys-device { min-height: 0; will-change: auto; }
  .ys-step-copy, .ys-step-lede { opacity: 0; transform: none; position: absolute; }
  .ys-stage .ys-step-copy[data-step="3"],
  .ys-stage .ys-step-lede[data-step="3"] { opacity: 1; position: relative; }
  .ys-kpi, .ys-side-card, .ys-line-hide, .ys-actions span {
    opacity: 1; transform: none; transition-delay: 0s;
  }
  .ys-sasha-layer, .ys-layer { opacity: 0; transform: none; }
  .ys-sasha-l3, .ys-l3 { opacity: 1; transform: none; }
  .ys-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ys-row span:nth-child(2) { display: none; }
  .ys-fam { grid-template-columns: 1fr 1fr; }
  .ys-fam article { opacity: 1; transform: none; min-height: 0; }
  .ys-hl { top: 64px; }
  .ys-film .ys-stage__pin { top: 0; }
  .ys-film .ys-device { overflow: visible; transform: none; }
  .ys-film .ys-screen { transform: none !important; will-change: auto; }
  .ys-stage__copy,
  .ys-device,
  .ys-fam {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition: opacity .8s var(--ys-ease), transform .8s var(--ys-ease);
  }
  .ys-device,
  .ys-fam { transition-delay: .08s; }
  .ys-stage.is-inview .ys-stage__copy,
  .ys-stage.is-inview .ys-device,
  .ys-stage.is-inview .ys-fam {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ys-stage { height: auto; }
  .ys-stage__pin { position: relative; top: 0; height: auto; padding: 48px 0; }
  .feat-page .ys-stage__pin { padding: 72px 0 48px; }
  .ys-stage *,
  .ys-stage *::before,
  .ys-stage *::after {
    animation: none !important;
    transition: none !important;
  }
  .ys-device { transform: none; will-change: auto; }
  .ys-film .ys-screen { transform: none !important; will-change: auto; }
  .ys-kpi, .ys-side-card, .ys-line-hide, .ys-actions span, .ys-stage__copy {
    opacity: 1; transform: none;
  }
  .ys-sasha-layer, .ys-layer { opacity: 0; transform: none; }
  .ys-sasha-l3, .ys-l3 { opacity: 1; transform: none; }
  .ys-step-copy, .ys-step-lede { opacity: 0; transform: none; }
  .ys-stage[data-step="0"] .ys-step-copy[data-step="0"],
  .ys-stage[data-step="1"] .ys-step-copy[data-step="1"],
  .ys-stage[data-step="2"] .ys-step-copy[data-step="2"],
  .ys-stage[data-step="3"] .ys-step-copy[data-step="3"],
  .ys-stage[data-step="0"] .ys-step-lede[data-step="0"],
  .ys-stage[data-step="1"] .ys-step-lede[data-step="1"],
  .ys-stage[data-step="2"] .ys-step-lede[data-step="2"],
  .ys-stage[data-step="3"] .ys-step-lede[data-step="3"] { opacity: 1; position: relative; }
  .ys-fam article { opacity: 1; transform: none; }
}
