/* V113 - bandeau supérieur toujours visible
   Objectif : garder le bandeau blanc CFA360 visible pendant le défilement sur toutes les pages. */
:root{
  --cfa360-sticky-topbar-z: 9000;
  --cfa360-sticky-topbar-bg: rgba(255,255,255,.96);
  --cfa360-sticky-topbar-border: rgba(215,226,242,.95);
  --cfa360-sticky-topbar-shadow: 0 10px 26px rgba(15,45,84,.10);
}

html{
  scroll-padding-top: 92px;
}

body .cfa360-topbar{
  position: sticky !important;
  top: 0 !important;
  z-index: var(--cfa360-sticky-topbar-z) !important;
  background: var(--cfa360-sticky-topbar-bg) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--cfa360-sticky-topbar-border) !important;
  box-shadow: var(--cfa360-sticky-topbar-shadow) !important;
  isolation: isolate;
}

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

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

/* Le bandeau reste visible aussi dans les variantes bilans/preuves. */
body .cfa360-topbar.bilan-clean-topbar,
body .cfa360-topbar.preuves-clean-topbar{
  position: sticky !important;
  top: 0 !important;
}

/* Évite que le bandeau soit recouvert par des cartes animées ou éléments transformés. */
.shell,
.bilan-page-shell,
.cfa360-role-home,
.cfa360-apprenti-home,
.formateur-flow-home,
.formateur-domain-home,
.formateur-competence-shell,
.cfa360-preuves-home,
.messages-simple-shell{
  position: relative;
  z-index: 1;
}

/* Les fenêtres/modales doivent rester au-dessus du bandeau. */
.bilan-export-modal,
.bilan-signature-modal,
.formateur-eval-modal,
.eval-modal,
.modal,
[role="dialog"]{
  z-index: 10000;
}

@supports (top: env(safe-area-inset-top)){
  body .cfa360-topbar{
    top: env(safe-area-inset-top) !important;
  }
}

@media (max-width: 760px){
  html{scroll-padding-top: 82px;}
  body .cfa360-topbar{
    box-shadow: 0 8px 20px rgba(15,45,84,.11) !important;
  }
}
