:root {
    --bg-color: #05050a;
    --panel-bg: rgba(15, 13, 30, 0.9);
    --mauve-base: #9945FF;
    --blue-neon: #00f3ff;
    --text-main: #ffffff;
    --text-muted: #a0aec0;
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.15);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.login-card {
    background: var(--panel-bg);
    border: 1px solid rgba(153, 69, 255, 0.3);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 30px rgba(153, 69, 255, 0.2);
}

.login-card img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 2px solid var(--mauve-base);
    margin-bottom: 1.2rem;
}

.login-card h1 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

.login-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Classe commune pour les boutons d'authentification OAuth */
.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    height: 45px;
    padding: 0 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
}

/* Bouton Google */
.btn-google {
    background-color: #ffffff;
    color: #1f2937;
    border: 1px solid #d1d5db;
    margin-bottom: 0.75rem;
}

.btn-google:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* Bouton Discord */
.btn-discord {
    background-color: #5865f2;
    color: #ffffff;
    border: none;
}

.btn-discord:hover {
    background-color: #4752c4;
}

/* Alignement des icônes SVG dans les boutons */
.btn-auth svg {
    flex-shrink: 0;
}

/* Conteneur pour superposer ou masquer le bouton Google natif */
.google-btn-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 0.75rem;
}

/* Cache l'iframe Google originale tout en permettant l'interaction JS */
#hidden-google-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.01; /* Quasi invisible mais actif */
    z-index: 2;
    overflow: hidden;
    cursor: pointer;
}

#google-btn {
    position: relative;
    z-index: 1;
}

/* Séparateur */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.8rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.divider span {
    padding: 0 0.8rem;
}

/* Formulaire */
.form-group {
    text-align: left;
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--mauve-base);
}

/* Bouton Valider placé juste sous le mot de passe */
.btn-submit {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--mauve-base), #7c3aed);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin-top: 0.8rem;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 0 15px rgba(153, 69, 255, 0.4);
}

.btn-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Option de bascule Inscription / Connexion */
.toggle-mode {
    margin-top: 1.8rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.toggle-link {
    background: none;
    border: none;
    color: var(--blue-neon);
    font-weight: 600;
    cursor: pointer;
    margin-left: 0.4rem;
    font-size: 0.88rem;
    text-decoration: underline;
}

.toggle-link:hover {
    color: #ffffff;
}

.back-link {
    display: inline-block;
    margin-top: 1.2rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}

.back-link:hover { text-decoration: underline; color: var(--text-main); }