:root {
  --bg: #f1f3f6;
  --card: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #fffc00;
  --accent-ink: #111;
  --ok: #15803d;
  --err: #b91c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  margin-bottom: 14px;
}

h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 6px;
}

.subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.login-form { display: flex; flex-direction: column; }

label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

input, textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  resize: vertical;
}

input:focus, textarea:focus {
  border-color: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.25);
}

.btn-connexion {
  border: none;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity .15s, transform .05s;
}

.btn-connexion:hover { opacity: .9; }
.btn-connexion:active { transform: translateY(1px); }
.btn-connexion:disabled { opacity: .55; cursor: not-allowed; }

.auth-msg {
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 600;
  min-height: 20px;
}

.auth-msg.ok { color: var(--ok); }
.auth-msg.err { color: var(--err); }

.success {
  text-align: center;
  padding: 18px 0 8px;
}

.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--ok);
  margin-bottom: 18px;
  box-shadow: 0 8px 20px rgba(21, 128, 61, 0.35);
  animation: pop .3s ease-out;
}

.success h1 { margin: 0; }

@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f1a;
    --card: #141a26;
    --ink: #f3f4f6;
    --muted: #9ca3af;
    --border: #273040;
  }
  .btn-connexion { background: var(--accent); color: var(--accent-ink); }
}
