/* Styles custom pour depot-bilan */
html {
  scroll-behavior: smooth;
}

/* Tooltip */
.tooltip-container {
  position: relative;
  display: inline-block;
}

.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #3b82f6;
  color: white;
  font-size: 12px;
  font-weight: bold;
  cursor: help;
  margin-left: 4px;
  vertical-align: middle;
}

.tooltip-content {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e293b;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  width: 280px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1e293b;
}

.tooltip-container:hover .tooltip-content,
.tooltip-container.active .tooltip-content {
  display: block;
}

/* Form validation */
.field-error {
  border-color: #ef4444 !important;
}

.field-valid {
  border-color: #22c55e !important;
}

.error-message {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 4px;
  display: none;
}

.error-message.visible {
  display: block;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

.upload-zone.uploaded {
  border-color: #22c55e;
  background-color: #f0fdf4;
}

/* Stepper */
.stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.stepper::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 2px;
  background-color: #e5e7eb;
  z-index: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  background-color: #e5e7eb;
  color: #9ca3af;
}

.step.active .step-circle {
  background-color: #3b82f6;
  color: white;
}

.step.completed .step-circle {
  background-color: #22c55e;
  color: white;
}

.step-label {
  font-size: 12px;
  margin-top: 8px;
  color: #9ca3af;
  text-align: center;
  max-width: 80px;
}

.step.active .step-label,
.step.completed .step-label {
  color: #374151;
  font-weight: 600;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-pending { background-color: #fef3c7; color: #92400e; }
.badge-validated { background-color: #dbeafe; color: #1e40af; }
.badge-paid { background-color: #e0e7ff; color: #3730a3; }
.badge-docs_sent { background-color: #dbeafe; color: #1e40af; }
.badge-docs_received { background-color: #fed7aa; color: #9a3412; }
.badge-completed { background-color: #d1fae5; color: #065f46; }

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
