/* =========================================================
   SFRP — RECRUTEMENT STAFF
   Nécessite ../base.css (chargé avant).
   ========================================================= */

.apply {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 7vw, 112px);
  align-items: start;
  padding-top: calc(var(--nav-h) + clamp(40px, 6vw, 80px));
  padding-bottom: clamp(64px, 9vw, 120px);
}

.apply__aside { display: grid; gap: 28px; position: sticky; top: calc(var(--nav-h) + 40px); }
.apply__aside h1 { font-size: clamp(3.5rem, 7vw, 6.5rem); font-weight: 900; line-height: 0.88; }
.apply__lead { max-width: 44ch; color: var(--muted); font-size: 1.125rem; }

/* Étapes (piloté par form.js : .steps li.active) */
.steps { display: grid; counter-reset: step; border-top: 1px solid var(--line-strong); margin-top: 8px; }
.steps li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.25s;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line-strong);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.steps li.active { color: var(--bone); }
.steps li.active::before { background: var(--bone); border-color: var(--bone); color: var(--ink); }
.step-label { font-weight: 500; }

/* Formulaire */
.form-container { padding: clamp(24px, 4vw, 48px); background: var(--ink-2); border-top: 4px solid var(--coyote); }

.form-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.form-step legend {
  width: 100%;
  margin-bottom: 28px;
  padding: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1;
  text-transform: uppercase;
}
.form-step.active { animation: stepIn 0.4s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* Champs : .field-group et .field-hint sont dans base.css */
.field-group { margin-bottom: 24px; }

.summary-box { display: grid; gap: 16px; padding: 24px; background: var(--ink); border-left: 4px solid var(--coyote); }
.summary-box h2 { font-size: 1.75rem; }
.summary-box p { color: rgba(236, 238, 228, 0.85); }
.summary-note { color: var(--muted) !important; font-size: 0.95rem; }

.form-navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 28px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }

#confirmationMessage { display: grid; gap: 12px; padding: 24px; border-left: 4px solid #8bd17c; background: var(--ink); }
#confirmationMessage h2 { font-size: 2rem; }
#confirmationMessage p { color: var(--muted); }

/* Notifications (form.js : .hud-alert) */
.hud-alert {
  position: fixed;
  top: calc(var(--nav-h) + 16px);
  right: 16px;
  z-index: 300;
  max-width: min(420px, calc(100vw - 32px));
  padding: 16px 20px;
  background: var(--ink-3);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--coyote);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.hud-alert.active { opacity: 1; transform: none; }
.hud-alert.error { border-left-color: var(--ru-soft); }
.hud-alert.success { border-left-color: #8bd17c; }

@media (max-width: 900px) {
  .apply { grid-template-columns: 1fr; }
  .apply__aside { position: static; }
  .steps { grid-template-columns: repeat(5, 1fr); border-top: 0; gap: 4px; }
  .steps li { flex-direction: column; gap: 8px; padding: 10px 0; border-bottom: 0; font-size: 0.8rem; text-align: center; }
  .steps li.active { border-bottom: 0; }
}
@media (max-width: 520px) {
  .form-navigation .btn { width: 100%; justify-content: center; }
}
