/* SUPER WEWA — couche moderne : profondeur, mouvement et finitions.
   Chargée en dernier ; elle complète style.css, ux.css, motion.css et moto-studio.css. */
:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(.5rem, 1.3vw, 1.25rem);
  --radius-xl: clamp(1.25rem, 2.2vw, 2rem);
  --glow: #b48cff;
  --wa: #128c4b;
}

main { overflow-x: clip; }
::selection { background: #c1a4ff; color: #1b1026; }
html { scrollbar-color: #5d4878 #101014; }

/* Progression de lecture */
.scroll-progress { position: fixed; inset: 0 0 auto; z-index: 45; height: 3px; pointer-events: none; }
.scroll-progress span {
  display: block;
  height: 100%;
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #8451db, #c1a4ff 55%, #f3eaff);
  box-shadow: 0 0 12px #b48cff99;
}

/* En-tête : barre qui devient une pilule flottante au défilement */
.site-header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  box-shadow: none !important;
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid transparent;
  border-bottom-color: #ffffff14;
  background: #131217e0;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: inset .5s var(--ease-out), border-radius .5s var(--ease-out), background-color .3s, box-shadow .5s, border-color .3s;
}
.site-header.scrolled::before {
  inset: .45rem max(.6rem, calc((100% - 92rem) / 2));
  border-color: #ffffff1f;
  border-radius: 999px;
  background: #19161fd9;
  box-shadow: 0 18px 50px -12px #000a, inset 0 1px 0 #ffffff12;
}
.site-header .contact { transition: background-color .2s, transform .3s var(--ease-out), box-shadow .3s; }
.site-header .contact:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px #c8a8ee; }

#nav { position: relative; gap: .2rem !important; }
#nav a { z-index: 1; padding-inline: .95rem; border-radius: 999px; }
#nav a[aria-current]::after { content: none; }
.nav-indicator {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 0;
  width: var(--w, 0);
  height: 2.35rem;
  translate: var(--x, 0) -50%;
  border: 1px solid #ffffff1c;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff17, #ffffff08);
  opacity: 0;
  pointer-events: none;
  transition: translate .45s var(--ease-out), width .45s var(--ease-out), opacity .3s;
}
.nav-indicator.on { opacity: 1; }

/* Héros : aurore lumineuse, grille, titre irisé */
.hero { position: relative; isolation: isolate; }
.hero-grid { position: relative; z-index: 1; }
.hero-aurora {
  position: absolute;
  inset: -12% -6% -4%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  translate: calc(var(--px, 0) * -14px) calc(var(--py, 0) * -14px);
  transition: translate 1s var(--ease-out);
}
.hero-aurora i {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .6;
  animation: aurora-drift 18s ease-in-out infinite alternate;
}
.hero-aurora i:nth-child(1) { width: 46vw; height: 46vw; left: 46%; top: 2%; background: radial-gradient(circle, #6d33d6 0, transparent 66%); }
.hero-aurora i:nth-child(2) { width: 34vw; height: 34vw; left: -10%; top: 38%; background: radial-gradient(circle, #3f2477 0, transparent 66%); animation-duration: 23s; animation-delay: -6s; }
.hero-aurora i:nth-child(3) { width: 28vw; height: 28vw; left: 72%; top: 52%; background: radial-gradient(circle, #c1a4ff4d 0, transparent 66%); animation-duration: 27s; animation-delay: -12s; }
.hero-aurora::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#ffffff09 1px, transparent 1px), linear-gradient(90deg, #ffffff09 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 62% 42%, #000 0, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 62% 42%, #000 0, transparent 75%);
}
@keyframes aurora-drift {
  to { transform: translate3d(5%, -7%, 0) scale(1.15); }
}

.hero-copy h1 em {
  background: linear-gradient(100deg, #a77bff 0%, #efe4ff 38%, #c1a4ff 55%, #8d5cf0 100%);
  background-size: 230% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-sheen 7s ease-in-out infinite;
}
@keyframes title-sheen {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0 0; }
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.7rem 0 0;
  padding: 0;
  list-style: none;
  animation: rise-in 630ms 320ms var(--ease-out) both;
}
.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .85rem;
  border: 1px solid #ffffff1f;
  border-radius: 999px;
  background: #ffffff0a;
  color: #ded7e8;
  font-size: .82rem;
  line-height: 1.3;
  backdrop-filter: blur(6px);
}
.hero-points li::before {
  content: '';
  flex: none;
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: #c1a4ff;
  box-shadow: 0 0 0 3px #c1a4ff2e;
}

.hero .moto-slot { position: relative; }
.hero .moto-slot::before {
  content: '';
  position: absolute;
  inset: 18% 8% 14%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(ellipse, #8451db66, transparent 70%);
  filter: blur(36px);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .hero .moto-slot {
    transform: perspective(1400px) rotateY(calc(var(--px, 0) * -3.5deg)) rotateX(calc(var(--py, 0) * 2.5deg));
    transition: transform .9s var(--ease-out);
  }
}

/* Boutons : reflet au survol et ombre colorée */
.button { position: relative; overflow: hidden; isolation: isolate; transition: background-color .2s, transform .3s var(--ease-out), box-shadow .3s; }
.button::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, #ffffff66 50%, transparent 70%);
  translate: -130% 0;
  transition: translate .8s var(--ease-out);
  pointer-events: none;
}
.button:hover::before { translate: 130% 0; }
.button.primary { box-shadow: 0 12px 30px -14px #b48cffcc; }
.button.primary:hover { box-shadow: 0 18px 38px -14px #b48cff; }
.button:active { transform: translateY(0) scale(.98); }

/* Bandeau défilant */
.marquee {
  position: relative;
  z-index: 2;
  margin: clamp(1rem, 2.5vw, 1.8rem) -2rem;
  padding: clamp(.7rem, 1.2vw, .95rem) 0;
  overflow: hidden;
  rotate: -1.4deg;
  background: linear-gradient(90deg, #b48cff, #dccaff 50%, #b48cff);
  color: #1b1026;
  box-shadow: 0 20px 40px -22px #b48cff;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.4vw, 2rem);
  width: max-content;
  padding-left: clamp(1.1rem, 2.4vw, 2rem);
  animation: marquee 34s linear infinite;
}
.marquee span {
  font: 700 clamp(1.35rem, 2.3vw, 2rem)/1 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee i { font-style: normal; font-size: clamp(.9rem, 1.4vw, 1.2rem); color: #6b3fc0; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Sections claires présentées comme des feuillets arrondis */
.services, .manifesto {
  margin-inline: var(--gutter);
  border-radius: var(--radius-xl);
}
.services { margin-bottom: var(--gutter); }
.app-section {
  margin-inline: var(--gutter);
  border: 1px solid #ffffff12;
  border-radius: var(--radius-xl);
}
.manifesto {
  margin-block: var(--gutter);
  background: radial-gradient(ellipse 60% 70% at 0% 0%, #e1d2f7, transparent 60%), radial-gradient(ellipse 50% 60% at 100% 100%, #e6dcf3, transparent 60%), #eeeaf3;
}

/* Services : sélecteur à pastille glissante */
.services .service-tabs { --tab-pad: .35rem; --tab-gap: .4rem; padding: var(--tab-pad); gap: var(--tab-gap); }
@supports selector(:has(*)) {
  .services .service-tabs { position: relative; isolation: isolate; }
  .services .service-tabs::before {
    content: '';
    position: absolute;
    top: var(--tab-pad);
    bottom: var(--tab-pad);
    left: var(--tab-pad);
    z-index: -1;
    width: calc((100% - 2 * var(--tab-pad) - 2 * var(--tab-gap)) / 3);
    border-radius: .68rem;
    background: #34283e;
    box-shadow: 0 10px 24px -10px #34283ecc;
    transition: translate .55s var(--ease-out);
  }
  .services .service-tabs:has(#tab-colis[aria-selected="true"])::before { translate: calc(100% + var(--tab-gap)) 0; }
  .services .service-tabs:has(#tab-pro[aria-selected="true"])::before { translate: calc(200% + 2 * var(--tab-gap)) 0; }
  .services .service-tabs button[aria-selected="true"],
  .services .service-tabs button[aria-selected="true"]:hover { background: transparent; box-shadow: none; }
  .services .service-tabs button { transition: color .3s, background-color .2s; }
}
.services .service-tabs button:not([aria-selected="true"]):hover { background: #f8f5fa; }
.services .service-panel { position: relative; transition: box-shadow .4s, border-color .4s; }
.services .service-panel > * { position: relative; z-index: 1; }
.services .service-panel:hover { border-color: #bfb1ca; box-shadow: 0 24px 50px -30px #3b2a5280; }
.route-rider .rider-dot { fill: var(--service-accent); stroke: #fff; stroke-width: 2.5; }
.route-rider .rider-halo { fill: var(--service-accent); opacity: .2; }

/* Halo qui suit le pointeur */
.spotlight { position: relative; }
.spotlight::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), #a77bff24, transparent 45%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.spotlight:hover::after { opacity: 1; }

/* Application : téléphones en apesanteur */
.phone-front { animation: phone-float 6.5s ease-in-out infinite; }
.phone-back { animation: phone-float 7.5s ease-in-out -3s infinite; }
@keyframes phone-float {
  50% { translate: 0 -14px; }
}
.app-switch button { transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease-out); }
.app-switch button:hover { border-color: #c1a4ff; }
.app-switch button.selected { box-shadow: 0 10px 24px -12px #c1a4ff; }

/* Engagements : cartes numérotées, introduction fixe sur grand écran */
.commitments { counter-reset: commitment; }
.commitments article {
  counter-increment: commitment;
  margin-bottom: .9rem;
  position: relative;
  padding: 1.6rem 1.7rem 1.6rem 4.9rem !important;
  border: 1px solid #2a1c3a14;
  border-radius: 1.25rem;
  background: #ffffffa8;
  box-shadow: 0 1px 0 #ffffff inset;
  transition: transform .4s var(--ease-out), box-shadow .4s, background-color .3s;
}
.commitments article::before {
  content: counter(commitment, decimal-leading-zero);
  position: absolute;
  top: 1.45rem;
  left: 1.5rem;
  font: 700 2.3rem/1 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif;
  color: transparent;
  -webkit-text-stroke: 1.2px #8051b8;
}
.commitments article:hover { transform: translateY(-4px); background: #fff; box-shadow: 0 26px 44px -28px #4a2a7a80; }
.commitments article > * { position: relative; z-index: 1; }
.commitments article p { max-width: none; }
@media (min-width: 901px) {
  .manifesto-intro { position: sticky; top: 7rem; align-self: start; }
}

/* Motards : étapes reliées par une ligne qui se remplit */
.driver ol { position: relative; }
.driver ol::before,
.driver ol::after {
  content: '';
  position: absolute;
  top: 1.6rem;
  bottom: 1.6rem;
  left: calc(1.2rem - .5px);
  width: 1px;
  background: #ffffff24;
}
.driver ol::after {
  background: linear-gradient(#c1a4ff, #8451db);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.4s var(--ease-out) .3s;
}
.driver ol.is-in::after { transform: none; }
.driver li { position: relative; display: flex; align-items: center; gap: 1rem; border-bottom: 0 !important; }
.driver li span {
  position: relative;
  z-index: 1;
  display: grid;
  flex: none;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  margin: 0 !important;
  border: 1px solid #c1a4ff66;
  border-radius: 50%;
  background: #18141f;
  color: #e7dbff;
  font-weight: 700;
  transition: background-color .4s, color .4s, box-shadow .4s;
}
.driver ol.is-in li span { background: #c1a4ff; color: #1b1026; box-shadow: 0 0 0 5px #c1a4ff1f; }
.driver ol.is-in li:nth-child(2) span { transition-delay: .55s; }
.driver ol.is-in li:nth-child(3) span { transition-delay: 1.1s; }
.driver-photo { box-shadow: 0 40px 80px -40px #8451db99; }
.driver-photo img { transition: transform 1.6s var(--ease-out); }
.driver-photo-stack.reveal:not(.is-in) .driver-photo img { transform: scale(1.12); }
.driver-photo:hover img { transform: scale(1.04); }

/* Collectif : photos qui se dévoilent */
.photo-open { border-radius: 1.25rem; }
.field-grid figure.reveal .photo-open { clip-path: inset(10% 7% 10% 7% round 1.25rem); transition: clip-path 1.2s var(--ease-out) var(--d, 0ms); }
.field-grid figure.reveal.is-in .photo-open { clip-path: inset(0 round 1.25rem); }
.photo-open img { transition: transform .9s var(--ease-out); }
.photo-open:hover img { transform: scale(1.05); }
.enlarge { transition: transform .4s var(--ease-out), background-color .3s; }
.photo-open:hover .enlarge { transform: rotate(45deg) scale(1.08); }

/* Questions : ouverture fluide et icône animée */
.questions summary { padding-right: 3.5rem !important; transition: color .25s; }
.questions summary:hover { color: #e4d3ff; }
.questions summary::after {
  content: '+' !important;
  display: grid;
  place-items: center;
  top: 50% !important;
  width: 2.1rem;
  height: 2.1rem;
  translate: 0 -50%;
  border: 1px solid #ffffff2b;
  border-radius: 50%;
  font-size: 1.25rem !important;
  line-height: 1;
  transition: rotate .4s var(--ease-out), background-color .3s, color .3s, border-color .3s;
}
.questions details[open] summary::after { rotate: 45deg; background: #c1a4ff; border-color: #c1a4ff; color: #1b1026; }
@supports (interpolate-size: allow-keywords) {
  .questions { interpolate-size: allow-keywords; }
  .questions details::details-content {
    height: 0;
    overflow: clip;
    transition: height .45s var(--ease-out), content-visibility .45s allow-discrete;
  }
  .questions details[open]::details-content { height: auto; }
}

/* Appel final : dégradé vivant et flèche en mouvement */
.closing {
  background: linear-gradient(120deg, #b48cff, #dccaff 35%, #a77bff 65%, #c8b0ff);
  background-size: 260% 260%;
  animation: closing-wash 14s ease-in-out infinite alternate;
  box-shadow: 0 40px 90px -50px #b48cff;
}
.closing-arrow { animation: arrow-nudge 3.2s var(--ease-out) infinite; }
@keyframes closing-wash {
  to { background-position: 100% 100%; }
}
@keyframes arrow-nudge {
  0%, 100% { translate: 0 0; }
  50% { translate: 3% -4%; }
}

/* Bouton WhatsApp flottant : rond, compact, avec une onde discrète */
body > .wa-contact {
  width: 3.6rem;
  height: 3.6rem;
  min-height: 0;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 50%;
  background: var(--wa);
  font-size: 0;
  box-shadow: 0 14px 30px -10px #0b6b38, inset 0 0 0 1px #ffffff38;
  transition: transform .3s var(--ease-out), background-color .2s;
}
body > .wa-contact svg { width: 1.7rem; height: 1.7rem; }
body > .wa-contact::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid #25d366;
  border-radius: inherit;
  animation: wa-ping 3s var(--ease-out) infinite;
  pointer-events: none;
}
body > .wa-contact::after {
  content: 'WhatsApp';
  position: absolute;
  right: calc(100% + .7rem);
  padding: .45rem .75rem;
  border-radius: .6rem;
  background: #1d1925;
  color: #fff;
  font: 600 .85rem/1.2 'DM Sans', system-ui, sans-serif;
  white-space: nowrap;
  opacity: 0;
  translate: 6px 0;
  transition: opacity .25s, translate .25s var(--ease-out);
  pointer-events: none;
}
body > .wa-contact:hover, body > .wa-contact:focus-visible { transform: translateY(-3px) scale(1.04); background: #0f7a41; }
body > .wa-contact:hover::after, body > .wa-contact:focus-visible::after { opacity: 1; translate: 0 0; }
@keyframes wa-ping {
  0% { opacity: .75; scale: 1; }
  70%, 100% { opacity: 0; scale: 1.55; }
}

/* Mobile : barre d'actions flottante qui intègre WhatsApp */
@media (max-width: 700px) {
  body > .wa-contact { display: none; }
  .mobile-dock {
    left: .6rem;
    right: .6rem;
    bottom: calc(.6rem + env(safe-area-inset-bottom, 0px));
    gap: .5rem;
    padding: .45rem .45rem .45rem 1.1rem;
    border: 1px solid #ffffff1f;
    border-radius: 1.4rem;
    box-shadow: 0 22px 44px -14px #000d;
    transform: translateY(calc(100% + 2rem));
    transition: transform .5s var(--ease-out), visibility 0s .5s;
  }
  .past-hero .mobile-dock { transition: transform .5s var(--ease-out), visibility 0s; }
  .mobile-dock > .dock-wa {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-left: auto;
    border-radius: 50%;
    background: var(--wa);
    color: #fff;
  }
  .mobile-dock > button { border-radius: 1rem; }
  .hero-points { gap: .4rem; margin-top: 1.3rem; }
  .hero-points li { font-size: .78rem; padding: .4rem .75rem; }
  .services .service-tabs { --tab-pad: .24rem; --tab-gap: .15rem; }
  .commitments article { padding: 1.3rem 1.3rem 1.4rem !important; }
  .commitments article::before { position: static; display: block; margin-bottom: .55rem; font-size: 2rem; }
  .marquee { rotate: -2deg; }
}

/* Boîtes de dialogue : ouverture en douceur */
@media (prefers-reduced-motion: no-preference) {
  #contact-dialog[open], #info-dialog[open], #photo-dialog[open], #moto-dialog[open] { animation: dialog-in .45s var(--ease-out); }
  #menu-dialog[open] { animation: menu-in .5s var(--ease-out); }
  #menu-dialog[open] nav a { animation: rise-in .55s var(--ease-out) both; }
  #menu-dialog[open] nav a:nth-child(2) { animation-delay: 40ms; }
  #menu-dialog[open] nav a:nth-child(3) { animation-delay: 80ms; }
  #menu-dialog[open] nav a:nth-child(4) { animation-delay: 120ms; }
  #menu-dialog[open] nav a:nth-child(5) { animation-delay: 160ms; }
  #menu-dialog[open] nav a:nth-child(6) { animation-delay: 200ms; }
  dialog[open]::backdrop { animation: backdrop-in .35s ease; }
}
@keyframes dialog-in {
  from { opacity: 0; translate: 0 22px; scale: .97; }
}
@keyframes menu-in {
  from { opacity: 0; translate: 28px 0; }
}
@keyframes backdrop-in {
  from { opacity: 0; }
}

/* Apparitions au défilement (classes posées par modern.js) */
.reveal { opacity: 0; }
.reveal.is-in { animation: reveal-up .9s var(--ease-out) var(--d, 0ms) both; }
@keyframes reveal-up {
  from { opacity: 0; translate: 0 30px; }
  to { opacity: 1; translate: none; }
}

footer { position: relative; }
footer::before {
  content: '';
  display: block;
  height: 1px;
  margin-bottom: 2.2rem;
  background: linear-gradient(90deg, transparent, #c1a4ff66, transparent);
}

/* Mouvement réduit : tout reste visible et immobile */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; }
  .route-rider { display: none; }
  .marquee-track { animation: none; }
  .driver ol::after { transform: none; }
  .hero .moto-slot, .hero-aurora { transform: none !important; translate: none !important; }
  .field-grid figure.reveal .photo-open { clip-path: none; }
}
@media (forced-colors: active) {
  .hero-copy h1 em { background: none; color: CanvasText; }
  .scroll-progress, .hero-aurora, .marquee { display: none; }
}

/* Champ piège anti-robots : hors écran, ignoré par les lecteurs d'écran et la tabulation */
.form-check { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
