/* ════════════════════════════════════════
   FUNGI — toxicite.css
   Sosies mortels · signes d'alerte · index en amanites tue-mouches
   S'appuie sur les variables de style.css (Fungi).
════════════════════════════════════════ */
.page-tox {
  --tx-rouge: #c0432f;
  --tx-rouge-f: #8f2f22;
  --tx-fond-r: #1f0f0c;
  --tx-vert: #7fae5a;
}

/* Bandeau d'alerte */
.tx-alerte { background: var(--tx-rouge-f); color: #f6e3d8; text-align: center; padding: .6rem 1rem; font-size: .9rem; letter-spacing: .03em; }
.tx-alerte strong { font-family: var(--fd); font-weight: 400; color: #fff; }

/* Nav : l'onglet actif en rouge sur cette page */
.page-tox .nav-links a[aria-current] { color: var(--tx-rouge); }

/* ══════════════════════════════════
   EN-TÊTE
══════════════════════════════════ */
.tx-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(2.6rem,6vw,4.4rem) clamp(1rem,4vw,2rem) clamp(2rem,4vw,3rem);
  background: radial-gradient(ellipse at 50% 0%, rgba(192,67,47,.22), transparent 62%), linear-gradient(#140c07, #1d140d);
  border-bottom: 1px solid var(--border);
}
.tx-hero::before { content: "☠"; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font-size: 15rem; opacity: .035; pointer-events: none; }
.tx-hero h1 { position: relative; font-family: var(--fd); font-weight: 400; font-size: clamp(2.6rem,6.6vw,4.8rem); line-height: 1; }
.tx-hero h1 em, .tx-bandeau h1 em { color: var(--tx-rouge); font-style: normal; }
.tx-hero .lead { position: relative; margin: 1.2rem auto 1rem; max-width: 56ch; }
.tx-total { position: relative; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); }
.tx-total strong { font-family: var(--fd); font-weight: 400; font-size: 1.4rem; letter-spacing: 0; color: var(--tx-rouge); margin-right: .3rem; }

.tx-sosies h2, .tx-signes h2, .tx-index h2 { font-family: var(--fd); font-weight: 400; font-size: clamp(1.7rem,3.6vw,2.4rem); text-align: center; }
.tx-sous { text-align: center; color: var(--ink-muted); font-style: italic; margin: .5rem 0 2.2rem; }

/* ══════════════════════════════════
   LES SOSIES MORTELS
══════════════════════════════════ */
.tx-sosies { max-width: 1040px; margin: 0 auto; padding: clamp(3rem,6vw,4.5rem) clamp(1rem,4vw,2rem) 1rem; }
.paires { display: flex; flex-direction: column; gap: 1.4rem; }
.paire {
  display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: stretch; gap: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: 0 0 22px 22px; overflow: hidden;
}
.sosie { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.4rem; text-decoration: none; color: var(--ink); transition: background .2s; }
.sosie.bon { border-top: 6px solid var(--tx-vert); }
.sosie.mortel { border-top: 6px solid var(--tx-rouge); background: var(--tx-fond-r); }
.sosie:hover { background: rgba(239,225,198,.05); }
.sosie.mortel:hover { background: #2a120d; }
.s-txt { display: flex; flex-direction: column; min-width: 0; }
.s-tag { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; }
.bon .s-tag { color: var(--tx-vert); }
.mortel .s-tag { color: var(--tx-rouge); }
.s-txt b { font-family: var(--fd); font-weight: 400; font-size: 1.25rem; line-height: 1.2; margin-top: .15rem; }
.s-txt em { font-size: .9rem; color: var(--ink-muted); }
.vs {
  align-self: center; width: 44px; height: 44px; margin: 0 -22px; z-index: 1;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  font-family: var(--fd); font-size: 1.4rem; color: #1d140d; background: var(--gold);
  box-shadow: 0 0 0 4px var(--card);
}
.cle {
  grid-column: 1 / -1; margin: 0; padding: .9rem 1.4rem 1.1rem;
  border-top: 1px dashed var(--border); color: var(--ink-light); font-size: .98rem; line-height: 1.5;
}
.cle span { display: block; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: .25rem; }

/* Petit champignon dessiné : chapeau, anneau, pied, volve */
.mc { position: relative; flex: 0 0 auto; width: 64px; height: 70px; }
.mc-ch {
  position: absolute; left: 0; right: 0; top: 4px; height: 30px;
  border-radius: 50% 50% 12% 12% / 95% 95% 12% 12%;
  background: linear-gradient(170deg, color-mix(in srgb, var(--cap) 100%, #fff 18%), var(--cap) 60%, color-mix(in srgb, var(--cap) 70%, #000));
  box-shadow: 0 4px 6px rgba(0,0,0,.35); z-index: 2;
}
.mc-pi { position: absolute; left: 41%; right: 41%; top: 30px; bottom: 2px; background: linear-gradient(90deg, #efe3c8, #cfbf98); border-radius: 3px 3px 6px 6px; }
.mc-an { position: absolute; left: 34%; right: 34%; top: 40px; height: 4px; border-radius: 4px; background: #efe3c8; z-index: 1; }
.bon .mc-an { display: none; }
.mc-vo {                                         /* la volve, en sac à la base */
  position: absolute; left: 28%; right: 28%; bottom: 0; height: 16px;
  border-radius: 6px 6px 14px 14px; border: 2px solid #efe3c8; border-top: none;
  background: rgba(239,227,200,.25);
}

/* ══════════════════════════════════
   LES SIGNES QUI DOIVENT ALERTER
══════════════════════════════════ */
.tx-signes { max-width: 1040px; margin: 0 auto; padding: clamp(3rem,6vw,4.5rem) clamp(1rem,4vw,2rem) 1rem; }
.signes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.2rem; margin-top: 2rem; }
.signe { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 1.3rem 1.4rem; }
.signe b { display: block; font-family: var(--fd); font-weight: 400; font-size: 1.2rem; color: var(--accent); margin-bottom: .5rem; }
.signe p { color: var(--ink-light); font-size: .98rem; line-height: 1.5; }
.signe.grave { background: var(--tx-fond-r); border-color: var(--tx-rouge-f); box-shadow: 0 0 0 1px rgba(192,67,47,.25), 0 0 30px rgba(192,67,47,.12); }
.signe.grave b { color: var(--tx-rouge); }
.signe.grave b::before { content: "⚠ "; }

/* ══════════════════════════════════
   INDEX : UNE AMANITE TUE-MOUCHES PAR LETTRE
══════════════════════════════════ */
.tx-index { max-width: 1040px; margin: 0 auto; padding: clamp(3rem,6vw,4.5rem) clamp(1rem,4vw,2rem) clamp(3rem,6vw,5rem); }
.amanites { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px,1fr)); gap: 2rem .8rem; }
.amanite { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink); }
.am-ch {
  position: relative; z-index: 2; width: 76px; height: 42px;
  display: flex; align-items: center; justify-content: center; padding-top: .3rem;
  border-radius: 50% 50% 12% 12% / 95% 95% 12% 12%;
  font-family: var(--fd); font-size: 1.4rem; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5);
  background:
    radial-gradient(circle at 20% 52%, #f5ecd6 0 3px, transparent 3.5px),
    radial-gradient(circle at 38% 24%, #f5ecd6 0 2.5px, transparent 3px),
    radial-gradient(circle at 70% 30%, #f5ecd6 0 3px, transparent 3.5px),
    radial-gradient(circle at 84% 62%, #f5ecd6 0 2px, transparent 2.5px),
    linear-gradient(170deg, #e05a30, #d24a26 55%, #a9371a);
  box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), 0 6px 10px rgba(0,0,0,.35);
  transition: transform .3s cubic-bezier(.3,1.6,.5,1);
}
.am-pi { width: 22px; height: 34px; margin-top: -3px; background: linear-gradient(90deg, #efe3c8, #d9c9a4); border-radius: 4px 4px 9px 9px; }
.am-nb { margin-top: .5rem; font-size: .76rem; letter-spacing: .06em; color: var(--ink-muted); }
.amanite:hover .am-ch { transform: translateY(-7px) scale(1.07); }
.amanite:hover .am-nb { color: var(--tx-rouge); }
.amanite.off { opacity: .2; }
.amanite.off .am-ch { background: #5a4028; }

/* ══════════════════════════════════
   LISTE D'UNE LETTRE
══════════════════════════════════ */
.tx-lettres {
  position: sticky; top: 64px; z-index: 150;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px;
  padding: .55rem 1rem; background: rgba(29,20,13,.95); backdrop-filter: blur(4px); border-bottom: 1px solid var(--border);
}
.tl {
  min-width: 32px; height: 28px; padding: 0 .3rem; line-height: 30px; text-align: center;
  font-family: var(--fd); font-size: .95rem; text-decoration: none; color: var(--ink-light);
  border-radius: 50% 50% 8px 8px / 85% 85% 8px 8px;
  background: var(--card); border: 1px solid var(--border);
}
.tl:hover { border-color: var(--tx-rouge); color: var(--tx-rouge); }
.tl.actif { background: #d24a26; border-color: #d24a26; color: #fff; }

.tx-bandeau { background: radial-gradient(ellipse at 20% 0%, rgba(192,67,47,.2), transparent 60%), linear-gradient(#140c07, #22160d); border-bottom: 1px solid var(--border); padding: 1.2rem clamp(1rem,4vw,3rem) clamp(2rem,4vw,3rem); }
.tx-crumbs { max-width: 1040px; margin: 0 auto 1.6rem; font-size: .88rem; font-style: italic; color: var(--ink-muted); }
.tx-crumbs a { color: var(--tx-rouge); text-decoration: none; }
.tx-crumbs a:hover { text-decoration: underline; }
.tx-crumbs span { margin: 0 .3rem; opacity: .6; }
.tx-bandeau-in { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: auto minmax(0,1fr); gap: clamp(1.4rem,3vw,2.6rem); align-items: center; }
.tx-bandeau h1 { font-family: var(--fd); font-weight: 400; font-size: clamp(2.1rem,5vw,3.4rem); line-height: 1.05; }
.tx-bandeau .hero-tag { margin-bottom: .9rem; color: var(--tx-rouge); border-color: rgba(192,67,47,.4); }
.tx-desc { color: var(--ink-muted); font-style: italic; margin-top: .5rem; font-size: 1.05rem; }
.tx-grande { display: flex; flex-direction: column; align-items: center; }
.tx-grande .am-ch { width: 130px; height: 72px; font-size: 2.6rem; }
.tx-grande .am-pi { width: 36px; height: 56px; }

.tx-main { max-width: 1040px; margin: 0 auto; padding: clamp(2.2rem,5vw,3.4rem) clamp(1rem,4vw,2rem) 4.5rem; }
.tx-liste {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.4rem; position: relative;
  background: var(--tx-fond-r); border: 1px solid var(--tx-rouge-f); border-radius: 0 0 22px 22px;
  padding: 1.2rem 1.6rem 1.6rem;
}
.tx-liste::before {
  content: ""; position: absolute; left: -1px; right: -1px; top: -18px; height: 18px; border-radius: 18px 18px 0 0;
  background: radial-gradient(circle at 12% 55%, #f5ecd6 0 3px, transparent 3.5px), radial-gradient(circle at 46% 40%, #f5ecd6 0 2.5px, transparent 3px),
              radial-gradient(circle at 78% 60%, #f5ecd6 0 3px, transparent 3.5px), #d24a26;
}
.tx-col { list-style: none; }
.tx-col li { border-bottom: 1px solid rgba(192,67,47,.14); }
.tx-col a { display: flex; align-items: baseline; gap: .55rem; padding: .4rem .4rem; border-radius: 4px; text-decoration: none; color: #e8cdbf; font-size: .96rem; transition: background .15s, padding-left .15s; }
.tx-col a:hover { background: rgba(192,67,47,.14); padding-left: .8rem; }
.tx-col a:hover .sci { color: #fff; }
.pt { flex: 0 0 auto; width: 12px; height: 7px; transform: translateY(-1px); border-radius: 50% 50% 2px 2px / 100% 100% 2px 2px; background: #d24a26; }
.sci { font-style: italic; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.com { margin-left: auto; font-size: .86rem; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; text-align: right; }
.tx-vide { text-align: center; font-style: italic; color: var(--ink-muted); padding: 3rem 0; }

.tx-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; margin-top: 2.2rem; }
.tx-pages a, .tx-pages span { min-width: 38px; padding: .4rem .6rem; text-align: center; font-family: var(--fd); text-decoration: none; color: var(--ink-light); background: var(--card); border: 1px solid var(--border); border-radius: 999px; }
.tx-pages a:hover { border-color: var(--tx-rouge); color: var(--tx-rouge); }
.tx-pages .actif { background: #d24a26; border-color: #d24a26; color: #fff; }
.tx-pages .etc { background: none; border: none; }

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 860px) {
  .signes { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .paire { grid-template-columns: 1fr; }
  .vs { margin: -22px auto; }
  .tx-liste { grid-template-columns: 1fr; }
  .com { display: none; }
}
@media (max-width: 520px) {
  .tx-bandeau-in { grid-template-columns: 1fr; text-align: center; }
  .amanites { grid-template-columns: repeat(auto-fill, minmax(72px,1fr)); }
  .am-ch { width: 66px; height: 38px; font-size: 1.2rem; }
}
