﻿#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* =====================================================
   BOOK ADS PILOT - LAYOUT GLOBAL
   ===================================================== */

.bap-app {
    min-height: 100vh;
    background: #f5f7fb;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #172033;
}

/* =====================================================
   SIDEBAR
   ===================================================== */

.bap-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 245px;
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    background: linear-gradient( 180deg, #172338 0%, #111b2d 100% );
    color: white;
    box-shadow: 10px 0 35px rgba(15, 23, 42, 0.10);
    z-index: 200;
}

/* =====================================================
   LOGO - VERSION AGRANDIE
   ===================================================== */

.bap-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 32px;
}

.bap-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 13px;
    background: linear-gradient( 135deg, #6366f1, #7c3aed );
    color: white;
    font-size: 21px;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.30);
}

.bap-brand-name {
    color: white;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: .025em;
}

.bap-brand-subtitle {
    margin-top: 3px;
    color: #94a3b8;
    font-size: 12px;
}

.bap-brand-dark {
    color: #111827;
}

/* =====================================================
   LOGO - ESPACE CONNECTE UNIQUEMENT
   ===================================================== */

.bap-sidebar .bap-brand {
    gap: 10px;
    margin-bottom: 32px;
}

.bap-sidebar .bap-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 23px;
}

.bap-sidebar .bap-brand-name {
    font-size: 15px;
    letter-spacing: 0;
    white-space: nowrap;
}

.bap-sidebar .bap-brand-subtitle {
    font-size: 11px;
    line-height: 1.4;
}

/* =====================================================
   NAVIGATION
   ===================================================== */

.bap-navigation {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bap-menu-label {
    margin: 20px 10px 7px 10px;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}

.bap-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 650;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

    .bap-menu-item:hover {
        background: rgba(255, 255, 255, 0.075);
        color: white;
        transform: translateX(2px);
    }

    .bap-menu-item:first-of-type {
        background: linear-gradient( 135deg, rgba(99, 102, 241, .25), rgba(124, 58, 237, .15) );
        color: white;
    }

.bap-menu-icon {
    width: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #a5b4fc;
}

/* =====================================================
   BAS DE SIDEBAR
   ===================================================== */

.bap-sidebar-bottom {
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bap-subscription-button {
    display: block;
    padding: 10px 12px;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 9px;
    text-align: center;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 750;
    transition: .18s ease;
}

    .bap-subscription-button:hover {
        background: rgba(255, 255, 255, 0.07);
        color: white;
    }

.bap-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
}

.bap-user-avatar {
    width: 33px;
    height: 33px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: #29364d;
    color: white;
    font-size: 13px;
    font-weight: 900;
}

.bap-user-info {
    min-width: 0;
}

.bap-user-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 700;
}

.bap-user-status {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    color: #64748b;
    font-size: 10px;
}

.bap-status-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    flex-shrink: 0;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .10);
}

.bap-logout {
    display: block;
    margin-top: 4px;
    text-align: center;
    text-decoration: none;
    color: #64748b;
    font-size: 10px;
    transition: color .18s ease;
}

    .bap-logout:hover {
        color: #e2e8f0;
    }

/* =====================================================
   ZONE PRINCIPALE
   ===================================================== */

.bap-main {
    min-height: 100vh;
    margin-left: 245px;
}

/* =====================================================
   BARRE HAUTE
   ===================================================== */

.bap-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 30px;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid #e8edf5;
    backdrop-filter: blur(12px);
}

.bap-topbar-title {
    color: #172033;
    font-size: 14px;
    font-weight: 850;
}

.bap-topbar-subtitle {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 11px;
}

.bap-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bap-data-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: white;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

/* =====================================================
   CONTENU
   ===================================================== */

.bap-content {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
}

/* =====================================================
   VERSION NON CONNECTEE
   ===================================================== */

.bap-public {
    min-height: 100vh;
}

.bap-public-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.bap-brand-public {
    margin: 0;
}

.bap-public-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bap-login-button,
.bap-register-button {
    padding: 9px 14px;
    border-radius: 9px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.bap-login-button {
    background: white;
    border: 1px solid #dbe1eb;
    color: #475569;
}

.bap-register-button {
    background: linear-gradient( 135deg, #6366f1, #7c3aed );
    color: white;
    border: none;
    box-shadow: 0 5px 14px rgba(99, 102, 241, .20);
}

/* =====================================================
   PETITES FINITIONS PREMIUM
   ===================================================== */

a,
button {
    -webkit-tap-highlight-color: transparent;
}

    a:focus-visible,
    button:focus-visible {
        outline: 2px solid #6366f1;
        outline-offset: 3px;
    }

.bap-menu-item,
.bap-subscription-button,
.bap-login-button,
.bap-register-button,
.bap-logout {
    transition: all .18s ease;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 900px) {

    .bap-sidebar {
        width: 72px;
        padding: 18px 10px;
    }

    .bap-brand-text,
    .bap-menu-item span:not(.bap-menu-icon),
    .bap-menu-label,
    .bap-user-info,
    .bap-subscription-button,
    .bap-logout {
        display: none;
    }

    .bap-brand {
        justify-content: center;
    }

    .bap-sidebar .bap-logo {
        width: 46px;
        height: 46px;
    }

    .bap-menu-item {
        justify-content: center;
        padding: 0;
    }

    .bap-menu-icon {
        width: auto;
    }

    .bap-user-card {
        justify-content: center;
    }

    .bap-main {
        margin-left: 72px;
    }

    .bap-topbar {
        padding: 0 16px;
    }
}
