/**
 * Folies Secrètes — Header mobile premium (Lot D)
 * Scope strict : viewport ≤991px + barre mobile Panda (#mobile_bar)
 * Chargé via theme.yml (assets.css.all, priority 570)
 *
 * Hors scope : header desktop, sticky desktop LOCKED, JS menu, checkout fonctionnel
 * Ne pas modifier fs-sticky-header-premium.css (LOCKED)
 */

@media (max-width: 991.98px) {
  :root {
    --fs-mh-ivory: #fdfcfa;
    --fs-mh-cream: #f5f0ea;
    --fs-mh-ink: #1a1716;
    --fs-mh-ink-soft: #4a4543;
    --fs-mh-gold: #b8956b;
    --fs-mh-plum: #5a3d48;
    --fs-mh-line: rgba(26, 23, 22, 0.09);
    --fs-mh-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --fs-mh-font: "Manrope", system-ui, sans-serif;
  }

  /* ── Barre principale (hors tunnel checkout — fs-checkout-premium.css) ── */
  body:not(#checkout):not(#order-confirmation) #st_header #mobile_bar {
    background: rgba(253, 252, 250, 0.98);
    border-bottom: 1px solid var(--fs-mh-line);
    box-shadow: none;
    transition: background 0.28s var(--fs-mh-ease), border-color 0.28s var(--fs-mh-ease),
      box-shadow 0.28s var(--fs-mh-ease);
  }

  body:not(#checkout):not(#order-confirmation) #st_header #mobile_bar.stuck {
    background: rgba(253, 252, 250, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom-color: rgba(26, 23, 22, 0.07);
    box-shadow: 0 1px 0 rgba(253, 252, 250, 0.85), 0 4px 18px rgba(26, 23, 22, 0.05);
  }

  /* Homepage hero transparent : conserver transparence hors scroll */
  body#index.transparent-mobile-header #st_header #mobile_bar:not(.stuck) {
    background: transparent !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
  }

  body#index.transparent-mobile-header #st_header #mobile_bar.stuck {
    background: rgba(253, 252, 250, 0.97) !important;
    border-bottom: 1px solid var(--fs-mh-line) !important;
  }

  /* Hauteur & alignements */
  #st_header #mobile_bar #mobile_bar_top {
    min-height: 52px;
    height: 52px;
    align-items: center;
  }

  #st_header #mobile_bar #mobile_bar_left .flex_container,
  #st_header #mobile_bar #mobile_bar_center .flex_container,
  #st_header #mobile_bar #mobile_bar_right .flex_container {
    align-items: center;
    gap: 0.15rem;
  }

  #st_header #mobile_bar #mobile_bar_right .flex_container {
    justify-content: flex-end;
    gap: 0.05rem;
  }

  /* Logo mobile — discret, centré verticalement */
  #st_header #mobile_bar .mobile_logo {
    display: flex;
    align-items: center;
    line-height: 1;
  }

  #st_header #mobile_bar .mobile_logo .logo {
    max-height: 32px;
    width: auto;
    height: auto;
    object-fit: contain;
  }

  /* Icônes — moins « app e-commerce », plus éditorial */
  #st_header #mobile_bar .mobile_bar_item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    width: 40px;
    height: 40px;
    line-height: 1;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: background 0.22s var(--fs-mh-ease), color 0.22s var(--fs-mh-ease);
  }

  #st_header #mobile_bar .mobile_bar_item i,
  #st_header #mobile_bar .mobile_bar_item .icon_btn {
    color: var(--fs-mh-ink-soft);
    font-size: 1.2rem;
    line-height: 1;
    transition: color 0.22s var(--fs-mh-ease);
  }

  #st_header #mobile_bar .mobile_bar_item:active,
  #st_header #mobile_bar .mobile_bar_item:focus-visible {
    background: rgba(245, 240, 234, 0.85);
    outline: none;
  }

  #st_header #mobile_bar .mobile_bar_item:active i,
  #st_header #mobile_bar .mobile_bar_item:focus-visible i {
    color: var(--fs-mh-plum);
  }

  /* Labels sous icônes — toujours masqués (effet app) */
  #st_header #mobile_bar .mobile_bar_tri_text {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  /* Panier — badge discret prune/or */
  #st_header #mobile_bar .cart_mobile_bar_tri .ajax_cart_bag {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #st_header #mobile_bar .cart_mobile_bar_tri .ajax_cart_quantity,
  #st_header #mobile_bar .cart_mobile_bar_tri .amount_circle {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 1rem;
    min-height: 1rem;
    padding: 0 0.2rem;
    font-family: var(--fs-mh-font);
    font-size: 0.5625rem;
    font-weight: 600;
    line-height: 1rem;
    letter-spacing: 0.02em;
    color: var(--fs-mh-ivory) !important;
    background: var(--fs-mh-plum) !important;
    border: 1px solid rgba(184, 149, 107, 0.45) !important;
    box-shadow: 0 1px 3px rgba(74, 47, 58, 0.2) !important;
    border-radius: 999px;
  }

  #st_header #mobile_bar .cart_mobile_bar_tri .ajax_cart_bg_handle {
    display: none;
  }

  /* Barre recherche mobile bottom (si visible) */
  #st_header #mobile_bar #mobile_bar_bottom {
    padding-bottom: 0.35rem;
  }

  #st_header #mobile_bar #mobile_bar_bottom .search_widget_block {
    margin-bottom: 0.35rem;
  }

  /* ── Drawer menu principal (#side_stmobilemenu) — affinements ── */
  #side_stmobilemenu.st-menu,
  #side_stmobilemenu .st-menu-header {
    font-family: var(--fs-mh-font);
  }

  #side_stmobilemenu .st-menu-title {
    color: var(--fs-mh-ink-soft) !important;
    font-family: var(--fs-mh-font) !important;
    letter-spacing: 0.12em !important;
  }

  #side_stmobilemenu .close_right_side,
  #side_stmobilemenu .close_right_side i {
    color: var(--fs-mh-ink-soft) !important;
    opacity: 0.75;
    transition: opacity 0.22s var(--fs-mh-ease), color 0.22s var(--fs-mh-ease);
  }

  #side_stmobilemenu .close_right_side:hover i {
    color: var(--fs-mh-plum) !important;
    opacity: 1;
  }

  #side_stmobilemenu #st_mobile_menu a.mo_ma_level_0,
  #side_stmobilemenu .stmobilemenu_box a.mo_ma_level_0 {
    font-family: var(--fs-mh-font) !important;
    color: var(--fs-mh-ink) !important;
    border-bottom-color: rgba(90, 61, 72, 0.08) !important;
  }

  #side_stmobilemenu #st_mobile_menu a.mo_ma_level_0:hover,
  #side_stmobilemenu #st_mobile_menu a.mo_ma_level_0:focus,
  #side_stmobilemenu .stmobilemenu_box a.mo_ma_level_0:hover,
  #side_stmobilemenu .stmobilemenu_box a.mo_ma_level_0:focus {
    color: var(--fs-mh-plum) !important;
    background: rgba(245, 240, 234, 0.92) !important;
  }

  /* Drawer recherche / panier latéraux — cohérence discrète */
  #side_search.st-menu .st-menu-header,
  #side_products_cart.st-menu .st-menu-header,
  #side_mobile_nav.st-menu .st-menu-header {
    background: var(--fs-mh-ivory);
    border-bottom: 1px solid var(--fs-mh-line);
  }

  #side_search .st-menu-title,
  #side_products_cart .st-menu-title,
  #side_mobile_nav .st-menu-title {
    font-family: var(--fs-mh-font);
    color: var(--fs-mh-ink-soft);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.6875rem;
    font-weight: 600;
  }
}

/* Garde-fou desktop : aucune règle au-dessus de 992px */
@media (min-width: 992px) {
  /* fichier volontairement vide — header desktop inchangé */
}
