/* auth.css - pages d'authentification serveur Prépavogt Alumni.
 * Coquille 2 colonnes : panneau de marque (gauche) + formulaire (droite).
 * Palette alignée sur la marque PVA (Django green #0f6240). */

:root {
    --pva-primary: #0f6240;
    --pva-primary-hover: #0c4b33;
    --pva-primary-light: #e6f4ef;
    --pva-text: #0f172a;
    --pva-muted: #64748b;
    --pva-border: #e5e7eb;
    --pva-bg: #f8fafc;
    --pva-danger-bg: #fef2f2;
    --pva-danger-fg: #b91c1c;
    --pva-danger-border: #fecaca;
    --pva-radius: 12px;
    --pva-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body.auth-body {
    margin: 0;
    font-family: var(--pva-font);
    color: var(--pva-text);
    background: var(--pva-bg);
}

/* ── Coquille 2 colonnes ─────────────────────────────────────────────────── */
.auth-shell {
    display: grid;
    grid-template-columns: 45% 55%;
    min-height: 100vh;
}

/* Colonne gauche - marque */
.auth-aside {
    background: linear-gradient(160deg, #0c4b33 0%, #0f6240 60%, #147a50 100%);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 3rem;
}
.auth-aside__inner { max-width: 420px; }
.auth-brand {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.auth-brand span { color: #a7e6c9; }
.auth-aside__title {
    margin: 2rem 0 0.75rem;
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 700;
}
.auth-aside__text {
    margin: 0;
    color: #d6f0e3;
    font-size: 1.05rem;
    line-height: 1.6;
}
.auth-aside__foot {
    margin: 3rem 0 0;
    font-size: 0.85rem;
    color: #a7e6c9;
}

/* Colonne droite - formulaire */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--pva-bg);
}
.auth-card {
    width: 100%;
    max-width: 400px;
}
.auth-back {
    display: inline-block;
    color: var(--pva-muted);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}
.auth-back:hover { color: var(--pva-primary); }
.auth-card__title {
    margin: 0 0 0.4rem;
    font-size: 1.75rem;
    color: var(--pva-text);
}
.auth-card__subtitle {
    margin: 0 0 1.75rem;
    color: var(--pva-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ── Champs ──────────────────────────────────────────────────────────────── */
.auth-field { margin-bottom: 1.1rem; position: relative; }
.auth-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pva-text);
}
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"] {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font-size: 1rem;
    color: var(--pva-text);
    background: #fff;
    border: 1px solid var(--pva-border);
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-field input:focus {
    outline: none;
    border-color: var(--pva-primary);
    box-shadow: 0 0 0 3px rgba(15, 98, 64, 0.15);
}
.auth-field--password input { padding-right: 2.75rem; }
.auth-field__toggle {
    position: absolute;
    right: 0.5rem;
    bottom: 0.55rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    padding: 0.25rem;
    opacity: 0.6;
}
.auth-field__toggle:hover { opacity: 1; }
.auth-field__error {
    margin: 0.35rem 0 0;
    color: var(--pva-danger-fg);
    font-size: 0.82rem;
}

/* ── Liens / cases ──────────────────────────────────────────────────────── */
.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.25rem 0 1.4rem;
    font-size: 0.88rem;
}
.auth-links a { color: var(--pva-primary); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-check { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--pva-muted); }

/* ── Bouton ─────────────────────────────────────────────────────────────── */
.auth-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--pva-primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease;
}
.auth-btn:hover { background: var(--pva-primary-hover); transform: translateY(-1px); }

/* ── Alertes / notices ──────────────────────────────────────────────────── */
.auth-alert {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--pva-danger-bg);
    color: var(--pva-danger-fg);
    border: 1px solid var(--pva-danger-border);
    border-radius: 8px;
    font-size: 0.9rem;
}
.auth-notice {
    padding: 0.9rem 1rem;
    background: var(--pva-primary-light);
    color: var(--pva-primary-hover);
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.auth-footer {
    margin: 1.5rem 0 0;
    text-align: center;
    font-size: 0.88rem;
    color: var(--pva-muted);
}
.auth-footer a { color: var(--pva-primary); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-panel { min-height: 100vh; }
}
