/* Visible mobile button boxes follow the existing magnifier, never enlarge it. */
@media(max-width:900px){
 html[data-visual-version] body header .bar .header-actions>a.header-client,
 html[data-visual-version] body header .bar .header-actions>button.menu{
  box-sizing:border-box!important;display:inline-flex!important;
  align-items:center!important;justify-content:center!important;align-self:center!important;
  height:36px!important;min-height:36px!important;max-height:36px!important;
  padding:6px 8px!important;line-height:16px!important;font-size:12px!important;
  margin-top:0!important;margin-bottom:0!important;
 }
}
/* Home flags precede Home in the same flex row, with their own reserved width. */
@media(min-width:901px){
 html body header .header-actions.has-language-flags>.language-switcher{
  position:static!important;inset:auto!important;transform:none!important;
  display:flex;flex:0 0 auto;order:-1;align-items:center;justify-content:center;
  gap:8px;margin:0 10px 0 0;padding:0;background:transparent;
 }
}

/* V531: mobile language choice returns to the top; the advice card is removed. */
@media(max-width:900px){
 html body .brice-guide-slot{display:none!important}
 html body .mobile-language-top{display:flex;justify-content:flex-end;align-items:center;box-sizing:border-box;width:100%;min-height:42px;padding:3px 16px;background:#fff}
 html body .mobile-language-top>.language-switcher{position:static;inset:auto;transform:none;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:8px;margin:0;padding:0;background:transparent;width:auto}
 html body .mobile-language-top>.language-switcher a{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:40px;height:34px;min-height:34px;padding:5px;border:1px solid #b7d1dd;border-radius:9px;background:#fff;box-shadow:none}
 html body .mobile-language-top>.language-switcher a[aria-current="page"]{border:2px solid #0875aa;background:#eaf7fc}
 html body .mobile-language-top>.language-switcher svg{display:block;width:28px;height:17px;border-radius:2px;filter:none}
 html body .mobile-language-top>.language-switcher a:focus-visible{outline:3px solid #0875aa;outline-offset:2px}
}
@media print{.mobile-language-top{display:none!important}}

/* Shared compact top spacing, preserving the header arrangement. */
@media(max-width:900px){
 html:root body:not(:has(main.home-premium)){padding-top:calc(env(safe-area-inset-top,0px) + 20px)!important}
 html:root body:not(:has(main.home-premium)) header .mobile-language-top{min-height:36px!important;padding:0 16px!important}
 html:root body:not(:has(main.home-premium)) header .bar{padding-top:8px!important}
}

/* On phones, language selection lives inside the menu, without its own header band. */
@media(max-width:900px){
 html:root body header .mobile-language-menu{display:block;position:static;width:100%;margin-top:8px;padding-top:8px;border-top:1px solid #d8e7ee}
 html:root body header .mobile-language-menu>.language-switcher{display:flex;position:static!important;inset:auto!important;transform:none!important;justify-content:flex-start;align-items:center;gap:10px;margin:0!important;padding:0!important;background:transparent!important}
 html:root body header .mobile-language-menu>.language-switcher a{display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;width:44px!important;height:34px!important;min-height:34px!important;margin:0!important;padding:6px!important;border-radius:8px!important;box-shadow:none!important;outline:none!important}
 html:root body header .mobile-language-menu>.language-switcher a[aria-current="page"]{border:2px solid #00a0d3!important;background:#eaf7fc!important}
 html:root body header .mobile-language-menu>.language-switcher a[aria-current="page"]::after{display:none!important}
 html:root body header .mobile-language-menu>.language-switcher svg{display:block!important;width:28px!important;height:17px!important;filter:none!important}
 html:root body header .mobile-language-menu>.language-switcher a:focus-visible{outline:3px solid #0875aa!important;outline-offset:2px!important}
}
