/* ════════════════════════════════════════════════
   SÉLECTEUR DE LANGUE « FR | EN » (rendu par /js/i18n.js)
   ════════════════════════════════════════════════
   Placement : <div data-lang-switch></div> dans la navigation, à côté de la
   bascule de thème ; variante tactile .lang-switch--large dans les menus
   mobiles (cibles de 44 px). Jetons de brand.css uniquement : le thème
   sombre suit tout seul. État porté par aria-pressed (posé par le script). */

.lang-switch {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 2px;
  gap: 2px;
  border: 1px solid var(--border-strong, #CBD5E1);
  border-radius: var(--radius-pill, 999px);
  background: var(--surface, #FFFFFF);
}

/* Sans JavaScript, le conteneur reste vide : on ne réserve aucune place. */
[data-lang-switch]:empty { display: none; }

.lang-switch-btn {
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-pill, 999px);
  background: transparent;
  color: var(--text-muted, #556274);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.lang-switch-btn:hover { color: var(--brand-text, #0A5FD6); background: var(--surface-3, #E8F1FE); }

.lang-switch-btn[aria-pressed="true"],
.lang-switch-btn[aria-pressed="true"]:hover {
  background: var(--brand-strong, #0A5FD6);
  color: var(--on-brand, #FFFFFF);
  cursor: default;
}

.lang-switch-btn:focus { outline: none; }
.lang-switch-btn:focus-visible { outline: none; box-shadow: var(--focus-ring, 0 0 0 3px rgba(18, 118, 245, .35)); }

/* Menus mobiles : cibles tactiles de 44 px. */
.lang-switch--large .lang-switch-btn { min-width: 52px; height: 40px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .lang-switch-btn { transition: none; }
}
