/* auth.css - Design "Premium SaaS" (Scrollable + Google First) */

:root {
    --brand-primary: #007bff;
    --brand-dark: #0056b3;
    --text-main: #111827;
    --text-muted: #6b7280;
    --bg-input: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

body {
    margin: 0;
    padding: 20px; /* Espace pour le scroll sur mobile */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh; /* Permet le scroll si l'écran est petit */
    display: flex;
    align-items: center;
    justify-content: center;
    /* On autorise le scroll vertical, mais on cache l'horizontal */
    overflow-x: hidden; 
    overflow-y: auto; 
    position: relative;
    background-color: #f3f4f6;
    color: var(--text-main);
    /* Fond fixe */
    background: radial-gradient(circle at 0% 0%, #eef2ff 0%, #ffffff 50%, #f0f9ff 100%) fixed;
}

/* --- FOND VIBRANT (Mesh Gradient) --- */
body::before, body::after {
    content: '';
    position: fixed; /* Fixe pour ne pas bouger au scroll */
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.8;
    pointer-events: none;
}

/* Forme Bleu/Violet */
body::before {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #a5b4fc, #6366f1);
    top: -150px;
    left: -150px;
    animation: float 10s infinite alternate;
}

/* Forme Cyan/Bleu */
body::after {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #67e8f9, #3b82f6);
    bottom: -100px;
    right: -100px;
    animation: float 8s infinite alternate-reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, 40px) scale(1.05); }
}

/* --- Conteneur Principal --- */
.auth-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 10;
    margin: auto; /* Centrage lors du scroll */
}

/* --- Header --- */
.auth-header {
    text-align: center;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-logo {
    display: block;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
    background-color: transparent;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-main);
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* --- Bouton Google (Remonté) --- */
.btn-google {
    width: 100%;
    background-color: white;
    color: #1f2937;
    border: 1px solid var(--border-color);
    font-weight: 500;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px;
    transition: background 0.2s;
    margin-bottom: 0; /* Ajusté */
}
.btn-google:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

/* Séparateur */
.auth-separator {
    display: flex; align-items: center; text-align: center; margin: 20px 0; color: #9ca3af; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
}
.auth-separator::before, .auth-separator::after {
    content: ''; flex: 1; border-bottom: 1px solid #e5e7eb;
}
.auth-separator span { padding: 0 10px; }

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.forgot-link {
    font-size: 12px;
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}
.forgot-link:hover { text-decoration: underline; }

.form-group input {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    background-color: var(--bg-input);
    color: var(--text-main);
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.checkbox-group input {
    accent-color: var(--brand-primary);
    width: 16px; height: 16px; cursor: pointer;
}
.checkbox-group label {
    font-size: 13px; color: var(--text-muted); cursor: pointer;
}

.btn-auth {
    background-color: var(--brand-primary);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn-auth:hover {
    background-color: var(--brand-dark);
}

/* Footer */
.auth-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}
.auth-footer a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
}

/* Alertes */
.auth-alert {
    padding: 10px; border-radius: 6px; font-size: 13px; margin-bottom: 20px; display: none;
}
.auth-alert.error { background-color: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alert.success { background-color: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }