/*
 * PRATINIUM v407 — header encore plus compact, logo contenu et raccord contenu/header.
 *
 * - compartiment supérieur : 44 px ;
 * - compartiment inférieur : 68 px ;
 * - logo contenu dans son compartiment sans coupe ni débordement ;
 * - suppression de l'espace externe et du premier retrait interne avant les bandeaux de page ;
 * - marges latérales du header maintenues à 8 px.
 */

/* ===== Raccord immédiat entre le header et le premier contenu des pages internes ===== */
html body:not(#index) #wrapper {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html body:not(#index) #wrapper > .container,
html body:not(#index) #wrapper > .container-fluid,
html body:not(#index) #content-wrapper,
html body:not(#index) #main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html body:not(#index) #content > :first-child {
  margin-top: 0 !important;
}

/* Les deux familles montrées dans les captures possèdent également un retrait
   interne avant leur premier bandeau. Il est supprimé sans toucher aux autres
   espacements verticaux de la page. */
html body#my-account #content,
html body.page-my-account #content,
html body[class*="my-account"] #content {
  padding-top: 0 !important;
}

html body[id^="module-pratinium"] #content,
html body[class*="page-module-pratinium"] #content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html body[id^="module-pratinium"] #content > :first-child,
html body[class*="page-module-pratinium"] #content > :first-child,
html body[id^="module-pratinium"] #main > #content > :first-child,
html body[class*="page-module-pratinium"] #main > #content > :first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ===== Desktop : double niveau ramené à 44 + 68 px ===== */
@media (min-width: 992px) {
  html body:not(#index) #header:has(.pf-header-stack-v405--dual) {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    box-sizing: border-box !important;
  }

  html body:not(#index) #header .pf-header-stack-v405--dual {
    width: 100% !important;
    max-width: none !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
  }

  /* Niveau supérieur : Contact / Devise / Panier. */
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-nav,
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-nav > .container,
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-nav > .container > .row,
  html body:not(#index) #header .pf-header-stack-v405--dual .pf-desktop-contact-zone,
  html body:not(#index) #header .pf-header-stack-v405--dual .right-nav {
    min-height: 44px !important;
    height: 44px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  html body:not(#index) #header .pf-header-stack-v405--dual > .header-nav > .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  html body:not(#index) #header .pf-header-stack-v405--dual .pf-desktop-contact-link,
  html body:not(#index) #header .pf-header-stack-v405--dual .right-nav #_desktop_currency_selector,
  html body:not(#index) #header .pf-header-stack-v405--dual .right-nav > .currency-selector,
  html body:not(#index) #header .pf-header-stack-v405--dual .right-nav #_desktop_cart .blockcart,
  html body:not(#index) #header .pf-header-stack-v405--dual .right-nav .blockcart {
    min-height: 34px !important;
    height: 34px !important;
  }

  html body:not(#index) #header .pf-header-stack-v405--dual .pf-desktop-contact-link {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  html body:not(#index) #header .pf-header-stack-v405--dual .pf-topbar-contact-icon {
    width: 19px !important;
    height: 19px !important;
    flex-basis: 19px !important;
  }

  /* Niveau inférieur : Logo / CTA / Recherche. */
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-top,
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-top.pf-header-top-global,
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-top > .container,
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-top.pf-header-top-global > .container,
  html body:not(#index) #header .pf-header-stack-v405--dual .pf-header-row-global,
  html body:not(#index) #header .pf-header-stack-v405--dual .header-top .container .row.pf-header-row-global {
    min-height: 68px !important;
    height: 68px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  html body:not(#index) #header .pf-header-stack-v405--dual > .header-top,
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-top.pf-header-top-global,
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-top > .container,
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-top.pf-header-top-global > .container {
    overflow: hidden !important;
  }

  html body:not(#index) #header .pf-header-stack-v405--dual > .header-top > .container,
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-top.pf-header-top-global > .container {
    padding: 0 20px !important;
  }

  html body:not(#index) #header .pf-header-stack-v405--dual .pf-header-row-global {
    padding: 0 !important;
    align-items: center !important;
  }

  /* Logo : la boîte, le lien et l'image utilisent la même hauteur utile.
     height:auto + max-height évitent toute déformation ou coupe. */
  html body:not(#index) #header .pf-header-stack-v405--dual #_desktop_logo,
  html body:not(#index) #header .pf-header-stack-v405--dual .pf-header-logo-global {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 0 !important;
    height: 68px !important;
    max-height: 68px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  html body:not(#index) #header .pf-header-stack-v405--dual #_desktop_logo h1,
  html body:not(#index) #header .pf-header-stack-v405--dual #_desktop_logo a,
  html body:not(#index) #header .pf-header-stack-v405--dual .pf-header-logo-global h1,
  html body:not(#index) #header .pf-header-stack-v405--dual .pf-header-logo-global a,
  html body:not(#index) #header .pf-header-stack-v405--dual a.logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 68px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    overflow: hidden !important;
  }

  html body:not(#index) #header .pf-header-stack-v405--dual #_desktop_logo img,
  html body:not(#index) #header .pf-header-stack-v405--dual .pf-header-logo-global img,
  html body:not(#index) #header .pf-header-stack-v405--dual .logo img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 240px !important;
    max-height: 62px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }

  html body:not(#index) #header .pf-header-stack-v405--dual .pf-header-ctas .pf-btn,
  html body:not(#index) #header .pf-header-stack-v405--dual .pf-header-centerline .pf-btn {
    min-height: 40px !important;
    height: 40px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  html body:not(#index) #header .pf-header-stack-v405--dual #search_widget form,
  html body:not(#index) #header .pf-header-stack-v405--dual .search-widget form {
    min-height: 40px !important;
    height: 40px !important;
  }

  html body:not(#index) #header .pf-header-stack-v405--dual #search_widget input[type="text"],
  html body:not(#index) #header .pf-header-stack-v405--dual .search-widget input[type="text"],
  html body:not(#index) #header .pf-header-stack-v405--dual #search_widget input[type="search"],
  html body:not(#index) #header .pf-header-stack-v405--dual .search-widget input[type="search"] {
    min-height: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
  }
}
