/* Recap · mascots Low Poly — chat (accueil) · chouette (matières) · fennec (recherche) · raton laveur (réglages)
   Même principe que le garçon : image découpée (WebP transparent) + ombre portée + ombre de contact dessinée en CSS.
   Les couleurs d'ombre s'adaptent au thème clair / sombre. Aucune image n'est interactive (pointer-events: none). */

:root {
  --mc-d1: rgba(40, 24, 10, .26); --mc-d2: rgba(40, 24, 10, .16);
  --mc-g1: rgba(20, 36, 28, .46); --mc-g2: rgba(20, 36, 28, .26); --mc-g3: rgba(20, 36, 28, .55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --mc-d1: rgba(0, 0, 0, .5); --mc-d2: rgba(0, 0, 0, .35); --mc-g1: rgba(0, 0, 0, .72); --mc-g2: rgba(0, 0, 0, .42); --mc-g3: rgba(0, 0, 0, .8); }
}
:root[data-theme="dark"] { --mc-d1: rgba(0, 0, 0, .5); --mc-d2: rgba(0, 0, 0, .35); --mc-g1: rgba(0, 0, 0, .72); --mc-g2: rgba(0, 0, 0, .42); --mc-g3: rgba(0, 0, 0, .8); }

/* briques communes */
.mc-img { position: relative; z-index: 1; display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; pointer-events: none;
  transform-origin: 50% 100%; filter: drop-shadow(0 3px 2px var(--mc-d1)) drop-shadow(0 10px 8px var(--mc-d2)); }
.mc-ground { position: absolute; z-index: 0; left: -4%; right: -4%; bottom: -2px; height: 16px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, var(--mc-g1) 0, var(--mc-g2) 45%, transparent 74%); filter: blur(2.5px); }
.mc-ground::before { content: ""; position: absolute; left: 20%; right: 20%; top: 28%; bottom: 28%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, var(--mc-g3) 0, transparent 72%); }
@keyframes mc-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(.996, 1.02); } }
@keyframes mc-sway { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }
@keyframes mc-pop { from { opacity: 0; transform: translateY(18px) scale(.9); } to { opacity: 1; transform: none; } }

/* ---------- 1 · ACCUEIL : le chat dort au pied de la carte post-it, côté pli (le garçon est sur le bord haut) ---------- */
.pi-cat { position: absolute; z-index: 2; inset-inline-end: -4%; top: calc(100% - 8px); width: 64%; pointer-events: none; }
.pi-cat .mc-img { animation: mc-breathe 5.8s ease-in-out infinite; }
.pi-cat .mc-ground { left: 6%; right: 0; bottom: -4px; height: 13px; }
.js .pi.enter .pi-cat { animation: mc-pop .9s cubic-bezier(.34, 1.3, .64, 1) 1.7s backwards; }

/* ---------- 3 · RECHERCHE : le fennec s'assoit sur les vagues tant qu'aucun résultat n'est affiché ---------- */
.se-fox { position: absolute; z-index: 1; inset-inline-end: 7%; bottom: 40px; aspect-ratio: 504 / 760; height: clamp(120px, calc(100svh - 575px), 292px); pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s .3s; }
.se-fox .mc-img { width: 100%; height: 100%; animation: mc-breathe 5s ease-in-out infinite; }
.se-fox .mc-ground { left: -6%; right: -6%; bottom: -3px; height: 15px; }
.paper:has(#sx-out:empty) .se-fox { opacity: 1; visibility: visible; transition: opacity .35s ease; animation: mc-pop .9s cubic-bezier(.34, 1.4, .64, 1) 1.3s backwards; }

/* ---------- 4 · EMPLOI DU TEMPS : le garçon (jour vide) ; .rb-end = simple espace en bas de chaque jour rempli ---------- */
.sl-stage { left: -22px; }
[dir="rtl"] .sl-stage { left: auto; right: -22px; }
.rb-end { position: relative; width: min(104px, 28vw); margin: 22px 20px 104px auto; pointer-events: none; animation: pk-in .65s cubic-bezier(.22, 1.2, .36, 1) var(--d, 0ms) backwards; }
[dir="rtl"] .rb-end { margin: 22px auto 104px 20px; }
#sched.na .rb-end { animation: none; }

/* ---------- 5 · RÉGLAGES : le raton laveur « répare » l'app, posé juste avant la phrase de fin ---------- */
.set-fixer { position: relative; width: min(176px, 46vw); margin: 20px auto 6px; pointer-events: none; }
.set-fixer .mc-img { animation: mc-breathe 4.8s ease-in-out infinite; }
.set-fixer .mc-ground { left: 6%; right: 2%; bottom: 0; height: 15px; }


@media (prefers-reduced-motion: reduce) {
  .mc-img, .pi-cat .mc-img, .se-fox .mc-img, .set-fixer .mc-img { animation: none !important; }
  .js .pi.enter .pi-cat, .paper:has(#sx-out:empty) .se-fox, .rb-end { animation: none !important; }
}
