*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f5f7fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #1a2e35;
}

/* ── Auth Card ── */
.auth-card {
  background: #fff;
  border-radius: 8px;
  padding: 40px 44px 36px;
  width: 100%;
  max-width: 430px;
  box-shadow: 0 8px 40px rgba(10, 158, 176, 0.10);
}

/* ── Logo ── */
.auth-logo {
  display: block;
  text-align: center;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #0a9eb0;
  font-family: 'Arial Black', Arial, sans-serif;
  text-decoration: none;
  margin-bottom: 6px;
}

/* ── Icon divider ── */
.icon-divider {
    display: flex;
    align-items: center;
    margin: 6px 75px 22px;
}

a.logo {
  display: block;
  margin: 0 auto;
  text-align: center;
  width: fit-content;
}

.icon-divider .line {
  flex: 1;
  height: 1.5px;
  background: #d0e8ed;
  max-width: 90px;
}

.icon-divider .icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #0a9eb0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px;
  flex-shrink: 0;
}

.icon-divider .icon-circle svg { width: 20px; height: 20px; }

.icon-divider .icon-circle--light { background: #e8f4f8; }

/* ── Headings ── */
.auth-title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: #1a2e35;
  margin-bottom: 6px;
  line-height: 1.3;
}

.auth-subtitle {
  text-align: center;
  font-size: 14px;
  color: #8a9faa;
  margin-bottom: 26px;
  line-height: 1.5;
}

/* ── Field label ── */
.field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: #1a2e35;
  margin-bottom: 7px;
  margin-top: 16px;
}

.field-label svg { width: 17px; height: 17px; flex-shrink: 0; }

.field-label em {
  font-style: italic;
  font-weight: 400;
  font-size: 13px;
  color: #8a9faa;
}

/* ── Input ── */
.input-wrap { position: relative; }

.input-wrap input[type="text"],
.input-wrap input[type="email"],
.input-wrap input[type="password"] {
  width: 100%;
  border: 1.5px solid #d0e0e8;
  border-radius: 10px;
  padding: 12px 44px 12px 14px;
  font-size: 14px;
  color: #1a2e35;
  background: #f9fdfe;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.input-wrap input::placeholder { color: #b0c4ce; }
.input-wrap input:focus { border-color: #0a9eb0; background: #fff; }

/* Django field errors */
.input-wrap input.is-invalid { border-color: #e05555; }

.input-icon-left {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #b0c4ce;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.input-icon-left + input { padding-left: 38px; }

.input-icon-right {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #b0c4ce;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
}

/* ── Django messages / errors ── */
.auth-messages { margin-bottom: 14px; }

.auth-messages .alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.4;
}

.alert--error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert--success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert--info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.field-error {
  font-size: 12px;
  color: #e05555;
  margin-top: 4px;
  display: block;
}

/* ── Forgot link ── */
.forgot-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: #0a9eb0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.forgot-link:hover { color: #088a9c; }

/* ── Primary button ── */
.btn-primary {
  width: 100%;
  background: #0a9eb0;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  transition: background 0.18s, opacity 0.18s;
  text-decoration: none;
}

.btn-primary:hover  { background: #088a9c; }
.btn-primary:active { opacity: 0.88; }
.btn-primary svg    { width: 20px; height: 20px; flex-shrink: 0; }

/* ── OR divider ── */
.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: #b0c4ce;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0eaee;
}

/* ── Bottom link ── */
.bottom-link {
  text-align: center;
  font-size: 14px;
  color: #4a6070;
}

.bottom-link a {
  color: #0a9eb0;
  font-weight: 700;
  text-decoration: none;
}

.bottom-link a:hover { text-decoration: underline; }

/* ── Info box (avantages / besoin d'aide) ── */
.info-box {
  background: #f0f8fc;
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.info-box__icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-box__icon--bordered {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid #0a9eb0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-box__title {
  font-size: 14px;
  font-weight: 700;
  color: #0a9eb0;
  margin-bottom: 8px;
}

.info-box__text {
  font-size: 13px;
  color: #4a6070;
  line-height: 1.5;
}

.info-box__list {
  list-style: none;
  padding: 0;
}

.info-box__list li {
  font-size: 12.5px;
  color: #4a6070;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.info-box__list li svg { flex-shrink: 0; margin-top: 1px; }

/* ── Terms box ── */
.terms-box {
  background: #f0f8fc;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
}

.terms-box__icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid #0a9eb0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.terms-box__text {
  font-size: 12.5px;
  color: #4a6070;
  line-height: 1.5;
}

.terms-box__text a {
  color: #0a9eb0;
  text-decoration: underline;
}

/* ── Success state (email envoyé) ── */
.success-icon {
  text-align: center;
  margin: 8px 0 20px;
}

.success-icon svg {
  width: 72px;
  height: 72px;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .auth-card { padding: 30px 22px 28px; border-radius: 9px; }
  .auth-logo  { font-size: 26px; }
  .auth-title { font-size: 19px; }
}
