/* MEV 2.0 — Secteurs motion layer — P06/P07/P08/Co-Living/Retail witness — 2026-09-09.
 * SYSTEM, NOT TEMPLATE: animates only separators already present in the frozen vertical geometry.
 * No layout nodes are injected. Native borders remain as fallback until JS declares readiness.
 */
body.mev-vertical-motion{
  --mev-vm-red:#FD0600;
  --mev-vm-black:#000000;
  --mev-vm-d4-line:3px;
  --mev-vm-d4-ms:1280ms;
}

/* Existing elements become positioning contexts only; no structural child is added. */
html.mev-vm-js body.mev-vertical-motion .mev-vm-hline,
html.mev-vm-js body.mev-vertical-motion .mev-vm-d4-boundary,
html.mev-vm-js body.mev-vertical-motion .mev-vm-vline,
html.mev-vm-js body.mev-vertical-motion .mev-vm-doctrinal{
  position:relative;
}

/* D4 SECTION→SECTION — the pseudo-element replaces the existing 1px red boundary while building. */
html.mev-vm-js body.mev-vertical-motion .mev-vm-d4-boundary{
  border-bottom-color:transparent!important;
  overflow:visible;
}
html.mev-vm-js body.mev-vertical-motion .mev-vm-d4-boundary::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  z-index:8;
  height:var(--mev-vm-d4-line);
  background:var(--mev-vm-red);
  transform:scaleX(0);
  transform-origin:50% 50%;
  pointer-events:none;
}
html.mev-vm-js body.mev-vertical-motion .mev-vm-d4-boundary.is-vm-d4-building::after{
  animation:mev-vm-d4-balanced var(--mev-vm-d4-ms) linear forwards;
}
html.mev-vm-js body.mev-vertical-motion .mev-vm-d4-boundary.is-vm-d4-built::after{
  transform:scaleX(1)!important;
}
@keyframes mev-vm-d4-balanced{
  0%{transform:scaleX(0)}
  20%{transform:scaleX(.08)}
  45%{transform:scaleX(.48)}
  70%{transform:scaleX(.80)}
  100%{transform:scaleX(1)}
}

/* Internal native horizontals — same final 1px geometry, progressive construction only. */
html.mev-vm-js body.mev-vertical-motion .mev-vm-hline[data-mev-vm-edge="top"]{
  border-top-color:transparent!important;
}
html.mev-vm-js body.mev-vertical-motion .mev-vm-hline[data-mev-vm-edge="bottom"]{
  border-bottom-color:transparent!important;
}
html.mev-vm-js body.mev-vertical-motion .mev-vm-hline::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  z-index:6;
  height:1px;
  background:var(--mev-vm-line-color,var(--mev-vm-black));
  transform:scaleX(0);
  transition:transform var(--mev-vm-ms,1000ms) cubic-bezier(.18,.72,.22,1);
  pointer-events:none;
}
html.mev-vm-js body.mev-vertical-motion .mev-vm-hline[data-mev-vm-edge="top"]::after{top:0}
html.mev-vm-js body.mev-vertical-motion .mev-vm-hline[data-mev-vm-edge="bottom"]::after{bottom:0}
html.mev-vm-js body.mev-vertical-motion .mev-vm-hline[data-mev-vm-dir="ltr"]::after{transform-origin:0 50%}
html.mev-vm-js body.mev-vertical-motion .mev-vm-hline[data-mev-vm-dir="rtl"]::after{transform-origin:100% 50%}
html.mev-vm-js body.mev-vertical-motion .mev-vm-hline.is-vm-built::after{transform:scaleX(1)}

/* Existing vertical rails — governance law: build bottom→top for asymmetry with horizontals. */
html.mev-vm-js body.mev-vertical-motion .mev-vm-vline::before{
  transform:scaleY(0)!important;
  transform-origin:50% 100%!important;
  transition:transform var(--mev-vm-ms,1000ms) cubic-bezier(.18,.72,.22,1)!important;
  will-change:transform;
}
html.mev-vm-js body.mev-vertical-motion .mev-vm-vline.is-vm-built::before{
  transform:scaleY(1)!important;
}

/* P06 temporal coda — 2 sentences = doctrinal field, never a vertical rail. */
html.mev-vm-js body.mev-vertical-motion [data-vertical-block='3'] .mev-vertical-time-coda.mev-vm-doctrinal{
  box-sizing:border-box;
  width:100%!important;
  max-width:none!important;
  margin:var(--vertical-gap) 0 0!important;
  padding:14px 0!important;
  background:linear-gradient(to right,var(--vertical-beige) 0%,#f1f2e9 8%,var(--vertical-grey) 14%,var(--vertical-grey) 86%,#f1f2e9 92%,var(--vertical-beige) 100%)!important;
  font-size:1.18rem!important;
  line-height:1.5!important;
  text-wrap:wrap!important;
  white-space:normal!important;
  overflow-wrap:normal;
  word-break:normal;
  hyphens:none;
}
html.mev-vm-js body.mev-vertical-motion [data-vertical-block='3'] .mev-vertical-time-coda.mev-vm-doctrinal::before,
html.mev-vm-js body.mev-vertical-motion [data-vertical-block='3'] .mev-vertical-time-coda.mev-vm-doctrinal::after{
  content:"";
  position:absolute;
  left:0!important;
  right:0!important;
  width:auto!important;
  height:1px!important;
  background:linear-gradient(to right,rgba(253,6,0,0) 0%,rgba(253,6,0,.42) 8%,var(--mev-vm-red) 14%,var(--mev-vm-red) 86%,rgba(253,6,0,.42) 92%,rgba(253,6,0,0) 100%)!important;
  transform:scaleX(0)!important;
  transform-origin:50% 50%!important;
  transition:transform var(--mev-vm-doctrinal-ms,1100ms) cubic-bezier(.18,.72,.22,1)!important;
  pointer-events:none;
}
html.mev-vm-js body.mev-vertical-motion [data-vertical-block='3'] .mev-vertical-time-coda.mev-vm-doctrinal::before{
  top:0!important;
  bottom:auto!important;
}
html.mev-vm-js body.mev-vertical-motion [data-vertical-block='3'] .mev-vertical-time-coda.mev-vm-doctrinal::after{
  top:auto!important;
  bottom:0!important;
  transition-delay:var(--mev-vm-doctrinal-delay,110ms)!important;
}
html.mev-vm-js body.mev-vertical-motion [data-vertical-block='3'] .mev-vertical-time-coda.mev-vm-doctrinal.is-vm-doctrinal-built::before,
html.mev-vm-js body.mev-vertical-motion [data-vertical-block='3'] .mev-vertical-time-coda.mev-vm-doctrinal.is-vm-doctrinal-built::after{
  transform:scaleX(1)!important;
}

/* P07 temporal coda — one short sentence = compact punctuation, no rail and no large field. */
html.mev-vm-js body.mev-vertical-motion-p07 [data-vertical-block='3'] .mev-vertical-time-coda.mev-vm-compact{
  width:auto!important;
  max-width:760px!important;
  margin:32px 0 0!important;
  padding:0!important;
  background:none!important;
  font-size:1.08rem!important;
  line-height:1.5!important;
  text-wrap:wrap!important;
  white-space:normal!important;
}
html.mev-vm-js body.mev-vertical-motion-p07 [data-vertical-block='3'] .mev-vertical-time-coda.mev-vm-compact::before,
html.mev-vm-js body.mev-vertical-motion-p07 [data-vertical-block='3'] .mev-vertical-time-coda.mev-vm-compact::after{
  content:none!important;
  display:none!important;
}

/* P07 has five Space items: remove the native duplicate top shadow on the spanning last row; the two preceding native row separators remain the real boundary and are animated. */
html.mev-vm-js body.mev-vertical-motion-p07 [data-vertical-block='2'] .mev-vertical-item:last-child:nth-child(odd){
  box-shadow:none!important;
}

/* Retail after-register — 2 sentences = doctrinal field. Grey section therefore inverts to beige in the centre. */
html.mev-vm-js body.mev-vertical-motion-retail [data-vertical-block='4'] .mev-vertical-after-register.mev-vm-doctrinal{
  position:relative;
  box-sizing:border-box;
  width:100%!important;
  max-width:none!important;
  margin:40px 0 0!important;
  padding:14px 0!important;
  background:linear-gradient(to right,var(--vertical-grey) 0%,#f5f6ef 8%,var(--vertical-beige) 14%,var(--vertical-beige) 86%,#f5f6ef 92%,var(--vertical-grey) 100%)!important;
  font-size:1.18rem!important;
  line-height:1.5!important;
  text-wrap:wrap!important;
  white-space:normal!important;
  overflow-wrap:normal;
  word-break:normal;
  hyphens:none;
}
html.mev-vm-js body.mev-vertical-motion-retail [data-vertical-block='4'] .mev-vertical-after-register.mev-vm-doctrinal::before,
html.mev-vm-js body.mev-vertical-motion-retail [data-vertical-block='4'] .mev-vertical-after-register.mev-vm-doctrinal::after{
  content:"";
  position:absolute;
  left:0!important;
  right:0!important;
  width:auto!important;
  height:1px!important;
  background:linear-gradient(to right,rgba(253,6,0,0) 0%,rgba(253,6,0,.42) 8%,var(--mev-vm-red) 14%,var(--mev-vm-red) 86%,rgba(253,6,0,.42) 92%,rgba(253,6,0,0) 100%)!important;
  transform:scaleX(0)!important;
  transform-origin:50% 50%!important;
  transition:transform var(--mev-vm-doctrinal-ms,1100ms) cubic-bezier(.18,.72,.22,1)!important;
  pointer-events:none;
}
html.mev-vm-js body.mev-vertical-motion-retail [data-vertical-block='4'] .mev-vertical-after-register.mev-vm-doctrinal::before{top:0!important;bottom:auto!important}
html.mev-vm-js body.mev-vertical-motion-retail [data-vertical-block='4'] .mev-vertical-after-register.mev-vm-doctrinal::after{top:auto!important;bottom:0!important;transition-delay:var(--mev-vm-doctrinal-delay,110ms)!important}
html.mev-vm-js body.mev-vertical-motion-retail [data-vertical-block='4'] .mev-vertical-after-register.mev-vm-doctrinal.is-vm-doctrinal-built::before,
html.mev-vm-js body.mev-vertical-motion-retail [data-vertical-block='4'] .mev-vertical-after-register.mev-vm-doctrinal.is-vm-doctrinal-built::after{transform:scaleX(1)!important}

/* FAQ structure, CTA and text remain deliberately static (G0). */

@media(max-width:780px){
  html.mev-vm-js body.mev-vertical-motion [data-vertical-block='3'] .mev-vertical-time-coda.mev-vm-doctrinal{
    width:100%!important;
    max-width:none!important;
    margin:var(--vertical-gap) 0 0!important;
    padding:12px 0!important;
    font-size:1rem!important;
    line-height:1.48!important;
  }
  html.mev-vm-js body.mev-vertical-motion-p07 [data-vertical-block='3'] .mev-vertical-time-coda.mev-vm-compact{
    max-width:none!important;
    margin:28px 0 0!important;
    font-size:1rem!important;
    line-height:1.48!important;
  }
  html.mev-vm-js body.mev-vertical-motion-retail [data-vertical-block='4'] .mev-vertical-after-register.mev-vm-doctrinal{
    width:100%!important;
    max-width:none!important;
    margin:32px 0 0!important;
    padding:12px 0!important;
    font-size:1rem!important;
    line-height:1.48!important;
  }
}

@media(prefers-reduced-motion:reduce){
  html.mev-vm-js body.mev-vertical-motion .mev-vm-d4-boundary::after{
    animation:none!important;
    transform:scaleX(1)!important;
  }
  html.mev-vm-js body.mev-vertical-motion .mev-vm-hline::after{
    transition:none!important;
    transform:scaleX(1)!important;
  }
  html.mev-vm-js body.mev-vertical-motion .mev-vm-vline::before{
    transition:none!important;
    transform:scaleY(1)!important;
  }
  html.mev-vm-js body.mev-vertical-motion .mev-vm-doctrinal::before,
  html.mev-vm-js body.mev-vertical-motion .mev-vm-doctrinal::after{
    transition:none!important;
    transform:scaleX(1)!important;
  }
}
