/* ==========================================================================
   Afoodi — fiches de glossaire (/glossaire/{terme})
   Une fiche se lit en deux minutes : une définition en tête, des formules
   détachées du texte, la sortie vers les termes voisins — et une colonne
   latérale qui garde l'inscription et les deux sommaires à portée.
   ========================================================================== */

.has-gsap [data-reveal] { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .has-gsap [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   EN-TÊTE
   ========================================================================== */
.top {
  background:
    radial-gradient(1100px 620px at 50% -8%, oklch(0.33 0.05 163 / .85), transparent 60%),
    linear-gradient(175deg, var(--green-dark), var(--green-ink) 70%);
  padding-bottom: clamp(44px, 5.5vw, 78px);
}
.fil {
  padding-top: clamp(26px, 3vw, 40px);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
.fil a { color: var(--mint); }
.fil a:hover { color: var(--orange-bright); }

.hero { padding: clamp(20px, 2.4vw, 32px) 0 0; max-width: 900px; }
.hero h1 {
  font-size: clamp(32px, 4.6vw, 64px);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.02;
  text-wrap: balance;
}
/* La définition est le contenu principal de la fiche : elle est en tête, en
   grand, avant même le fond clair. Un lecteur pressé n'a pas à descendre. */
.hero__lead {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.6;
  color: var(--cream-dim);
  margin-top: clamp(20px, 2.4vw, 30px);
  max-width: 68ch;
  text-wrap: pretty;
}
.hero__lead strong { color: var(--cream); font-weight: 800; }
.hero__lead em { font-style: italic; }

/* ==========================================================================
   CORPS
   ========================================================================== */
.light { background: var(--cream); color: var(--green-ink); position: relative; z-index: 2; }
.light a { color: var(--green-ink); }
.light a:hover { color: var(--orange); }

.terme {
  border-radius: 34px 34px 0 0;
  margin-top: -22px;
  padding: clamp(48px, 6vw, 88px) 0 clamp(52px, 6.5vw, 96px);
}
/* Deux colonnes : la fiche, puis les ressources. Le rail est collant — une
   fiche tient en deux écrans, il reste visible du début à la fin. */
.terme__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 250px);
  gap: clamp(28px, 3.4vw, 56px);
  align-items: start;
}
.terme__corps { max-width: 72ch; }
.rail { position: sticky; top: 92px; }

.terme__corps p {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-top: 16px;
  text-wrap: pretty;
}
.terme__corps p strong { color: var(--green-ink); font-weight: 800; }
.terme__corps p em { font-style: italic; }
.terme__corps a { text-decoration: underline; text-underline-offset: 3px; }

.terme__h2 {
  font-size: clamp(21px, 2.1vw, 29px);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.2;
  margin-top: clamp(34px, 3.6vw, 52px);
  text-wrap: balance;
}
.terme__h2 + p { margin-top: 14px; }

.puces, .etapes { margin-top: 18px; display: grid; gap: 10px; }
.puces { list-style: none; }
.etapes { list-style: none; counter-reset: etape; }
.puces li, .etapes li {
  position: relative;
  padding-left: 26px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.puces li strong, .etapes li strong { color: var(--green-ink); font-weight: 800; }
.puces li em, .etapes li em { font-style: italic; }
.puces li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}
.etapes li { counter-increment: etape; }
.etapes li::before {
  content: counter(etape) ".";
  position: absolute;
  left: 0;
  font-weight: 900;
  color: var(--orange);
}

/* Une formule n'est pas une phrase : on la sort du fil du texte pour qu'elle
   se retienne d'un coup d'œil. */
.formule {
  margin-top: clamp(20px, 2.2vw, 28px);
  background: var(--cream-pure);
  border: 1px solid var(--ink-line);
  border-left: 3px solid var(--orange);
  border-radius: 0 16px 16px 0;
  padding: clamp(18px, 2vw, 26px) clamp(20px, 2.2vw, 30px);
}
.formule p { margin-top: 8px; font-size: 16px; }
.formule p:first-child { margin-top: 0; font-size: 17px; color: var(--green-ink); }
.formule p strong { color: var(--green-ink); font-weight: 800; }

.tableau { margin-top: clamp(20px, 2.2vw, 28px); overflow-x: auto; }
.tableau table { border-collapse: collapse; width: 100%; min-width: 560px; }
.tableau th, .tableau td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.5;
  border-bottom: 1px solid var(--ink-line);
}
.tableau thead th {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange);
  border-bottom-width: 2px;
}
.tableau tbody th { font-weight: 800; color: var(--green-ink); white-space: nowrap; }
.tableau td { color: var(--ink-soft); }
.tableau tbody tr:last-child th,
.tableau tbody tr:last-child td { border-bottom: none; }

/* ==========================================================================
   LE PONT AFOODI + LES TERMES VOISINS
   ========================================================================== */
.pont {
  margin-top: clamp(40px, 4.4vw, 64px);
  background: var(--cream-pure);
  border: 1px solid var(--ink-line);
  border-radius: 22px;
  padding: clamp(24px, 2.8vw, 38px);
}
.pont .terme__h2 { margin-top: 0; font-size: clamp(19px, 1.8vw, 24px); }
.pont p { margin-top: 14px; }
.terme__cta { margin-top: clamp(20px, 2.2vw, 28px); }
.terme__cta a { text-decoration: none; }

.aussi { margin-top: clamp(36px, 4vw, 56px); padding-top: clamp(26px, 3vw, 38px); border-top: 1px solid var(--ink-line); }
.aussi__t { font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.aussi ul { list-style: none; margin-top: 14px; display: grid; gap: 8px; }
.aussi a { font-size: 16px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1000px) {
  .terme__grid { grid-template-columns: 1fr; }
  .rail { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Doublon avec le pied de page une fois les colonnes empilées. */
  .rail__news { display: none; }
}
@media (max-width: 620px) {
  .tableau table { min-width: 440px; }
  .rail { grid-template-columns: 1fr; }
}
