/* PRATINIUM — V24
   - Desktop : restauration stricte du header (logo à gauche + Acheter/Voter/Investir + recherche sur UNE SEULE LIGNE).
   - Mobile : espace logo → boutons encore réduit, sans casser l'alignement validé.
*/

html, body { max-width: 100% !important; overflow-x: hidden !important; }
*, *::before, *::after { box-sizing: border-box !important; }
img, svg, video, canvas, iframe { max-width: 100% !important; }

@media (min-width: 768px) {
  #header, header,
  #header .header-top,
  header .header-top {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 138px !important;
    height: 138px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    border: 0 !important;
  }

  #header .header-top .container,
  header .header-top .container {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 138px !important;
    height: 138px !important;
    padding: 0 clamp(24px, 2.6vw, 44px) !important;
    margin: 0 auto !important;
    overflow: visible !important;
  }

  #_mobile_logo { display: none !important; }

  #_desktop_logo,
  .header-top #_desktop_logo,
  .header-top .logo,
  header .logo,
  #header a.logo,
  header a.logo {
    position: absolute !important;
    left: clamp(24px, 2.6vw, 44px) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 260px !important;
    max-width: 260px !important;
    height: 78px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left !important;
  }

  #_desktop_logo img,
  .header-top .logo img,
  header .logo img,
  #header a.logo img,
  header a.logo img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    max-width: 245px !important;
    max-height: 78px !important;
    object-fit: contain !important;
  }

  .pf-header-centerline {
    position: absolute !important;
    left: 395px !important;
    right: clamp(24px, 2.6vw, 44px) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 2 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: clamp(28px, 3vw, 54px) !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .pf-header-centerline .pf-header-ctas,
  .pf-header-ctas {
    order: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .pf-header-centerline .pf-header-ctas .pf-btn,
  .pf-header-ctas .pf-btn {
    width: auto !important;
    min-width: 124px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 24px !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }

  .pf-header-centerline #search_widget,
  .pf-header-centerline #_desktop_search,
  .pf-header-centerline .search-widget {
    order: 1 !important;
    display: flex !important;
    align-items: center !important;
    flex: 0 0 clamp(300px, 21vw, 365px) !important;
    width: clamp(300px, 21vw, 365px) !important;
    max-width: clamp(300px, 21vw, 365px) !important;
    min-width: 300px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .pf-header-centerline #search_widget form,
  .pf-header-centerline #_desktop_search form,
  .pf-header-centerline .search-widget form,
  .pf-header-centerline #search_widget input,
  .pf-header-centerline #_desktop_search input,
  .pf-header-centerline .search-widget input,
  .pf-header-centerline #search_widget input[type="text"],
  .pf-header-centerline #_desktop_search input[type="text"],
  .pf-header-centerline .search-widget input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .pf-header-centerline {
    left: 290px !important;
    gap: 16px !important;
  }
  .pf-header-centerline #search_widget,
  .pf-header-centerline #_desktop_search,
  .pf-header-centerline .search-widget {
    flex-basis: 280px !important;
    width: 280px !important;
    min-width: 240px !important;
  }
  .pf-header-centerline .pf-header-ctas .pf-btn,
  .pf-header-ctas .pf-btn { min-width: 106px !important; padding: 0 16px !important; }
}

@media (max-width: 767px) {
  #header, header,
  #header .header-top,
  header .header-top,
  #header .header-top .container,
  header .header-top .container {
    max-width: 100vw !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  #header .header-top,
  header .header-top,
  #header .header-top .container,
  header .header-top .container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    width: 100% !important;
    padding: 3px 0 7px !important;
    margin: 0 !important;
  }

  #_desktop_logo,
  #_mobile_logo,
  .header-top .logo,
  header .logo,
  #header .logo,
  header a.logo,
  #header a.logo {
    order: 0 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 0 !important;
    height: 58px !important;
    max-height: 58px !important;
    margin: 0 auto -2px !important;
    padding: 0 !important;
    text-align: center !important;
    flex: 0 0 58px !important;
    z-index: 5 !important;
  }

  #_desktop_logo img,
  #_mobile_logo img,
  .header-top .logo img,
  header .logo img,
  #header .logo img,
  header a.logo img,
  #header a.logo img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    max-height: 52px !important;
    max-width: min(205px, 70vw) !important;
    object-fit: contain !important;
  }

  .pf-header-centerline {
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  .pf-header-centerline .pf-header-ctas,
  .pf-header-ctas {
    order: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .pf-header-centerline .pf-header-ctas .pf-btn,
  .pf-header-ctas .pf-btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 6px !important;
    margin: 0 !important;
    font-size: .86rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .pf-header-centerline #search_widget,
  .pf-header-centerline #_desktop_search,
  .pf-header-centerline .search-widget,
  #search_widget,
  #_desktop_search,
  .header-top .search-widget,
  header .search-widget {
    order: 1 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    margin: 0 auto !important;
    overflow: visible !important;
  }

  .pf-header-centerline #search_widget form,
  .pf-header-centerline #_desktop_search form,
  .pf-header-centerline .search-widget form,
  #search_widget form,
  #_desktop_search form,
  .search-widget form,
  .search-widget input,
  .search-widget input[type="text"],
  #search_widget input,
  #_desktop_search input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .pf-hero,
  .pf-hero__media,
  .pf-hero__overlay,
  .pf-hero__content,
  .pf-hero__copy,
  .pf-hero-journey {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .pf-hero__overlay { padding: 28px 14px 0 !important; }
  .pf-hero__copy { text-align: center !important; margin: 0 auto !important; }
  .pf-hero__badge { position: static !important; margin: 0 auto 14px !important; }
  .pf-hero__title, .pf-hero__subtitle, .pf-hero__tagline { text-align: center !important; margin-left: auto !important; margin-right: auto !important; }

  .pf-hero-journey { padding: 22px 0 20px !important; overflow: visible !important; }
  .pf-hero-journey__head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 0 16px !important;
  }
  .pf-hero-journey__title { width: 100% !important; text-align: center !important; white-space: normal !important; }
  .pf-hero-journey__head .pf-tabs, .pf-hero-journey .pf-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  .pf-hero-journey__head .pf-tab, .pf-hero-journey .pf-tab {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 4px !important;
    margin: 0 !important;
    font-size: .78rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .pf-hero-journey__head .pf-hero-login-cta {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0 12px !important;
  }
  .pf-hero-journey .pf-steps,
  .pf-hero-journey .pf-steps.pf-steps--active {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .pf-hero-journey .pf-step, .pf-hero-journey .pf-step__desc { max-width: 100% !important; width: 100% !important; }
  .pf-container, .pf-projects__grid, .pf-legal__grid, .pf-footer-links__inner {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}

@media (max-width: 360px) {
  .pf-header-ctas .pf-btn, .pf-hero-journey .pf-tab { font-size: .72rem !important; }
}