/* Le Communal — language switch: the header shows the current language (FR ▾)
   and opens a menu of every language by its own name. i18n/build.py writes the
   markup from i18n/languages.json; assets/lang.js runs the menu. Without
   scripting (or the scripting media query) the links sit inline instead.
   See docs/language-switcher-design.md. */
.hd .hd-lang { position: relative; pointer-events: auto; }
.hd-dark .hd-lang { pointer-events: none; }
.hd-lang-btn {
  display: none; align-items: center; gap: 4px;
  margin: 0; padding: 10px 0 10px 10px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 400; letter-spacing: 0.32em; color: inherit;
}
.hd-lang-btn:hover { color: var(--gold); }
.hd-lang-btn:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
.hd-lang-arrow { transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1); }
.hd-lang.is-open .hd-lang-arrow { transform: rotate(180deg); }
.hd-lang-list { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; }
.hd-lang-list a { display: block; padding: 10px 0; font-size: 11px; font-weight: 400; letter-spacing: 0.32em; text-transform: uppercase; }
.hd-lang-list a:hover, .hd-lang-list a[aria-current] { color: var(--gold); }
.hd-lang-check { display: none; }
.lang-roman { opacity: 0.6; text-transform: none; letter-spacing: 0.04em; }
.menu-foot a[data-lang-switch] { color: var(--gold); }

@media (scripting: enabled) {
  .hd-lang-btn { display: inline-flex; }
  .hd-lang-list {
    position: absolute; top: calc(100% + 4px); right: 0; z-index: 1;
    display: block; min-width: 180px; padding: 8px 0; box-sizing: border-box;
    color: var(--white); background: var(--ink);
    border-top: 1px solid var(--gold);
    box-shadow: 0 14px 36px rgb(16 24 20 / 0.28);
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .hd-lang.is-open .hd-lang-list { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .hd-lang-list a {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 11px 22px; white-space: nowrap;
    font-size: 13px; font-weight: 300; letter-spacing: 0.08em; text-transform: none;
  }
  .hd-lang-list a:focus-visible { outline: none; color: var(--gold); background: rgb(254 253 254 / 0.05); }
  .hd-lang-list a:hover { background: rgb(254 253 254 / 0.05); }
  .hd-lang-check { display: block; flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hd-lang-list, .hd-lang-arrow { transition: none !important; }
}
