/*
 * PRATINIUM v406 — header double niveau compact à 8 px des bords.
 *
 * - conserve la coque unique v405 et la neutralisation du cadre du footer ;
 * - ramène les marges latérales réelles du header à 8 px ;
 * - réduit le compartiment Contact / Devise / Panier à 54 px ;
 * - réduit le compartiment Logo / CTA / Recherche à 82 px ;
 * - compacte aussi le logo, les CTA et la recherche pour éviter tout débordement.
 */

/* ===== Footer : neutralisation du cadran extérieur héritée de v405 ===== */
html body #page > #footer,
html body #footer,
html body footer#footer {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  filter: none !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}
html body #footer::before,
html body #footer::after,
html body footer#footer::before,
html body footer#footer::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
html body #footer > .footer-container:not(.pratinium-footer-hidden),
html body #footer > .container,
html body #footer > .container-fluid,
html body footer#footer > .footer-container:not(.pratinium-footer-hidden),
html body footer#footer > .container,
html body footer#footer > .container-fluid {
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

/* ===== Desktop : header double niveau compact ===== */
@media (min-width: 992px) {
  /* La marge de 8 px est portée par #header afin de ne plus se cumuler avec
     les anciens paddings/conteneurs internes. */
  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 {
    position: relative !important;
    isolation: isolate !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid rgba(15, 23, 42, .075) !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, .97) !important;
    box-shadow: 0 16px 44px rgba(15, 23, 42, .075), inset 0 1px 0 rgba(255, 255, 255, .95) !important;
    box-sizing: border-box !important;
  }

  /* Compartiment supérieur : 54 px. */
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-nav {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-height: 54px !important;
    height: 54px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
    background:
      radial-gradient(circle at 8% 10%, rgba(75, 198, 255, .10), transparent 30%),
      radial-gradient(circle at 92% 8%, rgba(255, 188, 58, .08), transparent 28%),
      linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(249, 252, 255, .97)) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-nav > .container {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 54px !important;
    height: 54px !important;
    margin: 0 !important;
    padding: 0 20px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-nav > .container > .row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-height: 54px !important;
    height: 54px !important;
    margin: 0 !important;
  }
  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 {
    display: flex !important;
    align-items: center !important;
    min-height: 54px !important;
    height: 54px !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  html body:not(#index) #header .pf-header-stack-v405--dual .right-nav {
    justify-content: flex-end !important;
  }

  /* Compartiment inférieur : 82 px. */
  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 {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-height: 82px !important;
    height: 82px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }
  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 > .header-top > .container {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 82px !important;
    height: 82px !important;
    margin: 0 !important;
    padding: 0 24px !important;
    overflow: hidden !important;
    background:
      radial-gradient(circle at 18% 30%, rgba(75, 198, 255, .07), transparent 34%),
      radial-gradient(circle at 82% 26%, rgba(255, 188, 58, .06), transparent 30%),
      rgba(255, 255, 255, .985) !important;
    border: 0 !important;
    border-top: 1px solid rgba(148, 163, 184, .22) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-top > .container::before,
  html body:not(#index) #header .pf-header-stack-v405--dual > .header-top.pf-header-top-global > .container::before {
    border-radius: 0 !important;
  }
  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 {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 82px !important;
    height: 82px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
  }

  /* Le contenu est compacté avec le compartiment, sans déformation. */
  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 {
    height: 70px !important;
    min-height: 0 !important;
    max-height: 70px !important;
    align-self: center !important;
    overflow: visible !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 {
    height: 92px !important;
    max-height: 92px !important;
    max-width: 285px !important;
    object-fit: contain !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 {
    height: 44px !important;
    min-height: 44px !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 {
    height: 44px !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"] {
    height: 42px !important;
    line-height: 42px !important;
  }
}

/* Tablette/mobile : la coque desktop ne doit pas créer de marge ou hauteur vide. */
@media (max-width: 991.98px) {
  html body #header .pf-header-stack-v405,
  html body #header .pf-header-stack-v405--dual,
  html body #header .pf-header-stack-v405--single {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
}
