/* ============================================================
   MENU MOBILE FINAL (Noir, Plein écran, Croix à Gauche)
   ============================================================ */
@media screen and (max-width: 992px) {

  /* 1. RESET ET NETTOYAGE */
  .menu-standard { display: none !important; }
  #menu_btn, #showMega_mobile { display: none; }

  /* 2. LE BOUTON D'OUVERTURE (☰) */
  .wrapper .btn.menu_btn {
      display: block !important;
      position: fixed;
      top: 25px;
      right: 25px;
      font-size: 35px;
      color: #ffffff;
      cursor: pointer;
      z-index: 10000;
      background: none;
      border: none;
  }

  /* 3. LE PANNEAU DU MENU */
  .menu-burger {
      position: fixed;
      top: -4px;
      right: -110vw; /* Caché à droite */
      
      /* FORCE LE PLEIN ÉCRAN */
      width: 100vw !important;  
      height: 100vh !important;
      margin: 0 !important;
      border-radius: 0 !important;
      left: auto;
      
      /* Fond Noir Opaque comme sur ta photo */
      background: #000000 !important; 
      
      z-index: 99999; 
      display: flex !important;
      flex-direction: column;
      justify-content: flex-start;
      
      transition: right 0.4s ease-in-out;
      overflow-y: auto;
      overflow-x: hidden;
  }

  /* OUVERTURE */
  #menu_btn:checked ~ .menu-burger {
              right: -40px; /* Se colle à droite et remplit tout */
  }
  
  /* CACHER LE BOUTON D'OUVERTURE QUAND C'EST OUVERT (Évite la double croix) */
  #menu_btn:checked ~ .btn.menu_btn,
  #menu_btn:checked ~ label.menu_btn {
      display: none !important;
      opacity: 0;
      pointer-events: none;
  }

  /* 4. L'ENTÊTE (Croix à GAUCHE, Logo à DROITE) */
  .menu-burger header {
      width: 100%;
      display: flex;
      /* space-between écarte les éléments au max */
      justify-content: space-between; 
      /* row = ordre normal (Croix à gauche, Logo à droite) */
      flex-direction: row; 
      align-items: center;
      padding: 20px 25px;
      box-sizing: border-box;
  }

  /* La Croix */
  .menu-burger .cancel_btn {
      position: static !important;
      display: flex;
      align-items: center;
      font-size: 30px; /* Ajuste la taille de la croix ici */
      color: #fff;
      cursor: pointer;
  }
  
  /* Le Logo */
  .menu-burger .logo-burger {
      height: 40px; /* Ajuste la hauteur du logo */
      width: auto;
      display: block;
  }

  /* 5. STYLE DES LIENS */
  .menu-burger li {
      display: block;
      width: 100%;
      margin: 0 !important;
      border-bottom: 1px solid rgba(255,255,255,0.15); /* Ligne fine grise */
  }

  .menu-burger li a, 
  .menu-burger li label {
      font-size: 18px !important; /* Taille police menu */
      font-weight: 600;
      color: white !important;
      text-transform: uppercase;
      text-decoration: none;
      font-family: sans-serif;
      padding: 20px 25px !important;
      display: flex !important;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      box-sizing: border-box;
      height: auto !important;
  }

  /* 6. LE SOUS-MENU (Accordéon) */
  .menu-burger .mega_box {
      position: static;
      max-height: 0;
      overflow: hidden;
      transition: all 0.4s ease-in-out;
      background: #000000; /* Fond noir */
      width: 100%;
  }

  #showMega_mobile:checked ~ .mega_box {
      max-height: 500px;
  }
  


  .menu-burger .mega_box a {
      font-size: 16px !important;
      color: #ccc !important;
      padding-left: 40px !important; /* Décalage vers la droite */
      border-bottom: none;
  }
  
  /* Cache les éléments inutiles du méga menu PC */
  .menu-burger .mega_box .bulle-img, 
  .menu-burger .mega_box p,
  .menu-burger .mega_box header {
      display: none;
  }
  
  .menu-burger .mega_box .bulle-menu header {
      display: block;
      margin: 0;
      font-size: 16px;
  }











  #showMega_mobile:checked ~ .mega_box .content {
    background-color: var(--p-coloc);
    margin-top: 35px;
    width: auto;
    display: block;
    border-radius: var(--border-raduis);
    justify-content: center;
    border: 1px solid #333;
}
#showMega_mobile:checked ~ .mega_box .content .bulle-menu {
        width: 100%;
        height: 106px;
        transform: translate(0%, 0%);
        font-size: 20px;
    }
}

/* ============================================================
   CORRECTIF AFFICHAGE SOUS-MENU (Force la visibilité)
   A coller TOUT À LA FIN de index.css
   ============================================================ */

@media screen and (max-width: 992px) {

  /* 1. ON RÉINITIALISE LA HAUTEUR DES LIENS (Problème des 220px) */
  .menu-burger .mega_box a {
      height: auto !important;       /* Annule la hauteur fixe du PC */
      max-height: none !important;   /* Annule la limite max */
      padding: 15px 20px !important; /* Un peu d'espace propre */
      display: block !important;     /* S'assure que c'est un bloc */
      line-height: normal !important;
  }

  /* 2. ON FORCE L'AFFICHAGE DU TEXTE (Au cas où il serait caché) */
  .menu-burger .mega_box .bulle-menu header {
        display: block !important;
        color: #ffffff !important;
        font-size: 18px !important;
        margin: 0 !important;
        text-align: left;
        font-weight: bold;
        background: transparent !important;
    }

  /* 3. ON S'ASSURE QUE LE CONTENEUR EST EN COLONNE */
  .menu-burger .mega_box .content {
      display: flex !important;
      flex-direction: column !important; /* Les liens l'un sous l'autre */
      width: 100% !important;
      background: transparent !important;
      box-shadow: none !important;
      margin: 0 !important;
      padding: 0 !important;
  }
  
  /* 4. NETTOYAGE DES PARASITES */
  /* On cache définitivement les images et descriptions qui pourraient gêner */
  .menu-burger .mega_box .bulle-img, 
  .menu-burger .mega_box p {
      display: none !important;
  }



  .logo-burger{
    transform: scale(2.5) translate(-20%, 0%);
  }

  .mega_box {
    position: absolute;
    top: 85px;
    left: 0;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}
}
@media screen and (min-width: 992px) {
  /* On cible le conteneur principal ET les éléments internes */
    .menu-burger, 
    .menu_btn, 
    .burger-header, /* Le header qui contient le logo et la croix */
    .logo-burger,   /* Le logo spécifique */
    .cancel_btn,
    #menu_btn {
        display: none !important; /* Disparition forcée */
        visibility: hidden !important;
        opacity: 0 !important;
    }
}