﻿/* ════════════════════════════════════════════════════════════════
   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/educatedlogo.svg');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    width: 160px;
    height: 32px;
    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 V6 — EDUCATED
   Palette : indigo #5351FB / #4F46E5 + accents dégradé bouton login
   (#5955FF → #3B2B9A), cohérent avec educated-login.css.
   RÈGLE ABSOLUE : toutes les couleurs sont hardcodées ici.
   var(--*) non disponibles avant chargement Blazor/WASM.
   ════════════════════════════════════════════════════════════════ */

/* ── 1. Fond — blanc cassé teinté indigo + halo centré ──────────── */
#applicationLoadingPanel {
    background: radial-gradient(ellipse 65% 55% at 50% 42%, rgba(83, 81, 251, .07) 0%, transparent 65%), #F6F6FC !important;
    font-family: "Geist", "Inter", system-ui, sans-serif !important;
}

    /* ── 2. Cercle logo — gradient indigo (identique au bouton "Se connecter") ── */
    #applicationLoadingPanel .loading-image-wrapper {
        background: linear-gradient(135deg, #5955FF 0%, #3B2B9A 100%) !important;
        box-shadow: 0 2px 0 rgba(255,255,255,.35) inset, 0 0 0 8px rgba(83, 81, 251, .08), 0 0 0 16px rgba(83, 81, 251, .04), 0 8px 28px -6px rgba(79, 70, 229, .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 — indigo clair ──────────────────────────── */
    #applicationLoadingPanel .loading-floated-circle.loading-border-primary {
        border-color: #9C97FF 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) {
        border-color: rgba(83, 81, 251, .12) !important;
        width: 108px !important;
        height: 108px !important;
    }

    /* ── 5. Caption ──────────────────────────────────────────────── */
    #applicationLoadingPanel .loading-caption {
        color: #0F172A !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;
        text-align: center;
    }

        /* Sous-label animé */
        #applicationLoadingPanel .loading-caption::after {
            content: "Initialisation en cours…" !important;
            display: block !important;
            font-size: 12px !important;
            font-weight: 400 !important;
            color: #6B7384 !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 Educated  ·  Tunisie   ·  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;
    color: #A7A3D9 !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;
    color: var(--brand, #02A5B7);
    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(2,165,183,.22));
}
.license-badge {
    margin-left: 15px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* licence invalide */
.license-invalid {
    background: #c62828 !important;
    color: white;
}

/* licence warning */
.license-warning {
    background: #f57c00 !important;
    color: white;
}

.license-message {
    margin-left: 20px;
    font-weight: bold;
    color: white;
}


.license-invalid .navbar-dark *,
.license-warning .navbar-dark * {
    color: white !important;
}

.license-bar {
    padding-left: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    font-size: 13px;
    width: 100%;
    height: 100%;
}

/* Message */
.license-text {
    font-weight: 500;
}

/* Badge Instance */
.instance-badge {
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 2px 10px;
    font-family: monospace;
    font-size: 12px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bouton icône */
.icon-btn {
    border: none;
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

    .icon-btn:hover {
        background: rgba(255,255,255,0.35);
    }

/* Bouton licence */
.btn-license {
    background: #fff;
    color: #f57c00;
    border-radius: 6px;
    padding: 4px 10px;
    font-weight: 500;
    border: none;
    transition: 0.2s;
}

    .btn-license:hover {
        background: #ffe0b2;
    }

.planning-cell {
    user-select: none;
    cursor: pointer;
    height: 18px;
    transition: all 0.05s ease;
}

.selected-cell {
    background-color: rgba(13,110,253,0.22) !important;
    border: 1px solid #0d6efd;
    box-shadow: inset 0 0 0 1px #0d6efd;
}

.planning-cell:hover {
    filter: brightness(0.95);
}
/*.planning-cell:hover {
    background-color: rgba(13,110,253,0.08);
    border-color: #0d6efd;
}*/
.dxbl-grid-cell {
    height: 100%;
    padding: 0 !important;
}

.name-cell.nowrap {
    white-space: nowrap; /* ❌ pas de retour ligne */
    overflow: hidden; /* cache dépassement */
    text-overflow: ellipsis; /* ajoute ... */
    display: block;
    width: 100%;
}

.planning-grid .dxbl-grid-row-alt {
    background-color: #f7f9fc;
}

.planning-grid {
    /*height:600px*/
}
    /* hover uniquement planning */
    .planning-grid .dxbl-grid-row:hover {
        background-color: #eef5ff !important;
    }
    /* lignes paires */
    .planning-grid .dxbl-grid-table > tbody > tr:nth-child(even) {
        background-color: #f7f9fc;
    }

    /* lignes impaires */
    .planning-grid .dxbl-grid-table > tbody > tr:nth-child(odd) {
        background-color: #ffffff;
    }

    .planning-grid .planning-col .dxbl-grid-cell {
        padding: 0 !important;
        border: none;
    }

/* garder full size */
.planning-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    margin: -4px -5px;
    font-size: 11px;
    box-sizing: border-box;
    padding: 0 4px;
    /* 🔥 bordure fine */
    border: 1px solid #e6e9ef;
    /* 🔥 fond léger */
    background-clip: padding-box;
    /* 🔥 transition douce */
    transition: all 0.08s ease;
}

    .planning-cell:hover {
        border-color: #0d6efd;
        background-color: rgba(13,110,253,0.08);
        cursor: pointer;
    }

.hover-col {
    background-color: rgba(13,110,253,0.05);
}

/* ligne */
.hover-row {
    background-color: rgba(0,0,0,0.03);
}

/* texte */
.planning-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    font-size: 11px;
    text-align: center;
}

.planning-cell:active {
    transform: scale(0.97);
}

.planning-grid .dxbl-grid-table > tbody > tr > td {
    border-left: none;
    border-right: none;
}

.planning-menu {
    position: fixed;
    background: white;
    border: 1px solid #dcdcdc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 6px;
    z-index: 9999;
    min-width: 150px;
    padding: 4px 0;
    animation: fadeIn 0.1s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.menu-item {
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
}

    .menu-item:hover {
        background-color: #eef5ff;
    }

.sat-cell {
    background-color: #eef3ff;
}
.sun-cell {
    background-color: #ffe5e5;
    border: 1px solid #ffb3b3;
}
.ParamActionDate {
    width: 130px !important;
}
html, body {
    overflow-y: auto !important;
    /*height: auto !important;*/
    min-height: 100% !important;
}
.dxbl-list-box, .dxbl-list-box-render-container {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    font-family: 'Geist';
    font-size: var(--dxbl-list-box-font-size);
    line-height: var(--dxbl-list-box-line-height);
    font-weight: var(--dxbl-list-box-font-weight);
    background-color: var(--dxbl-list-box-bg);
    border-radius: var(--dxbl-list-box-border-radius);
    color: var(--dxbl-list-box-color);
}
.dxbl-dropdown, .dxbl-itemlist-dropdown {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    z-index: unset;
    outline: 0;
}

/*#app,
app,
.dxbs-main-layout-content,
.dxbl-main-layout-content,
[class*="page-container"],
[class*="content-wrapper"],
[class*="layout-content"] {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}*/

/* Le scroll-viewer DX qui contient .apply */
/*dxbl-scroll-viewer:has(.apply),
dxbl-scroll-viewer:has(.apply) .dxbl-scroll-viewer-root,
dxbl-scroll-viewer:has(.apply) .dxbl-scroll-viewer-content {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    position: static !important;
    flex: none !important;
    display: block !important;
}*/
