/* =========================================================
   HyperCorners v9.2.3 — Header et accès panier mobile
   Astra conserve la structure. Cette couche améliore uniquement
   l'intégration de 0 à 921 px, sans bouton flottant permanent.
========================================================= */

.hc-mobile-cart-access {
  display: none;
}

@media (max-width: 921px) {
  body.hc-mobile-header-enhanced {
    --hc-mobile-header-height: 68px;
    --hc-mobile-header-height-compact: 58px;
    --hc-mobile-header-surface: rgba(255, 255, 255, 0.96);
  }

  body.hc-mobile-header-enhanced #masthead,
  body.hc-mobile-header-enhanced .site-header {
    width: 100%;
    transition:
      box-shadow var(--hc-duration-normal, 180ms) ease,
      background-color var(--hc-duration-normal, 180ms) ease,
      -webkit-backdrop-filter var(--hc-duration-normal, 180ms) ease,
      backdrop-filter var(--hc-duration-normal, 180ms) ease;
  }

  body.hc-mobile-header-enhanced.hc-mobile-header-sticky:not(.woocommerce-checkout) #masthead {
    position: sticky;
    top: 0;
    z-index: 999;
  }

  body.admin-bar.hc-mobile-header-enhanced.hc-mobile-header-sticky:not(.woocommerce-checkout) #masthead {
    top: 46px;
  }

  body.hc-mobile-header-enhanced .ast-mobile-header-wrap .ast-primary-header-bar,
  body.hc-mobile-header-enhanced .ast-primary-header-bar,
  body.hc-mobile-header-enhanced .site-primary-header-wrap {
    min-height: var(--hc-mobile-header-height);
    transition: min-height var(--hc-duration-normal, 180ms) ease;
  }

  body.hc-mobile-header-enhanced .ast-builder-grid-row {
    min-width: 0;
  }

  body.hc-mobile-header-enhanced .site-header-section-left,
  body.hc-mobile-header-enhanced .site-header-section-right,
  body.hc-mobile-header-enhanced .ast-builder-layout-element {
    min-width: 0;
  }

  body.hc-mobile-header-enhanced .site-header-section-right {
    gap: 4px;
  }

  body.hc-mobile-header-enhanced .site-logo-img img,
  body.hc-mobile-header-enhanced img.custom-logo,
  body.hc-mobile-header-enhanced .custom-logo-link img {
    display: block;
    width: auto;
    max-width: min(46vw, 190px);
    max-height: 38px;
    object-fit: contain;
    transition: max-height var(--hc-duration-normal, 180ms) ease;
  }

  body.hc-mobile-header-enhanced .menu-toggle,
  body.hc-mobile-header-enhanced .ast-mobile-menu-trigger-minimal,
  body.hc-mobile-header-enhanced .ast-button-wrap button,
  body.hc-mobile-header-enhanced .hc-mobile-cart-existing,
  body.hc-mobile-header-enhanced .hc-mobile-cart-access {
    position: relative;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border-radius: 14px;
    -webkit-tap-highlight-color: transparent;
  }

  body.hc-mobile-header-enhanced .hc-mobile-cart-existing,
  body.hc-mobile-header-enhanced .hc-mobile-cart-access {
    color: var(--hc-color-ink, #0f172a);
    background: rgba(248, 250, 252, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    text-decoration: none;
  }

  body.hc-mobile-header-enhanced .hc-mobile-cart-access:not(.is-mounted),
  body.hc-mobile-header-enhanced .hc-mobile-cart-access.is-redundant {
    display: none !important;
  }

  body.hc-mobile-header-enhanced .hc-mobile-cart-access.is-mounted {
    display: inline-flex;
  }

  body.hc-mobile-header-enhanced .hc-mobile-cart-access.is-standalone {
    position: absolute;
    top: 50%;
    right: max(14px, env(safe-area-inset-right));
    transform: translateY(-50%);
    z-index: 4;
  }

  body.hc-mobile-header-enhanced .hc-mobile-cart-icon,
  body.hc-mobile-header-enhanced .hc-mobile-cart-icon svg {
    display: block;
    width: 22px;
    height: 22px;
  }

  body.hc-mobile-header-enhanced .hc-mobile-cart-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body.hc-mobile-header-enhanced .hc-mobile-cart-existing.hc-has-cart-visual .ast-woo-header-cart-info-wrap,
  body.hc-mobile-header-enhanced .hc-mobile-cart-existing.hc-has-cart-visual .ast-cart-menu-wrap + span,
  body.hc-mobile-header-enhanced .hc-mobile-cart-existing.hc-has-cart-visual .ast-woo-header-cart-total {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  body.hc-mobile-header-enhanced .hc-mobile-cart-count {
    position: absolute;
    top: -3px;
    right: -3px;
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #6528f7);
    box-shadow: 0 4px 10px rgba(101, 40, 247, 0.24);
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }

  body.hc-mobile-header-enhanced.hc-mobile-cart-count-enabled .hc-mobile-cart-count {
    display: inline-flex;
  }

  body.hc-mobile-header-enhanced .hc-mobile-cart-access.is-empty .hc-mobile-cart-count {
    display: none;
  }

  body.hc-mobile-header-enhanced.hc-mobile-header-scrolled #masthead {
    background: var(--hc-mobile-header-surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
    -webkit-backdrop-filter: blur(14px) saturate(135%);
    backdrop-filter: blur(14px) saturate(135%);
  }

  body.hc-mobile-header-enhanced.hc-mobile-header-compact-scroll.hc-mobile-header-scrolled:not(.hc-mobile-menu-open) .ast-mobile-header-wrap .ast-primary-header-bar,
  body.hc-mobile-header-enhanced.hc-mobile-header-compact-scroll.hc-mobile-header-scrolled:not(.hc-mobile-menu-open) .ast-primary-header-bar,
  body.hc-mobile-header-enhanced.hc-mobile-header-compact-scroll.hc-mobile-header-scrolled:not(.hc-mobile-menu-open) .site-primary-header-wrap {
    min-height: var(--hc-mobile-header-height-compact);
  }

  body.hc-mobile-header-enhanced.hc-mobile-header-compact-scroll.hc-mobile-header-scrolled:not(.hc-mobile-menu-open) .site-logo-img img,
  body.hc-mobile-header-enhanced.hc-mobile-header-compact-scroll.hc-mobile-header-scrolled:not(.hc-mobile-menu-open) img.custom-logo,
  body.hc-mobile-header-enhanced.hc-mobile-header-compact-scroll.hc-mobile-header-scrolled:not(.hc-mobile-menu-open) .custom-logo-link img {
    max-height: 32px;
  }

  body.hc-mobile-header-enhanced .hc-mobile-cart-existing:hover,
  body.hc-mobile-header-enhanced .hc-mobile-cart-existing:focus-visible,
  body.hc-mobile-header-enhanced .hc-mobile-cart-access:hover,
  body.hc-mobile-header-enhanced .hc-mobile-cart-access:focus-visible {
    color: #1d4ed8;
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.32);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
  }

  body.woocommerce-cart .hc-mobile-cart-access,
  body.woocommerce-checkout .hc-mobile-cart-access {
    display: none !important;
  }
}

@media (min-width: 783px) and (max-width: 921px) {
  body.admin-bar.hc-mobile-header-enhanced.hc-mobile-header-sticky:not(.woocommerce-checkout) #masthead {
    top: 32px;
  }
}

@media (max-width: 374px) {
  body.hc-mobile-header-enhanced .site-logo-img img,
  body.hc-mobile-header-enhanced img.custom-logo,
  body.hc-mobile-header-enhanced .custom-logo-link img {
    max-width: 42vw;
    max-height: 34px;
  }

  body.hc-mobile-header-enhanced .site-header-section-right {
    gap: 2px;
  }

  body.hc-mobile-header-enhanced .menu-toggle,
  body.hc-mobile-header-enhanced .ast-mobile-menu-trigger-minimal,
  body.hc-mobile-header-enhanced .ast-button-wrap button,
  body.hc-mobile-header-enhanced .hc-mobile-cart-existing,
  body.hc-mobile-header-enhanced .hc-mobile-cart-access {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.hc-mobile-header-enhanced #masthead,
  body.hc-mobile-header-enhanced .site-header,
  body.hc-mobile-header-enhanced .ast-mobile-header-wrap .ast-primary-header-bar,
  body.hc-mobile-header-enhanced .ast-primary-header-bar,
  body.hc-mobile-header-enhanced .site-primary-header-wrap,
  body.hc-mobile-header-enhanced .site-logo-img img,
  body.hc-mobile-header-enhanced img.custom-logo,
  body.hc-mobile-header-enhanced .custom-logo-link img {
    transition: none !important;
  }
}
