/* V114 - bandeau blanc supérieur réellement fixe
   Correction de la V113 : position: sticky pouvait être annulé par certains conteneurs.
   Cette version force un positionnement fixe + un espace de compensation. */
:root{
  --cfa360-fixed-topbar-height: 76px;
  --cfa360-fixed-topbar-z: 2147482500;
}

body.cfa360-fixed-topbar-active{
  scroll-padding-top: calc(var(--cfa360-fixed-topbar-height) + 18px) !important;
}

html.cfa360-fixed-topbar-active{
  scroll-padding-top: calc(var(--cfa360-fixed-topbar-height) + 18px) !important;
}

body.cfa360-fixed-topbar-active .cfa360-topbar{
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: none !important;
  z-index: var(--cfa360-fixed-topbar-z) !important;
  background: rgba(255,255,255,.98) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(215,226,242,.98) !important;
  box-shadow: 0 10px 28px rgba(15,45,84,.12) !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible !important;
  isolation: isolate !important;
}

body.cfa360-fixed-topbar-active .cfa360-topbar::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:1px;
  background:linear-gradient(90deg, rgba(0,59,113,.20), rgba(242,140,27,.24), rgba(0,59,113,.12));
  pointer-events:none;
}

body.cfa360-fixed-topbar-active .cfa360-topbar img,
body.cfa360-fixed-topbar-active .cfa360-topbar a,
body.cfa360-fixed-topbar-active .cfa360-topbar button,
body.cfa360-fixed-topbar-active .cfa360-topbar .topbar-actions{
  position: relative;
  z-index: 1;
}

/* Les éléments de contenu restent sous le bandeau. */
body.cfa360-fixed-topbar-active .shell,
body.cfa360-fixed-topbar-active .bilan-page-shell,
body.cfa360-fixed-topbar-active .cfa360-role-home,
body.cfa360-fixed-topbar-active .cfa360-apprenti-home,
body.cfa360-fixed-topbar-active .formateur-flow-home,
body.cfa360-fixed-topbar-active .formateur-domain-home,
body.cfa360-fixed-topbar-active .formateur-competence-shell,
body.cfa360-fixed-topbar-active .cfa360-preuves-home,
body.cfa360-fixed-topbar-active .messages-simple-shell,
body.cfa360-fixed-topbar-active main{
  position: relative;
  z-index: 1;
}

/* Les fenêtres doivent rester au-dessus du bandeau. */
body.cfa360-fixed-topbar-active .bilan-export-modal,
body.cfa360-fixed-topbar-active .bilan-signature-modal,
body.cfa360-fixed-topbar-active .formateur-eval-modal,
body.cfa360-fixed-topbar-active .eval-modal,
body.cfa360-fixed-topbar-active .modal,
body.cfa360-fixed-topbar-active [role="dialog"]{
  z-index: 2147483000 !important;
}

@media (max-width:760px){
  :root{--cfa360-fixed-topbar-height: 68px;}
  body.cfa360-fixed-topbar-active .cfa360-topbar{
    box-shadow: 0 8px 22px rgba(15,45,84,.13) !important;
  }
}

@media print{
  body.cfa360-fixed-topbar-active{
    padding-top: 0 !important;
  }
  body.cfa360-fixed-topbar-active .cfa360-topbar{
    position: static !important;
    box-shadow: none !important;
  }
}
