/* ==========================================================================
   uemi-platform.css — Compatibilité Windows / Linux de l'interface (2026-10-24).

   Responsabilité
     Feuille chargée AVANT toutes les autres par les gabarits racines (voir uemi-platform.js),
     active seulement quand html.uemi-classic-scrollbars est posée, c'est-à-dire quand les barres
     de défilement prennent réellement de la place (Windows, Linux, Mac « Toujours afficher »).
     Sur macOS par défaut (barres en surimpression), elle ne fait rien.

   Pourquoi
     Sous Windows, chaque zone défilante affiche une barre grise de ~17 px : bandeaux d'onglets
     défilants (Finance, Paramètres…), panneaux du constructeur, menu latéral. Sur Mac ces barres
     sont invisibles au repos, d'où une mise en forme qui paraît « cassée » sous Windows.

   Principes
     - Spécificité NULLE (:where) et chargement en tête : toute règle de page plus précise
       (barre masquée, barre colorée d'un composant) continue de l'emporter.
     - Chrome / Edge : pseudo-éléments ::-webkit-scrollbar (dès qu'un est défini, le pouce doit
       l'être aussi, sinon il devient invisible). On ne pose PAS scrollbar-width pour Chrome :
       il désactiverait les ::-webkit-scrollbar { display:none } existants des pages.
     - Firefox : scrollbar-width / scrollbar-color, isolés dans @supports (-moz-appearance).

   Documentation : docx/COMPATIBILITE_WINDOWS.md.
   ========================================================================== */

/* 1. Chrome / Edge sous Windows : barres fines et discrètes (10 px), pouce arrondi. */
:where(html.uemi-classic-scrollbars)::-webkit-scrollbar,
:where(html.uemi-classic-scrollbars) ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
  background-color: transparent;
}

:where(html.uemi-classic-scrollbars)::-webkit-scrollbar-track,
:where(html.uemi-classic-scrollbars) ::-webkit-scrollbar-track,
:where(html.uemi-classic-scrollbars)::-webkit-scrollbar-corner,
:where(html.uemi-classic-scrollbars) ::-webkit-scrollbar-corner {
  background-color: transparent;
}

:where(html.uemi-classic-scrollbars)::-webkit-scrollbar-thumb,
:where(html.uemi-classic-scrollbars) ::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 10px;
  background-color: rgba(100, 116, 139, .42);
  background-clip: padding-box;
}

:where(html.uemi-classic-scrollbars)::-webkit-scrollbar-thumb:hover,
:where(html.uemi-classic-scrollbars) ::-webkit-scrollbar-thumb:hover {
  background-color: rgba(100, 116, 139, .7);
}

/* 2. Firefox (Windows, Linux) : équivalent standard, sans toucher aux règles plus précises. */
@supports (-moz-appearance: none) {
  :where(html.uemi-classic-scrollbars),
  :where(html.uemi-classic-scrollbars) * {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, .5) transparent;
  }
}
