/* ============================================================
   HUMANIS STUDIO — Login Page Styles
   Direction artistique : Linear / Vercel dark mode
   Version : 2.0 — 2026
   ============================================================ */

/* ============================================================
   IMPORT — Police Inter
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #09090b;
    color: #fafafa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ============================================================
   VARIABLES LOCALES
   ============================================================ */
:root {
    --lc-bg:          #09090b;
    --lc-surface:     #111113;
    --lc-elevated:    #18181b;
    --lc-border:      #27272a;
    --lc-text:        #fafafa;
    --lc-secondary:   #a1a1aa;
    --lc-muted:       #52525b;
    --lc-accent:      #8b5cf6;
    --lc-accent-h:    #7c3aed;
    --lc-accent-glow: rgba(139, 92, 246, 0.18);
    --lc-danger:      #f87171;
    --lc-radius:      7px;
    --lc-t:           0.15s ease;
}

/* ============================================================
   LAYOUT — Centré, fond quasi-noir
   ============================================================ */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px 16px;
}

.login-inner {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ============================================================
   BRAND — Logo + nom + sous-titre
   ============================================================ */
.login-brand {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Logo H SVG */
.login-brand-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.login-brand-logo svg {
    width: 40px;
    height: 40px;
    fill: #ffffff;
}

/* Nom HUMANIS */
.login-brand-name {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

/* Studio */
.login-brand-studio {
    font-size: 13px;
    color: var(--lc-muted);
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* ============================================================
   CARD — Formulaire de connexion
   ============================================================ */
.login-card {
    background: var(--lc-surface);
    border: 1px solid var(--lc-border);
    border-radius: 12px;
    padding: 32px;
}

.login-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--lc-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ============================================================
   ALERTES — dark inline
   ============================================================ */
.alert {
    padding: 11px 14px;
    border-radius: var(--lc-radius);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    line-height: 1.5;
}

.alert svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert--error {
    background: rgba(248, 113, 113, 0.10);
    color: var(--lc-danger);
    border-color: rgba(248, 113, 113, 0.25);
}

.alert--success {
    background: rgba(34, 197, 94, 0.08);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.2);
}

/* ============================================================
   FORMULAIRE
   ============================================================ */
.login-form {
    display: flex;
    flex-direction: column;
}

/* Groupe champ */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

/* Label */
.form-label {
    font-size: 12px;
    font-weight: 600;
    color: #71717a; /* zinc-500 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

/* Input */
.form-input {
    width: 100%;
    padding: 10px 13px;
    font-size: 14px;
    font-family: inherit;
    color: #ffffff;
    background: var(--lc-elevated);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius);
    outline: none;
    transition: border-color var(--lc-t), box-shadow var(--lc-t);
    line-height: 1.5;
}

.form-input::placeholder {
    color: var(--lc-muted);
}

.form-input:focus {
    border-color: var(--lc-accent);
    box-shadow: 0 0 0 3px var(--lc-accent-glow);
}

.form-input:hover:not(:focus) {
    border-color: #3f3f46;
}

/* Champ mot de passe — espace pour l'oeil */
.form-input--pw {
    padding-right: 44px;
}

/* Wrapper relatif pour input + bouton oeil */
.input-pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-pw-wrap .form-input {
    flex: 1;
}

/* Bouton toggle affichage mot de passe */
.btn-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #71717a; /* zinc-500 */
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--lc-t);
    z-index: 1;
}

.btn-toggle-pw:hover {
    color: var(--lc-accent);
}

.btn-toggle-pw svg {
    width: 17px;
    height: 17px;
}

/* ============================================================
   REMEMBER ME — checkbox custom violet
   ============================================================ */
.form-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}

/* Checkbox native cachée */
.form-remember input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border: 1.5px solid var(--lc-border);
    border-radius: 3px;
    background: var(--lc-elevated);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color var(--lc-t), background var(--lc-t), box-shadow var(--lc-t);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-remember input[type="checkbox"]:checked {
    background: var(--lc-accent);
    border-color: var(--lc-accent);
}

.form-remember input[type="checkbox"]:checked::after {
    content: '';
    display: block;
    width: 4px;
    height: 7px;
    border: 1.5px solid #ffffff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
    margin-left: 1px;
}

.form-remember input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 3px var(--lc-accent-glow);
}

.form-remember-label {
    font-size: 13px;
    color: #a1a1aa; /* zinc-400 */
    line-height: 1;
}

/* ============================================================
   BOUTON SUBMIT
   ============================================================ */
.btn-submit {
    width: 100%;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
    background: var(--lc-accent);
    border: none;
    border-radius: var(--lc-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background var(--lc-t), transform 0.1s ease, box-shadow var(--lc-t);
    letter-spacing: -0.01em;
    margin-top: 8px;
    position: relative;
}

.btn-submit:hover:not(:disabled) {
    background: var(--lc-accent-h);
    box-shadow: 0 0 0 3px var(--lc-accent-glow);
}

.btn-submit:active:not(:disabled) {
    transform: scale(0.99);
}

.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Spinner blanc dans le bouton */
.btn-submit .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
    flex-shrink: 0;
}

/* État loading */
.btn-submit.loading .spinner { display: block; }
.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading { cursor: wait; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   VERSION — bas de page
   ============================================================ */
.login-version {
    font-size: 12px;
    color: var(--lc-muted);
    text-align: center;
    margin-top: 16px;
    letter-spacing: 0.01em;
}

/* ============================================================
   RESPONSIVE — Mobile : compact, sans marges
   ============================================================ */
@media (max-width: 480px) {

    .login-wrap {
        align-items: flex-start;
        padding: 32px 16px;
    }

    .login-inner {
        gap: 24px;
    }

    .login-card {
        padding: 24px 20px;
    }

    .login-title {
        font-size: 18px;
    }

    .login-brand-name {
        font-size: 16px;
    }
}

/* ============================================================
   FIN — HUMANIS STUDIO login.css v2.0
   ============================================================ */
