﻿html, body {
    height: 100%;
}

app {
    display: block;
    height: 100%;
}

.logon-viewsite div[data-item-name="PasswordHint"] + .xaf-static-text {
    width: 100%;
    line-height: 1rem;
    font-size: 0.75rem;
    opacity: .5;
}

#blazor-error-ui {
    background: inherit;
    bottom: 0;
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 100001;
}

.xaf-navmenu a .xaf-nav-link {
    text-decoration: revert !important;
}

.dxbl-grid-command-cell .dxbl-btn-link > span {
    text-decoration: revert !important;
}

.dxbl-grid-table td {
    white-space: nowrap;
}

.dxbl-grid.height600 {
    height: 600px;
    max-height: 600px;
}

body {
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #CAE0E4;
}

.header-logo {
    flex-shrink: 0;
    background-image: url(../images/cseasp.svg);
    background-repeat: no-repeat;
    background-origin: initial;
    background-position: left;
    background-size: auto;
    width: 185px;
    height: 32px;
}

.LoginBody {
    background-image: url(../images/cseasp.svg);
    background-repeat: no-repeat;
    background-size: 90% auto; /* ajuste la taille */
    background-position: center 40px; /* centré + décalage vertical */
}

.LoginMargeHaut {
    height: 140px;
}

.image-centree {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.grid-grouprow > td {
    background-color: #CAE0E4;
    color: black;
}

.grid-groupfooterrow div {
    background-color: lightyellow;
    color: black;
}

.grid-footerrow div {
    background-color: #f3ff8b;
    color: black;
}

div.xaf-richedit {
    height: 700px;
}

.dxbrv-clipboard-container {
    display: none;
}

.btn-icon-hide {
    width: 16px;
    height: 16px;
    background-image: url(../images/btn-icon-hide.svg);
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
}

.btn-icon-show {
    width: 16px;
    height: 16px;
    background-image: url(../images/btn-icon-show.svg);
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
}

.xaf-alert-message {
    white-space: pre-line !important;
}

.chart-white {
    background: #fff !important;
}

/*.calibri10-editor .dxbl-htmleditor-content p,
.calibri10-editor .dx-htmleditor-content p {
    margin-block-start: 0;
    margin-block-end: 0;
    margin-top: 0;
    margin-bottom: 2pt;*/ /* ≈ 2/3 pixels */
/*}*/


/* Couleurs de l'indicateur */
.pb-green .dxbl-progressbar-indicator {
    background-color: #22c55e !important;
}

.pb-orange .dxbl-progressbar-indicator {
    background-color: #f59e0b !important;
}

.pb-red .dxbl-progressbar-indicator {
    background-color: #dc2626 !important;
}

.dxbl-progressbar,
.dxbl-progressbar-track,
.dxbl-progressbar-indicator {
    border-radius: 8px;
}

/* Fallback indéterminé (si le paramètre Indeterminate n'existe pas dans ta build)
   -> on ajoute une animation "marquee" via classe CSS appliquée quand Indeterminate=true */
.pb-indeterminate .dxbl-progressbar-indicator {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(255,255,255,.15) 25%, rgba(255,255,255,.35) 37%, rgba(255,255,255,.15) 63%);
    background-size: 400% 100%;
    animation: pb-marquee 1.2s linear infinite;
}

@keyframes pb-marquee {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: 0 0;
    }
}

/* ============================================================
   Contact - filtre "Présent au"
   ============================================================ */

/* Largeur du champ date dans le Ribbon */
dxbl-date-edit.xaf-action-contact_filteratdate {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px !important;
}

    /* Saisie centrée */
    dxbl-date-edit.xaf-action-contact_filteratdate .dxbl-text-edit-input {
        text-align: center !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    /* Bouton calendrier un peu plus compact */
    dxbl-date-edit.xaf-action-contact_filteratdate .dxbl-edit-btn-dropdown {
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
    }

/* Éviter que le bouton Effacer soit tronqué */
button[data-action-name="Effacer"] {
    white-space: nowrap !important;
}

/* ============================================================ */

div.copilot-logo span {
    font-size: 64px !important;
}

.xaf-splitter {
    overflow: hidden;
}

.xaf-main {
    height: 100%;
    overflow: auto;
}

.ai-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ===== AI PANEL UI ===== */
.ai-panel {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.ai-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.ai-title {
    font-weight: 700;
    font-size: 16px;
}

.ai-tools {
    display: flex;
    gap: 8px;
}

/* boutons icône */
.ai-iconbtn {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(0,0,0,.15);
    background: #f7f7f7;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.ai-icon {
    width: 18px;
    height: 18px;
    display: block;
}

/* zone messages */
.ai-body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-footer {
    padding: 12px 14px;
    border-top: 1px solid rgba(0,0,0,.08);
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* IMPORTANT : cibler textarea + bouton pour battre bootstrap/xaf */
textarea.ai-input {
    flex: 1 1 auto;
    resize: none;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 12px;
    outline: none;
    font: inherit;
}

.ai-send {
    width: 44px;
    height: 40px;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 12px;
    background: #f7f7f7;
    cursor: pointer;
}

/* Icône micro en SVG (prend la couleur du thème via currentColor) */
.ai-mic-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    background-color: currentColor;
    -webkit-mask: url('/images/copilot-speak.svg') no-repeat center / contain;
    mask: url('/images/copilot-speak.svg') no-repeat center / contain;
}

/* Bouton "micro actif" : on n'écrase pas DevExpress, on surcouche légèrement */
.ai-mic-active {
    /* couleurs neutres et lisibles en dark theme aussi */
    background-color: rgba(220, 53, 69, 0.16) !important; /* rouge translucent */
    border-color: rgba(220, 53, 69, 0.45) !important;
    color: rgb(220, 53, 69) !important; /* la couleur pilote l'icône (currentColor) */
}

/* Petit halo animé autour du bouton */
.ai-mic-active {
    position: relative;
}

    .ai-mic-active::after {
        content: "";
        position: absolute;
        inset: -3px;
        border-radius: 12px;
        border: 2px solid rgba(220, 53, 69, 0.35);
        animation: ai-mic-halo 1.2s ease-out infinite;
        pointer-events: none;
    }

/* Pulse de l’icône */
.ai-mic-pulse {
    animation: ai-mic-pulse 0.9s ease-in-out infinite;
}

/* Animations */
@keyframes ai-mic-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.12);
        opacity: 0.85;
    }
}

@keyframes ai-mic-halo {
    0% {
        transform: scale(0.96);
        opacity: 0.65;
    }

    70% {
        transform: scale(1.12);
        opacity: 0.10;
    }

    100% {
        transform: scale(1.14);
        opacity: 0;
    }
}

/* ************************************************************************************************ */