/**
 * LM Boheme — espace coiffeuse : tablette (peripherique principal) et telephone.
 * Charge apres staff-portal.css.
 */

/* —— Touch, lisibilite, encoches —— */
html.lmbr-staff-portal-html {
  -webkit-text-size-adjust: 100%;
}

body.lmbr-staff-portal-page.lmbr-staff-standalone {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.lmbr-staff button,
.lmbr-staff-nav__btn,
.lmbr-staff-btn,
.lmbr-staff-daynav__btn,
.lmbr-staff-seg__btn,
.lmbr-staff-slot-pill,
.lmbr-staff-client-card,
.lmbr-staff-agenda__slot,
.lmbr-staff-week__booking,
.lmbr-staff-clients-detail__back {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Desktop : libelles complets, pas d’icone nav */
.lmbr-staff-nav__ico,
.lmbr-staff-nav__label--short,
.lmbr-staff-btn--logout__ico {
  display: none;
}

.lmbr-staff-nav__label--full {
  display: inline;
}

/* —— Tablette 768–1199 px —— */
@media (min-width: 768px) and (max-width: 1199px) {
  .lmbr-staff-sidebar {
    max-width: 5.5rem;
    padding: 1.1rem 0.45rem;
    align-items: stretch;
  }

  .lmbr-staff-sidebar__brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    margin-bottom: 1.15rem;
  }

  .lmbr-staff-sidebar__title,
  .lmbr-staff-sidebar__tag,
  .lmbr-staff-sidebar__ver {
    display: none;
  }

  .lmbr-staff-sidebar__mark {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1rem;
  }

  .lmbr-staff-nav {
    gap: 0.35rem;
    overflow: hidden;
  }

  .lmbr-staff-nav__ico {
    display: flex;
    font-size: inherit;
    line-height: 0;
  }

  .lmbr-staff-nav__ico svg {
    width: 1.4rem;
    height: 1.4rem;
  }

  .lmbr-staff-nav__label--full {
    display: none;
  }

  .lmbr-staff-nav__label--short {
    display: block;
    font-size: 0.58rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.15;
    margin-top: 0.2rem;
    letter-spacing: 0.01em;
  }

  .lmbr-staff-nav__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 0.2rem;
    min-height: 3.35rem;
    text-align: center;
    border-radius: 0.85rem;
    transform: none !important;
  }

  .lmbr-staff-nav__btn.is-active {
    transform: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  }

  .lmbr-staff-sidebar__foot {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top-color: rgba(255, 255, 255, 0.12);
  }

  .lmbr-staff-sidebar__collapse {
    display: none;
  }

  .lmbr-staff-btn--logout {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 0.35rem;
    min-height: 2.75rem;
  }

  .lmbr-staff-btn--logout__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
  }

  .lmbr-staff-btn--logout__ico svg {
    width: 1.2rem;
    height: 1.2rem;
  }

  .lmbr-staff-btn--logout__label {
    display: none;
  }

  .lmbr-staff-main {
    padding: 1.15rem 1.35rem;
  }

  .lmbr-staff-main:has([data-lmbr-panel="agenda"]:not([hidden])) {
    padding: 1rem 1.35rem 1.15rem;
  }

  .lmbr-staff-daynav__btn {
    min-width: 2.75rem;
    min-height: 2.75rem;
    font-size: 1.05rem;
  }

  .lmbr-staff-seg--compact .lmbr-staff-seg__btn {
    min-height: 2.5rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.88rem;
  }

  .lmbr-staff-datebar--compact .lmbr-staff-input--date {
    min-height: 2.5rem;
    font-size: 1rem;
  }

  .lmbr-staff-btn--agenda-new,
  .lmbr-staff-btn--agenda-block {
    min-height: 2.65rem;
    padding: 0.55rem 1rem;
  }

  .lmbr-staff-input,
  .lmbr-staff-select,
  .lmbr-staff-textarea {
    min-height: 2.75rem;
    font-size: 1rem;
  }

  .lmbr-staff-modal__dialog {
    max-width: min(32rem, calc(100vw - 2rem));
    margin: 1rem auto;
  }

  .lmbr-staff-modal__actions .lmbr-staff-btn {
    min-height: 2.75rem;
  }

  /* Clients : liste + fiche cote a cote sur tablette */
  .lmbr-staff-clients-layout {
    grid-template-columns: minmax(220px, 36%) 1fr;
    min-height: min(70vh, calc(100dvh - 8rem));
  }

  .lmbr-staff-clients-list-wrap {
    max-height: none;
  }

  .lmbr-staff-clients-detail__back {
    display: none !important;
  }

  .lmbr-staff-client-card {
    padding: 0.85rem 1rem;
    min-height: 3.25rem;
  }

  .lmbr-staff-clients-detail__actions .lmbr-staff-btn {
    min-height: 2.65rem;
  }

}

/* Carnet : synthese a droite en paysage tablette */
@media (min-width: 768px) and (max-width: 1199px) and (orientation: landscape) {
  .lmbr-staff-grid.lmbr-staff-grid--agenda:not(.lmbr-staff-grid--agenda-no-side) {
    grid-template-columns: 1fr minmax(200px, 255px) !important;
    grid-template-rows: 1fr !important;
    min-height: 0;
  }

  .lmbr-staff-grid--agenda > [data-lmbr-staff-booking-list] {
    min-height: 0 !important;
  }

  .lmbr-staff-grid--agenda > [data-lmbr-staff-side] {
    max-height: none;
  }
}

/* Tablette paysage large (ex. iPad Pro) : un peu plus d’air */
@media (min-width: 1024px) and (max-width: 1199px) {
  .lmbr-staff-main {
    padding: 1.35rem 1.75rem;
  }

  .lmbr-staff-sidebar {
    max-width: 6rem;
  }
}

/* —— Telephone ≤ 767 px : barre de navigation basse —— */
@media (max-width: 767px) {
  .lmbr-staff-app.lmbr-staff-app--open {
    flex-direction: column;
    position: relative;
  }

  .lmbr-staff-sidebar {
    order: 2;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    max-width: none;
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: 0.35rem 0.4rem calc(0.35rem + env(safe-area-inset-bottom));
    border-top: 1px solid #44403c;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
  }

  .lmbr-staff-sidebar__brand,
  .lmbr-staff-sidebar__foot .lmbr-staff-sidebar__ver {
    display: none;
  }

  .lmbr-staff-nav {
    flex: 1;
    flex-direction: row;
    gap: 0.2rem;
    overflow: visible;
  }

  .lmbr-staff-nav__ico {
    display: flex;
    font-size: inherit;
    line-height: 0;
  }

  .lmbr-staff-nav__ico svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .lmbr-staff-nav__label--full {
    display: none;
  }

  .lmbr-staff-nav__label--short {
    display: block;
    font-size: 0.55rem;
    margin-top: 0.12rem;
    text-align: center;
    line-height: 1.1;
  }

  .lmbr-staff-nav__btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.15rem;
    min-height: 3.1rem;
    border-radius: 0.65rem;
    transform: none !important;
  }

  .lmbr-staff-sidebar__foot {
    margin: 0;
    padding: 0 0 0 0.25rem;
    border: none;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .lmbr-staff-sidebar__collapse {
    display: none;
  }

  .lmbr-staff-btn--logout {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.4rem;
    border-radius: 0.65rem;
  }

  .lmbr-staff-btn--logout__ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
  }

  .lmbr-staff-btn--logout__ico svg {
    width: 1.2rem;
    height: 1.2rem;
  }

  .lmbr-staff-btn--logout__label {
    display: none;
  }

  .lmbr-staff-main {
    order: 1;
    flex: 1;
    min-height: 0;
    padding: 0.85rem 0.85rem calc(4.75rem + env(safe-area-inset-bottom));
  }

  .lmbr-staff-main:has([data-lmbr-panel="agenda"]:not([hidden])) {
    padding-top: 0.75rem;
  }

  .lmbr-staff-login {
    padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
  }

  .lmbr-staff-session-boot {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }
}
