/* ════════════════════════════════════════
   FUNGI — sporee.css
   Transition « sporée » + bouton de passage surface ⇄ sous-terre
   (piloté par /sporee.js)
════════════════════════════════════════ */

/* départ : un disque grandit depuis le bouton */
.sporee-voile {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background:
    radial-gradient(circle at var(--sx) var(--sy), rgba(255, 255, 255, .12) 0 2px, transparent 3px) 0 0 / 23px 23px,
    radial-gradient(circle at var(--sx) var(--sy), rgba(255, 255, 255, .08) 0 1.5px, transparent 2.5px) 11px 7px / 31px 31px,
    var(--sc, #1d140d);
  animation: sporee-part .56s cubic-bezier(.6, 0, .8, .4) forwards;
}
@keyframes sporee-part {
  from { clip-path: circle(0 at var(--sx) var(--sy)); }
  to   { clip-path: circle(150% at var(--sx) var(--sy)); }
}

/* arrivée : le disque se résorbe vers l'endroit d'où l'on vient */
html.sporee-arrive body::after {
  content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: var(--sc, #1d140d);
  animation: sporee-arrive .56s cubic-bezier(.2, .6, .4, 1) forwards;
}
@keyframes sporee-arrive {
  from { clip-path: circle(150% at var(--sx, 50%) var(--sy, 90%)); }
  to   { clip-path: circle(0 at var(--sx, 50%) var(--sy, 90%)); }
}

/* ══════════ BOUTON DE PASSAGE (surface ⇄ sous-terre) ══════════ */
.passage {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  display: flex; align-items: center; gap: .8rem;
  padding: .55rem 1.3rem .55rem .55rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
  transition: transform .3s, box-shadow .3s;
}
.passage:hover { transform: translateY(-3px); }
.passage:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.passage-fl {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.passage-txt { display: flex; flex-direction: column; font-family: 'Young Serif', Georgia, serif; font-size: 1rem; line-height: 1.15; }
.passage-txt small { font-family: 'EB Garamond', serif; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }

/* depuis le sous-sol : bouton aux couleurs chaudes de la surface */
.passage--monter { background: linear-gradient(135deg, #4a3018, #2c1d10); color: #efe1c6; border: 1px solid rgba(201, 150, 58, .45); }
.passage--monter .passage-fl { background: #d76d2e; color: #1d140d; }
.passage--monter .passage-fl { animation: passage-flotte 2.4s ease-in-out infinite; }
/* depuis la surface : bouton aux couleurs du mycélium */
.passage--descendre { background: linear-gradient(135deg, #18241a, #0b100c); color: #d9f0c4; border: 1px solid rgba(166, 227, 111, .4); }
.passage--descendre .passage-fl { background: #a6e36f; color: #0b100c; box-shadow: 0 0 16px rgba(166, 227, 111, .5); animation: passage-coule 2.4s ease-in-out infinite; }
@keyframes passage-flotte { 50% { transform: translateY(-3px); } }
@keyframes passage-coule  { 50% { transform: translateY(3px); } }

@media (max-width: 600px) {
  .passage { right: 12px; bottom: 12px; padding: .4rem; }
  .passage-txt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sporee-voile, html.sporee-arrive body::after { animation: none; display: none; }
  .passage-fl { animation: none !important; }
}
