/* Variables spécifiques à la page de connexion */
:root {
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-hover: linear-gradient(135deg, var(--secondary-color) 0%, var(--text-color) 100%);
    --glass-background: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.25);
    --box-shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.1);
    --box-shadow-strong: 0 8px 32px rgba(31, 41, 55, 0.2);
}

/* Style de base de la page */
.auth-page {
    background: var(--gradient-primary);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 80px;
}

/* Animation du fond */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Navigation */
.auth-page nav {
    background: var(--glass-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.auth-page .logo {
    transition: transform 0.3s ease;
}

.auth-page .logo:hover {
    transform: scale(1.05);
}

.auth-page .logo img {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Container d'authentification */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Effet de particules en arrière-plan */
.auth-container::before,
.auth-container::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite;
    z-index: 0;
}

.auth-container::before {
    top: -150px;
    right: -150px;
}

.auth-container::after {
    bottom: -150px;
    left: -150px;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(100px, 100px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* Boîte d'authentification */
.auth-box {
    background: var(--glass-background);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--box-shadow-soft);
    padding: 3rem;
    width: 100%;
    max-width: 550px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.auth-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-strong);
}

/* En-tête des onglets */
.auth-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light-text);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.auth-tab.active {
    color: var(--primary-color);
}

.auth-tab.active::before {
    transform: scaleX(1);
}

.auth-tab:hover {
    color: #2563eb;
}

/* Formulaires */
.auth-form {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.auth-form.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    font-size: 1.1rem;
    color: #6B7280;
    margin-bottom: 2.5rem;
}

/* Style amélioré pour le champ de mot de passe */
.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 3rem !important;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    color: var(--light-text);
    cursor: pointer;
    z-index: 5;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle:focus {
    outline: none;
    box-shadow: none;
}

.password-toggle i {
    font-size: 1.1rem;
}

/* Champs de formulaire */
.form-floating {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem 1rem 1.2rem 3rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background-color: white;
}

.form-floating label {
    padding-left: 3rem;
    color: #6B7280;
}

.form-floating label i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6B7280;
    transition: all 0.3s ease;
}

.form-control:focus ~ label i {
    color: #2563eb;
}

/* Bouton de soumission */
.btn-auth-submit {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-soft);
}

.btn-auth-submit:active {
    transform: translateY(0);
}

.btn-auth-submit span {
    position: relative;
    z-index: 1;
}

/* Checkbox personnalisée */
.form-check {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin-left: -2rem;
    border: 2px solid #E5E7EB;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

.form-check-label {
    color: #6B7280;
    cursor: pointer;
}

/* Liens */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-links a:hover {
    color: #1E40AF;
    text-decoration: underline;
}

/* Messages d'alerte */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
}

.alert-danger {
    background-color: #FEE2E2;
    color: #DC2626;
}

.alert-danger::before {
    background-color: #DC2626;
}

.alert-success {
    background-color: #DCFCE7;
    color: #16A34A;
}

.alert-success::before {
    background-color: #16A34A;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-box {
        padding: 2rem;
        margin: 1rem;
    }

    .auth-form h2 {
        font-size: 1.8rem;
    }

    .auth-subtitle {
        font-size: 1rem;
    }

    .form-control {
        font-size: 0.9rem;
    }

    .btn-auth-submit {
        padding: 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 1.5rem;
    }

    .auth-tab {
        font-size: 0.9rem;
        padding: 0.8rem;
    }

    .auth-form h2 {
        font-size: 1.5rem;
    }
}
