/* PRATINIUM v217 — Header mobile stabilisé
   Objectif : restaurer sur mobile le panier et un vrai bouton menu (3 barres)
   donnant accès à Devise + Contactez-nous, sans réintroduire le menu catégories. */

@media (min-width:768px){
  #header .pf-mobile-top-actions,
  #header .pf-mobile-menu-panel-v217{display:none!important;}
}

@media (max-width:767px){
  /* La topbar native reste disponible pour le DOM, mais ne doit pas consommer d'espace en mobile. */
  #header .header-nav{
    display:block!important;
    visibility:hidden!important;
    height:0!important;
    min-height:0!important;
    max-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }

  /* Le header principal redevient l'ancre stable des actions mobiles. */
  #header .pf-header-top-global,
  #header .header-top,
  #header .pf-header-top-global > .container,
  #header .pf-header-row-global{
    position:relative!important;
    overflow:visible!important;
  }

  #header .pf-header-row-global{
    min-height:86px!important;
    padding-left:58px!important;
    padding-right:94px!important;
  }

  /* Bloc mobile : hamburger à gauche + panier à droite. */
  #header .pf-mobile-top-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    position:absolute!important;
    left:12px!important;
    right:12px!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    z-index:30!important;
    pointer-events:none!important;
  }

  #header .pf-mobile-menu-bars,
  #header .pf-mobile-cart-slot{
    pointer-events:auto!important;
  }

  #header .pf-mobile-menu-bars{
    width:42px!important;
    height:42px!important;
    display:inline-flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    padding:0!important;
    border-radius:16px!important;
    border:1px solid rgba(15,103,168,.18)!important;
    background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(237,248,255,.88))!important;
    box-shadow:0 10px 24px rgba(15,42,70,.08), inset 0 1px 0 rgba(255,255,255,.95)!important;
    cursor:pointer!important;
    appearance:none!important;
    -webkit-appearance:none!important;
  }

  #header .pf-mobile-menu-bars span{
    display:block!important;
    width:18px!important;
    height:2px!important;
    border-radius:999px!important;
    background:#0f67a8!important;
    transition:transform .2s ease, opacity .2s ease!important;
  }

  #header .pf-mobile-menu-bars[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)!important;}
  #header .pf-mobile-menu-bars[aria-expanded="true"] span:nth-child(2){opacity:0!important;}
  #header .pf-mobile-menu-bars[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)!important;}

  #header .pf-mobile-cart-slot{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:54px!important;
    min-height:42px!important;
  }

  #header .pf-mobile-cart-slot:empty::before{
    content:"Panier"!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    height:42px!important;
    padding:0 13px!important;
    border-radius:999px!important;
    border:1px solid rgba(242,169,0,.24)!important;
    color:#2e3543!important;
    font-weight:750!important;
    background:linear-gradient(180deg,rgba(255,248,232,.96),rgba(255,255,255,.92))!important;
  }

  #header .pf-mobile-cart-slot .blockcart,
  #header .pf-mobile-cart-slot #_desktop_cart,
  #header .pf-mobile-cart-slot .cart-preview,
  #header .pf-mobile-cart-slot a{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    height:42px!important;
    min-height:42px!important;
    padding:0 13px!important;
    margin:0!important;
    border-radius:999px!important;
    border:1px solid rgba(242,169,0,.24)!important;
    background:linear-gradient(180deg,rgba(255,248,232,.96),rgba(255,255,255,.92))!important;
    box-shadow:0 10px 24px rgba(242,169,0,.08), inset 0 1px 0 rgba(255,255,255,.96)!important;
    color:#2e3543!important;
    font-size:14px!important;
    font-weight:800!important;
    line-height:1!important;
    text-decoration:none!important;
    white-space:nowrap!important;
  }

  #header .pf-mobile-cart-slot .blockcart::before,
  #header .pf-mobile-cart-slot .blockcart::after,
  #header .pf-mobile-cart-slot #_desktop_cart::before,
  #header .pf-mobile-cart-slot #_desktop_cart::after{
    content:none!important;
    display:none!important;
  }

  #header .pf-mobile-cart-slot .material-icons,
  #header .pf-mobile-cart-slot i{
    color:#d89400!important;
    font-size:20px!important;
    line-height:1!important;
  }

  /* Panneau mobile : Devise + Contactez-nous, ouvert par les trois barres. */
  #header .pf-mobile-menu-panel-v217{
    display:none!important;
    position:absolute!important;
    left:12px!important;
    right:12px!important;
    top:calc(100% + 8px)!important;
    z-index:50!important;
    padding:12px!important;
    border-radius:22px!important;
    border:1px solid rgba(205,218,232,.70)!important;
    background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(235,248,255,.94) 55%,rgba(255,248,232,.92))!important;
    box-shadow:0 20px 46px rgba(8,22,47,.14), inset 0 1px 0 rgba(255,255,255,.95)!important;
  }

  #header .pf-mobile-menu-panel-v217.is-open{
    display:flex!important;
    flex-direction:column!important;
    gap:10px!important;
  }

  #header .pf-mobile-menu-panel-v217 .pf-mobile-panel-item,
  #header .pf-mobile-menu-panel-v217 .pf-mobile-panel-item a,
  #header .pf-mobile-menu-panel-v217 .pf-mobile-panel-item .currency-selector,
  #header .pf-mobile-menu-panel-v217 .pf-mobile-panel-item #_desktop_currency_selector,
  #header .pf-mobile-menu-panel-v217 .pf-mobile-panel-item button{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-height:42px!important;
    border-radius:999px!important;
    border:1px solid rgba(15,103,168,.16)!important;
    background:rgba(255,255,255,.86)!important;
    color:#243044!important;
    font-size:14px!important;
    font-weight:800!important;
    text-decoration:none!important;
    white-space:nowrap!important;
  }

  #header .pf-mobile-menu-panel-v217 .pf-mobile-contact-v217 a::before{
    content:""!important;
    width:18px!important;
    height:18px!important;
    margin-right:8px!important;
    display:inline-block!important;
    background-repeat:no-repeat!important;
    background-position:center!important;
    background-size:18px 18px!important;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%230f67a8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12a8 8 0 0 1 16 0'/%3E%3Cpath d='M4 12v3a2 2 0 0 0 2 2h1v-6H6a2 2 0 0 0-2 2Z'/%3E%3Cpath d='M20 12v3a2 2 0 0 1-2 2h-1v-6h1a2 2 0 0 1 2 2Z'/%3E%3Cpath d='M9 19c1 .7 2 .9 3 .9 1.7 0 3.2-.6 4.2-1.9'/%3E%3C/svg%3E")!important;
  }

  #header .pf-mobile-menu-panel-v217 .currency-selector .dropdown-menu,
  #header .pf-mobile-menu-panel-v217 .currency-selector ul,
  #header .pf-mobile-menu-panel-v217 #_desktop_currency_selector .dropdown-menu,
  #header .pf-mobile-menu-panel-v217 #_desktop_currency_selector ul{
    position:static!important;
    width:100%!important;
    min-width:0!important;
    margin:8px 0 0!important;
    border-radius:14px!important;
    box-shadow:none!important;
  }

  /* Évite que les anciens panneaux masquent le nouveau. */
  #header .pf-mobile-extra-panel{
    display:none!important;
    visibility:hidden!important;
    height:0!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
}
