/* Lang toggle FR | EN, version autoporteuse.
   Pour les pages hors design-system (dashboards founder/BA, pages legales) qui
   ne chargent pas css/ds/shared.css. Identique visuellement au toggle des pages
   publiques, mais chaque token a un fallback explicite pour rester robuste quel
   que soit le jeu de variables CSS de la page hote. Ne pas charger en plus de
   shared.css (doublon inutile, jamais conflictuel). */
.lang-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  border-radius: 999px;
  font-family: var(--font-mono, "IBM Plex Mono", ui-monospace, monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-3, rgba(255, 255, 255, 0.55));
  user-select: none;
  isolation: isolate;
}
.lang-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-soft, rgba(255, 255, 255, 0.12));
  border-radius: 999px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}
.lang-toggle:has(.lang-toggle__btn[data-lang="en"].is-active)::after {
  transform: translateX(100%);
}
.lang-toggle__btn {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 36px;
  min-height: 32px;
  padding: 6px 10px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: inherit;
  line-height: 1;
  cursor: pointer;
  transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.lang-toggle__btn:hover:not(.is-active) { color: var(--text-1, #fff); }
.lang-toggle__btn.is-active { color: var(--text-1, #fff); }
.lang-toggle__btn:focus-visible {
  outline: 2px solid var(--violet-2, #a85ec0);
  outline-offset: 2px;
}
.lang-toggle__sep { display: none; }
/* Variant flottant : pages sans nav fixe (legales, secondaires auth). */
.lang-toggle--floating {
  position: fixed;
  top: max(env(safe-area-inset-top, 0px), 12px);
  right: max(env(safe-area-inset-right, 0px), 12px);
  z-index: 100;
  background: rgba(3, 4, 7, 0.72);
  border: 1px solid var(--line-soft, rgba(255, 255, 255, 0.12));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}
