/* OTP modal — vérification email (partagé). Extrait de candidature.php, généralisé multi-form. */
.cand-otp-block { margin-top: 18px; }
.cand-otp-status {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: #fbfaf6; border: 1px solid #e6e8ed; border-radius: 8px;
  font-family: "Source Sans 3", system-ui, sans-serif;
}
.cand-otp-status[data-state="verified"] {
  background: #f0fdf4;
  border-color: #16a34a;
}
.cand-otp-icon { font-size: 20px; line-height: 1; color: #5a6577; }
.cand-otp-status[data-state="verified"] .cand-otp-icon { color: #16a34a; }
.cand-otp-status[data-state="verified"] .cand-otp-icon::before { content: "✓"; }
.cand-otp-label {
  flex: 1;
  font-size: 14.5px;
  color: #0a1628;
  font-weight: 500;
}
.cand-otp-btn {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  background: #0055a4;
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s, opacity 0.18s;
}
.cand-otp-btn:hover { background: #003d7a; }
.cand-otp-status[data-state="verified"] .cand-otp-btn { display: none; }
.cand-otp-status[data-state="verified"]::after {
  content: "vérifié";
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #16a34a;
  font-weight: 600;
  padding: 4px 10px;
  background: #dcfce7;
  border-radius: 999px;
}

/* Modal OTP : centre 6 cases */
dialog.cand-otp-modal {
  padding: 0; border: none; border-radius: 14px; background: #fff;
  width: min(440px, 92vw);
  box-shadow: 0 20px 60px -10px rgba(10, 22, 40, 0.35);
  font-family: "Source Sans 3", system-ui, sans-serif;
}
dialog.cand-otp-modal::backdrop {
  background: rgba(10, 22, 40, 0.55);
  backdrop-filter: blur(2px);
}
.cand-otp-modal-header {
  padding: 22px 26px 8px;
}
.cand-otp-modal-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px; font-weight: 500;
  color: #0a1628; margin: 0 0 6px;
}
.cand-otp-modal-desc {
  font-size: 14px; color: #5a6577; line-height: 1.55;
  margin: 0;
}
.cand-otp-modal-desc strong { color: #0a1628; }
.cand-otp-modal-body { padding: 22px 26px; }
.cand-otp-inputs {
  display: flex; gap: 8px; justify-content: center; margin: 8px 0 20px;
}
.cand-otp-inputs input {
  width: 44px; height: 52px;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 22px; font-weight: 600;
  color: #0a1628;
  background: #fff;
  border: 1.5px solid #e6e8ed;
  border-radius: 8px;
  transition: border-color 0.18s;
}
.cand-otp-inputs input:focus { outline: none; border-color: #0055a4; }
.cand-otp-modal-msg {
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.06em;
  margin: 4px 0 0; min-height: 18px;
  text-align: center;
}
.cand-otp-modal-msg[data-type="error"] { color: #b91c1c; }
.cand-otp-modal-msg[data-type="info"] { color: #5a6577; }
.cand-otp-modal-msg[data-type="success"] { color: #16a34a; }
.cand-otp-modal-footer {
  display: flex; gap: 10px; justify-content: space-between;
  padding: 14px 26px 22px;
}
.cand-otp-modal-footer button {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 13.5px; font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px; border: none; cursor: pointer;
  transition: background 0.18s, opacity 0.18s;
}
.cand-otp-cancel-btn {
  background: transparent; color: #5a6577;
  border: 1px solid #e6e8ed;
}
.cand-otp-cancel-btn:hover { border-color: #0a1628; color: #0a1628; }
.cand-otp-resend-btn {
  background: transparent; color: #0055a4;
  border: none; padding: 10px 12px;
}
.cand-otp-resend-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Wave 20b : toast V3 (remplace alert natif) */
.otp-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 10000;
  padding: 14px 22px;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.18), 0 2px 6px rgba(10, 22, 40, 0.08);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  cursor: pointer;
  max-width: 92vw;
  text-align: center;
}
.otp-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.otp-toast-warning {
  background: #fbf3d3;
  color: #6b4f00;
  border: 1px solid #f3d96b;
}
.otp-toast-error {
  background: #fde8e8;
  color: #8a1d1d;
  border: 1px solid #f3a3a3;
}
.otp-toast-success {
  background: #e7f4ec;
  color: #145a32;
  border: 1px solid #a3d9b1;
}
