/* =========================================================
   MAKI — EFFETS & INTERACTIONS (2026-11)
   Tout est désactivé si le visiteur a demandé « moins d'animations ».
   ========================================================= */

/* ---------- Transitions douces entre les pages (navigateurs récents) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: mk-fade-out .22s ease both; }
::view-transition-new(root) { animation: mk-fade-in .32s ease both; }
@keyframes mk-fade-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes mk-fade-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Barre de progression de lecture ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 1200;
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, #FFD84D, #FF9A45 55%, #244A9B);
  pointer-events: none;
}

/* ---------- En-tête qui se cache en descendant, revient en remontant ---------- */
.site-header { transition: top .3s ease, background .3s ease, box-shadow .3s ease, transform .45s cubic-bezier(.2,.8,.2,1); }
.site-header.is-hidden { transform: translate(-50%, -130%); }

/* ---------- Apparitions au défilement : plus fluides et en cascade ---------- */
.js-reveal .reveal {
  transform: translateY(28px) scale(.985);
  transition:
    opacity .75s cubic-bezier(.2,.7,.2,1) calc(var(--i, 0) * 90ms),
    transform .9s cubic-bezier(.2,.7,.2,1) calc(var(--i, 0) * 90ms);
}
.js-reveal .reveal.is-visible { transform: none; }

/* ---------- Entrée du hero (accueil) ---------- */
.hero-content > * { animation: mk-rise .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-content > *:nth-child(1) { animation-delay: .05s; }
.hero-content > *:nth-child(2) { animation-delay: .15s; }
.hero-content > *:nth-child(3) { animation-delay: .28s; }
.hero-content > *:nth-child(4) { animation-delay: .38s; }
.hero-content > *:nth-child(5) { animation-delay: .48s; }
.hero-content > *:nth-child(6) { animation-delay: .56s; }
.hero-content.reveal { opacity: 1 !important; transform: none !important; }
.hero-visual.reveal { transition-delay: .25s; }
@keyframes mk-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.hero-content h1 span {
  background-size: 200% 100%;
  animation: mk-gradient 6s ease-in-out infinite alternate;
}
@keyframes mk-gradient { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* Badge note Google dans le hero */
.hero-rating {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(36,74,155,.10);
  box-shadow: 0 10px 26px rgba(36,74,155,.10);
  color: var(--blue-dark);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.hero-rating:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(36,74,155,.16); }
.hero-rating-stars { color: #FFB300; letter-spacing: .08em; }
.hero-rating strong { font-weight: 900; }

/* Bananes du hero : parallaxe à la souris */
.hero-banana { transition: translate .6s cubic-bezier(.2,.7,.2,1); translate: var(--px, 0) var(--py, 0); }
.hero-photo { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.hero-card:hover .hero-photo { transform: scale(1.03); }

/* ---------- Boutons : reflet et effet magnétique ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn:active { transform: scale(.97); }
[data-magnetic] { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease; will-change: transform; }

/* ---------- Halo lumineux qui suit la souris sur les cartes ---------- */
.spotlight { --mx: 50%; --my: 50%; }
.spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255,191,87,.20), transparent 45%);
}
.spotlight:hover::after { opacity: 1; }
.service-card .service-badge { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.service-card:hover .service-badge { transform: translateY(-3px) rotate(-3deg); }

/* ---------- Bandeau de services qui défile ---------- */
.services-ticker {
  overflow: hidden;
  padding: 18px 0;
  background: #FFF8E6;
  border-bottom: 1px solid rgba(36,74,155,.08);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.services-ticker-track {
  display: flex;
  width: max-content;
  gap: 40px;
  animation: mk-marquee 38s linear infinite;
}
.services-ticker:hover .services-ticker-track { animation-play-state: paused; }
.services-ticker span {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap;
  font-size: clamp(1.2rem, 2.2vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--blue-dark);
}
.services-ticker span::after { content: "🍌"; font-size: .8em; }
.services-ticker span:nth-child(even) { -webkit-text-stroke: 1.5px var(--blue-dark); color: transparent; }
@keyframes mk-marquee { to { transform: translateX(-50%); } }

/* ---------- Avis Google ---------- */
.reviews-section { background: linear-gradient(180deg, #FFFDF8 0%, #F4F7FF 100%); overflow: hidden; }
.reviews-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.reviews-head h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 4.2rem);
  line-height: .95;
  letter-spacing: -.04em;
  font-weight: 900;
  color: var(--blue-dark);
}
.reviews-head .section-kicker { margin-bottom: 14px; }
.g-score {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(36,74,155,.12);
  border: 1px solid rgba(36,74,155,.08);
  text-decoration: none;
  color: var(--blue-dark);
  transition: transform .3s ease, box-shadow .3s ease;
}
.g-score:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 24px 50px rgba(36,74,155,.18); }
.g-score-value { font-size: 3.2rem; font-weight: 900; line-height: 1; letter-spacing: -.04em; }
.g-score-detail { display: flex; flex-direction: column; gap: 4px; font-weight: 700; color: var(--text-soft); }
.g-score-stars { color: #FFB300; font-size: 1.25rem; letter-spacing: .1em; }

.g-review {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  border: 1px solid rgba(36,74,155,.08);
  box-shadow: 0 14px 36px rgba(36,74,155,.08);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
  height: 100%;
}
.g-review:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(36,74,155,.14); }
.g-review-top { display: flex; align-items: center; gap: 12px; }
.g-review figcaption { display: flex; flex-direction: column; line-height: 1.25; }
.g-review figcaption strong { color: var(--blue-dark); font-weight: 800; }
.g-review figcaption span { color: var(--text-soft); font-size: .88rem; }
.g-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-weight: 900;
  color: #fff;
}
.g-avatar-0 { background: #244A9B; }
.g-avatar-1 { background: #F48F30; }
.g-avatar-2 { background: #2E8B6E; }
.g-avatar-3 { background: #7A4FC9; }
.g-avatar-4 { background: #D9534F; }
.g-avatar-5 { background: #1E8FBF; }
.g-review-stars { color: #FFB300; letter-spacing: .1em; }
.g-review blockquote { margin: 0; color: #4C5568; font-size: 1rem; line-height: 1.6; flex: 1; }
.g-review-meta { font-size: .82rem; color: #8A92A6; font-weight: 600; }

.g-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.g-marquee { display: grid; gap: 22px; }
.g-marquee-row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.g-marquee-track {
  display: flex;
  gap: 22px;
  width: max-content;
  padding: 10px 0 14px;
  animation: mk-marquee 70s linear infinite;
}
.g-marquee-row.is-reverse .g-marquee-track { animation-direction: reverse; animation-duration: 80s; }
.g-marquee-row:hover .g-marquee-track,
.g-marquee-row:focus-within .g-marquee-track { animation-play-state: paused; }
.g-marquee .g-review { width: 380px; height: auto; }

.reviews-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 40px; }

@media (max-width: 980px) {
  .g-grid { grid-template-columns: 1fr; }
  .g-marquee .g-review { width: 300px; }
  .g-score-value { font-size: 2.6rem; }
}

/* ---------- Compteurs ---------- */
[data-count-to] { font-variant-numeric: tabular-nums; }

/* ---------- Accessibilité : moins d'animations ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .g-marquee-row, .services-ticker { -webkit-mask-image: none; mask-image: none; overflow-x: auto; }
  .g-marquee-track .g-review[aria-hidden="true"], .services-ticker-track span[aria-hidden="true"] { display: none; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}
.spotlight { position: relative; }

/* =========================================================
   HERO « MAKI À VÉLO » (accueil)
   ========================================================= */
.hero-ride {
  --road: 130px;
  --rider: clamp(230px, 22vw, 330px);
  position: relative;
  overflow: hidden;
  min-height: clamp(740px, 100svh, 940px);
  padding: 128px 0 calc(var(--road) + 150px);
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF6E0 55%, #FFE8B8 100%);
  isolation: isolate;
}
.ride-stage { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.ride-inner {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 40px;
  align-items: start;
}
.hero-ride .hero-content { position: relative; z-index: 2; max-width: 720px; }
.hero-ride .hero-content h1 { font-size: clamp(2.8rem, 5.4vw, 5.6rem); margin-bottom: 18px; }
.hero-ride .hero-text { font-size: 1.12rem; max-width: 600px; margin-bottom: 24px; }
.hero-ride .hero-actions { align-items: center; margin-bottom: 0; }
.hero-ride .hero-rating { margin: 0; }

/* Décor */
.ride-sun {
  position: absolute;
  right: 12%;
  top: 150px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFE15B 0%, #FFBF57 55%, rgba(255,154,69,0) 72%);
}
.ride-clouds { position: absolute; top: 210px; left: 0; width: 200%; height: 90px; animation: mk-loop 70s linear infinite; }
.ride-clouds span { position: absolute; height: 38px; width: 170px; border-radius: 999px; background: #fff; opacity: .9; }
.ride-clouds span:nth-child(1) { left: 28%; top: 0; }
.ride-clouds span:nth-child(2) { left: 42%; top: 46px; width: 120px; height: 28px; opacity: .75; }
.ride-clouds span:nth-child(3) { left: 78%; top: 0; }
.ride-clouds span:nth-child(4) { left: 92%; top: 46px; width: 120px; height: 28px; opacity: .75; }
.ride-hills { position: absolute; left: 0; width: 200%; display: block; }
.ride-hills-far { bottom: calc(var(--road) + 10px); height: 260px; fill: #244A9B; opacity: .16; animation: mk-loop 45s linear infinite; }
.ride-hills-near { bottom: calc(var(--road) - 30px); height: 190px; fill: #F48F30; opacity: .92; animation: mk-loop 18s linear infinite; }
@keyframes mk-loop { to { transform: translateX(-50%); } }

.ride-road { position: absolute; left: 0; right: 0; bottom: 0; height: var(--road); background: #1D3E82; border-top: 8px solid #FFD84D; }
.ride-dashes {
  position: absolute;
  left: 0;
  right: 0;
  top: 58px;
  height: 8px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.7) 0 70px, transparent 70px 140px);
  animation: mk-dash .55s linear infinite;
}
@keyframes mk-dash { to { background-position: -140px 0; } }

.ride-sign {
  position: absolute;
  left: 100%;
  bottom: calc(var(--road) + 2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: mk-pass 12s linear infinite;
}
.ride-sign span {
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 900;
  font-size: .95rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(29,62,130,.15);
}
.ride-sign::after { content: ""; width: 6px; height: 60px; background: currentColor; }
.ride-sign.is-white { color: #fff; } .ride-sign.is-white span { background: #fff; color: #1D3E82; }
.ride-sign.is-yellow { color: #FFD84D; } .ride-sign.is-yellow span { background: #FFD84D; color: #1D3E82; }
.ride-sign.is-navy { color: #1D3E82; } .ride-sign.is-navy span { background: #1D3E82; color: #fff; }
.ride-sign-2 { animation-delay: -4s; }
.ride-sign-3 { animation-delay: -8s; }
@keyframes mk-pass { to { transform: translateX(calc(-100vw - 300px)); } }

.ride-banana { position: absolute; left: 100%; width: 50px; height: auto; animation: mk-fly 7s linear infinite; }
.ride-banana-1 { bottom: calc(var(--road) + 150px); }
.ride-banana-2 { bottom: calc(var(--road) + 230px); width: 42px; animation-delay: -2.4s; }
.ride-banana-3 { bottom: calc(var(--road) + 90px); width: 46px; animation-delay: -4.8s; }
@keyframes mk-fly { to { transform: translateX(calc(-100vw - 200px)) rotate(-280deg); } }

/* Le singe */
.ride-rider {
  position: absolute;
  right: 7%;
  bottom: calc(var(--road) - 16px);
  width: var(--rider);
  animation: mk-bob .4s ease-in-out infinite;
}
.ride-rider-svg { display: block; width: 100%; height: auto; }
.ride-wheel, .ride-crank { transform-box: fill-box; transform-origin: center; }
.ride-wheel { animation: mk-spin .5s linear infinite; }
.ride-crank { animation: mk-spin .8s linear infinite; }
@keyframes mk-spin { to { transform: rotate(360deg); } }
@keyframes mk-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Bouton « mode jeu » + compteur */
.ride-game {
  position: absolute;
  z-index: 3;
  right: calc(7% + var(--rider) / 2);
  transform: translateX(50%);
  width: max-content;
  bottom: calc(var(--road) + var(--rider) * 1.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ride-hud { position: absolute; top: 128px; right: 24px; z-index: 3; display: flex; gap: 10px; }
.ride-hud span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(29,62,130,.9);
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ride-hud img { width: 24px; height: auto; }
.ride-play { white-space: nowrap; gap: 12px; padding: 0 28px 0 10px; min-height: 62px; font-size: 1.1rem; animation: mk-pulse 2.2s ease-in-out infinite; }
.ride-play-icon { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; background: #1D3E82; align-items: center; justify-content: center; }
.ride-play-note { color: var(--text-soft); font-size: .92rem; font-weight: 600; }
.ride-soon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px 8px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  border: 2px dashed rgba(244,143,48,.7);
  color: var(--blue-dark);
  font-weight: 800;
}
.ride-soon .ride-play-icon { width: 34px; height: 34px; background: #F48F30; }
@keyframes mk-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(244,143,48,.5); } 50% { box-shadow: 0 0 0 16px rgba(244,143,48,0); } }

/* Mobile : le texte d'abord, la scène en bas */
@media (max-width: 980px) {
  .hero-ride { --road: 90px; min-height: 0; padding: 116px 0 0; display: flex; flex-direction: column; }
  .ride-inner { order: 1; }
  .ride-stage { order: 2; }
  .ride-inner { grid-template-columns: 1fr; gap: 26px; }
  .hero-ride .hero-content h1 { font-size: clamp(2.6rem, 11vw, 3.6rem); }
  .hero-ride .hero-actions .btn { flex: 1 1 100%; }
  .ride-game { position: relative; z-index: 2; width: auto; right: auto; bottom: auto; transform: none; }
  .ride-hud { display: none; }
  .ride-stage { position: relative; inset: auto; height: 380px; margin-top: 10px; }
  .ride-sun { top: 10px; right: 6%; width: 150px; height: 150px; }
  .ride-clouds { top: 30px; }
  .ride-hills-far { height: 150px; }
  .ride-hills-near { height: 110px; bottom: calc(var(--road) - 20px); }
  .ride-dashes { top: 36px; }
  .ride-rider { right: auto; left: 50%; margin-left: -110px; width: 220px; bottom: calc(var(--road) - 10px); }
  .ride-sign span { font-size: .75rem; padding: 7px 10px; }
  .ride-sign::after { height: 40px; width: 4px; }
  .ride-banana-1 { bottom: calc(var(--road) + 110px); }
  .ride-banana-2 { bottom: calc(var(--road) + 170px); }
  .ride-banana-3 { bottom: calc(var(--road) + 60px); }
}
