/* =========================================================
   Syna Responsive Fix — CSS
   Corrige le responsive sur tout le site (toutes pages Elementor/WooCommerce)
   Approche : mobile-first overrides, haute spécificité, sans toucher au contenu.
   ========================================================= */

/* ---------- 0. Base / anti-débordement horizontal ---------- */
html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
}
*, *::before, *::after {
  box-sizing: border-box !important;
}
img, svg, video, iframe, canvas, embed, object {
  max-width: 100% !important;
  height: auto !important;
}
a[href^="#"] {
  scroll-margin-top: 110px;
}

/* ---------- 1. Conteneurs Elementor ---------- */
@media (max-width: 1024px) {
  .elementor-section.elementor-section-boxed > .elementor-container,
  .e-con,
  .elementor-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .elementor-column {
    width: 100% !important;
  }
  .elementor-row,
  .e-con-inner {
    flex-wrap: wrap !important;
  }
}

@media (max-width: 767px) {
  .elementor-section.elementor-section-boxed > .elementor-container,
  .e-con,
  .elementor-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .elementor-section {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }
  .elementor-column > .elementor-widget-wrap,
  .e-con-inner > .elementor-widget-wrap {
    padding: 0 !important;
  }
  .elementor-column-gap-default > .elementor-row > .elementor-column,
  .elementor-column {
    margin-bottom: 24px !important;
  }
}

/* ---------- 2. Typographie fluide ---------- */
@media (max-width: 767px) {
  h1, .elementor-heading-title, .e-heading {
    font-size: clamp(28px, 7vw, 40px) !important;
    line-height: 1.25 !important;
  }
  h2 {
    font-size: clamp(22px, 6vw, 32px) !important;
    line-height: 1.3 !important;
  }
  h3 {
    font-size: clamp(18px, 5vw, 24px) !important;
  }
  p, li, .elementor-widget-text-editor {
    font-size: 16px !important;
    line-height: 1.6 !important;
  }
}

/* ---------- 3. Header / navigation ---------- */
.site-header, header.elementor-location-header, #masthead, header.sv2-top {
  position: relative;
  width: 100%;
  max-width: 100%;
}

/* Header réel du site : header.sv2-top > .sv2-top-in > a(logo) + nav (flex, a directs, pas de ul/li) */
@media (max-width: 900px) {
  .sv2-top-in {
    flex-wrap: nowrap !important;
  }

  /* Cache le menu horizontal desktop (nav du header sv2-top ET fallback Elementor/WP classiques) */
  .sv2-top-in > nav,
  .sv2-top nav,
  nav.elementor-nav-menu--main,
  .elementor-nav-menu__container,
  header ul.elementor-nav-menu,
  .main-navigation ul.menu {
    display: none !important;
  }

  /* Bouton hamburger injecté par le JS */
  .syna-mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 9999;
    margin-left: auto;
    flex-shrink: 0;
  }
  .syna-mobile-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: currentColor;
    position: relative;
    border-radius: 2px;
  }
  .syna-mobile-toggle span::before,
  .syna-mobile-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 26px;
    height: 3px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .2s ease;
  }
  .syna-mobile-toggle span::before { top: -8px; }
  .syna-mobile-toggle span::after  { top: 8px; }

  /* Menu mobile plein écran, cloné par le JS */
  .syna-mobile-nav {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .25s ease;
  }
  .syna-mobile-nav.is-open {
    transform: translateX(0);
  }
  .syna-mobile-nav-close {
    align-self: flex-end;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
  }
  .syna-mobile-nav ul,
  .syna-mobile-nav-list {
    list-style: none;
    margin: 16px 0 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  .syna-mobile-nav ul li,
  .syna-mobile-nav-list > a {
    border-bottom: 1px solid #eee;
  }
  .syna-mobile-nav ul li a,
  .syna-mobile-nav-list a {
    display: block !important;
    padding: 16px 4px !important;
    font-size: 18px !important;
    text-decoration: none !important;
    width: 100% !important;
  }
  .syna-mobile-nav-list a.cta {
    margin-top: 12px;
    text-align: center;
    border-radius: 10px;
    border-bottom: none !important;
  }
  body.syna-nav-open {
    overflow: hidden !important;
  }
}

@media (min-width: 901px) {
  .syna-mobile-toggle,
  .syna-mobile-nav {
    display: none !important;
  }
}

/* ---------- 4. Boutons / CTA ---------- */
@media (max-width: 767px) {
  .elementor-button,
  a.elementor-button-link,
  button.elementor-button,
  .wp-block-button__link,
  input[type="submit"],
  button[type="submit"] {
    width: 100% !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center !important;
    white-space: normal !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
}

/* ---------- 5. Cartes salles / grilles produits ---------- */
@media (max-width: 767px) {
  .elementor-widget-wrap .elementor-row,
  .products,
  ul.products {
    display: block !important;
  }
  ul.products li.product,
  .products .product {
    width: 100% !important;
    margin: 0 0 24px 0 !important;
  }
}

/* ---------- 6. WooCommerce : panier / compte / commande ---------- */
@media (max-width: 767px) {
  table.shop_table,
  table.cart,
  table.woocommerce-cart-form__contents {
    border: 0 !important;
    width: 100% !important;
  }
  table.shop_table thead {
    display: none !important;
  }
  table.shop_table tr {
    display: block !important;
    margin-bottom: 16px !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    padding: 8px !important;
  }
  table.shop_table td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: right !important;
    padding: 10px 8px !important;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
  }
  table.shop_table td::before {
    content: attr(data-title) !important;
    font-weight: 600 !important;
    text-align: left !important;
    margin-right: 12px !important;
  }
  table.shop_table td:last-child {
    border-bottom: none !important;
  }

  .woocommerce-checkout .col2-set,
  .woocommerce-checkout .col-1,
  .woocommerce-checkout .col-2,
  .woocommerce form .form-row-first,
  .woocommerce form .form-row-last {
    width: 100% !important;
    float: none !important;
  }
  .woocommerce form .form-row {
    margin-bottom: 12px !important;
  }
  .woocommerce input[type="text"],
  .woocommerce input[type="email"],
  .woocommerce input[type="tel"],
  .woocommerce input[type="password"],
  .woocommerce input[type="number"],
  .woocommerce textarea,
  .woocommerce select,
  .elementor-field-group input,
  .elementor-field-group textarea,
  .elementor-field-group select {
    width: 100% !important;
    font-size: 16px !important;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation,
  .woocommerce-account .woocommerce-MyAccount-content {
    width: 100% !important;
    float: none !important;
  }
  .woocommerce-account .woocommerce-MyAccount-navigation ul {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
}

/* ---------- 7. Calendrier / widget de réservation ---------- */
@media (max-width: 767px) {
  .syna-booking, .booking-calendar, .flatpickr-calendar,
  [class*="calendar"], [class*="booking"] {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: auto !important;
  }
  table {
    max-width: 100%;
  }
}

/* ---------- 8. Footer ---------- */
@media (max-width: 767px) {
  footer .elementor-container,
  footer .e-con {
    flex-direction: column !important;
  }
  footer .elementor-column {
    text-align: center !important;
    margin-bottom: 24px !important;
  }
  footer ul {
    padding-left: 0 !important;
    list-style: none !important;
  }
}

/* ---------- 9. Bannière annonce (chabbat) ---------- */
@media (max-width: 767px) {
  .elementor-widget-announcement,
  [class*="announcement"],
  [class*="ticker"] {
    font-size: 13px !important;
    padding: 8px 12px !important;
    line-height: 1.4 !important;
  }
}

/* ---------- 10. Petits écrans (< 400px) ---------- */
@media (max-width: 400px) {
  .elementor-container, .e-con {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  h1, .elementor-heading-title {
    font-size: 26px !important;
  }
}
