/* V177 - En-tete uniforme sur toutes les pages CFA360. */
:root{
  --cfa360-unified-topbar-height:76px;
  --cfa360-unified-blue:#003b71;
  --cfa360-unified-orange:#ff8a1f;
  --cfa360-unified-border:#d8e6f8;
  --cfa360-unified-shadow:0 10px 28px rgba(15,45,84,.12);
}

html.cfa360-header-uniform-v177,
body.cfa360-header-uniform-v177{
  scroll-padding-top:calc(var(--cfa360-unified-topbar-height) + 18px)!important;
}

body.cfa360-header-uniform-v177 .cfa360-topbar{
  min-height:var(--cfa360-unified-topbar-height)!important;
  width:100%!important;
  max-width:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  padding:10px clamp(14px,3vw,32px)!important;
  background:rgba(255,255,255,.98)!important;
  border:0!important;
  border-bottom:1px solid var(--cfa360-unified-border)!important;
  border-radius:0!important;
  box-shadow:var(--cfa360-unified-shadow)!important;
  color:var(--cfa360-unified-blue)!important;
  overflow:visible!important;
  isolation:isolate!important;
}

body.cfa360-header-uniform-v177 .cfa360-topbar::after{
  display:none!important;
  content:none!important;
}

body.cfa360-header-uniform-v177 .cfa360-topbar .cfa360-institution{
  min-width:0!important;
  flex:0 0 auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  text-decoration:none!important;
}

body.cfa360-header-uniform-v177 .cfa360-topbar .cfa360-institution img{
  width:auto!important;
  height:54px!important;
  max-width:min(250px,38vw)!important;
  object-fit:contain!important;
  display:block!important;
}

body.cfa360-header-uniform-v177 .cfa360-unified-actions-v177{
  min-width:0!important;
  margin-left:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  flex-wrap:wrap!important;
}

body.cfa360-header-uniform-v177 .cfa360-topbar .role-top-actions,
body.cfa360-header-uniform-v177 .cfa360-topbar .cfa360-top-actions,
body.cfa360-header-uniform-v177 .cfa360-topbar .admin-top-actions,
body.cfa360-header-uniform-v177 .cfa360-topbar .topbar-actions,
body.cfa360-header-uniform-v177 .cfa360-topbar .bilan-topbar-actions,
body.cfa360-header-uniform-v177 .cfa360-topbar .preuves-topbar-actions,
body.cfa360-header-uniform-v177 .cfa360-topbar .messages-topbar-actions{
  display:contents!important;
}

body.cfa360-header-uniform-v177 .cfa360-topbar .cfa360-top-action-v177,
body.cfa360-header-uniform-v177 .cfa360-topbar a:not(.cfa360-institution),
body.cfa360-header-uniform-v177 .cfa360-topbar button{
  min-height:42px!important;
  max-width:100%!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  padding:0 16px!important;
  border:1px solid var(--cfa360-unified-border)!important;
  border-radius:999px!important;
  background:#fff!important;
  color:var(--cfa360-unified-blue)!important;
  box-shadow:0 8px 20px rgba(0,40,90,.08)!important;
  font:inherit!important;
  font-size:.94rem!important;
  font-weight:900!important;
  line-height:1.1!important;
  letter-spacing:0!important;
  text-decoration:none!important;
  white-space:nowrap!important;
  cursor:pointer!important;
}

body.cfa360-header-uniform-v177 .cfa360-topbar .cfa360-top-action-v177:hover,
body.cfa360-header-uniform-v177 .cfa360-topbar a:not(.cfa360-institution):hover,
body.cfa360-header-uniform-v177 .cfa360-topbar button:hover{
  background:#f4f8ff!important;
  border-color:#bfd5f0!important;
  transform:translateY(-1px)!important;
}

body.cfa360-header-uniform-v177 .cfa360-topbar .role-logout-top,
body.cfa360-header-uniform-v177 .cfa360-topbar .logout-btn,
body.cfa360-header-uniform-v177 .cfa360-topbar .visites-logout-v163,
body.cfa360-header-uniform-v177 .cfa360-topbar [data-cfa360-logout="true"]{
  background:#f8fbff!important;
  border-color:#cfe0f4!important;
}

body.cfa360-header-uniform-v177 .cfa360-topbar[data-cfa360-action-count="many"] .cfa360-top-action-v177,
body.cfa360-header-uniform-v177 .cfa360-topbar[data-cfa360-action-count="many"] a:not(.cfa360-institution),
body.cfa360-header-uniform-v177 .cfa360-topbar[data-cfa360-action-count="many"] button{
  min-height:40px!important;
  padding:0 13px!important;
  font-size:.88rem!important;
}

body.cfa360-header-uniform-v177 .cfa360-hidden-duplicate-hero-v177{
  display:none!important;
}

body.cfa360-header-uniform-v177 .role-hero-zone,
body.cfa360-header-uniform-v177 .apprenti-hero-zone,
body.cfa360-header-uniform-v177 .bilan-hero-zone,
body.cfa360-header-uniform-v177 .preuves-hero-zone,
body.cfa360-header-uniform-v177 .messages-hero-zone{
  max-width:1180px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

@media(max-width:860px){
  :root{--cfa360-unified-topbar-height:70px;}

  body.cfa360-header-uniform-v177 .cfa360-topbar{
    align-items:flex-start!important;
    gap:10px!important;
    padding:9px 12px!important;
  }

  body.cfa360-header-uniform-v177 .cfa360-topbar .cfa360-institution img{
    height:46px!important;
    max-width:190px!important;
  }

  body.cfa360-header-uniform-v177 .cfa360-unified-actions-v177{
    flex:1 1 auto!important;
    gap:8px!important;
  }

  body.cfa360-header-uniform-v177 .cfa360-topbar .cfa360-top-action-v177,
  body.cfa360-header-uniform-v177 .cfa360-topbar a:not(.cfa360-institution),
  body.cfa360-header-uniform-v177 .cfa360-topbar button{
    min-height:38px!important;
    padding:0 11px!important;
    font-size:.84rem!important;
  }
}

@media(max-width:640px){
  body.cfa360-header-uniform-v177 .cfa360-topbar{
    flex-direction:column!important;
    align-items:stretch!important;
  }

  body.cfa360-header-uniform-v177 .cfa360-unified-actions-v177{
    width:100%!important;
    margin-left:0!important;
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    padding-bottom:4px!important;
    scrollbar-width:thin!important;
  }

  body.cfa360-header-uniform-v177 .cfa360-unified-actions-v177>*{
    flex:0 0 auto!important;
  }
}

@media print{
  body.cfa360-header-uniform-v177 .cfa360-topbar{
    position:static!important;
    box-shadow:none!important;
  }
}

/* V177 - Gabarit unique pour le logo CFA360 et le bloc de titre des pages. */
:root{
  --cfa360-page-logo-width:300px;
  --cfa360-page-logo-height:104px;
  --cfa360-page-title-max:760px;
  --cfa360-page-heading-gap:8px;
  --cfa360-page-heading-bottom:28px;
}

body.cfa360-header-uniform-v177 .role-hero-zone,
body.cfa360-header-uniform-v177 .apprenti-hero-zone,
body.cfa360-header-uniform-v177 .bilan-hero-zone,
body.cfa360-header-uniform-v177 .preuves-hero-zone,
body.cfa360-header-uniform-v177 .messages-hero-zone{
  width:min(1180px, calc(100% - 32px))!important;
  max-width:1180px!important;
  margin:0 auto var(--cfa360-page-heading-bottom)!important;
  padding:18px 16px 4px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:var(--cfa360-page-heading-gap)!important;
  text-align:center!important;
  color:#fff!important;
  box-sizing:border-box!important;
}

body.cfa360-header-uniform-v177 .role-main-logo,
body.cfa360-header-uniform-v177 .apprenti-main-logo,
body.cfa360-header-uniform-v177 .bilan-hero-logo,
body.cfa360-header-uniform-v177 .preuves-hero-logo,
body.cfa360-header-uniform-v177 .messages-hero-logo,
body.cfa360-header-uniform-v177 .messages-modern-logo{
  width:var(--cfa360-page-logo-width)!important;
  height:var(--cfa360-page-logo-height)!important;
  max-width:min(var(--cfa360-page-logo-width), 72vw)!important;
  max-height:var(--cfa360-page-logo-height)!important;
  object-fit:contain!important;
  object-position:center!important;
  display:block!important;
  margin:0 auto 6px!important;
  filter:drop-shadow(0 16px 30px rgba(0,0,0,.18))!important;
  flex:0 0 auto!important;
}

body.cfa360-header-uniform-v177 .role-heading-row,
body.cfa360-header-uniform-v177 .formateur-dashboard-heading,
body.cfa360-header-uniform-v177 .bilan-title-block,
body.cfa360-header-uniform-v177 .messages-modern-titleblock{
  width:min(100%, var(--cfa360-page-title-max))!important;
  max-width:var(--cfa360-page-title-max)!important;
  margin:0 auto!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:6px!important;
  text-align:center!important;
}

body.cfa360-header-uniform-v177 .role-heading-text{
  width:100%!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  gap:4px!important;
  text-align:center!important;
}

body.cfa360-header-uniform-v177 .role-kicker,
body.cfa360-header-uniform-v177 .apprenti-kicker,
body.cfa360-header-uniform-v177 .bilan-eyebrow,
body.cfa360-header-uniform-v177 .messages-modern-titleblock .eyebrow,
body.cfa360-header-uniform-v177 .visites-hero-text-v163 .eyebrow{
  margin:0!important;
  color:var(--cfa360-unified-orange)!important;
  font-size:.86rem!important;
  font-weight:950!important;
  line-height:1.15!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
}

body.cfa360-header-uniform-v177 .role-user-name,
body.cfa360-header-uniform-v177 .bilan-student-name,
body.cfa360-header-uniform-v177 .messages-modern-titleblock h1,
body.cfa360-header-uniform-v177 .visites-hero-text-v163 h1{
  margin:0!important;
  color:inherit!important;
  font-size:clamp(2.25rem, 4vw, 3.3rem)!important;
  font-weight:950!important;
  line-height:1.03!important;
  letter-spacing:0!important;
  text-wrap:balance!important;
}

body.cfa360-header-uniform-v177 .role-lead,
body.cfa360-header-uniform-v177 .apprenti-lead,
body.cfa360-header-uniform-v177 .bilan-page-context-v88,
body.cfa360-header-uniform-v177 .formateur-dashboard-lead,
body.cfa360-header-uniform-v177 .messages-modern-titleblock p:not(.eyebrow),
body.cfa360-header-uniform-v177 .visites-hero-text-v163 p:not(.eyebrow){
  width:min(100%, var(--cfa360-page-title-max))!important;
  margin:0 auto!important;
  color:rgba(255,255,255,.92)!important;
  font-size:1rem!important;
  font-weight:800!important;
  line-height:1.38!important;
  letter-spacing:0!important;
  text-align:center!important;
  text-wrap:balance!important;
}

body.cfa360-header-uniform-v177 .bilan-title-block .bilan-page-context-v88{
  margin-top:2px!important;
}

/* Pages avec un en-tete special : visites et messagerie. */
body.cfa360-header-uniform-v177 .visites-hero-v163{
  width:100%!important;
  margin:0 0 var(--cfa360-page-heading-bottom)!important;
  padding:18px 18px 14px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  text-align:center!important;
  box-sizing:border-box!important;
}

body.cfa360-header-uniform-v177 .visites-hero-logo-v163{
  width:var(--cfa360-page-logo-width)!important;
  height:var(--cfa360-page-logo-height)!important;
  max-width:min(var(--cfa360-page-logo-width), 72vw)!important;
  margin:0 auto 6px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}

body.cfa360-header-uniform-v177 .visites-hero-logo-v163 img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  display:block!important;
  filter:drop-shadow(0 16px 30px rgba(0,0,0,.18))!important;
}

body.cfa360-header-uniform-v177 .visites-hero-text-v163{
  width:min(100%, var(--cfa360-page-title-max))!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  gap:6px!important;
  text-align:center!important;
}

body.cfa360-header-uniform-v177 .visites-hero-actions-v163{
  width:min(100%, 520px)!important;
  margin-top:8px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  flex-wrap:wrap!important;
}

body.cfa360-header-uniform-v177 .messages-simple-brand{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  text-align:center!important;
}

body.cfa360-header-uniform-v177 .messages-modern-titleblock h1{
  color:var(--cfa360-unified-blue)!important;
  font-size:clamp(1.85rem, 3vw, 2.45rem)!important;
}

body.cfa360-header-uniform-v177 .messages-modern-titleblock p:not(.eyebrow){
  color:#476586!important;
}

/* En-tetes de cartes internes : meme police, meme respiration. */
body.cfa360-header-uniform-v177 .dashboard-header,
body.cfa360-header-uniform-v177 .tutor-header,
body.cfa360-header-uniform-v177 .tuteur-simple-header,
body.cfa360-header-uniform-v177 .visites-header{
  gap:16px!important;
}

body.cfa360-header-uniform-v177 .dashboard-header .eyebrow,
body.cfa360-header-uniform-v177 .tutor-header .eyebrow,
body.cfa360-header-uniform-v177 .tuteur-simple-header .eyebrow,
body.cfa360-header-uniform-v177 .visites-header .eyebrow{
  margin:0 0 6px!important;
  color:var(--cfa360-unified-orange)!important;
  font-size:.82rem!important;
  font-weight:950!important;
  line-height:1.15!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
}

body.cfa360-header-uniform-v177 .dashboard-header h1,
body.cfa360-header-uniform-v177 .dashboard-header h2,
body.cfa360-header-uniform-v177 .tutor-header h1,
body.cfa360-header-uniform-v177 .tutor-header h2,
body.cfa360-header-uniform-v177 .tuteur-simple-header h1,
body.cfa360-header-uniform-v177 .tuteur-simple-header h2,
body.cfa360-header-uniform-v177 .visites-header h1,
body.cfa360-header-uniform-v177 .visites-header h2{
  margin:0!important;
  color:var(--cfa360-unified-blue)!important;
  font-size:clamp(2rem, 3vw, 2.85rem)!important;
  font-weight:950!important;
  line-height:1.05!important;
  letter-spacing:0!important;
  text-wrap:balance!important;
}

body.cfa360-header-uniform-v177 .dashboard-header .header-text,
body.cfa360-header-uniform-v177 .tutor-header .header-text,
body.cfa360-header-uniform-v177 .tuteur-simple-header .header-text,
body.cfa360-header-uniform-v177 .visites-header .header-text,
body.cfa360-header-uniform-v177 .dashboard-header .panel-subtext,
body.cfa360-header-uniform-v177 .tutor-header .panel-subtext,
body.cfa360-header-uniform-v177 .tuteur-simple-header .panel-subtext,
body.cfa360-header-uniform-v177 .visites-header .panel-subtext{
  margin:8px 0 0!important;
  color:#35557a!important;
  font-size:.98rem!important;
  font-weight:750!important;
  line-height:1.38!important;
  letter-spacing:0!important;
}

/* Petit en-tete de navigation laterale : dimensions coherentes quand il reste visible. */
body.cfa360-header-uniform-v177 .sidebar-top{
  gap:12px!important;
  align-items:center!important;
}

body.cfa360-header-uniform-v177 .sidebar-logo-box{
  width:74px!important;
  height:54px!important;
  min-width:74px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
}

body.cfa360-header-uniform-v177 .sidebar-logo{
  width:100%!important;
  height:100%!important;
  max-width:74px!important;
  max-height:54px!important;
  object-fit:contain!important;
  display:block!important;
}

body.cfa360-header-uniform-v177 .sidebar-title{
  margin:0!important;
  font-size:1.45rem!important;
  font-weight:950!important;
  line-height:1.05!important;
  letter-spacing:0!important;
}

body.cfa360-header-uniform-v177 .sidebar-subtitle{
  margin:.22rem 0 0!important;
  font-size:.9rem!important;
  font-weight:800!important;
  line-height:1.25!important;
  letter-spacing:0!important;
}

@media(max-width:760px){
  :root{
    --cfa360-page-logo-width:238px;
    --cfa360-page-logo-height:84px;
    --cfa360-page-heading-bottom:22px;
  }

  body.cfa360-header-uniform-v177 .role-hero-zone,
  body.cfa360-header-uniform-v177 .apprenti-hero-zone,
  body.cfa360-header-uniform-v177 .bilan-hero-zone,
  body.cfa360-header-uniform-v177 .preuves-hero-zone,
  body.cfa360-header-uniform-v177 .messages-hero-zone{
    width:min(calc(100% - 20px), 1180px)!important;
    padding:14px 8px 2px!important;
  }

  body.cfa360-header-uniform-v177 .role-user-name,
  body.cfa360-header-uniform-v177 .bilan-student-name,
  body.cfa360-header-uniform-v177 .visites-hero-text-v163 h1{
    font-size:clamp(1.85rem, 9vw, 2.45rem)!important;
  }

  body.cfa360-header-uniform-v177 .dashboard-header h1,
  body.cfa360-header-uniform-v177 .dashboard-header h2,
  body.cfa360-header-uniform-v177 .tutor-header h1,
  body.cfa360-header-uniform-v177 .tutor-header h2,
  body.cfa360-header-uniform-v177 .tuteur-simple-header h1,
  body.cfa360-header-uniform-v177 .tuteur-simple-header h2,
  body.cfa360-header-uniform-v177 .visites-header h1,
  body.cfa360-header-uniform-v177 .visites-header h2{
    font-size:clamp(1.55rem, 7vw, 2.15rem)!important;
  }
}
