/* Vitrine DJOLIMA — mouvement.
   Un lever de ville au chargement (immeubles, soleil ou lune, fenêtres), une lagune vivante en continu
   (pirogue, reflets, palmiers, nuages, étoiles), puis des apparitions au défilement.
   Tout est désactivé si le visiteur demande moins d'animations. */

/* ---------- En-tête : se fige en haut avec un fond au défilement ---------- */
.top:not(.solid) { position: fixed; transition: background .35s ease, box-shadow .35s ease, backdrop-filter .35s ease; }
.top.scrolled { background: rgba(8, 20, 40, .82); backdrop-filter: blur(12px); box-shadow: 0 10px 30px -20px rgba(0,0,0,.6); }
.top.scrolled nav { height: 64px; }
.top nav { transition: height .35s ease; }

/* ---------- Héros : le lever de la ville ---------- */
.hero .scene svg * { transform-box: fill-box; }
.js .hero .city .bld { transform-origin: 50% 100%; transform: scaleY(0); animation: ym-rise .9s cubic-bezier(.2,.8,.2,1) forwards; }
.js .hero .city .bld:nth-child(1)  { animation-delay: .05s } .js .hero .city .bld:nth-child(2)  { animation-delay: .12s }
.js .hero .city .bld:nth-child(3)  { animation-delay: .19s } .js .hero .city .bld:nth-child(4)  { animation-delay: .26s }
.js .hero .city .bld:nth-child(5)  { animation-delay: .33s } .js .hero .city .bld:nth-child(6)  { animation-delay: .40s }
.js .hero .city .bld:nth-child(7)  { animation-delay: .30s } .js .hero .city .bld:nth-child(8)  { animation-delay: .22s }
.js .hero .city .bld:nth-child(9)  { animation-delay: .36s } .js .hero .city .bld:nth-child(10) { animation-delay: .44s }
.js .hero .city .bld:nth-child(11) { animation-delay: .50s } .js .hero .city .bld:nth-child(12) { animation-delay: .58s }
.js .hero .city .bld:nth-child(13) { animation-delay: .64s } .js .hero .city .bld:nth-child(14) { animation-delay: .48s }
.js .hero .city .bld:nth-child(15) { animation-delay: .56s } .js .hero .city .bld:nth-child(16) { animation-delay: .62s }
.js .hero .city .bld:nth-child(17) { animation-delay: .70s }
@keyframes ym-rise { to { transform: scaleY(1); } }

/* Fenêtres : s'allument une à une la nuit, apparaissent après les immeubles le jour */
.js .hero .win { opacity: 0; animation: ym-win-on .5s ease forwards; animation-delay: calc(1s + var(--d, 0s)); }
@keyframes ym-win-on { to { opacity: var(--o, .8); } }
.js .hero .win.blink { animation: ym-win-on .5s ease forwards, ym-win-blink 7s steps(1) infinite; animation-delay: calc(1s + var(--d, 0s)), calc(3s + var(--d, 0s)); }
@keyframes ym-win-blink { 0%, 86% { opacity: var(--o, .8); } 87%, 94% { opacity: .08; } 95%, 100% { opacity: var(--o, .8); } }

/* Soleil / lune : se lève, puis respire doucement */
.js .hero .orb > :first-child { animation: ym-glow 5s ease-in-out 1.6s infinite alternate; transform-origin: center; }
.js .hero .orb { animation: ym-orb-up 1.6s cubic-bezier(.2,.8,.2,1) .3s both; }
@keyframes ym-orb-up { from { transform: translateY(120px); } to { transform: translateY(0); } }
@keyframes ym-glow { from { transform: scale(1); opacity: .9; } to { transform: scale(1.12); opacity: 1; } }

/* Étoiles qui scintillent, étoile filante */
.hero .star { animation: ym-twinkle var(--t, 3s) ease-in-out var(--d, 0s) infinite alternate; }
@keyframes ym-twinkle { from { opacity: var(--o, .7); } to { opacity: .12; } }
.hero .shooting { animation: ym-shoot 9s ease-in 4s infinite; transform: translate(300px, 40px); }
@keyframes ym-shoot { 0% { opacity: 0; transform: translate(300px, 40px); } 2% { opacity: .9; } 8% { opacity: 0; transform: translate(560px, 130px); } 100% { opacity: 0; transform: translate(560px, 130px); } }

/* Nuages et oiseaux le jour */
.hero .cloud { animation: ym-drift 60s linear infinite; }
.hero .cloud.c2 { animation-duration: 85s; animation-delay: -30s; }
@keyframes ym-drift { from { transform: translateX(-260px); } to { transform: translateX(1500px); } }
.hero .bird { animation: ym-fly 26s linear infinite, ym-flap .5s ease-in-out infinite alternate; }
.hero .bird.b1 { animation-delay: 0s, 0s; } .hero .bird.b2 { animation-delay: -1.2s, .15s; } .hero .bird.b3 { animation-delay: -2.1s, .3s; }
@keyframes ym-fly { from { translate: -60px 140px; } to { translate: 1500px 40px; } }
@keyframes ym-flap { from { scale: 1 1; } to { scale: 1 .55; } }

/* Lagune : pirogue qui traverse, reflets qui ondulent */
.hero .pirogue { animation: ym-row 48s linear infinite; }
.hero .pirogue-hull { fill: #050D1F; } .hero .pirogue-mast, .hero .pirogue-man { stroke: #050D1F; } .hero .pirogue-sail { fill: #C8235A; }
html[data-time="day"] .hero .pirogue-hull { fill: #0D2F66; } html[data-time="day"] .hero .pirogue-mast, html[data-time="day"] .hero .pirogue-man { stroke: #0D2F66; }
@keyframes ym-row { 0% { transform: translate(1480px, 455px); } 100% { transform: translate(-160px, 470px); } }
.hero .ripple { transform-origin: 50% 50%; animation: ym-ripple 3.2s ease-in-out var(--d, 0s) infinite alternate; }
@keyframes ym-ripple { from { transform: scaleX(1); } to { transform: scaleX(.72) translateX(6px); } }

/* Palmiers : la brise */
.hero .palm-g { transform-origin: 50% 100%; animation: ym-sway 6s ease-in-out infinite alternate; }
.hero .palm-g:nth-of-type(2n) { animation-duration: 7.5s; animation-delay: -2s; }
@keyframes ym-sway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.4deg); } }

/* Titre : les mots montent l'un après l'autre */
.js .hero h1 .w { display: inline-block; opacity: 0; transform: translateY(.45em); animation: ym-word .7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(.15s + var(--i) * .08s); }
@keyframes ym-word { to { opacity: 1; transform: none; } }
.js .hero .lede, .js .hero .modes, .js .hero .ctas, .js .hero .when { opacity: 0; transform: translateY(14px); animation: ym-word .7s cubic-bezier(.2,.8,.2,1) forwards; }
.js .hero .lede { animation-delay: .55s } .js .hero .modes { animation-delay: .7s } .js .hero .ctas { animation-delay: .82s } .js .hero .when { animation-delay: .95s }
.swapping [data-mode-text] { transform: translateY(8px); transition: opacity .22s ease, transform .22s ease; }

/* Sélecteur de durée : la pastille glisse d'un choix à l'autre */
.modes { position: relative; }
.modes .pill { position: absolute; top: 5px; bottom: 5px; border-radius: 12px; background: var(--gold); transition: left .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1); z-index: 0; }
.modes.has-pill button { position: relative; z-index: 1; transition: color .25s ease; }
.modes.has-pill button[aria-pressed="true"] { background: transparent; }

/* ---------- Apparitions au défilement ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal="left"] { transform: translateX(-36px); }
.js [data-reveal="right"] { transform: translateX(36px); }
.js [data-reveal="zoom"] { transform: scale(.94); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* Étapes : le chiffre se dessine, un trait relie les étapes */
.steps li::before { transition: transform .6s cubic-bezier(.2,.8,.2,1) .2s, color .6s ease; }
.js .steps li:not(.in)::before { transform: scale(.3) rotate(-20deg); }
.steps li::after { content: ""; position: absolute; top: 22px; left: 52px; right: -28px; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); transform-origin: left; transform: scaleX(0); transition: transform 1s ease .5s; }
.steps li.in::after { transform: scaleX(1); }
.steps li:last-child::after { display: none; }
@media (max-width: 820px) { .steps li::after { display: none; } }

/* Téléphones : flottent doucement */
.phones .phone { animation: ym-float 6s ease-in-out infinite; }
.phones .phone.offset { animation-name: ym-float-offset; animation-delay: -3s; }
@keyframes ym-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes ym-float-offset { 0%, 100% { translate: 0 0; } 50% { translate: 0 -16px; } }
.phone { transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s ease; }
.phones:hover .phone { box-shadow: 0 40px 70px -30px rgba(8,20,40,.6); }

/* Mosaïque : légère inclinaison sous la souris */
.place { transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease; }
.place:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(8,20,40,.55); }

/* Moyens de paiement : apparaissent un par un et réagissent */
.pay span { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.pay span:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 10px 18px -12px rgba(196,138,0,.6); }

/* Voyageur Or : reflet qui passe */
.gold { position: relative; overflow: hidden; background-size: 200% 100%; animation: ym-gold-shift 9s ease-in-out infinite alternate; }
.gold::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-100%); animation: ym-shine 6s ease-in-out 1s infinite; pointer-events: none; }
@keyframes ym-shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@keyframes ym-gold-shift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* Offres : la carte survolée s'éclaire */
.plan { transition: background .3s ease, transform .3s ease; }
.plan:hover { background: rgba(255,255,255,.04); transform: translateY(-4px); }

/* FAQ : la réponse se déplie */
.faq details[open] p { animation: ym-open .35s ease; }
@keyframes ym-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Boutons : un léger relief */
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.store { transition: transform .2s ease, background .2s ease; }
.store:hover { transform: translateY(-3px); background: var(--ink); }

/* Liste des établissements */
.tile .img img { transition: transform .6s ease; }
.tile:hover .img img { transform: scale(1.05); }

/* ---------- Moins d'animations demandées : tout est affiché immobile ---------- */
@media (prefers-reduced-motion: reduce) {
    .js .hero .city .bld, .js .hero .win, .js .hero h1 .w, .js .hero .lede, .js .hero .modes, .js .hero .ctas, .js .hero .when, .js [data-reveal] { opacity: 1 !important; transform: none !important; }
    .hero .pirogue, .hero .cloud, .hero .bird, .hero .shooting { display: none; }
}
