﻿/* ==========================================================================
   FORMULAIRES D'AUTHENTIFICATION
   ========================================================================== */

/* Conteneurs principaux */
.main-content {
    max-width: 2000px;
    width: 100%;
    padding: 2rem;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    min-height: 100vh;
    transform: none !important;
    left: auto !important;
}

.inscription-container,
.connexion-container {
    width: 100%;
    max-width: 500px;
    margin: 80px auto;
    background: linear-gradient(45deg, #1a1f2c, #2d3748);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
    padding: 0;
    animation: fadeIn 0.5s ease-in;
}

/* Headers des formulaires */
.inscription-header,
.connexion-header {
    padding: 2rem;
    text-align: center;
    position: relative;
    background: linear-gradient(to right, #1a1f2c, #2a3958);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
}

    .inscription-header h1,
    .connexion-header h1 {
        font-size: 2.2rem;
        font-weight: bold;
        color: #60a5fa;
        margin-bottom: 0.5rem;
        line-height: 1.2;
        text-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
    }

    .inscription-header p,
    .connexion-header p {
        font-size: 1rem;
        color: #e2e8f0;
        line-height: 1.6;
    }

    .inscription-header::after,
    .connexion-header::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg, #2563eb, #60a5fa);
    }

/* Conteneur du formulaire */
.form-container {
    padding: 2rem;
}

/* Groupe de champs */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 600;
        color: #e2e8f0;
    }

    .form-group input {
        width: 100%;
        padding: 0.75rem 1rem;
        border: 1px solid rgba(59, 130, 246, 0.3);
        border-radius: 0.5rem;
        background-color: rgba(30, 41, 59, 0.5);
        color: #e2e8f0;
        font-size: 1rem;
        transition: all 0.3s ease;
    }

        .form-group input:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
        }

    .form-group .input-icon {
        position: absolute;
        right: 12px;
        top: 43px;
        color: rgba(255, 255, 255, 0.5);
        font-size: 1.2rem;
    }

/* "Se souvenir de moi" et lien mot de passe oublié */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .remember-me input {
        accent-color: #2563eb;
        width: 16px;
        height: 16px;
    }

.remember-forgot a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .remember-forgot a:hover {
        color: #93c5fd;
        text-decoration: underline;
    }

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    width: 100%;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
    font-size: 1.125rem;
    padding: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

    .btn-primary:hover {
        background-color: #1d4ed8;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    }

.btn-outline {
    background-color: transparent;
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #60a5fa;
    margin-top: 1rem;
    font-size: 1rem;
}

    .btn-outline:hover {
        background-color: rgba(59, 130, 246, 0.1);
        border-color: rgba(59, 130, 246, 0.8);
    }

/* Séparateur "OU" */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #64748b;
}

    .divider::before,
    .divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    }

    .divider::before {
        margin-right: 1rem;
    }

    .divider::after {
        margin-left: 1rem;
    }

/* Messages de validation et d'erreur */
.validation-message {
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.validation-error {
    color: #ef4444;
}

.error-message {
    background-color: rgba(239, 68, 68, 0.2);
    border-left: 4px solid #ef4444;
    color: #fecaca;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.success-message {
    background-color: rgba(52, 211, 153, 0.2);
    border-left: 4px solid #34d399;
    color: #a7f3d0;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .inscription-container,
    .connexion-container {
        max-width: 90%;
        margin: 40px auto;
    }
}

@media (max-width: 480px) {
    .inscription-container,
    .connexion-container {
        border-radius: 1.5rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .inscription-header h1,
    .connexion-header h1 {
        font-size: 1.75rem;
    }
}
