/* ========================================================================== */
/* URG360 v2.7.0-alpha2 — STABILISATION UX                                   */
/* Correctifs ciblés : dialogues/actions toujours visibles + constantes       */
/* contextuelles robustes. Feuille chargée en dernier pour limiter les        */
/* régressions liées aux feuilles historiques.                                */
/* ========================================================================== */

/* --- Dialogues : ne jamais perdre les actions en bas de fenêtre. --- */
.u360d-shell{
  min-height:0!important;
  max-height:calc(100vh - 36px)!important;
}
.u360d-head,
.u360d-error,
.u360d-footer{
  flex:0 0 auto!important;
}
.u360d-body{
  min-height:0!important;
  overflow:auto!important;
}
.u360d-footer{
  display:flex!important;
  position:sticky!important;
  bottom:0!important;
  z-index:40!important;
  padding:12px 20px!important;
  border-top:1px solid #cbd9e3!important;
  background:#fbfdff!important;
  box-shadow:0 -5px 16px rgba(12,48,76,.06)!important;
}
.u360d-footer button{
  min-height:38px!important;
}
.u360d-footer .u360d-primary{
  box-shadow:0 2px 5px rgba(13,112,182,.16);
}

/* Les fenêtres XL de surveillance ne réservent plus un grand vide vertical :
   elles s'adaptent au contenu, puis scrollent si l'écran devient trop petit. */
.u360d-shell.v26-monitoring-shell-v4{
  height:auto!important;
  max-height:calc(100vh - 30px)!important;
}
.u360d-shell.v26-monitoring-shell-v4 .u360d-body{
  flex:1 1 auto!important;
  overflow:auto!important;
}
.u360d-shell.v26-monitoring-shell-v4 .u360d-footer{
  padding:10px 20px!important;
}

/* --- Bandeau de constantes : rappel compact mais jamais écrasé/coupé. --- */
#v26PrescriptionLabView.v26-patient-focus .v26-latest-vitals-banner{
  display:block;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  position:relative;
  z-index:2;
}
#v26PrescriptionLabView.v26-patient-focus .v26-latest-vitals-head{
  display:flex!important;
  height:auto!important;
  min-height:22px!important;
  overflow:visible!important;
}
#v26PrescriptionLabView.v26-patient-focus .v26-latest-vitals-grid{
  display:grid!important;
  height:auto!important;
  min-height:50px!important;
  max-height:none!important;
  overflow:visible!important;
  align-items:stretch!important;
}
#v26PrescriptionLabView.v26-patient-focus .v26-latest-vital{
  display:grid!important;
  min-height:48px!important;
  height:auto!important;
  overflow:hidden!important;
}
/* Règle métier UX conservée : pas de doublon dans Pancarte / Timeline / Audit. */
#v26PrescriptionLabView.v26-patient-focus.v26-no-vitals-reminder .v26-latest-vitals-banner{
  display:none!important;
}

/* --- Shell patient : éviter qu'un élément permanent recouvre le suivant. --- */
#v26PrescriptionLabView.v26-patient-focus .v26-patient-banner{
  position:relative;
  z-index:3;
  height:auto!important;
}
#v26PrescriptionLabView.v26-patient-focus .v26-patient-main{
  overflow:visible!important;
}
#v26PrescriptionLabView.v26-patient-focus .v26-tab-pane{
  position:relative;
  z-index:1;
}

/* Les actions importantes doivent rester des boutons visuellement identifiables. */
#v26PrescriptionLabView.v26-patient-focus button.primary,
#v26PrescriptionLabView.v26-patient-focus .primary{
  font-weight:850;
}

@media(max-width:900px){
  .u360d-footer{position:sticky!important;bottom:0!important}
  #v26PrescriptionLabView.v26-patient-focus .v26-latest-vitals-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}
