body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 20px;
  padding: 0;
  margin-top: 60px;
  background-color: #f5f5f5;
}

.content-section {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin: 20px auto;
  width: 100%;
  height: 800px;
}

h2 {
  color: #333;
  border-bottom: 2px solid #ff7f50;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}

.search-section {
  flex-grow: 1;
  position: relative;
}

.search-input {
  padding: 10px 15px;
  width: 50%;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: #ff7f50;
  box-shadow: 0 0 0 2px rgba(255, 127, 80, 0.1);
  outline: none;
}

.table-container {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: white;
}

thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: white;
}

th {
  background-color: gray;
  font-weight: 600;
  color: #f1f3f5;
  padding: 12px 8px;
  border-bottom: 2px solid #dee2e6;
  border-right: 1px solid #dee2e6;
  text-align: center;
}

th:last-child {
  border-right: none;
}

td {
  padding: 12px 8px;
  border-bottom: 1px solid #dee2e6;
  border-right: 1px solid #dee2e6;
  color: #666;
  transition: background-color 0.2s ease;
}

td:last-child {
  border-right: none;
}

tbody tr:hover {
  background-color: #f1f3f5;
}

.tbody-webkit-scrollbar-track {
  background: #f1f1f1;
}

.table-scroll {
  max-height: 600px;
  overflow-y: auto;
}

.table-scroll thead th {
  top: 0;
}

.table-scroll tfoot th {
  bottom: 0;
}

.table-scroll::-webkit-scrollbar {
  width: 10px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #ff7f50;
  border-radius: 5px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.no-data {
  text-align: center;
  padding: 20px;
  color: #6c757d;
}

/* Style de l'overlay (fond bloquant) */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 999;
}

.alert-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 400px;
  background-color: white;
  /* color: #f44336; */
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
  font-weight: bold;
}

.alert-box-header {
  background-color: #f54945;
  padding: 15px 20px;
  color: #f2f2f2;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  text-align: center;
}

.alert-box-header h3 {
  margin: 0;
  font-size: 18px;
}

.alert-box-content {
  padding: 20px;
  text-align: center;
  color: #555;
}

.alert-box-actions {
  display: flex;
  justify-content: center;
  padding: 10px 20px 20px;
}

.alert-box-actions button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  width: 50%;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  font-weight: bold;
}

.alert-box-actions button:hover {
  background-color: red;
}

.btn_client {
  padding: 10px;
  border: none;
  border-radius: 5px;
  background-color: #fa9b02;
  color: white;
  font-weight: 600px;
  font-size: 15px;
  cursor: pointer;
}

/* Styles pour les alertes personnalisées */
.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-out;
}

.custom-alert-box {
  width: 90%;
  max-width: 500px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: slideIn 0.3s ease-out;
}

.alert-title {
  padding: 15px 20px;
  font-size: 18px;
  font-weight: bold;
  color: white;
  display: flex;
  align-items: center;
}

.alert-title i {
  margin-right: 10px;
  font-size: 20px;
}

.alert-content {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.alert-actions {
  display: flex;
  justify-content: flex-end;
  padding: 15px 20px;
  background-color: #f5f5f5;
  border-top: 1px solid #e0e0e0;
}

.alert-button {
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 0.2s;
}

.alert-button i {
  margin-right: 5px;
}

.alert-button:not(:last-child) {
  margin-right: 10px;
}

/* Styles spécifiques pour l'alerte de doublons */
.duplicate-alert .alert-title {
  background-color: #ff9800;
}

.duplicate-warning {
  font-weight: bold;
  margin-bottom: 15px;
  color: #e65100;
}

.duplicate-list {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 20px;
}

.duplicate-list li {
  padding: 8px 10px;
  margin-bottom: 5px;
  background-color: #fff3e0;
  border-left: 4px solid #ff9800;
  display: flex;
  align-items: center;
}

.duplicate-list li i {
  margin-right: 10px;
  color: #ff9800;
}

.existing-clients-title {
  font-weight: bold;
  margin: 15px 0 10px 0;
  padding-bottom: 5px;
  border-bottom: 1px solid #e0e0e0;
}

.existing-clients-container {
  max-height: 200px;
  overflow-y: auto;
  background-color: #f9f9f9;
  border-radius: 4px;
  padding: 5px;
}

.existing-client {
  margin-bottom: 10px;
  padding: 10px;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.client-code {
  font-weight: bold;
  color: #0277bd;
  padding-bottom: 5px;
  margin-bottom: 5px;
  border-bottom: 1px dashed #e0e0e0;
}

.client-details {
  display: flex;
  flex-wrap: wrap;
}

.client-details div {
  margin-right: 15px;
  margin-bottom: 5px;
}

.client-details i {
  color: #757575;
  margin-right: 5px;
}

.cancel-button {
  background-color: #f5f5f5;
  color: #616161;
}

.cancel-button:hover {
  background-color: #e0e0e0;
}

.continue-button {
  background-color: #ff9800;
  color: white;
}

.continue-button:hover {
  background-color: #f57c00;
}

/* Styles pour l'alerte d'erreur */
.error-alert .alert-title {
  background-color: #f44336;
}

.error-alert .alert-content {
  color: #d32f2f;
}

.error-alert .ok-button {
  background-color: #f44336;
  color: white;
}

.error-alert .ok-button:hover {
  background-color: #d32f2f;
}

/* Styles pour l'alerte de succès */
.success-alert .alert-title {
  background-color: #4caf50;
}

.success-alert .alert-content {
  color: #2e7d32;
}

.success-alert .ok-button {
  background-color: #4caf50;
  color: white;
}

.success-alert .ok-button:hover {
  background-color: #388e3c;
}

.duplicate-item {
  margin-bottom: 15px;
  padding: 8px 10px;
  background-color: #fff3e0;
  border-left: 4px solid #ff9800;
}

.duplicate-details {
  margin-top: 5px;
  padding-left: 25px;
  list-style-type: disc;
}

.duplicate-details li {
  background: none;
  border: none;
  padding: 3px 0;
  margin-bottom: 2px;
}

.duplicate-details strong {
  color: #e65100;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal.show {
  display: block;
  opacity: 1;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

.close-btn {
  background-color: #757370;
  /* Rouge */
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 5px;
}

.close-btn:hover {
  background-color: #525151;
  /* Rouge foncé au survol */
}

.modal-title {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
  font-size: 1.5em;
}

.daily-counts-table {
  width: 100%;
  border-collapse: collapse;
}

.daily-counts-table th,
.daily-counts-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: left;
}

.daily-counts-table thead {
  background-color: #f2f2f2;
}

.daily-counts-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.daily-counts-table tr:hover {
  background-color: #f5f5f5;
}

@media (max-width: 600px) {
  .modal-content {
    margin: 5% auto;
    width: 95%;
    padding: 15px;
  }

  .daily-counts-table {
    font-size: 0.9em;
  }
}

/* Style pour la modale */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(3px);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 20px;
  border-radius: 5px;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
  color: #2c3e50;
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #475569;
}

.form-group {
  margin-bottom: 12px;
  margin-top: 20px;
}

.select-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px;
}

.select-group {
  flex: 1;
  min-width: 0;
}

.select-group label {
  display: block;
  margin-bottom: 5px;
  gap: 5px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 0.25rem;
}

.form-group p {
  display: block;
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 0.25rem;
}

.form-group select,
.form-group input[type="text"],
[type="password"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.7rem;
  background-color: #f8fafc;
}

.form-group select:focus,
.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.radio-group {
  display: flex;
  gap: 15px;
}

.radio-group label {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  cursor: pointer;
}

.radio-group input[type="radio"] {
  margin-right: 0.25rem;
  accent-color: #3b82f6;
}

.code-display-container input {
  text-align: center;
  font-family: monospace;
  font-size: 1rem;
  letter-spacing: 1px;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.5rem;
  width: 100%;
}

.button-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.btn {
  flex: 1;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-generer {
  background-color: #4caf50;
  color: white;
}

.btn-generer:hover {
  background-color: #4e6088;
}

.btn-cancel {
  background-color: #8f8989;
  color: white;
}

.btn-cancel:hover {
  background-color: #524e4e;
}

.btn-search {
  background-color: #2196f3;
  color: white;
}

.btn-search:hover {
  background-color: #0d5692;
}

/* Style pour les tableaux de clients (principal et résultats de recherche) */
.search-results-table,
.clients-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-family: inherit;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

/* En-têtes des tableaux */
.search-results-table thead th,
.clients-table th {
  background-color: #2c3e50;
  color: white;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
}

/* Lignes des tableaux */
.search-results-table tbody tr,
.clients-table tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s ease;
}

/* Effet au survol des lignes */
.search-results-table tbody tr:hover,
.clients-table tr:hover {
  background-color: #f1f5f9;
}

/* Style alterné pour les lignes (meilleure lisibilité) */
.search-results-table tbody tr:nth-child(even),
.clients-table tr:nth-child(even) {
  background-color: #f8fafc;
}

/* Cellules des tableaux */
.search-results-table td,
.clients-table td {
  padding: 8px 12px;
  vertical-align: middle;
  font-size: 0.75rem;
  color: #475569;
}

/* Style du bouton Sélectionner dans le tableau de résultats */
.btn-select {
  background-color: #3b82f6;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.7rem;
  font-weight: 500;
}

.btn-select:hover {
  background-color: #2563eb;
}

.search-results::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 6px;
}

.search-results::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 6px;
}

.search-results::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

/* Responsive design */
@media (max-width: 768px) {
  .modal-content {
    margin: 10% auto;
    padding: 1.5rem;
    width: 95%;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}
/* Styles responsifs pour les spans œil dans les modales */
.password-toggle {
  position: absolute;
  right: 8px;
  top: 68%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 16px;
  color: #666;
  z-index: 1;
  padding: 5px;
  user-select: none;
}

.select-group {
  position: relative;
}

.select-group input[type="password"] {
  padding-right: 45px;
}

.btn-generate-password {
  background: white;
  color: #425468;
  border: 2px solid orange;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  min-width: 50px;
  margin-top: 25px;
}

.btn-generate-password:hover {
  transform: translateY(-2px);
}

.btn-generate-password:before {
  content: "🔑";
  margin-right: 6px;
  font-size: 10px;
}

.btn-generate-password:focus {
  outline: none;
  box-shadow:orange;
}
/* Responsive pour écrans moyens */
@media (max-width: 768px) {
  .password-toggle {
    right: 6px;
    font-size: 14px;
    padding: 3px;
  }

  .select-group input[type="password"] {
    padding-right: 35px;
  }
}

/* Responsive pour petits écrans */
@media (max-width: 480px) {
  .password-toggle {
    right: 4px;
    font-size: 12px;
    padding: 2px;
  }

  .select-group input[type="password"] {
    padding-right: 30px;
    font-size: 14px;
  }

  .select-row {
    flex-direction: column;
  }

  .select-group {
    width: 100%;
    margin-bottom: 10px;
  }
}
.valeur-checkbox-intra {
  display: flex;
  gap: 20px;
  align-items: center;
}

.valeur-checkbox-intra input[type="checkbox"] {
  margin-right: 5px;
}

.valeur-checkbox-intra label {
  margin: 0;
  font-size: 14px;
  font-weight: normal;
}