/* Variables CSS pour les couleurs Netflix */
:root {
    --netflix-red: #E50914;
    --netflix-dark-red: #B20710;
    --netflix-black: #000000;
    --netflix-dark-gray: #141414;
    --netflix-white: #FFFFFF;
    --netflix-gray: #808080;
    --netflix-light-gray: #333333;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--netflix-black) 0%, var(--netflix-dark-gray) 100%);
    color: var(--netflix-white);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container principal */
.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

/* Carte d'authentification */
.auth-card {
    background: rgba(20, 20, 20, 0.95);
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--netflix-light-gray);
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--netflix-red);
    text-decoration: none;
    display: block;
    margin-bottom: 1rem;
}

.auth-header h2 {
    font-size: 1.5rem;
    color: var(--netflix-white);
    font-weight: 400;
}

/* Onglets */
.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--netflix-light-gray);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: var(--netflix-dark-gray);
    border: none;
    color: var(--netflix-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tab-btn.active {
    background: var(--netflix-red);
    color: var(--netflix-white);
}

.tab-btn:hover:not(.active) {
    background: var(--netflix-light-gray);
    color: var(--netflix-white);
}

.tab-btn i {
    margin-right: 0.5rem;
}

/* Formulaires */
.auth-form {
    display: none;
    margin-bottom: 2rem;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--netflix-white);
    font-size: 0.9rem;
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--netflix-red);
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: var(--netflix-light-gray);
    border: 1px solid var(--netflix-gray);
    border-radius: 5px;
    color: var(--netflix-white);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--netflix-red);
}

.form-group input::placeholder {
    color: var(--netflix-gray);
}

/* Input mot de passe */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--netflix-gray);
    cursor: pointer;
    font-size: 1rem;
}

.password-toggle:hover {
    color: var(--netflix-white);
}

/* Options du formulaire */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--netflix-gray);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    background: var(--netflix-light-gray);
    border: 1px solid var(--netflix-gray);
    border-radius: 3px;
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--netflix-red);
    border-color: var(--netflix-red);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--netflix-white);
    font-size: 0.8rem;
}

.forgot-password {
    color: var(--netflix-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--netflix-dark-red);
}

/* Styles pour le champ avatar */
.form-help {
    display: block;
    color: var(--netflix-gray);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-style: italic;
}

.form-group input[type="url"] {
    font-family: inherit;
}

/* Bouton d'authentification */
.auth-btn {
    width: 100%;
    padding: 1rem;
    background: var(--netflix-red);
    color: var(--netflix-white);
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 1rem;
}

.auth-btn:hover {
    background: var(--netflix-dark-red);
}

.auth-btn i {
    margin-right: 0.5rem;
}

/* Connexion sociale */
.social-auth {
    margin-top: 2rem;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: var(--netflix-gray);
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: var(--netflix-light-gray);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: rgba(20, 20, 20, 0.95);
    padding: 0 1rem;
}

.social-buttons {
    display: flex;
    gap: 1rem;
}

.social-btn {
    flex: 1;
    padding: 1rem;
    border: 1px solid var(--netflix-light-gray);
    border-radius: 5px;
    background: var(--netflix-dark-gray);
    color: var(--netflix-white);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-btn:hover {
    background: var(--netflix-light-gray);
    transform: translateY(-2px);
}

.social-btn.discord {
    border-color: #7289DA;
}

.social-btn.discord:hover {
    background: #7289DA;
}

.social-btn.google {
    border-color: #DB4437;
}

.social-btn.google:hover {
    background: #DB4437;
}

.social-btn i {
    margin-right: 0.5rem;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--netflix-light-gray);
    color: var(--netflix-gray);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--netflix-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--netflix-dark-red);
}

/* Liens dans les formulaires */
.terms-link {
    color: var(--netflix-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: var(--netflix-dark-red);
}

/* Messages d'erreur */
.error-message {
    background: rgba(229, 9, 20, 0.1);
    border: 1px solid var(--netflix-red);
    color: var(--netflix-red);
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Messages de succès */
.success-message {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00FF00;
    color: #00FF00;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Animation de chargement */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--netflix-red);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem;
    }
    
    .auth-header h2 {
        font-size: 1.3rem;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-header .logo {
        font-size: 1.5rem;
    }
    
    .auth-header h2 {
        font-size: 1.2rem;
    }
    
    .tab-btn {
        padding: 0.8rem;
        font-size: 0.8rem;
    }
    
    .form-group input {
        padding: 0.8rem;
    }
    
    .auth-btn {
        padding: 0.8rem;
    }
}
