/* Passions d'O — navigation desktop premium, version 1.0.7.
   Les sous-menus PrestaShop et le menu mobile restent natifs. */

/* Le sélecteur reste sur la ligne des icônes, à l'aplomb de « Déstockage ». */
#header .header-top > .container {
  position: relative;
}

#header .header-top .pdo-header-language {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
}

#header .pdo-header-language .language-selector {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  float: none;
  position: relative;
}

#header .pdo-header-language .language-selector > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  padding: 7px 10px;
  color: #2b392f;
  background: #f4f7f2;
  border: 1px solid #e7ede5;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

#header .pdo-header-language .language-selector > a:hover,
#header .pdo-header-language .language-selector.open > a {
  color: #2c6b2d;
  background: #ecf5e9;
  border-color: #d8e8d4;
}

#header .pdo-header-language .language-selector .expand-more { color: inherit; }
#header .pdo-header-language .language-selector .material-icons { font-size: 18px; }
#header .pdo-header-language .language-selector .dropdown-menu {
  left: 0;
  right: auto;
  top: calc(100% + 5px);
  z-index: 1050;
  border-radius: 6px;
  box-shadow: 0 8px 25px rgba(22, 48, 24, .13);
}

@media (min-width: 992px) {
  #header .header-top .pdo-header-language {
    position: absolute;
    z-index: 105;
    top: 50%;
    left: var(--pdo-language-offset, 0px);
    transform: translateY(-50%);
    visibility: hidden;
  }

  #header .header-top .pdo-header-language.pdo-header-language--ready {
    visibility: visible;
  }

  #header .header-top .header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(9px, 1vw, 18px);
  }

  #header .header-top .header-right > #_desktop_seach_widget { order: 1; }
  #header .header-top .header-right > #_desktop_user_info { order: 2; }
  #header .header-top .header-right > #_desktop_cart { order: 3; }
  #header .header-top .header-right > #_desktop_seach_widget,
  #header .header-top .header-right > #_desktop_user_info,
  #header .header-top .header-right > #_desktop_cart {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    float: none !important;
    margin: 0;
    padding: 0;
  }

  #header .header-top .header-right .user-info { float: none !important; }
}

@media (max-width: 991px) {
  #header .header-top .pdo-header-language {
    display: none;
  }
  #header .pdo-header-language .language-selector > a {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 12px;
  }
}

@media (min-width: 992px) {
  #header .nav-full-width > .container {
    width: calc(100% - 48px);
    max-width: 1490px;
    padding-left: 8px;
    padding-right: 8px;
  }

  #header #_desktop_top_menu {
    float: none;
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  #header #_desktop_top_menu > #top-menu {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    gap: clamp(3px, .6vw, 12px);
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  #header #_desktop_top_menu #top-menu > li {
    display: flex;
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    align-items: center;
    white-space: nowrap;
  }

  #header #_desktop_top_menu #top-menu > li > a.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 15px clamp(4px, .55vw, 10px);
    margin: 0;
    color: #28352f;
    font-family: "Poppins", "Inter", Arial, sans-serif;
    font-size: clamp(12px, 1vw, 16px) !important;
    font-weight: 600 !important;
    line-height: 1.25;
    letter-spacing: -.01em;
    white-space: nowrap !important;
    text-transform: none;
    transition: color .18s ease, background-color .18s ease;
  }

  #header #_desktop_top_menu #top-menu > li > a.dropdown-item::before {
    display: none;
  }

  #header #_desktop_top_menu #top-menu > li > a.dropdown-item:hover,
  #header #_desktop_top_menu #top-menu > li.current > a.dropdown-item,
  #header #_desktop_top_menu #top-menu > li > a.dropdown-item:focus-visible {
    background: #eef5ec;
    color: #326c2e;
    border-radius: 6px;
  }

  #header #_desktop_top_menu #top-menu > li > a.dropdown-item:focus-visible {
    outline: 2px solid #719b68 !important;
    outline-offset: -2px;
  }

  #header #_desktop_top_menu #top-menu > li > .sub-menu {
    top: 100%;
    text-align: left;
    border: 1px solid #e2e8df;
    border-radius: 0 0 9px 9px;
    box-shadow: 0 12px 28px rgba(25, 48, 27, .1);
  }

  /* Le module ps_mainmenu impose un mega-menu large en pixels via JS.
     Une largeur contrôlée et des lignes empilées en font un menu vertical. */
  #header #_desktop_top_menu #top-menu > li > .sub-menu,
  #header #_desktop_top_menu #top-menu > li > .sub-menu.js-sub-menu {
    box-sizing: border-box;
    display: block !important;
    width: 285px !important;
    min-width: 0 !important;
    max-width: min(285px, 92vw) !important;
    padding: 8px 0 !important;
    overflow: visible;
    white-space: normal;
  }

  /* Les derniers sous-menus s'ouvrent vers l'intérieur de la fenêtre. */
  #header #_desktop_top_menu #top-menu > li:nth-last-child(-n+2) > .sub-menu {
    left: auto !important;
    right: 0 !important;
  }

  #header #_desktop_top_menu #top-menu > li > .sub-menu ul[data-depth="1"],
  #header #_desktop_top_menu #top-menu > li > .sub-menu ul[data-depth="2"] {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
  }

  #header #_desktop_top_menu #top-menu > li > .sub-menu ul[data-depth="1"] > li,
  #header #_desktop_top_menu #top-menu > li > .sub-menu ul[data-depth="2"] > li {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    white-space: normal;
  }

  #header #_desktop_top_menu #top-menu > li > .sub-menu ul[data-depth="1"] > li > a,
  #header #_desktop_top_menu #top-menu > li > .sub-menu ul[data-depth="2"] > li > a {
    display: block !important;
    width: 100%;
    margin: 0 !important;
    padding: 10px 18px !important;
    border: 0 !important;
    color: #303c34;
    font-family: "Poppins", "Inter", Arial, sans-serif;
    font-size: 13px !important;
    line-height: 1.45;
    font-weight: 500;
    text-align: left;
    text-transform: none;
    white-space: normal !important;
    background: #fff;
    transition: background-color .18s, color .18s;
  }

  #header #_desktop_top_menu #top-menu > li > .sub-menu ul[data-depth="1"] > li > a::before,
  #header #_desktop_top_menu #top-menu > li > .sub-menu ul[data-depth="2"] > li > a::before {
    display: none !important;
  }

  #header #_desktop_top_menu #top-menu > li > .sub-menu li > a:hover,
  #header #_desktop_top_menu #top-menu > li > .sub-menu li > a:focus-visible {
    background: #eef5ec;
    color: #2d672e;
  }

  #header #_desktop_top_menu #top-menu > li > .sub-menu ul[data-depth="2"] > li > a {
    padding-left: 32px !important;
    font-size: 12px !important;
    color: #566b5b;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  #header .nav-full-width > .container { width: calc(100% - 16px); }
  #header #_desktop_top_menu > #top-menu { gap: 0; }
  #header #_desktop_top_menu #top-menu > li > a.dropdown-item {
    padding-left: 4px;
    padding-right: 4px;
    font-size: clamp(11.5px, 1.12vw, 13px) !important;
    letter-spacing: -.035em;
  }
}
