/* ==================== RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== ROOT VARIABLES ==================== */
:root {
    --primary-blue: #4A90E2;
    --primary-purple: #9B59B6;
    --primary-gold: #F39C12;
    --primary-red: #E74C3C;
    
    --blue-light: #E8F4FD;
    --purple-light: #F4ECFA;
    --gold-light: #FEF5E7;
    
    --text-dark: #2C3E50;
    --text-medium: #5D6D7E;
    --text-light: #95A5A6;
    --border-color: #E1E8ED;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    
    --success: #27AE60;
    --error: #E74C3C;
    
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    
    --font: 'Inter', -apple-system, sans-serif;
}

/* ==================== BASE STYLES ==================== */
body {
    font-family: var(--font);
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    text-decoration: underline;
}

/* ==================== LAYOUT ==================== */
.login-wrapper {
    display: grid;
    grid-template-columns: 45% 55%;
    min-height: 100vh;
}

/* ==================== BRAND SIDE ==================== */
.brand-side {
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--purple-light) 100%);
    padding: 2rem 3rem;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 100px!important;
    
}

.brand-content {
    max-width: 560px;
    margin-top: 0;
    padding-top: 0;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 2.5rem;
    transition: transform 0.3s;
}

.brand-logo:hover {
    transform: translateY(-3px);
    text-decoration: none;
}

.star-icon {
    font-size: 2.5rem;
    color: var(--primary-gold);
}

.brand-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.brand-subtitle {
    font-size: 1.375rem;
    color: var(--text-medium);
    margin-bottom: 3rem;
    line-height: 1.6;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-medium);
}

/* Testimonial */
.testimonial {
    background: white;
    padding: 2rem;
    border-radius: 14px;
    box-shadow: var(--shadow);
    position: relative;
}

.quote {
    font-size: 4rem;
    color: var(--primary-blue);
    opacity: 0.1;
    position: absolute;
    top: 10px;
    left: 15px;
    line-height: 1;
}

.quote-text {
    font-size: 1.125rem;
    color: var(--text-medium);
    font-style: italic;
    margin-bottom: 1.25rem;
    position: relative;
    line-height: 1.6;
}

.author {
    display: flex;
    flex-direction: column;
}

.author strong {
    font-size: 1.0625rem;
    color: var(--text-dark);
    font-weight: 700;
}

.author span {
    font-size: 0.9375rem;
    color: var(--text-light);
}

/* ==================== FORM SIDE ==================== */
.form-side {
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    overflow-y: auto;
    padding-top: 100px!important;
    
}

.form-wrapper {
    width: 100%;
    max-width: 480px;
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.form-header p {
    font-size: 1.25rem;
    color: var(--text-medium);
}

/* ==================== MESSAGES ==================== */
.message {
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.125rem;
    font-weight: 500;
}

.message-icon {
    font-size: 1.5rem;
    font-weight: 700;
}

.error-message {
    background: #FDECEA;
    color: var(--error);
    border: 2px solid var(--error);
}

.success-message {
    background: #D4EDDA;
    color: var(--success);
    border: 2px solid var(--success);
}

/* ==================== SOCIAL BUTTONS ==================== */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

.social-btn:hover {
    border-color: var(--text-medium);
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}

/* ==================== SEPARATOR ==================== */
.separator {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.separator::before,
.separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: var(--border-color);
}

.separator::before {
    left: 0;
}

.separator::after {
    right: 0;
}

.separator span {
    background: var(--bg-white);
    padding: 0 1.25rem;
    color: var(--text-light);
    font-size: 1.0625rem;
    position: relative;
    font-weight: 500;
}

/* ==================== FORM ==================== */
#loginForm {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.input-group label {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.input-group input {
    padding: 1.125rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1.125rem;
    font-family: var(--font);
    transition: all 0.3s;
    background: var(--bg-white);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

.input-group input::placeholder {
    color: var(--text-light);
}

/* ==================== PASSWORD INPUT ==================== */
.password-input {
    position: relative;
}

.password-input input {
    width: 100%;
    padding-right: 3.5rem;
}

.toggle-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 0 1rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.toggle-btn:hover {
    color: var(--primary-blue);
}

.toggle-btn.active {
    color: var(--primary-blue);
}

/* ==================== FORM OPTIONS ==================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -0.5rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    appearance: none;
    background: var(--bg-white);
    transition: all 0.3s;
    flex-shrink: 0;
}

.checkbox-group input[type="checkbox"]:checked {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.checkbox-group input[type="checkbox"]:hover {
    border-color: var(--primary-blue);
}

.checkbox-group label {
    font-size: 1.0625rem;
    color: var(--text-medium);
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

.forgot-link {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ==================== SUBMIT BUTTON ==================== */
.submit-btn {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: white;
    padding: 1.375rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-family: var(--font);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ==================== FORM FOOTER ==================== */
.form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.form-footer p {
    font-size: 1.125rem;
    color: var(--text-medium);
}

.form-footer a {
    font-weight: 600;
}

/* ==================== TRUST BADGES ==================== */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text-medium);
    font-size: 1rem;
}

.trust-badge svg {
    color: var(--success);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
/*     .login-wrapper { */
/*         grid-template-columns: 1fr; */
/*     } */
    
/*     .form-side { */
/*         padding: 2rem 1.5rem; */
/*     } */
    
    
    .login-wrapper {
        grid-template-columns: 1fr;
        /* On s'assure que le contenu est centré horizontalement dans la grille */
        display: grid; 
        justify-items: center; 
    }

    .form-side {
        padding: 3rem 2rem; /* Augmentation du padding pour plus d'espace interne */
        width: 100%;
        max-width: 600px;  /* Définit une largeur maximale plus confortable */
        margin: 0 auto;    /* Centre le bloc si le parent est plus large */
    }
	.brand-side {
		display: none;
	}
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }
    
    .form-wrapper {
        max-width: 100%;
    }
    
    .form-header h2 {
        font-size: 2rem;
    }
    
    .form-header p {
        font-size: 1.125rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .trust-badges {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-wrapper {
    animation: fadeInUp 0.6s ease-out;
}

.brand-content {
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}