/* ====== Base ====== */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

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

.dashboard-header,
.dashboard-footer {
  background-color: #f0f0f0;
  padding: 10px 20px;
  border-bottom: 1px solid #ccc;
}

/* ====== Sidebar ====== */
.sidebar {
  width: 200px;
  background-color: #eaeaea;
  padding: 20px;
  flex-shrink: 0;
  border-right: 1px solid #ccc; /* séparation visuelle */
}

.sidebar ul {
  list-style: none;
  padding-left: 0;
}

.sidebar li {
  margin-bottom: 10px;
}

.sidebar a {
  text-decoration: none;
  color: #333;
}

.sidebar a.active {
  font-weight: bold;
  color: #0066cc;
}

/* ====== Content ====== */
.dashboard-content {
  flex: 1;
  padding: 20px;
  background-color: #fff;
}

/* ====== Modules ====== */
.module-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.module {
  padding: 15px;
  background-color: #dff0d8;
  border: 1px solid #ccc;
  text-decoration: none;
  color: #333;
  border-radius: 5px;
  width: 200px;
  text-align: center;
}

/* ====== User Info ====== */
.user-info {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 20px;
  font-size: 0.9em;
}

.user-info h3 {
  margin-top: 0;
  font-size: 1em;
  color: #333;
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.user-info p {
  margin: 4px 0;
  color: #555;
}

/* ====== Tabs (Recherche simple/avancée) ====== */
.tab-container {
  margin-top: 20px;
}

.tab-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.tab-buttons button {
  padding: 8px 12px;
  border: 1px solid #ccc;
  background: #f0f0f0;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-buttons button.active {
  background: #0066cc;
  color: white;
}

.tab-content {
  border: 1px solid #ccc;
  padding: 15px;
  border-radius: 4px;
  background: #fafafa;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ====== Footer ====== */
.dashboard-footer {
  font-size: 0.9em;
  color: #666;
  text-align: right;
  margin-top: 20px;
  border-top: 1px solid #ddd;
  padding-top: 10px;
  background-color: #f9f9f9;
}

.dashboard-footer p {
  margin: 0;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {
  .layout {
    flex-direction: column; /* Sidebar passe au-dessus */
  }

  .sidebar {
    width: 100%;
    height: auto;
    border-bottom: 1px solid #ccc;
    border-right: none;
  }

  .dashboard-content {
    margin: 0;
  }

  .module-grid {
    flex-direction: column; /* Modules en colonne */
    align-items: stretch;
  }

  .module {
    width: 100%; /* Chaque module prend toute la largeur */
  }
}


/* Numerotation des colonne de tableau */

table.num {
    counter-reset: rowNumber;
}

table.num tbody tr {
    counter-increment: rowNumber;
}

table.num tbody tr td:first-child::before {
    content: counter(rowNumber);
}


/* Style du menu déroulant */
.sidebar .dropdown {
  position: relative;
}

.sidebar .dropdown-content {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background-color: #f9f9f9;
  min-width: 180px;
  border: 1px solid #ccc;
  border-radius: 4px;
  z-index: 1000;
}

.sidebar .dropdown-content li {
  margin: 0;
}

.sidebar .dropdown-content li a {
  display: block;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
}

.sidebar .dropdown-content li a:hover {
  background-color: #eee;
}

/* Affichage au survol */
.sidebar .dropdown:hover .dropdown-content {
  display: block;
}