/* ════════════════════════════════════════════════════
   Sélecteur de langue FR / EN — Foil Explore
   ════════════════════════════════════════════════════ */

#lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  position: relative;
}

#lang-switcher .lang-flag {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0.55;
  filter: grayscale(40%);
}

#lang-switcher .lang-flag:hover {
  opacity: 1;
  filter: grayscale(0%);
  background: rgba(255, 255, 255, 0.08);
}

#lang-switcher .lang-flag.is-active {
  opacity: 1;
  filter: grayscale(0%);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
}

#lang-switcher .lang-flag:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Loader pendant la traduction */
#lang-switcher.is-loading::after {
  content: '';
  position: absolute;
  right: -16px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: lang-spin 0.7s linear infinite;
}

#lang-switcher.is-loading .lang-flag {
  pointer-events: none;
  opacity: 0.4;
}

@keyframes lang-spin {
  to { transform: rotate(360deg); }
}

/* ── Variante mobile (dans le menu burger) ── */
.mmenu #lang-switcher {
  margin: 24px 0 0;
  justify-content: center;
  gap: 12px;
}

.mmenu #lang-switcher .lang-flag {
  font-size: 28px;
  padding: 8px 12px;
}
