/* ===============================
   RESET & BOX MODEL
================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    font-family: 'Nunito Sans', sans-serif;
    background: linear-gradient(135deg, #F8FAFC 0%, #E8F5E9 100%);
    min-height: 100vh;
}

/* ===============================
   CONTAINER
================================ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ===============================
   CARD
================================ */
.auth-card {
    display: flex;
    width: 100%;
    max-width: 1200px;
    background: #FFFFFF;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(17, 157, 12, 0.15);
}

/* ===============================
   LEFT BRANDING
================================ */
.auth-branding {
    flex: 1;
    background: linear-gradient(145deg, #0d7409 0%, #119d0c 100%);
    color: #FFFFFF;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    min-width: 400px;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.2;
    transform: rotate(15deg);
}

.brand-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.brand-header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 40px;
}

.brand-features {
    list-style: none;
    margin: 40px 0;
}

.brand-features li {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    color: white;
    font-size: 15px;
}

.brand-features i {
    background: rgba(255, 255, 255, 0.15);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 16px;
}

.brand-footer {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ===============================
   RIGHT FORM
================================ */
.auth-form-section {
    flex: 1.2;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    min-width: 500px;
}

/* HEADER */
.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.auth-title h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1A1F2C;
    margin-bottom: 8px;
}

.auth-title p {
    color: #718096;
    font-size: 15px;
}

/* ===============================
   LANGUAGE DROPDOWN HARMONISÉ
================================ */
.language-selector {
    position: relative;
}

.lang-toggle {
    background: none;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    padding: 8px 16px;
    font-weight: 600;
    color: #4A5568;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-toggle:hover {
    border-color: #119d0c;
    color: #119d0c;
    background: #E8F5E9;
}

.lang-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.lang-toggle:hover i {
    transform: translateY(2px);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 10px 0;
    min-width: 140px;
    z-index: 1000;
    display: none;
    animation: dropdownFadeIn 0.2s ease-out;
    margin-top: 8px;
}

.lang-dropdown.show {
    display: block;
}

.lang-dropdown a {
    display: block;
    padding: 10px 20px;
    color: #4A5568;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.lang-dropdown a:hover {
    background: #E8F5E9;
    color: #119d0c;
}

/* Animation Dropdown */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================
   FORM
================================ */
.auth-form {
    width: 100%;
    flex-grow: 1;
}

.form-group {
    margin-bottom: 28px;
}

.form-label {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: #1A1F2C;
}

.form-input-container {
    position: relative;
}

.form-input {
    width: 100%;
    height: 56px;
    padding: 16px 20px 16px 52px;
    border-radius: 12px;
    border: 2px solid #E2E8F0;
    font-size: 16px;
    font-family: 'Nunito Sans', sans-serif;
    transition: all 0.3s ease;
    background: #F8FAFC;
}

.form-input:focus {
    outline: none;
    border-color: #119d0c;
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(17, 157, 12, 0.15);
}

.form-input.error {
    border-color: #E53E3E;
    background-color: rgba(229, 62, 62, 0.05);
}

.form-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #119d0c;
    font-size: 18px;
}

/* ===============================
   BUTTON
================================ */
.submit-btn {
    width: 100%;
    height: 56px;
    background: linear-gradient(to right, #119d0c, #18c512);
    border: none;
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(17, 157, 12, 0.25);
}

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

/* ===============================
   ERROR & SUCCESS MESSAGES
================================ */
.error-message {
    color: #E53E3E;
    font-size: 14px;
    margin-top: 8px;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 8px;
}

.success-message {
    background: #C6F6D5;
    color: #22543D;
    padding: 16px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-message i {
    font-size: 18px;
}

/* ===============================
   FOOTER
================================ */
.form-footer {
    margin-top: 25px;
    text-align: center;
}

.form-footer a {
    font-size: 15px;
    color: #119d0c;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-footer a:hover {
    text-decoration: underline;
}

.auth-footer {
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid #E2E8F0;
    text-align: center;
    color: #718096;
    font-size: 14px;
}

/* ===============================
   MOBILE FIXES
================================ */
@media (max-width: 992px) {
    .auth-card {
        flex-direction: column;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .auth-branding,
    .auth-form-section {
        min-width: 100%;
    }
    
    .auth-branding {
        padding: 40px 30px;
    }
    
    .auth-form-section {
        padding: 40px 30px;
    }
    
    .language-selector {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 20px;
        align-self: flex-end;
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-branding,
    .auth-form-section {
        padding: 30px 20px;
    }
    
    .auth-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 30px;
    }
    
    .language-selector {
        margin-top: 20px;
        align-self: flex-end;
    }
    
    .brand-features li {
        font-size: 14px;
    }
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.loading {
    animation: pulse 1.5s infinite;
}