/*
 * ISC Matadi : pages d'authentification (connexion, inscription, mot de passe).
 * Chargée après le thème « auth » pour l'aligner sur la charte du site
 * (mêmes couleurs que ux.css) et corriger contrastes et focus.
 */

:root {
  --primary: #1a1a37;           /* remplace le violet du thème */
  --sc-primary: #2b2b55;
  --isc-brand: #84f12a;
  --isc-brand-hover: #9df552;
  --isc-brand-strong: #2f6b0a;
  --isc-on-brand: #1a1a37;
  --isc-navy: #1a1a37;
  --isc-heading: #1e1e4b;
  --isc-text: #4f4f6a;
  --isc-text-muted: #6b6b88;
  --isc-focus: #0b57d0;
  --isc-radius: 6px;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--isc-text);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.title-head {
  color: var(--isc-heading);
}

a {
  color: var(--isc-brand-strong);
}

a:hover {
  color: #245a07;
}

/* ---------- Colonne visuelle ---------- */

.account-head::after {
  background: linear-gradient(160deg, rgba(26, 26, 55, .88) 0%, rgba(26, 26, 55, .72) 100%) !important;
  opacity: 1;
}

.account-head > div {
  width: 100%;
  text-align: center;
}

.account-head__back {
  display: inline-block !important;
  width: auto !important;
  margin-top: 1.5rem;
  color: #fff !important;
  text-decoration: underline;
  text-underline-offset: .15em;
}

.account-head__back:hover {
  color: var(--isc-brand) !important;
}

/* ---------- En-tête du formulaire ---------- */

.heading-bx.left .title-head {
  border-left-color: var(--isc-brand);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.25;
}

.account-container {
  max-width: 460px;
  padding: 40px 16px;
}

.auth-note {
  border-radius: var(--isc-radius) !important;
  background: #f4f6f9 !important;
  color: var(--isc-heading) !important;
  border-left: 4px solid var(--isc-brand);
}

.auth-alert {
  border-radius: var(--isc-radius);
  padding: 14px 16px;
  margin-bottom: 18px;
  background: #fef3f2;
  color: #912018;
  border-left: 4px solid #d92d20;
}

/* ---------- Champs ---------- */

.contact-bx label {
  color: var(--isc-heading) !important;
}

.contact-bx .form-control,
.contact-bx .custom-select {
  border-color: #8a8aa3 !important;   /* contour perceptible (WCAG 1.4.11) */
  border-radius: var(--isc-radius) !important;
}

.contact-bx .form-text {
  color: var(--isc-text-muted) !important;
}

.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 7.5rem !important;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: .375rem;
  transform: translateY(-50%);
  min-height: 36px;
  padding: 0 .75rem;
  border: 0;
  border-radius: var(--isc-radius);
  background: #eef0f4;
  color: var(--isc-heading);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}

.password-toggle:hover {
  background: #e2e5eb;
}

/* ---------- Boutons ---------- */

.btn,
.btn.button-md {
  min-height: 44px;
  border-radius: var(--isc-radius);
  background-color: var(--isc-brand) !important;
  color: var(--isc-on-brand) !important;
  font-weight: 600;
}

.btn:hover,
.btn:focus,
.btn:active {
  background-color: var(--isc-brand-hover) !important;
  color: var(--isc-on-brand) !important;
}

.btn.outline,
.btn.button-secondary {
  background-color: transparent !important;
  border: 2px solid var(--isc-brand-strong);
  color: var(--isc-brand-strong) !important;
}

.btn.outline:hover,
.btn.button-secondary:hover {
  background-color: var(--isc-brand-strong) !important;
  color: #fff !important;
}

/* ---------- Assistant d'inscription ---------- */

.wizard-steps {
  list-style: none;
  padding: 0;
}

.wizard-step.is-active {
  border-color: var(--isc-navy) !important;
  box-shadow: 0 0 0 1px var(--isc-navy) !important;
}

.wizard-step-number {
  color: var(--isc-on-brand) !important;
  background: #e9fbd9 !important;
}

.wizard-step.is-active .wizard-step-number {
  background: var(--isc-brand) !important;
}

.wizard-step-title {
  color: var(--isc-heading) !important;
}

.wizard-step-text {
  color: var(--isc-text-muted) !important;
}

.wizard-progress-bar {
  background: var(--isc-brand-strong) !important;
}

.wizard-link {
  color: var(--isc-brand-strong) !important;
}

/* ---------- Focus visible ---------- */

:focus-visible {
  outline: 3px solid var(--isc-focus) !important;
  outline-offset: 2px !important;
}

.account-head :focus-visible {
  outline-color: #ffd34d !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
