/* Style pour la modale de progression */
#compute-modal .modal-err-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease-out;
}

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

#compute-modal .modal-header {
  background: linear-gradient(45deg, #667eea 0%, #282c3b 100%);
  color: white;
  padding: 20px;
  border-radius: 12px 12px 0 0;
  position: relative;
}

#compute-modal .modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

#compute-modal .close-modal {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  cursor: pointer;
  color: white;
  opacity: 0.7;
  transition: opacity 0.2s;
}

#compute-modal .close-modal:hover {
  opacity: 1;
}

#compute-modal .modal-body {
  padding: 25px;
  background: #f8f9fa;
}

#compute-status {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin-bottom: 15px;
  text-align: center;
}

#progress-bar-container {
  background: #e9ecef;
  border-radius: 10px;
  height: 24px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

#progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #45a049);
  border-radius: 10px;
  transition: width 0.4s ease;
  position: relative;
}

#progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

#progress-percentage {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 15px;
}

#compute-details {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 12px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 12px;
  color: #6c757d;
  line-height: 1.4;
}

#compute-details div {
  margin-bottom: 3px;
  padding: 2px 0;
  border-bottom: 1px solid #f8f9fa;
}

#compute-details::-webkit-scrollbar {
  width: 6px;
}

#compute-details::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

#compute-details::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

#compute-details::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

#compute-modal .modal-footer {
  padding: 15px 25px;
  background: #fff;
  border-radius: 0 0 12px 12px;
  text-align: right;
  border-top: 1px solid #dee2e6;
}

#compute-cancel-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

#compute-cancel-btn:hover {
  background: #c82333;
}

/* Animation de pulsation pour indiquer l'activité */
.computing #progress-bar-container {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

/* Style pour les erreurs */
.error #progress-bar {
  background: linear-gradient(90deg, #f44336, #d32f2f) !important;
}

.error #compute-status {
  color: #f44336 !important;
}

.error #progress-bar-container {
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}
