/* Compact FR/EN language switcher — always visible, far right of navbar */
.nav-lang-end {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center;
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: 0.35rem;
  padding-left: 0.45rem;
  border-left: 1px solid rgba(30, 64, 175, 0.18);
  position: relative;
  z-index: 1003;
}

.navbar.scrolled .nav-lang-end {
  border-left-color: rgba(255, 255, 255, 0.28);
}

.lang-switcher {
  display: inline-flex !important;
  gap: 0.25rem;
  align-items: center;
  flex-shrink: 0;
}

.lang-switcher-wrap {
  list-style: none;
}

.lang-switcher a,
.lang-switcher .lang-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  color: #1e40af !important;
  opacity: 1;
  border-radius: 6px;
  border: 1px solid rgba(30, 64, 175, 0.28);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  white-space: nowrap;
}

.navbar.scrolled .lang-switcher a,
.navbar.scrolled .lang-switcher .lang-btn {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

.lang-switcher a:hover,
.lang-switcher .lang-btn:hover {
  opacity: 1;
  background: #eff6ff;
  border-color: #1e40af;
}

.navbar.scrolled .lang-switcher a:hover,
.navbar.scrolled .lang-switcher .lang-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #fff;
}

.lang-switcher a.is-active,
.lang-switcher .lang-btn.is-active {
  opacity: 1;
  border-color: #1e40af;
  background: #dbeafe;
  box-shadow: inset 0 0 0 1px rgba(30, 64, 175, 0.15);
}

.navbar.scrolled .lang-switcher a.is-active,
.navbar.scrolled .lang-switcher .lang-btn.is-active {
  background: rgba(255, 255, 255, 0.3);
  border-color: #fff;
  box-shadow: none;
}

.lang-switcher .lang-code {
  font-size: 0.68rem;
  text-transform: uppercase;
}

.lang-switcher [aria-hidden="true"] {
  font-size: 0.95rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .nav-lang-end {
    margin-left: auto;
    margin-right: 0.45rem;
    padding-left: 0;
    border-left: none;
    order: 2;
  }

  .hamburger {
    order: 3;
  }

  .nav-logo {
    order: 1;
  }

  .lang-switcher a,
  .lang-switcher .lang-btn {
    padding: 0.34rem 0.42rem;
  }
}

/* Print toolbars (dépliant imprimable) */
.print-toolbar .lang-switcher a,
.print-toolbar .lang-btn {
  color: #1e40af !important;
  background: #fff;
  border: 1px solid rgba(30, 64, 175, 0.3);
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
}
