/* NEWCASIER-RDC — page de connexion institutionnelle */
:root {
    --nc-auth-navy: #0c1f3d;
    --nc-auth-navy-mid: #15325c;
    --nc-auth-blue: #1e5a9e;
    --nc-auth-gold: #d4a017;
    --nc-auth-red: #ce1126;
    --nc-auth-slate: #64748b;
    --nc-auth-border: #e2e8f0;
    --nc-auth-bg: #f4f6f9;
    --nc-auth-white: #ffffff;
    --nc-auth-radius: 14px;
    --nc-auth-shadow: 0 24px 64px rgba(12, 31, 61, 0.14);
}

.nc-auth-body {
    min-height: 100vh;
    background: var(--nc-auth-bg);
}

.nc-auth-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* —— Panneau institutionnel (gauche) —— */
.nc-auth-brand {
    display: none;
    flex: 1 1 48%;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 48px 32px;
    color: var(--nc-auth-white);
    background:
        linear-gradient(155deg, #081828 0%, var(--nc-auth-navy) 38%, var(--nc-auth-navy-mid) 72%, #1a4a7a 100%);
    overflow: hidden;
}

@media (min-width: 1024px) {
    .nc-auth-brand {
        display: flex;
    }
}

.nc-auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 75% 55% at 100% 0%, rgba(255, 255, 255, 0.09) 0%, transparent 58%),
        radial-gradient(ellipse 45% 40% at 0% 100%, rgba(206, 17, 38, 0.12) 0%, transparent 52%),
        radial-gradient(ellipse 35% 30% at 50% 50%, rgba(30, 90, 158, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.nc-auth-brand-watermark {
    position: absolute;
    right: -48px;
    bottom: 18%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 68%);
    pointer-events: none;
    z-index: 0;
}

.nc-auth-brand-stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    display: flex;
    z-index: 2;
}

.nc-auth-brand-stripe span {
    flex: 1;
    height: 100%;
}

.nc-auth-brand-stripe span:nth-child(1) { background: var(--nc-auth-blue); }
.nc-auth-brand-stripe span:nth-child(2) { background: var(--nc-auth-gold); }
.nc-auth-brand-stripe span:nth-child(3) { background: var(--nc-auth-red); }

.nc-auth-brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 28px;
    min-height: 0;
}

.nc-auth-brand-hero {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nc-auth-brand-institution {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nc-auth-logos {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 14px;
}

.nc-auth-logos-divider {
    width: 1px;
    height: 52px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.nc-auth-logo-gov {
    width: 76px;
    height: 76px;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.25));
}

.nc-auth-logo-app {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 7px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.nc-auth-brand-eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.nc-auth-brand-title {
    margin: 0;
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.nc-auth-brand-platform {
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    border-left: 4px solid var(--nc-auth-gold);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.nc-auth-platform-label {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.nc-auth-platform-name {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
    line-height: 1.15;
}

.nc-auth-platform-desc {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
}

.nc-auth-brand-lead {
    margin: 0;
    max-width: 440px;
    font-size: 15px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.86);
}

.nc-auth-trust {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nc-auth-trust__item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.nc-auth-trust__item:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.16);
}

.nc-auth-trust__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 17px;
    color: var(--nc-auth-gold);
}

.nc-auth-trust__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
}

.nc-auth-trust__text strong {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.nc-auth-brand-footer {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nc-auth-brand-footer p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.58);
    line-height: 1.5;
}

.nc-auth-brand-footer-note {
    margin-top: 4px !important;
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.45) !important;
}

@media (min-width: 1280px) {
    .nc-auth-brand {
        padding: 48px 56px 36px;
    }

    .nc-auth-brand-institution {
        gap: 24px;
    }
}

/* —— Zone formulaire —— */
.nc-auth-main {
    flex: 1 1 52%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px 24px;
    min-height: 100vh;
}

.nc-auth-main-top {
    width: 100%;
    max-width: 440px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nc-auth-mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (min-width: 1024px) {
    .nc-auth-mobile-brand {
        display: none;
    }
    .nc-auth-main-top {
        justify-content: flex-end;
    }
}

.nc-auth-mobile-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.nc-auth-mobile-brand span {
    font-size: 13px;
    font-weight: 600;
    color: var(--nc-auth-navy);
    line-height: 1.3;
    max-width: 180px;
}

.nc-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--nc-auth-slate);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nc-auth-back:hover {
    color: var(--nc-auth-blue);
}

.nc-auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--nc-auth-white);
    border: 1px solid var(--nc-auth-border);
    border-radius: var(--nc-auth-radius);
    box-shadow: var(--nc-auth-shadow);
    overflow: hidden;
}

.nc-auth-card-header {
    padding: 28px 32px 0;
    text-align: center;
    border-bottom: 1px solid var(--nc-auth-border);
    background: linear-gradient(180deg, #fafbfd 0%, var(--nc-auth-white) 100%);
}

.nc-auth-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--nc-auth-blue);
    background: rgba(30, 90, 158, 0.08);
    border: 1px solid rgba(30, 90, 158, 0.15);
    border-radius: 100px;
}

.nc-auth-card-badge i {
    font-size: 12px;
}

.nc-auth-card-badge--danger {
    color: #b91c1c;
    background: rgba(185, 28, 28, 0.08);
    border-color: rgba(185, 28, 28, 0.2);
}

.nc-auth-card-header h2 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--nc-auth-navy);
    letter-spacing: -0.02em;
}

.nc-auth-card-header p {
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--nc-auth-slate);
    line-height: 1.55;
}

.nc-auth-form {
    padding: 28px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nc-auth-form .validation-summary-errors,
.nc-auth-form [asp-validation-summary] {
    margin: 0;
}

.nc-auth-form .validation-summary-valid {
    display: none;
}

.nc-auth-alert {
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
}

.nc-auth-alert ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nc-auth-alert li + li {
    margin-top: 4px;
}

.nc-auth-alert--info {
    color: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.nc-auth-alert--warning {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.nc-auth-code-input {
    font-size: 1.5rem !important;
    letter-spacing: 0.4em;
}

.nc-auth-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--nc-auth-navy);
}

.nc-auth-field .kt-input,
.nc-auth-field input.kt-input {
    border-color: var(--nc-auth-border);
    min-height: 3.25rem;
    font-size: 15px;
    padding-inline: 1rem;
}

.nc-auth-field .kt-input:focus-within,
.nc-auth-field input.kt-input:focus {
    border-color: var(--nc-auth-blue);
    box-shadow: 0 0 0 3px rgba(30, 90, 158, 0.12);
}

.nc-auth-field .kt-input.kt-input-lg:not(input) input {
    font-size: 15px;
}

.nc-auth-submit {
    margin-top: 4px;
    min-height: 3.25rem;
    padding: 0.875rem 1.25rem !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    background: var(--nc-auth-navy) !important;
    border: none !important;
}

.nc-auth-submit i {
    font-size: 1.125rem;
}

.nc-auth-submit:hover {
    background: var(--nc-auth-navy-mid) !important;
}

.nc-auth-card-footer {
    padding: 0 32px 28px;
    text-align: center;
}

.nc-auth-card-footer p {
    margin: 0;
    font-size: 13px;
    color: var(--nc-auth-slate);
}

.nc-auth-card-footer a {
    font-weight: 600;
    color: var(--nc-auth-blue);
    text-decoration: none;
}

.nc-auth-card-footer a:hover {
    text-decoration: underline;
}

.nc-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
}

.nc-auth-divider::before,
.nc-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--nc-auth-border);
}

.nc-auth-divider span {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--nc-auth-slate);
}

.nc-auth-main-footer {
    margin-top: 24px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    font-size: 11px;
    color: var(--nc-auth-slate);
    line-height: 1.5;
}

.nc-auth-main-footer strong {
    color: var(--nc-auth-navy);
    font-weight: 600;
}

@media (max-width: 1023px) {
    .nc-auth-main {
        background:
            linear-gradient(180deg, rgba(12, 31, 61, 0.04) 0%, transparent 120px),
            var(--nc-auth-bg);
    }
}
