﻿/* ════════════════════════════════════════════════════════════════
   ACURBUSINESS — site.css
   Base globale, variables Bootstrap, logo header, écran login
   
   À placer dans : Educated.Blazor.Server/wwwroot/css/site.css
   ════════════════════════════════════════════════════════════════ */


/* ╔══════════════════════════════════════════════════════════════╗
   ║  BASE HTML                                                    ║
   ╚══════════════════════════════════════════════════════════════╝ */

html, body {
    height: 100%;
}

app {
    display: block;
    height: 100%;
}


/* ╔══════════════════════════════════════════════════════════════╗
   ║  LOGO HEADER — Affichage du lockup en VRAIE couleur          ║
   ║  (au lieu d'un mask qui perd le dégradé)                     ║
   ╚══════════════════════════════════════════════════════════════╝ */

.header-logo {
    flex-shrink: 0;
    background-image: url('../images/acurbusiness-lockup.svg');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    width: 200px;
    height: 40px;
    transition: opacity 120ms;
}

    .header-logo:hover {
        opacity: 0.85;
    }


/* ╔══════════════════════════════════════════════════════════════╗
   ║  BLAZOR ERROR UI                                              ║
   ╚══════════════════════════════════════════════════════════════╝ */

#blazor-error-ui {
    background: inherit;
    bottom: 0;
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 100001;
}


/* ╔══════════════════════════════════════════════════════════════╗
   ║  LOADING                                                      ║
   ╚══════════════════════════════════════════════════════════════╝ */

.loading-image {
    width: 100px;
}

.loading-border {
    border-width: 4px;
    border-style: solid;
}

.loading-floated-circle {
    color: #1A4D8C !important; /* Azure Deep */
    transform: translateZ(0);
    animation: loading 1s infinite linear;
}


/* ╔══════════════════════════════════════════════════════════════╗
   ║  BOOTSTRAP VARIABLES — Palette AcurBusiness                  ║
   ╚══════════════════════════════════════════════════════════════╝ */

:root {
    /* Couleurs nommées Bootstrap */
    --bs-blue: #1A4D8C; /* Azure Deep (brand) */
    --bs-indigo: #6610f2;
    --bs-purple: #6f42c1;
    --bs-pink: #d63384;
    --bs-red: #E11D48; /* danger cohérent */
    --bs-orange: #E89B4E; /* terracotta (accent) */
    --bs-yellow: #B45309; /* warning amber */
    --bs-green: #059669; /* success */
    --bs-teal: #0D9488;
    --bs-cyan: #2563EB;
    --bs-white: #ffffff;
    --bs-gray: #858B99;
    --bs-gray-dark: #1F2330;
    /* Échelle de gris cohérente avec nos tokens ink/line/surface */
    --bs-gray-100: #F9FAFC; /* surface-2 */
    --bs-gray-200: #F1F3F7; /* surface-3 */
    --bs-gray-300: #ECEDF1; /* line */
    --bs-gray-400: #E3E5EA; /* line-2 */
    --bs-gray-500: #B5BBC7; /* ink-4 */
    --bs-gray-600: #858B99; /* ink-3 */
    --bs-gray-700: #4B5160; /* ink-2 */
    --bs-gray-800: #1F2330; /* ink-1 */
    --bs-gray-900: #0F1115; /* ink-0 */
    /* Rôles sémantiques Bootstrap */
    --bs-primary: #1A4D8C; /* Azure Deep */
    --bs-secondary: #4B5160;
    --bs-success: #059669;
    --bs-info: #2563EB;
    --bs-warning: #B45309;
    --bs-danger: #E11D48;
    --bs-light: #F9FAFC;
    --bs-dark: #1F2330;
    /* RGB pour rgba() Bootstrap */
    --bs-primary-rgb: 26, 77, 140; /* Azure Deep RGB */
    --bs-secondary-rgb: 75, 81, 96;
    --bs-success-rgb: 5, 150, 105;
    --bs-info-rgb: 37, 99, 235;
    --bs-warning-rgb: 180, 83, 9;
    --bs-danger-rgb: 225, 29, 72;
    --bs-light-rgb: 249, 250, 252;
    --bs-dark-rgb: 31, 35, 48;
    --bs-white-rgb: 255, 255, 255;
    --bs-black-rgb: 0, 0, 0;
    --bs-body-color-rgb: 31, 35, 48;
    --bs-body-bg-rgb: 255, 255, 255;
    /* Typographie */
    --bs-font-sans-serif: "Geist", "Public Sans", system-ui, -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --bs-font-monospace: "JetBrains Mono", "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-font-size: 0.88rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.5;
    --bs-body-color: #1F2330;
    --bs-body-bg: #FFFFFF;
}


/* ╔══════════════════════════════════════════════════════════════╗
   ║  UTILITAIRES BOOTSTRAP                                        ║
   ╚══════════════════════════════════════════════════════════════╝ */

.bg-primary {
    --bs-bg-opacity: 1;
    background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
}

.border-primary {
    border-color: #1A4D8C !important;
}


/* ╔══════════════════════════════════════════════════════════════╗
   ║  ÉCRAN DE LOGON                                               ║
   ╚══════════════════════════════════════════════════════════════╝ */

.card-header:first-child {
    border-radius: 1px 1px 0 0;
    border: none;
}

/*.logon-main {
    height: 400px;
    border: none;
    max-height: 610px;
    max-width: 610px;
    width: 400px;
    box-shadow: unset;
    border-radius: 10px;
}*/

.logon-main.card .card-header,
.logon-template-header {
    color: #1A4D8C; /* Azure Deep */
    font-size: 2rem;
    font-family: "Geist", "Public Sans", system-ui, sans-serif;
    background-color: white;
    font-weight: 600;
}


/* ╔══════════════════════════════════════════════════════════════╗
   ║  DASHBOARD ITEM (carte du dashboard)                         ║
   ║  Note : déjà couvert par educated-dashboard-theme.css,        ║
   ║  on garde ici seulement le fond et ombre globaux              ║
   ╚══════════════════════════════════════════════════════════════╝ */

.dx-dashboard-item-container {
    box-shadow: 0 1px 4px rgba(15, 17, 21, 0.06);
    background-color: #FFFFFF;
    border-radius: 18px !important;
    box-sizing: border-box;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

@media (min-width: 576px) {
    .dxbl-theme-fluent .main-content.xaf-flex-auto {
        padding-top: 0;
        padding-bottom: 1rem;
        padding-left: 0;
    }
}

.dxbl-context-menu, .dxbl-context-menu-submenu {
    --dxbl-context-menu-font-family: Geist;
}

.dxbl-btn {
    font-family: 'Geist';
}

.dxbl-list-box, .dxbl-list-box-render-container {
    --dxbl-list-box-font-family: 'Geist';
}

.dxbl-dropdown > .dxbl-dropdown-dialog .dxbl-dropdown-header, .dxbl-itemlist-dropdown > .dxbl-dropdown-dialog .dxbl-dropdown-header {
    font-family: 'Geist';
}

.dxbl-text {
    --dxbl-text-font-family: 'Geist';
}

.filter-editor {
    height: 300px !important;
    position: relative;
}
/* ════════════════════════════════════════════════════════════════
   SPLASHSCREEN V5 LIGHT — AcurBusiness
   Palette : Option C — violet saturé #6B35BE
   RÈGLE ABSOLUE : toutes les couleurs sont hardcodées ici.
   var(--*) non disponibles avant chargement Blazor/WASM.
   Synchroniser avec design-tokens.css si palette change.
   ════════════════════════════════════════════════════════════════ */

/* ── 1. Fond — blanc cassé teinte violet Option C + halo centré ── */
#applicationLoadingPanel {
    /* Halo centré : brand-soft Option C = #E8DEFA */
    background: radial-gradient(ellipse 65% 55% at 50% 42%, rgba(107, 53, 190, .09) 0%, transparent 65%), #F8F6FD !important; /* légèrement teinté violet — gradient-welcome stop */
    font-family: "Geist", "Inter", system-ui, sans-serif !important;
}

    /* ── 2. Cercle logo — gradient-brand Option C ─────────────────── */
    #applicationLoadingPanel .loading-image-wrapper {
        /* --gradient-brand Option C : #9244E0 → #6B35BE */
        background: linear-gradient(135deg, #9244E0 0%, #6B35BE 100%) !important;
        box-shadow: 0 2px 0 rgba(255,255,255,.35) inset, 0 0 0 8px rgba(107, 53, 190, .08), 0 0 0 16px rgba(107, 53, 190, .04), 0 8px 28px -6px rgba(107, 53, 190, .35) !important;
        width: 88px !important;
        height: 88px !important;
    }

    /* ── 3. Logo image — blanc ───────────────────────────────────── */
    #applicationLoadingPanel .loading-image {
        filter: brightness(0) invert(1) !important;
        width: 42px !important;
        height: 42px !important;
    }

    /* ── 4. Anneau spinner — accent Option C = #9B6FD4 ──────────── */
    #applicationLoadingPanel .loading-floated-circle.loading-border-primary {
        /* --accent Option C */
        border-color: #9B6FD4 transparent transparent transparent !important;
        animation-duration: 1.3s !important;
        animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
        width: 108px !important;
        height: 108px !important;
    }

    #applicationLoadingPanel .loading-border:not(.loading-border-primary) {
        /* --brand-soft Option C à 15% d'opacité */
        border-color: rgba(107, 53, 190, .12) !important;
        width: 108px !important;
        height: 108px !important;
    }

    /* ── 5. Caption ──────────────────────────────────────────────── */
    #applicationLoadingPanel .loading-caption {
        /* --ink-0 teinté violet (proche de axisTitleColor) */
        color: #1C0B3A !important;
        font-family: "Geist", "Inter", system-ui, sans-serif !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        letter-spacing: -0.025em !important;
        margin-top: 24px !important;
    }

        /* Sous-label animé */
        #applicationLoadingPanel .loading-caption::after {
            content: "Initialisation en cours…" !important;
            display: block !important;
            font-size: 12px !important;
            font-weight: 400 !important;
            /* --accent désaturé clair */
            color: #8A7BAA !important;
            letter-spacing: 0.04em !important;
            margin-top: 4px !important;
            animation: acur-pulse 1.8s ease-in-out infinite !important;
        }

@keyframes acur-pulse {
    0%, 100% {
        opacity: .4;
    }

    50% {
        opacity: 1;
    }
}

/* ── 6. Footer — copyright discret ──────────────────────────── */
#applicationLoadingPanel > div::after {
    content: "© 2026 Rise Up SARL  ·  Tunis · Sousse  ·  v6.0" !important;
    display: block !important;
    position: absolute !important;
    bottom: 18px !important;
    left: 0 !important;
    right: 0 !important;
    text-align: center !important;
    font-size: 11px !important;
    /* --ink-4 teinté violet */
    color: #C4B8E8 !important;
    letter-spacing: 0.04em !important;
    pointer-events: none !important;
}


/* ════════════════════════════════════════════════════════════════
   SPINNER XAF INLINE (reconnect + chargement de vue)
   Utilise var(--brand) — disponible après Blazor init
   ════════════════════════════════════════════════════════════════ */

.xaf-loading-content .spinner-border {
    margin-right: 0.4em;
    margin-left: 0.4em;
    /* var(--brand) disponible ici — Blazor déjà chargé */
    color: var(--brand, #6B35BE);
    border: 0.25rem solid currentcolor;
    border-right-color: transparent;
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    border-radius: 50%;
    animation: 0.75s linear infinite xaf-spinner-border;
}

.xaf-loading-content {
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body, "Geist", system-ui, sans-serif);
    height: 3em;
    background-color: var(--surface-1, #fff) !important;
    border-radius: 2em;
    border: .5px solid var(--line, #E5E7EB);
    box-shadow: var(--sh-brand, 0 4px 14px rgba(107,53,190,.22));
}
