/* Les petites scènes animées des carnets (voir scenes.mjs) */
.scene { position: relative; margin: 6px 0 22px; pointer-events: none; }
.scene svg { display: block; width: 100%; height: auto; overflow: visible; }
.scene-label { font-family: var(--hand); font-size: 1.35rem; color: var(--ink); margin: 4px 0 0; }
.scene-label span { font-family: var(--body); font-size: .78rem; color: var(--muted); }

/* ---------- Randonnées: donkey on the top bar ---------- */
.trail { position: absolute; left: 0; right: 0; top: 100%; height: 40px; pointer-events: none; --x: 300px; background: rgba(243,236,220,.86); backdrop-filter: blur(8px); border-bottom: 1.5px dashed var(--line); }
.trail-line {
  position: absolute; left: 0; bottom: 0; height: 3px; width: var(--x);
  background: radial-gradient(circle, var(--olive) 1.4px, transparent 1.6px) 0 50% / 9px 3px repeat-x;
}
.trail-donkey { position: absolute; bottom: 1px; left: var(--x); width: 46px; translate: -60% 0; transform: scaleX(-1); }
.donkey .leg, .donkey .ear, .donkey .tail, .donkey .eye { transform-box: fill-box; transform-origin: 50% 0; }
.donkey .eye { transform-origin: center; animation: blink 4.2s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.donkey .ear { transform-origin: 20% 100%; animation: earFlick 4.5s ease-in-out infinite; }
.donkey .tail { animation: tailSwish 3s ease-in-out infinite; }
.trail.walking .donkey { animation: trot .32s ease-in-out infinite; }
.trail.walking .leg-a { animation: legSwing .32s ease-in-out infinite; }
.trail.walking .leg-b { animation: legSwing .32s ease-in-out infinite reverse; }
@keyframes trot { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2px; } }
@keyframes legSwing { 0%, 100% { rotate: -9deg; } 50% { rotate: 9deg; } }
@keyframes earFlick { 0%, 86%, 100% { rotate: 0deg; } 93% { rotate: -16deg; } }
@keyframes tailSwish { 0%, 100% { rotate: 0deg; } 50% { rotate: 10deg; } }
@media (max-width: 760px) { .trail-donkey { width: 36px; } }

/* ---------- Plages: meltemi ---------- */
.scene-wind { height: 120px; }
.scene-wind .gusts { position: absolute; inset: 0; height: 100%; }
.g { fill: none; stroke: var(--wash-deep); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 110 900; animation: gust 3.4s linear infinite; opacity: .75; }
.g2 { animation-delay: -1.1s; animation-duration: 2.8s; }
.g3 { animation-delay: -2.2s; animation-duration: 3.8s; }
.g4 { animation-delay: -.5s; animation-duration: 4.4s; stroke-width: 1.6; opacity: .5; }
@keyframes gust { from { stroke-dashoffset: 140; } to { stroke-dashoffset: -900; } }
.scene .windsock { position: absolute; right: 4%; top: 0; width: 130px; height: 120px; }
.sock { transform-origin: 20px 36px; animation: flap .7s ease-in-out infinite alternate; }
@keyframes flap { from { transform: rotate(-3deg) skewY(-2deg); } to { transform: rotate(4deg) skewY(2deg) scaleX(.97); } }
.scene-wind .scene-label { position: absolute; left: 0; bottom: 0; }

/* ---------- Plages: underwater ---------- */
.scene-sea svg { border-radius: 14px 6px 16px 8px / 8px 16px 6px 14px; height: 130px; }
.bubble { fill: rgba(255,255,255,.35); stroke: rgba(255,255,255,.85); stroke-width: 1.2; animation: rise 6s ease-in infinite; transform-box: fill-box; }
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(6px, -60px); } 100% { transform: translate(-4px, -122px); opacity: 0; } }
.fish { animation: swim 16s linear infinite; }
@keyframes swim { 0% { transform: translate(640px, 70px) scaleX(1); } 48% { transform: translate(-60px, 82px) scaleX(1); } 50% { transform: translate(-60px, 82px) scaleX(-1); } 98% { transform: translate(640px, 62px) scaleX(-1); } 100% { transform: translate(640px, 70px) scaleX(1); } }

/* ---------- À table: raki ---------- */
.scene-raki { width: 220px; margin: 14px 0 0; }
.glass { transform-box: fill-box; transform-origin: 50% 100%; }
.gl-l { animation: clinkL 3.2s ease-in-out infinite; }
.gl-r { animation: clinkR 3.2s ease-in-out infinite; }
@keyframes clinkL { 0%, 100% { transform: translate(-6px, 2px) rotate(-5deg); } 38%, 52% { transform: translate(12px, 0) rotate(16deg); } }
@keyframes clinkR { 0%, 100% { transform: translate(6px, 2px) rotate(5deg); } 38%, 52% { transform: translate(-12px, 0) rotate(-16deg); } }
.clink path { opacity: 0; animation: spark 3.2s ease-out infinite; }
.clink path:nth-child(2) { animation-delay: .05s; } .clink path:nth-child(3) { animation-delay: .1s; }
@keyframes spark { 0%, 36% { opacity: 0; } 42% { opacity: 1; } 60%, 100% { opacity: 0; } }
.scene-raki .scene-label { text-align: center; line-height: 1.1; }
.scene-raki .scene-label span { display: block; margin-top: 2px; }

/* ---------- Pratique: map and bus ---------- */
.scene-map { max-width: 460px; }
.scene-map svg { filter: drop-shadow(0 14px 20px rgba(22,63,92,.25)); }
.route { animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -18; } }
.scene-bus { max-width: 600px; }

@media (prefers-reduced-motion: reduce) {
  .scene *, .trail * { animation: none !important; }
}
@media print { .scene, .trail { display: none !important; } }
