/* Body & page background — Gray 50 */
.body-wrapper {
    padding-top: calc(60px) !important;
    background-color: #FAFAFA !important; /* Gray 50 */
    min-height: calc(100vh - 60px) !important;
}
.body-wrapper-no-topbar {
    padding-top: 0 !important;
    min-height: 100vh !important;
}
#main-wrapper {
    background-color: #FAFAFA !important; /* Gray 50 */
}
.body-wrapper > .container-fluid {
    padding: 0;
    padding-bottom: 40px;
}

/* ═══════════════════════════════════════════════
   HOME PAGE — DS Layout
   ═══════════════════════════════════════════════ */
.home-page {
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 24px 3rem;
}
.home-section {
    padding: 32px 24px;
}
.home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.home-section-title {
    font-size: 24.5px; /* DS H1 */
    font-weight: 700;
    color: #2A3547; /* Gray 800 */
    margin: 0;
}
.home-search-input {
    font-size: 13px;
    padding: 8px 12px;
    border: 1px solid #D5DCE8; /* Gray 300 */
    border-radius: 10px;
    min-width: 200px;
    background: #FFFFFF;
}
.home-search-input:focus {
    border-color: #5954F3; /* Primary */
    box-shadow: none;
    outline: none;
}

/* ═══════════════════════════════════════════════
   MODULE CARDS — DS Card v2.0.0 + CSS Grid
   ═══════════════════════════════════════════════ */
.home-modules {
    padding: 32px 24px;
}
.home-modules-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.home-modules-actions {
    margin-top: 16px;
    text-align: right;
}
.home-module-card {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid #D5DCE8; /* Gray 300 */
    border-radius: 20px;
    padding: 20px 25px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
}
.home-module-card:hover {
    border-color: #5954F3; /* Primary */
    text-decoration: none;
    color: inherit;
}
.home-module-card-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}
.home-module-card-title {
    flex: 1;
    font-size: 14px; /* DS H4 */
    font-weight: 700;
    color: #2A3547; /* Gray 800 */
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-module-card-icon {
    flex-shrink: 0;
    color: #5954F3; /* Primary */
    font-size: 20px;
    margin-top: 1px;
}
.home-module-card-fav {
    flex-shrink: 0;
    color: #FFAE1F; /* Warning */
    font-size: 16px;
}
.home-module-card-desc {
    font-size: 13px; /* DS body */
    color: #5E708D; /* Gray 600 */
    line-height: 1.5;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-module-card-footer {
    margin-top: auto;
}

/* Badge / Tag — DS Neutral variant */
.module-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px; /* DS Badge S */
    font-weight: 500;
    color: #8494AD; /* Gray 500 */
    background: #EDF1F7; /* Gray 200 */
    border-radius: 800px; /* pill */
    padding: 3px 10px;
    white-space: nowrap;
    line-height: 1.2;
}
.module-badge .ti {
    font-size: 13px;
}
/* Badge OUTIL — Primary light variant */
.module-badge-tool {
    background: rgba(89, 84, 243, 0.15); /* Primary 15% */
    color: #5954F3; /* Primary */
}
.module-badge-tool .ti {
    color: #5954F3;
}

/* Grid responsive */
@media (max-width: 1200px) {
    .home-modules-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 992px) {
    .home-modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══ Home — Chatbot card ═══ */
.card.card-multi-ia {
    background-color: #FFFFFF !important;
    border: 1px solid #D5DCE8; /* Gray 300 */
    border-radius: 20px !important;
    box-shadow: none !important;
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* ═══ Home — Chatbot mobile responsive ═══ */
@media (max-width: 768px) {
    .home-welcome-title {
        padding-top: 24px !important;
        padding-left: 10px !important;
        padding-bottom: 12px !important;
    }
    .home-welcome-title span {
        font-size: 18px !important;
    }
    .card-multi-ia {
        margin: 0 4px;
    }
    .card-multi-ia #TextAreaPrompt {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    .card-multi-ia .text-chatbot {
        height: 44px !important;
    }
    .card-multi-ia .options-chatbot {
        flex-wrap: wrap;
        gap: 2px;
    }
    .card-multi-ia .options-chatbot > div {
        padding: 2px 4px !important;
    }
    .card-multi-ia .options-chatbot .menu-prompt p,
    .card-multi-ia .options-chatbot .menu-prompt span {
        font-size: 0.7rem !important;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .card-multi-ia .buttons-chatbot ul {
        padding-left: 0;
        gap: 0;
    }
    .card-multi-ia .buttons-chatbot .fs-5 {
        font-size: 1rem !important;
    }
    .home-outils-btn {
        right: 0.75rem !important;
        top: -1rem !important;
    }
    .home-outils-btn .dropdown-menu {
        min-width: 260px !important;
    }
    .home-page {
        padding-top: 0;
    }
    .home-section {
        padding: 16px;
    }
    .home-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 16px;
    }
    .home-section-title {
        font-size: 18px;
    }
    .home-section-search {
        width: 100%;
    }
    .home-search-input {
        min-width: unset;
        width: 100%;
    }
    /* Module cards mobile: 2 columns, compact */
    .home-modules {
        padding: 16px;
    }
    .home-modules-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .home-module-card {
        padding: 14px 16px;
        border-radius: 14px;
    }
    .home-module-card-title {
        font-size: 13px;
    }
    .home-module-card-desc {
        -webkit-line-clamp: 2;
        margin-bottom: 6px;
        font-size: 11px;
    }
    .module-badge {
        font-size: 10px;
        padding: 2px 8px;
    }
}

/* En-tête de page (Projets, Scénarios, etc.) */
.card.bg-info-subtle {
    background-color: transparent !important;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #D5DCE8; /* Gray 300 */
    margin-bottom: 1.5rem;
    padding-top: 30px;
}
.card.bg-info-subtle h4 {
    font-size: 24.5px; /* DS H1 */
    font-weight: 700;
    color: #2A3547;
}
.card.bg-info-subtle .text-muted {
    font-size: 13px;
    color: #5E708D; /* Gray 600 */
}
.nav-pills.card {
    background-color: transparent !important;
    border: none;
    box-shadow: none;
}

/* ═══════════════════════════════════════════════
   PROJECT CARDS — DS Card v2.0.0
   ═══════════════════════════════════════════════ */
.project-card {
    border: 1px solid #D5DCE8 !important; /* Gray 300 */
    border-radius: 20px !important;
    box-shadow: none !important;
    transition: border-color 0.15s;
}
.project-card:hover {
    border-color: #5954F3 !important; /* Primary */
    box-shadow: none !important;
    transform: none;
}
.project-card .card-body {
    padding: 20px 25px;
}
.project-card h6 {
    font-size: 14px;
    font-weight: 700;
    color: #2A3547; /* Gray 800 */
}
.project-card .project-desc {
    font-size: 13px;
    color: #5E708D; /* Gray 600 */
}
.project-card .text-muted.fs-2 {
    font-size: 11px !important;
    color: #8494AD !important; /* Gray 500 */
}

/* DS Badges — Light variant for statuses */
.badge-status-primary {
    background-color: rgba(89, 84, 243, 0.15);
    color: #5954F3;
}
.badge-status-secondary {
    background-color: rgba(73, 190, 255, 0.15);
    color: #49BEFF;
}
.badge-status-success {
    background-color: rgba(19, 222, 185, 0.15);
    color: #13DEB9;
}
.badge-status-neutral {
    background-color: #EDF1F7;
    color: #8494AD;
}

/* ═══════════════════════════════════════════════
   DS TABS — v2.0.0
   ═══════════════════════════════════════════════ */
.ds-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #D5DCE8; /* Gray 300 */
    overflow-x: auto;
    scrollbar-width: thin;
}
.ds-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 400;
    color: #ADBACE; /* Gray 400 — inactive */
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color 0.15s;
}
.ds-tab:hover {
    color: #5E708D; /* Gray 600 */
    text-decoration: none;
}
.ds-tab.active {
    color: #2A3547; /* Gray 800 */
    font-weight: 600;
    border-bottom-color: #2A3547;
}
.ds-tab-count {
    font-size: 11px;
    font-weight: 500;
    color: #8494AD; /* Gray 500 */
    background: #EDF1F7; /* Gray 200 */
    padding: 1px 6px;
    border-radius: 800px;
}
.ds-tab.active .ds-tab-count {
    color: #2A3547;
}

/* ═══════════════════════════════════════════════
   SKILL CARDS — DS Card v2.0.0
   ═══════════════════════════════════════════════ */
.skill-card-ds {
    border: 1px solid #D5DCE8 !important; /* Gray 300 */
    border-radius: 20px !important;
    box-shadow: none !important;
    transition: border-color 0.15s;
}
.skill-card-ds:hover {
    border-color: #5954F3 !important; /* Primary */
}
.skill-card-ds-body {
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
}
.skill-card-title {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: #2A3547; /* Gray 800 */
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.skill-card-desc {
    font-size: 13px;
    color: #5E708D; /* Gray 600 */
    line-height: 1.4;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.skill-card-cat {
    font-size: 11px;
    color: #8494AD; /* Gray 500 */
}
.skill-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.15s;
}
.skill-card-ds:hover .skill-card-actions {
    opacity: 1;
}
/* Equal height in grid */
.note-has-grid.row > .single-note-item > .skill-card-ds {
    height: 100%;
}

/* DS Badge — additional status variants */
.badge-status-warning {
    background-color: rgba(255, 174, 31, 0.15);
    color: #FFAE1F;
}
.badge-status-info {
    background-color: rgba(83, 155, 255, 0.15);
    color: #539BFF;
}
.badge-status-danger {
    background-color: rgba(250, 137, 107, 0.15);
    color: #FA896B;
}

/* ═══════════════════════════════════════════════
   STYLEBASE LIST — DS Card liste variant
   ═══════════════════════════════════════════════ */
.stylebase-list-item {
    display: flex;
    align-items: center;
    border: 1px solid #D5DCE8; /* Gray 300 */
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #FFFFFF;
    transition: border-color 0.15s;
}
.stylebase-list-item:hover {
    border-color: #5954F3; /* Primary */
}
.stylebase-list-item-body {
    flex: 1;
    min-width: 0;
}
.stylebase-list-title {
    font-size: 13px;
    font-weight: 700;
    color: #2A3547; /* Gray 800 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stylebase-list-meta {
    font-size: 11px;
    color: #8494AD; /* Gray 500 */
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.stylebase-list-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 12px;
    opacity: 0;
    transition: opacity 0.15s;
}
.stylebase-list-item:hover .stylebase-list-actions {
    opacity: 1;
}

/* StyleBase section headers (Word / PowerPoint separators) */
.stylebase-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #2A3547;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #E8ECF1;
}
.stylebase-section-header i {
    font-size: 20px;
    color: #5954F3;
}
.stylebase-subgroup-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #5E708D;
    margin-bottom: 6px;
    margin-top: 4px;
}
.stylebase-section-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #2A3547;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1.5px solid #E8ECF1;
}
.stylebase-section-header-right i {
    font-size: 18px;
    color: #5954F3;
}

/* StyleBase type explanation blocks (right panel) */
.stylebase-type-block {
    border: 1px solid #D5DCE8; /* Gray 300 */
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.stylebase-type-title {
    font-size: 14px;
    font-weight: 700;
    color: #2A3547; /* Gray 800 */
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.stylebase-type-desc {
    font-size: 13px;
    color: #5E708D; /* Gray 600 */
    margin-bottom: 8px;
    line-height: 1.5;
}
.stylebase-type-label {
    font-size: 12px;
    font-weight: 600;
    color: #2A3547; /* Gray 800 */
    margin-bottom: 4px;
}
.stylebase-type-list {
    font-size: 12px;
    color: #5E708D; /* Gray 600 */
    margin-bottom: 8px;
    padding-left: 18px;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════
   STYLE CREATE — Option buttons + dropzone
   ═══════════════════════════════════════════════ */
.style-create-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    border: 1px solid #D5DCE8;
    border-radius: 12px;
    background: #FFFFFF;
    color: #2A3547;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
    text-align: center;
}
.style-create-option:hover {
    border-color: #5954F3;
    background-color: rgba(89, 84, 243, 0.04);
}

/* Dropzone — shared */
.dropzone-area {
    border: 2px dashed #D5DCE8;
    border-radius: 12px;
    background: #FAFAFA;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}
.dropzone-area:hover,
.dropzone-area.dropzone-hover {
    border-color: #5954F3;
    background-color: rgba(89, 84, 243, 0.04);
}

/* ═══════════════════════════════════════════════
   SETTINGS CARD — Form containers (EditSettings, etc.)
   ═══════════════════════════════════════════════ */
.settings-card {
    border: 1px solid #D5DCE8 !important; /* Gray 300 */
    border-radius: 20px !important;
    box-shadow: none !important;
}
.settings-card > .card-body {
    padding: 24px 30px;
}

/* ═══════════════════════════════════════════════
   BASE CARD — KnowledgeBase, ContextBase, etc.
   ═══════════════════════════════════════════════ */
/* Force equal height in grid */
.note-has-grid.row {
    display: flex;
    flex-wrap: wrap;
}
.note-has-grid.row > .single-note-item {
    display: flex;
}
.note-has-grid.row > .single-note-item > .card {
    flex: 1;
}
.note-has-grid.row > .single-note-item > .card.base-card {
    border-radius: 20px;
    border: 1px solid #D5DCE8; /* Gray 300 */
    box-shadow: none;
}
.base-card {
    position: relative;
    padding: 20px 25px !important;
    display: flex;
    flex-direction: column;
}
.base-card-shared {
    position: absolute;
    top: 12px;
    right: 16px;
    color: #8494AD; /* Gray 500 */
    font-size: 16px;
}
.base-card-title {
    font-size: 14px; /* DS H4 */
    font-weight: 700;
    color: #2A3547; /* Gray 800 */
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 24px;
}
.base-card-meta {
    display: flex;
    gap: 8px;
    font-size: 11px; /* DS small */
    color: #8494AD; /* Gray 500 */
    margin-bottom: 10px;
}
.base-card-meta span:last-child {
    font-style: italic;
}
.base-card-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.base-card-status-info {
    font-size: 12px;
    color: #5954F3; /* Primary */
    display: flex;
    align-items: center;
    gap: 4px;
}
.base-card-status-error {
    font-size: 12px;
    color: #FA896B; /* Danger */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}
.base-card-actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
    opacity: 0;
    transition: opacity 0.15s;
}
.base-card:hover .base-card-actions {
    opacity: 1;
}
.base-card-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 5px;
    border: 1px solid #D5DCE8; /* Gray 300 */
    background: #FFFFFF;
    color: #8494AD; /* Gray 500 */
    font-size: 16px;
    text-decoration: none;
    transition: all 0.15s;
}
.base-card-action-btn:hover {
    background: #5954F3; /* Primary */
    border-color: #5954F3;
    color: #FFFFFF;
    text-decoration: none;
}
.base-card-action-primary {
    background: #5954F3;
    border-color: #5954F3;
    color: #FFFFFF;
}
.base-card-action-danger:hover {
    background: #FA896B; /* Danger */
    border-color: #FA896B;
    color: #FFFFFF;
}

.cursor-pointer {
    cursor: pointer;
}

.message-bold {
    font-weight: 700;
}

instruction,context{
    display:none;
}

.knowledge-inner-content {
    height: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.dropzone_knowledge {
    min-height: 300px;
    border: 2px solid #dfe5ef;
    border-top-style: solid;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    background: #fff;
    padding: 20px 20px;
    border-radius: 7px;
    border-style: dashed;
}

.tooltip-inner {
    max-width: 800px !important;
}

.menu-history:hover .icon-hover, .menu-workspace:hover > .dropdown > .icon-hover {
    display: block;
}

.div-workspace:hover > .dropdown > .icon-hover { /*AM    .btn.bg-secondary-subtle.text-secondary.font-medium.btn-sm.icon-hover:hover display: block;   */
    display: block;
}

.div-workspace a.text-truncate {
    text-align:left;
}

.menu-workspace:hover .dropdown{
    display: inline-block;
}

.icon-hover {
    display: none;
}

#sidebarnav .li-hover .div-hover {
    display: block; /* Utilisez `display: block` pour permettre la transition */
    opacity: 0; /* Commencez avec une opacit� de 0 pour rendre l'�l�ment invisible */
    transition: opacity 0.8s ease; /* Transition douce de l'opacit� sur 0.5 secondes */
}

#sidebarnav .li-hover:hover > .div-hover {
    opacity: 1; /* L'opacit� passe � 1 (compl�tement visible) lors du survol */
}


.conversation_filter .card {
    background-color: #FF000012;
}

.line_filter {
    border-top: 1px solid #e8c5c5f7;
    padding: 4px 0;
    margin-left: 5px;
}

/* ═══════════════════════════════════════════════
   SKELETON — Loading placeholder for Blazor components
   ═══════════════════════════════════════════════ */
@keyframes skeleton-pulse {
    0%   { opacity: 0.6; }
    50%  { opacity: 1; }
    100% { opacity: 0.6; }
}
.chatbot-skeleton {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
}
.chatbot-skeleton-title {
    height: 28px;
    width: 60%;
    background: #EDF1F7; /* Gray 200 */
    border-radius: 8px;
    margin-bottom: 20px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.chatbot-skeleton-card {
    background: #FFFFFF;
    border: 1px solid #D5DCE8; /* Gray 300 */
    border-radius: 20px;
    padding: 24px;
}
.chatbot-skeleton-line {
    height: 14px;
    background: #EDF1F7;
    border-radius: 6px;
    margin-bottom: 12px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.chatbot-skeleton-line:last-child {
    margin-bottom: 0;
}
.chatbot-skeleton-line.short {
    width: 40%;
}
.chatbot-skeleton-line.medium {
    width: 70%;
}
.chatbot-skeleton-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.chatbot-skeleton-btn {
    height: 32px;
    width: 80px;
    background: #EDF1F7;
    border-radius: 16px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}
/* Conv page: skeleton positioned at bottom like the real footer */
.chatbot-skeleton-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 100px 16px;
    z-index: 1;
    display: flex;
    justify-content: center;
}
.chatbot-skeleton-footer .chatbot-skeleton-card {
    max-width: 1000px;
    width: 100%;
}

/* Scroll container — dynamic padding via ResizeObserver (site.js) */
.chat-scroll-container {
    padding-bottom: 200px; /* Fallback before JS init */
    background-color: #FAFAFA; /* Gray 50 */
}
.chat-scroll-container #scrollboxChat {
    max-width: 800px;
    margin: 0 auto;
}

#divFooterChatbot {
    position: fixed;
    bottom: 0px;
    background-color: #FAFAFA;
    width: 100%;
    left: 0px;
    z-index: 1;
    padding-left: 100px;
    padding-right: 30px;
}

/* Style to keep the same background as the Chat is disable*/
.message-type-box:disabled {
    color: var(--bs-link-color) !important;
    background-color: transparent !important; 
    opacity: 1 !important; 
}

/* Style to keep the same submit button when the Chat is disable*/
.btn-primary:disabled,
.btn-primary[disabled] {
    background-color: var(--bs-primary) !important; 
    border-color: var(--bs-primary) !important;
    color: white !important; 
    opacity: 0.4 !important; 
    cursor: not-allowed; 
}

.btn-primary:disabled i,
.btn-primary[disabled] i {
    opacity: 1 !important;
}

#divFooterChatbot > div:not(.gladia-overlay-panel) {
    background: white;
}

body[data-sidebartype=mini-sidebar] #divFooterChatbot {
    padding-left: 100px;
}

.precodeChat{

}
#scrollboxChat * {
    min-width: 0;
}

.codeChat {
    padding:10px;
    padding-top:0px;
}

.tablegeneratebyai {
    table-layout: fixed;
    word-break: break-all;
}

.tablegeneratebyai td {
    white-space: normal !important;
    word-wrap: break-word;
}

.divcopytableaibtn{
    margin-top:7px;
}

.workspacepageai .divcopytableaibtn {
    display: none;
}

.swal2-title {
    font-size: 1.2em !important;
}

button:disabled {
    color: gray !important;
    border-color: gray !important;
}

.message-bodyAssistPrompt{
    max-height:initial!important;
}

.inactive {
    color: #C1C1C0 !important;
    cursor: default;
    pointer-events: none;
}

.inactive:hover {
    color: #C1C1C0 !important;
    background-color: #FFF !important;
}

.inactive:hover::before {
    border-radius: 0 !important;
    background-color: #FFF !important;
    color: #C1C1C0 !important;
}

.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.disabled:hover a {
    color: var(--bs-body-color) !important;
}

.menu-prompt:hover .disabled .hidden-element {
    visibility: false;
}

.disabled:hover .hidden-element {
    visibility: hidden !important;
}

.dropdown-toggle::after {
    display: none;
}

.dropdown-toggle:hover::after {
    display: inline-block;
}

.offcanvas-addworkspaceAI {
    right: 80px !important;
    left: initial !important;
    height: 500px !important;
    max-width: 400px;
    width: 400px;
}

.offcanvas-export-word {
    right: 80px !important;
    left: initial !important;
    height: 500px !important;
    max-width: 450px;
    width: 450px;
}

/* DS hover : Gray 200 background, border-radius 5px, Gray 600 text */
.ds-link-secondary:hover {
    background: #EDF1F7 !important;
    color: #5E708D !important;
}

.custom-offcanvas-source {
    width: 600px !important;
    --bs-text-opacity: 1;
    color: rgba(var(--bs-dark-rgb), var(--bs-text-opacity)) !important;
    font-size: 16px !important;
    line-height: 1.5;
    font-weight: normal;
}

.custom-offcanvas-source .ti {
    font-size: 21px;
}

.custom-offcanvas-source img {
    padding-left: 20px;
    max-width: 500px;
    text-align: center;
}

.custom-offcanvas-source .offcanvas-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.custom-offcanvas-source .offcanvas-body .info_source {
    padding-top: 15px;
    padding-bottom: 15px;
    flex-shrink: 0;
}

.custom-offcanvas-source .content_source {
    padding-top: 15px;
    padding-bottom: 15px;
    padding-bottom: 15px;
    font-size: 15px;
    padding-left: 10px;
    line-height: 1.2;
    color: #555;
}

.custom-offcanvas-source .offcanvas-body .file_title {
    background-color: var(--bs-info-bg-subtle) !important;
    padding: 17px;
    font-weight: 600;
}

/* ═══ DocumentOffcanvas ═══ */
.document-offcanvas-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.document-offcanvas-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.document-offcanvas {
    position: fixed;
    top: 0;
    right: -750px;
    width: 750px;
    height: 100%;
    background-color: #fff;
    z-index: 1045;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
}

.document-offcanvas.show {
    right: 0;
}

.document-offcanvas-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.document-offcanvas-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.document-offcanvas-title {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.document-offcanvas-title .ti {
    font-size: 22px;
    flex-shrink: 0;
    color: var(--bs-primary);
}

.document-offcanvas-filename {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    outline: none;
    border-radius: 4px;
    padding: 1px 4px;
    margin: -1px -4px;
    transition: background-color 0.15s ease;
    cursor: text;
}

.document-offcanvas-filename:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.document-offcanvas-filename:focus {
    background-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.25);
}

.document-offcanvas-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
}

.document-offcanvas-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    flex-shrink: 0;
    padding: 0 20px;
}

.document-offcanvas-tab {
    background: none;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.document-offcanvas-tab:hover {
    color: var(--bs-primary);
}

.document-offcanvas-tab.active {
    color: var(--bs-primary);
    border-bottom-color: var(--bs-primary);
}

.document-offcanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.document-offcanvas-text .document-text-content {
    font-size: 14px;
    line-height: 1.7;
    color: #333;
}

    /* Markdown rendu dans l'onglet Texte */
    .document-offcanvas-text .document-text-content h1,
    .document-offcanvas-text .document-text-content h2,
    .document-offcanvas-text .document-text-content h3,
    .document-offcanvas-text .document-text-content h4 {
        margin-top: 1em;
        margin-bottom: 0.4em;
        font-weight: 600;
        color: #1a1a2e;
    }

    .document-offcanvas-text .document-text-content h1 { font-size: 1.3rem; }
    .document-offcanvas-text .document-text-content h2 { font-size: 1.15rem; }
    .document-offcanvas-text .document-text-content h3 { font-size: 1.05rem; }
    .document-offcanvas-text .document-text-content h4 { font-size: 0.95rem; }

    .document-offcanvas-text .document-text-content p {
        margin-bottom: 0.5em;
    }

    .document-offcanvas-text .document-text-content ul,
    .document-offcanvas-text .document-text-content ol {
        padding-left: 1.5em;
        margin-bottom: 0.5em;
    }

    .document-offcanvas-text .document-text-content table {
        width: 100%;
        border-collapse: collapse;
        margin: 0.5em 0;
        font-size: 0.85rem;
    }

        .document-offcanvas-text .document-text-content table th,
        .document-offcanvas-text .document-text-content table td {
            border: 1px solid #dee2e6;
            padding: 6px 10px;
            text-align: left;
        }

        .document-offcanvas-text .document-text-content table th {
            background-color: #f8f9fa;
            font-weight: 600;
        }

    .document-offcanvas-text .document-text-content code {
        background-color: #f1f3f5;
        padding: 2px 5px;
        border-radius: 3px;
        font-size: 0.88em;
    }

    .document-offcanvas-text .document-text-content pre {
        background-color: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 6px;
        padding: 12px;
        overflow-x: auto;
        margin: 0.5em 0;
    }

        .document-offcanvas-text .document-text-content pre code {
            background: none;
            padding: 0;
        }

    .document-offcanvas-text .document-text-content blockquote {
        border-left: 3px solid var(--bs-primary);
        padding-left: 12px;
        margin: 0.5em 0;
        color: #555;
    }

    .document-offcanvas-text .document-text-content hr {
        border: none;
        border-top: 1px solid #dee2e6;
        margin: 1em 0;
    }

/* Bloc surligné pour les lignes source (LigneDebut..LigneFin) */
.document-highlight-block {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 0.5em 0;
}

.document-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #adb5bd;
    text-align: center;
}

.document-empty-state .ti {
    font-size: 48px;
    margin-bottom: 12px;
}

.document-empty-state p {
    font-size: 14px;
    margin-bottom: 12px;
}

.document-offcanvas-info .document-info-section {
    margin-bottom: 14px;
}

.document-offcanvas-info .document-info-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 2px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.document-offcanvas-info p {
    font-size: 14px;
    margin-bottom: 0;
    color: #333;
}

/* En-tête métadonnées : type + date + objet */
.document-meta-header {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-left: 3px solid #0d6efd;
}

.document-meta-header .meta-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.document-meta-header .meta-type {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.document-meta-header .meta-type i {
    color: #0d6efd;
}

.document-meta-header .meta-date {
    color: #6c757d;
    font-size: 0.82rem;
}

.document-meta-header .meta-objet {
    color: #555;
    font-size: 0.84rem;
    margin-top: 6px;
    line-height: 1.45;
}

/* Grille métadonnées 2 colonnes */
.document-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.document-meta-grid .document-info-section {
    margin-bottom: 0;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 8px 12px;
}

.document-meta-grid .document-info-section p {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Infos techniques condensées */
.document-tech-info {
    font-size: 0.78rem;
    color: #9ca3af;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    margin-top: 16px;
    line-height: 1.5;
}

.document-tech-info i {
    font-size: 0.75rem;
}

/* Parties badges (DocumentOffcanvas) */
.parties-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.partie-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f4fd;
    color: #1a6fb5;
    border-radius: 10px;
    padding: 4px 12px;
    font-size: 13px;
}

.partie-badge strong {
    font-weight: 600;
}

.partie-role {
    font-size: 11px;
    color: #6c757d;
    font-weight: 400;
}

.document-summary-tabs {
    display: flex;
    gap: 6px;
}

.document-summary-content {
    font-size: 13px;
    line-height: 1.55;
    color: #555;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 14px 16px;
    border-left: 3px solid #e9ecef;
}

    .document-summary-content h1 {
        font-size: 0.88rem;
        font-weight: 700;
        margin-top: 0.6em;
        margin-bottom: 0.3em;
        color: #374151;
    }

    .document-summary-content h2 {
        font-size: 0.84rem;
        font-weight: 600;
        margin-top: 0.5em;
        margin-bottom: 0.25em;
        color: #4b5563;
    }

    .document-summary-content h3 {
        font-size: 0.82rem;
        font-weight: 600;
        margin-top: 0.4em;
        margin-bottom: 0.2em;
        color: #4b5563;
    }

    .document-summary-content h4,
    .document-summary-content h5,
    .document-summary-content h6 {
        font-size: 0.8rem;
        font-weight: 600;
        margin-top: 0.4em;
        margin-bottom: 0.2em;
        color: #6b7280;
    }

    /* Le premier titre est souvent redondant avec le label RÉSUMÉ IA */
    .document-summary-content > h1:first-child,
    .document-summary-content > h2:first-child,
    .document-summary-content > h3:first-child {
        margin-top: 0;
        font-size: 0.85rem;
        color: #374151;
    }

    .document-summary-content p { margin-bottom: 0.35em; }
    .document-summary-content ul, .document-summary-content ol { padding-left: 1.4em; margin-bottom: 0.35em; }
    .document-summary-content li { margin-bottom: 0.15em; }
    .document-summary-content p:last-child { margin-bottom: 0; }
    .document-summary-content strong { color: #333; }
    .document-summary-content hr { margin: 0.5em 0; border-color: #e5e7eb; }

.document-offcanvas-preview {
    height: 100%;
}

.document-preview-iframe {
    width: 100%;
    height: 100%;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.document-image-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
    overflow: auto;
}

    .document-image-preview img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

.document-media-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 6px;
}

    .document-media-preview video {
        max-width: 100%;
        max-height: 100%;
        border-radius: 6px;
    }

    .document-media-preview audio {
        width: 100%;
        max-width: 400px;
    }

.document-offcanvas-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.display-answer {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer {
    text-align: center;
    padding-top: 60px;
}

.hidden{
    display:none;
}

.display-answer:hover {
    background-color: #FFF !important;
}

.min-vh-20 {
    min-height: 20vh !important;
}
.min-vh-30 {
    min-height: 30vh !important;
}

.nav-carret {
    font-size: 16px;
    white-space: nowrap;
    align-items: center;
    line-height: 25px;
    position: relative;
    margin: 3px 3px 3x;
    padding: 2px;
    border-radius: 7px;
    gap: 10px;
    text-decoration: none;
    font-weight: 400;
    cursor: pointer;
}

    .nav-carret:hover {
        background-color: var(--bs-primary);
        color: var(--bs-white);
    }

    .nav-carret i {
        transition: transform 0.3s ease; /* Ajoute une transition sur la propri�t� transform */
        display: inline-block;
    }

    .nav-carret:not(.collapsed) i.ti-chevron-right {
        transform: rotate(90deg); /* ou toute autre angle selon le besoin */
    }

.sidebar-link.Space-AI-open span {
    margin-left: 15px !important;
}

.first-level {
    padding-left: 20px;
}

/* Hide first-level submenus when sidebar is collapsed (mini-sidebar) */
body[data-sidebartype=mini-sidebar] .left-sidebar .first-level {
    display: none !important;
}

/* Show submenus again on hover */
body[data-sidebartype=mini-sidebar] .left-sidebar:hover .first-level {
    display: block !important;
}

/* Rotation de l'ic�ne lorsque le menu est ouvert */
.nav-carret:not(.collapsed) .ti-chevron-right {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.nav-carret.collapsed .ti-chevron-right {
    transition: transform 0.3s ease;
}

.page_active a {
    color: var(--bs-primary);
}

.menu-workspace:last-child {
    margin-bottom:0px!important;
}

.Space-AI-open-child {
    padding: 4px 0;
    white-space: nowrap;
}

.cardblockeditor {
    display: block;
    color: var(--bs-heading-color);
}

.cardblockeditor p {
    margin-bottom: 0;
    color: var(--bs-card-title-color);
}

.dropdownlisubmenu:hover .dropdown-submenu
{
    display:block!important;
}

.dropdown-submenu-right
{
    margin-left: 100px;
}

.text-limit-2-lines {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-icon-v2-hover {
    position: relative;
    transition: all 0.3s ease-in-out;
}

.nav-icon-v2-hover:hover::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 25px;
    width: 25px;
    z-index: -1;
    border-radius: 100px;
    transition: all 0.3s ease-in-out;
    background-color: var(--bs-primary);
    color: #FFF;
}

.nav-icon-v2-hover:hover {
    color: #FFF;
}

#audioVisualizer {
    display: block;
    margin-left: auto;
    margin-right: auto;
    display: none;
    width: 200px;
    height: 35px;

}

.disabled-link {
    color: gray;
    cursor: not-allowed;
    pointer-events: none;
}

.appcardtitle {
    font-size: 20px;
    font-weight: bold;
    color: var(--bs-heading-color);
    padding-bottom: 20px;
    padding-left: 10px;
}

.bloc-table td
{
    padding:2px 10px ;
}

.bloc-table button {
    width: 35px !important;
    height: 35px !important;
    border:none;
}


.bloc-table th {
    padding: 10px;
}

.bloc_title {
    padding-bottom: 10px;
}

.bloc_body {
    margin: auto;
    width: 50%;
    padding: 10px;
}

.mb-20 {
    margin-bottom: 200px;
}

.chatbot_prompt_menu:hover {
    color: #5c59f3;
}

.chatbot_disabled button {
    color: #FFF !important;
    pointer-events: none;
    opacity: 0.5;
}

.chatbot_disabled {
    opacity: 1;
}

.chatbot_disabled .bg_FooterChatbot,
.chatbot_disabled.bg_FooterChatbot {
    opacity: 0.5;
}

.chatbot_disabled textarea {
    background-color: #F2F2F2 !important;
    pointer-events: none;
}

.loading-action span {
    opacity: 0;
    animation: fadeCycle 2s infinite ease-in-out;
}

.block-action-ui
{
    margin-bottom:80px;
}

@keyframes fadeCycle {
    0%, 100% {
        opacity: 0.6;
    }

    60% {
        opacity: 1;
    }
}

.loading-text span{
    animation-delay: 0s;
}

.load-hidden{
    display:none!important;
}

.btn_select_past:disabled {
    color: var(--bs-btn-disabled-color) !important;
    pointer-events: none;
    background-color: #FFF;
    border-color: var(--bs-btn-disabled-border-color) !important;
}

.dropdown-toggle-wf {
    background-color: #5954f3 !important;
    color: #FFF !important;
    --bs-btn-bg: #5954f3 !important;
    --bs-btn-border-color: #5954f3 !important;
    --bs-btn-hover-bg: #4f73d9 !important;
    --bs-btn-hover-border-color: #4f73d9 !important;
    --bs-btn-color: #fff !important;
}
.dropdown-toggle-wf::after {
    display: inline-block;
}

    .dropdown-toggle-wf:hover {
        --bs-btn-color: #fff !important;
        color: #FFF !important;
    }

    }


.icon-bg {
    background-color: #f1f3f5;
    border-radius: 50%;
    width: 40px !important;
    height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #DDD;
    min-width: 40px !important;
}

.icon-bg .ti {
    font-size: 20px;
    padding-top: 0;
}

.icon-bg .ti-robot {
    padding-top: 3px;
}

/*.menu-add-workspace {
    display: block;
    opacity: 0;
    transition: opacity 0.5s ease, visibility 0.5s;
}
.left-sidebar:hover .menu-add-workspace {
    opacity: 1;
}*/
@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0px rgba(0, 0, 0, 0.2);
    }

    100% {
        box-shadow: 0 0 0 6px rgba(0, 0, 0, 0);
    }
}

#offcanvasRightEdit, .custom-offcanvas-workflow {
    background-color: #5954f3;
}

@media (min-width: 992px) {
    #offcanvasRightEdit, .custom-offcanvas-workflow {
        width: 500px;
    }
}

#offcanvasRightEdit .form-control, #offcanvasRightEdit .form-select, .custom-offcanvas-workflow .form-control, .custom-offcanvas-workflow .form-select {
    background: #FFF;
    color: #000 !important;
}

#offcanvasRightEdit .form-control::placeholder,.custom-offcanvas-workflow .form-control::placeholder {
    color: #888; /* Couleur du placeholder */
    opacity: 1; /* Pour s'assurer que le placeholder est bien visible */
}

#offcanvasRightEdit .btn, .custom-offcanvas-workflow .btn {
    color: #5954F3 !important;
}
.custom-offcanvas-workflow {
    width:600px!important;
}
/* Cadre global --------------------------------------------------- */
.file-thumb-vertical {
    width: 130px; /* largeur du cadre */
    height: 80px; /* hauteur totale */
    border: 1px solid #e4e4e4;
    border-radius: .6rem;
    background: #fff;
    display: flex;
    flex-direction: column; /* empile ic�ne puis texte */
    align-items: center; /* centrage horizontal */
    justify-content: center; /* centrage vertical */
    position: relative; /* pour positionner le X */
    padding: .25rem .5rem;
    box-sizing: border-box;
    margin-right: 0.25rem;
}

/* Pictogramme DOCX ---------------------------------------------- */
.file-thumb-vertical .file-icon {
    font-size: 28px; /* taille ic�ne */
    line-height: 1;
}

/* Nom du fichier ------------------------------------------------- */
.file-thumb-vertical .file-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .72rem;
    margin-top: 2px; /* petit espace sous l�ic�ne */
    min-width: 0; /* indispensable avec flexbox */
    text-align: center;
}

/* Bouton de suppression ----------------------------------------- */
.file-thumb-vertical .btn-remove {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(40%,-40%); /* d�borde l�g�rement comme sur votre capture */
    cursor: pointer;
    font-size: 1rem;
}

.ChatTextArea {
    /* animation: 2s ease 0s infinite normal none running pulse-animation; */
    /* border-width: 3px !important; */
    /* border-style: solid !important; */
    /* border-color: rgb(255, 82, 82) !important; */
    /* border-image: initial !important; */
    background-color: #f5f5f5;
    margin: 0 45px !important;
    border-radius: 10px;
}

/* Chatbot tools button — outline primary, hover gray */
.chatbot-tools-btn {
    background-color: #FFFFFF !important;
    color: #5954F3 !important; /* Primary */
    border-color: #5954F3 !important;
}
.chatbot-tools-btn:hover {
    background-color: #EDF1F7 !important; /* Gray 200 */
    color: #5954F3 !important;
    border-color: #5954F3 !important;
}

/* Chatbot option buttons — uniform style */
.bg-chatbot,
.menu-prompt.bg-chatbot,
.bg-chatbot.nav-link {
    background-color: #FAFAFA !important; /* Gray 50 */
    color: #2A3547 !important; /* Gray 800 */
}
.bg-chatbot label,
.bg-chatbot a:not(.btn-primary),
.bg-chatbot button:not(.btn-primary),
.bg-chatbot p {
    color: #2A3547 !important; /* Gray 800 */
}

/* Style pour les options chatbot */
.chatbot-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.options-chatbot {
    font-weight: 500;
    font-size: 13px;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

/* Style des boutons du chatbot fichiers + envoi */
.buttons-chatbot {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
}

.buttons-chatbot > ul {
    list-style: none;
    margin-bottom: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.buttons-chatbot > div {
    display: flex;
    align-items: center;
}

@media (max-width: 576px) {
    .options-chatbot {
        font-weight: 600 !important;
        font-size: 0.65rem !important;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .options-chatbot>div{
        padding: 3px !important;
    }
}

@media only screen and (max-width: 1300px) {
    #divFooterChatbot {
        padding-inline: 10px!important;
    }
}

.icon-bg {
    background-color: #f1f3f5;
    border-radius: 50%;
    width: 40px !important;
    height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #DDD;
    min-width: 40px !important;
}

.icon-bg- .ti {
    font-size: 20px;
    padding-top: 0;
}

.icon-bg .ti-robot {
    padding-top: 3px;
}

.icon-bg-lefter {
    background-color: #f1f3f5;
    border-radius: 50%;
    width: 35px !important;
    height: 35px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #DDD;
    min-width: 40px !important;
}

.icon-bg-lefter .ti {
    font-size: 16px;
    padding-top: 0;
}

.siteWF-appear {
    animation: fadeIn 0.5s ease-in-out;
}

.file-drop-zone {
    display: flex;
    width: 100%;
    border: 2px dotted #aaaaaa;
    align-items: center;
    margin-bottom: 2px;
}

.hoverFileUpload {
    border-style: solid;
    background-color: #00ca71;
}

.div-sharepointFolders:hover > .dropdown > .icon-hover {
    display: block;
}

.div-sharepointFolders a.text-truncate {
    text-align: left;
}

.sidebar-Sharepoint {
    line-height: 2
}

.sidebar-Sharepoint .file-list {
    font-style: italic;
    font-weight: 500;
}

.sidebar-level {
    padding-left: 40px;
    border-left: 2px solid #DDD;
    border: 1px solid;
    margin-left: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bg_FooterChatbot {
    background-color: #FFFFFF;
    border-radius: 7px !important;
}

.text-chatbot {
    --bs-text-opacity: 1;
    color: #2a3547 !important;
}

/* Chatbot only: keep typed text clear of the absolutely positioned Tools (Outils) pill */
.chatbot-prompt-textarea {
    padding-right: 8.75rem !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 700px) {
    .card-conversation {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .card-conversation .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .card-conversation .ms-3 {
        margin-left: 0.5rem !important;
    }
    .card-WF .conversation-body {
        margin-left: -40px;
        padding-top: 10px
    }
    .card-body {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    .card-WF .card-body {
        padding-left: 0px !important;
        padding-right: 0px !important;
    }

    .card-WF {
        padding-left: 0px !important;
        padding-right: 0px !important;
        margin-left: 0px !important;
        margin-right: 0px !important;
    }

    .bg_FooterChatbot {
        margin-right: 0rem !important;
        margin-left: 0rem !important;
    }
    
}

.conversation-body {
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

ul.bulletpoint {
    list-style: disc !important;
}

h3.ChatbotTitle {
    margin-bottom: 0 !important;
}

hr.hr-chatbot {
    border-top: 2px solid #ebf1f6;
}

table.tablegeneratebyai {
    border-radius: 8px;
    border-collapse: separate; /* ou border-collapse: collapse; selon l'effet d�sir� */
    border-spacing: 0; /* pour �viter l'espacement entre les cellules si border-collapse: separate */
    border-radius: 8px; /* petit border-radius */
    overflow: hidden; /* pour que le border-radius s'applique aussi aux coins */
}

/* Style pour le bouton de copie qui appara�t au survol */


.copy-btn-hover {
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: #fff;
}

.divtableaicontainer:hover .copy-btn-hover {
    opacity: 1;
}


/* Pour tous les titres avec la classe ChatbotTitle */

.bg-dark .ChatbotTitle {
    color: white;
    font-size: �18px;
}

.precodeChat .ChatbotTitle {
    color: �white;
}

precodeChat H1 {
    font-size: 18px;
}

precodeChat H2 {
    font-size: 16px;
}

precodeChat H3 {
    font-size: 14px;
}

precodeChat H4 {
    font-size: 13px;
}

precodeChat H5 {
    font-size: 13px;
}

h1.ChatbotTitle {
    font-size: 1.4rem;
    margin-bottom: 2px !important;
    font-weight: 600;
}


h2.ChatbotTitle {
    font-size: 1.25rem;
    margin-bottom: 2px !important;
    font-weight: 600;
}


h3.ChatbotTitle {
    font-size: 1.125rem;
    margin-bottom: 2px !important;
    font-weight: 600;
}


h4.ChatbotTitle {
    font-size: 1rem;
    margin-bottom: 2px !important;
    font-weight: 600;
}

h5.ChatbotTitle {
    font-size: 1rem;
    margin-bottom: 2px !important;
    font-weight: 600;
}

h6.ChatbotTitle {
    font-size: 1rem;
    margin-bottom: 2px !important;
    font-weight: 600;
}

h7.ChatbotTitle {
    font-size: 1rem;
    margin-bottom: 2px !important;
    font-weight: 600;
}

h8.ChatbotTitle {
    font-size: 1rem;
    margin-bottom: 2px !important;
    font-weight: 600;
}

.sidebar-item {
    transition: all 0.2s ease;
    border-radius: 0.375rem;
}

.sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.sidebar-arrow {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.sidebar-item:hover .sidebar-arrow {
    opacity: 1;
    width: 16px;
    margin-left: 8px;
}

.hpt-class {
    display: none !important;
  visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
}

.ti-loader {
    display: inline-block;
    animation: spinner-rotation 0.8s linear infinite;
}

@keyframes spinner-rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Monaco Editor Wrapper and Toolbar Styles */
.monaco-editor-wrapper {
    position: relative;
 margin-top: 5px;
}

.monaco-editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 0.25rem 0.25rem 0 0;
    gap: 10px;
}

.monaco-toolbar-left,
.monaco-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Language Badge */
.monaco-language-badge {
    display: inline-block;
    padding: 2px 8px;
    background-color: #e7f1ff;
color: #5d87ff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Validation Badge */
.monaco-validation-badge {
  display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
  border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
  cursor: help;
    transition: all 0.2s ease;
}

.monaco-validation-badge i {
    font-size: 14px;
}

.badge-success {
    background-color: #e6f4ea;
    color: #13795b;
}

.badge-error {
    background-color: #fce8e6;
    color: #d32f2f;
}

.badge-warning {
    background-color: #fff4e5;
    color: #f57c00;
}

/* Toolbar Separator */
.monaco-toolbar-separator {
    width: 1px;
    height: 20px;
    background-color: #dee2e6;
    display: inline-block;
}

/* Toolbar Buttons */
.monaco-format-btn,
.monaco-copy-btn,
.monaco-fullscreen-btn {
    background: none;
  border: none;
    color: #5d87ff;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.monaco-format-btn:hover,
.monaco-copy-btn:hover,
.monaco-fullscreen-btn:hover {
    background-color: #e7f1ff;
    color: #4570ea;
}

.monaco-format-btn.btn-success,
.monaco-copy-btn.btn-success {
    background-color: #e6f4ea;
    color: #13795b;
}

.monaco-format-btn i,
.monaco-copy-btn i,
.monaco-fullscreen-btn i {
    display: block;
}

/* Monaco Editor Container */
.monaco-editor-wrapper .monaco-editor-container {
    border-radius: 0 0 0.25rem 0.25rem !important;
}

/* Fullscreen Mode Styles */
.monaco-fullscreen {
    z-index: 9999 !important;
    background-color: white;
    padding: 0;
}

.monaco-fullscreen .monaco-editor-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #2d2d2d;
 border-color: #1e1e1e;
}

.monaco-fullscreen .monaco-language-badge {
    background-color: #3e3e42;
    color: #ffffff;
}

.monaco-fullscreen .monaco-validation-badge.badge-success {
    background-color: #1e4620;
    color: #a5d6a7;
}

.monaco-fullscreen .monaco-validation-badge.badge-error {
    background-color: #5f2120;
    color: #ef9a9a;
}

.monaco-fullscreen .monaco-validation-badge.badge-warning {
    background-color: #663c00;
 color: #ffcc80;
}

.monaco-fullscreen .monaco-toolbar-separator {
    background-color: #555;
}

.monaco-fullscreen .monaco-format-btn,
.monaco-fullscreen .monaco-copy-btn,
.monaco-fullscreen .monaco-fullscreen-btn {
    color: #ffffff;
}

.monaco-fullscreen .monaco-format-btn:hover,
.monaco-fullscreen .monaco-copy-btn:hover,
.monaco-fullscreen .monaco-fullscreen-btn:hover {
    background-color: #3e3e42;
color: #ffffff;
}

.monaco-fullscreen .monaco-editor-container {
    height: calc(100vh - 45px) !important;
    border-radius: 0 !important;
  border: none !important;
}

/* Fullscreen API Styles */
.monaco-editor-wrapper:fullscreen {
    display: flex;
    flex-direction: column;
  width: 100%;
    height: 100%;
}

.monaco-editor-wrapper:-webkit-full-screen {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.monaco-editor-wrapper:-moz-full-screen {
    display: flex;
    flex-direction: column;
    width: 100%;
 height: 100%;
}

.monaco-editor-wrapper:-ms-fullscreen {
    display: flex;
  flex-direction: column;
    width: 100%;
    height: 100%;
}

#chatTextareaRecordingProgress {
    display: none;
    font-weight: bold;
    font-size: 17px;
    color: black;
    border: none;
    min-height: 63px;
}

.workflow-footer-chat-actions {
    z-index: 2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .monaco-editor-toolbar {
        flex-wrap: wrap;
        gap: 5px;
    }

  .monaco-toolbar-left,
    .monaco-toolbar-right {
        gap: 5px;
    }

    .monaco-language-badge,
    .monaco-validation-badge {
      font-size: 10px;
        padding: 2px 6px;
    }

    .monaco-format-btn,
    .monaco-copy-btn,
  .monaco-fullscreen-btn {
        font-size: 16px;
      padding: 3px 6px;
    }
}

/* Styles pour les sources de documents dans les workflows */
.document-source-link {
    cursor: pointer;
    text-decoration: underline;
    color: #0d6efd;
}

.document-source-link:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.document-source-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

.document-source-content::-webkit-scrollbar {
    width: 6px;
}

.document-source-content::-webkit-scrollbar-track {
    background: transparent;
}

.document-source-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.document-source-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════════════════════════════
   PERSO MENU — Side panel navigation list
   ═══════════════════════════════════════════════ */
.perso-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.perso-menu-item {
    border-bottom: 1px solid #EDF1F7; /* Gray 200 */
}
.perso-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    text-decoration: none;
    color: #2A3547; /* Gray 800 */
    font-size: 13px;
    font-weight: 400;
    transition: background-color 0.12s;
}
.perso-menu-link:hover {
    background-color: #EDF1F7; /* Gray 200 */
    color: #2A3547;
    text-decoration: none;
}
.perso-menu-link i {
    font-size: 18px;
    color: #8494AD; /* Gray 500 */
    flex-shrink: 0;
}

/* Structure pour l'affichage des lignes de document */
.document-line-wrapper {
    min-height: 1.6em;
    margin-bottom: 0;
}

.document-line-content {
    font-family: 'Montserrat', monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--bs-body-color);
}

    .document-line-content :is(h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6) {
        font-size: 13px !important;
        padding: 5px 0px !important;
    }

.document-line-wrapper.document-line-highlight {
    background-color: #fffacd;
}

.document-line-wrapper.document-line-highlight .document-line-content {
    background-color: transparent;
}

/* Séparateur de page avec numéro centré sur une seule ligne */
.document-page-break {
    margin: 15px 0;
    padding: 10px 0;
    position: relative;
    text-align: center;
}

.document-page-break::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background-color: #eee;
    z-index: 0;
}

.document-page-break-label {
    position: relative;
    display: inline-block;
    padding: 0 15px;
    background-color: #f8f9fa;
    color: #888;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    z-index: 1;
}

.detected-variables-truncate {
    display: inline-block;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

    .detected-variables-truncate:hover {
        cursor: help;
    }

/* ═══════════════════════════════════════════════
   SIDEBAR — Design System v1.4.2
   76px fixed, Gray 200 background, no shadow
   ═══════════════════════════════════════════════ */
.sidebar-mini-fixed {
    width: 76px !important;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    background: #EDF1F7 !important; /* Gray 200 */
    border-right: 1px solid #D5DCE8; /* Gray 300 */
    box-shadow: none !important;
    transition: none !important;
}
.sidebar-mini-fixed > div:first-child {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.sidebar-mini-fixed .brand-logo {
    padding: 12px 0 4px;
}
.sidebar-logo-mini {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}
.sidebar-mini-fixed .sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

/* Nav items — 61x61 containers */
.sidebar-mini-nav {
    list-style: none;
    padding: 4px 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.sidebar-mini-item {
    width: 100%;
    display: flex;
    justify-content: center;
}
.sidebar-mini-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 61px;
    height: 61px;
    border-radius: 5px;
    color: #2A3547; /* Gray 800 */
    text-decoration: none;
    transition: background-color 0.15s;
    text-align: center;
    background: transparent;
    border: none;
}
.sidebar-mini-link i {
    font-size: 20px;
    line-height: 1;
}
.sidebar-mini-link span {
    font-size: 9px;
    font-weight: 400;
    line-height: 1.2;
    color: #2A3547; /* Gray 800 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 58px;
}
.sidebar-mini-link:hover {
    background-color: #FFFFFF;
    color: #2A3547;
    text-decoration: none;
}
.sidebar-mini-link:hover span {
    color: #2A3547;
}
.sidebar-mini-link.active,
.sidebar-mini-item.active .sidebar-mini-link {
    background-color: #FFFFFF;
    color: #5954F3; /* Primary */
}
.sidebar-mini-link.active span,
.sidebar-mini-item.active .sidebar-mini-link span {
    color: #5954F3;
}

/* ═══════════════════════════════════════════════
   SIDEBAR BOTTOM — Settings + Account
   ═══════════════════════════════════════════════ */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 0 12px;
    margin-top: auto;
}
.sidebar-bottom-item {
    display: flex;
    justify-content: center;
}
.sidebar-bottom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 61px;
    height: 45px;
    border-radius: 5px;
    color: #2A3547; /* Gray 800 */
    font-size: 20px;
    text-decoration: none;
    transition: background-color 0.15s;
    cursor: pointer;
    border: none;
    background: transparent;
}
.sidebar-bottom-btn:hover {
    background-color: #FFFFFF;
}
.sidebar-avatar {
    width: 20px;
    height: 20px;
    object-fit: cover;
}

/* ═══════════════════════════════════════════════
   DROPDOWN — Design System v1.0.3
   ═══════════════════════════════════════════════ */
.sidebar-popover {
    min-width: 260px;
    padding: 10px 8px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    border: none;
}
.sidebar-popover-header {
    padding: 4px 12px 8px;
    font-size: 14px;
    color: #2A3547; /* Gray 800 */
}
.sidebar-popover .dropdown-item {
    border-radius: 10px;
    font-size: 14px;
    padding: 8px 12px;
    color: #2A3547; /* Gray 800 */
}
.sidebar-popover .dropdown-item:hover {
    background-color: #EDF1F7; /* Gray 200 */
    color: #2A3547;
}
.sidebar-popover .dropdown-item.text-danger,
.sidebar-popover button.text-danger {
    color: #FA896B !important; /* Danger */
}
.sidebar-popover .dropdown-item.text-danger:hover,
.sidebar-popover button.text-danger:hover {
    background-color: #FFF5F5;
    color: #FA896B !important;
}
.sidebar-popover .border-top {
    border-color: #D5DCE8 !important; /* Gray 300 */
}
.sidebar-popover-account {
    min-width: 280px;
}

/* ═══════════════════════════════════════════════
   SIDE PANEL — Slides next to sidebar (Option A)
   ═══════════════════════════════════════════════ */
.side-panel {
    position: fixed;
    top: 0;
    left: 76px; /* Right edge of sidebar */
    bottom: 0;
    width: 380px;
    background: #FFFFFF;
    border-right: 1px solid #D5DCE8; /* Gray 300 */
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.06);
    z-index: 1035;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.side-panel.open {
    transform: translateX(0);
}
.side-panel-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.side-panel-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.side-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #D5DCE8; /* Gray 300 */
    min-height: 56px;
}
.side-panel-header h6 {
    font-size: 16px;
    font-weight: 600;
    color: #2A3547; /* Gray 800 */
}
.side-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}
.side-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 1034;
    display: none;
}
.side-panel-overlay.open {
    display: block;
}

/* ═══════════════════════════════════════════════
   HISTORY PANEL — DS styled
   ═══════════════════════════════════════════════ */
.side-panel-body-history {
    padding: 0;
}
.history-filters {
    display: flex;
    justify-content: center;
    padding: 12px 16px;
    border-bottom: 1px solid #EDF1F7; /* Gray 200 */
}
.history-filter-group {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #D5DCE8; /* Gray 300 */
}
.history-filter-btn {
    font-size: 16px;
    padding: 6px 12px;
    border: none;
    border-right: 1px solid #D5DCE8; /* Gray 300 */
    border-radius: 0;
    color: #8494AD; /* Gray 500 */
    background: transparent;
}
.history-filter-btn:last-of-type {
    border-right: none;
}
.history-filter-btn:hover {
    background-color: #EDF1F7; /* Gray 200 */
    color: #2A3547; /* Gray 800 */
}
.btn-check:checked + .history-filter-btn {
    background-color: #5954F3; /* Primary */
    color: #FFFFFF;
    border-color: transparent;
}
.btn-check:checked + .history-filter-btn:hover {
    background-color: #4843d4;
    color: #FFFFFF;
}
/* Keep full opacity even when disabled (last active filter) */
.btn-check:disabled + .history-filter-btn,
.btn-check[disabled] + .history-filter-btn {
    opacity: 1;
    pointer-events: none;
}
.btn-check:checked:disabled + .history-filter-btn,
.btn-check:checked[disabled] + .history-filter-btn {
    background-color: #5954F3;
    color: #FFFFFF;
    opacity: 1;
}
.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.history-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #8494AD; /* Gray 500 */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 16px 4px;
    list-style: none;
}
.history-item {
    display: flex;
    align-items: center;
    list-style: none;
    border-bottom: 1px solid #EDF1F7; /* Gray 200 */
}
.history-item-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    text-decoration: none;
    color: #2A3547; /* Gray 800 */
    font-size: 13px;
    font-weight: 400;
    min-width: 0;
    transition: background-color 0.12s;
}
.history-item-link:hover {
    background-color: #EDF1F7; /* Gray 200 — full-bleed */
    color: #2A3547;
    text-decoration: none;
}
.history-item-link i {
    flex-shrink: 0;
    font-size: 16px;
    color: #8494AD; /* Gray 500 */
}
.history-item-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.history-item-actions {
    flex-shrink: 0;
    padding-right: 8px;
}
.history-item-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 5px;
    color: #8494AD; /* Gray 500 */
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s, background-color 0.12s;
}
.history-item:hover .history-item-menu-btn {
    opacity: 1;
}
.history-item-menu-btn:hover {
    background-color: #EDF1F7; /* Gray 200 */
    color: #2A3547;
}
.history-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 16px;
    font-size: 12px;
    color: #8494AD; /* Gray 500 */
    cursor: pointer;
    list-style: none;
    transition: background-color 0.12s;
}
.history-load-more:hover {
    background-color: #EDF1F7;
    color: #2A3547;
}

/* ═══════════════════════════════════════════════
   SEARCH PANEL — DS styled
   ═══════════════════════════════════════════════ */
.search-panel-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.search-panel-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #EDF1F7; /* Gray 200 */
}
.search-panel-input .form-control {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #D5DCE8; /* Gray 300 */
    background: #FAFAFA; /* Gray 50 */
}
.search-panel-input .form-control:focus {
    border-color: #5954F3; /* Primary */
    box-shadow: none;
}
.search-panel-icon {
    color: #8494AD; /* Gray 500 */
    font-size: 18px;
    flex-shrink: 0;
}
.search-panel-icon:hover {
    color: #2A3547; /* Gray 800 */
}
.search-panel-results {
    flex: 1;
    overflow-y: auto;
}
.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
/* Search items — same structure as history items */
.search-result-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #EDF1F7; /* Gray 200 */
}
.search-result-link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    text-decoration: none;
    color: #2A3547; /* Gray 800 */
    font-size: 13px;
    min-width: 0;
    transition: background-color 0.12s;
}
.search-result-link:hover {
    background-color: #EDF1F7; /* Gray 200 — full-bleed */
    text-decoration: none;
    color: #2A3547;
}
.search-result-icon {
    flex-shrink: 0;
    font-size: 16px;
    color: #8494AD; /* Gray 500 */
    align-self: flex-start;
    margin-top: 1px;
}
.search-result-body {
    flex: 1;
    min-width: 0;
}
.search-result-title {
    font-size: 13px;
    font-weight: 400;
    color: #2A3547; /* Gray 800 */
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-result-date {
    font-size: 11px;
    color: #8494AD; /* Gray 500 */
    margin-top: 1px;
}
.search-result-extract {
    font-size: 12px;
    color: #5E708D; /* Gray 600 */
    line-height: 1.4;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Highlighted search term */
.search-result-extract mark,
.search-result-extract .highlight {
    background-color: rgba(89, 84, 243, 0.15); /* Primary light */
    color: #5954F3;
    border-radius: 2px;
    padding: 0 2px;
}

/* Page wrapper offset for fixed sidebar */
.sidebar-mini-fixed ~ .page-wrapper {
    margin-left: 76px;
}

/* ═══════════════════════════════════════════════
   TOP BAR — Design System v1.1.2
   Visible only on Modules & Projets pages
   ═══════════════════════════════════════════════ */
.topbar {
    height: 60px; /* DS Top Bar */
    border-bottom: 1px solid #D5DCE8; /* Gray 300 */
    background-color: #FAFAFA; /* Gray 50 — same as page bg */
    box-shadow: none;
}
.topbar .navbar {
    height: 60px !important;
    min-height: 60px !important;
    align-items: center;
}
/* Breadcrumb — DS Top Bar v1.1.2 */
.header-breadcrumb-item {
    padding: 4px 8px;
    border-radius: 5px;
    transition: background-color 0.15s;
    color: #2A3547 !important; /* Gray 800 */
    font-weight: 600;
    font-size: 16px;
    text-decoration: none !important;
}
.header-breadcrumb-item:hover {
    background-color: #EDF1F7; /* Gray 200 */
    color: #2A3547 !important;
    text-decoration: none !important;
}
.header-breadcrumb-sep {
    color: #2A3547 !important;
}
.header-breadcrumb-current {
    color: #2A3547 !important;
    font-weight: 600;
    font-size: 16px;
}

/* ═══════════════════════════════════════════════
   MOBILE — Sidebar hidden, hamburger header
   ═══════════════════════════════════════════════ */

/* Mobile header — hidden on desktop */
.topbar-mobile {
    display: none;
}
/* Hamburger inside topbar — hidden on desktop (after .mobile-hamburger to win specificity) */
/* Mobile overlay — hidden by default */
.mobile-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1039; /* below sidebar 1040 */
    display: none;
}
.mobile-sidebar-overlay.open {
    display: block;
}
/* Hamburger button base style */
.mobile-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 5px;
    color: #2A3547; /* Gray 800 */
    font-size: 22px;
    cursor: pointer;
}
/* Hidden on desktop — !important to beat .mobile-hamburger display:flex */
.mobile-hamburger-topbar {
    display: none !important;
    flex-shrink: 0;
}
.mobile-hamburger:hover {
    background-color: #EDF1F7; /* Gray 200 */
}
.mobile-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

@media (max-width: 768px) {
    /* Sidebar hidden by default on mobile */
    .sidebar-mini-fixed {
        transform: translateX(-76px);
        transition: transform 0.25s ease !important;
    }
    .sidebar-mini-fixed.mobile-open {
        transform: translateX(0);
    }

    /* Page wrapper full width */
    .sidebar-mini-fixed ~ .page-wrapper {
        margin-left: 0 !important;
    }

    /* Mobile header visible */
    .topbar-mobile {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        background: #FAFAFA; /* Gray 50 */
        border-bottom: 1px solid #D5DCE8; /* Gray 300 */
        position: sticky;
        top: 0;
        z-index: 1030;
    }

    /* Hamburger inside topbar visible on mobile */
    .mobile-hamburger-topbar {
        display: flex !important;
    }

    /* When ShowTopBar is active, hide the standalone mobile header */
    .topbar ~ .topbar-mobile {
        display: none;
    }
    /* Actually: topbar-mobile comes before topbar in DOM, so hide it when topbar exists */
    .topbar-mobile:has(~ .topbar) {
        display: none;
    }

    /* Side panel full screen on mobile */
    .side-panel {
        left: 0;
        width: 100%;
    }

    /* Topbar adjustments */
    .topbar .navbar {
        min-height: 50px !important;
    }
    .topbar {
        width: 100% !important;
    }

    /* body-wrapper no top padding when no topbar */
    .body-wrapper-no-topbar {
        padding-top: 0 !important;
    }
}