/* Le sélecteur de langue : trois repères en haut à droite de chaque page.
   Il hérite de la couleur du texte de la page, donc de la règle des encres. */
.langs {
  position: absolute;
  top: clamp(1rem, 3vh, 2rem);
  right: clamp(1rem, 4vw, 4rem);
  z-index: 10;
  display: flex;
  gap: 0.9em;
  font-size: var(--text-meta);
  letter-spacing: 0.2em;
}

.langs a,
.langs span { text-decoration: none; padding: 0.4em 0.1em; }
.langs a { opacity: 0.7; border-bottom: 1px solid transparent; }
.langs a:hover,
.langs a:focus-visible { opacity: 1; border-color: currentColor; }
.langs [aria-current] { border-bottom: 1px solid currentColor; }
.langs [lang|="zh"] { letter-spacing: 0.1em; }

/* Sur les sous-pages, le coin haut droit appartient à la feuille : le sélecteur
   partage la ligne du lien de retour, « ← Si Mo » à gauche, les langues à
   droite. */
.langs-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

/* La marge négative reprend le filet du repère courant : la ligne garde la
   hauteur qu'elle avait sans le sélecteur. */
.langs--inline {
  position: static;
  text-transform: none;
  margin-bottom: calc(-0.2em - 1px);
}
.langs--inline a,
.langs--inline span { padding: 0 0.1em 0.2em; }
