/* ==================== LOGIN PAGE ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #E8F2FF, #CBE1FF);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
    overflow: hidden;
    color: #2d3748;
}

::selection {
    background: rgba(28, 134, 194, 0.2);
    color: #1C86C2;
}

/* ==================== CENTRAL CARD ==================== */

.lc-card {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 960px;
    background: #ffffff;
    border-radius: 2.5rem;
    box-shadow: 0 20px 80px -15px rgba(0, 100, 255, 0.15);
    overflow: hidden;
    /* Animation d'apparition */
    opacity: 0;
    transform: translateY(48px) scale(0.95);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.lc-card.mounted {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ==================== LEFT PANEL : LOGO ==================== */

.lc-logo-panel {
    display: none;
    width: 42%;
    background: #FAFAFC;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 32px 48px;
    border-right: 1px solid #f1f5f9;
    /* Animation d'apparition */
    opacity: 0;
    transition: opacity 1s ease-out 0.3s;
}

.lc-card.mounted .lc-logo-panel {
    opacity: 1;
}

/* Effet de lumiere subtil */
.lc-logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: rgba(28, 134, 194, 0.08);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.lc-logo-img {
    position: relative;
    z-index: 1;
    max-width: 240px;
    height: auto;
    object-fit: contain;
    transition: transform 0.7s ease-out;
    will-change: transform;
}

.lc-logo-img:hover {
    transform: scale(1.05);
}

/* ==================== RIGHT PANEL : FORM ==================== */

.lc-form-panel {
    width: 100%;
    padding: 32px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Animation d'apparition */
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 1s ease-out 0.6s, transform 1s ease-out 0.6s;
}

.lc-card.mounted .lc-form-panel {
    opacity: 1;
    transform: translateX(0);
}

/* Logo mobile uniquement */
.lc-mobile-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.lc-mobile-logo img {
    height: 64px;
    width: auto;
    object-fit: contain;
}

/* ==================== HEADER ==================== */

.lc-header {
    margin-bottom: 32px;
}

.lc-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.lc-header p {
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
}

/* ==================== ERROR BANNER ==================== */

.lc-error-banner {
    background-color: #FEF2F2;
    border: 1px solid #FEE2E2;
    border-radius: 12px;
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 16px;
    margin-bottom: 20px;
    text-align: center;
    animation: lc-fadeIn 0.4s ease-out;
}

/* ==================== SUCCESS BANNER ==================== */

.lc-success-banner {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    color: #059669;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 16px;
    margin-bottom: 20px;
    text-align: center;
    animation: lc-fadeIn 0.4s ease-out;
}

/* ==================== FORM ==================== */

.lc-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==================== INPUT GROUP ==================== */

.lc-input-group {
    position: relative;
}

.lc-input {
    appearance: none;
    display: block;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-weight: 500;
    color: #2d3748;
    background: rgba(248, 250, 252, 0.5);
    transition: all 0.3s ease;
    outline: none;
}

.lc-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.lc-input:focus {
    border-color: #1C86C2;
    box-shadow: 0 0 0 4px rgba(28, 134, 194, 0.1);
    background: #ffffff;
}

.lc-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.lc-input-password {
    padding-right: 48px;
}

/* Eye toggle button */
.lc-toggle-password {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.lc-toggle-password:hover {
    color: #64748b;
}

.lc-toggle-password svg {
    width: 20px;
    height: 20px;
}

/* ==================== OPTIONS ROW ==================== */

.lc-options-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 4px;
}

.lc-forgot-link {
    font-size: 14px;
    font-weight: 600;
    color: #1C86C2;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

.lc-forgot-link:hover {
    color: #1573a8;
}

/* ==================== SUBMIT BUTTON ==================== */

.lc-submit-btn {
    position: relative;
    width: 100%;
    padding: 14px 16px;
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #ffffff;
    background: linear-gradient(135deg, #59AFFF, #1C86C2);
    box-shadow: 0 8px 16px -6px rgba(28, 134, 194, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.lc-submit-btn:hover {
    box-shadow: 0 12px 20px -6px rgba(28, 134, 194, 0.5);
    transform: translateY(-2px);
}

.lc-submit-btn:active {
    transform: translateY(0);
}

.lc-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.lc-submit-btn .lc-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: lc-spin 0.8s linear infinite;
}

.lc-submit-btn.loading .lc-spinner {
    display: inline-block;
}

.lc-submit-btn.loading .lc-btn-text {
    display: none;
}

/* ==================== SEPARATOR ==================== */

.lc-separator {
    display: flex;
    align-items: center;
    margin: 20px 0 16px;
    gap: 12px;
}

.lc-separator::before,
.lc-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #e2e8f0;
}

.lc-separator span {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}

/* ==================== SSO BUTTONS ==================== */

.lc-sso-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lc-sso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #334155;
}

.lc-sso-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.lc-sso-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ==================== ERROR MESSAGE (form_validation.js) ==================== */

.error-message {
    background-color: #FEF2F2;
    border: 1px solid #FEE2E2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 8px;
    text-align: center;
    animation: lc-fadeIn 0.4s ease-out;
}

.error-message ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.error-message li {
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
    padding-bottom: 2px;
}

/* ==================== BACK TO LOGIN LINK ==================== */

.lc-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #1C86C2;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    margin-bottom: 24px;
    transition: color 0.2s ease;
}

.lc-back-link:hover {
    color: #1573a8;
}

.lc-back-link i {
    font-size: 12px;
}

/* ==================== FORGOT PASSWORD PANEL ==================== */

.lc-panel {
    display: none;
    flex-direction: column;
}

.lc-panel.active {
    display: flex;
}

/* ==================== ANIMATIONS ==================== */

@keyframes lc-spin {
    to { transform: rotate(360deg); }
}

@keyframes lc-fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== RESPONSIVE ==================== */

@media (min-width: 768px) {
    .lc-card {
        flex-direction: row;
    }

    .lc-logo-panel {
        display: flex;
    }

    .lc-form-panel {
        width: 58%;
        padding: 48px 56px;
    }

    .lc-mobile-logo {
        display: none;
    }
}

@media (min-width: 1024px) {
    .lc-logo-panel {
        width: 50%;
    }

    .lc-form-panel {
        width: 50%;
        padding: 56px 64px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .lc-card {
        border-radius: 1.5rem;
    }

    .lc-form-panel {
        padding: 24px 20px;
    }

    .lc-header h2 {
        font-size: 24px;
    }
}
