@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:opsz,wght@6..12,300;6..12,400;6..12,500;6..12,600;6..12,700&display=swap');

/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
    font-family: "Nunito Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
    background: #fafafa;
    color: #18181b;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

/* ─── Tokens ─────────────────────────────────────────── */
:root {
    --accent:       #5b5bd6;
    --accent-hover: #4a4ab8;
    --accent-light: #efeffd;
    --text:         #18181b;
    --text-soft:    #3f3f46;
    --muted:        #71717a;
    --faint:        #a1a1aa;
    --border:       #e4e4e7;
    --white:        #ffffff;
}

/* ═══════════════════════════════════════════════════════
   WRAP — carte centrale
   ═══════════════════════════════════════════════════════ */
.auth-wrap {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ─── Logo ───────────────────────────────────────────── */
.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.auth-logo svg { width: 36px; height: 36px; }

/* ─── En-tête ────────────────────────────────────────── */
.auth-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}
.auth-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.03em;
}
.auth-subtitle {
    font-size: .9rem;
    color: var(--muted);
}

/* ─── Erreurs inline ─────────────────────────────────── */
.auth-field.has-error input {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248,113,113,0.12);
}
.auth-field-error {
    font-size: .78rem;
    color: #dc2626;
    font-weight: 500;
    margin-top: 2px;
}

/* ─── Formulaire ─────────────────────────────────────── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.auth-field label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-soft);
}
.auth-field input {
    width: 100%;
    padding: 11px 14px;
    font-family: inherit;
    font-size: .95rem;
    color: var(--text);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}
.auth-field input::placeholder { color: var(--faint); font-weight: 400; }
.auth-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(91,91,214,0.09);
}

.auth-names {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-submit {
    width: 100%;
    padding: 13px;
    background: var(--accent);
    color: #fff;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background .18s;
    margin-top: 4px;
}
.auth-submit:hover  { background: var(--accent-hover); }
.auth-submit:active { opacity: .9; }

/* ─── Lien mot de passe oublié ───────────────────────── */
.auth-forgot {
    text-align: center;
    font-size: .85rem;
    color: var(--muted);
    text-decoration: none;
    transition: color .15s;
}
.auth-forgot:hover { color: var(--text); }

/* ─── Séparateur ─────────────────────────────────────── */
.auth-sep {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--faint);
    font-size: .8rem;
}
.auth-sep::before,
.auth-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ─── Lien secondaire ────────────────────────────────── */
.auth-alt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.auth-alt-text {
    font-size: .875rem;
    color: var(--muted);
}
.auth-alt-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--white);
    color: var(--text);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: border-color .15s, background .15s;
}
.auth-alt-btn:hover { border-color: #c4c4f4; background: var(--accent-light); }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 480px) {
    body { padding: 24px 16px; align-items: flex-start; padding-top: 48px; }
}
