/* Correctif mobile définitif — chargé en dernier */
html, body { max-width:100%; overflow-x:hidden; }

@media (max-width: 991px) {
  /* Formulaire mobile stable : aucune translation/animation pendant la saisie */
  body.m-jason-site .inner-hero-shell.hero-with-form > .hero-form-zone.mobile-detached,
  body.m-jason-site .hero-form-zone.mobile-detached,
  body.m-jason-site .hero-form-zone.mobile-detached .modern-form-card,
  body.m-jason-site .hero-form-zone.mobile-detached form {
    position:relative !important;
    left:auto !important;
    right:auto !important;
    transform:none !important;
    translate:none !important;
    width:100% !important;
    max-width:100% !important;
    margin-left:auto !important;
    margin-right:auto !important;
    box-sizing:border-box !important;
    animation:none !important;
  }
  body.m-jason-site .hero-form-zone.mobile-detached {
    contain:layout paint !important;
    overflow:hidden !important;
    padding-left:12px !important;
    padding-right:12px !important;
  }
  body.m-jason-site .hero-form-zone.mobile-detached .modern-form-card {
    overflow:hidden !important;
  }
  body.m-jason-site .hero-form-zone.mobile-detached .ajax-contact-form {
    width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }
  body.m-jason-site .hero-form-zone.mobile-detached .ajax-contact-form > [class*="col-"] {
    width:100% !important;
    max-width:100% !important;
    flex:0 0 100% !important;
    padding-left:0 !important;
    padding-right:0 !important;
  }
  body.m-jason-site .hero-form-zone.mobile-detached input,
  body.m-jason-site .hero-form-zone.mobile-detached textarea,
  body.m-jason-site .hero-form-zone.mobile-detached select,
  body.m-jason-site .hero-form-zone.mobile-detached .form-control {
    font-size:16px !important; /* évite le zoom iOS qui décadre le formulaire */
    transform:none !important;
    max-width:100% !important;
    min-width:0 !important;
  }
  body.m-jason-site .hero-form-zone.mobile-detached input:focus,
  body.m-jason-site .hero-form-zone.mobile-detached textarea:focus,
  body.m-jason-site .hero-form-zone.mobile-detached select:focus {
    transform:none !important;
  }
  body.m-jason-site .hero-form-zone.mobile-detached .captcha-col {
    overflow:hidden !important;
    padding:0 !important;
  }
  body.m-jason-site .hero-form-zone.mobile-detached #js-contact-btn {
    width:100% !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
  }

  /* Menu mobile piloté uniquement par m-jason-hard-fix.js */
  body.m-jason-site .mj-mobile-panel {
    display:block !important;
    position:fixed !important;
    left:10px !important;
    right:10px !important;
    width:auto !important;
    z-index:2147483000 !important;
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
    transform:translateY(-8px) !important;
    max-height:calc(100dvh - var(--m-jason-menu-top, 88px) - 10px) !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
  }
  body.m-jason-site .mj-mobile-panel.m-jason-menu-open {
    top:var(--m-jason-menu-top, 88px) !important;
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
    transform:none !important;
  }

  /* Aucun bouton n'est actif par simple présence du lien. */
  body.m-jason-site .mj-mobile-panel li:not(.m-jason-current-page) > a,
  body.m-jason-site .main-menu.modern-nav nav > ul > li:not(.m-jason-current-page) > a[href="nos-realisations.html"] {
    background:transparent !important;
    border-color:transparent !important;
    box-shadow:none !important;
    color:inherit !important;
  }
  body.m-jason-site .mj-mobile-panel li.m-jason-current-page > a {
    color:#ffffff !important;
    background:linear-gradient(180deg,#a63a43 0%,var(--m-jason-gold,#145296) 100%) !important;
    border-color:var(--m-jason-gold-dark,#4d4f4e) !important;
  }
}
