/* ===== HubSpot Banner – Global (vf3) ===== */
:root{
  --hs-banner-h: 64px;  /* mis à jour dynamiquement */
  --hs-gap: 0px;        /* aucun espace entre bannière et header */
  --hdr-h: 72px;        /* utile si vous réactivez le spacer */
}

/* Neutraliser les wrappers qui laissent un espace dans le flux */
[id^="hs-web-interactives-top-anchor"],
[id^="hs-web-interactives-bottom-anchor"],
[id^="hs-web-interactives-floating-container"],
#hs-web-interactives-top-push-anchor{
  display:block !important;
  height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
}

/* Forcer la vraie hauteur de l’iframe de bannière */
iframe[title="Popup CTA"],
iframe[aria-label="Popup CTA"],
[id^="hs-web-interactives-top-"] iframe{
  display:block !important;
  border:0 !important;
  height:var(--hs-banner-h) !important;
  max-height:var(--hs-banner-h) !important;
  min-height:var(--hs-banner-h) !important;
}

/* Bannière FIXE tout en haut (que lorsqu’elle est présente) */
body.hsb-on iframe[title="Popup CTA"],
body.hsb-on iframe[aria-label="Popup CTA"],
body.hsb-on [id^="hs-web-interactives-top-"] iframe{
  position:fixed !important;
  top:0 !important; left:0 !important; right:0 !important;
  z-index:10020 !important;
}

/* Pas de padding global quand la bannière est active */
body.hsb-on{ padding-top:0 !important; }

/* Header fixé sous la bannière (sans modifier sa taille/couleur) */
body.hsb-fix .hsb-target{
  position:fixed !important;
  top:calc(var(--hs-banner-h) + var(--hs-gap)) !important;
  left:0; right:0; width:100%;
  z-index:10010 !important;  /* sous la bannière, au-dessus du contenu */
  margin:0 !important;
  border-top:0 !important;
}

/* (Optionnel) Spacer si besoin – par défaut inactif */
#hs-header-spacer{ display:none; }
body.hsb-fix #hs-header-spacer{ display:block; height:var(--hdr-h); }

/* Si la bannière est absente/fermée → header revient en haut */
body.hsb-nobanner .hsb-target{
  top:0 !important;
}
