/* SANIYORO — Splash + onboarding (maquette mobile) */
html.sy-onboarding-pending body > :not(#sy-onboarding) {
  visibility: hidden;
}

body.sy-pwa-install-active {
  overflow: hidden;
}

.sy-onboarding {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  overflow: hidden;
  touch-action: pan-y;
}

.sy-onboarding.is-leaving {
  animation: sy-onb-fade-out 0.45s ease forwards;
}

.sy-onboarding[hidden] {
  display: none !important;
}

body.sy-onboarding-active {
  overflow: hidden;
}

body.sy-onboarding-active .site-header,
body.sy-onboarding-active .site-main,
body.sy-onboarding-active .sy-site-footer,
body.sy-onboarding-active .sy-mobile-tabbar,
body.sy-onboarding-active .sy-fere-bar,
body.sy-onboarding-active .nav-backdrop {
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.sy-onb-viewport {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

.sy-onb-track {
  display: flex;
  height: 100%;
  width: 400%;
  transition: transform 0.55s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

.sy-onb-slide {
  flex: 0 0 25%;
  width: 25%;
  height: 100%;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
}

/* ——— Splash ——— */
.sy-onb-slide--splash {
  color: #fff;
}

.sy-onb-slide--brand {
  color: var(--sy-navy, #0047ab);
}

.sy-onb-splash-bg {
  position: absolute;
  inset: 0;
  background-image: var(--sy-splash-bg);
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.05);
  animation: sy-onb-kenburns 12s ease-in-out infinite alternate;
}

.sy-onb-splash-bg--brand {
  background-image: none;
  background: linear-gradient(165deg, #eef5ff 0%, #ffffff 42%, #fff8f0 100%);
  transform: none;
  animation: none;
}

.sy-onb-splash-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 22, 40, 0.35) 0%, rgba(8, 22, 40, 0.55) 45%, rgba(8, 22, 40, 0.88) 100%);
}

.sy-onb-slide--brand .sy-onb-splash-overlay {
  display: none;
}

.sy-onb-splash-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 100%;
  min-height: 100dvh;
  padding: calc(2.5rem + env(safe-area-inset-top, 0px)) 1.35rem calc(2rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.sy-onb-splash-brand {
  margin-top: 0.5rem;
}

.sy-onb-logo-stage {
  position: relative;
  width: min(240px, 68vw);
  margin: 0 auto 0.75rem;
  aspect-ratio: 1;
}

.sy-onb-logo-hero {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transform: translateX(-36px) scale(0.88);
  filter: drop-shadow(0 12px 28px rgba(0, 71, 171, 0.14));
}

.sy-onb-speed-line {
  position: absolute;
  left: 4%;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9100, #ffc107);
  opacity: 0;
  transform: translateX(-12px);
}

.sy-onb-speed-line--1 { top: 36%; width: 22px; }
.sy-onb-speed-line--2 { top: 44%; width: 32px; }
.sy-onb-speed-line--3 { top: 52%; width: 18px; }

.sy-onb-dot-drop {
  position: absolute;
  top: 18%;
  right: 28%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffc107, #ff9100);
  opacity: 0;
  transform: translateY(-48px) scale(0.4);
  box-shadow: 0 0 12px rgba(255, 145, 0, 0.45);
}

.sy-onb-slide--splash.is-intro .sy-onb-speed-line--1 {
  animation: sy-onb-speed-in 0.55s ease 0.12s forwards;
}

.sy-onb-slide--splash.is-intro .sy-onb-speed-line--2 {
  animation: sy-onb-speed-in 0.55s ease 0.22s forwards;
}

.sy-onb-slide--splash.is-intro .sy-onb-speed-line--3 {
  animation: sy-onb-speed-in 0.55s ease 0.32s forwards;
}

.sy-onb-slide--splash.is-intro .sy-onb-logo-hero {
  animation: sy-onb-logo-drive 0.95s cubic-bezier(0.22, 0.72, 0, 1) 0.38s forwards;
}

.sy-onb-slide--splash.is-intro .sy-onb-dot-drop {
  animation: sy-onb-dot-bounce 0.65s cubic-bezier(0.34, 1.45, 0.64, 1) 1.05s forwards;
}

.sy-onb-slide--splash.is-intro-done .sy-onb-logo-hero {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.sy-onb-slide--splash.is-intro-done .sy-onb-speed-line {
  opacity: 1;
  transform: translateX(0);
}

.sy-onb-slide--splash.is-intro-done .sy-onb-dot-drop {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.sy-onb-tagline {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--sy-navy, #0047ab);
}

.sy-onb-slide--splash:not(.sy-onb-slide--brand) .sy-onb-tagline {
  color: rgba(255, 255, 255, 0.88);
}

.sy-onb-splash-lead {
  margin: 0;
  max-width: 18rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
}

.sy-onb-slide--brand .sy-onb-splash-lead {
  color: #2a4060;
}

.sy-onb-trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 22rem;
}

.sy-onb-trust li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.92);
  flex: 1 1 28%;
  min-width: 72px;
}

.sy-onb-slide--brand .sy-onb-trust li {
  color: #3d5270;
}

.sy-onb-trust-ico {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 71, 171, 0.12);
  border: 1.5px solid rgba(0, 115, 230, 0.22);
  color: var(--sy-navy, #0047ab);
  font-size: 1.15rem;
}

.sy-onb-slide--splash:not(.sy-onb-slide--brand) .sy-onb-trust-ico {
  background: rgba(0, 71, 171, 0.55);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.sy-onb-splash-actions {
  width: 100%;
  max-width: 20rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: center;
}

/* ——— Panels onboarding ——— */
.sy-onb-slide--panel {
  background: #fff;
}

.sy-onb-panel-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 100%;
  min-height: 100dvh;
  padding: calc(2rem + env(safe-area-inset-top, 0px)) 1.35rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.sy-onb-illus {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.sy-onb-illus--shop {
  height: min(260px, 36vh);
  align-items: center;
}

.sy-onb-scene {
  position: relative;
  width: min(268px, 78vw);
  height: min(240px, 34vh);
  margin: 0 auto;
}

.sy-onb-scene-blob {
  position: absolute;
  inset: 10% 8% 6%;
  border-radius: 52% 48% 55% 45% / 48% 52% 48% 52%;
  background: linear-gradient(145deg, rgba(0, 71, 171, 0.16), rgba(0, 71, 171, 0.05));
  animation: sy-onb-blob 6s ease-in-out infinite alternate;
}

.sy-onb-scene-photo {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  width: 122px;
  height: 122px;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 14px 36px rgba(10, 28, 48, 0.16);
  z-index: 2;
  animation: sy-onb-rise 0.7s ease both;
}

.sy-onb-scene-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.sy-onb-chip {
  position: absolute;
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  box-shadow: 0 8px 22px rgba(10, 28, 48, 0.12);
  animation: sy-onb-float 4s ease-in-out infinite;
}

.sy-onb-chip--bag {
  top: 12%;
  left: 2%;
  background: #fff;
  color: #ff9100;
  border: 1.5px solid rgba(255, 145, 0, 0.22);
}

.sy-onb-chip--truck {
  top: 8%;
  right: 2%;
  background: #0047ab;
  color: #fff;
  animation-delay: 0.45s;
}

.sy-onb-chip--shop {
  bottom: 30%;
  left: 6%;
  background: #fff;
  color: #ff9100;
  border: 1.5px solid rgba(255, 145, 0, 0.22);
  animation-delay: 0.9s;
}

.sy-onb-illus-blob {
  position: absolute;
  inset: 10% 5% 15%;
  border-radius: 50% 45% 55% 50% / 55% 45% 55% 45%;
  background: rgba(0, 71, 171, 0.12);
  animation: sy-onb-blob 6s ease-in-out infinite alternate;
}

.sy-onb-illus-blob--mint {
  background: rgba(0, 71, 171, 0.1);
}

.sy-onb-illus-blob--gold {
  background: rgba(255, 145, 0, 0.12);
}

.sy-onb-illus--delivery,
.sy-onb-illus--pay {
  height: min(260px, 36vh);
}

.sy-onb-float {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  box-shadow: 0 8px 20px rgba(10, 28, 48, 0.12);
  animation: sy-onb-float 4s ease-in-out infinite;
}

.sy-onb-float--1 {
  top: 8%;
  left: 6%;
  background: #fff;
  color: #ff9100;
  border: 1.5px solid rgba(255, 145, 0, 0.25);
}

.sy-onb-float--2 {
  top: 18%;
  right: 4%;
  background: #0047ab;
  color: #fff;
  animation-delay: 0.5s;
}

.sy-onb-float--3 {
  bottom: 22%;
  left: 10%;
  background: #fff;
  color: #ff9100;
  border: 1.5px solid rgba(255, 145, 0, 0.25);
  animation-delay: 1s;
}

.sy-onb-illus-icon-lg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  font-size: 2.75rem;
  color: #0047ab;
  background: #fff;
  box-shadow: 0 16px 40px rgba(10, 28, 48, 0.12);
  animation: sy-onb-pulse 2.5s ease-in-out infinite;
}

.sy-onb-illus-icon-lg--shield {
  color: #ff9100;
}

.sy-onb-pay-cards {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: 220px;
}

.sy-onb-pay-cards span {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e8edf3;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sy-navy, #0a1c30);
  box-shadow: 0 4px 12px rgba(10, 28, 48, 0.08);
  animation: sy-onb-rise 0.5s ease both;
}

.sy-onb-pay-cards span:nth-child(2) { animation-delay: 0.08s; }
.sy-onb-pay-cards span:nth-child(3) { animation-delay: 0.16s; }

.sy-onb-panel-copy {
  max-width: 22rem;
  margin: 1rem 0;
}

.sy-onb-panel-copy h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display, Outfit, sans-serif);
  font-size: clamp(1.35rem, 4.5vw, 1.55rem);
  font-weight: 800;
  color: var(--sy-navy, #0a1c30);
  line-height: 1.2;
}

.sy-onb-panel-copy p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #5a6a7c;
}

.sy-onb-dots {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.sy-onb-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d8dfe8;
  transition: width 0.3s, background 0.3s;
}

.sy-onb-dots span.is-active {
  width: 22px;
  background: #0047ab;
}

.sy-onb-panel-actions {
  width: 100%;
  max-width: 20rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.sy-onb-btn {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.sy-onb-btn--primary {
  background: linear-gradient(135deg, #0047ab, #0073e6);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 71, 171, 0.35);
}

.sy-onb-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 71, 171, 0.4);
}

.sy-onb-btn--primary:active {
  transform: scale(0.98);
}

.sy-onb-link {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sy-onb-link--light {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
}

.sy-onb-link--light:hover {
  color: #fff;
  text-decoration: underline;
}

.sy-onb-link--muted {
  color: var(--sy-navy, #0047ab);
  text-decoration: none;
  font-weight: 700;
}

.sy-onb-link--muted:hover {
  color: var(--sy-blue, #0073e6);
  text-decoration: underline;
}

.sy-onb-link--skip {
  color: #0047ab;
  text-decoration: none;
}

.sy-onb-link--skip:hover {
  text-decoration: underline;
}

/* Animations entrée par slide */
.sy-onb-slide.is-active [data-animate="up"] {
  animation: sy-onb-rise 0.65s ease both;
  animation-delay: var(--d, 0s);
}

.sy-onb-slide:not(.is-active) [data-animate="up"] {
  opacity: 0;
}

.sy-onb-slide--panel.is-active .sy-onb-panel-copy {
  animation: sy-onb-rise 0.55s ease 0.15s both;
}

.sy-onb-slide--panel.is-active .sy-onb-dots {
  animation: sy-onb-rise 0.5s ease 0.25s both;
}

.sy-onb-slide--panel.is-active .sy-onb-panel-actions {
  animation: sy-onb-rise 0.5s ease 0.35s both;
}

@keyframes sy-onb-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sy-onb-fade-out {
  to {
    opacity: 0;
    transform: scale(1.02);
  }
}

@keyframes sy-onb-kenburns {
  from { transform: scale(1.05); }
  to { transform: scale(1.12); }
}

@keyframes sy-onb-logo-float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}

@keyframes sy-onb-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes sy-onb-blob {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(8deg) scale(1.05); }
}

@keyframes sy-onb-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.04); }
}

@keyframes sy-onb-speed-in {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes sy-onb-logo-drive {
  from {
    opacity: 0;
    transform: translateX(-36px) scale(0.88);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes sy-onb-dot-bounce {
  0% {
    opacity: 0;
    transform: translateY(-48px) scale(0.4);
  }
  55% {
    opacity: 1;
    transform: translateY(4px) scale(1.08);
  }
  75% {
    transform: translateY(-3px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ——— Invite installation PWA (navigateur mobile) ——— */
.sy-pwa-install {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: linear-gradient(180deg, #eef5ff 0%, #fff 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

.sy-pwa-install[hidden] {
  display: none !important;
}

.sy-pwa-install-inner {
  width: min(380px, 100%);
  text-align: center;
  animation: sy-onb-rise 0.55s ease both;
}

.sy-pwa-install-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin: 0 auto 1rem;
  box-shadow: 0 10px 28px rgba(0, 71, 171, 0.12);
}

.sy-pwa-install-logo--full {
  width: min(140px, 42vw);
  height: auto;
  border-radius: 0;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 71, 171, 0.12));
}

.sy-pwa-install-brand h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display, Outfit, sans-serif);
  font-size: 1.45rem;
  color: var(--sy-navy, #0a1c30);
}

.sy-pwa-install-brand p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #5a6a7c;
}

.sy-pwa-install-benefits {
  list-style: none;
  margin: 1.35rem 0 1.5rem;
  padding: 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e8edf3;
  box-shadow: var(--sy-shadow, 0 10px 30px rgba(10, 28, 48, 0.08));
  text-align: left;
}

.sy-pwa-install-benefits li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sy-navy, #0a1c30);
}

.sy-pwa-install-benefits i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(0, 71, 171, 0.1);
  color: #0047ab;
  flex-shrink: 0;
}

.sy-pwa-install-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.sy-pwa-install-ios {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(0, 71, 171, 0.08);
  border: 1px solid rgba(0, 71, 171, 0.15);
  font-size: 0.82rem;
  line-height: 1.5;
  color: #3d4f63;
  text-align: left;
}

.sy-pwa-install-ios strong {
  color: #0047ab;
}

.sy-onb-slide--panel.is-active .sy-onb-scene {
  animation: sy-onb-rise 0.6s ease both;
}

@media (min-width: 901px) {
  .sy-onboarding,
  .sy-pwa-install {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sy-onb-track,
  .sy-onb-splash-bg,
  .sy-onb-logo-hero,
  .sy-onb-speed-line,
  .sy-onb-dot-drop,
  .sy-onb-float,
  .sy-onb-chip,
  .sy-onb-illus-blob,
  .sy-onb-scene-blob,
  .sy-onb-illus-icon-lg {
    animation: none !important;
    transition: none !important;
  }

  .sy-onb-slide--splash.is-intro .sy-onb-logo-hero,
  .sy-onb-slide--splash.is-intro .sy-onb-speed-line,
  .sy-onb-slide--splash.is-intro .sy-onb-dot-drop {
    opacity: 1;
    transform: none;
  }
}
