/* Bayān Coran 10.57 — restauration du sélecteur de thèmes de la 10.52.
   Le module Coran reste autonome : aucun corpus retiré n'est réintroduit. */
body.app-quran .topbar>.topbar-tools{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  overflow:visible!important;
}
body.app-quran .topbar>.topbar-tools .theme-switcher{display:block!important;flex:0 0 auto!important}
body.app-quran .topbar>.topbar-tools .theme-trigger{white-space:nowrap!important}
body.app-quran .theme-panel{max-height:min(76vh,680px)!important;overflow:auto!important;overscroll-behavior:contain!important}

/* Entre tablette et petit desktop, la barre quran masque normalement topbar-tools.
   On garde uniquement le bouton Thème, positionné sans perturber la navbar. */
@media (max-width:1240px){
  body.app-quran .topbar{position:sticky!important}
  body.app-quran .topbar>.topbar-tools{
    display:flex!important;
    position:absolute!important;
    top:10px!important;
    right:12px!important;
    width:auto!important;
    max-width:none!important;
    min-width:0!important;
    z-index:120!important;
  }
  body.app-quran .topbar>.topbar-tools .data-status{display:none!important}
  body.app-quran .topbar>.brand{padding-right:58px!important}
}

@media (max-width:900px){
  body.app-quran .topbar>.topbar-tools{top:9px!important;right:10px!important}
  body.app-quran .topbar>.topbar-tools .theme-trigger{
    width:44px!important;height:44px!important;min-height:44px!important;padding:6px!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    border-radius:14px!important;
  }
  body.app-quran .topbar>.topbar-tools .theme-trigger-label,
  body.app-quran .topbar>.topbar-tools .theme-trigger-name{display:none!important}
  body.app-quran .theme-panel{max-height:calc(100dvh - 92px)!important}
}

/* Le panneau doit toujours passer au-dessus des résultats, lecteurs et barres flottantes. */
body.app-quran .theme-panel{z-index:1000000!important}
