/**
 * Correctifs barre dashboard mobile (iOS) — chargé sans recompilation Gulp.
 */
.dash-sidebar [data-saas-dropdown],
.dash-sidebar__item--profile {
  position: relative;
}

@media (max-width: 768px) {
  .dash-sidebar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    justify-content: initial;
    overflow: visible;
    z-index: 1100;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding: 0 10px env(safe-area-inset-bottom, 0px);
  }

  .dash-sidebar__top {
    display: contents;
  }

  .dash-sidebar__logo {
    width: auto;
    flex-shrink: 0;
    margin-bottom: 0;
    padding: 0;
    margin-right: 0;
  }

  .dash-sidebar__logo img {
    width: 36px;
    display: block;
  }

  .dash-sidebar__nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    width: auto;
    min-width: 0;
    max-width: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
  }

  .dash-sidebar__nav::-webkit-scrollbar {
    display: none;
  }

  .dash-sidebar__item {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  .dash-sidebar__bottom {
    margin-top: 0;
    width: auto;
    overflow: visible;
    justify-self: end;
  }

  .dash-sidebar__profile-trigger {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .dash-sidebar__profile-avatar-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .dash-sidebar__profile-dropdown {
    left: auto;
    right: 0;
    top: auto;
    bottom: calc(100% + 8px);
    z-index: 1200;
  }

  body:has(.dash-sidebar) #page {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  /* Pastille plan au-dessus de l’icône (barre en bas). */
  .dash-sidebar__plan-badge.cv2-plan-badge {
    top: auto;
    bottom: calc(100% + 2px);
  }

  .dash-sidebar__profile-plan {
    bottom: auto;
    top: calc(100% + 2px);
    font-size: 0.45rem;
    padding: 0.08rem 0.28rem;
    max-width: 52px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
