/* ============================================================
   LOGIN PAGE - Layout 2 colonnes
   ============================================================ */

/* Reset global pour la page login */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

/* Reset */
.login-page * {
    box-sizing: border-box;
}

/* Container principal - separation verticale */
.login-page {
    height: 100vh;
    display: flex;
    flex-direction: row;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow: hidden;
}

/* Partie gauche - Formulaire (40%) */
.login-left {
    width: 40%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 50px;
    background: #ffffff;
    overflow-y: auto;
}

.login-form-container {
    max-width: 420px;
    width: 100%;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.login-subtitle {
    font-size: 0.92rem;
    color: #64748b;
    margin: 0 0 32px 0;
    line-height: 1.5;
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Champ mot de passe avec icone */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #1e3a5f;
}

.forgot-link {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: #1e3a5f;
    text-decoration: underline;
    margin-top: 8px;
    cursor: pointer;
}

.forgot-link:hover {
    color: #2d5a8a;
}

.btn-login {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: #1e3a5f;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    background: #2d5a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.25);
}

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

.login-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border-left: 4px solid #dc2626;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Section informations supplementaires */
.login-extra {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
}

.extra-title {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 14px 0;
}

.btn-extra {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-extra:hover {
    background: #f9fafb;
    border-color: #1e3a5f;
    color: #1e3a5f;
}

.btn-extra i {
    font-size: 1.1rem;
}

/* Partie droite - Image (60%) */
.login-right {
    width: 60%;
    height: 100%;
    position: relative;
    background-color: #0f1e32;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    overflow: hidden;
}

.login-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.05) 0%, rgba(15, 40, 70, 0.1) 100%);
}

/* Footer info sur l'image */
.login-footer {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    padding: 30px 35px 25px 35px;
    background: #0f1e32;
}

.footer-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.footer-info {
    flex: 1;
    color: #ffffff;
}

.footer-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-info p {
    font-size: 0.8rem;
    margin: 0 0 3px 0;
    opacity: 0.9;
    line-height: 1.4;
}

.footer-info a {
    color: #93c5fd;
    text-decoration: none;
}

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

.footer-contact {
    text-align: right;
    color: #ffffff;
    flex-shrink: 0;
}

.footer-contact p {
    font-size: 0.8rem;
    margin: 0 0 4px 0;
    opacity: 0.9;
}

.footer-contact a {
    color: #93c5fd;
    text-decoration: none;
}

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

/* Copyright */
.copyright {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 60%;
    background: #0f1e32;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    padding: 8px;
    font-size: 0.7rem;
    z-index: 10;
}

.copyright a {
    color: inherit;
    text-decoration: none;
}

.copyright a:hover,
.copyright a:visited,
.copyright a:active {
    color: inherit;
    text-decoration: none;
}

/* Responsive tablette */
@media (max-width: 1100px) {
    .login-left {
        width: 45%;
        padding: 40px 40px;
    }

    .login-right {
        width: 55%;
    }

    .copyright {
        width: 55%;
    }

    .footer-content {
        flex-wrap: wrap;
        gap: 15px;
    }

    .footer-contact {
        text-align: left;
        width: 100%;
    }
}

/* Responsive mobile - layout vertical optimisé */
@media (max-width: 768px) {
    html, body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .login-page {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .login-left {
        width: 100%;
        height: auto;
        padding: 30px 24px;
        order: 1;
        flex-shrink: 0;
        overflow: visible;
    }

    .login-form-container {
        max-width: 100%;
    }

    .login-title {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }

    .login-subtitle {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }

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

    .form-label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }

    .form-input {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .forgot-link {
        font-size: 0.8rem;
        margin-top: 6px;
    }

    .btn-login {
        padding: 12px 20px;
        font-size: 0.95rem;
        margin-top: 6px;
    }

    .login-extra {
        margin-top: 24px;
        padding-top: 20px;
    }

    .extra-title {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    .btn-extra {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    /* Partie image - plus grande en mobile */
    .login-right {
        width: 100%;
        height: 45vh;
        min-height: 280px;
        order: 0;
        flex-shrink: 0;
    }

    .login-footer {
        padding: 16px 20px 14px;
        bottom: 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
    }

    .footer-info h3 {
        font-size: 0.9rem;
        margin-bottom: 2px;
    }

    .footer-info p {
        font-size: 0.75rem;
        margin: 0;
    }

    .footer-contact {
        text-align: left;
        width: 100%;
    }

    .footer-contact p {
        font-size: 0.75rem;
    }

    .copyright {
        position: relative;
        width: 100%;
        order: 2;
        padding: 10px;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .login-left {
        padding: 24px 20px;
    }

    .login-title {
        font-size: 1.25rem;
    }

    .login-right {
        height: 40vh;
        min-height: 240px;
    }

    .login-footer {
        padding: 12px 16px 10px;
    }

    .footer-info h3 {
        font-size: 0.85rem;
    }
}
