/* ===== Formulaire demande de DPS ===== */
.dps-form {
  max-width: 920px;
  margin: 0 auto;
  font-family: "Montserrat", system-ui, sans-serif;
  color: #12417e;
}

/* Respecte l'attribut HTML hidden malgré nos règles display sur .dps-btn et co. */
.dps-form [hidden] { display: none !important; }

/* Alertes flash */
.dps-form .dps-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 22px;
  font-size: 0.95em;
}
.dps-form .dps-alert i { font-size: 1.5em; margin-top: 2px; }
.dps-form .dps-alert p { margin: 4px 0 0; }
.dps-form .dps-alert-success { background: #e8f6ee; color: #15803d; border-left: 4px solid #16a34a; }
.dps-form .dps-alert-success i { color: #16a34a; }
.dps-form .dps-alert-error   { background: #fdecec; color: #991b1b; border-left: 4px solid #c0392b; }
.dps-form .dps-alert-error i { color: #c0392b; }

/* Intro */
.dps-form .dps-intro {
  background: #eef3fb;
  border-left: 4px solid #12417e;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.93em;
  margin-bottom: 24px;
}
.dps-form .dps-intro i { color: #12417e; margin-right: 6px; }

/* Sections */
.dps-form .dps-section {
  border: 1px solid #e3e8f0;
  border-radius: 12px;
  padding: 26px 30px 10px;
  margin: 0 0 28px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(18, 65, 126, 0.05);
}
.dps-form .dps-section legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px;
  font-size: 1.15em;
  font-weight: 700;
  color: #12417e;
  background: #fff;
}
.dps-form .dps-section legend i { color: #e7822f; font-size: 1.05em; }

.dps-form .dps-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e7822f;
  color: #fff;
  font-size: 0.9em;
  font-weight: 700;
}

/* Sous-titre dans une section */
.dps-form .dps-subtitle {
  margin: 22px 0 8px;
  font-weight: 600;
  color: #12417e;
  border-left: 3px solid #e7822f;
  padding-left: 10px;
}
.dps-form .dps-subtitle i { margin-right: 6px; color: #e7822f; }

/* Lignes & colonnes */
.dps-form .dps-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.dps-form .dps-cols-2 { grid-template-columns: 1fr 1fr; }
.dps-form .dps-cols-3 { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 720px) {
  .dps-form .dps-cols-2,
  .dps-form .dps-cols-3 { grid-template-columns: 1fr; }
  .dps-form .dps-section { padding: 18px 16px 4px; }
}

/* Champs */
.dps-form .dps-field {
  display: flex;
  flex-direction: column;
  font-weight: 500;
}
.dps-form .dps-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.93em;
  margin-bottom: 6px;
  color: #12417e;
}
.dps-form .dps-label i {
  color: #e7822f;
  width: 18px;
  text-align: center;
}
.dps-form .dps-label abbr {
  color: #e7822f;
  text-decoration: none;
  margin-left: 2px;
  font-weight: 700;
}

/* Help text */
.dps-form .dps-help {
  display: block;
  margin-top: 6px;
  font-size: 0.82em;
  color: #6b7a90;
  font-weight: 400;
  line-height: 1.4;
}

/* Erreurs inline */
.dps-form .dps-error {
  color: #c0392b;
  font-size: 0.82em;
  margin-top: 4px;
  font-weight: 500;
}

/* Inputs */
.dps-form input[type="text"],
.dps-form input[type="email"],
.dps-form input[type="tel"],
.dps-form input[type="date"],
.dps-form textarea,
.dps-form select {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.95em;
  font-family: inherit;
  color: #1a1a1a;
  background: #fafbfd;
  border: 1px solid #d4dbe6;
  border-radius: 6px;
  transition: border-color .15s, box-shadow .15s, background .15s;
  box-sizing: border-box;
}
.dps-form textarea { resize: vertical; min-height: 80px; }

.dps-form input:focus,
.dps-form textarea:focus,
.dps-form select:focus {
  outline: none;
  border-color: #e7822f;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(231, 130, 47, 0.15);
}

.dps-form input::placeholder,
.dps-form textarea::placeholder { color: #98a3b3; }

/* Consentement */
.dps-form .dps-consent {
  margin: 8px 0 24px;
  padding: 16px 18px;
  background: #f5f7fb;
  border-left: 4px solid #12417e;
  border-radius: 6px;
  font-size: 0.93em;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: start;
}
.dps-form .dps-consent > i {
  font-size: 1.4em;
  color: #12417e;
  padding-top: 2px;
}
.dps-form .dps-consent label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.dps-form .dps-consent input[type="checkbox"] { margin: 0; }

/* Bouton */
.dps-form .dps-btn {
  background: #12417e;
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 13px 30px;
  font-size: 0.95em;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background .2s, transform .1s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.dps-form .dps-btn:hover { background: #e7822f; }
.dps-form .dps-btn:active { transform: translateY(1px); }
.dps-form .dps-btn[disabled] { opacity: .7; cursor: wait; }
.dps-form .dps-btn-ghost {
  background: transparent;
  color: #12417e;
  border: 1px solid #c9d4e6;
}
.dps-form .dps-btn-ghost:hover { background: #eef3fb; color: #12417e; }

/* ========== Wizard ========== */
.dps-form.dps-wizard .dps-wizard-body { animation: dpsFade .25s ease; }

.dps-form .dps-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  counter-reset: step;
}
.dps-form .dps-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
  font-size: 0.82em;
  color: #98a3b3;
  position: relative;
  padding: 0 4px;
  transition: color .2s;
  user-select: none;
}
.dps-form .dps-progress-step::after {
  content: "";
  position: absolute;
  top: 14px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: #e3e8f0;
  z-index: 0;
}
.dps-form .dps-progress-step:last-child::after { display: none; }
.dps-form .dps-progress-step.is-done::after { background: #16a34a; }
.dps-form .dps-progress-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #c9d4e6;
  color: #98a3b3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9em;
  position: relative;
  z-index: 1;
  transition: background .2s, color .2s, border-color .2s;
}
.dps-form .dps-progress-step.is-active .dps-progress-num {
  background: #12417e; color: #fff; border-color: #12417e;
}
.dps-form .dps-progress-step.is-done .dps-progress-num {
  background: #16a34a; color: #fff; border-color: #16a34a;
}
.dps-form .dps-progress-step.is-done .dps-progress-num::before {
  font-family: "Font Awesome 6 Free"; font-weight: 900; content: "\f00c";
}
.dps-form .dps-progress-step.is-done .dps-progress-num span { display: none; }
.dps-form .dps-progress-step.is-active { color: #12417e; font-weight: 600; }
.dps-form .dps-progress-label i { margin-right: 4px; color: #e7822f; }

@media (max-width: 720px) {
  .dps-form .dps-progress { grid-template-columns: repeat(4, 1fr); }
  .dps-form .dps-progress-label { display: none; }
  .dps-form .dps-progress-step::after { top: 14px; }
}

/* Étapes */
.dps-form .dps-step[hidden] { display: none !important; }

/* Navigation bas */
.dps-form .dps-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  padding: 18px 4px 0;
  border-top: 1px dashed #e3e8f0;
}
.dps-form .dps-nav-status {
  flex: 1;
  text-align: center;
  font-size: 0.9em;
  color: #6b7a90;
}
.dps-form .dps-nav-status strong { color: #12417e; }

/* Erreur globale wizard */
.dps-form .dps-form-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fdecec;
  color: #991b1b;
  border-left: 3px solid #c0392b;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Erreurs inline (AJAX) */
.dps-form .dps-has-error input,
.dps-form .dps-has-error textarea,
.dps-form .dps-has-error select {
  border-color: #c0392b;
  background: #fff7f7;
}

/* Panneau succès */
.dps-form .dps-success {
  background: #fff;
  border: 1px solid #d1f0dc;
  border-radius: 12px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(22, 163, 74, 0.08);
  animation: dpsFade .3s ease;
}
.dps-form .dps-success-icon i {
  font-size: 3.5em;
  color: #16a34a;
  margin-bottom: 12px;
}
.dps-form .dps-success h2 {
  margin: 0 0 12px;
  color: #12417e;
  font-size: 1.5em;
}
.dps-form .dps-success p { color: #4b5563; margin: 6px 0; }
.dps-form .dps-success-msg { font-weight: 600; color: #15803d; }
.dps-form .dps-success-msg a { color: #15803d; text-decoration: underline; }
.dps-form .dps-success-download { margin-top: 18px; }
.dps-form .dps-success-download .dps-btn { background: #16a34a; }
.dps-form .dps-success-download .dps-btn:hover { background: #12417e; }

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