/* Style global */
body {
  font-family: Arial, sans-serif;
  background-color: #f2f2f2;
  margin: 0;
  padding: 0;
}

/* Header */
header {
  background-color: #ffffff;
  color: #fff;
  padding: 15px;
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header h1 { margin: 0; font-size: 24px; }
header button {
  background-color: #e74c3c;
  border: none;
  color: #fff;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
}
header button:hover { background-color: #c0392b; }

/* Styles pour le header découpé */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 20px;
}

.logo-container {
  width: 150px;
}

.header-logo {
  max-width: 100%;
  height: auto;
}

.header-title {
  flex-grow: 1;
  text-align: center;
  color: #000;
}

.btn-logout {
  background-color: #e74c3c;
  border: none;
  color: #fff;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
}

.btn-logout:hover {
  background-color: #c0392b;
}

/* Conteneurs de formulaires pour connexion et inscription */
.login-container, .register-container {
  background-color: #fff;
  width: 400px;
  margin: 100px auto;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.login-container h1, .register-container h1 { text-align: center; margin-bottom: 20px; }
.login-container form div, .register-container form div { margin-bottom: 15px; }
.login-container form label, .register-container form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}
.login-container form input, .register-container form input,
.ticket form textarea { width: 100%; padding: 8px; box-sizing: border-box; }
.login-container form button, .register-container form button,
.ticket button { 
  width: 100%;
  padding: 10px;
  border: none;
  background-color: #2ecc71;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
}
.login-container form button:hover,
.register-container form button:hover,
.ticket button:hover { background-color: #27ae60; }

/* Styles pour la liste des tickets */
.ticket {
  background-color: #fff;
  padding: 15px;
  margin: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.ticket h3 { margin-top: 0; }
.ticket p { margin: 5px 0; }
.ticket button { margin-top: 10px; }

/* Modal de réponse */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 400px;
  position: relative;
}
.modal-content h2 { margin-top: 0; }
.modal-content .close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
}
.modal-content .close:hover { color: #000; }

/* Styles pour le dashboard et la vue des tickets */
.dashboard-container {
  display: flex;
  height: calc(100vh - 120px); /* Ajuster en fonction de la hauteur du header + menu */
}

.ticket-list {
  width: 30%;
  overflow-y: auto;
  border-right: 1px solid #ddd;
  padding: 15px;
}

.ticket-list ul {
  list-style-type: none;
  padding: 0;
}

.ticket-list li {
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 5px;
  background-color: #f8f8f8;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.ticket-list li:hover, .ticket-list li.active {
  border-left-color: #3498db;
}

.ticket-list li.active {
  border-left-color: #2980b9;
  background-color: #eef7fd;
}

.ticket-details {
  width: 70%;
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.ticket-info {
  background-color: #f8f8f8;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
}

.conversation {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.message {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 5px;
  width: 80%;
}

.message.user {
  background-color: #e3f2fd;
  align-self: flex-start;
}

.message.admin {
  background-color: #e8f5e9;
  align-self: flex-end;
}

.reply-form {
  padding: 15px;
  background-color: #f1f1f1;
  border-radius: 5px;
  margin-bottom: 20px;
}

.no-ticket-selected {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-style: italic;
  color: #777;
}

.pagination {
  text-align: center;
  margin-top: 15px;
}

.pagination button {
  margin: 0 5px;
  padding: 5px 10px;
  cursor: pointer;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 3px;
}

.pagination button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Style pour le menu admin */
.admin-menu {
  padding: 10px;
  background-color: #f0f0f0;
  text-align: center;
}

.admin-menu button {
  padding: 8px 16px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.admin-menu button:hover {
  background-color: #2980b9;
}

/* Menu administrateur */
.admin-menu-container {
  background-color: #2c3e50;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.main-menu {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.menu-item {
  padding: 15px 30px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 0.3s;
}

.menu-item:hover {
  background-color: #34495e;
}

.menu-item.active {
  background-color: #3498db;
}

.menu-icon {
  margin-right: 10px;
  font-size: 18px;
}

/* Sections pour le menu admin */
.section-container {
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 5px;
  margin: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-primary {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #2980b9;
}

/* Style pour les badges de statut */
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  color: white;
  text-align: center;
  font-weight: 500;
}

.status-open {
  background-color: #3498db;
}

.status-replied {
  background-color: #f39c12;
}

.status-closed {
  background-color: #27ae60;
}

.status-pending {
  background-color: #95a5a6;
}

.status-archived {
  background-color: #2c3e50;
}

/* Style pour les drapeaux */
.flag {
  display: inline-block;
  width: 20px;
  height: 14px;
  margin-right: 5px;
  vertical-align: middle;
  background-size: cover;
  border-radius: 2px;
  box-shadow: 0 0 1px rgba(0,0,0,0.5);
}

.flag-fr {
  background-image: url('https://flagcdn.com/20x15/fr.png');
}

.flag-us, .flag-uk {
  background-image: url('https://flagcdn.com/20x15/gb.png');
}

.flag-gb {
  background-image: url('https://flagcdn.com/20x15/gb.png');
}

.flag-es {
  background-image: url('https://flagcdn.com/20x15/es.png');
}

.flag-de {
  background-image: url('https://flagcdn.com/20x15/de.png');
}

.flag-it {
  background-image: url('https://flagcdn.com/20x15/it.png');
}

.flag-nl {
  background-image: url('https://flagcdn.com/20x15/nl.png');
}

/* Style pour le conteneur des informations du ticket dans la liste */
.ticket-info-container {
  display: flex;
  flex-direction: column;
}

.ticket-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.ticket-subject {
  flex-grow: 1;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Style pour la table des utilisateurs */
.users-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

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

.users-table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

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

.btn-edit, .btn-delete {
  padding: 5px 10px;
  margin: 0 3px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.btn-edit {
  background-color: #f39c12;
  color: white;
}

.btn-delete {
  background-color: #e74c3c;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
}

.btn-delete:hover {
  background-color: #c0392b;
}

/* Formulaire de paramètres */
.settings-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Ajouter ces styles à la fin du fichier */
.ticket-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.btn-status {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  font-weight: bold;
}

.btn-close {
  background-color: #e74c3c;
}

.btn-reopen {
  background-color: #3498db;
}

.btn-alert {
  background-color: #f39c12;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  font-weight: bold;
}

.btn-close:hover {
  background-color: #c0392b;
}

.btn-reopen:hover {
  background-color: #2980b9;
}

.btn-alert:hover {
  background-color: #e67e22;
}

/* Styles pour les badges de pays */
.country-badge {
  display: flex;
  align-items: center;
  margin-right: 10px;
}

.country-name {
  font-size: 12px;
  color: #555;
  margin-left: 3px;
}

/* Style pour le bloc de détails de ticket */
.ticket-details-grid {
  margin-top: 15px;
}

.details-row {
  display: flex;
  margin-bottom: 8px;
}

.details-cell {
  flex: 1;
  padding-right: 15px;
}

/* Amélioration visuelle pour la liste de tickets */
.ticket-info-container {
  display: flex;
  flex-direction: column;
}

.ticket-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.ticket-subject {
  flex-grow: 1;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Amélioration des statuts */
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  color: white;
  text-align: center;
  font-weight: 500;
}

/* Assurer que le header du ticket est correctement aligné */
.ticket-list li {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.ticket-list li:hover {
  border-left-color: #3498db;
}

.ticket-list li.active {
  border-left-color: #2980b9;
  background-color: #eef7fd;
}

/* Ajouter ces styles à la fin du fichier */

/* Styles pour l'éditeur et les pièces jointes */
.attachment-container {
  margin-bottom: 15px;
}

.file-upload-wrapper {
  margin-bottom: 10px;
}

.btn-add-attachment {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.btn-add-attachment:hover {
  background-color: #2980b9;
}

.file-list {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  margin-top: 10px;
  background-color: #f9f9f9;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 5px;
  border-bottom: 1px solid #eee;
}

.file-item:last-child {
  border-bottom: none;
}

.file-icon {
  margin-right: 8px;
  font-size: 18px;
}

.file-name {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 10px;
}

.file-size {
  color: #777;
  margin-right: 10px;
  font-size: 12px;
  white-space: nowrap;
}

.btn-remove-file {
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
}

.btn-remove-file:hover {
  background: #c0392b;
}

.btn-submit {
  width: 100%;
  padding: 10px;
  background-color: #2ecc71;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.2s;
}

.btn-submit:hover {
  background-color: #27ae60;
}

.btn-submit:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

/* Style pour les pièces jointes affichées dans les messages */
.attachment-preview {
  margin-top: 10px;
  border-top: 1px dashed #ddd;
  padding-top: 10px;
}

.attachment-preview .title {
  font-weight: bold;
  margin-bottom: 5px;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.attachment-item {
  display: flex;
  align-items: center;
  background-color: #f1f1f1;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.attachment-item a {
  text-decoration: none;
  color: #3498db;
  margin-left: 5px;
}

.attachment-item a:hover {
  text-decoration: underline;
}

/* Style pour le bouton de chargement */
.loading-button {
  position: relative;
  overflow: hidden;
}

.loading-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 100%;
  }
}

/* Ajouter ces styles à la fin du fichier */

/* Personnalisation des notifications toast */
.toastify {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  font-family: Arial, sans-serif;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
}

.toastify-right {
  right: 15px;
}

.toastify-top {
  top: 15px;
}

.toastify-content {
  display: flex;
  align-items: center;
}

/* Animation pour les toasts */
@keyframes toast-in {
  from { transform: translateY(-15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.toastify {
  animation: toast-in 0.3s ease-out forwards;
}

.client-name {
  font-size: 12px;
  color: #555;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Styles pour le bouton de traduction */
.translation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.btn-translate {
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  transition: background-color 0.2s;
}

.btn-translate:hover {
  background-color: #2980b9;
}

.btn-translate:disabled {
  background-color: #95a5a6;
  cursor: wait;
}

.translate-icon {
  margin-right: 5px;
  font-size: 16px;
}

/* Styles pour les boutons de traduction de message */
.btn-translate-message {
  background: none;
  border: none;
  color: #3498db;
  cursor: pointer;
  font-size: 14px;
  margin-left: 6px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
}

.btn-translate-message:hover {
  background-color: #eef7fd;
}

.btn-translate-title {
  background: none;
  border: none;
  color: #3498db;
  cursor: pointer;
  font-size: 16px;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background-color 0.2s;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
}

.btn-translate-title:hover {
  background-color: #eef7fd;
}

.message-translated, .title-translated {
  border-radius: 4px;
  color: #2c3e50;
  position: relative;
}

.title-translated {
  margin-bottom: 12px;
}

/* Ajoutez ces styles dans public/css/style.css */

.form-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.template-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.template-control label {
  min-width: 150px;
}

.template-control select {
  flex-grow: 1;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.template-actions {
  margin-top: 10px;
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
}

.btn-template {
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.btn-template:hover {
  background-color: #2980b9;
}

.btn-template-delete {
  background-color: #e74c3c;
}

.btn-template-delete:hover {
  background-color: #c0392b;
}

/* Ajustement pour le modal de création/édition de modèle */
#templateModal .modal-content {
  width: 600px;
}

#templateModal .form-group {
  margin-bottom: 15px;
}

#templateModal label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

#templateModal input, #templateModal select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.user-email {
  font-size: 0.9em;
  color: #666;
  font-style: italic;
  margin-left: 5px;
}

/* Ajouter ces styles pour les filtres */
.filters-container {
  padding: 15px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-row div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-row label {
  font-weight: bold;
  white-space: nowrap;
}

.filter-row select {
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.btn-filter {
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
}

.btn-filter:hover {
  background-color: #2980b9;
}

.btn-reset {
  background-color: #95a5a6;
}

.btn-reset:hover {
  background-color: #7f8c8d;
}

/* Style pour les tickets non lus */
.ticket-list li.unread .ticket-subject {
  font-weight: bold;
}

.ticket-list li.read .ticket-subject {
  font-weight: normal;
}

/* Ajouter un indicateur de non-lu */
.unread-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #e74c3c;
  border-radius: 50%;
  margin-left: 5px;
}

/* Styles pour les onglets */
.tabs-container {
  margin-top: 20px;
}

.tabs-header {
  display: flex;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 20px;
}

.tab-button {
  background: none;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  margin-right: 10px;
}

.tab-button:hover {
  color: #333;
  background-color: #f8f9fa;
}

.tab-button.active {
  color: #007bff;
  border-bottom-color: #007bff;
  background-color: #f8f9fa;
}

.tab-content {
  display: none;
}

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

/* Styles pour les données client */
.customer-data-container {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.customer-info {
  background-color: white;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.customer-info h3 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #007bff;
  padding-bottom: 8px;
}

.customer-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-weight: bold;
  color: #555;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.detail-value {
  color: #333;
  font-size: 14px;
}

.orders-section {
  background-color: white;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.orders-section h3 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #28a745;
  padding-bottom: 8px;
}

.order-item {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
  background-color: #fafafa;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.order-number {
  font-weight: bold;
  color: #007bff;
  font-size: 16px;
}

.order-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.order-status.paye {
  background-color: #d4edda;
  color: #155724;
}

.order-status.attente {
  background-color: #fff3cd;
  color: #856404;
}

.order-status.annule {
  background-color: #f8d7da;
  color: #721c24;
}

.order-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.order-products {
  margin-top: 15px;
}

.order-products h4 {
  margin: 0 0 10px 0;
  color: #555;
  font-size: 14px;
}

.product-list {
  background-color: white;
  border-radius: 4px;
  padding: 10px;
}

.product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.product-item:last-child {
  border-bottom: none;
}

.product-info {
  flex: 1;
}

.product-name {
  font-weight: 500;
  color: #333;
  margin-bottom: 2px;
}

.product-ref {
  font-size: 12px;
  color: #666;
}

.product-quantity {
  margin: 0 15px;
  font-weight: bold;
  color: #007bff;
}

.product-price {
  font-weight: bold;
  color: #28a745;
}

.no-data-message {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #f5c6cb;
  text-align: center;
}

.customer-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #e3f2fd;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.summary-item {
  text-align: center;
}

.summary-value {
  font-size: 24px;
  font-weight: bold;
  color: #1976d2;
}

.summary-label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
}

/* Styles pour les sous-onglets dans les données client */
.customer-sub-tabs {
  margin-top: 20px;
}

.sub-tabs-header {
  display: flex;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 20px;
}

.sub-tab-button {
  background: none;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: #6c757d;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-tab-button:hover {
  color: #495057;
  background-color: #f8f9fa;
}

.sub-tab-button.active {
  color: #007bff;
  border-bottom-color: #007bff;
  background-color: #f8f9fa;
}

.sub-tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.sub-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Amélioration des styles pour les données client */
.customer-info-detailed {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.customer-info-detailed h3 {
  margin-top: 0;
  color: #495057;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 10px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.info-card {
  background: white;
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid #007bff;
}

.info-card-title {
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-card-content {
  color: #6c757d;
  line-height: 1.4;
}

/* Amélioration des styles pour les commandes */
.orders-detailed {
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.orders-header {
  background: #007bff;
  color: white;
  padding: 15px 20px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.orders-list {
  max-height: 600px;
  overflow-y: auto;
}

.order-card {
  border-bottom: 1px solid #e9ecef;
  padding: 20px;
  transition: background-color 0.2s ease;
}

.order-card:hover {
  background-color: #f8f9fa;
}

.order-card:last-child {
  border-bottom: none;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.order-title {
  font-weight: 600;
  color: #495057;
  font-size: 16px;
}

.order-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 13px;
}

.meta-label {
  font-weight: 500;
  color: #6c757d;
}

.meta-value {
  color: #495057;
}

.products-section {
  margin-top: 15px;
  border-top: 1px solid #e9ecef;
  padding-top: 15px;
}

.products-title {
  font-weight: 600;
  color: #495057;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-grid {
  display: grid;
  gap: 8px;
}

.product-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 13px;
  align-items: center;
}

.product-name-cell {
  font-weight: 500;
  color: #495057;
}

.product-ref-cell {
  color: #6c757d;
  font-size: 12px;
}

.product-qty-cell, .product-price-cell {
  text-align: right;
  font-weight: 500;
}

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

.no-data-icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
}
