/* Défilement de la page et des fenêtres de saisie, y compris sous Edge. */
html{height:auto;min-height:100%;overflow-y:auto}
body{height:auto;min-height:100vh}
.sidebar .navscroll{flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-width:auto}
.sidebar .navscroll::-webkit-scrollbar{display:block;width:8px}
.sidebar .navscroll::-webkit-scrollbar-thumb{background:rgba(255,255,255,.35);border-radius:8px}

#modalRoot .modal-back{
 top:0;right:0;bottom:0;left:0;
 display:flex;align-items:center;justify-content:center;
 min-height:0;overflow-y:auto;overscroll-behavior-y:auto;
}
#modalRoot .modal-back>.modal:not(.rdt-full-site162){
 display:flex;flex-direction:column;min-height:0;
 max-height:calc(100vh - 36px);
 max-height:calc(100dvh - 36px);
 overflow:hidden;
}
#modalRoot .modal-back>.modal:not(.rdt-full-site162)>.modal-head,
#modalRoot .modal-back>.modal:not(.rdt-full-site162)>.modal-foot{flex:0 0 auto}
#modalRoot .modal-back>.modal:not(.rdt-full-site162)>.modal-body{
 flex:1 1 auto;min-height:0;max-height:none;
 overflow-y:auto;overscroll-behavior-y:auto;scrollbar-width:auto;
 -webkit-overflow-scrolling:touch;
}
#modalRoot .modal-body::-webkit-scrollbar,
#modalRoot .rdt5172-rights-body::-webkit-scrollbar{display:block;width:10px}
#modalRoot .modal-body::-webkit-scrollbar-thumb,
#modalRoot .rdt5172-rights-body::-webkit-scrollbar-thumb{background:#a6b5aa;border-radius:8px}
#modalRoot .rdt5172-rights-body{min-height:0;overflow-y:auto;overscroll-behavior-y:auto}

@media(max-height:500px){
 #modalRoot .modal-back{padding:8px}
 #modalRoot .modal-back>.modal:not(.rdt-full-site162){max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}
 #modalRoot .modal-back>.modal:not(.rdt-full-site162)>.modal-head,
 #modalRoot .modal-back>.modal:not(.rdt-full-site162)>.modal-foot{padding-top:8px;padding-bottom:8px}
}

/* 5.1.264 : une page peut dépasser la hauteur de l'écran, sur tous les onglets. */
@media screen{
 html{height:auto!important;min-height:100%;overflow-y:auto!important}
 body{height:auto!important;min-height:100vh}
 .app>.main,body>.app>main{min-height:0;min-width:0}
 body #content.cockpit-content-compact{height:auto!important;max-height:none!important;overflow:visible!important;grid-template-rows:auto auto!important}
 .rdt-cockpit-viewport-5195{overflow-y:visible;max-height:none;overscroll-behavior-y:auto}
 .rdt-cockpit-canvas-5195{grid-template-rows:auto auto auto;min-height:0}
 .rh-attendance-scroll,.table-card,.tablewrap,.modal-body{overscroll-behavior-y:auto}
 html.rdt-embedded120{height:auto!important;overflow-y:auto!important}
 html.rdt-embedded120 body{height:auto!important;min-height:100vh;overflow:visible!important}
 #legacyFrame{display:block}
 /* The old editor uses direct modal children, rather than modal-head/body/foot. */
 #detailModal.modal,#detailModal .modal{max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior-y:auto}
}

/* 5.1.286 — restauration du défilement global.
   La page entière reste le conteneur de défilement. Aucune hauteur fixe sur .app/.main. */
@media screen{
  html{
    height:auto!important;
    min-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:scroll!important;
    scrollbar-width:auto!important;
  }
  body{
    height:auto!important;
    min-height:100vh!important;
    overflow-x:hidden!important;
  }
  body:not(.rdtq16-lock){overflow-y:visible!important}
  body:not(.workshop-standalone) .app{
    height:auto!important;
    min-height:100vh!important;
    overflow:visible!important;
  }
  body:not(.workshop-standalone) .main{
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }
  html::-webkit-scrollbar{display:block;width:12px}
  html::-webkit-scrollbar-thumb{background:#a6b5aa;border-radius:8px}
}
