/* ═══════════════════════════════════════════════════
   Vantex Finance — i18n Switcher Styles
   S'intègre dans header.php ou en <style> séparé
   ═══════════════════════════════════════════════════ */

/* ── Conteneur principal ── */
.i18n-switcher {
  position: relative;
  z-index: 1100;
  font-family: 'Sora', sans-serif;
}

/* ── Bouton actif ── */
.i18n-current {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: 8px;
  color: rgba(255,255,255,0.9);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: 'Sora', sans-serif;
}
.i18n-current:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
}

/* Variante navbar (fond blanc) */
.navbar .i18n-current {
  background: rgba(11,31,75,0.06);
  border-color: var(--gray-light, #e2e8f0);
  color: var(--navy, #0b1f4b);
}
.navbar .i18n-current:hover {
  background: var(--light, #f0f4fb);
  border-color: var(--blue, #1a56db);
}

/* Chevron animé */
.i18n-chevron {
  font-size: 10px;
  transition: transform 0.25s ease;
  opacity: 0.7;
}
.i18n-switcher.open .i18n-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown ── */
.i18n-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid var(--gray-light, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(11,31,75,0.15);
  padding: 6px;
  min-width: 160px;
  list-style: none;
  /* Fermé */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity    0.22s ease,
    transform  0.22s ease,
    visibility 0s linear 0.22s;
  pointer-events: none;
}
.i18n-switcher.open .i18n-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity   0.22s ease,
    transform 0.22s ease,
    visibility 0s linear 0s;
  pointer-events: auto;
}

/* ── Option ── */
.i18n-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
}
.i18n-option:hover {
  background: #f0f4fb;
  color: #1a56db;
}
.i18n-option.active {
  background: rgba(26,86,219,0.08);
  color: #1a56db;
  font-weight: 700;
}
.i18n-option .fa-check {
  margin-left: auto;
  font-size: 11px;
  color: #1a56db;
}

/* ── Emoji drapeau ── */
.i18n-flag {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

/* ── Responsive mobile ── */
@media (max-width: 768px) {
  .i18n-dropdown {
    right: 0;
    left: auto;
  }

  /* Version dans la topbar mobile */
  .topbar .i18n-current {
    padding: 5px 10px;
    font-size: 12.5px;
  }
  .i18n-label {
    display: none;  /* Masque le texte, garde juste l'emoji */
  }
}

/* ═══════════════════════════════════════════════════
   Transitions de page (optionnel)
   Ajoute un fade lors du changement de langue
   ═══════════════════════════════════════════════════ */
.i18n-transition {
  animation: i18n-fade 0.25s ease;
}
@keyframes i18n-fade {
  from { opacity: 0.3; }
  to   { opacity: 1; }
}
