/*
 * PRATINIUM v411 — recentrage définitif du logo du header desktop à deux niveaux.
 *
 * Correction ciblée par la classe structurelle --dual, sans dépendre de l'identifiant
 * du body. Certains contrôleurs de modules peuvent conserver un body#index, ce qui
 * empêchait les règles v408/v410 de s'appliquer.
 */

@media (min-width: 992px) {
  /* Compartiment inférieur : géométrie stable et centrage vertical réel. */
  html #header .pf-header-stack-v405--dual > .header-top,
  html #header .pf-header-stack-v405--dual > .header-top.pf-header-top-global,
  html #header .pf-header-stack-v405--dual > .header-top > .container,
  html #header .pf-header-stack-v405--dual > .header-top.pf-header-top-global > .container,
  html #header .pf-header-stack-v405--dual .pf-header-row-global,
  html #header .pf-header-stack-v405--dual .header-top .container .row.pf-header-row-global {
    position: relative !important;
    overflow: visible !important;
    align-items: center !important;
  }

  html #header .pf-header-stack-v405--dual #_desktop_logo,
  html #header .pf-header-stack-v405--dual .pf-header-logo-global {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: stretch !important;
    height: 100% !important;
    min-height: 68px !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    line-height: 0 !important;
    animation: none !important;
    transform: none !important;
    translate: none !important;
    box-sizing: border-box !important;
  }

  html #header .pf-header-stack-v405--dual #_desktop_logo h1,
  html #header .pf-header-stack-v405--dual #_desktop_logo > a,
  html #header .pf-header-stack-v405--dual #_desktop_logo > picture,
  html #header .pf-header-stack-v405--dual #_desktop_logo a.logo,
  html #header .pf-header-stack-v405--dual .pf-header-logo-global h1,
  html #header .pf-header-stack-v405--dual .pf-header-logo-global > a,
  html #header .pf-header-stack-v405--dual .pf-header-logo-global > picture,
  html #header .pf-header-stack-v405--dual .pf-header-logo-global a.logo {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 68px !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    line-height: 0 !important;
    animation: none !important;
    transform: none !important;
    translate: none !important;
  }

  /* L'image est dimensionnée à l'intérieur du compartiment puis centrée sans
     translation compensatoire. Ces sélecteurs dominent les anciennes règles
     globales qui imposaient 104/122/142 px au logo. */
  html #header .pf-header-stack-v405--dual #_desktop_logo img,
  html #header .pf-header-stack-v405--dual #_desktop_logo img.logo,
  html #header .pf-header-stack-v405--dual .pf-header-logo-global img,
  html #header .pf-header-stack-v405--dual .pf-header-logo-global img.logo,
  html #header .pf-header-stack-v405--dual .header-top .logo img,
  html #header .pf-header-stack-v405--dual .header-top a.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: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 220px !important;
    max-height: 58px !important;
    margin: auto !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: 50% 50% !important;
    vertical-align: middle !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    transition: none !important;
    transform: none !important;
    translate: none !important;
    filter: none !important;
    will-change: auto !important;
  }

  html #header .pf-header-stack-v405--dual #_desktop_logo::before,
  html #header .pf-header-stack-v405--dual #_desktop_logo::after,
  html #header .pf-header-stack-v405--dual .pf-header-logo-global::before,
  html #header .pf-header-stack-v405--dual .pf-header-logo-global::after {
    pointer-events: none !important;
  }
}

/* ========================================================================== 
 * PRATINIUM v414 — alignement VISUEL effectif du compartiment inférieur dual
 * sur la variante à un niveau.
 *
 * Les corrections précédentes agissaient sur les gaps internes, mais les deux
 * variantes ne partagent pas la même origine horizontale effective. On aligne
 * donc les deux repères réellement visibles :
 *   - logo : +128 px sur grands écrans ;
 *   - ensemble CTA + recherche : +58 px sur grands écrans.
 * Le champ de recherche retrouve ainsi la même marge droite que sur l'accueil,
 * et l'écart logo → CTA devient identique à celui du header simple.
 * ========================================================================== */
@media (min-width: 1501px) {
  html #header .pf-header-stack-v405--dual {
    --pf-dual-logo-x: 128px;
    --pf-dual-centerline-x: 58px;
  }

  html #header .pf-header-stack-v405--dual #_desktop_logo,
  html #header .pf-header-stack-v405--dual .pf-header-logo-global {
    position: relative !important;
    left: var(--pf-dual-logo-x) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  html #header .pf-header-stack-v405--dual .pf-header-centerline {
    position: relative !important;
    left: var(--pf-dual-centerline-x) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

@media (min-width: 1221px) and (max-width: 1500px) {
  html #header .pf-header-stack-v405--dual {
    --pf-dual-logo-x: 92px;
    --pf-dual-centerline-x: 42px;
  }

  html #header .pf-header-stack-v405--dual #_desktop_logo,
  html #header .pf-header-stack-v405--dual .pf-header-logo-global {
    position: relative !important;
    left: var(--pf-dual-logo-x) !important;
  }

  html #header .pf-header-stack-v405--dual .pf-header-centerline {
    position: relative !important;
    left: var(--pf-dual-centerline-x) !important;
  }
}

@media (min-width: 992px) and (max-width: 1220px) {
  html #header .pf-header-stack-v405--dual {
    --pf-dual-logo-x: 48px;
    --pf-dual-centerline-x: 22px;
  }

  html #header .pf-header-stack-v405--dual #_desktop_logo,
  html #header .pf-header-stack-v405--dual .pf-header-logo-global {
    position: relative !important;
    left: var(--pf-dual-logo-x) !important;
  }

  html #header .pf-header-stack-v405--dual .pf-header-centerline {
    position: relative !important;
    left: var(--pf-dual-centerline-x) !important;
  }
}
