/**
 * CSF Formation Manager V8.5.1.0
 * Public Header, Sticky Navigation & Domain Page Polish
 */

body.csf-public-polish-v8510{
  --csf-wp-adminbar-height:0px;
  --csf-public-header-height:0px;
}

/* La barre WordPress reste ancrée au viewport. Cette règle reprend le contrat
   natif de WordPress et évite qu'un ancêtre Elementor transformé la déplace. */
body.csf-public-polish-v8510.admin-bar #wpadminbar{
  position:fixed !important;
  top:0 !important;
  right:0 !important;
  left:0 !important;
  z-index:999999 !important;
}

html:has(body.csf-public-polish-v8510.admin-bar){
  scroll-padding-top:calc(var(--csf-wp-adminbar-height, 32px) + var(--csf-public-header-height, 0px));
}

/* Le JS n'ajoute cette classe qu'aux éléments sticky réellement actifs dont
   l'offset est inférieur à la hauteur du bandeau WordPress. */
body.csf-public-polish-v8510 .csf-v8510-sticky-offset{
  top:var(--csf-wp-adminbar-height, 0px) !important;
}

body.csf-public-polish-v8510 .elementor-location-header{
  z-index:10020;
}

/* Finition « Formations du domaine » : hauteurs cohérentes et CTA alignés. */
body.csf-domain-public-v8510 .csf-domain-landing{
  width:100%;
}
body.csf-domain-public-v8510 .csf-domain-formations-grid{
  align-items:stretch;
  grid-auto-rows:1fr;
}
body.csf-domain-public-v8510 .csf-domain-formation-card{
  display:flex;
  flex-direction:column;
  height:100%;
  min-width:0;
}
body.csf-domain-public-v8510 .csf-domain-formation-card__body{
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  min-width:0;
}
body.csf-domain-public-v8510 .csf-domain-formation-card__excerpt{
  overflow-wrap:anywhere;
}
body.csf-domain-public-v8510 .csf-domain-formation-card__meta{
  margin-top:auto;
}
body.csf-domain-public-v8510 .csf-domain-formation-card__button{
  margin-top:2px;
}

/* Le bloc récapitulatif conserve une largeur lisible sans déborder sur mobile. */
body.csf-domain-public-v8510 .csf-domain-landing-head{
  box-sizing:border-box;
  width:100%;
}
body.csf-domain-public-v8510 .csf-domain-landing-title,
body.csf-domain-public-v8510 .csf-domain-formation-card h3{
  overflow-wrap:anywhere;
}

@media (max-width:782px){
  body.csf-public-polish-v8510.admin-bar{
    --csf-wp-adminbar-height:46px;
  }
}

@media (max-width:767px){
  body.csf-domain-public-v8510 .csf-domain-landing-head{
    padding-left:min(22px, 5vw);
    padding-right:min(22px, 5vw);
  }
  body.csf-domain-public-v8510 .csf-domain-formation-card__button{
    width:100%;
    justify-content:center;
    text-align:center;
  }
}
