/* =============================================================================
   DEVENIR FORMATEUR - Styles pour le processus de recrutement
   TechInsight - Groupe Caplogy
   ============================================================================= */

/* Main Layout */
.recruitment-main {
  padding: 3rem 0 6rem;
  min-height: calc(100vh - 200px);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Progress Bar */
.progress-container {
  max-width: 700px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.progress-bar {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent, #10b981);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
  background: var(--accent, #10b981);
  color: white;
}

.progress-step.completed .step-number::after {
  content: "✓";
}

.step-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  transition: color 0.3s ease;
}

.progress-step.active .step-label {
  color: var(--primary, #1a1a2e);
  font-weight: 600;
}

/* Form Steps */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

.step-card {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.step-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.step-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.step-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary, #1a1a2e);
  margin-bottom: 0.5rem;
}

.step-header p {
  color: #64748b;
  font-size: 1.1rem;
}

/* Upload Zone */
.upload-zone {
  border: 3px dashed #d1d5db;
  border-radius: 16px;
  padding: 4rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f9fafb;
  margin-bottom: 2rem;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent, #10b981);
  background: #f0fdf4;
}

.upload-content .upload-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.upload-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary, #1a1a2e);
  margin-bottom: 0.5rem;
}

.upload-content p {
  color: #64748b;
  margin-bottom: 0.5rem;
}

.upload-link {
  color: var(--accent, #10b981);
  font-weight: 600;
  cursor: pointer;
}

.upload-hint {
  font-size: 0.85rem;
  color: #94a3b8;
}

.upload-progress,
.upload-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--accent, #10b981);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.success-icon {
  font-size: 3rem;
}

/* Alerts */
.step-alert {
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  font-weight: 500;
}

.step-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.step-alert.warning {
  background: #fffbeb;
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

.step-alert.success {
  background: #f0fdf4;
  color: #166534;
  border-left: 4px solid #10b981;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.step-alert .alert-icon {
  font-size: 1.5rem;
}

/* Form Styles */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
}

.required {
  color: #ef4444;
}

.form-group input,
.form-group textarea {
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: white;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent, #10b981);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

/* Skills */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #dbeafe;
  color: #1e40af;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.skill-tag button {
  background: none;
  border: none;
  color: #1e40af;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
}

.skills-input-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.skills-input-row input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.9rem;
}

.btn-sm {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

/* Documents Grid */
.documents-alert {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fef3c7;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border-left: 4px solid #f59e0b;
}

.documents-alert .alert-icon {
  font-size: 1.25rem;
}

.documents-alert p {
  color: #92400e;
  font-weight: 500;
  font-size: 0.9rem;
  margin: 0;
}

.documents-grid {
  display: grid;
  gap: 1rem;
}

.document-item {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.document-item:hover {
  border-color: #d1d5db;
}

.document-item.uploaded {
  border-color: var(--accent, #10b981);
  background: #f0fdf4;
}

.document-item.error {
  border-color: #ef4444;
  background: #fef2f2;
}

.document-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.document-icon {
  font-size: 1.5rem;
}

.document-info {
  flex: 1;
}

.document-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary, #1a1a2e);
  margin: 0 0 0.25rem;
}

.document-info p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.document-status {
  font-size: 1.25rem;
}

.document-upload {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.upload-btn {
  white-space: nowrap;
}

.file-name {
  font-size: 0.85rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.document-message {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.document-message.success {
  color: #059669;
}

.document-message.error {
  color: #dc2626;
}

.document-message.warning {
  color: #d97706;
}

.iban-input {
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

/* Contract Section */
.contract-summary {
  background: #f9fafb;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.contract-summary h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary, #1a1a2e);
  margin-bottom: 1rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.summary-item .label {
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
}

.summary-item .value {
  font-size: 1rem;
  color: var(--primary, #1a1a2e);
  font-weight: 600;
}

.contract-section {
  margin-bottom: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.contract-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary, #1a1a2e);
  margin-bottom: 1rem;
}

.contract-actions {
  margin-bottom: 2rem;
}

/* Step Actions */
.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent, #10b981);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
  background: white;
  color: #374151;
  border: 2px solid #e5e7eb;
}

.btn-secondary:hover:not(:disabled) {
  border-color: #d1d5db;
  background: #f9fafb;
}

.btn-outline {
  background: white;
  color: var(--primary, #1a1a2e);
  border: 2px solid var(--primary, #1a1a2e);
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary, #1a1a2e);
  color: white;
}

.btn-accent {
  background: var(--accent, #10b981);
  color: white;
}

.btn-lg {
  padding: 1.25rem 2.5rem;
  font-size: 1.1rem;
}

/* Responsive */
/* =============================================================================
   LEAD CAPTURE MODAL
   ============================================================================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  animation: slideUpModal 0.4s ease;
}

@keyframes slideUpModal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #e2e8f0;
  color: #374151;
}

.modal-header {
  text-align: center;
  margin-bottom: 2rem;
}

.modal-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.modal-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary, #1a1a2e);
  margin: 0 0 0.5rem;
}

.modal-header p {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lead-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.lead-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lead-form .form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
}

.lead-form .form-group input {
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: white;
}

.lead-form .form-group input:focus {
  outline: none;
  border-color: var(--accent, #10b981);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.btn-full {
  width: 100%;
  margin-top: 0.5rem;
}

.modal-footer-text {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 0;
}

.trust-badges {
  font-size: 0.85rem;
  color: #64748b;
}

/* Modal Responsive */
@media (max-width: 500px) {
  .modal-content {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .modal-header h2 {
    font-size: 1.5rem;
  }

  .lead-form .form-row {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
  .step-card {
    padding: 2rem 1.5rem;
    border-radius: 16px;
  }

  .step-header h1 {
    font-size: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .step-actions {
    flex-direction: column-reverse;
  }

  .step-actions .btn {
    width: 100%;
  }

  .progress-steps {
    gap: 0.25rem;
  }

  .step-label {
    font-size: 0.75rem;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }
}
