/* ========================================================================== */
/* URG360 v2.7.0-alpha3 — HOTFIX STABILISATION                               */
/* Régressions alpha2 constatées en recette réelle : footer de dialogue       */
/* masqué par le mode Patient, rappel constantes recouvert au scroll,         */
/* contraste du bouton Plan de soins dans la navigation latérale.             */
/* ========================================================================== */

/* 1. Les dialogues sont hors du footer de page : leurs actions doivent rester
      visibles dans l'espace Patient. Cette règle défensive complète la
      correction du sélecteur générique dans v260-patient-shell.css. */
body.urg-v26-patient-focus .u360d-shell > .u360d-footer{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  flex:0 0 auto!important;
  position:relative!important;
  bottom:auto!important;
  z-index:50!important;
  min-height:58px!important;
  padding:10px 20px!important;
  background:#fbfdff!important;
  border-top:1px solid #cbd9e3!important;
  box-shadow:0 -4px 14px rgba(12,48,76,.05)!important;
}
body.urg-v26-patient-focus .u360d-shell > .u360d-footer button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:38px!important;
}
body.urg-v26-patient-focus .u360d-shell > .u360d-footer .u360d-primary{
  background:#1479c9!important;
  border-color:#1479c9!important;
  color:#fff!important;
}

/* 2. En-tête patient + rappel constantes = pile sticky cohérente.
      Le rappel ne peut plus passer derrière l'identité lors d'un scroll. */
#v26PrescriptionLabView.v26-patient-focus .v26-patient-banner{
  position:sticky!important;
  top:var(--urg-topbar,64px)!important;
  z-index:31!important;
}
#v26PrescriptionLabView.v26-patient-focus .v26-latest-vitals-banner{
  position:sticky!important;
  top:calc(var(--urg-topbar,64px) + 54px)!important;
  z-index:30!important;
  margin:0!important;
  box-shadow:0 3px 10px rgba(17,54,84,.05)!important;
}
#v26PrescriptionLabView.v26-patient-focus.v26-no-vitals-reminder .v26-latest-vitals-banner{
  display:none!important;
}

/* 3. La règle historique .has-plan était plus spécifique que la nouvelle
      sidebar et rendait "Plan de soins" presque illisible hors onglet actif. */
#v26PrescriptionLabView.v26-patient-focus .v26-patient-nav .v26-workspace-tabs button.has-plan:not(.active){
  background:transparent!important;
  border-color:transparent!important;
  color:#e6f0fa!important;
}
#v26PrescriptionLabView.v26-patient-focus .v26-patient-nav .v26-workspace-tabs button.has-plan:not(.active):hover{
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
}
#v26PrescriptionLabView.v26-patient-focus .v26-patient-nav .v26-workspace-tabs button.has-plan .v26-tab-count{
  color:#0b4f89!important;
  background:#d9edf9!important;
}

/* 4. Le corps des fenêtres reste scrollable si nécessaire ; le footer garde
      toujours sa place dans le flex du dialogue. */
body.urg-v26-patient-focus .u360d-shell{
  display:flex!important;
  flex-direction:column!important;
  max-height:calc(100vh - 30px)!important;
  overflow:hidden!important;
}
body.urg-v26-patient-focus .u360d-shell > .u360d-body{
  min-height:0!important;
  overflow:auto!important;
}
body.urg-v26-patient-focus .u360d-shell.v26-monitoring-shell-v4{
  height:auto!important;
  max-height:calc(100vh - 30px)!important;
}

@media(max-width:900px){
  #v26PrescriptionLabView.v26-patient-focus .v26-latest-vitals-banner{
    position:relative!important;
    top:auto!important;
  }
  #v26PrescriptionLabView.v26-patient-focus .v26-patient-banner{
    position:relative!important;
    top:auto!important;
  }
}
