:root {
    --bg-dark: #07090f;
    --bg-light: #f8fafc;
    --accent: #6366f1;
    --accent2: #8b5cf6;
    --card-dark: #111827; /* Solid dark blue as seen in screenshots */
    --card-light: #ffffff;
    --border-dark: rgba(255, 255, 255, 0.08);
    --border-light: rgba(15, 23, 42, 0.08);
    --text-dark: #ffffff;
    --text-light: #1e293b;
    --muted-dark: #94a3b8;
    --muted-light: #64748b;
    --radius: 24px;
    --input-bg-dark: #1f2937;
    --input-bg-light: #f1f5f9;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    --bg: var(--bg-dark);
    --card: var(--card-dark);
    --border: var(--border-dark);
    --text: var(--text-dark);
    --muted: var(--muted-dark);
    --input-bg: var(--input-bg-dark);
    
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

body.light-mode {
    --bg: var(--bg-light);
    --card: var(--card-light);
    --border: var(--border-light);
    --text: var(--text-light);
    --muted: var(--muted-light);
    --input-bg: var(--input-bg-light);
    color-scheme: light;
}

/* Fixed background - doesn't interfere with flex */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background: var(--bg);
}

/* Clean, visible blobs */
.blob {
    position: absolute;
    width: 60vh;
    height: 60vh;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}
.blob-1 { top: -10%; left: -5%; background: var(--accent); }
.blob-2 { bottom: -10%; right: -5%; background: var(--accent2); }

.login-wrap {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

/* Static, centered logo */
.brand {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 40px; /* Plus d'espace en haut */
    width: 100%;
}

.brand-logo {
    width: 180px; /* Logo un peu plus grand */
    height: auto;
    display: inline-block;
}

/* Theme Toggle Button Style */
.theme-toggle-login {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
    outline: none;
}

body.light-mode .theme-toggle-login {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.theme-toggle-login:hover {
    transform: scale(1.05);
}

.card {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.card-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-align: center;
    color: var(--text);
}

.card-sub {
    color: var(--muted);
    font-size: 0.95rem;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.5;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    width: 100%;
}

label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text);
    opacity: 0.8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-wrap {
    position: relative;
    width: 100%;
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background-color: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus, select:focus, input:active, select:active {
    border-color: var(--accent);
    background-color: var(--input-bg);
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    width: 18px;
    height: 18px;
}

/* Dropdown fix */
select option {
    background-color: var(--card-dark);
    color: #fff;
}
select:-webkit-autofill,
select:-webkit-autofill:hover, 
select:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0px 1000px var(--input-bg) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Buttons */
.btn-login {
    width: 100%;
    padding: 15px;
    background: #6366f1; /* Solid primary color */
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.1s, opacity 0.2s;
}

.btn-login:hover { opacity: 0.9; }
.btn-login:active { transform: scale(0.98); }

.error-banner {
    display: none;
    align-items: center;
    gap: 10px;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text);
}

.error-banner.show { display: flex; }

.card-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
}

.link-highlight {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

/* Hide toggle mdp button */
.toggle-pw {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
}
