@media screen and (min-width: 768px) {
  /******************************! Container principal ******************************/
  .menu-panels-container {
    position: fixed;
    top: 0;
    left: 240px;
    height: 100vh;
    display: flex;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    perspective: 1000px;
    transform-style: preserve-3d;
  }

  .menu-panels-container.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }

  /* Ajustement pour la barre d'admin WordPress */
  body.admin-bar .menu-panels-container {
    height: calc(100vh - 32px) !important;
    bottom: 0 !important;
    top: 32px !important;
  }

  /******************************! Panels ******************************/
  .menu-panel {
    position: absolute;
    width: 176px;
    height: 100%;
    background: var(--background-secondary);
    border-left: 1px solid var(--color-border);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.25s ease;
    visibility: hidden;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    transform-origin: left center;
    backface-visibility: hidden;
    will-change: transform, opacity;
  }

  .menu-panel.active {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
  }

  /******************************! Niveaux des panels ******************************/
  .menu-panel[data-level="0"] {
    left: 0;
    z-index: 10;
  }
  .menu-panel[data-level="1"] {
    left: 176px;
    z-index: 9;
  }
  .menu-panel[data-level="2"] {
    left: 352px;
    z-index: 8;
  }
  .menu-panel[data-level="3"] {
    left: 528px;
    z-index: 7;
  }

  /******************************! Liste des menus ******************************/
  .menu-panel-list {
    list-style: none;
    padding: 0;
    margin: 0;
    height: 100%;
    overflow-y: auto;
  }

  .menu-panel-list li {
    border-bottom: 1px solid var(--color-border);
  }

  /******************************! Liens ******************************/
  .menu-panel-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    color: white;
    text-decoration: none;
    transition: background-color 0.2s ease;
    position: relative;
  }

  .menu-panel-list a span {
    padding-right: 10px;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .menu-panel-list a:hover {
    background-color: var(--background-tertiary);
    color: var(--color-primary) !important;
    font-weight: 900 !important;
  }

  /******************************! Indicateurs et états ******************************/
  .menu-panel-list .has-children > a::after {
    content: "›";
    font-size: 24px;
  }

  .menu-panel-list li.active-path > a {
    background-color: var(--background-tertiary) !important;
    color: var(--color-primary) !important;
    font-weight: 900 !important;
  }

  .menu-panel-list li.active-path > a span {
    color: var(--color-primary) !important;
    font-weight: 900 !important;
  }

  /******************************! Masquage du menu WordPress original ******************************/
  .menu-cat-product .sub-menu {
    display: none !important;
  }

  /******************************! Scrollbar ******************************/
  .menu-panel-list::-webkit-scrollbar {
    width: 4px !important;
  }

  .menu-panel-list::-webkit-scrollbar-track {
    background: transparent !important;
    margin: 4px 0 !important;
  }

  .menu-panel-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 2px !important;
    transition: all 0.2s ease !important;
  }

  .menu-panel-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3) !important;
  }

  .menu-panel-list {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent !important;
  }
}

@media screen and (min-width: 992px) {
  .menu-panel {
    width: 209px;
  }

  .menu-panel[data-level="0"] {
    left: 0;
    z-index: 10;
  }
  .menu-panel[data-level="1"] {
    left: 209px;
    z-index: 9;
  }
  .menu-panel[data-level="2"] {
    left: 418px;
    z-index: 8;
  }
  .menu-panel[data-level="3"] {
    left: 627px;
    z-index: 7;
  }
}

@media screen and (min-width: 1200px) {
  .menu-panel {
    width: 242px;
  }

  .menu-panel[data-level="0"] {
    left: 0;
    z-index: 10;
  }
  .menu-panel[data-level="1"] {
    left: 242px;
    z-index: 9;
  }
  .menu-panel[data-level="2"] {
    left: 484px;
    z-index: 8;
  }
  .menu-panel[data-level="3"] {
    left: 726px;
    z-index: 7;
  }
}

@media screen and (min-width: 1400px) {
  .menu-panel {
    width: 275px;
  }

  .menu-panel[data-level="0"] {
    left: 0;
    z-index: 10;
  }
  .menu-panel[data-level="1"] {
    left: 275px;
    z-index: 9;
  }
  .menu-panel[data-level="2"] {
    left: 550px;
    z-index: 8;
  }
  .menu-panel[data-level="3"] {
    left: 825px;
    z-index: 7;
  }
}
