/* Crowd responsive maintenance patch — 2026-10-25.
 * Dedicated to the legacy AGStores home presentation and mobile header.
 * Loaded after style.css; reversible without altering the original rules.
 */
@media screen and (max-width: 1024px) {
  body.mobile-header-one #masthead .header-main-inner > .inner,
  body.mobile-header-one #masthead .header-main-inner .inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
    height: auto;
  }
  body.mobile-header-one #masthead .site-identity {
    display: flex;
    align-items: center;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
  }
  body.mobile-header-one #masthead .site-identity img {
    max-width: 100%;
    max-height: 54px;
    width: auto;
    height: auto;
  }
  body.mobile-header-one #masthead .menu-toggle-wrap {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    position: static;
    transform: none;
    margin: 0;
    padding: 0;
    width: auto;
  }
  body.mobile-header-one #masthead .menu-toggle {margin: 0;}
  body.mobile-header-one #masthead .header-main {height: auto;}
  body.mobile-header-one #masthead .header-main-inner {height: auto;}
}
@media screen and (min-width: 641px) and (max-width: 1024px) {
  /* app.js applies an inline margin to the body after measuring the header. */
  body.home.crowd-layout.crowd-mobile-menu {margin-top: 0 !important;}
}
@media screen and (max-width: 640px) {
  /* Crowd 2017 previously hid the entire overlay including Formidable. */
  body.home.crowd-mobile-menu .main-slideshow .crowd-site-identity,
  body.home.crowd-layout.crowd-simple-menu .main-slideshow .crowd-site-identity {
    display: block;
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    transform: none;
    padding: 14px 12px 20px;
    box-sizing: border-box;
  }
  body.home .crowd-full .main-slideshow {overflow: visible; height: auto; min-height: 0;}
  body.home .crowd-full {height: auto; min-height: 100svh;}
  body.home .main-slideshow .crowd-site-identity .row {width: 100%; max-width: 100%; margin: 0 auto;}
  body.home .main-slideshow .decoupe1,
  body.home .main-slideshow .decoupe2 {float: none; width: 100%; max-width: 100%;}
  body.home .main-slideshow .finderform,
  body.home .main-slideshow #formulaire,
  body.home .main-slideshow .frm_forms {width: 100%; max-width: 100%; box-sizing: border-box;}
  body.home .main-slideshow #formulaire {opacity: 1; visibility: visible;}
  body.home .main-slideshow .zone2 {margin: 18px auto 0; padding: 0 8px;}
  body.home .main-slideshow .zone2 h2 {padding: 0 6px;}
  body.home .main-slideshow input,
  body.home .main-slideshow select,
  body.home .main-slideshow textarea {max-width: 100%; box-sizing: border-box;}
}

/* 2026-10-25 — Landscape phones and tablets (both orientations).
 * Mirror the already working portrait-phone layout: let the home overlay
 * grow with the Formidable form; stack decoupe2 below decoupe1.
 * Desktop >1024px and phone portrait <=640px remain unchanged.
 */
@media screen and (min-width: 641px) and (max-width: 1024px) {
  body.home.crowd-full-screen #crowd-full,
  body.home.crowd-full-width #crowd-full {
    position: relative;
    height: auto !important;
    min-height: 100svh;
  }
  body.home #crowd-full .main-slideshow {
    position: relative;
    top: auto;
    left: auto;
    height: auto !important;
    min-height: 100svh;
    overflow: visible;
  }
  body.home #crowd-full .main-slideshow > .crowd-site-identity {
    display: block;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    transform: none;
    padding: 14px 12px 24px;
    box-sizing: border-box;
  }
  body.home #crowd-full .main-slideshow > .crowd-site-identity > .row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  body.home #crowd-full .main-slideshow .decoupe1,
  body.home #crowd-full .main-slideshow .decoupe2 {
    position: relative;
    float: none;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    box-sizing: border-box;
  }
  body.home #crowd-full .main-slideshow .finderform,
  body.home #crowd-full .main-slideshow #formulaire,
  body.home #crowd-full .main-slideshow .frm_forms {
    width: 100%;
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
  }
  body.home #crowd-full .main-slideshow #formulaire {
    opacity: 1;
    visibility: visible;
  }
  body.home #crowd-full .main-slideshow .zone2 {
    margin: 18px auto 0;
    padding: 0 8px;
  }
  body.home #crowd-full .main-slideshow input,
  body.home #crowd-full .main-slideshow select,
  body.home #crowd-full .main-slideshow textarea {
    max-width: 100%;
    box-sizing: border-box;
  }
}
