/* Language switcher — EN · IT · FR · ES */
.lang-switch {
  position: relative;
  flex-shrink: 0;
  pointer-events: auto;
}

.lang-switch-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 52px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.25rem;
  line-height: 1;
}

#site-header:not(.scrolled) .lang-switch-toggle {
  color: var(--cream);
}

#site-header.scrolled .lang-switch-toggle {
  color: var(--ink);
}

.lang-switch.is-open .lang-switch-toggle {
  visibility: hidden;
  pointer-events: none;
  position: absolute;
}

.lang-switch-menu {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  min-width: 72px;
  margin: 0;
  padding: 0.45rem 0 0.35rem;
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 1200;
}

.lang-switch.is-open .lang-switch-menu {
  display: block;
}

.lang-switch-active {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.15rem 0.85rem 0.5rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  pointer-events: none;
}

.lang-switch-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0 0 0.35rem;
}

.lang-switch-options {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-switch-options li {
  margin: 0;
  padding: 0;
}

.lang-switch-option {
  display: block;
  width: 100%;
  padding: 0.45rem 0.85rem;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lang-switch-option:hover,
.lang-switch-option:focus-visible {
  background: rgba(89, 84, 52, 0.08);
  outline: none;
}

.lang-switch-option[hidden] {
  display: none !important;
}

.lang-switch-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.lang-switch.is-open .lang-switch-chevron {
  transform: rotate(180deg);
}

.lang-switch--mobile {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.lang-switch--mobile .lang-switch-toggle {
  color: var(--cream);
}

.lang-switch--mobile .lang-switch-menu {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

@media (max-width: 767px) {
  .header-right .lang-switch { display: none; }
}
