:root {
    --primary-color: #17a2b8;
    --primary-dark: #138496;
    --primary-light: #5dccdd;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.login-container {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    width: 900px;
    max-width: 95%;
    min-height: 500px;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.login-container:hover {
    box-shadow: var(--shadow-hover);
}

.left-side {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
}

.left-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.left-side .logo-container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.left-side .logo-container img {
    width: 200px;
    max-width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.left-side .logo-container img:hover {
    opacity: 1;
    transform: scale(1.05);
}

.right-side {
    background: var(--white);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
}

.btn-action-login {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-action-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-action-login:hover::before {
    left: 100%;
}

.btn-action-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(23, 162, 184, 0.3);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

.btn-action-login:active {
    transform: translateY(0);
}

.btn-action-login:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        width: 95%;
        min-height: auto;
        margin: 1rem auto;
    }
    
    .left-side {
        display: none;
    }
    
    .right-side {
        padding: 2rem 1.5rem;
    }
    
    .login-header h2 {
        font-size: 1.75rem;
    }
    
    .form-input {
        padding: 0.9rem 0.9rem 0.9rem 3rem;
        font-size: 0.95rem;
    }
    
    .input-icon {
        left: 0.9rem;
        font-size: 1rem;
    }
    
    .btn-action-login {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .right-side {
        padding: 1.5rem 1rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .form-input {
        padding: 0.8rem 0.8rem 0.8rem 2.5rem;
    }
    
    .input-icon {
        left: 0.8rem;
        font-size: 0.9rem;
    }
}

/* Animation pour le chargement */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container {
    animation: fadeInUp 0.6s ease-out;
}

.form-group {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

/* Utilitaires */
.text-center { text-align: center; }
.mb-3 { margin-bottom: 1rem; }
.w-100 { width: 100%; }

/* Form Styling */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 400;
    background-color: var(--light-gray);
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
    padding: 1rem;
    line-height: 1.6;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
    transition: all 0.3s ease;
}

.form-input:focus::placeholder {
    opacity: 0.7;
    transform: translateX(5px);
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 2;
}

.form-group:focus-within .input-icon {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

/* Checkbox Styling */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.custom-checkbox {
    position: relative;
    margin-right: 0.75rem;
}

.custom-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: var(--light-gray);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark:after {
    display: block;
}

.checkbox-label {
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 400;
    cursor: pointer;
    user-select: none;
}

/* Links */
.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}