/* GMAO Directus-Style Integration Suite Theme */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --bg-main: #f8fafc;
    --bg-sidebar: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #1e293b;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --success: #10b981;
    --success-light: #ecfdf5;
    --info: #06b6d4;
    --drawer-width: 480px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* SIDEBAR DIRECTUS */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid #1e293b;
    user-select: none;
}

.sidebar-brand {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #1e293b;
}

.brand-icon {
    font-size: 24px;
    background: #1e293b;
    padding: 6px 10px;
    border-radius: 8px;
}

.brand-title {
    font-weight: 700;
    font-size: 15px;
    color: #f8fafc;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.project-selector-box {
    padding: 14px 18px;
    border-bottom: 1px solid #1e293b;
}

.project-label {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 6px;
}

.project-select {
    width: 100%;
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid #334155;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px;
}

.nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #475569;
    padding: 8px 12px 4px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nav-item:hover {
    background: #1e293b;
    color: #f8fafc;
}

.nav-item.active {
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
}

.nav-item .badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 12px;
    font-weight: 700;
}

.nav-item .badge.badge-neutral {
    background: #334155;
    color: #cbd5e1;
}

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid #1e293b;
    background: #090d16;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}

.user-profile-badge:hover {
    background: #1e293b;
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 13px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-details {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 12px;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role-tag {
    font-size: 10px;
    color: #38bdf8;
    font-weight: 600;
}

/* MAIN CONTENT AREA */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.topbar {
    height: 60px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-outline {
    background: white;
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover {
    background: #f1f5f9;
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-success {
    background: var(--success);
    color: white;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* KPI CARDS */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.kpi-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 10px;
}

.kpi-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* DATA TABLE */
.table-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    overflow: hidden;
}

.table-toolbar {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    background: #fafbfc;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    width: 320px;
    gap: 8px;
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 13px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background: #f8fafc;
    text-align: left;
    padding: 10px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    user-select: none;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr {
    cursor: pointer;
    transition: background 0.1s ease;
}

.data-table tbody tr:hover {
    background: #f1f5f9;
}

.badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-conform {
    background: var(--success-light);
    color: #065f46;
}

.badge-nonconform {
    background: var(--danger-light);
    color: #991b1b;
}

.badge-bloquant {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

.badge-majeur {
    background: #ffedd5;
    color: #9a3412;
    border: 1px solid #fb923c;
}

.badge-mineur {
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #7dd3fc;
}

/* RIGHT DRAWER CONTEXTUEL */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 998;
    display: none;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--drawer-width);
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafbfc;
}

.drawer-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.drawer-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: monospace;
}

.drawer-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    border-radius: 4px;
}
.drawer-close:hover {
    background: #e2e8f0;
}

.drawer-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
}

.drawer-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.drawer-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: #f8fafc;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    background: white;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

.drawer-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #fafbfc;
}

/* CHAT & COLLABORATION STYLES */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    max-width: 90%;
}

.chat-bubble.mine {
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
    align-self: flex-end;
}

.chat-bubble.theirs {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    align-self: flex-start;
}

.chat-meta {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.chat-input-box {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: white;
    width: 520px;
    max-width: 90vw;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    overflow: hidden;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 14px 20px;
    background: #fafbfc;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* MODALE GRAND FORMAT (50% DE L'ÉCRAN POUR FICHE COMPLÈTE) */
.modal-half {
    background: white;
    width: 50vw;
    min-width: 680px;
    max-width: 95vw;
    height: 90vh;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-half .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* SPLIT LAYOUT (TREEVIEW GAUCHE + FICHE/MATÉRIELS DROITE) */
.split-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    height: calc(100vh - 140px);
}

.tree-panel {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tree-panel-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    background: #fafbfc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 13px;
}

.tree-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.tree-node {
    margin-left: 12px;
    font-size: 13px;
}

.tree-node-content {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.tree-node-content:hover {
    background: #f1f5f9;
}

.tree-node-content.selected {
    background: #eff6ff;
    color: var(--primary);
    font-weight: 600;
}

.tree-caret {
    font-size: 10px;
    width: 14px;
    display: inline-block;
    color: #64748b;
    transition: transform 0.2s ease;
}

.tree-caret.collapsed {
    transform: rotate(-90deg);
}

.tree-count {
    margin-left: auto;
    font-size: 10px;
    background: #e2e8f0;
    color: #475569;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.form-panel {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.form-panel-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    background: #fafbfc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* TOPOLOGIE RÉSEAU VIRTUELLE */
.network-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
}

.network-header {
    padding: 12px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.network-body {
    padding: 14px 18px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.switch-box {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    background: #fcfdfe;
}

.switch-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.device-item {
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dotted #e2e8f0;
}

.device-item:last-child {
    border-bottom: none;
}

/* BADGES DE CONFORMITÉ GÉNÉRALISÉS */
.badge-ok {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-incoherence {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-nonconforme {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.clickable-ref {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}
.clickable-ref:hover {
    color: var(--primary-hover);
}

/* VIGNETTES CONFORMITÉ GÉNÉRALISÉES (Vert OK, Orange Incohérence, Rouge Non conforme) */
.badge-ok {
    background: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #86efac !important;
}

.badge-incoherence {
    background: #ffedd5 !important;
    color: #9a3412 !important;
    border: 1px solid #fdba74 !important;
}

.badge-nonconforme {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
}

/* BANDEAU ÉCOSYSTÈME RELATIONNEL GMAO (7 LIENS) */
.ecosystem-container {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.ecosystem-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ecosystem-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ecosystem-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ecosystem-pill:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

.ecosystem-pill.active {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
    font-weight: 600;
}

.ecosystem-pill.empty {
    background: #f8fafc;
    border-style: dashed;
    color: #94a3b8;
}

/* QUESTIONNAIRE DE DÉMARRAGE DE CONTRAT & CADRAGE MÉTHODE */
.questionnaire-hero {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.readiness-bar-bg {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin: 8px 0;
}

.readiness-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.question-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.question-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(37,99,235,0.06);
}

.question-card.bloquant {
    border-left: 4px solid #ef4444;
}

.question-card.conforme {
    border-left: 4px solid #10b981;
}

.question-card.en-cours {
    border-left: 4px solid #f59e0b;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.category-tab {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: white;
    border: 1px solid #cbd5e1;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.category-tab:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.category-tab.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* NAVIGATION RAPIDE PAR THÈMES & RETOUR HAUT DE PAGE */
.theme-nav-sticky {
    position: sticky;
    top: 10px;
    z-index: 35;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    padding: 10px 14px;
    margin-bottom: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.theme-pills-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.theme-jump-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.theme-jump-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.theme-jump-pill.active {
    background: #2563eb;
    color: white;
    border-color: #1d4ed8;
    box-shadow: 0 2px 6px rgba(37,99,235,0.25);
}

.theme-section-header {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #2563eb;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    scroll-margin-top: 90px;
}

.theme-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-remonter-theme {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    background: white;
    border: 1px solid #cbd5e1;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-remonter-theme:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #94a3b8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-floating-remonter {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    background: #1e293b;
    color: white;
    padding: 10px 16px;
    border-radius: 9999px;
    border: 1px solid #475569;
    box-shadow: 0 4px 16px rgba(0,0,0,0.28);
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-floating-remonter:hover {
    background: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.category-tab.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* BOUTONS ET COMPOSANTS FICOM & FRICTIONS */
.btn-secondary {
    background: #0ea5e9;
    color: white;
}
.btn-secondary:hover {
    background: #0284c7;
}

.btn-warning {
    background: var(--warning);
    color: white;
}
.btn-warning:hover {
    background: #d97706;
}

/* BANNIÈRE DE REPRISE DE SAISIE DISCONTINUE */
.discontinuous-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.discontinuous-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.discontinuous-banner-icon {
    font-size: 24px;
    background: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* CARTES JALONS DU WORKFLOW FICOM (DMAIC) */
.ficom-step-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    border-left: 6px solid #94a3b8;
}

.ficom-step-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ficom-step-card.valide {
    border-left-color: #10b981;
}

.ficom-step-card.en_cours {
    border-left-color: #3b82f6;
    background: #fbfdff;
}

.ficom-step-card.bloque_arbitrage {
    border-left-color: #ef4444;
    background: #fff8f8;
}

.ficom-step-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ficom-step-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.ficom-badge-valide {
    background: #dcfce7;
    color: #15803d;
}

.ficom-badge-en_cours {
    background: #dbeafe;
    color: #1d4ed8;
}

.ficom-badge-bloque {
    background: #fee2e2;
    color: #b91c1c;
    animation: pulse 2s infinite;
}

.ficom-badge-attente {
    background: #f1f5f9;
    color: #64748b;
}

/* NIVEAUX DE ZOOM FICOM */
.zoom-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.zoom-tab {
    padding: 7px 16px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: white;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.zoom-tab.active {
    background: #1e293b;
    color: white;
    border-color: #1e293b;
}

/* MODALE FRICTION & CHATBOT */
.friction-bubble {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.friction-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}

.friction-chip {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.friction-chip:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

/* SOUS-NAVIGATION ONGLETS FICOM & CADRAGE FUSIONNÉS */
.ficom-nav-bar {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
    padding-bottom: 0px;
    overflow-x: auto;
}

.ficom-nav-btn {
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ficom-nav-btn:hover {
    color: #1e293b;
    background: #f8fafc;
    border-radius: 6px 6px 0 0;
}

.ficom-nav-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 700;
    background: #eff6ff;
    border-radius: 6px 6px 0 0;
}

.ficom-checklist-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.ficom-checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
}

.ficom-checklist-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2563eb;
}

/* FILTRES PAR STATUT DU QUESTIONNAIRE */
.q-status-filter-btn {
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.q-status-filter-btn:hover {
    background: #e2e8f0;
}

.q-status-filter-btn.active {
    background: #0f172a !important;
    color: white !important;
    border-color: #0f172a !important;
}

.q-status-filter-btn#btnQFilterStatus_VALIDE.active {
    background: #16a34a !important;
    color: white !important;
    border-color: #16a34a !important;
}

.q-status-filter-btn#btnQFilterStatus_A_ARBITRER.active {
    background: #d97706 !important;
    color: white !important;
    border-color: #d97706 !important;
}

.q-status-filter-btn#btnQFilterStatus_BLOQUANT.active {
    background: #dc2626 !important;
    color: white !important;
    border-color: #dc2626 !important;
}

/* =========================================================
   AUTHENTIFICATION SIMPLE (PASSWORD GATE: Digitalorder)
   ========================================================= */
.auth-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 440px;
    padding: 36px 32px;
    text-align: center;
    animation: authCardIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: inline-block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.auth-card-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
}

.auth-card-header p {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 24px 0;
}

.auth-form {
    text-align: left;
}

.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    pointer-events: none;
    color: #94a3b8;
}

.auth-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    font-size: 15px;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.auth-input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.auth-error-msg {
    margin-top: 8px;
    font-size: 13px;
    color: #ef4444;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    justify-content: center;
    margin-top: 4px;
}

.auth-footer-hint {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
}



