/* ---------------------------
	APPEL DE NOTE
 ---------------------------*/
sup.hg-fn {
  line-height: 0;
  white-space: nowrap;
}

sup.hg-fn a {
  padding: 0 0.15em;
  font-weight: 700;
  text-decoration: none;
}

sup.hg-fn a:hover,
sup.hg-fn a:focus-visible {
  text-decoration: underline;
}

/* Dans l'éditeur, le repère est un astérisque : le numéro n'existe qu'au rendu. */
.editor-styles-wrapper sup.hg-fn {
  padding: 0 0.25em;
  border-radius: 0.25em;
  background-color: #f0f0f0;
  font-weight: 700;
  cursor: pointer;
}

/* ---------------------------
	LISTE DES NOTES
 ---------------------------*/
.hg-footnotes {
  margin: 2rem 0;
  padding-top: 1rem;
  border-top: 1px solid currentColor;
  font-size: 0.875rem;
}

.hg-footnotes__list {
  margin: 0;
  padding-left: 1.5rem;
}

/* Un bloc de liste placé alors qu'aucune note ne le précède ne doit rien laisser paraître. */
.hg-footnotes:has(.hg-footnotes__list:empty) {
  display: none;
}

.hg-footnotes__item {
  margin-bottom: 0.5rem;
}

.hg-footnotes__backlink {
  margin-left: 0.25em;
  text-decoration: none;
}

/* Mise en évidence de la cible après un saut d'ancre, dans les deux sens. */
sup.hg-fn:target a,
.hg-footnotes__item:target {
  background-color: #fff3cd;
}
