/* PRATINIUM v221 — correctif mobile header stable
   Objectifs :
   1) Logo ligne 1.
   2) Ligne 2 = hamburger gauche + panier droite.
   3) Ligne 3 = CTA.
   4) Ligne 4 = recherche.
   5) Menu mobile propre, sans surcouches latérales. */

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

@media (max-width: 767.98px){
  #header,
  #header .header-banner,
  #header .header-nav,
  #header .header-top,
  #header .pf-header-top-global,
  #header .pf-header-top-global > .container,
  #header .header-top > .container,
  #header .pf-header-row-global{
    overflow:visible!important;
  }

  #header .header-nav{
    visibility:hidden!important;
    height:0!important;
    min-height:0!important;
    max-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    overflow:hidden!important;
  }

  #header .header-top.pf-header-top-global > .container,
  #header .header-top > .container{
    width:100vw!important;
    max-width:100vw!important;
    margin:0!important;
    padding:0 12px!important;
    box-sizing:border-box!important;
  }

  #header .pf-header-row-global,
  #header .header-top .container .row.pf-header-row-global{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:12px 0 14px!important;
    gap:8px!important;
    position:relative!important;
    box-sizing:border-box!important;
    min-height:0!important;
    transform:none!important;
    left:auto!important;
    right:auto!important;
  }

  /* Ligne 1 : logo seul, centré. */
  #header #_desktop_logo,
  #header .pf-header-logo-global{
    order:1!important;
    position:relative!important;
    z-index:5!important;
    width:100%!important;
    max-width:100%!important;
    min-height:56px!important;
    height:56px!important;
    flex:0 0 56px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    margin:0 auto!important;
    padding:0!important;
    transform:none!important;
    pointer-events:auto!important;
    float:none!important;
  }
  #header #_desktop_logo img,
  #header .pf-header-logo-global img{
    max-height:52px!important;
    width:auto!important;
    object-fit:contain!important;
    transform:none!important;
  }

  /* Ligne 2 : hamburger à gauche, panier à droite. Position statique volontaire. */
  #header .pf-mobile-top-actions{
    order:2!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    position:relative!important;
    inset:auto!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    transform:none!important;
    z-index:60!important;
    width:min(332px, calc(100vw - 36px))!important;
    max-width:min(332px, calc(100vw - 36px))!important;
    height:44px!important;
    min-height:44px!important;
    margin:0 auto!important;
    padding:0!important;
    box-sizing:border-box!important;
    pointer-events:none!important;
    float:none!important;
    clear:both!important;
  }
  #header .pf-mobile-menu-bars,
  #header .pf-mobile-cart-slot{
    pointer-events:auto!important;
    position:relative!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    transform:none!important;
    float:none!important;
  }

  #header .pf-mobile-menu-bars{
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    min-height:44px!important;
    margin:0!important;
    padding:0!important;
    border-radius:17px!important;
    border:1px solid rgba(15,103,168,.22)!important;
    background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(235,248,255,.94))!important;
    box-shadow:0 10px 22px rgba(15,42,70,.10), inset 0 1px 0 rgba(255,255,255,.98)!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex-direction:column!important;
    gap:5px!important;
    cursor:pointer!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{
    width:auto!important;
    min-width:58px!important;
    height:44px!important;
    min-height:44px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:flex-end!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{
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    min-width:58px!important;
    padding:0 12px!important;
    margin:0!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!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,.94))!important;
    box-shadow:0 10px 22px rgba(242,169,0,.08), inset 0 1px 0 rgba(255,255,255,.96)!important;
    color:#2e3543!important;
    font-size:13px!important;
    font-weight:800!important;
    line-height:1!important;
    white-space:nowrap!important;
    text-decoration:none!important;
  }
  #header .pf-mobile-cart-slot .material-icons,
  #header .pf-mobile-cart-slot i{
    color:#d89400!important;
    font-size:19px!important;
    line-height:1!important;
    margin:0!important;
  }
  #header .pf-mobile-cart-slot .cart-products-label,
  #header .pf-mobile-cart-slot .cart-label,
  #header .pf-mobile-cart-slot .hidden-sm-down,
  #header .pf-mobile-cart-slot .hidden-xs-down{
    display:none!important;
  }

  /* Ligne 3 + 4 : CTAs puis recherche. */
  #header .pf-header-centerline{
    order:3!important;
    position:relative!important;
    z-index:10!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    width:min(332px, calc(100vw - 36px))!important;
    max-width:min(332px, calc(100vw - 36px))!important;
    margin:0 auto!important;
    padding:0!important;
    gap:8px!important;
    left:auto!important;
    right:auto!important;
    transform:none!important;
    box-sizing:border-box!important;
    float:none!important;
  }
  #header .pf-header-centerline .pf-header-ctas,
  #header .pf-header-ctas{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 auto!important;
    padding:0!important;
    box-sizing:border-box!important;
  }
  #header .pf-header-centerline .pf-btn{
    min-width:0!important;
    width:100%!important;
    height:40px!important;
    min-height:40px!important;
    padding:0 4px!important;
    font-size:13px!important;
    line-height:1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  #header .pf-header-centerline #search_widget,
  #header .pf-header-centerline #_desktop_search,
  #header .pf-header-centerline .search-widget,
  #header .pf-header-centerline #search_widget form,
  #header .pf-header-centerline #_desktop_search form,
  #header .pf-header-centerline .search-widget form{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0 auto!important;
    box-sizing:border-box!important;
  }
  #header .pf-header-centerline input[type="text"],
  #header .pf-header-centerline input[type="search"]{
    height:40px!important;
    min-height:40px!important;
  }

  /* Ligne 5 : panneau mobile propre, sans surcouches. */
  #header .pf-mobile-menu-panel-v217,
  #header .pf-mobile-menu-panel-v221{
    order:4!important;
    position:relative!important;
    display:none!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    transform:none!important;
    z-index:99999!important;
    width:min(332px, calc(100vw - 36px))!important;
    max-width:min(332px, calc(100vw - 36px))!important;
    margin:0 auto!important;
    padding:10px 12px!important;
    border-radius:18px!important;
    border:1px solid rgba(205,218,232,.72)!important;
    background:rgba(255,255,255,.98)!important;
    box-shadow:0 16px 34px rgba(8,22,47,.12)!important;
    box-sizing:border-box!important;
    clear:both!important;
    overflow:hidden!important;
  }
  #header .pf-mobile-menu-panel-v217.is-open,
  #header .pf-mobile-menu-panel-v221.is-open{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:center!important;
    gap:0!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }

  /* Suppression des excroissances/surcouches latérales anciennes. */
  #header .pf-mobile-menu-panel-v217::before,
  #header .pf-mobile-menu-panel-v217::after,
  #header .pf-mobile-menu-panel-v221::before,
  #header .pf-mobile-menu-panel-v221::after,
  #header .pf-mobile-menu-panel-v217 .pf-mobile-panel-item::before,
  #header .pf-mobile-menu-panel-v217 .pf-mobile-panel-item::after,
  #header .pf-mobile-menu-panel-v221 .pf-mobile-panel-item::before,
  #header .pf-mobile-menu-panel-v221 .pf-mobile-panel-item::after{
    content:none!important;
    display:none!important;
    width:0!important;
    height:0!important;
    opacity:0!important;
    box-shadow:none!important;
    background:none!important;
    border:0!important;
  }

  #header .pf-mobile-menu-panel-v221 .pf-mobile-panel-item,
  #header .pf-mobile-menu-panel-v221 .pf-mobile-panel-item > a,
  #header .pf-mobile-menu-panel-v221 .pf-mobile-currency-toggle-v221{
    width:100%!important;
    min-height:42px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    margin:0!important;
    padding:0 12px!important;
    border-radius:0!important;
    border:0!important;
    background:transparent!important;
    color:#243044!important;
    font-size:14px!important;
    font-weight:800!important;
    line-height:1.1!important;
    text-decoration:none!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;
  }
  #header .pf-mobile-menu-panel-v221 .pf-mobile-panel-item + .pf-mobile-panel-item{
    border-top:1px solid rgba(205,218,232,.78)!important;
  }
  #header .pf-mobile-currency-toggle-v221{
    cursor:pointer!important;
    appearance:none!important;
    -webkit-appearance:none!important;
  }
  #header .pf-mobile-currency-toggle-v221 .pf-globe{
    width:18px!important;
    height:18px!important;
    margin-right:9px!important;
    flex:0 0 18px!important;
  }
  #header .pf-mobile-currency-toggle-v221 strong{font-weight:900!important;margin-left:4px!important;}
  #header .pf-mobile-currency-toggle-v221 .pf-chevron{margin-left:auto!important;font-size:13px!important;color:#607089!important;}

  #header .pf-mobile-currency-list-v221{
    display:none!important;
    flex-direction:column!important;
    gap:6px!important;
    width:100%!important;
    padding:6px 0 2px!important;
  }
  #header .pf-mobile-currency-v221.is-open .pf-mobile-currency-list-v221{
    display:flex!important;
  }
  #header .pf-mobile-currency-list-v221 a{
    min-height:34px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:999px!important;
    border:1px solid rgba(15,103,168,.10)!important;
    background:rgba(255,255,255,.86)!important;
    color:#243044!important;
    font-size:13px!important;
    font-weight:800!important;
    text-decoration:none!important;
  }

  #header .pf-mobile-contact-link-v221 .pf-headset{
    width:17px!important;
    height:17px!important;
    margin-right:8px!important;
    flex:0 0 17px!important;
  }

  /* Masque tous les anciens panneaux clonés v217/v219 qui créaient les doublons. */
  #header .pf-mobile-extra-panel,
  #header .pf-mobile-menu-panel-v217 .pf-mobile-currency-v217,
  #header .pf-mobile-menu-panel-v217 .pf-mobile-contact-v217,
  #header .pf-mobile-menu-panel-v217 .pf-mobile-currency-v219,
  #header .pf-mobile-menu-panel-v217 .pf-mobile-contact-v219,
  #header .pf-mobile-menu-panel-v217 .currency-selector,
  #header .pf-mobile-menu-panel-v217 #_desktop_currency_selector,
  #header .pf-mobile-menu-panel-v217 .dropdown-menu,
  #header .pf-mobile-menu-panel-v217 ul.dropdown-menu{
    display:none!important;
    visibility:hidden!important;
    height:0!important;
    min-height:0!important;
    max-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
}
