/* ═══════════════════════════════════════════════════════════
   LOGIN FORMATEUR — Redesign 2026
   Scoped with lgn- prefix to avoid global CSS conflicts
   ═══════════════════════════════════════════════════════════ */

/* ═══ PAGE LAYOUT ═══ */
.lgn-page {
    position: relative;
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 60px;
}

/* ═══ AMBIENT ORBS ═══ */
.lgn-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.lgn-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .15;
}
.lgn-orb-1 {
    width: 500px;
    height: 500px;
    background: #7441BA;
    top: -120px;
    right: -80px;
    animation: lgnDrift1 20s ease-in-out infinite;
}
.lgn-orb-2 {
    width: 350px;
    height: 350px;
    background: #F4B700;
    bottom: -100px;
    left: -60px;
    opacity: .08;
    animation: lgnDrift2 25s ease-in-out infinite;
}
@keyframes lgnDrift1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-40px, 30px); }
}
@keyframes lgnDrift2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
}

/* ═══ CENTER WRAPPER ═══ */
.lgn-center {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

/* ═══ FLASH ALERTS ═══ */
.lgn-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 12px;
    line-height: 1.5;
    animation: lgnFadeSlide 500ms cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes lgnFadeSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.lgn-alert-success {
    background: rgba(34,197,94,.08);
    border: 1px solid rgba(34,197,94,.15);
    color: #22C55E;
}
.lgn-alert-warning {
    background: rgba(245,158,11,.08);
    border: 1px solid rgba(245,158,11,.15);
    color: #F59E0B;
}
.lgn-alert-error {
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.15);
    color: #EF4444;
}
.lgn-alert i {
    font-size: 14px;
    flex-shrink: 0;
}

/* ═══ LOGIN CARD ═══ */
.lgn-card {
    background: #1E1A34;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 24px;
    padding: 40px 36px 36px;
    box-shadow: 0 8px 40px rgba(0,0,0,.35), 0 0 80px rgba(116,65,186,.12);
    animation: lgnFadeUp 600ms cubic-bezier(0.16,1,0.3,1) 100ms both;
    position: relative;
    overflow: hidden;
}
@keyframes lgnFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.lgn-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7441BA, #F4B700);
    border-radius: 24px 24px 0 0;
}

/* ═══ LOCK ICON ═══ */
.lgn-lock {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(116,65,186,.15), rgba(116,65,186,.05));
    border: 1px solid rgba(116,65,186,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 22px;
    color: #9464DE;
    box-shadow: 0 0 32px rgba(116,65,186,.15);
}

/* ═══ TITLE ═══ */
.lgn-title {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 6px;
    color: #EAE7F2;
}
.lgn-sub {
    text-align: center;
    font-size: 13px;
    color: #817B98;
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

/* ═══ METHOD TOGGLE ═══ */
.lgn-method-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #5A5472;
    margin-bottom: 10px;
}
.lgn-method-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}
.lgn-method-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #817B98;
    cursor: pointer;
    transition: all .2s cubic-bezier(0.16,1,0.3,1);
}
.lgn-method-btn:hover {
    color: #B5B0C8;
}
.lgn-method-btn.active {
    background: #7441BA;
    color: white;
    box-shadow: 0 4px 16px rgba(116,65,186,.3);
}
.lgn-method-btn i {
    font-size: 15px;
}

/* ═══ FORM ═══ */
.lgn-field {
    margin-bottom: 20px;
}
.lgn-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #B5B0C8;
    margin-bottom: 8px;
}
.lgn-card .lgn-input,
.lgn-card input.form-control {
    width: 100%;
    padding: 14px 16px;
    background: #19152C;
    border: 1.5px solid rgba(255,255,255,.08);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    color: #EAE7F2;
    transition: all .2s cubic-bezier(0.16,1,0.3,1);
    outline: none;
}
.lgn-card .lgn-input::placeholder,
.lgn-card input.form-control::placeholder {
    color: #5A5472;
}
.lgn-card .lgn-input:focus,
.lgn-card input.form-control:focus {
    border-color: #9464DE;
    box-shadow: 0 0 0 3px rgba(116,65,186,.12);
    background: rgba(25,21,44,.9);
}
.lgn-card .lgn-input:hover:not(:focus),
.lgn-card input.form-control:hover:not(:focus) {
    border-color: rgba(255,255,255,.12);
}
.lgn-hint {
    font-size: 11px;
    color: #5A5472;
    margin-top: 6px;
    line-height: 1.5;
}
.lgn-card .form-text {
    font-size: 11px;
    color: #5A5472 !important;
    margin-top: 6px;
    line-height: 1.5;
}

/* Validation errors */
.lgn-card .invalid-feedback,
.lgn-card .form-error-message,
.lgn-card ul li {
    color: #EF4444;
    font-size: 12px;
    margin-top: 6px;
}

/* ═══ SUBMIT BUTTON ═══ */
.lgn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #E8603C, #F07A5A);
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all .2s cubic-bezier(0.16,1,0.3,1);
    box-shadow: 0 4px 20px rgba(232,96,60,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}
.lgn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(232,96,60,.4);
}
.lgn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(232,96,60,.2);
}
.lgn-submit:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

/* ═══ CARD FOOTER ═══ */
.lgn-footer {
    text-align: center;
    font-size: 11px;
    color: #5A5472;
    line-height: 1.6;
}
.lgn-footer i {
    margin-right: 4px;
}
.lgn-footer strong {
    color: #817B98;
}

/* ═══ SECURITY BADGES ═══ */
.lgn-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    animation: lgnFadeUp 600ms cubic-bezier(0.16,1,0.3,1) 300ms both;
}
.lgn-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #5A5472;
    padding: 6px 12px;
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 9999px;
}
.lgn-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #22C55E;
}

/* ═══ CANDIDATURE LINK ═══ */
.lgn-candidature {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: #5A5472;
    animation: lgnFadeUp 600ms cubic-bezier(0.16,1,0.3,1) 400ms both;
}
.lgn-candidature a {
    color: #9464DE;
    text-decoration: none;
    font-weight: 600;
    transition: color .15s;
}
.lgn-candidature a:hover {
    color: #B5B0C8;
    text-decoration: underline;
}

/* ═══ LAYOUT OVERRIDES FOR LOGIN PAGE ═══ */

/* Hide breadcrumb */
.lgn-page ~ .breadcrumb-bar,
.breadcrumb-bar {
    display: none !important;
}

/* Make page-content seamless (keep top padding for fixed header) */
.page-content:has(.lgn-page) {
    padding: 80px 0 0 !important;
    background: #131022;
}
.page-content:has(.lgn-page) > .container {
    max-width: 100%;
    padding: 0;
}

/* Style layout flash messages to match design */
.page-content > .container > .row > .col-md-12 > .alert {
    max-width: 440px;
    margin: 16px auto;
    border-radius: 12px;
    font-size: 13px;
    position: relative;
    z-index: 2;
}
.page-content > .container > .row > .col-md-12 > .alert-success {
    background: rgba(34,197,94,.1);
    border-color: rgba(34,197,94,.2);
    color: #22C55E;
}
.page-content > .container > .row > .col-md-12 > .alert-warning {
    background: rgba(245,158,11,.1);
    border-color: rgba(245,158,11,.2);
    color: #F59E0B;
}
.page-content > .container > .row > .col-md-12 > .alert-error,
.page-content > .container > .row > .col-md-12 > .alert-danger {
    background: rgba(239,68,68,.1);
    border-color: rgba(239,68,68,.2);
    color: #EF4444;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 520px) {
    .lgn-card {
        padding: 32px 24px 28px;
        border-radius: 16px;
    }
    .lgn-badges {
        flex-direction: column;
        gap: 8px;
    }
    .lgn-orb-1 {
        width: 300px;
        height: 300px;
    }
    .lgn-orb-2 {
        width: 200px;
        height: 200px;
    }
}
