/* Auth Page Specific Styles */
:root {
    --auth-primary: #071B4A;
    --auth-primary-light: #1D4ED8;
    --auth-primary-hover: #0A2563;
    --auth-bg-dark: #0A192F;
    --auth-accent: #F97316;
    --auth-text-muted: #94A3B8;
    --auth-border: #E2E8F0;
    --auth-form-bg: #F8FAFC;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background-color: #FFFFFF;
    margin: 0;
    overflow-x: hidden;
}

.login-container {
    height: 100vh;
    min-height: 600px;
}

/* --- Left Column: Branding --- */
.branding-col {
    background-image: url('../img/login_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    padding: 0;
    overflow: hidden;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 25, 47, 0.85) 0%, rgba(10, 25, 47, 0.95) 100%);
    z-index: 0;
}

.z-index-1 {
    position: relative;
    z-index: 1;
}

.login-logo {
    height: 120px;
    width: 120px;
    object-fit: contain;
    background: transparent;
    padding: 0;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.company-title {
    font-size: 32px;
    font-weight: 700 !important;
    letter-spacing: 1px;
}

.company-subtitle {
    font-size: 13px;
    color: var(--auth-accent);
    font-weight: 600 !important;
    letter-spacing: 1px;
}

.tagline {
    font-size: 28px;
    line-height: 1.4;
    font-weight: 600 !important;
}

/* Activity Boxes (Glassmorphism) */
.activity-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 75px;
    height: 75px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.activity-box:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.activity-icon {
    width: 28px;
    height: 28px;
    color: var(--auth-accent);
    margin-bottom: 10px;
}

.activity-icon-custom {
    width: 28px;
    height: 28px;
    color: var(--auth-accent);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--auth-accent);
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
}

/* Bottom Features */
.bottom-features {
    padding: 0 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    margin: 0 40px;
}

.feature-item {
    color: #CBD5E1;
}

.feature-icon {
    width: 20px;
    height: 20px;
    color: var(--auth-accent);
}

.feature-text {
    font-size: 12px;
    line-height: 1.3;
}


/* ============================================ */
/* --- Right Column: Premium Form Styles ---    */
/* ============================================ */
.form-col {
    background: var(--auth-form-bg);
    position: relative;
}

/* Subtle pattern overlay */
.form-col::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 1px 1px, rgba(7, 27, 74, 0.02) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}

/* Avatar / Icon */
.login-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(7, 27, 74, 0.2), 0 0 0 6px rgba(7, 27, 74, 0.06);
    animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(7, 27, 74, 0.2), 0 0 0 6px rgba(7, 27, 74, 0.06); }
    50% { box-shadow: 0 8px 28px rgba(7, 27, 74, 0.3), 0 0 0 8px rgba(7, 27, 74, 0.04); }
}

.login-avatar-icon {
    width: 24px;
    height: 24px;
    color: white;
}

/* Titles */
.login-title {
    font-size: 24px;
    font-weight: 700 !important;
    color: #0F172A;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 13.5px;
    color: var(--auth-text-muted);
    margin-bottom: 0;
    font-weight: 400;
}

/* Alert */
.login-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
    font-size: 13px;
    margin-bottom: 20px;
    animation: alertSlide 0.3s ease;
}

@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-alert-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #DC2626;
}

/* Labels */
.login-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
    letter-spacing: -0.1px;
}

/* Input Wrapper */
.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.login-input-wrap:hover {
    border-color: #CBD5E1;
}

.login-input-wrap.focused {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(7, 27, 74, 0.08);
}

.login-input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #94A3B8;
    transition: color 0.2s;
    pointer-events: none;
    z-index: 2;
}

.login-input-wrap.focused .login-input-icon {
    color: var(--auth-primary);
}

.login-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 13px 46px 13px 44px;
    font-size: 14px !important;
    color: #1E293B;
    font-family: 'Inter', 'Roboto', sans-serif;
}

.login-input::placeholder {
    color: #CBD5E1;
    font-weight: 400;
}

/* Eye Button */
.login-eye-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.15s;
    z-index: 2;
}

.login-eye-btn:hover {
    background: #F1F5F9;
}

.login-eye-btn i {
    width: 18px;
    height: 18px;
    color: #94A3B8;
}

/* Custom Checkbox */
.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    user-select: none;
}

.login-remember input {
    display: none;
}

.login-remember-check {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid #CBD5E1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
}

.login-remember input:checked + .login-remember-check {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.login-remember input:checked + .login-remember-check::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -1px;
}

/* Login Button */
.login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-light) 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(7, 27, 74, 0.25);
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(7, 27, 74, 0.3);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(7, 27, 74, 0.2);
}

.login-btn-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}

.login-btn:hover .login-btn-icon {
    transform: translateX(4px);
}

/* Security Badge */
.login-security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(7, 27, 74, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(7, 27, 74, 0.06);
    font-size: 12px;
    color: #64748B;
}

.login-security-icon {
    width: 14px;
    height: 14px;
    color: #22C55E;
}

/* Footer */
.login-footer {
    font-size: 12px;
    color: #94A3B8;
    margin-bottom: 0;
}

/* Separator - keep for compat */
.separator-line {
    border-color: #E2E8F0;
    opacity: 1;
}

/* Logo affiché en haut de la colonne formulaire, uniquement sous 992px
   (quand la colonne branding de gauche est masquée). */
.mobile-login-logo {
    padding: 28px 0 12px;
}
.mobile-login-logo img {
    height: 56px;
    width: 56px;
    object-fit: contain;
    margin-bottom: 8px;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 991.98px) {
    .form-col {
        min-height: 100vh;
    }
    .login-form-wrapper {
        max-width: 400px !important;
        padding: 0 24px !important;
    }
    /* En dessous de 992px, le logo mobile est déjà affiché en haut de la
       colonne ; on ne centre plus le formulaire dans tout l'espace restant
       (ce qui créait un grand vide sur les écrans hauts) : le contenu suit
       simplement le logo, avec un petit espacement au-dessus. */
    .login-content-wrap {
        justify-content: flex-start !important;
        padding-top: 16px;
    }
}

/* Phone */
@media (max-width: 767.98px) {
    .login-title {
        font-size: 22px;
    }
    .login-subtitle {
        font-size: 13px;
    }
    .login-avatar {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }
    .login-avatar-icon {
        width: 20px;
        height: 20px;
    }
    .login-input {
        padding: 12px 42px 12px 40px;
        font-size: 13px !important;
    }
    .login-btn {
        padding: 13px 20px;
        font-size: 14px;
    }
}

/* Small Phone */
@media (max-width: 575.98px) {
    .form-col {
        padding: 0 !important;
    }
    .login-form-wrapper {
        max-width: 100% !important;
        padding: 0 16px !important;
    }
    .login-title {
        font-size: 20px;
    }
    .login-subtitle {
        font-size: 12px;
    }
    .login-security-badge {
        font-size: 11px;
        padding: 8px 12px;
    }
    .login-footer {
        font-size: 11px;
    }
}
