body {
  margin: 0;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 12px;
  background-color: #f5f6fa;
}
a {
  text-decoration: none;
}
.container {
  display: flex;
  height: 100vh;
}
.container aside img {
  display: block;
  margin: 0 auto;
}
/* Base sidebar */
.sidebar {
  background-color: #1e2a38;
  color: #fff;
  width: 220px;
  padding: 20px;
  font-family: "Manrope", Arial, sans-serif;
  transition: transform 0.3s ease;
}

/* Masquer la sidebar sur petit écran */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    transform: translateX(-100%);
    z-index: 1000;
    overflow-y: auto;
  }
  .main-content {
      padding-left: 0;
      margin-top: 60px;
    }
  .sidebar.open {
    transform: translateX(0);
  }
}

/* Hamburger bouton */
#sidebar-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1100;
  background: #1e2a38;
  color: white;
  border: none;
  font-size: 24px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
}

/* Afficher le bouton hamburger uniquement sur petit écran */
@media (max-width: 768px) {
  #sidebar-toggle {
    display: block;
  }
}

/* Menu et sous-menus */

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

.sidebar li {
  margin: 0;
  position: relative;
}

.sidebar li a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  text-decoration: none;
  padding: 8px 15px;
  transition: background 0.3s;
  cursor: pointer;
  white-space: nowrap;
}

.sidebar li a:hover {
  background-color: #00BFFF;
}

.sidebar li.active > a {
  font-weight: bold;
  background-color: #00BFFF;
}
.sidebar li.active > ul.submenu {
  display: block !important;
}
.sidebar li i,
.sidebar li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Sous-menus cachés par défaut */
.sidebar ul.submenu {
  display: none;
  padding-left: 15px;
  margin: 0;
  border-left: 2px solid #00BFFF;
}

/* Sous-menus visibles quand la classe "open" est ajoutée */
.sidebar ul.submenu.open {
  display: block;
}
.sidebar ul.submenu li a {
  margin-left: 10px;
}
.sidebar ul.submenu .submenu {
  margin-left: 20px;
}




.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-menu {
  display: flex;
  gap: 10px;
  align-items: center;
}
.user-menu span {
  font-size: 14px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.card {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  color: #000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.card.blue { background-color: #3f83f8; color: #fff; }
.card.orange { background-color: #fbbf24; color: #000; }
.card.red { background-color: #ef4444; color: #fff; }

.graph {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.chart-placeholder {
  height: 180px;
  background-color: #e5e7eb;
  border-radius: 6px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
}

.recent-invoices table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.recent-invoices th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.status {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.85em;
  color: #fff;
}

.status.payée {
  background-color: #10b981;
}
.status.payé {
  background-color: #10b981;
}

.status.attente {
  background-color: #f97316;
}

.btn-ajouter {
  padding: 10px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 1rem;
}
form {
      background: white;
      padding: 1rem;
      border-radius: 8px;
      max-width: 700px;
      margin: auto;
      box-shadow: 0 0 10px rgba(0,0,0,0.1);
    }
    h2 {
      text-align: center;
      margin-bottom: 1rem;
    }
    label {
      display: block;
      margin-top: 1rem;
    }
    input, select {
      width: 30%;
      padding: 8px;
      margin-top: 5px;
      border: 1px solid #ccc;
      border-radius: 4px;
    }
    .articles-container {
      margin-top: 1rem;
    }
    .article {
      display: flex;
      gap: 10px;
      margin-bottom: 1rem;
    }
    .article input {
      flex: 1;
    }
    button {
      padding: 10px 16px;
      background-color: #007bff;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      margin-top: 1rem;
    }
    .btn-secondary {
      background-color: #6c757d;
    }
    .row {
     display: flex;
     gap: 1rem;
     margin-bottom: 1rem;
   }
   .row > div {
     flex: 1;
   }
   form .row input {

     width: 90%;

   }
   .status {
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.9em;
  font-weight: bold;
  display: inline-block;
  color: white;
}

.status.payee {
  background-color: #28a745; /* Vert */
}
.status.non-payé {
  background-color: red; /* Rouge */
}
.status.en-attente {
  background-color: #ffc107; /* Jaune */
}
.status.en-retard {
  background-color: red; /* Rouge */
}
.status.partiel {
  background-color: #fd7e14; /* Orange */
}
.status.partielle {
  background-color: #fd7e14; /* Orange */
}
.article button {
    padding: 8px 12px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.article button:hover {
    background-color: #d32f2f;
}
.footer {
  position: static;
  margin-top: 40px;
  bottom: 0;
  width: 100%;
  background-color: white;
  padding: 0;
  text-align: right;
  font-size: 12px;
  color: #555;
  border-top: 1px solid #ddd;
  z-index: 1000;
  border-radius: 10px;
  overflow: hidden;
}

.footer .version-text {
  display: inline-block;
}
.logo-inline {
  vertical-align: middle;
  height: 60px;
}
.pagination {
     text-align: center;
     margin-top: 20px;
   }
   .pagination a {
     padding: 6px 12px;
     border: 1px solid #ccc;
     background: #f5f5f5;
     color: #333;
     text-decoration: none;
     margin: 0 4px;
     border-radius: 4px;
   }
   .pagination a:hover,
   .pagination a.active {
     background: #00BFFF;
     color: #fff;
   }
   .pagination-js a {
  padding: 5px 10px;
  text-decoration: none;
  background-color: #f0f0f0;
  margin: 0 3px;
  border-radius: 4px;
  color: #333;
}

.pagination-js strong {
  padding: 5px 10px;
  background-color: #28a745;
  color: white;
  margin: 0 3px;
  border-radius: 4px;
}
table.items-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 10px;
}

table.items-table th, table.items-table td {
  border: 1px solid #ccc;
  padding: 8px;
}
table.items-table th {
 background-color: #e0f0ff;
}

table.items-table th:first-child {
  border-top-left-radius: 6px;
}

table.items-table th:last-child {
  border-top-right-radius: 6px;
}

table.items-table tr:last-child td:first-child {
  border-bottom-left-radius: 6px;
}

table.items-table tr:last-child td:last-child {
  border-bottom-right-radius: 6px;
}
