/* ================================================================
   Akmous — auth.css
   ================================================================ */
:root {
  --primary:       #2563eb;
  --primary-hover: #1d4ed8;
  --surface:       #f8fafc;
  --border:        #e2e8f0;
  --text-main:     #1e293b;
  --muted:         #64748b;
  --danger:        #dc2626;
  --success:       #16a34a;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--surface);
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}

/* ── Carte centrale ── */
.auth-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0,0,0,.05);
}

/* ── En-tête ── */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}
.auth-brand {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.5px;
  margin: 0 0 4px;
}
.auth-header p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ── Champs ── */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}
.form-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}
.form-group input {
  width: 100%;
  padding: 12px 44px 12px 14px; /* espace droite pour le bouton œil */
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}
.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

/* ── Wrapper champ + bouton œil ── */
.input-eye-wrap {
  position: relative;
}
.input-eye-wrap input {
  padding-right: 44px;
}
.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--muted);
  display: flex;
  align-items: center;
  transition: color .15s;
}
.eye-btn:hover { color: var(--primary); }
.eye-btn.eye-active { color: var(--primary); }
.eye-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Lien "mot de passe oublié" ── */
.forgot-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.forgot-link:hover { text-decoration: underline; }

/* ── Bouton principal ── */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background .2s;
}
.btn-submit:hover:not(:disabled) { background: var(--primary-hover); }
.btn-submit:disabled { opacity: .7; cursor: not-allowed; }

/* ── Messages d'état ── */
.alert {
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
  display: none;
  text-align: center;
  line-height: 1.4;
}
.alert.error {
  color: var(--danger);
  background: #fef2f2;
  border: 1px solid #fecaca;
  display: block;
}
.alert.success {
  color: var(--success);
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  display: block;
}

/* ── Règles de validation ── */
.validation-rules {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rule-item {
  font-size: 13px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color .2s;
}
.rule-item.invalid { color: var(--muted); }
.rule-item.valid   { color: var(--success); font-weight: 600; }

/* ── Loader ── */
#loader {
  display: none;
  text-align: center;
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 20px;
  font-weight: 600;
}

/* ── Pied de page ── */
.footer-text {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}
