/* Keep every language reachable on short desktop and mobile viewports. */
.lrh-header .lrh-language-list {
  box-sizing: border-box;
  max-height: min(560px, calc(100vh - 130px));
  max-height: min(560px, calc(100dvh - 130px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* French labels need extra room; keep the original single-row navigation. */
@media (min-width: 1101px) and (max-width: 1900px) {
  html[lang="fr"] .lemay-site .lrh-header {
    gap: min(clamp(12px, calc(18vw - 260px), 82px), clamp(36px, 4.2vw, 82px));
  }
  html[lang="fr"] .lrh-header .lrh-menu {
    column-gap: clamp(14px, calc(15vw - 151px), 44px);
  }
  html[lang="fr"] .lrh-header .lrh-nav-link {
    font-size: clamp(15px, 1.25vw, 24px);
  }
  html[lang="fr"] .lrh-header .lrh-tools { gap: clamp(8px, 1vw, 18px); }
  html[lang="fr"] .lrh-header .lrh-language > summary { padding-inline: clamp(12px, 1.2vw, 24px); }
}

/* Mirror the header controls and their panels only for Arabic. */
html[lang="ar"] .lrh-header .lrh-tools {
  margin-left: 0;
  margin-right: auto;
}
html[lang="ar"] .lrh-header .lrh-language-list {
  left: 0;
  right: auto;
}
html[lang="ar"] .lrh-header .lrh-search-form {
  left: 4vw;
  right: auto;
}
@media (max-width: 1100px) {
  html[lang="ar"] .lrh-header .lrh-search-form { left: 20px; }
}
