/* ============================================================
   APSI — Page d'authentification (premium glassmorphism)
   ============================================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: linear-gradient(135deg, #0a2540 0%, #006a6a 100%);
    background-image:
        linear-gradient(rgba(8, 35, 56, 0.78), rgba(0, 106, 106, 0.78)),
        url("/static/img/bg_artelia.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at top right, rgba(0, 166, 166, 0.35), transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(14, 61, 92, 0.45), transparent 60%);
    pointer-events: none;
}

.auth-layout {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 2rem;
    gap: 3rem;
    z-index: 2;
    position: relative;
}

/* bp-md = 960px in the shared scale; reuse here for consistency. */
@media (max-width: 960px) {
    .auth-layout { grid-template-columns: 1fr; max-width: 480px; }
    .auth-hero { display: none; }
}

/* ============= Hero (gauche) ============= */
.auth-hero {
    color: white;
    padding: 2rem 1rem;
}
.auth-hero .logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 2.5rem;
}
.auth-hero .logo-img {
    width: 56px; height: 56px;
    background: white;
    border-radius: 12px;
    padding: 8px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.auth-hero .logo-img img { width: 100%; height: 100%; object-fit: contain; }
.auth-hero .logo-img svg { width: 100%; height: 100%; color: #0E3D5C; }
.auth-hero .logo-text strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.auth-hero .logo-text span {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 2px;
}

.auth-hero h1 {
    font-size: 2.6rem;
    color: white;
    line-height: 1.1;
    margin: 0 0 1.25rem;
    letter-spacing: -0.02em;
    font-weight: 800;
}
.auth-hero h1 .accent {
    background: linear-gradient(135deg, #5eead4, #00A6A6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-hero p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 460px;
}
.auth-hero .feature-list {
    list-style: none;
    padding: 0;
    margin: 2.25rem 0 0;
    display: grid;
    gap: 0.85rem;
}
.auth-hero .feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
}
.auth-hero .feature-list li .ico {
    width: 28px; height: 28px;
    background: rgba(0, 166, 166, 0.25);
    border: 1px solid rgba(0, 166, 166, 0.4);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #5eead4;
}

/* ============= Carte d'authentification (droite) ============= */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 2.5rem 2.25rem;
    box-shadow:
        0 30px 60px -10px rgba(0, 0, 0, 0.4),
        0 18px 36px -18px rgba(0, 0, 0, 0.3);
    color: #0F172A;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    animation: cardIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

[data-theme="dark"] .auth-card {
    background: rgba(15, 34, 54, 0.92);
    color: #F1F5F9;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.75rem;
    background: rgba(15, 23, 42, 0.05);
    padding: 4px;
    border-radius: 10px;
}
.auth-tabs button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    border-radius: 7px;
    transition: all 0.2s;
}
.auth-tabs button.active {
    background: white;
    color: #0E3D5C;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.auth-card h2 {
    font-size: 1.55rem;
    margin: 0 0 0.4rem;
    color: #0F172A;
    font-weight: 700;
}
.auth-card .subtitle {
    color: #64748B;
    margin-bottom: 1.75rem;
    font-size: 0.92rem;
}

.auth-card .form-group {
    margin-bottom: 1rem;
}
.auth-card .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.auth-card .form-row .form-group { margin-bottom: 1rem; }
@media (max-width: 480px) {
    .auth-card .form-row { grid-template-columns: 1fr; }
}
.auth-card .form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}
.auth-card .form-label .req { color: #DC2626; }
.auth-card .form-control,
.auth-card .form-select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #CBD5E1;
    border-radius: 9px;
    background: white;
    font-size: 0.95rem;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #0F172A;
    font-family: inherit;
}
.auth-card .form-control:focus,
.auth-card .form-select:focus {
    outline: none;
    border-color: #00A6A6;
    box-shadow: 0 0 0 3px rgba(0, 166, 166, 0.15);
}

.auth-card .check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #64748B;
    margin: 0.5rem 0 1.25rem;
}
.auth-card .check-row label {
    display: flex; align-items: center; gap: 0.4rem;
    cursor: pointer;
}

.auth-card .btn-submit {
    width: 100%;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #0E3D5C 0%, #00A6A6 100%);
    color: white;
    border: none;
    border-radius: 9px;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 18px -6px rgba(14, 61, 92, 0.5);
}
.auth-card .btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -8px rgba(14, 61, 92, 0.6);
}
.auth-card .btn-submit:active { transform: translateY(0); }

.auth-card .alt-link {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: #64748B;
}
.auth-card .alt-link a {
    color: #00A6A6;
    font-weight: 600;
}

.auth-card .flash-inline {
    background: #FEF3C7;
    border-left: 3px solid #F59E0B;
    color: #78350F;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.auth-card .flash-inline.error {
    background: #FEE2E2; border-color: #DC2626; color: #991B1B;
}
.auth-card .flash-inline.success {
    background: #DCFCE7; border-color: #16A34A; color: #14532D;
}

.auth-footer {
    position: absolute;
    bottom: 1rem; left: 0; right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
    z-index: 1;
}

/* ============= Page « pending » ============= */
.pending-card {
    text-align: center;
    padding: 3rem 2rem;
}
.pending-card .icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, #F59E0B 0%, #B45309 100%);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex; align-items: center; justify-content: center;
    color: white;
    box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.5);
}
.pending-card h2 { color: #0F172A; margin-bottom: 0.5rem; }
.pending-card p { color: #64748B; line-height: 1.6; max-width: 380px; margin: 0 auto 1.5rem; }
