/* Animation de lancement « Ouverture » — le M s'assemble (ailes gauche/droite), la personne se pose, un reflet passe.
   Uniquement transform/opacity (GPU), ~0,9 s, jamais répétée dans la session, sobre si prefers-reduced-motion. */
.splash{position:fixed;inset:0;z-index:5000;display:none;place-items:center;background:radial-gradient(120% 90% at 50% 38%,#ffffff 0%,#f3f8ff 62%,#e8f1ff 100%);
  padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  animation:splash-failsafe 0s linear 2.6s forwards}
html.splash-pending .splash{display:grid}
html.splash-skip .splash,html.splash-done .splash{display:none}
@keyframes splash-failsafe{to{visibility:hidden;pointer-events:none}}
.splash-stage{display:flex;flex-direction:column;align-items:center;gap:18px;transform:translateZ(0)}
.splash-mark{position:relative;width:min(58vw,260px);aspect-ratio:520/301;overflow:hidden;border-radius:10px}
.splash-mark img{position:absolute;inset:0;width:100%;height:100%;will-change:transform,opacity;opacity:0}
.splash-mark::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 35%,rgba(255,255,255,.65) 50%,transparent 65%);transform:translateX(-120%);opacity:0}
.splash-custom{max-width:min(60vw,240px);height:auto;opacity:0;transform:scale(.94)}
.splash-name{margin:0;font:600 .95rem/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;letter-spacing:.04em;color:#2b6cb0;opacity:0;transform:translateY(6px)}
.splash-line{display:block;width:56px;height:3px;border-radius:3px;background:linear-gradient(90deg,#4aa3e6,#2b6cb0);transform:scaleX(0);transform-origin:left;opacity:.9}

html.splash-pending .mark-left{animation:wing-left .5s cubic-bezier(.22,.8,.3,1) .05s forwards}
html.splash-pending .mark-right{animation:wing-right .5s cubic-bezier(.22,.8,.3,1) .05s forwards}
html.splash-pending .mark-dot{animation:dot-drop .46s cubic-bezier(.34,1.56,.64,1) .3s forwards}
html.splash-pending .splash-mark::after{animation:sheen .5s ease-in-out .52s forwards}
html.splash-pending .splash-custom{animation:custom-in .45s cubic-bezier(.22,.8,.3,1) .05s forwards}
html.splash-pending .splash-name{animation:rise .35s ease-out .42s forwards}
html.splash-pending .splash-line{animation:draw .4s ease-out .5s forwards}
@keyframes wing-left{from{opacity:0;transform:translateX(-38px)}to{opacity:1;transform:none}}
@keyframes wing-right{from{opacity:0;transform:translateX(38px)}to{opacity:1;transform:none}}
@keyframes dot-drop{from{opacity:0;transform:translateY(-70px) scale(.7)}to{opacity:1;transform:none}}
@keyframes sheen{0%{opacity:1;transform:translateX(-120%)}100%{opacity:0;transform:translateX(120%)}}
@keyframes custom-in{to{opacity:1;transform:none}}
@keyframes rise{to{opacity:1;transform:none}}
@keyframes draw{to{transform:scaleX(1)}}

/* sortie : fondu + légère avancée, puis retrait de l'arbre d'accessibilité */
html.splash-leaving .splash{opacity:0;transition:opacity .26s ease-out;pointer-events:none}
html.splash-leaving .splash-stage{transform:scale(1.045);transition:transform .26s ease-out}

@media (prefers-reduced-motion:reduce){
  .splash{animation-duration:0s;animation-delay:1.6s}
  html.splash-pending .mark-left,html.splash-pending .mark-right,html.splash-pending .mark-dot,html.splash-pending .splash-custom,html.splash-pending .splash-name{animation:fade-only .15s linear forwards}
  html.splash-pending .splash-line,html.splash-pending .splash-mark::after{animation:none;opacity:0}
  html.splash-leaving .splash{transition-duration:.12s}
  html.splash-leaving .splash-stage{transform:none;transition:none}
}
@keyframes fade-only{from{opacity:0}to{opacity:1;transform:none}}
