/* ==========================================================
   B'Expert SAV — Menu lateral (sidebar) remplace le header horizontal
   Le layout flex s'applique a .app-shell (conteneur dedie),
   jamais directement a body, pour ne pas casser l'ecran de
   connexion admin qui est un frere de #adminContent.
   ========================================================== */

body {
  margin: 0;
  min-height: 100vh;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.login-screen {
  width: 100%;
}

.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--header-bg);
  border-right: 4px solid var(--boulanger-orange);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 20;
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #2a2a2c;
}

.sidebar-brand .icon {
  font-size: 26px;
}

.sidebar-brand h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.sidebar-brand .accent-word {
  color: var(--boulanger-orange);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  color: #c7c7cc;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  min-height: 48px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: .15s;
}

.sidebar-link .link-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: #2a2a2c;
  color: #fff;
}

.sidebar-link.active {
  background: var(--boulanger-orange);
  color: #fff;
}

.sidebar-footer {
  padding: 16px 12px 20px;
  border-top: 1px solid #2a2a2c;
}

.sidebar-action-btn {
  width: 100%;
  background: var(--boulanger-orange);
  color: #fff;
  border: none;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  transition: .15s;
}

.sidebar-action-btn:hover {
  background: var(--boulanger-orange-dark);
}

.sidebar-action-btn.secondary {
  background: transparent;
  border: 1px solid #3a3a3c;
  color: #c7c7cc;
  margin-top: 8px;
}

.sidebar-action-btn.secondary:hover {
  border-color: var(--boulanger-orange);
  color: #fff;
}

.page-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Bouton menu mobile */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 30;
  background: var(--header-bg);
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 880px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100vh;
    transition: left .2s ease;
    box-shadow: 8px 0 24px rgba(0,0,0,.2);
  }

  .sidebar.open {
    left: 0;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-overlay.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 15;
  }

  .page-content {
    padding-top: 64px;
  }
}
