/*
 * PRATINIUM v408 — logo recentré et espace contenu restauré.
 *
 * - conserve le header compact 44 / 68 px de la v407 ;
 * - force l'image complète du logo à tenir au centre du compartiment inférieur ;
 * - neutralise les translations/animations héritées capables de décaler le logo ;
 * - restaure un espace régulier entre le header et le premier contenu des pages internes.
 */

/* ===== Espace entre le header et le premier contenu interne ===== */
html body:not(#index) #wrapper {
  margin-top: 0 !important;
  padding-top: 24px !important;
}

/* Le retrait doit être porté une seule fois par #wrapper, sans cumul dans les
   conteneurs Bootstrap ni dans les modules PRATINIUM. */
html body:not(#index) #wrapper > .container,
html body:not(#index) #wrapper > .container-fluid,
html body:not(#index) #content-wrapper,
html body:not(#index) #main,
html body:not(#index) #content,
html body#my-account #content,
html body.page-my-account #content,
html body[class*="my-account"] #content,
html body[id^="module-pratinium"] #content,
html body[class*="page-module-pratinium"] #content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html body:not(#index) #content > :first-child,
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;
}

/* ===== Desktop : logo entièrement visible et centré dans les 68 px ===== */
@media (min-width: 992px) {
  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 {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    animation: none !important;
    transform: none !important;
    translate: none !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 #_desktop_logo picture,
  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 .pf-header-logo-global picture,
  html body:not(#index) #header .pf-header-stack-v405--dual a.logo {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 68px !important;
    min-height: 0 !important;
    max-height: 68px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    line-height: 0 !important;
    transform: none !important;
    translate: none !important;
    box-sizing: border-box !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 {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: block !important;
    flex: 0 0 auto !important;
    align-self: center !important;
    width: auto !important;
    height: 54px !important;
    min-height: 0 !important;
    max-height: 54px !important;
    max-width: 220px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: 50% 50% !important;
    vertical-align: middle !important;
    animation: none !important;
    transform: none !important;
    translate: none !important;
    filter: none !important;
  }

  /* Les halos restent décoratifs mais ne doivent jamais masquer l'image. */
  html body:not(#index) #header .pf-header-stack-v405--dual #_desktop_logo::before,
  html body:not(#index) #header .pf-header-stack-v405--dual #_desktop_logo::after,
  html body:not(#index) #header .pf-header-stack-v405--dual .pf-header-logo-global::before,
  html body:not(#index) #header .pf-header-stack-v405--dual .pf-header-logo-global::after {
    pointer-events: none !important;
  }
}

@media (max-width: 991.98px) {
  html body:not(#index) #wrapper {
    padding-top: 16px !important;
  }
}
