  body {
      font-family: 'Cairo', sans-serif;
      background: #f9fafb;
      padding: 20px;
    }

    .footer-totaux {
      background: #ffffff;
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      padding: 20px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
      max-width: 500px;
      margin: auto;
      display: flex;
      flex-direction: column;
      gap: 15px;
    }

    /* Total section */
    .total-row {
      text-align: center;
      font-size: 1.2rem;
      font-weight: 700;
      color: #2563eb;
      padding-bottom: 10px;
      border-bottom: 1px solid #e5e7eb;
    }

    /* RÃ¨glement row */
    .reglement-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .reglement-row label {
      font-weight: 600;
      color: #374151;
    }

    .reglement-row input {
      width: 120px;
      padding: 8px;
      border: 1px solid #d1d5db;
      border-radius: 6px;
      text-align: right;
      font-size: 0.95rem;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    .reglement-row input:focus {
      border-color: #2563eb;
      box-shadow: 0 0 0 2px rgba(37,99,235,0.2);
    }

    .checkbox-row {
      display: flex;
      align-items: center;
      gap: 8px;
      font-weight: 500;
      color: #374151;
    }

    .checkbox-row input {
      transform: scale(1.1);
      margin: 0;
      accent-color: #2563eb;
    }

    /* Ã‰tat row */
    .etat-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-weight: 600;
    }

    .etat-row span {
      padding: 4px 10px;
      border-radius: 8px;
      font-size: 0.9rem;
    }

    .etat-ouvert {
      background: #fee2e2;
      color: #b91c1c;
    }

    .etat-ferme {
      background: #dcfce7;
      color: #166534;
    }

    /* ðŸ“± Responsive */
    @media (max-width: 600px) {
      .footer-totaux {
        padding: 15px;
        gap: 12px;
      }

      .reglement-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
      }

      .reglement-row input {
        width: 100%;
      }

      .etat-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
      }
    }

    #receipt58, 
    #receipt80 {
      display: none;
      position: absolute;
      background: #fff;
    }

    /* Modal */
    .modal {
      position: fixed;
      z-index: 9999;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.5);
      justify-content: center;
      align-items: center;
      display: none;
    }

    .modal-content {
      background: #fff;
      padding: 20px;
      border-radius: 12px;
      max-width: 400px;
      width: 95%;
      box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    }

    .close {
      float: right;
      font-size: 1.5rem;
      cursor: pointer;
    }

    #qr-reader {
      width: 100%;
      max-width: 350px;
      margin: auto;
      border: 2px solid #2563eb;
      border-radius: 8px;
    }

    .search-box {
      width: 100%;
      max-width: 280px;
      margin: 8px auto 15px;
      position: relative;
    }

    .search-box input {
      width: 70%;
      padding: 8px 12px 8px 32px;
      border: 1px solid #ccc;
      border-radius: 20px;
      font-size: 14px;
      transition: all 0.3s;
      box-shadow: 0 1px 4px rgba(0,0,0,0.08);
      height: 34px;
    }

    .search-box input:focus {
      border-color: #256a3a;
      box-shadow: 0 2px 8px rgba(37,106,58,0.2);
      outline: none;
    }

    .search-box::before {
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 14px;
      color: #888;
    }

    /* Responsive */
    @media (max-width: 600px) {
      .search-box {
        max-width: 100%;
        padding: 0 8px;
      }
      .search-box input {
        font-size: 13px;
        padding: 7px 10px 7px 30px;
        height: 32px;
      }
    }

    .spinner {
      border: 4px solid #f3f3f3;
      border-top: 4px solid #3498db;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      animation: spin 1s linear infinite;
      margin: auto;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    #bt-progress {
      text-align: center;
      padding: 10px;
      display: none;
    }

    @media (min-width: 768px) {
      #bonModal .modal-content {
        max-width: 700px;
      }
      #clientModal .modal-content,
      #produitModal .modal-content {
        max-width: 600px;
      }
    }

    @media (min-width: 1200px) {
      #bonModal .modal-content {
        max-width: 900px;
      }
      #clientModal .modal-content,
      #produitModal .modal-content {
        max-width: 800px;
      }
    }

    .table-lignes td input.qte-input { width: 50px; text-align: center; }
    .table-lignes td input.unite-input { width: 50px; text-align: center; }
    .table-lignes td input.prix-input { width: 120px; text-align: center; }

    @media (min-width: 1200px) {
      .table-lignes td input.qte-input { width: 50px; }
      .table-lignes td input.unite-input { width: 50px; }
      .table-lignes td input.prix-input { width: 150px; }
    }

    @media (min-width: 768px) and (max-width: 1199px) {
      .table-lignes td input.qte-input { width: 50px; }
      .table-lignes td input.unite-input { width: 50px; }
      .table-lignes td input.prix-input { width: 100px; }
    }

    @media (max-width: 767px) {
      .table-lignes td input.qte-input { width: 20px; font-size: 14px; }
      .table-lignes td input.unite-input { width: 20px; font-size: 12px; }
      .table-lignes td input.prix-input { width: 45px; font-size: 12px; }
    }

    /* DataTable Styling */
    #bonsTable {
      margin-top: 20px;
      background: #ffffff;
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    #bonsTable th, #bonsTable td {
      padding: 12px;
      text-align: center;
      font-size: 0.95rem;
    }

    #bonsTable .etat {
      padding: 4px 10px;
      border-radius: 8px;
      font-size: 0.9rem;
      display: inline-block;
    }

    #bonsTable .etat-ouvert {
      background: #fee2e2;
      color: #b91c1c;
    }

    #bonsTable .etat-ferme {
      background: #dcfce7;
      color: #166534;
    }

    #bonsTable .action-btn {
      padding: 6px 12px;
      border: none;
      border-radius: 6px;
      cursor: pointer;
      font-size: 0.9rem;
      margin: 0 4px;
    }

    #bonsTable .edit-btn {
      background: #3b82f6;
      color: white;
    }

    #bonsTable .delete-btn {
      background: #ef4444;
      color: white;
    }

    #bonsTable .print-btn {
      background: #10b981;
      color: white;
    }

    @media (max-width: 600px) {
      #bonsTable th, #bonsTable td {
        font-size: 0.85rem;
        padding: 8px;
      }
    }
    /* âœ… Layout des cartes */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* plusieurs colonnes */
  gap: 15px; /* espace Ø¨ÙŠÙ† Ø§Ù„ÙƒØ§Ø±Ø¯Ø² */
  margin-top: 15px;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-facture {
  background: #bbf7d0; /* Vert pâle */
  color: #166534;
}

.badge-nonfacture {
  background: #fef9c3; /* Jaune clair */
  color: #92400e;
}

/* État visual */
.etat-ferme {
  background-color: #dcfce7 !important;
}

.etat-ouvert {
  background-color: #fee2e2 !important;
}

/* Totaux */
#bonsTable tfoot td {
  font-weight: 700;
  background: #f9fafb;
  color: #1e3a8a;
  border-top: 2px solid #2563eb;
}

/* Ø´ÙƒÙ„ Ø§Ù„Ø¨Ø·Ø§Ù‚Ø© */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
/* ✨ Pagination Style 2025 */
.dataTables_paginate {
  margin-top: 12px;
  text-align: center !important;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.dataTables_paginate .paginate_button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff !important;
  border: none;
  border-radius: 10px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37,99,235,0.3);
  transition: all 0.25s ease-in-out;
}

.dataTables_paginate .paginate_button:hover {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(37,99,235,0.4);
}

.dataTables_paginate .paginate_button.current {
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  color: white !important;
  box-shadow: 0 3px 10px rgba(22,163,74,0.4);
}

.dataTables_paginate .paginate_button.disabled {
  background: #e5e7eb !important;
  color: #9ca3af !important;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* 🔹 Responsive */
@media (max-width: 600px) {
  .dataTables_paginate .paginate_button {
    padding: 5px 10px;
    font-size: 0.8rem;
  }
}

