/* ════════════════════════════════════════
   FUNGI — histoire_legendes.css
   Coupe de sol : la surface (traditions) au-dessus,
   le monde souterrain du mycélium (légendes) au-dessous.
   S'appuie sur les variables de style.css (Fungi).
════════════════════════════════════════ */

.fh-body { --lueur: #a6e36f; --nuit-sol: #0b100c; }

.fh-tete { text-align: center; padding: clamp(2.6rem, 6vw, 4rem) 1.2rem 2.2rem; background: linear-gradient(#140c07, #1d140d); }
.fh-tete h1 { font-family: var(--fd); font-weight: 400; font-size: clamp(2.5rem, 6vw, 4.2rem); line-height: 1.02; }
.fh-tete h1 em { color: var(--accent); font-style: normal; }
.fh-chapeau { max-width: 54ch; margin: 1rem auto 0; font-style: italic; color: var(--ink-muted); font-size: 1.1rem; line-height: 1.6; }

/* ── la coupe : deux mondes empilés, celui qu'on survole prend plus de place ── */
.fh-coupe {
  display: flex; flex-direction: column;
  height: clamp(760px, 112vh, 980px);
  max-width: 1500px; margin: 0 auto;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.fh-monde {
  position: relative; flex: 1; overflow: hidden;
  display: flex; justify-content: center;
  text-decoration: none; color: var(--ink);
  transition: flex .6s cubic-bezier(.4, 0, .2, 1);
}
.fh-coupe:hover .fh-monde { flex: .78; }
.fh-coupe .fh-monde:hover { flex: 1.22; }
.fh-monde:focus-visible { outline: 3px solid var(--accent); outline-offset: -6px; }

/* surface : sous-bois d'automne, lumière chaude qui tombe des arbres */
.fh-surface {
  align-items: flex-start;
  padding: clamp(2.4rem, 5vw, 3.6rem) 1.4rem 140px;
  background:
    radial-gradient(ellipse 60% 70% at 22% 0%, rgba(232, 160, 80, .28), transparent 70%),
    radial-gradient(ellipse 50% 60% at 85% 10%, rgba(201, 150, 58, .18), transparent 70%),
    linear-gradient(180deg, #2c1d10 0%, #3b2714 70%, #4a3018 100%);
}
/* sous terre : obscurité humide, lueur verte du mycélium */
.fh-dessous {
  align-items: flex-end;
  padding: 140px 1.4rem clamp(2.4rem, 5vw, 3.6rem);
  background:
    radial-gradient(ellipse 50% 60% at 80% 55%, rgba(166, 227, 111, .1), transparent 70%),
    linear-gradient(180deg, #1a110a 0%, #10140e 45%, var(--nuit-sol) 100%);
}
.fh-feuilles, .fh-lucioles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.fh-texte { position: relative; z-index: 3; max-width: 560px; text-align: center; }
.fh-ou { font-size: .78rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.fh-dessous .fh-ou { color: var(--lueur); }
.fh-texte h2 { font-family: var(--fd); font-weight: 400; font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.08; margin: .5rem 0 .8rem; }
.fh-texte h2 span { color: var(--accent); }
.fh-dessous h2 { color: #e6f2d8; text-shadow: 0 0 22px rgba(166, 227, 111, .25); }
.fh-dessous h2 span { color: var(--lueur); }
.fh-desc { color: var(--ink-light); font-size: 1.07rem; line-height: 1.65; }
.fh-dessous .fh-desc { color: #b9c7ad; }
.fh-compte { margin-top: .9rem; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.fh-go {
  display: inline-block; margin-top: 1.1rem; padding: .55rem 1.3rem; border-radius: 999px;
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid currentColor; transition: background .25s, color .25s;
}
.fh-surface .fh-go { color: var(--accent); }
.fh-surface:hover .fh-go { background: var(--accent); color: var(--on); }
.fh-dessous .fh-go { color: var(--lueur); }
.fh-dessous:hover .fh-go { background: var(--lueur); color: #0b100c; box-shadow: 0 0 18px rgba(166, 227, 111, .45); }

/* ── la ligne du sol (bande fixe entre les deux mondes, déborde de part et d'autre) ── */
.fh-sol { position: relative; flex: 0 0 0; z-index: 2; pointer-events: none; }
.fh-sol svg { position: absolute; left: 0; width: 100%; height: 240px; top: -120px; }
.fh-myc path { stroke-dasharray: 6 5; animation: fh-seve 7s linear infinite; opacity: .55; }
.fh-dessous:hover ~ .fh-sol .fh-myc path { opacity: .9; }
.fh-coupe:has(.fh-dessous:hover) .fh-myc path { opacity: .95; animation-duration: 3s; }
.fh-coupe:has(.fh-surface:hover) .fh-pousse { transform: translateY(-4px); }
.fh-pousse { transition: transform .5s; transform-box: fill-box; transform-origin: bottom; animation: fh-pousse .9s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: var(--d); }
@keyframes fh-seve { to { stroke-dashoffset: -110; } }
@keyframes fh-pousse { from { transform: scaleY(0); } to { transform: none; } }

.fh-spore { animation: fh-luit 3.8s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes fh-luit { 0%, 100% { opacity: .15; } 50% { opacity: .85; } }

@media (min-width: 1500px) {
  .fh-coupe { border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-radius: 0 0 28px 28px; }
}
@media (max-width: 760px) {
  .fh-coupe { height: auto; }
  .fh-coupe:hover .fh-monde, .fh-coupe .fh-monde:hover { flex: 1; }
  .fh-monde { min-height: 470px; }
  .fh-sol svg { height: 180px; top: -90px; }
  .fh-surface { padding-bottom: 110px; }
  .fh-dessous { padding-top: 110px; }
}
