﻿/* ════════════════════════════════════════════════════════════════
   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/AcurGymLogo.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: var(--surface-1, #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 — ACURGYM
   ────────────────────────────────────────────────────────────────
   Hérité d'Educated : fond blanc cassé, pastille indigo #5955FF,
   pied « © Educated ». Repris aux couleurs AcurGym, et surtout
   décliné en sombre — c'est le thème par défaut, le splash était
   donc le dernier écran clair du parcours.

   L'ancien commentaire affirmait que var(--*) n'était pas
   disponible avant le démarrage de Blazor. C'est faux ici :
   design-tokens.css est un <link> du <head>, analysé avant le
   premier rendu, et data-theme est posé par le script anti-flash
   juste après. Les variables sont donc résolues dès la première
   frame. On garde malgré tout une valeur de repli sur chaque
   var() — si la feuille venait à ne pas charger, le splash
   resterait lisible plutôt que transparent.
   ════════════════════════════════════════════════════════════════ */

/* ── 1. Fond ─────────────────────────────────────────────────── */
#applicationLoadingPanel {
    background:
        radial-gradient(ellipse 60% 50% at 78% 18%, rgba(0,113,188,.10) 0%, transparent 62%),
        radial-gradient(ellipse 55% 45% at 18% 88%, rgba(242,195,47,.10) 0%, transparent 62%),
        var(--bg, #F5F7FA) !important;
    font-family: "Geist", "Inter", system-ui, sans-serif !important;
}

    /* ── 2. Pastille du logo ─────────────────────────────────── */
    #applicationLoadingPanel .loading-image-wrapper {
        background: var(--surface-1, #FFFFFF) !important;
        box-shadow:
            0 0 0 1px var(--line, #E5E7EB),
            0 0 0 9px rgba(242,195,47,.07),
            0 0 0 18px rgba(0,113,188,.05),
            0 10px 32px -8px rgba(0,113,188,.28) !important;
        width: 96px !important;
        height: 96px !important;
    }

    /* ── 3. Le logo ──────────────────────────────────────────── */
    /* AcurGymLogoSVG.svg est déjà aux couleurs de la marque —
       dégradé doré et bleu #0071BC. L'ancien
       filter: brightness(0) invert(1) l'écrasait en silhouette
       blanche : on perdait le seul endroit du parcours où la
       marque apparaît en grand. */
    #applicationLoadingPanel .loading-image {
        filter: none !important;
        width: 52px !important;
        height: 52px !important;
    }

    /* ── 4. Anneau ───────────────────────────────────────────── */
    #applicationLoadingPanel .loading-floated-circle.loading-border-primary {
        border-color: var(--gold, #F2C32F) transparent transparent transparent !important;
        animation-duration: 1.15s !important;
        animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
        width: 118px !important;
        height: 118px !important;
    }

    #applicationLoadingPanel .loading-border:not(.loading-border-primary) {
        border-color: var(--line, rgba(0,113,188,.12)) !important;
        width: 118px !important;
        height: 118px !important;
    }

    /* ── 5. Légende ──────────────────────────────────────────── */
    #applicationLoadingPanel .loading-caption {
        color: var(--ink-0, #0F172A) !important;
        font-family: "Geist", "Inter", system-ui, sans-serif !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        letter-spacing: -0.025em !important;
        margin-top: 26px !important;
        text-align: center;
    }

        #applicationLoadingPanel .loading-caption::after {
            content: "Initialisation en cours…" !important;
            display: block !important;
            font-size: 12px !important;
            font-weight: 400 !important;
            color: var(--ink-3, #6B7384) !important;
            letter-spacing: 0.04em !important;
            margin-top: 6px !important;
            animation: acur-pulse 1.8s ease-in-out infinite !important;
        }

@keyframes acur-pulse {
    0%, 100% {
        opacity: .4;
    }

    50% {
        opacity: 1;
    }
}

/* ── 6. Pied ─────────────────────────────────────────────────── */
#applicationLoadingPanel > div::after {
    content: "© 2026 AcurGym  ·  Tunisie" !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: var(--ink-4, #A8AEBC) !important;
    letter-spacing: 0.04em !important;
    pointer-events: none !important;
}

/* ── 7. Thème sombre ─────────────────────────────────────────── */
/* Les halos montent en intensité : à 10 % ils sont invisibles sur
   marine. La pastille se creuse au lieu de briller, et l'anneau
   doré porte à lui seul l'énergie de l'écran. */
:root[data-theme="dark"] #applicationLoadingPanel {
    background:
        radial-gradient(ellipse 60% 50% at 78% 18%, rgba(30,155,224,.20) 0%, transparent 62%),
        radial-gradient(ellipse 55% 45% at 18% 88%, rgba(242,195,47,.14) 0%, transparent 62%),
        var(--bg, #070C16) !important;
}

:root[data-theme="dark"] #applicationLoadingPanel .loading-image-wrapper {
    background: var(--surface-2, #0C1424) !important;
    box-shadow:
        0 0 0 1px rgba(242,195,47,.26),
        0 0 0 10px rgba(242,195,47,.06),
        0 0 0 20px rgba(30,155,224,.05),
        0 0 64px -12px rgba(242,195,47,.38) !important;
}

:root[data-theme="dark"] #applicationLoadingPanel .loading-border:not(.loading-border-primary) {
    border-color: rgba(255,255,255,.08) !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: var(--surface-2, #f7f9fc);
}

.planning-grid {
    /*height:600px*/
}
    /* hover uniquement planning */
    .planning-grid .dxbl-grid-row:hover {
        background-color: var(--surface-3, #eef5ff) !important;
    }
    /* lignes paires */
    .planning-grid .dxbl-grid-table > tbody > tr:nth-child(even) {
        background-color: var(--surface-2, #f7f9fc);
    }

    /* lignes impaires */
    .planning-grid .dxbl-grid-table > tbody > tr:nth-child(odd) {
        background-color: var(--surface-1, #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;
}
.height600 {
    height: 600px; /* ou une valeur fixe adaptée */
    /* OU */
    /*max-height: calc(100vh - 200px);*/
}

/*#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;
}*/
