:root{
  --heches-red:#8b0d18;
  --heches-red-dark:#650a12;
  --heches-gold:#d4af37;
  --heches-gold-dark:#b8860b;
  --heches-white:#fff;
}
/* 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.heches-site .inner-hero-shell.hero-with-form > .hero-form-zone.mobile-detached,
  body.heches-site .hero-form-zone.mobile-detached,
  body.heches-site .hero-form-zone.mobile-detached .modern-form-card,
  body.heches-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.heches-site .hero-form-zone.mobile-detached {
    contain:layout paint !important;
    overflow:hidden !important;
    padding-left:12px !important;
    padding-right:12px !important;
  }
  body.heches-site .hero-form-zone.mobile-detached .modern-form-card {
    overflow:hidden !important;
  }
  body.heches-site .hero-form-zone.mobile-detached .ajax-contact-form {
    width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }
  body.heches-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.heches-site .hero-form-zone.mobile-detached input,
  body.heches-site .hero-form-zone.mobile-detached textarea,
  body.heches-site .hero-form-zone.mobile-detached select,
  body.heches-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.heches-site .hero-form-zone.mobile-detached input:focus,
  body.heches-site .hero-form-zone.mobile-detached textarea:focus,
  body.heches-site .hero-form-zone.mobile-detached select:focus {
    transform:none !important;
  }
  body.heches-site .hero-form-zone.mobile-detached .captcha-col {
    overflow:hidden !important;
    padding:0 !important;
  }
  body.heches-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 heches-hard-fix.js */
  body.heches-site .vdo-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(--heches-menu-top, 88px) - 10px) !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
  }
  body.heches-site .vdo-mobile-panel.heches-menu-open {
    top:var(--heches-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.heches-site .vdo-mobile-panel li:not(.heches-current-page) > a,
  body.heches-site .main-menu.modern-nav nav > ul > li:not(.heches-current-page) > a[href="nos-realisations.html"] {
    background:transparent !important;
    border-color:transparent !important;
    box-shadow:none !important;
    color:inherit !important;
  }
  body.heches-site .vdo-mobile-panel li.heches-current-page > a {
    color:#fff !important;
    background:linear-gradient(180deg,#d4af37 0%,var(--heches-gold,#d4af37) 100%) !important;
    border-color:var(--heches-gold-dark,#d4af37) !important;
  }
}
