/* ----------------------------------------
   LAYOUT PRINCIPAL
---------------------------------------- */
.admin-wrapper {
  display: flex;
  min-height: 100%;
}

/* ----------------------------------------
   SIDEBAR (mobile en topbar → desktop en colonne)
---------------------------------------- */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 4rem;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  z-index: 1000;
  transition: width .3s ease;
}

.sidebar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1rem;
}

.brand {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: bold;
}

/* burger pour mobile */
.burger.mobile {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
}

/* menu (liste de liens) */
.menu.desktop {
  list-style: none;
  overflow: hidden;
  transition: max-height .3s ease;
  max-height: 0;
  width: 100%;
}
.menu.desktop.open {
  max-height: 500px;
}
.menu.desktop li + li {
  margin-top: .25rem;
}
.menu.desktop a {
  display: block;
  padding: .75rem 1rem;
  color: var(--text-light);
  text-decoration: none;
  border-radius: .375rem;
  font-size: .95rem;
  transition: background .2s;
}
.menu.desktop a:hover,
.menu.desktop a.active {
  background: var(--sidebar-hover);
  color: #fff;
}

/* badge de notif */
.badge {
  display: inline-block;
  margin-left: .5rem;
  min-width: 1.25rem;
  padding: .1rem .35rem;
  font-size: .75rem;
  font-weight: bold;
  background: var(--badge-red);
  color: #fff;
  border-radius: 9999px;
  text-align: center;
  vertical-align: middle;
}

/* ----------------------------------------
   LAYOUT DESKTOP (≥768px)
---------------------------------------- */
@media (min-width: 768px) {
  .sidebar {
    width: 16rem;
    height: 100vh;
  }
  .sidebar-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1rem;
  }
  .brand {
    margin-bottom: 2rem;
  }
  .burger.mobile {
    display: none;
  }
  .menu.desktop {
    display: block;
    max-height: none;
  }
}

/* ----------------------------------------
   CONTENU PRINCIPAL
---------------------------------------- */
.main-content {
  margin-top: 4rem;
  padding: 1.5rem;
  flex: 1;
  transition: margin-left .3s ease;
}

@media (min-width: 768px) {
  .main-content {
    margin-left: 16rem;
    margin-top: 0;
  }
}

/* ----------------------------------------
   HEADER DE PAGE + BOUTON
---------------------------------------- */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.page-header h1 {
  color: var(--primary);
  font-size: 2rem;
}
.btn {
  border: none;
  padding: .5rem 1rem;
  border-radius: .375rem;
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s;
}
.btn.report {
  background: var(--primary);
  color: #111827;
}
.btn.report:hover {
  background: var(--primary-hover);
}

/* ----------------------------------------
   CARDS & GRIDS
---------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: .5rem;
  padding: 1.5rem;
  text-align: center;
}
.card h5 {
  color: var(--text-mid);
  margin-bottom: .5rem;
}
.stat-number {
  color: var(--primary);
  font-size: 2rem;
  font-weight: bold;
}

/* ----------------------------------------
   SECTIONS & LISTES
---------------------------------------- */
.section {
  margin-bottom: 2.5rem;
}
.section h2 {
  color: var(--primary);
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.box {
  background: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: .5rem;
  overflow: hidden;
}

.list {
  list-style: none;
}
.list-item {
  display: flex;
  justify-content: space-between;
  padding: .75rem 1rem;
  color: var(--text-light);
}
.divide .list-item:not(:last-child) {
  border-bottom: 1px solid var(--sidebar-border);
}
.list-item.member {
  align-items: center;
}
.list-item.member img {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  margin-right: .75rem;
}
.timestamp {
  margin-left: auto;
  color: var(--text-mid);
  font-size: .85rem;
}

/* ----------------------------------------
   TABLEAUX
---------------------------------------- */
.overflow-x {
  overflow-x: auto;
}
.user-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}
.user-table th,
.user-table td {
  padding: .75rem 1rem;
  text-align: left;
  color: var(--text-light);
}
.user-table thead {
  background: var(--sidebar-border);
}
.user-table tr:hover {
  background: var(--sidebar-hover);
}
.user-table td img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
}

/* ----------------------------------------
   BOUTONS D’ACTION
---------------------------------------- */
.actions {
  display: flex;
  gap: .5rem;
}
.btn.suspend {
  background: #2563EB;
  color: #fff;
}
.btn.suspend:hover {
  background: #3B82F6;
}
.btn.activate {
  background: #16A34A;
  color: #fff;
}
.btn.activate:hover {
  background: #22C55E;
}
