

/* ------------------------ */
/* Barre de navigation */
/* ------------------------ */
.sidebarAdmin {
  background: #111827;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.sidebarAdmin .nav {
  display: flex;
  gap: 25px;
  list-style: none;
}

.sidebarAdmin .nav-link {
  color: #d1d5db;
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.sidebarAdmin .nav-link.active,
.sidebarAdmin .nav-link:hover {
  color: #fff;
}

.sidebarAdmin .nav-link .badge {
  background: #dc3545;
  color: #fff;
  border-radius: 12px;
  padding: 2px 6px;
  font-size: 0.75rem;
  position: absolute;
  top: -5px;
  right: -10px;
}

/* Déconnexion bouton */
.logout-btn {
  border: 1px solid #fff;
  padding: 5px 12px;
  border-radius: 4px;
  color: #fff;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s;
}

.logout-btn:hover {
  background: #fff;
  color: #111827;
}

/* ------------------------ */
/* Zone principale */
/* ------------------------ */
.page-content {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.dashboard-title {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

/* ------------------------ */
/* Résumés en grille */
/* ------------------------ */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.summary-card-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.summary-card-title {
  font-size: 1rem;
  margin-bottom: 5px;
  color: #555;
}

.summary-card-value {
  font-size: 1.5rem;
  font-weight: bold;
}

/* ------------------------ */
/* Blocs de gestion */
/* ------------------------ */
.admin-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

/* Tables utilisateurs */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid #eee;
  padding: 12px 8px;
  text-align: left;
}

.avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
}

/* Boutons d'action */
.btn-success,
.btn-warning,
.btn-danger {
  border: none;
  border-radius: 5px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-right: 5px;
}

.btn-success {
  background: #22c55e;
  color: #fff;
}

.btn-warning {
  background: #f59e0b;
  color: #fff;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

/* Bouton Voir détails */
.btn-details {
  border: 1px solid #ddd;
  background: #fff;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-details:hover {
  background: #f1f1f1;
}

/* ======= GRAND ÉCRAN (1201px et plus) ======= */
@media screen and (min-width: 1201px) {
  .sidebarAdmin {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background-color: #121212;
    color: #fff;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .page-content {
    margin-left: 300px;
    padding: 40px;
    max-width: calc(100% - 300px);
  }

  .summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
  }
}

/* ======= ORDINATEUR PORTABLE & TABLETTE LARGE (1025px à 1200px) ======= */
@media screen and (min-width: 1025px) and (max-width: 1200px) {
  .sidebarAdmin {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 220px;
    background-color: #121212;
    color: #fff;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .page-content {
    margin-left: 240px;
    padding: 30px;
    max-width: calc(100% - 240px);
  }

  .summary-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
  }
}

/* ======= TABLETTE STANDARD (768px à 1024px) ======= */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  .sidebarAdmin {
    position: relative;
    width: 100%;
    background-color: #121212;
    color: #fff;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .page-content {
    margin: 0 auto;
    padding: 20px;
    max-width: 100%;
  }

  .summary-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
  }
}

/* ======= MOBILE (≤767px) ======= */
@media screen and (max-width: 767px) {
  .sidebarAdmin {
    position: relative;
    width: 100%;
    background-color: #121212;
    color: #fff;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .page-content {
    margin: 0 auto;
    padding: 15px;
    max-width: 100%;
  }

  .summary-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }

  .admin-table th,
  .admin-table td {
    font-size: 14px;
    padding: 8px;
  }
}
