/* CALEDOHUB DEDUP CSS v1 (2026-05-09)
   Quand le bundle injecte ch-unified-footer / ch-top-bar, masque les versions HTML hardcodées
   pour éviter doublons.
*/

/* Footer dédup : si ch-unified-footer présent, masquer les autres <footer> */
body:has(.ch-unified-footer) > footer:not(.ch-unified-footer),
body:has(.ch-unified-footer) main > footer:not(.ch-unified-footer),
body:has(.ch-unified-footer) main + footer:not(.ch-unified-footer) {
  display: none !important;
}

/* Top bar dédup : si .ch-top-bar injecté, masquer les autres barres potentielles
   (sauf nav contenu / sidebar) */
body:has(.ch-top-bar) > nav.legacy-topbar,
body:has(.ch-top-bar) > div.legacy-header,
body:has(.ch-top-bar) > div#legacy-nav {
  display: none !important;
}

/* Quand la top bar est active, ajuste padding du body pour ne pas masquer le contenu */
html.ch-bar-active body {
  padding-top: 44px !important;
}

/* Sur mobile la top bar est-elle responsive ? */
@media (max-width: 720px) {
  .ch-top-bar .ch-tb-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ch-top-bar .ch-tb-nav::-webkit-scrollbar {
    display: none;
  }
  .ch-top-bar .ch-label {
    display: none; /* Sur mobile, juste les icônes */
  }
}
