/* ==========================================================================
   Bandeau Black Friday — pleine largeur, tout en haut de l'accueil.
   Le bandeau est fixe au-dessus de la barre du logo (elle-même fixe) :
   le menu est donc décalé de sa hauteur, jamais recouvert.
   Pour le retirer : mettre $MTC_BF_ACTIF à false dans index.php.
   ========================================================================== */

:root { --bf-h: 0px; }

body.has-bf { --bf-h: 46px; }

body.has-bf .bf-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 14px 6px;
  background: var(--u-accent, #5046D9);
  color: #fff;
  text-align: center;
}

body.has-bf .bf-text {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}

body.has-bf .bf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 8px;
  background: #fff;
  color: var(--u-accent-ink, #3B33B8);
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

body.has-bf .bf-btn:hover { background: #F4F2FF; color: var(--u-accent-ink, #3B33B8); text-decoration: none; }

/* Le menu et la barre du logo descendent sous le bandeau */
body.has-bf .brand-bar { top: var(--bf-h); }
body.has-bf .pc-nav { top: var(--bf-h); }

/* Le contenu descend d'autant (la barre du logo est fixe sur téléphone) */
@media (max-width: 899px) {
  body.has-bf .page { padding-top: calc(124px + var(--bf-h) + env(safe-area-inset-top, 0px)); }
  body.has-bf.chat-body .page { padding-top: calc(120px + var(--bf-h) + env(safe-area-inset-top, 0px)); }
  body.has-bf.auth-body .page { padding-top: calc(130px + var(--bf-h) + env(safe-area-inset-top, 0px)); }
}

@media (min-width: 900px) {
  body.has-bf .page { padding-top: calc(74px + var(--bf-h)); }
}

/* Téléphone : le bouton passe sous le texte, bandeau plus lisible */
@media (max-width: 559px) {
  body.has-bf { --bf-h: 62px; }
  body.has-bf .bf-bar {
    flex-direction: column;
    gap: 5px;
    padding-left: 12px;
    padding-right: 12px;
  }
  body.has-bf .bf-text { font-size: 12.5px; }
}
