/* MATE language picker — shared between landing page and logged-in UI. */
.mate-lang-switch{
 display:inline-flex;
 flex:0 0 auto;
 align-items:center;
 gap:3px;
 padding:4px;
 border:1px solid rgba(151,203,238,.26);
 border-radius:999px;
 background:rgba(7,19,31,.82);
 color:#d0deec;
 box-shadow:0 4px 14px rgba(0,0,0,.12);
}
.mate-lang-switch button{
 border:0!important;
 border-radius:999px!important;
 min-width:35px;
 min-height:30px;
 padding:6px 8px!important;
 background:transparent!important;
 color:#a8b9ca!important;
 font:700 11px/1 system-ui,sans-serif!important;
 letter-spacing:.02em;
 cursor:pointer;
}
.mate-lang-switch button.active{
 background:rgba(101,226,186,.22)!important;
 color:#e7fff8!important;
 box-shadow:inset 0 0 0 1px rgba(101,226,186,.29);
}
.mate-lang-switch button:focus-visible{outline:2px solid #65e2ba;outline-offset:2px}
#mateLanding .ml-nav>a:last-of-type{font-size:13px;border-bottom:1px solid #ffffff40;padding:10px 0}
#mateLanding .ml-nav .mate-lang-switch{margin-left:auto}
body>main>header>.mate-lang-switch{margin-left:auto;align-self:center}
@media(max-width:850px){
 body>main>header>.mate-lang-switch{margin-left:8px}
 .mate-lang-switch button{min-width:31px;min-height:28px;padding:5px 6px!important}
}
@media(max-width:560px){
 #mateLanding .ml-nav{flex-wrap:wrap}
 #mateLanding .ml-nav .mate-lang-switch{margin-left:auto}
 #mateLanding .ml-nav>a:last-of-type{order:3;flex-basis:100%;width:max-content}
 body>main>header{gap:8px;min-width:0}
 body>main>header>div:not(.mate-lang-switch){display:none}
 body>main>header>span{min-width:0;line-height:1.25}
 body>main>header>.mate-lang-switch{margin-left:auto}
}

/* Découvrir masque body > main > header : rendre FR/EN dans l'en-tête visible
   sans remplacer ni cacher les actions existantes (Profils gardés, etc.). */
#content>.heading:has(>.mate-discover-heading-tools){gap:14px}
#content>.heading>.mate-discover-heading-tools{
 display:flex;
 align-items:center;
 justify-content:flex-end;
 flex-wrap:wrap;
 column-gap:14px;
 row-gap:8px;
 margin-left:auto;
 min-width:0;
}
#content>.heading>.mate-discover-heading-tools>.mate-lang-switch{margin:0}
@media(max-width:720px){
 #content>.heading:has(>.mate-discover-heading-tools){
  flex-wrap:wrap;
  align-items:flex-start;
 }
 #content>.heading>.mate-discover-heading-tools{
  width:100%;
  justify-content:flex-end;
  column-gap:12px;
 }
}

/* Minimal top-right language control: no duplicate page/context banners.
   Keep the header in the DOM so translation works on every desktop page. */
body>main>header.mate-language-header,
body.mate-immersive>main>header.mate-language-header{
 height:42px!important;
 min-height:42px!important;
 max-height:42px!important;
 padding:0!important;
 margin:0!important;
 border:0!important;
 border-radius:0!important;
 background:transparent!important;
 box-shadow:none!important;
 backdrop-filter:none!important;
 -webkit-backdrop-filter:none!important;
 display:flex;
 align-items:center!important;
 justify-content:flex-end!important;
}
body>main>header.mate-language-header>.mate-lang-switch{
 margin-left:auto;
}
/* Discover has its own language switch next to Saved Profiles. */
body.v99-discover>main>header.mate-language-header{
 display:none!important;
}
@media(max-width:850px){
 body.mate-mobile-chat>main>header.mate-language-header{
  display:none!important;
 }
 body>main>header.mate-language-header,
 body.mate-immersive>main>header.mate-language-header{
  height:38px!important;
  min-height:38px!important;
  max-height:38px!important;
 }
}
