/* Bascule FR / EN de l'en-tete, commune a toutes les pages.
   Posee par outils/traduire-en.py (lien data-lang-switch dans .hdr-right).
   Couleur heritee de l'en-tete, qui passe du navy au clair au defilement. */
.hdr-lang {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-width: 44px; min-height: 44px; padding: 0 12px 0 10px;
  border-radius: 10px;
  font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, monospace);
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none;
  color: inherit; opacity: 0.85;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 28%, transparent);
  transition: opacity 0.2s ease, background 0.2s ease;
}
.hdr-lang:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }
.hdr-lang:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (max-width: 520px) {
  .hdr-lang { min-width: 40px; min-height: 42px; padding: 0 8px; font-size: 0.74rem; }
}

/* Drapeau de la langue cible, devant le code : on comprend d'un coup d'oeil
   que le bouton change la langue. Liseré discret pour le blanc du drapeau
   sur l'en-tete clair. */
.lang-flag {
  flex: none; width: 20px; height: 14px; border-radius: 3px; object-fit: cover;
  box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 22%, transparent);
}
.nav-lang { gap: 0.6rem; }

/* Entree "English / Francais" en fin de menu : seulement sur petit ecran, ou
   le bouton de l'en-tete n'a pas la place a cote du logo et du CTA. */
.hdr-nav > .nav-lang { display: none; }
@media (max-width: 600px) {
  .hdr-right > .hdr-lang { display: none; }
  .hdr-nav > .nav-lang {
    display: flex; justify-content: flex-start; gap: 0.7rem;
    margin-top: 0.3rem; padding-top: 0.3rem;
    box-shadow: inset 0 1px 0 color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 0 0 10px 10px;
  }
  /* Le menu mobile est en grand corps : drapeau a l'echelle du texte. */
  .hdr-nav > .nav-lang .lang-flag { width: 0.95em; height: 0.66em; border-radius: 0.12em; }
}
