/* =========================================================
   header.css — protège UNIQUEMENT le header (topbar)
   Objectif :
   - Desktop : identique index (non sticky)
   - Mobile : header collé en haut + centré + pas collé aux bords
   - Ne touche ni aux vignettes (privacy.css), ni au footer
   ========================================================= */

/* Desktop : header normal */
@media (min-width: 821px){
  .topbar{
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
  }
}

/* Mobile : FIXED (plus fiable que sticky) + mêmes sensations que l'index */
@media (max-width: 820px){

  /* 1) Header collé en haut, centré avec un "gutter" */
  body.nmLegal .topbar{
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;

    /* rendu visuel identique à l’index */
    background: rgba(247,249,251,.92) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;

    /* ✅ évite “collé aux bords” */
    padding-left: 18px !important;
    padding-right: 18px !important;
    box-sizing: border-box !important;

    /* évite tout décalage parasite */
    margin: 0 !important;
  }

  /* 2) Empêcher le contenu de passer sous le header
        -> ajuste UNIQUEMENT cette valeur si tu veux + ou - d’espace.
        -> si tu dis "trop haut", baisse ce nombre. */
  body.nmLegal{
    padding-top: 96px !important;  /* 🔧 ajuste ici si besoin (ex: 78px / 82px / 90px) */
  }

  /* 3) Sécuriser le logo pour éviter “logo énorme” et garder proportions */
  body.nmLegal .topbar .brand img,
  body.nmLegal .topbar img{
    max-height: 60px !important;   /* cohérent avec ton style.css mobile (60px) */
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
  }

  /* 4) Bonus : si un anchor scroll arrive sous header */
  body.nmLegal [id]{
    scroll-margin-top: 96px;
  }
}