/* Styles personnalisés pour la page d'édition de vente */

/* Animations et transitions */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f4f6;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Effets de hover pour les éléments de sortie */
.sortie-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sortie-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Autocomplétion améliorée */
.autocomplete-list {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

.autocomplete-list li {
  transition: all 0.2s ease;
}

.autocomplete-list li:hover {
  background-color: rgba(59, 130, 246, 0.2);
  transform: translateX(4px);
}

/* Notifications toast */
.notification-toast {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Boutons avec effets */
.btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  transition: all 0.3s ease;
}

.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
}

/* Champs de formulaire améliorés */
.form-input {
  transition: all 0.3s ease;
  border: 1px solid #4b5563;
}

.form-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
  transform: translateY(-1px);
}

/* Indicateurs de statut */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.status-badge.active {
  background-color: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.status-badge.new {
  background-color: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

/* Barre de progression */
.progress-bar {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  transition: width 0.5s ease;
}

/* Cards avec effet glassmorphism */
.glass-card {
  background: rgba(31, 41, 55, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(75, 85, 99, 0.5);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(31, 41, 55, 0.7);
  border-color: rgba(75, 85, 99, 0.7);
  transform: translateY(-2px);
}

/* Responsive design */
@media (max-width: 1024px) {
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .lg\:col-span-2 {
    grid-column: span 1 / span 1;
  }

  .sortie-item {
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .btn-primary,
  .btn-success {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Animations d'entrée */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

/* Effets de focus améliorés */
.focus-ring {
  transition: all 0.2s ease;
}

.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
  transform: scale(1.02);
}

/* Indicateurs de chargement */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Tooltips personnalisés */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.tooltip:hover::after {
  opacity: 1;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #374151;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #6b7280;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
