
/*
 * Webpratique - Navigation structurelle
 * Bootscore Child
 */

/* Grille commune */

.wp-site-shell {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.wp-site-main {
  min-width: 0;
}

.wp-fa-rail {
  min-width: 0;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  border-radius: 0;
  box-shadow: none;
  z-index: 1;
}

.wp-fa-rail-list {
  list-style: none;
  margin: 0;
  padding: 12px 6px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

/* Empêcher Font Awesome de dessiner
   une seconde icône sur les LI */

.wp-fa-rail-list > li::before {
  content: none !important;
  display: none !important;
}

.wp-fa-rail-list > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wp-fa-rail-list > li > a {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 46px;
  min-height: 46px;

  color: #242424;
  font-size: 20px;
  text-decoration: none;

  border-radius: 9px;
  transition: background-color .15s ease;
}

.wp-fa-rail-list > li > a:hover,
.wp-fa-rail-list > li.current-menu-item > a,
.wp-fa-rail-list > li.current-menu-ancestor > a {
  color: #111;
  background: #f0f0f0;
}

.wp-fa-rail-list > li > a:focus-visible {
  outline: 2px solid #555;
  outline-offset: -2px;
}

/* Ordinateur */

@media (min-width: 992px) {

  .wp-site-shell {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .wp-fa-rail {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
  }

  .wp-fa-rail-list {
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
  }

  body.admin-bar .wp-fa-rail-list {
    top: 32px;
    max-height: calc(100vh - 32px);
  }
}

/* Tablette et mobile */

@media (max-width: 991.98px) {

  .wp-site-shell {
    display: flex;
    flex-direction: column;
  }

  .wp-fa-rail {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #e8e8e8;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .wp-fa-rail-list {
    position: static;
    flex-direction: row;
    justify-content: flex-start;
    gap: 5px;

    width: max-content;
    min-width: 100%;
    padding: 7px 10px;
  }

  .wp-fa-rail-list > li {
    flex: 0 0 auto;
  }

  .wp-fa-rail-list > li > a {
    width: 44px;
    min-height: 44px;
    font-size: 19px;
  }

  .wp-site-main {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wp-fa-rail-list > li > a {
    transition: none;
  }
}
