@media screen and (max-width: 768px) {

  /* Fond blanc en mobile */
  #header,
  #headerbackground,
  #header_inner {
    background: #ffffff !important;
    background-image: none !important;
  }

  /* Masquer les liens d'accessibilité */
  body.portailcognac .skip-links,
  .skip-links {
    display: none !important;
  }

  /* Repositionner le menu burger */
  #mobile-header,
  #responsive-menu-button {
    position: absolute !important;
    top: 0rem !important;     /* ← était 0.9rem : on remonte */
    left: 0rem !important;
    z-index: 6000 !important;
  }

  /* Le header doit être le conteneur de référence pour le menu burger */
  #header {
    position: relative !important;
    padding-top: 1.2rem !important;  /* ← ajoute un petit espace de sécurité sous le burger */
  }

  /* Éviter chevauchement avec ACTUS / LICENCE */
  #cadre_outils {
    margin-top: 4.5rem !important;   /* ← léger ajustement */
  }
}
/* ============================================================
   REPRODUCTION DU COMPORTEMENT SC 5.2.x (SEUIL 1162px)
   Rétablit le menu burger droit jusqu'à 1162px
   ============================================================ */

@media screen and (max-width: 1162px) {

    /* Afficher le menu burger de droite */
    #responsive-menu-button-navigation {
        display: inline-flex !important;
        position: absolute !important;
        top: 0.3rem !important;
        right: 0.4rem !important;
        z-index: 6000 !important;
    }

    /* Masquer son texte (inutile en mobile / tablette) */
    #responsive-menu-button-navigation span {
        display: none !important;
    }

    /* Correctif : deux boutons dans la barre mobile */
    #mobile-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        position: relative !important;
        padding: 0.2rem 0.4rem !important;
    }
}

/* En desktop large ( > 1162px ) : retour au comportement SC6 normal */
@media screen and (min-width: 1163px) {
    #responsive-menu-button-navigation {
        display: none !important;
    }
}
