/* Language switcher — segmented control in site header */

.lang-switcher.header-lang-switcher {
  --lang-switcher-track-bg: rgba(255, 255, 255, 0.14);
  --lang-switcher-track-border: rgba(255, 255, 255, 0.24);
  --lang-switcher-text: rgba(255, 255, 255, 0.88);
  --lang-switcher-text-hover: #fff;
  --lang-switcher-hover-bg: rgba(255, 255, 255, 0.1);
  --lang-switcher-active-bg: #fff;
  --lang-switcher-active-text: var(--brand-dark, #111);

  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  margin-right: 14px;
  padding: 3px;
  border-radius: 8px;
  background: var(--lang-switcher-track-bg);
  border: 1px solid var(--lang-switcher-track-border);
}

.lang-switcher__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--lang-switcher-text);
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.lang-switcher__option:hover {
  color: var(--lang-switcher-text-hover);
  background: var(--lang-switcher-hover-bg);
}

.lang-switcher__option:focus-visible {
  outline: 2px solid var(--brand-nav-text-hover, var(--color-accent, #949494));
  outline-offset: 2px;
}

.lang-switcher__option.is-active {
  background: var(--lang-switcher-active-bg);
  color: var(--lang-switcher-active-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.lang-switcher__option.is-active:hover {
  background: var(--lang-switcher-active-bg);
  color: var(--lang-switcher-active-text);
}

/* Sticky header — dark text on light background */
.header-duplicate .lang-switcher.header-lang-switcher {
  --lang-switcher-track-bg: rgba(0, 0, 0, 0.05);
  --lang-switcher-track-border: rgba(0, 0, 0, 0.1);
  --lang-switcher-text: rgba(17, 17, 17, 0.68);
  --lang-switcher-text-hover: var(--brand-dark, #111);
  --lang-switcher-hover-bg: rgba(0, 0, 0, 0.06);
  --lang-switcher-active-bg: var(--color-accent, var(--brand-primary, #333));
  --lang-switcher-active-text: #fff;
}

/* Header-2 — menu centré, langue + actions à droite (grid = hauteur préservée) */
@media (min-width: 992px) {
  .header-2 .header-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
  }

  .header-2 .header-wrapper > .site_logo {
    grid-column: 1;
    justify-self: start;
  }

  .header-2 .header-wrapper > .menu-area {
    grid-column: 2;
    justify-self: center;
  }

  .header-2 .header-wrapper > .header-right-group {
    grid-column: 3;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 14px;
  }

  .header-2 .header-wrapper > .mobile_menu_bar {
    grid-column: 3;
    justify-self: end;
  }

  .header-2 .header-right-item--lang {
    margin-left: 0;
    margin-right: 0;
  }

  .header-2 .lang-switcher.header-lang-switcher {
    margin-right: 0;
  }
}

@media (max-width: 991.98px) {
  .header-2 .header-wrapper > .header-right-group {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    margin-right: 8px;
  }

  .header-2 .header-right-item--lang {
    margin-left: 0;
    margin-right: 0;
  }

  .header-2 .lang-switcher.header-lang-switcher {
    margin-right: 0;
  }

  .lang-switcher__option {
    min-width: 40px;
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }
}
