/* Repère commun sans changement de largeur, hauteur, position ou visibilité. */
:root {
 --crm-lang-rest-bg:#182638;
 --crm-lang-rest-text:#dbe7f5;
 --crm-lang-rest-border:#64748b;
 --crm-lang-selected-bg:#30394f;
 --crm-lang-selected-text:#edf0f7;
 --crm-lang-selected-border:#77839d;
 --crm-lang-selected-line:#929bb1;
}
[data-theme="light"],body.light,body.light-mode,body.light-theme {
 --crm-lang-rest-bg:#edf3f9;
 --crm-lang-rest-text:#334155;
 --crm-lang-rest-border:#94a3b8;
 --crm-lang-selected-bg:#eae6f3;
 --crm-lang-selected-text:#514268;
 --crm-lang-selected-border:#b1a4c6;
 --crm-lang-selected-line:#9682b1;
}
html body :is(#btn_fr,#btn_ar,#btn_en,button,a)[data-crm-language-option] {
 opacity:1!important;
 text-decoration:none!important;
}
html body :is(#btn_fr,#btn_ar,#btn_en,button,a)[data-crm-language-option][aria-pressed="false"] {
 background:var(--crm-lang-rest-bg)!important;
 color:var(--crm-lang-rest-text)!important;
 -webkit-text-fill-color:var(--crm-lang-rest-text)!important;
 border-color:var(--crm-lang-rest-border)!important;
 box-shadow:none!important;
}
html body :is(#btn_fr,#btn_ar,#btn_en,button,a)[data-crm-language-option][aria-pressed="true"],
html body select[data-crm-language-select] {
 background:var(--crm-lang-selected-bg)!important;
 color:var(--crm-lang-selected-text)!important;
 -webkit-text-fill-color:var(--crm-lang-selected-text)!important;
 border-color:var(--crm-lang-selected-border)!important;
 box-shadow:inset 0 -2px 0 var(--crm-lang-selected-line)!important;
 text-shadow:none!important;
}
html body :is(#btn_fr,#btn_ar,#btn_en,button,a)[data-crm-language-option]:focus-visible,
html body select[data-crm-language-select]:focus-visible {
 outline:2px solid var(--crm-lang-selected-border)!important;
 outline-offset:3px!important;
}
@media(forced-colors:active) {
 html body :is(#btn_fr,#btn_ar,#btn_en,button,a)[data-crm-language-option][aria-pressed="true"],
 html body select[data-crm-language-select] {
  background:Highlight!important;
  color:HighlightText!important;
  -webkit-text-fill-color:HighlightText!important;
  border-color:Highlight!important;
  outline:2px solid Highlight!important;
 }
}

/* La barre harmonisée utilise deux identifiants via :is().
   Garder la même portée, puis préciser l'option et son état, pour que
   son fond générique et son survol ne masquent plus la sélection. */
html body :is(#nav-container .top-nav-utils,.top-nav-utils) .utils-row :is(#btn_fr,#btn_ar,#btn_en,.lang-btn)[data-crm-language-option][aria-pressed="true"] {
 background:var(--crm-lang-selected-bg)!important;
 background-image:none!important;
 color:var(--crm-lang-selected-text)!important;
 -webkit-text-fill-color:var(--crm-lang-selected-text)!important;
 border-color:var(--crm-lang-selected-border)!important;
 box-shadow:inset 0 -2px 0 var(--crm-lang-selected-line)!important;
}
html body :is(#nav-container .top-nav-utils,.top-nav-utils) .utils-row :is(#btn_fr,#btn_ar,#btn_en,.lang-btn)[data-crm-language-option][aria-pressed="false"] {
 background:var(--crm-lang-rest-bg)!important;
 background-image:none!important;
 color:var(--crm-lang-rest-text)!important;
 -webkit-text-fill-color:var(--crm-lang-rest-text)!important;
 border-color:var(--crm-lang-rest-border)!important;
 box-shadow:none!important;
}
@media(forced-colors:active) {
 html body :is(#nav-container .top-nav-utils,.top-nav-utils) .utils-row :is(#btn_fr,#btn_ar,#btn_en,.lang-btn)[data-crm-language-option][aria-pressed="true"] {
  background:Highlight!important;
  color:HighlightText!important;
  -webkit-text-fill-color:HighlightText!important;
  border-color:Highlight!important;
  outline:2px solid Highlight!important;
 }
}
