:root {
    --bg: #ffffff;
    --panel: #ffffff;
    --panel-soft: #f8f9fb;
    --border: #d9dde3;
    --text: #1f2933;
    --muted: #6b7280;
    --accent: #c43b32;
    --accent-soft: #f3dedc;
    --sidebar: #252a31;
    --sidebar-soft: #2f3540;
    --sidebar-text: #d7dce3;
    --sidebar-muted: #8f98a6;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    
    --card-bg: #ffffff;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

body.intra-app {
    height: 100vh;
    overflow: hidden;
}

.intra-shell {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

#intra-content[data-current-page="fours"] {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.intra-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px 1fr;
}

.intra-sidebar {
    background: var(--sidebar);
    color: var(--sidebar-text);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    height: 84px;
    padding: 18px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 22px;
}

.brand-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.brand-zone {
    margin-top: 2px;
    font-size: 13px;
    color: var(--sidebar-muted);
}

.sidebar-menu {
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    height: 46px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.sidebar-link i {
    width: 22px;
    color: var(--sidebar-muted);
    text-align: center;
}

.sidebar-link:hover {
    background: var(--sidebar-soft);
    color: white;
}

.sidebar-link:hover i {
    color: white;
}

.sidebar-link.active {
    background: var(--accent);
    color: white;
    box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.45);
}

.sidebar-link.active i {
    color: white;
}

.intra-main {
    min-width: 0;
    padding: 28px;
}

.intra-page-title {
    min-height: 72px;
    margin-bottom: 22px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.intra-page-title h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.intra-page-title p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.intra-page-content {
    padding: 24px;
}

.card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: none;
}

.card h2 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 650;
}

.echart {
    width: 100%;
    height: 280px;
}

.echart.tall {
    height: 420px;
}

.meteo-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
}

.meteo-grid .large {
    grid-row: span 2;
}

.page-title {
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    
    display: none;
}

.page-title h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.page-title p {
    margin: 6px 0 0;
    color: var(--muted);
}

.page-updated {
    color: var(--muted);
    font-size: 13px;
    background: var(--panel-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 12px;
}

.intra-content {
    padding: 28px;
    width: 100%;
}

.intra-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px 1fr;
    background: var(--bg);
}

.intra-home {
    background: #111827;
    color: white;
}

@media (max-width: 900px) {
    .intra-shell,
    .intra-page {
        grid-template-columns: 76px 1fr;
    }

    .sidebar-brand {
        justify-content: center;
        padding: 14px 8px;
    }

    .sidebar-brand > div:not(.brand-mark),
    .sidebar-link span {
        display: none;
    }

    .sidebar-link {
        justify-content: center;
        padding: 0;
    }

    .meteo-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-toggle {
        display: none;
    }

}


.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.tile {
    min-height: 150px;
    padding: 22px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.tile:hover {
    transform: translateY(-2px);
    border-color: #c5cbd3;
    color: var(--text);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.tile i {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 21px;
}

.tile h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
}

.tile p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}


.kuma-frame {
    width: 100%;
    height: calc(100vh - 170px);
    border: 0;
    border-radius: 14px;
    background: white;
}







.intra-content {
    padding: 48px 52px;
}

.page-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 28px;
}

.page-title h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
    color: #111827;
}

.page-title p {
    margin: 0;
    max-width: 520px;
    color: #667085;
    line-height: 1.5;
}

.page-updated {
    padding: 9px 14px;
    border: 1px solid #d9dee8;
    border-radius: 999px;
    color: #667085;
    font-size: 13px;
    background: #f8fafc;
}

.tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 24px;
    padding: 6px;
    background: #f3f5f8;
    border: 1px solid #e1e6ef;
    border-radius: 14px;
}

.tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 10px;
    color: #667085;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.tab:hover {
    color: #111827;
    background: #ffffff;
    text-decoration: none;
}

.tab.active {
    color: #ffffff;
    background: #c84f3f;
    box-shadow: 0 6px 16px rgba(200, 79, 63, .25);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.chart-card {
    padding: 18px;
    margin-bottom: 22px;
    background: #ffffff;
    border: 1px solid #e5e9f0;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .06);
}

.empty-card {
    padding: 24px;
    color: #667085;
    background: #ffffff;
    border: 1px dashed #d9dee8;
    border-radius: 18px;
}





.gauge-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 22px;
}

.gauge-card {
    padding: 18px;
    text-align: center;
    /*background: #ffffff;
    border: 1px solid #e5e9f0;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .06);*/
}

.gauge-card canvas {
    width: 100%;
    height: 150px;
}

.gauge-title {
    margin-bottom: 8px;
    color: #667085;
    font-size: 14px;
    font-weight: 600;
}

.gauge-value {
    margin-top: -8px;
    color: #111827;
    font-size: 18px;
}

.gauge-value strong {
    font-size: 28px;
}

@media (max-width: 900px) {
    .gauge-grid {
        grid-template-columns: 1fr;
    }
}


.gauge-grid-live {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.gauge-grid-live .gauge-card canvas {
    height: 125px;
}

.gauge-value small {
    display: block;
    min-height: 18px;
    margin-top: 2px;
    color: #667085;
    font-size: 12px;
    font-weight: 600;
}


.intra-shell,
.intra-page {
    transition: grid-template-columns .2s ease;
}

.sidebar-brand {
    position: relative;
}

.brand-copy {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    transition: opacity .15s ease, width .2s ease;
}

.sidebar-toggle {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    color: var(--sidebar-muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: color .12s ease, background .12s ease;
}

.sidebar-toggle:hover {
    color: #ffffff;
    background: var(--sidebar-soft);
}

.sidebar-toggle i {
    font-size: 13px;
}

body.nav-compact .intra-shell,
body.nav-compact .intra-page {
    grid-template-columns: 76px 1fr;
}

body.nav-compact .sidebar-brand {
    justify-content: center;
    padding: 14px 8px;
}

body.nav-compact .brand-copy,
body.nav-compact .sidebar-link span {
    display: none;
}

body.nav-compact .sidebar-toggle {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 24px;
    height: 24px;
    flex-basis: 24px;
}

body.nav-compact .sidebar-link {
    justify-content: center;
    padding: 0;
}

body.nav-compact .sidebar-link i {
    width: auto;
}







.battery-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.battery-gauge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 125px;
}

.battery-body {
    position: relative;
    width: 150px;
    height: 72px;
    overflow: hidden;
    border: 4px solid #374151;
    border-radius: 10px;
    background: #eef2f7;
}

.battery-tip {
    width: 10px;
    height: 30px;
    margin-left: 4px;
    border-radius: 0 5px 5px 0;
    background: #374151;
}

.battery-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: #22c55e;
    transition: width .5s ease, background-color .3s ease;
}

.battery-level {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    color: #111827;
    font-size: 25px;
    font-weight: 800;
}



.autarky-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 24px;
    align-items: stretch;
}

.autarky-chart {
    min-width: 0;
}

.autarky-chart .chart-card {
    height: 100%;
    margin-bottom: 0;
}

.autarky-gauges {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

.autarky-gauges .gauge-card {
    flex: 1;
    min-height: 0;
}

.autarky-gauges canvas {
    width: 100%;
    height: 115px;
}

@media (max-width: 1100px) {
    .autarky-layout {
        grid-template-columns: 1fr;
    }

    .autarky-gauges {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}








.ev-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    margin-bottom: 12px;
    padding: 0 4px;
}

.ev-summary > div:first-child {
    display: flex;
    align-items: baseline;
    gap: 7px;
    color: #667085;
    font-size: 13px;
}

.ev-summary strong {
    color: #101828;
    font-size: 24px;
}

.ev-updated {
    color: #98a2b3;
    font-size: 11px;
}

.ev-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ev-card {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    min-height: 130px;
    padding: 18px;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .04);
}

.ev-card.is-charging {
    border-color: #86efac;
    background: linear-gradient(
        135deg,
        rgba(240, 253, 244, .9),
        #ffffff
    );
}

.ev-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #f2f4f7;
    color: #98a2b3;
    font-size: 20px;
}

.ev-card.is-charging .ev-icon {
    background: #dcfce7;
    color: #16a34a;
}

.ev-name {
    overflow: hidden;
    color: #101828;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ev-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: #667085;
    font-size: 12px;
}

.ev-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d0d5dd;
}

.ev-card.is-charging .ev-status-dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .12);
}

.ev-values {
    min-width: 105px;
    text-align: right;
}

.ev-power {
    color: #101828;
    font-size: 23px;
    font-weight: 800;
}

.ev-power small {
    color: #667085;
    font-size: 12px;
    font-weight: 500;
}

.ev-energy {
    margin-top: 5px;
    color: #98a2b3;
    font-size: 11px;
}

@media (max-width: 1200px) {
    .ev-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ev-group {
    margin-bottom: 28px;
}

.ev-group-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
    padding: 0 4px;
}

.ev-group-title {
    color: #101828;
    font-size: 22px;
    font-weight: 800;
}

.ev-group-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667085;
    font-size: 12px;
}

.ev-group-summary span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #f2f4f7;
}

.ev-group-summary .is-occupied {
    color: #b54708;
    background: #fffaeb;
}

.ev-group-summary .is-available {
    color: #027a48;
    background: #ecfdf3;
}

.ev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.ev-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 104px;
    padding: 16px 18px;
    overflow: hidden;
}

.ev-main {
    min-width: 0;
}

.ev-name {
    overflow: hidden;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ev-values {
    min-width: 86px;
    margin-left: 12px;
    text-align: right;
}

.ev-power {
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.ev-power small {
    font-size: 11px;
}

.ev-energy {
    margin-top: 4px;
    font-size: 10px;
}




.ev-values {
    width: 112px;
    min-width: 112px;
    margin-left: 16px;
}

.ev-power-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 8px;
    white-space: nowrap;
}

.ev-power-row strong {
    color: #101828;
    font-size: 19px;
    font-weight: 800;
    line-height: 1;
}

.ev-power-row span {
    color: #98a2b3;
    font-size: 10px;
}

.ev-power-gauge {
    position: relative;
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eaecf0;
}

.ev-power-gauge-fill {
    display: block;
    width: 0;
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    background: #22c55e;
    transition: width .35s ease;
}

.ev-card.is-occupied .ev-power-gauge-fill {
    background: #f59e0b;
}

.ev-card.is-charging .ev-power-gauge-fill {
    background: #22c55e;
}

.ev-card.is-disabled .ev-power-gauge-fill,
.ev-card.is-faulted .ev-power-gauge-fill {
    background: #ef4444;
}


.ev-power-gauge::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    left: 2px;
    width: 2px;
    border-radius: 2px;
    background: #98a2b3;
    opacity: .7;
}


.battery-history {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
}

.battery-min {
    color: #64748b;
}

.battery-max {
    color: #22c55e;
}

#energySankey {
	width: 100%;
	height: 360px;
	min-height: 360px;
}






















/* Page Vault injectée dans la zone centrale */
.vault-page {
    height: calc(100vh - var(--header-height, 70px));
    min-height: 0;
    overflow: hidden;

    display: flex;
    flex-direction: column;
}

/* Zone sous la barre de recherche */
.vault-layout {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;

    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 16px;
}

/* Colonne de navigation Vault */
.vault-tree-column {
    min-height: 0;
    overflow: auto;
}

/* Colonne des pièces */
.vault-pieces-column {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.vault-header {
    display:flex;
    flex: 0 0 auto;
    align-items:center;
    justify-content:space-between;
    margin-bottom:18px;
}

.vault-header h1 {
    margin:0;
    font-size:24px;
}

.vault-cache-info {
    margin-top:4px;
    font-size:13px;
    opacity:.7;
}

.vault-refresh-button {
    width:auto;
    padding:9px 15px;
}

.vault-layout {
    display:grid;
    grid-template-columns:300px minmax(0, 1fr);
    min-height:650px;
    border:1px solid var(--border-color, #d1d5db);
    border-radius:10px;
    overflow:hidden;
    background:var(--panel-background, #fff);
}

.vault-sidebar {
    padding:14px;
    border-right:1px solid var(--border-color, #d1d5db);
    overflow:auto;
}

.vault-content {
    min-width:0;
    padding:18px;
    overflow:auto;
}

.vault-search {
    width:100%;
    margin-bottom:14px;
    padding:10px 12px;
    border:1px solid #cbd5e1;
    border-radius:7px;
}

.vault-tree-section {
    margin-bottom:8px;
}

.vault-tree-button {
    display:flex;
    align-items:center;
    width:100%;
    padding:8px 10px;
    border:0;
    border-radius:6px;
    background:transparent;
    color:inherit;
    text-align:left;
    cursor:pointer;
}

.vault-tree-button:hover,
.vault-tree-button.active {
    background:rgba(37, 99, 235, .12);
}

.vault-tree-level-1 {
    padding-left:12px;
}

.vault-tree-level-2 {
    padding-left:28px;
}

.vault-tree-count {
    margin-left:auto;
    font-size:12px;
    opacity:.65;
}

.vault-breadcrumb {
    margin-bottom:14px;
    font-size:15px;
    font-weight:600;
}

.vault-table {
    width:100%;
    border-collapse:collapse;
}

.vault-table th,
.vault-table td {
    padding:10px 12px;
    border-bottom:1px solid var(--border-color, #e5e7eb);
    text-align:left;
}

.vault-table th {
    position:sticky;
    top:0;
    background:var(--panel-background, #fff);
    font-size:13px;
}

.vault-number {
    font-family:monospace;
    font-weight:600;
}

.vault-extension {
    display:inline-block;
    margin:2px 3px 2px 0;
    padding:3px 7px;
    border-radius:12px;
    background:rgba(100, 116, 139, .15);
    font-size:12px;
    text-transform:uppercase;
}

.vault-empty {
    padding:40px;
    text-align:center;
    opacity:.65;
}

@media (max-width:900px) {
    .vault-layout {
        grid-template-columns:1fr;
    }

    .vault-sidebar {
        border-right:0;
        border-bottom:1px solid var(--border-color, #d1d5db);
    }
}


.sidebar-user {
    position: relative;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-user-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.sidebar-user-button:hover {
    background: rgba(255, 255, 255, .06);
}

.sidebar-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #d43d35;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    overflow: hidden;
}

.sidebar-user-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: 11px;
    flex: 1;
}

.sidebar-user-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-info small {
    margin-top: 2px;
    opacity: .6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-chevron {
    margin-left: 8px;
    font-size: 11px;
    opacity: .6;
    transition: transform .2s ease;
}

.sidebar-user.open .sidebar-user-chevron {
    transform: rotate(180deg);
}

.sidebar-user-menu {
    display: none;
    position: absolute;
    z-index: 1000;
    top: calc(100% - 6px);
    left: 12px;
    right: 12px;
    padding: 8px;
    border-radius: 8px;
    background: #2b3139;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}

.sidebar-user.open .sidebar-user-menu {
    display: block;
}

.sidebar-user-menu-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-user-menu-header span {
    font-size: 12px;
    opacity: .6;
}

.sidebar-user-menu button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    margin-top: 6px;
    padding: 9px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.sidebar-user-menu button:hover {
    background: rgba(255, 255, 255, .07);
}



/* ── Sidebar group / submenu ── */

.sidebar-group {
    display: flex;
    flex-direction: column;
}

.sidebar-group-toggle {
    justify-content: flex-start;
    cursor: pointer;
    background: transparent;
    border: 0;
    width: 100%;
    color: var(--sidebar-text);
    font: inherit;
}

.sidebar-group-toggle:hover {
    background: var(--sidebar-soft);
    color: white;
}

.sidebar-group-chevron {
    margin-left: auto;
    font-size: 11px;
    opacity: .5;
    transition: transform .2s ease;
}

.sidebar-group.open .sidebar-group-chevron {
    transform: rotate(180deg);
}

.sidebar-submenu {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0 4px 10px;
}

.sidebar-group.open .sidebar-submenu {
    display: flex;
}

.sidebar-sublink {
    height: 40px;
    font-size: 14px;
    color: var(--sidebar-muted);
}

.sidebar-sublink:hover {
    color: white;
}

.sidebar-sublink.active {
    color: white;
    opacity: 1;
}



body.nav-compact .sidebar-group-toggle span,
body.nav-compact .sidebar-group-chevron {
    display: none;
}

body.nav-compact .sidebar-submenu {
    position: absolute;
    left: 76px;
    z-index: 100;
    min-width: 200px;
    padding: 8px;
    border-radius: 10px;
    background: var(--sidebar);
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

body.nav-compact .sidebar-group.open .sidebar-submenu {
    display: flex;
}

body.nav-compact .sidebar-sublink span {
    display: inline;
}

/* ── Drag'n'drop menu ── */

[data-nav-key] {
    cursor: grab;
}

[data-nav-key]:active {
    cursor: grabbing;
}

.nav-dragging {
    opacity: 0.4;
}

[data-nav-key]:hover {
    box-shadow: 0 0 0 1px rgba(255,255,255,.1) inset;
}


















.kardex-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px;
}

.kardex-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 20px;
}

.kardex-header h1 {
    margin: 0;
    font-size: 2rem;
}

.kardex-header p {
    margin: 5px 0 0;
    color: var(--text-muted, #77808d);
}

.kardex-search {
    position: relative;
    width: min(650px, 100%);
}

.kardex-search > i {
    position: absolute;
    top: 50%;
    left: 18px;
    color: #77808d;
    transform: translateY(-50%);
    pointer-events: none;
}

.kardex-search input {
    width: 100%;
    min-height: 52px;
    padding: 10px 52px;
    color: var(--text-color, #212529);
    font: inherit;
    font-size: 1.05rem;
    background: var(--card-background, #fff);
    border: 1px solid var(--border-color, #d7dce2);
    border-radius: 12px;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.kardex-search input:focus {
    border-color: #2979ff;
    box-shadow: 0 0 0 3px rgb(41 121 255 / 15%);
}

.kardex-search button {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 34px;
    height: 34px;
    color: #77808d;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transform: translateY(-50%);
}

.kardex-search button:hover {
    color: #212529;
    background: rgb(127 127 127 / 12%);
}

.kardex-status {
    min-height: 24px;
    margin: 0 0 18px;
    color: var(--text-muted, #77808d);
}

.kardex-status.is-loading {
    color: #2979ff;
}

.kardex-status.is-error {
    color: #d32f2f;
}

.kardex-group {
    margin-bottom: 26px;
}

.kardex-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
}

.kardex-group-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.35rem;
}

.kardex-group-header h2 i {
    color: #2979ff;
}

.kardex-group-header span {
    color: var(--text-muted, #77808d);
    font-size: 0.9rem;
}

.kardex-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 14px;
}

.kardex-card {
    overflow: hidden;
    background: var(--card-background, #fff);
    border: 1px solid var(--border-color, #e1e5ea);
    border-radius: 12px;
    box-shadow: 0 3px 12px rgb(0 0 0 / 5%);
}

.kardex-card-content {
    display: flex;
    align-items: stretch;
    min-height: 120px;
}

.kardex-floor {
    display: flex;
    flex: 0 0 105px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #2979ff;
}

.kardex-floor span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
}

.kardex-floor strong {
    margin-top: 3px;
    font-size: 2rem;
    line-height: 1;
}

.kardex-description {
    min-width: 0;
    padding: 18px;
}

.kardex-description h3 {
    margin: 5px 0 0;
    font-size: 1.05rem;
    line-height: 1.4;
}

.kardex-reference {
    color: #2979ff;
    font-size: 0.88rem;
    font-weight: 600;
}

.kardex-reference i {
    margin-right: 5px;
}

.kardex-keywords {
    margin-top: 8px;
    color: var(--text-muted, #77808d);
    font-size: 0.85rem;
    line-height: 1.35;
}

.kardex-images {
    display: flex;
    gap: 8px;
    padding: 10px;
    overflow-x: auto;
    background: rgb(127 127 127 / 6%);
    border-top: 1px solid var(--border-color, #e1e5ea);
}

.kardex-thumbnail {
	max-width: 100px;
	height: 50px;
	flex: 0 0 auto;
	object-fit: contain;
	background: #fff;
	border: 1px solid var(--border-color, #e1e5ea);
	border-radius: 7px;
	cursor: zoom-in;
	padding: 5px;
}

.kardex-thumbnail:hover {
    border-color: #2979ff;
    transform: scale(1.03);
}

.kardex-image-modal {
    position: fixed;
    z-index: 10000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    background: rgb(0 0 0 / 85%);
}

.kardex-image-modal[hidden] {
    display: none;
}

.kardex-image-modal img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
}

.kardex-image-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    color: #fff;
    font-size: 1.4rem;
    background: rgb(255 255 255 / 14%);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.kardex-modal-open {
    overflow: hidden;
}

@media (max-width: 800px) {
    .kardex-page {
        padding: 16px;
    }

    .kardex-header {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .kardex-search {
        width: 100%;
    }

    .kardex-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .kardex-card-content {
        flex-direction: column;
    }

    .kardex-floor {
        min-height: 75px;
        flex-basis: auto;
        flex-direction: row;
        gap: 10px;
    }

    .kardex-floor strong {
        margin: 0;
        font-size: 1.7rem;
    }
}




/* =========================================================
 * Furn Manager
 * ========================================================= */

.furn-manager {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.furn-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.furn-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.furn-header p {
    margin: 0.4rem 0 0;
    color: var(--bs-secondary-color);
}

.furn-eyebrow {
    margin-bottom: 0.3rem;
    color: var(--bs-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.furn-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.furn-stats {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
}

.furn-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 96px;
    padding: 1rem 1.15rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.85rem;
    background: var(--bs-body-bg);
}

.furn-stat-card.has-error {
    border-color: rgba(220, 53, 69, 0.45);
}

.furn-stat-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 0.75rem;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    font-size: 1.25rem;
}

.furn-stat-card strong {
    display: block;
    font-size: 1.65rem;
    line-height: 1;
}

.furn-stat-card span:last-child {
    display: block;
    margin-top: 0.35rem;
    color: var(--bs-secondary-color);
    font-size: 0.88rem;
}

.furn-list-card {
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.85rem;
    background: var(--bs-body-bg);
}

.furn-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.furn-search {
    position: relative;
    width: min(480px, 100%);
}

.furn-search i {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    transform: translateY(-50%);
    color: var(--bs-secondary-color);
    pointer-events: none;
}

.furn-search input {
    width: 100%;
    min-height: 42px;
    padding: 0.65rem 0.85rem 0.65rem 2.55rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.65rem;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.furn-table {
    margin: 0;
}

.furn-table th {
    padding: 0.8rem 1rem;
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.furn-table td {
    padding: 0.85rem 1rem;
}

.furn-number {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1rem;
}

.furn-type {
    display: inline-flex;
    padding: 0.2rem 0.5rem;
    border-radius: 0.4rem;
    background: var(--bs-tertiary-bg);
    font-size: 0.8rem;
    font-weight: 600;
}

.furn-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.furn-status-project,
.furn-sync-pending {
    background: rgba(255, 193, 7, 0.15);
    color: #997404;
}

.furn-status-active,
.furn-sync-synced {
    background: rgba(25, 135, 84, 0.15);
    color: #146c43;
}

.furn-status-inactive {
    background: rgba(108, 117, 125, 0.15);
    color: #5c636a;
}

.furn-status-obsolete,
.furn-sync-error {
    background: rgba(220, 53, 69, 0.15);
    color: #b02a37;
}

.furn-sync-warning {
    background: rgba(253, 126, 20, 0.15);
    color: #bd5b00;
}

.furn-sync-date {
    margin-top: 0.25rem;
    color: var(--bs-secondary-color);
    font-size: 0.72rem;
}

.furn-sync-error {
    max-width: 260px;
    margin-top: 0.3rem;
    overflow: hidden;
    color: var(--bs-danger);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.furn-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--bs-secondary-color);
}

.furn-empty > i {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.furn-empty h2 {
    color: var(--bs-body-color);
    font-size: 1.2rem;
}

@media (max-width: 900px) {
    .furn-header,
    .furn-list-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .furn-header-actions .btn,
    .furn-list-toolbar .btn {
        width: 100%;
    }

    .furn-search {
        width: 100%;
    }
}












.furn-details-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.furn-details-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.furn-details-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.furn-details-title-row h2 {
    margin: 0;
}

.furn-details-actions {
    display: flex;
    gap: 0.5rem;
}

.furn-details-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.furn-detail-card,
.furn-info-card {
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.8rem;
    background: var(--bs-body-bg);
}

.furn-detail-card span {
    display: block;
    color: var(--bs-secondary-color);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.furn-detail-card strong {
    display: block;
    margin-top: 0.4rem;
    font-size: 1.15rem;
}

.furn-details-tabs {
    margin-top: 1.25rem;
    overflow-x: auto;
    white-space: nowrap;
}

.furn-details-tabs .tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.furn-general-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.furn-info-card h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
}

.furn-info-card dl {
    margin: 0;
}

.furn-info-card dl > div {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--bs-border-color);
}

.furn-info-card dl > div:last-child {
    border-bottom: 0;
}

.furn-info-card dt {
    color: var(--bs-secondary-color);
    font-weight: 500;
}

.furn-info-card dd {
    margin: 0;
    font-weight: 600;
}

.furn-details-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 250px;
}

@media (max-width: 760px) {
    .furn-details-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .furn-info-card dl > div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}




.plc-wizard-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.plc-wizard-step {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    color: var(--bs-secondary-color);
}

.plc-wizard-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: var(--bs-secondary-bg);
    font-weight: 600;
}

.plc-wizard-step.active {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.plc-wizard-step.active span {
    color: #fff;
    background: var(--bs-primary);
}

.plc-wizard-step.done {
    border-color: var(--bs-success);
    color: var(--bs-success);
}

.plc-wizard-step.done span {
    color: #fff;
    background: var(--bs-success);
}

.plc-source-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    height: 100%;
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.65rem;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
}

.plc-source-choice:hover {
    border-color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
}

.plc-source-choice:has(input:checked) {
    border-color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
}

.plc-source-choice-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.plc-source-choice-body small {
    color: var(--bs-secondary-color);
}



/* =========================================================
   Sources automate
   ========================================================= */

#furn-source-list {
    display: grid;
    gap: 1rem;
}

.furn-source-card {
    padding: 1rem 1.1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    background: var(--bs-body-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.furn-source-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.furn-source-name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.furn-source-card-header .text-body-secondary {
    margin-top: 0.2rem;
    font-size: 0.875rem;
}

.furn-source-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 0.8rem;
}

.furn-source-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: var(--bs-tertiary-bg);
    font-size: 0.85rem;
    font-weight: 600;
}

.furn-source-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bs-border-color);
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
}

.furn-source-comment {
    margin-top: 0.8rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.5rem;
    background: var(--bs-tertiary-bg);
    font-size: 0.9rem;
}

/* États */

.furn-source-status-success {
    color: #146c43;
    background: #d1e7dd;
}

.furn-source-status-running {
    color: #055160;
    background: #cff4fc;
}

.furn-source-status-error {
    color: #842029;
    background: #f8d7da;
}

.furn-source-status-draft {
    color: #664d03;
    background: #fff3cd;
}

.furn-source-card .furn-badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}





/* =========================================================
 * Furn Manager — variables et patterns
 * ========================================================= */

.furn-detail-section {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.75rem;
}

.furn-detail-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.furn-detail-section .section-header h3,
.furn-detail-section .section-header h4 {
    margin: 0;
}

.furn-detail-section .section-header p {
    margin: 0.25rem 0 0;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.875rem;
}

.furn-detail-section .table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.5rem;
}

.furn-detail-section .data-table {
    width: 100%;
    min-width: 1100px;
    margin: 0;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.furn-detail-section .data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.7rem 0.75rem;
    background: var(--bs-tertiary-bg, #f8f9fa);
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    color: var(--bs-emphasis-color, #212529);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.furn-detail-section .data-table td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    vertical-align: top;
}

.furn-detail-section .data-table tbody tr:last-child td {
    border-bottom: 0;
}

.furn-detail-section .data-table tbody tr:hover {
    background: var(--bs-tertiary-bg, #f8f9fa);
}

.furn-detail-section .data-table tr.is-disabled {
    opacity: 0.55;
}

.furn-detail-section .data-table code {
    display: inline-block;
    max-width: 320px;
    padding: 0.15rem 0.35rem;
    overflow: hidden;
    background: var(--bs-tertiary-bg, #f8f9fa);
    border-radius: 0.25rem;
    color: inherit;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.furn-detail-section .cell-detail {
    display: block;
    margin-top: 0.2rem;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.3;
}

.furn-detail-section .empty-cell {
    padding: 2rem !important;
    color: var(--bs-secondary-color, #6c757d);
    text-align: center;
}

#furn-variables-filter {
    width: min(320px, 100%);
}







.furn-detail-section .badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.4rem;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.furn-detail-section .badge-neutral {
    background: var(--bs-secondary-bg, #e9ecef);
    color: var(--bs-emphasis-color, #212529);
}

.furn-detail-section .badge-info {
    background: rgba(13, 202, 240, 0.15);
    color: var(--bs-info-text-emphasis, #055160);
}

.furn-detail-section .badge-success {
    background: rgba(25, 135, 84, 0.15);
    color: var(--bs-success-text-emphasis, #0a3622);
}

.furn-detail-section .badge-muted {
    background: var(--bs-secondary-bg, #e9ecef);
    color: var(--bs-secondary-color, #6c757d);
}

.furn-detail-section .badge-scope {
    background: rgba(13, 110, 253, 0.14);
    color: var(--bs-primary-text-emphasis, #052c65);
}

.furn-detail-section .badge-mode {
    background: rgba(111, 66, 193, 0.14);
    color: #59359a;
}

@media (max-width: 768px) {
    .furn-detail-section {
        padding: 1rem;
    }

    .furn-detail-section .section-header {
        align-items: stretch;
        flex-direction: column;
    }

    #furn-variables-filter {
        width: 100%;
    }
}

.customers-page {
    min-height: calc(100vh - 40px);
}

.customers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.customers-header h1 {
    margin: 0;
    color: #101828;
    font-size: 28px;
    font-weight: 750;
}

.customers-header p {
    margin: 4px 0 0;
    color: #667085;
    font-size: 13px;
}

.customers-search {
    position: relative;
    width: min(420px, 100%);
}

.customers-search > i {
    position: absolute;
    top: 50%;
    left: 14px;
    color: #98a2b3;
    transform: translateY(-50%);
}

.customers-search input {
    width: 100%;
    height: 42px;
    padding: 0 44px 0 40px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: #101828;
}

.customers-search input:focus {
    border-color: #8b83de;
    box-shadow: 0 0 0 3px rgba(127, 117, 232, .12);
}

.customers-search button {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #667085;
    transform: translateY(-50%);
}

.customers-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    min-height: 680px;
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    background: #fff;
}

.customers-list-panel {
    min-width: 0;
    border-right: 1px solid #e4e7ec;
    background: #f9fafb;
}

.customers-list-header {
    display: flex;
    gap: 5px;
    padding: 13px 16px;
    border-bottom: 1px solid #e4e7ec;
    color: #667085;
    font-size: 12px;
    font-weight: 600;
}

.customers-list {
    max-height: calc(100vh - 235px);
    overflow-y: auto;
}

.customer-list-item {
    display: block;
    width: 100%;
    padding: 13px 16px;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #eaecf0;
    background: transparent;
    cursor: pointer;
}

.customer-list-item:hover {
    background: #f2f4f7;
}

.customer-list-item.active {
    background: #eeecff;
    box-shadow: inset 3px 0 #756be5;
}

.customer-list-name {
    overflow: hidden;
    color: #101828;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-list-legal {
    margin-top: 2px;
    overflow: hidden;
    color: #667085;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-list-meta {
    display: flex;
    gap: 12px;
    margin-top: 7px;
    color: #98a2b3;
    font-size: 10px;
}

.customer-detail {
    min-width: 0;
    padding: 24px;
}

.customer-empty {
    display: flex;
    min-height: 560px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #98a2b3;
    text-align: center;
}

.customer-empty > i {
    margin-bottom: 16px;
    font-size: 46px;
}

.customer-empty h2 {
    margin: 0;
    color: #475467;
    font-size: 18px;
}

.customer-empty p {
    margin-top: 6px;
    font-size: 12px;
}

.customer-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.customer-title-row h2 {
    margin: 0;
    color: #101828;
    font-size: 24px;
}

.customer-legal-name {
    margin-top: 3px;
    color: #667085;
    font-size: 13px;
}

.customer-status {
    padding: 5px 9px;
    border-radius: 999px;
    background: #dcfae6;
    color: #067647;
    font-size: 11px;
    font-weight: 700;
}

.customer-status.inactive {
    background: #f2f4f7;
    color: #667085;
}

.customer-tabs {
    display: flex;
    gap: 3px;
    margin: 22px 0 20px;
    padding-bottom: 1px;
    border-bottom: 1px solid #e4e7ec;
}

.customer-tab {
    padding: 9px 13px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #667085;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.customer-tab.active {
    border-bottom-color: #756be5;
    color: #554bc3;
}

.customer-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #e4e7ec;
}

.customer-info-item {
    min-height: 75px;
    padding: 14px 16px;
    background: #fff;
}

.customer-info-label {
    margin-bottom: 5px;
    color: #98a2b3;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.customer-info-value {
    color: #344054;
    font-size: 13px;
}

.customer-site-card,
.customer-contact-card {
    margin-bottom: 10px;
    padding: 15px 17px;
    border: 1px solid #e4e7ec;
    border-radius: 11px;
}

.customer-site-card h3,
.customer-contact-card h3 {
    margin: 0 0 6px;
    color: #101828;
    font-size: 14px;
}

.customer-site-address,
.customer-contact-meta {
    color: #667085;
    font-size: 12px;
    line-height: 1.6;
}

.customer-site-stats {
    display: flex;
    gap: 16px;
    margin-top: 9px;
    color: #475467;
    font-size: 11px;
}

.customers-loading,
.customers-no-result {
    padding: 30px 20px;
    color: #98a2b3;
    text-align: center;
    font-size: 12px;
}

@media (max-width: 900px) {
    .customers-layout {
        grid-template-columns: 1fr;
    }

    .customers-list-panel {
        border-right: 0;
        border-bottom: 1px solid #e4e7ec;
    }

    .customers-list {
        max-height: 300px;
    }

    .customers-header {
        align-items: stretch;
        flex-direction: column;
    }

    .customers-search {
        width: 100%;
    }
}

.customer-section-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.customer-section-count {
    margin-left: 6px;
    color: #98a2b3;
    font-size: 12px;
}

.customer-contact-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.customer-contact-role {
    margin-top: 2px;
    color: #667085;
    font-size: 11px;
}

.customer-contact-primary {
    margin-left: 6px;
    padding: 3px 6px;
    border-radius: 999px;
    background: #dcfae6;
    color: #067647;
    font-size: 9px;
    font-weight: 700;
}

.customer-contact-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-top: 12px;
    font-size: 11px;
}

.customer-contact-body a {
    color: #475467;
    text-decoration: none;
}

.customer-contact-body a:hover {
    color: #554bc3;
}

.customer-contact-type {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 6px;
    background: #f2f4f7;
    color: #475467;
    font-size: 10px;
    font-weight: 600;
}

.customer-contact-sites {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.customer-contact-sites label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.customer-title-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.customer-merge-site-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    padding: 11px 13px;
    border: 1px solid #e4e7ec;
    border-radius: 9px;
    cursor: pointer;
}

.customer-merge-site-option:hover {
    background: #f9fafb;
}

.customer-merge-site-option input {
    margin-top: 3px;
}

.customer-merge-site-option span {
    display: flex;
    flex-direction: column;
}

.customer-merge-site-option strong {
    color: #344054;
    font-size: 13px;
}

.customer-merge-site-option small {
    margin-top: 2px;
    color: #667085;
    font-size: 11px;
}

.customer-site-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.customer-site-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.customer-site-primary {
    margin-left: 6px;
    padding: 3px 6px;
    border-radius: 999px;
    background: #dcfae6;
    color: #067647;
    font-size: 9px;
    font-weight: 700;
}

.customer-site-references {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eaecf0;
}

.customer-site-reference-title {
    margin-bottom: 8px;
    color: #667085;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.customer-site-reference {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 28px;
    font-size: 11px;
}

.customer-site-reference-source {
    padding: 2px 6px;
    border-radius: 5px;
    background: #eef2f6;
    color: #475467;
    font-size: 9px;
    font-weight: 700;
}

.customer-site-reference-primary,
.customer-site-reference-secondary {
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
}

.customer-site-reference-primary {
    background: #dcfae6;
    color: #067647;
}

.customer-site-reference-secondary {
    background: #f2f4f7;
    color: #667085;
}


.customer-furnace-group {
    margin-bottom: 20px;
}

.customer-furnace-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #475467;
    font-size: 12px;
}

.customer-furnace-group-title > div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.customer-furnace-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 1400px) {
    .customer-furnace-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .customer-furnace-list {
        grid-template-columns: 1fr;
    }
}

.customer-furnace-groups {
    max-height: max(300px, calc(100vh - 330px));
    overflow-y: auto;
    padding-right: 6px;
}

.customer-furnace-card {
    padding: 15px 17px;
    border: 1px solid #e4e7ec;
    border-radius: 11px;
    background: #fff;
}

.customer-furnace-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.customer-furnace-head h3 {
    margin: 0 0 4px;
    color: #101828;
    font-size: 14px;
}

.customer-furnace-type {
    color: #667085;
    font-size: 11px;
}

.customer-furnace-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.customer-furnace-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-top: 12px;
    color: #475467;
    font-size: 11px;
}


body.auth-locked #app {
    filter: blur(7px);
    pointer-events: none;
    user-select: none;
}

#loginModal .modal-dialog {
    max-width: 420px;
}

#loginModal .modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
}

body.auth-locked .intra-shell {
    filter: blur(7px);
    pointer-events: none;
    user-select: none;
}

.auth-login-modal {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .25);
}


/* =========================================================
   GESTION DES ACCÈS
   ========================================================= */

.access-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.access-page .page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.access-page .page-eyebrow {
    margin-bottom: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, #6b7280);
}

.access-page .page-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.access-page .page-header h1 i {
    font-size: 1.25rem;
}

.access-page .page-header p {
    margin: 5px 0 0;
    color: var(--text-muted, #6b7280);
}


/* Onglets */

.access-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    background: var(--card-bg, #fff);
}

.access-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted, #6b7280);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.access-tab:hover {
    background: var(--hover-bg, #f3f4f6);
    color: var(--text-color, #111827);
}

.access-tab.active {
    background: var(--primary, #2563eb);
    color: #fff;
}

.access-tab i {
    width: 16px;
    text-align: center;
}


/* Contenu */

.access-content {
    min-height: 180px;
    overflow: hidden;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    background: var(--card-bg, #fff);
}

.access-content .table-responsive {
    overflow-x: auto;
}

.access-content table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.access-content thead {
    background: var(--table-header-bg, #f8fafc);
}

.access-content th {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    color: var(--text-muted, #6b7280);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.035em;
    white-space: nowrap;
}

.access-content td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    vertical-align: middle;
    font-size: 0.9rem;
}

.access-content tbody tr:last-child td {
    border-bottom: 0;
}

.access-content tbody tr:hover {
    background: var(--hover-bg, #f8fafc);
}


/* Login / codes */

.access-content code {
    padding: 3px 6px;
    border-radius: 5px;
    background: var(--code-bg, #f3f4f6);
    color: inherit;
    font-size: 0.82rem;
}


/* Badges */

.access-content .badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
}

.access-content .text-bg-success {
    background: #dcfce7;
    color: #166534;
}

.access-content .text-bg-secondary {
    background: #e5e7eb;
    color: #374151;
}

.access-content .text-bg-danger {
    background: #fee2e2;
    color: #991b1b;
}


/* Chargement */

.access-content .inter-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 180px;
    color: var(--text-muted, #6b7280);
}


/* Erreurs */

.access-content .alert {
    margin: 16px;
    padding: 12px 14px;
    border-radius: 8px;
}

.access-content .alert-danger {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}


/* Mobile */

@media (max-width: 700px) {
    .access-page .page-header h1 {
        font-size: 1.35rem;
    }

    .access-tabs {
        width: 100%;
    }

    .access-content th,
    .access-content td {
        padding: 9px 10px;
    }
}

.access-permission-table th,
.access-permission-table td {
    text-align: center;
    white-space: nowrap;
}

.access-permission-table .access-user-column {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 190px;
    text-align: left;
    background: var(--card-bg, #fff);
}

.access-permission-table thead .access-user-column {
    z-index: 3;
    background: var(--table-header-bg, #f8fafc);
}

.access-user-column small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted, #6b7280);
    font-weight: 400;
}

.access-permission-level {
    width: 48px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.access-permission-level.level-no {
    background: #f3f4f6;
    color: #9ca3af;
}

.access-permission-level.level-r {
    background: #dbeafe;
    color: #1d4ed8;
}

.access-permission-level.level-rw {
    background: #dcfce7;
    color: #15803d;
}

.access-permission-level.level-adm {
    background: #fee2e2;
    color: #b91c1c;
}

.access-permission-level:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.access-permission-level:disabled {
    opacity: 0.45;
    cursor: default;
}

.access-role-row td {
    border-top: 2px solid var(--border-color, #e5e7eb);
    background: var(--table-header-bg, #f8fafc);
}

.access-role-row .access-user-column > strong {
    display: block;
}

.access-role-row .access-user-column > small {
    color: var(--text-muted, #6b7280);
}

.access-user-indent {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 18px;
}

.access-user-indent > i {
    font-size: 0.65rem;
    color: var(--text-muted, #9ca3af);
}

.access-user-indent strong,
.access-user-indent small {
    display: block;
}

.access-user-indent small {
    margin-top: 2px;
    color: var(--text-muted, #6b7280);
    font-weight: 400;
}

.access-user-permission {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 42px;
    padding: 3px 6px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}

.access-user-permission strong {
    line-height: 1;
    font-size: 0.78rem;
}

.access-user-permission small {
    margin-top: 4px;
    line-height: 1;
    font-size: 0.65rem;
    opacity: 0.65;
}

.access-user-permission.level-inherit {
    background: #f3f4f6;
    color: #4b5563;
}

.access-user-permission.level-no {
    background: #f3f4f6;
    color: #9ca3af;
}

.access-user-permission.level-r {
    background: #dbeafe;
    color: #1d4ed8;
}

.access-user-permission.level-rw {
    background: #dcfce7;
    color: #15803d;
}

.access-user-permission.level-adm {
    background: #fee2e2;
    color: #b91c1c;
}

.access-hover-highlight {
    font-weight: 800 !important;
}

.access-permission-table thead th.access-hover-highlight {
    background: rgba(0, 0, 0, 0.06);
}

.access-permission-table .access-user-column.access-hover-highlight {
    background: rgba(0, 0, 0, 0.06);
}
/* =========================================================
   GESTION DES RESSOURCES
   ========================================================= */

.resources-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.resources-page .page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.resources-page .page-eyebrow {
    margin-bottom: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, #6b7280);
}

.resources-page .page-header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.resources-page .page-header h1 i {
    font-size: 1.25rem;
}

.resources-page .page-header p {
    margin: 5px 0 0;
    color: var(--text-muted, #6b7280);
}

.resources-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.resources-filters {
    display: flex;
    gap: 8px;
}

.resources-filters .form-select {
    width: auto;
    min-width: 140px;
}

.resources-search .form-control {
    min-width: 220px;
}

.resources-content {
    min-height: 180px;
    overflow: hidden;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    background: var(--card-bg, #fff);
}

.resources-content .table-responsive {
    overflow-x: auto;
}

.resources-content table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.resources-content thead {
    background: var(--table-header-bg, #f8fafc);
}

.resources-content th {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    color: var(--text-muted, #6b7280);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.035em;
    white-space: nowrap;
}

.resources-content td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    vertical-align: middle;
    font-size: 0.9rem;
}

.resources-content tbody tr:last-child td {
    border-bottom: 0;
}

.resources-content tbody tr:hover {
    background: var(--hover-bg, #f8fafc);
}

.resources-content code {
    padding: 3px 6px;
    border-radius: 5px;
    background: var(--code-bg, #f3f4f6);
    font-size: 0.82rem;
}

.resources-content .badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
}

.resources-content .inter-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 180px;
    color: var(--text-muted, #6b7280);
}

.resources-content .alert {
    margin: 16px;
    padding: 12px 14px;
    border-radius: 8px;
}

@media (max-width: 700px) {
    .resources-page .page-header h1 {
        font-size: 1.35rem;
    }
    .resources-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .resources-filters {
        flex-direction: column;
    }
    .resources-search .form-control {
        min-width: 0;
    }
}






/* Module injecté : FESP Homepage 1.0.4 */

.dash-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.dash-header h1 {
    margin: 2px 0 2px;
    font-size: 1.65rem;
    font-weight: 750;
}

.dash-header p {
    margin: 0;
    color: #7b8492;
    font-size: 0.86rem;
}

.dash-eyebrow,
.dash-card-eyebrow {
    color: #7d8796;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.dash-refresh {
    width: 38px;
    height: 38px;
    border: 1px solid #e2e6eb;
    border-radius: 9px;
    background: #fff;
    color: #657081;
    cursor: pointer;
}

.dash-refresh:hover {
    background: #f6f8fa;
}

.dash-kpi-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 16px;
}

.dash-card {
    background: #fff;
    border: 1px solid #e2e6eb;
    border-radius: 12px;
    padding: 17px 18px;
}

.dash-card-head,
.dash-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.dash-card-head h2,
.dash-section-head h2 {
    margin: 2px 0 0;
    font-size: 1rem;
    font-weight: 750;
}

.dash-card-icon {
    color: #7b8797;
    font-size: 1.1rem;
}

.dash-kpi-value {
    margin-top: 16px;
    font-size: 2.25rem;
    line-height: 1;
    font-weight: 800;
}

.dash-kpi-sub {
    margin-top: 7px;
    color: #7e8794;
    font-size: 0.78rem;
}

.dash-kpi-warning .dash-kpi-value {
    color: #cf7a00;
}

.dash-weather-main {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.dash-weather-icon {
    font-size: 2.4rem;
    line-height: 1;
}

.dash-weather-temp {
    font-size: 2.15rem;
    line-height: 1;
}

.dash-weather-range {
    margin-top: 4px;
    color: #7d8794;
    font-size: 0.78rem;
}

.dash-weather-details {
    display: flex;
    gap: 18px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #edf0f3;
    color: #687383;
    font-size: 0.76rem;
}

.dash-weather-details i {
    width: 16px;
}

.dash-main-card {
    padding: 0;
    overflow: hidden;
}

.dash-main-card .dash-section-head {
    padding: 17px 18px;
    border-bottom: 1px solid #e8ebef;
}

.dash-section-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #637083;
    font-size: 0.75rem;
    font-weight: 650;
    text-decoration: none;
}

.dash-section-link:hover {
    color: #2563eb;
}

.dash-interventions {
    display: flex;
    flex-direction: column;
}

.dash-intervention-row {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 13px 18px;
    border: 0;
    border-bottom: 1px solid #edf0f3;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.dash-intervention-row:last-child {
    border-bottom: 0;
}

.dash-intervention-row:hover {
    background: #f8fafc;
}

.dash-intervention-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    border-radius: 8px;
    background: #f2f5f8;
}

.dash-intervention-date strong {
    font-size: 1rem;
}

.dash-intervention-date span {
    color: #778293;
    font-size: 0.62rem;
    font-weight: 750;
}

.dash-intervention-title {
    font-weight: 720;
}

.dash-intervention-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
    color: #7d8794;
    font-size: 0.73rem;
}

.dash-intervention-meta i {
    margin-right: 4px;
}

.dash-intervention-right {
    display: flex;
    align-items: center;
    gap: 11px;
}

.dash-intervention-right > strong {
    font-size: 0.84rem;
}

.dash-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 4px 7px;
    border-radius: 6px;
    background: #edf2f7;
    color: #5d6878;
    font-size: 0.66rem;
    font-weight: 800;
}

.dash-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.dash-action-list,
.dash-simple-list {
    margin-top: 12px;
}

.dash-action-row,
.dash-simple-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    border-bottom: 1px solid #edf0f3;
    color: inherit;
    text-decoration: none;
}

.dash-action-row:last-child,
.dash-simple-row:last-child {
    border-bottom: 0;
}

.dash-action-row:hover,
.dash-simple-row:hover {
    background: #f8fafc;
}

.dash-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    color: #758092;
}

.dash-action-label {
    flex: 1;
    font-size: 0.8rem;
}

.dash-action-row strong {
    font-size: 0.88rem;
}

.dash-simple-row {
    justify-content: space-between;
}

.dash-simple-row > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-simple-row strong {
    overflow: hidden;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-simple-row small {
    overflow: hidden;
    margin-top: 2px;
    color: #818a98;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-simple-row time {
    flex: 0 0 auto;
    color: #929ba7;
    font-size: 0.7rem;
}

.dash-loading,
.dash-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 100px;
    color: #8b95a2;
    font-size: 0.8rem;
}

.dash-empty-small {
    padding: 18px 0;
    color: #8b95a2;
    font-size: 0.78rem;
}

@media (max-width: 1050px) {
    .dash-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dash-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .dash-intervention-row {
        grid-template-columns: 48px 1fr;
    }

    .dash-intervention-right {
        grid-column: 2;
        justify-content: flex-start;
    }
}
.bee-desktop-canvas > .fesp-home-desktop {position:absolute;inset:0;z-index:0;overflow:auto;scrollbar-width:thin}.bee-desktop-canvas > .fesp-home-desktop .fesp-home{min-height:100%;border-radius:0}.bee-desktop-canvas > .fesp-home-desktop .fesp-home-inner{padding-bottom:80px}.bee-desktop-canvas > .bee-window{z-index:1}.bee-desktop-active .bee-desktop-canvas > .fesp-home-desktop .fesp-home-hero{padding-top:5vh}.fesp-home-app:focus-visible{outline:3px solid white;outline-offset:3px}@media(max-height:780px){.bee-desktop-canvas > .fesp-home-desktop .fesp-home-hero{padding-top:2vh}}body:has(#fespHomepage) .sidebar{transform:translateX(calc(-100% + 8px));transition:transform .25s ease;z-index:10001}.bee-desktop-canvas > .fesp-home-desktop {position:absolute;inset:0;z-index:0;overflow:auto;scrollbar-width:thin}.bee-desktop-canvas > .fesp-home-desktop .fesp-home{min-height:100%;border-radius:0}.bee-desktop-canvas > .fesp-home-desktop .fesp-home-inner{padding-bottom:80px}.bee-desktop-canvas > .bee-window{z-index:1}.bee-desktop-active .bee-desktop-canvas > .fesp-home-desktop .fesp-home-hero{padding-top:5vh}.fesp-home-app:focus-visible{outline:3px solid white;outline-offset:3px}@media(max-height:780px){.bee-desktop-canvas > .fesp-home-desktop .fesp-home-hero{padding-top:2vh}}body:has(#fespHomepage) .sidebar:hover,.bee-desktop-canvas > .fesp-home-desktop {position:absolute;inset:0;z-index:0;overflow:auto;scrollbar-width:thin}.bee-desktop-canvas > .fesp-home-desktop .fesp-home{min-height:100%;border-radius:0}.bee-desktop-canvas > .fesp-home-desktop .fesp-home-inner{padding-bottom:80px}.bee-desktop-canvas > .bee-window{z-index:1}.bee-desktop-active .bee-desktop-canvas > .fesp-home-desktop .fesp-home-hero{padding-top:5vh}.fesp-home-app:focus-visible{outline:3px solid white;outline-offset:3px}@media(max-height:780px){.bee-desktop-canvas > .fesp-home-desktop .fesp-home-hero{padding-top:2vh}}body:has(#fespHomepage) .sidebar:focus-within{transform:translateX(0)}body:has(#fespHomepage) .main-content,body:has(#fespHomepage) .content,body:has(#fespHomepage) main{margin-left:0!important}body:has(#fespHomepage) .intra-page-title{display:none}.fesp-home{position:relative;min-height:calc(100vh - 10px);color:#fff;isolation:isolate;overflow:hidden;border-radius:14px}.fesp-home-backdrop{position:absolute;inset:0;z-index:-1;background:linear-gradient(120deg,rgba(9,21,31,.77),rgba(9,21,31,.24)),linear-gradient(125deg,#203c51,#4e725e 45%,#b79b4f);background-size:cover;background-position:center}.fesp-home-inner{max-width:1190px;margin:auto;padding:28px 35px 75px}.fesp-home-top{display:flex;align-items:center;justify-content:space-between;gap:15px}.fesp-home-brand{font-size:22px;font-weight:800;letter-spacing:.15em}.fesp-home-brand small{font-size:11px;font-weight:500}.fesp-home-actions{display:flex;align-items:center;gap:10px}.fesp-home-actions button,.fesp-home-login{border:1px solid #ffffff55;border-radius:10px;background:#ffffff25;color:#fff;padding:9px 13px;text-decoration:none}.fesp-home-hero{text-align:center;padding:9vh 0 35px}.fesp-home-hero #fespHomeClock{font-size:clamp(66px,12vw,118px);font-weight:300;line-height:1.1;text-shadow:0 3px 30px #0005}.fesp-home-hero #fespHomeDate{font-size:20px;text-transform:capitalize}.fesp-home-search{display:flex;align-items:center;gap:12px;max-width:630px;margin:35px auto 0;padding:14px 20px;background:#fffdf5e8;color:#26353c;border-radius:14px;box-shadow:0 10px 30px #0002}.fesp-home-search input{width:100%;border:0;background:transparent;outline:0;color:#243138;font-size:16px}.fesp-home-apps{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:20px;max-width:910px;margin:12px auto 60px}.fesp-home-app{text-align:center;text-decoration:none;color:white;background:#ffffff20;padding:18px 9px;border:1px solid #ffffff29;border-radius:16px;backdrop-filter:blur(8px);transition:background .2s,transform .2s}.fesp-home-app:hover{background:#ffffff35;transform:translateY(-3px);color:white}.fesp-home-app i{display:block;font-size:27px;margin:3px 0 11px}.fesp-home-app span{font-size:13px;font-weight:600}.fesp-home-widgets{margin-top:15px}.fesp-home-widgets-title{font-size:19px;font-weight:650;margin-bottom:16px}.fesp-home-widgets-title button{float:right;background:transparent;color:white;border:0}.fesp-home-widget-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:18px}.fesp-home-widget{min-height:175px;background:#f8faf9e8;color:#2c3a41;border-radius:14px;padding:20px;backdrop-filter:blur(10px)}.fesp-home-widget h3{font-size:15px;margin:0 0 15px}.fesp-home-widget strong{font-size:36px}.fesp-home-anon{text-align:center;color:#f1f5f5}.fesp-home-anon a{color:white;text-decoration:underline}@media(max-width:680px){.fesp-home-inner{padding:20px 15px}.fesp-home-apps{grid-template-columns:repeat(3,1fr);gap:9px}.fesp-home-app{padding:15px 4px}.fesp-home-brand{font-size:17px}}
/* Homepage 1.0.4 */
.fesp-home-top:has(.fesp-home-actions:empty){display:none}
.fesp-home-menu{position:fixed;z-index:2147483000;min-width:235px;background:rgba(24,32,39,.96);color:#fff;border:1px solid rgba(255,255,255,.2);border-radius:10px;box-shadow:0 12px 32px #0007;padding:6px;backdrop-filter:blur(15px)}
.fesp-home-menu[hidden]{display:none!important}
.fesp-home-menu button{width:100%;display:flex;align-items:center;gap:11px;border:0;border-radius:6px;color:inherit;background:transparent;padding:11px 12px;text-align:left;cursor:pointer}
.fesp-home-menu button:hover,.fesp-home-menu button:focus-visible{background:#ffffff30}
.fesp-home-menu button i{width:17px}
.fesp-home-settings{position:fixed;z-index:2147483001;margin:auto;max-width:min(520px,calc(100vw - 30px));width:100%;border-radius:12px;border:1px solid #e0e6e9;padding:0;background:#fff;color:#25313a;box-shadow:0 24px 60px #0007}
.fesp-home-settings::backdrop{background:#06111c8a;backdrop-filter:blur(3px)}
.fesp-home-settings header,.fesp-home-settings footer{padding:14px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e5e7eb}
.fesp-home-settings footer{border-top:1px solid #e5e7eb;border-bottom:0;justify-content:flex-end}
.fesp-home-settings header button,.fesp-home-settings footer button{border:0;background:#edf0f2;border-radius:7px;padding:7px 12px;cursor:pointer}
#fespHomeSettingsBody{padding:15px 20px;max-height:55vh;overflow:auto}
.fesp-home-setting-item{display:flex;align-items:center;gap:12px;padding:10px 2px;cursor:pointer}
.fesp-home-setting-item input{width:17px;height:17px}
.fesp-home-setting-note{font-size:12px;color:#687680}

/* Homepage 1.0.5 · Connexion LAN intégrée */
#fespHomepage[data-auth="0"] .fesp-home-inner{max-width:1190px!important;padding-top:24px!important;padding-bottom:48px!important}
#fespHomepage[data-auth="0"] .fesp-home-hero{padding-top:4vh!important}
#fespHomepage[data-auth="0"] .fesp-home-anon{max-width:730px;margin:26px auto 0;color:white}
.fesp-home-login-form{padding:20px 24px;background:rgba(20,30,42,.50);border:1px solid rgba(255,255,255,.2);border-radius:15px;backdrop-filter:blur(14px);box-shadow:0 12px 30px rgba(0,0,0,.2);text-align:left}
.fesp-home-login-title{font-size:17px;font-weight:650;margin-bottom:15px;text-align:center}
.fesp-home-login-row{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end}
.fesp-home-login-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#f0f4f8}
.fesp-home-login-form input:not([type="checkbox"]){width:100%;height:41px;border:1px solid #ffffff80;border-radius:8px;padding:0 12px;background:#fffffff0;color:#1b2430;font-size:14px}
.fesp-home-login-form button{height:41px;background:#2563eb;border:1px solid #5b85f8;border-radius:8px;padding:0 18px;color:#fff;white-space:nowrap;font-size:13px;cursor:pointer}
.fesp-home-login-form button:disabled{opacity:.55;cursor:wait}
.fesp-home-login-error{margin-top:12px;padding:9px 12px;border-radius:7px;background:rgba(185,28,28,.77);font-size:13px}
.fesp-home-login-error[hidden],.fesp-home-login-mfa[hidden]{display:none!important}
.fesp-home-login-mfa{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-top:15px;padding-top:14px;border-top:1px solid #ffffff40}
.fesp-home-login-mfa>label:first-child{width:190px}
.fesp-home-login-form .fesp-home-trust{flex-direction:row;align-items:center;gap:8px;padding-bottom:10px}
@media(max-width:680px){.fesp-home-login-row{grid-template-columns:1fr}.fesp-home-login-form{padding:17px}}

/* Homepage 1.0.7 : fondu uniquement, sans zoom */
.fesp-home-backdrop{background:linear-gradient(125deg,#203c51,#4e725e 45%,#b79b4f)!important;overflow:hidden}
.fesp-home-bg-layer{position:absolute;inset:0;background-size:cover;background-position:center;opacity:0;transition:opacity 2.8s ease-in-out;will-change:opacity}
.fesp-home-bg-layer.is-current{opacity:1}
@media(prefers-reduced-motion:reduce){.fesp-home-bg-layer{transition:none!important}}




/* Module injecté : Energy FESP 2.7.5 */


.energy-module{min-width:0}
.energy-module .tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.energy-module .tab{display:inline-flex;align-items:center;min-height:36px;padding:0 12px;border:1px solid rgba(127,127,127,.18);border-radius:8px;color:inherit;text-decoration:none;background:rgba(127,127,127,.035)}
.energy-module .tab.active{border-color:var(--primary-color,#d33e37);background:color-mix(in srgb,var(--primary-color,#d33e37) 9%,transparent);color:var(--primary-color,#d33e37);font-weight:700}
.energy-module .tab-panel{display:none}
.energy-module .tab-panel.active{display:block}
.energy-module .chart-card{margin:14px 0;padding:16px;border:1px solid rgba(127,127,127,.18);border-radius:12px;background:var(--card-bg,#fff);min-width:0}
.energy-module .chart-card>div[id^="chart"]{min-height:360px}
.energy-module .gauge-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.energy-module .gauge-card{padding:14px;border:1px solid rgba(127,127,127,.16);border-radius:12px;background:var(--card-bg,#fff);text-align:center}
.energy-module .gauge-title{font-size:12px;font-weight:700;color:var(--text-muted,#667085);margin-bottom:8px}
.energy-module .gauge-card canvas{max-width:100%;height:120px}
.energy-module .gauge-value{font-size:14px}.energy-module .gauge-value strong{font-size:20px}
.energy-module .battery-gauge{display:flex;justify-content:center;align-items:center;margin:18px 0 10px}.energy-module .battery-body{position:relative;width:140px;height:52px;border:3px solid currentColor;border-radius:7px;overflow:hidden}.energy-module .battery-fill{position:absolute;inset:0 auto 0 0;width:0;background:#22c55e;transition:width .2s}.energy-module .battery-level{position:absolute;inset:0;display:grid;place-items:center;font-weight:800;z-index:2}.energy-module .battery-tip{width:7px;height:22px;border-radius:0 4px 4px 0;background:currentColor}
.energy-module .ev-group{margin:0 0 16px}.energy-module .ev-group-header{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:10px}.energy-module .ev-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}.energy-module .ev-card{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:12px;border:1px solid rgba(127,127,127,.16);border-radius:10px;background:var(--card-bg,#fff)}
.energy-ems-header,.energy-ems-chart-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.energy-ems-header h2,.energy-ems-chart-title h3{margin:0}.energy-ems-header p,.energy-ems-chart-title span{margin:.25rem 0 0;color:var(--text-muted,#667085);font-size:12px}
.energy-ems-range{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:16px 0}.energy-ems-range label{display:flex;flex-direction:column;gap:4px;font-size:11px;font-weight:700;color:var(--text-muted,#667085)}.energy-ems-presets{display:flex;gap:6px;flex-wrap:wrap;margin-right:8px}
.energy-ems-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:14px 0}.energy-ems-kpis article{padding:12px;border:1px solid rgba(127,127,127,.16);border-radius:10px;background:rgba(127,127,127,.04)}.energy-ems-kpis span{display:block;font-size:10px;text-transform:uppercase;color:var(--text-muted,#667085);font-weight:700}.energy-ems-kpis strong{display:block;margin-top:3px;font-size:17px}
.energy-ems-chart{height:640px}.energy-ems-error{padding:10px 12px;border-radius:8px;background:#f8d7da;color:#842029;margin:10px 0}.energy-ems-events{display:flex;flex-direction:column;gap:6px}.energy-ems-event{display:grid;grid-template-columns:140px 160px 1fr;gap:12px;align-items:center;padding:9px 10px;border-bottom:1px solid rgba(127,127,127,.12);font-size:12px}.energy-ems-mode{display:inline-flex;align-items:center;width:max-content;padding:3px 8px;border-radius:999px;background:rgba(127,127,127,.12);font-weight:700}.energy-ems-empty{color:var(--text-muted,#667085);font-style:italic;padding:10px}
@media(max-width:900px){.energy-ems-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.energy-ems-event{grid-template-columns:1fr}.energy-ems-chart{height:540px}}

.energy-flow-card {
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    background: #ffffff;
}

.energy-flow-live {
    position: relative;
    min-height: 620px;
    overflow: hidden;
}

.energy-flow-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.energy-flow-node {
    position: absolute;
    z-index: 3;
    width: 190px;
    min-height: 92px;
    padding: 14px;
    border: 1px solid #d5deea;
    border-radius: 14px;
    background: rgba(255,255,255,1);
    box-shadow: 0 4px 14px rgba(15,23,42,.08);
    text-align: center;
}

.energy-flow-node i {
    display: block;
    margin-bottom: 6px;
    font-size: 24px;
}

.energy-flow-node span,
.energy-flow-node small {
    display: block;
}

.energy-flow-node strong {
    display: block;
    margin-top: 5px;
    font-size: 20px;
}

.node-inv3 {
    left: 10%;
    top: 50px;
}

.node-inv1 {
    left: 10%;
    top: 210px;
}

.node-inv2 {
    left: 10%;
    top: 370px;
}


.node-battery-site1 {
    right: 10%;
    top: 30%;
}

.node-battery-site2 {
    right: 10%;
    top: 56%;
}

.node-center {
    left: 53%;
    top: 245px;
    transform: translateX(-50%);
    width: 220px;
}

.node-load-site1 {
    left: 34%;
    top: 3%;
}

.node-load-site2 {
    left: 61%;
    top: 3%;
}

.node-load-site1 i,
.node-load-site2 i {
    color: #dc2626;
}

.node-grid {
    right: 20%;
    top: 255px;
}

.node-grid-virtual {
    left: 53%;
    bottom: 6%;
    right: auto;

    width: 210px;
    min-height: 125px;
    height: auto;

    transform: translateX(-50%);
}

.node-battery {
    right: 10%;
    top: 430px;
}

.node-pv i {
    color: #d6a700;
}

.node-load i {
    color: #dc2626;
}

.node-grid i {
    color: #2563eb;
}

.node-battery i {
    color: #0284c7;
}

.node-center i {
    color: #f59e0b;
}

.energy-flow-path {
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 7;
    stroke-linecap: round;
    opacity: .35;
}

.energy-flow-path.active {
    opacity: 1;
    stroke-dasharray: 3 18;
    animation-name: energyFlowForward;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.energy-flow-path.reverse {
    animation-name: energyFlowReverse;
}

.energy-flow-path.pv {
    stroke: #eab308;
}

.energy-flow-path.load {
    stroke: #ef4444;
}

.energy-flow-path.grid-export {
    stroke: #22c55e;
}

.energy-flow-path.grid-import {
    stroke: #ef4444;
}

.energy-flow-path.battery-charge,
.energy-flow-path.battery-discharge {
    stroke: #38bdf8;
}

@keyframes energyFlowForward {
    from {
        stroke-dashoffset: 42;
    }

    to {
        stroke-dashoffset: 0;
    }
}

@keyframes energyFlowReverse {
    from {
        stroke-dashoffset: 0;
    }

    to {
        stroke-dashoffset: 42;
    }
}

@media (max-width: 950px) {
    .energy-flow-live {
        min-height: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .energy-flow-node {
        position: static;
        width: auto;
        transform: none;
    }

    .energy-flow-lines {
        display: none;
    }
}

/* ==================================================
 * Synoptique : deux batteries + réseau sous l'usine
 * ================================================== */

#energyFlowLive {
    position: relative;
    width: 100%;
    min-height: 700px;
}

#energyFlowLive .energy-flow-lines {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#energyFlowLive .energy-flow-node {
    position: absolute;
    z-index: 2;

    width: 190px;
    min-height: 140px;
    height: auto;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 16px;
}

/* Couleurs */

#energyFlowLive .node-battery-site1 i {
    color: #1593d1;
}

#energyFlowLive .node-battery-site2 i {
    color: #7047d7;
}

#energyFlowLive .node-grid-virtual i {
    color: #2563eb;
}

#energyFlowLive .node-grid-virtual small {
    color: #16a34a;
    font-weight: 700;
}

#energyFlowLive .energy-flow-path.battery-charge-site2 {
    stroke: #7047d7;
}
/* =========================================================
   ENERGY DAILY — onglet Journalier
   ========================================================= */

.energy-daily {
    position: relative;
    min-height: 560px;
    color: #263246;
}

.daily-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.daily-panel {
    overflow: hidden;
    background: #fff;
    border: 1px solid #dde4ee;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
}

.daily-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px 10px;
}

.daily-panel-header h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: #263246;
    font-size: 18px;
    font-weight: 750;
}

.daily-panel-header h2 i {
    color: #61789f;
}

.daily-panel-header p {
    margin: 5px 0 0;
    color: #7a879b;
    font-size: 12px;
}

.daily-refresh {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid #dce4ef;
    border-radius: 10px;
    color: #617089;
    background: #f8fafc;
    cursor: pointer;
}

.daily-refresh:hover {
    color: #fff;
    border-color: #c84f3f;
    background: #c84f3f;
}

.daily-sankey-chart {
    width: 100%;
    height: 420px;
    min-height: 420px;
}

.daily-timeseries-chart {
    width: 100%;
    height: 410px;
    min-height: 410px;
}

.daily-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 10px 18px;
    color: #7a879b;
    border-top: 1px solid #edf1f6;
    font-size: 11px;
}

.daily-panel-footer i {
    margin-right: 5px;
}

.daily-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 4px 16px 16px;
}

.daily-kpi {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    min-height: 105px;
    padding: 15px;
    border: 1px solid #dfe6ef;
    border-radius: 11px;
    background: linear-gradient(145deg, #fff, #fbfcfe);
}

.daily-kpi > i {
    margin-top: 3px;
    font-size: 23px;
}

.daily-kpi span {
    display: block;
    min-height: 30px;
    color: #445066;
    font-size: 12px;
    font-weight: 700;
}

.daily-kpi strong {
    display: inline-block;
    margin-top: 6px;
    color: #111827;
    font-size: 23px;
    line-height: 1;
}

.daily-kpi small {
    margin-left: 4px;
    color: #667085;
    font-size: 11px;
}

.daily-kpi em {
    display: block;
    margin-top: 8px;
    color: #7a879b;
    font-size: 10px;
    font-style: normal;
}

.daily-kpi-wide {
    grid-column: span 3;
    min-height: 90px;
}

.daily-kpi.is-pv {
    border-color: #f2c04b;
    box-shadow: inset 3px 0 #f4b400;
}
.daily-kpi.is-pv > i { color: #f4b400; }

.daily-kpi.is-consumption {
    border-color: #8ed9aa;
    box-shadow: inset 3px 0 #22a559;
}
.daily-kpi.is-consumption > i { color: #22a559; }

.daily-kpi.is-battery-out {
    border-color: #9fc1f5;
    box-shadow: inset 3px 0 #3b82f6;
}
.daily-kpi.is-battery-out > i { color: #3b82f6; }

.daily-kpi.is-battery-in {
    border-color: #c1a8f7;
    box-shadow: inset 3px 0 #8b5cf6;
}
.daily-kpi.is-battery-in > i { color: #8b5cf6; }

.daily-kpi.is-grid {
    border-color: #f4abab;
    box-shadow: inset 3px 0 #ef4444;
}
.daily-kpi.is-grid > i { color: #ef4444; }

.daily-kpi.is-autarky {
    border-color: #91d9dc;
    box-shadow: inset 3px 0 #0f9ca5;
}
.daily-kpi.is-autarky > i { color: #0f9ca5; }

.daily-kpi.is-self-consumption {
    border-color: #f2c76c;
    box-shadow: inset 3px 0 #f59e0b;
}
.daily-kpi.is-self-consumption > i { color: #f59e0b; }

.daily-kpi.is-throughput {
    border-color: #9dbdf4;
    box-shadow: inset 3px 0 #2563eb;
}
.daily-kpi.is-throughput > i { color: #2563eb; }

.daily-chart-panel {
    margin-bottom: 18px;
}

.daily-extrema {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 18px;
    color: #617089;
    border-top: 1px solid #edf1f6;
    font-size: 11px;
}

.daily-extrema span {
    min-width: 0;
    white-space: nowrap;
}

.daily-extrema i {
    margin-right: 6px;
}

.daily-extrema strong {
    color: #263246;
}

.daily-loading,
.daily-error {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-content: center;
    gap: 10px;
    color: #617089;
    border: 1px solid #dfe6ef;
    border-radius: 14px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(4px);
}

.daily-error {
    color: #b42318;
    background: rgba(255, 248, 247, .96);
}

@media (max-width: 1300px) {
    .daily-top-grid {
        grid-template-columns: 1fr;
    }

    .daily-sankey-chart {
        height: 390px;
    }
}

@media (max-width: 850px) {
    .daily-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .daily-kpi-wide {
        grid-column: span 2;
    }

    .daily-extrema {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .daily-kpi-grid {
        grid-template-columns: 1fr;
    }

    .daily-kpi-wide {
        grid-column: auto;
    }

    .daily-extrema {
        grid-template-columns: 1fr;
    }

    .daily-sankey-chart,
    .daily-timeseries-chart {
        height: 340px;
        min-height: 340px;
    }
}

.daily-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 10px;
}

.daily-date-picker {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 9px;
    color: #617089;
    border: 1px solid #dce4ef;
    border-radius: 9px;
    background: #f8fafc;
}

.daily-date-picker input {
    width: 128px;
    padding: 0;
    color: #263246;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.autarky-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 14px;padding:14px 16px;border:1px solid rgba(127,127,127,.18);border-radius:12px;background:var(--card-bg,#fff)}
.autarky-toolbar h2{margin:0;font-size:19px}
.autarky-toolbar p{margin:4px 0 0;color:var(--text-muted,#667085);font-size:12px}
.autarky-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.autarky-periods{display:flex;gap:6px;flex-wrap:wrap}
.autarky-period-btn,.autarky-refresh{min-height:32px;padding:0 10px;border:1px solid rgba(127,127,127,.22);border-radius:8px;background:rgba(127,127,127,.04);color:inherit;cursor:pointer}
.autarky-period-btn.active{border-color:var(--primary-color,#d33e37);background:color-mix(in srgb,var(--primary-color,#d33e37) 10%,transparent);color:var(--primary-color,#d33e37);font-weight:700}
.autarky-meta{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 10px;color:var(--text-muted,#667085);font-size:11px}
.autarky-error{margin:0 0 12px;padding:10px 12px;border-radius:8px;background:#f8d7da;color:#842029}
.autarky-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:14px;align-items:start}
.autarky-chart .chart-card{margin-top:0}
.autarky-gauges{display:grid;gap:10px}
.autarky-gauges .gauge-card{min-height:176px}
@media(max-width:1050px){.autarky-layout{grid-template-columns:1fr}.autarky-gauges{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.autarky-toolbar{flex-direction:column}.autarky-actions{justify-content:flex-start}.autarky-gauges{grid-template-columns:1fr}}


/* =========================================================
 * EMS en direct · intégré depuis /ems/regulation
 * ========================================================= */
.ems-regulation-page {
    --ems-bg:
        #07131f;

    --ems-panel:
        #0d1c2b;

    --ems-panel-2:
        #102234;

    --ems-border:
        rgba(255, 255, 255, 0.10);

    --ems-text:
        #d9e3ee;

    --ems-muted:
        #91a2b5;

    --ems-green:
        #30d26e;

    --ems-red:
        #ff4d5f;

    --ems-yellow:
        #ffc928;

    --ems-blue:
        #3d9eff;

    --ems-cyan:
        #36d9e7;

    --ems-purple:
        #ba70ff;

    background:
        var(--ems-bg);

    border:
        1px solid
        var(--ems-border);

    border-radius:
        12px;

    padding:
        18px;

    color:
        var(--ems-text);

    box-shadow:
        0 10px 30px
        rgba(0, 0, 0, 0.22);
}


.ems-regulation-header {
    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        20px;

    margin-bottom:
        16px;
}


.ems-regulation-title {
    display:
        flex;

    align-items:
        center;

    gap:
        12px;

    font-size:
        22px;

    font-weight:
        700;
}


.ems-regulation-subtitle {
    margin-top:
        3px;

    color:
        var(--ems-muted);

    font-size:
        13px;
}


.ems-last-update {
    color:
        var(--ems-muted);

    font-size:
        12px;
}


.ems-status-badge {
    display:
        inline-flex;

    align-items:
        center;

    gap:
        7px;

    padding:
        5px 9px;

    border-radius:
        999px;

    font-size:
        12px;

    font-weight:
        600;

    background:
        rgba(255, 255, 255, 0.06);
}


.ems-status-dot {
    width:
        8px;

    height:
        8px;

    border-radius:
        50%;

    background:
        var(--ems-muted);
}


.ems-status-badge.is-normal {
    color:
        var(--ems-green);
}


.ems-status-badge.is-normal
.ems-status-dot {
    background:
        var(--ems-green);
}


.ems-status-badge.is-protection {
    color:
        var(--ems-red);
}


.ems-status-badge.is-protection
.ems-status-dot {
    background:
        var(--ems-red);
}


.ems-cards {
    display:
        grid;

    grid-template-columns:
        repeat(
            6,
            minmax(0, 1fr)
        );

    gap:
        12px;

    margin-bottom:
        12px;
}


.ems-card,
.ems-panel,
.ems-info-strip {
    background:
        linear-gradient(
            180deg,
            var(--ems-panel-2),
            var(--ems-panel)
        );

    border:
        1px solid
        var(--ems-border);

    border-radius:
        10px;
}


.ems-card {
    padding:
        15px;

    min-height:
        122px;
}


.ems-card-label {
    text-align:
        center;

    color:
        #b9c5d4;

    font-size:
        13px;

    font-weight:
        600;
}


.ems-card-value {
    margin-top:
        14px;

    text-align:
        center;

    font-size:
        25px;

    line-height:
        1;

    font-weight:
        700;

    font-variant-numeric:
        tabular-nums;
}


.ems-card-value.is-target {
    color:
        var(--ems-blue);
}


.ems-card-value.is-command {
    color:
        var(--ems-purple);
}


.ems-card-caption {
    margin-top:
        12px;

    text-align:
        center;

    color:
        var(--ems-muted);

    font-size:
        12px;
}


.ems-card-footer {
    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        10px;

    margin-top:
        17px;

    color:
        var(--ems-muted);

    font-size:
        11px;
}


.ems-card-footer strong {
    margin-left:
        4px;

    color:
        var(--ems-text);
}


.ems-info-strip {
    display:
        grid;

    grid-template-columns:
        repeat(
            6,
            1fr
        );

    margin-bottom:
        12px;

    padding:
        13px 16px;
}


.ems-info-item {
    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    min-width:
        0;
}


.ems-info-item i {
    width:
        30px;

    color:
        #8aa0b7;

    font-size:
        20px;

    text-align:
        center;
}


.ems-info-item small,
.ems-info-item strong {
    display:
        block;
}


.ems-info-item small {
    color:
        var(--ems-muted);

    font-size:
        11px;
}


.ems-info-item strong {
    margin-top:
        2px;

    font-size:
        12px;
}


.ems-main-grid {
    display:
        grid;

    grid-template-columns:
        minmax(0, 1fr)
        300px;

    gap:
        12px;
}


.ems-panel {
    min-width:
        0;
}


.ems-chart-panel {
    padding:
        15px;
}


.ems-panel-header {
    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    margin-bottom:
        5px;
}


.ems-panel-header strong {
    display:
        block;

    font-size:
        14px;
}


.ems-panel-header span {
    color:
        var(--ems-muted);

    font-size:
        11px;
}


.ems-chart-live {
    display:
        flex;

    align-items:
        center;

    gap:
        6px;

    font-size:
        10px;

    color:
        var(--ems-green);
}


.ems-chart-live span {
    width:
        7px;

    height:
        7px;

    background:
        var(--ems-green);

    border-radius:
        50%;
}


.ems-regulation-chart {
    width:
        100%;

    height:
        470px;
}


.ems-side {
    display:
        flex;

    flex-direction:
        column;

    gap:
        12px;
}


.ems-side
.ems-panel {
    padding:
        15px;
}


.ems-panel-title {
    margin-bottom:
        14px;

    font-size:
        13px;

    font-weight:
        700;
}


.ems-details {
    display:
        flex;

    flex-direction:
        column;

    gap:
        9px;
}


.ems-details > div {
    display:
        flex;

    justify-content:
        space-between;

    gap:
        15px;

    font-size:
        12px;
}


.ems-details span {
    color:
        var(--ems-muted);
}


.ems-details strong {
    font-variant-numeric:
        tabular-nums;

    text-align:
        right;
}



.ems-header-actions {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 8px;
}

.ems-settings-button,
.ems-settings-primary,
.ems-settings-secondary,
.ems-settings-close {
    border: 1px solid var(--ems-border);
    border-radius: 7px;
    color: var(--ems-text);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    font: inherit;
}

.ems-settings-button {
    padding: 7px 11px;
    font-size: 12px;
}

.ems-settings-button i,
.ems-settings-primary i {
    margin-right: 6px;
}

.ems-settings-button:hover,
.ems-settings-secondary:hover {
    background: rgba(255, 255, 255, 0.11);
}

.ems-settings-modal {
    --ems-border: rgba(255, 255, 255, 0.10);
    --ems-text: #d9e3ee;

    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.72);
}

.ems-settings-modal.is-open {
    display: flex;
}

.ems-settings-dialog {
    width: min(1050px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    color: #d9e3ee;
    background: #0d1c2b;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.ems-settings-head,
.ems-settings-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
}

.ems-settings-head {
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.ems-settings-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.ems-settings-title {
    font-size: 17px;
    font-weight: 700;
}

.ems-settings-subtitle,
.ems-settings-message {
    margin-top: 3px;
    color: #91a2b5;
    font-size: 12px;
}

.ems-settings-message.is-error {
    color: #ff6d7b;
}

.ems-settings-message.is-ok {
    color: #30d26e;
}

.ems-settings-close {
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 17px;
}

.ems-settings-fields {
    overflow: auto;
    padding: 18px;
}

.ems-settings-group + .ems-settings-group {
    margin-top: 20px;
}

.ems-settings-group-title {
    margin-bottom: 10px;
    color: #b9c5d4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ems-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ems-setting-field {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.ems-setting-field label {
    display: block;
    margin-bottom: 5px;
    color: #d9e3ee;
    font-size: 12px;
    font-weight: 600;
}

.ems-setting-field small {
    display: block;
    min-height: 30px;
    margin-top: 5px;
    color: #7f93a8;
    font-size: 10px;
    line-height: 1.35;
}

.ems-setting-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    outline: none;
    color: #e5edf5;
    background: #07131f;
    font-variant-numeric: tabular-nums;
}

.ems-setting-field input:focus {
    border-color: #3d9eff;
}

.ems-settings-actions {
    display: flex;
    gap: 8px;
}

.ems-settings-primary,
.ems-settings-secondary {
    padding: 8px 12px;
    font-size: 12px;
}

.ems-settings-primary {
    border-color: #3d9eff;
    background: #267fd4;
}

.ems-settings-primary:disabled {
    opacity: .55;
    cursor: default;
}

@media (
    max-width: 1450px
) {

    .ems-cards {
        grid-template-columns:
            repeat(
                3,
                1fr
            );
    }


    .ems-info-strip {
        grid-template-columns:
            repeat(
                3,
                1fr
            );

        row-gap:
            16px;
    }

}


@media (
    max-width: 1000px
) {

    .ems-main-grid {
        grid-template-columns:
            1fr;
    }


    .ems-side {
        display:
            grid;

        grid-template-columns:
            1fr 1fr;
    }

    .ems-settings-grid {
        grid-template-columns:
            1fr;
    }

    .ems-settings-footer {
        align-items:
            stretch;

        flex-direction:
            column;
    }

    .ems-settings-actions {
        flex-wrap:
            wrap;
    }

}


/* =========================================================
 * Économie EMS
 * ========================================================= */
.ems-economy-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:14px;
}
.ems-economy-header h2{
    margin:0;
    font-size:20px;
}
.ems-economy-header p{
    margin:5px 0 0;
    color:var(--text-muted,#667085);
    font-size:12px;
}
.ems-economy-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
    margin:12px 0;
}
.ems-economy-periods{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}
.ems-economy-period,
.ems-economy-refresh{
    min-height:34px;
    padding:0 11px;
    border:1px solid rgba(127,127,127,.22);
    border-radius:8px;
    background:rgba(127,127,127,.04);
    color:inherit;
    cursor:pointer;
}
.ems-economy-period.active{
    border-color:var(--primary-color,#d33e37);
    background:color-mix(in srgb,var(--primary-color,#d33e37) 10%,transparent);
    color:var(--primary-color,#d33e37);
    font-weight:700;
}
.ems-economy-tariffs{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin:0 0 14px;
}
.ems-economy-tariff{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 10px;
    border:1px solid rgba(127,127,127,.16);
    border-radius:999px;
    background:rgba(127,127,127,.04);
    font-size:11px;
}
.ems-economy-tariff strong{
    font-size:12px;
}
.ems-economy-kpis{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    margin:14px 0;
}
.ems-economy-kpi{
    min-width:0;
    padding:14px;
    border:1px solid rgba(127,127,127,.16);
    border-radius:11px;
    background:var(--card-bg,#fff);
}
.ems-economy-kpi span{
    display:block;
    color:var(--text-muted,#667085);
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
}
.ems-economy-kpi strong{
    display:block;
    margin-top:5px;
    font-size:22px;
    line-height:1.1;
}
.ems-economy-kpi small{
    display:block;
    margin-top:5px;
    color:var(--text-muted,#667085);
    font-size:10px;
}
.ems-economy-kpi.is-gain{
    box-shadow:inset 3px 0 #22a559;
}
.ems-economy-kpi.is-projection{
    box-shadow:inset 3px 0 #2563eb;
}
.ems-economy-kpi.is-import{
    box-shadow:inset 3px 0 #ef4444;
}
.ems-economy-kpi.is-battery{
    box-shadow:inset 3px 0 #8b5cf6;
}
.ems-economy-charts{
    display:grid;
    grid-template-columns:1fr;
    gap:14px;
}
.ems-economy-chart{
    width:100%;
    height:410px;
    min-height:410px;
}
.ems-economy-note{
    margin-top:12px;
    padding:11px 13px;
    border:1px solid rgba(127,127,127,.14);
    border-radius:9px;
    background:rgba(127,127,127,.035);
    color:var(--text-muted,#667085);
    font-size:11px;
    line-height:1.45;
}
.ems-economy-error{
    margin:10px 0;
    padding:10px 12px;
    border-radius:8px;
    background:#f8d7da;
    color:#842029;
}
.ems-economy-meta{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
    margin:4px 0 12px;
    color:var(--text-muted,#667085);
    font-size:11px;
}
@media(max-width:1100px){
    .ems-economy-kpis{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media(max-width:650px){
    .ems-economy-kpis{
        grid-template-columns:1fr;
    }
    .ems-economy-chart{
        height:340px;
        min-height:340px;
    }
}




/* Module injecté : Interventions 1.0.79 */

.inter-page {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 24px 28px;
    box-sizing: border-box;
}

.inter-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.inter-page-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
}

.inter-page-header p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.inter-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.inter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 48px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.inter-status-filters {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.inter-status-filter {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.inter-status-filter:hover {
    background: rgba(127, 127, 127, 0.07);
    color: var(--text-primary);
}

.inter-status-filter.active {
    background: rgba(211, 62, 55, 0.08);
    color: var(--primary-color);
    font-weight: 600;
}

.inter-status-filter.active::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: -13px;
    left: 12px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--primary-color);
}

.inter-status-filter > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(127, 127, 127, 0.1);
    color: var(--text-muted);
    font-size: 10px;
}

.inter-status-filter.active > span {
    background: rgba(211, 62, 55, 0.12);
    color: var(--primary-color);
}

.inter-search {
    position: relative;
    width: 320px;
    flex: 0 0 320px;
}

.inter-search > i {
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.inter-search input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 38px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: 0;
    background: var(--card-bg);
    color: var(--text-primary);
    box-sizing: border-box;
}

.inter-search input:focus {
    border-color: var(--primary-color);
}

.inter-workspace {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.inter-list-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border-right: 1px solid var(--border-color);
    background: var(--card-bg);
    overflow: hidden;
}

.inter-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    flex: 0 0 48px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
}

.inter-list-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    height: 21px;
    padding: 0 7px;
    border-radius: 11px;
    background: rgba(127, 127, 127, 0.1);
    color: var(--text-muted);
    font-size: 10px;
}

.inter-list {
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
    flex: 1 1 auto;
    height: 0;
    overscroll-behavior: contain;
}

.inter-list-item {
    display: block;
    width: 100%;
    margin: 0 0 8px;
    padding: 13px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.inter-list-item:hover {
    border-color: rgba(211, 62, 55, 0.4);
    background: rgba(211, 62, 55, 0.025);
}

.inter-list-item.active {
    border-color: var(--primary-color);
    background: rgba(211, 62, 55, 0.055);
    box-shadow: inset 3px 0 0 var(--primary-color);
}

.inter-list-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.inter-list-number {
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inter-list-customer {
    margin-top: 8px;
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inter-list-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 7px;
}

.inter-list-meta > span {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--text-muted);
    font-size: 11px;
}

.inter-list-meta i {
    width: 13px;
    flex: 0 0 13px;
    text-align: center;
}

.inter-list-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 10px;
}

.inter-list-item-bottom > span {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.inter-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.inter-status.planned {
    background: rgba(70, 130, 220, 0.13);
    color: #4a82d6;
}

.inter-status.in_progress {
    background: rgba(230, 160, 35, 0.14);
    color: #d49724;
}

.inter-status.completed {
    background: rgba(50, 170, 90, 0.14);
    color: #35a65e;
}

.inter-status.cancelled {
    background: rgba(127, 127, 127, 0.12);
    color: var(--text-muted);
}

.inter-detail-panel {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 0;
    background: var(--page-bg);
}

.inter-detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 380px;
    padding: 30px;
    text-align: center;
    box-sizing: border-box;
}

.inter-detail-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 15px;
    border-radius: 16px;
    background: rgba(127, 127, 127, 0.08);
    color: var(--text-muted);
    font-size: 25px;
}

.inter-detail-empty h2 {
    margin: 0;
    font-size: 18px;
}

.inter-detail-empty p {
    max-width: 420px;
    margin: 7px 0 18px;
    color: var(--text-muted);
    font-size: 12px;
}

.inter-empty-list,
.inter-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 180px;
    color: var(--text-muted);
    font-size: 12px;
}

.inter-empty-list i {
    font-size: 23px;
}

.inter-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 26px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.inter-detail-eyebrow {
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.inter-detail-header h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
}

.inter-detail-subtitle {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

.inter-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 20px 26px 0;
}

.inter-info-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

.inter-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 7px;
    background: rgba(127, 127, 127, 0.07);
    color: var(--text-muted);
    font-size: 12px;
}

.inter-info-item > div:last-child {
    min-width: 0;
}

.inter-info-label {
    margin-bottom: 3px;
    color: var(--text-muted);
    font-size: 10px;
}

.inter-info-value {
    margin: 0;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: pre-line;
}

.inter-section,
.inter-form-section {
    margin: 20px 26px 0;
}

.inter-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
}

.inter-section-title i {
    width: 16px;
    color: var(--text-muted);
    text-align: center;
}

.inter-furnaces {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(190px, 1fr)
    );
    gap: 10px;
}

.inter-furnace-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

.inter-furnace-card strong {
    font-size: 14px;
}

.inter-furnace-card span {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 10px;
}

.inter-text-block {
    min-height: 48px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    box-sizing: border-box;
}

.inter-section-empty {
    padding: 18px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

.inter-parts {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

.inter-part {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--border-color);
}

.inter-part:last-child {
    border-bottom: 0;
}

.inter-part > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.inter-part span {
    color: var(--text-muted);
    font-size: 10px;
}

.inter-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.inter-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.inter-form-field.full {
    grid-column: 1 / -1;
}

.inter-form-field > span {
    color: var(--text-muted);
    font-size: 11px;
}

.inter-form-field input,
.inter-form-field select,
.inter-form-field textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    outline: 0;
    background: var(--card-bg);
    color: var(--text-primary);
    font: inherit;
    box-sizing: border-box;
}

.inter-form-field input,
.inter-form-field select {
    height: 39px;
}

.inter-form-field textarea {
    min-height: 110px;
    resize: vertical;
}

.inter-form-field input:focus,
.inter-form-field select:focus,
.inter-form-field textarea:focus {
    border-color: var(--primary-color);
}

.inter-form-field select:disabled,
.inter-form-field input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.inter-input-unit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inter-input-unit input {
    flex: 1;
}

.inter-input-unit > span {
    color: var(--text-muted);
    font-size: 11px;
}

.inter-furnace-selector {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(190px, 1fr)
    );
    gap: 8px;
}

.inter-furnace-check {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 9px 11px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    cursor: pointer;
    box-sizing: border-box;
}

.inter-furnace-check:hover {
    border-color: var(--primary-color);
}

.inter-furnace-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.inter-furnace-check-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.inter-furnace-check-main strong {
    font-size: 14px;
}

.inter-furnace-check-main small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inter-furnace-checkmark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: transparent;
    font-size: 10px;
}

.inter-furnace-check:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(211, 62, 55, 0.06);
}

.inter-furnace-check:has(input:checked)
.inter-furnace-checkmark {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.inter-create-modal .modal-header {
    align-items: flex-start;
}

.inter-create-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-weight: 700;
}

.inter-modal-subtitle {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
}

.inter-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 250px;
    color: var(--text-muted);
}

.inter-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.inter-modal-section {
    margin-bottom: 22px;
}

.inter-modal-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 11px;
    font-size: 13px;
    font-weight: 700;
}

.inter-modal-section-title > i {
    width: 17px;
    color: var(--text-muted);
    text-align: center;
}

.inter-modal-selected-count {
    margin-left: auto;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(127, 127, 127, 0.1);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
}

.inter-modal-fields {
    display: grid;
    gap: 10px;
}

.inter-modal-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.inter-modal-field > span {
    color: var(--text-muted);
    font-size: 11px;
}

.inter-modal-furnaces {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(185px, 1fr)
    );
    gap: 8px;
}

.inter-modal-empty {
    grid-column: 1 / -1;
    padding: 20px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

.inter-modal-furnace {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 11px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.inter-modal-furnace:hover {
    border-color: var(--primary-color);
}

.inter-modal-furnace input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.inter-modal-furnace-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.inter-modal-furnace-main strong {
    font-size: 14px;
}

.inter-modal-furnace-main small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inter-modal-furnace-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: transparent;
    font-size: 10px;
}

.inter-modal-furnace:has(input:checked) {
    border-color: var(--primary-color);
    background: rgba(211, 62, 55, 0.06);
}

.inter-modal-furnace:has(input:checked)
.inter-modal-furnace-check {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.inter-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 6px -16px -16px;
    padding: 15px 16px 0;
    border-top: 1px solid var(--border-color);
}

.inter-modal-error {
    margin-bottom: 18px;
}

@media (max-width: 1200px) {
    .inter-workspace {
        grid-template-columns: 320px minmax(0, 1fr);
    }

    .inter-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inter-search {
        width: 270px;
        flex-basis: 270px;
    }
}

@media (max-width: 900px) {
    .inter-page {
        padding: 18px;
    }

    .inter-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .inter-status-filters {
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .inter-status-filter.active::after {
        display: none;
    }

    .inter-search {
        width: 100%;
        flex-basis: auto;
    }

    .inter-workspace {
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    .inter-list-panel {
        max-height: 360px;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .inter-detail-panel {
        min-height: 500px;
    }

    .inter-info-grid {
        grid-template-columns: 1fr;
    }

    .inter-form-grid,
    .inter-modal-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .inter-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .inter-page-header .btn {
        width: 100%;
    }

    .inter-detail-header {
        flex-direction: column;
    }

    .inter-info-grid,
    .inter-section,
    .inter-form-section,
    .inter-detail-actions {
        margin-right: 16px;
        margin-left: 16px;
    }

    .inter-info-grid {
        padding-right: 0;
        padding-left: 0;
    }

    .inter-detail-header {
        padding-right: 16px;
        padding-left: 16px;
    }
}



.inter-workspace.calendar-mode {
    display: block;
    overflow: auto;
    background: var(--card-bg);
}

.inter-calendar {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.inter-calendar-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.inter-calendar-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.inter-calendar-navigation {
    display: flex;
    align-items: center;
    gap: 6px;
}

.inter-calendar-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    color: var(--text-muted);
    font-size: 10px;
}

.inter-calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.inter-calendar-legend span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.inter-calendar-legend .planned::before {
    background: #4a82d6;
}

.inter-calendar-legend .in_progress::before {
    background: #d49724;
}

.inter-calendar-legend .completed::before {
    background: #35a65e;
}

.inter-calendar-weekdays {
    display: grid;
    grid-template-columns:
        repeat(7, minmax(0, 1fr));
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.inter-calendar-weekdays > div {
    padding: 9px 10px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
}

.inter-calendar-grid {
    display: grid;
    grid-template-columns:
        repeat(7, minmax(0, 1fr));
    grid-template-rows:
        repeat(6, minmax(115px, 1fr));
    flex: 1;
}

.inter-calendar-day {
    position: relative;
    min-width: 0;
    min-height: 115px;
    padding: 7px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.inter-calendar-day:nth-child(7n) {
    border-right: 0;
}

.inter-calendar-day.outside {
    background: rgba(127, 127, 127, 0.025);
}

.inter-calendar-day.outside
.inter-calendar-day-number {
    opacity: 0.35;
}

.inter-calendar-day.today {
    background: rgba(211, 62, 55, 0.025);
}

.inter-calendar-day-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    margin-bottom: 5px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
}

.inter-calendar-day.today
.inter-calendar-day-number {
    background: var(--primary-color);
    color: #fff;
}

.inter-calendar-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inter-calendar-event {
    display: block;
    width: 100%;
    padding: 5px 7px;
    overflow: hidden;
    border: 0;
    border-left: 3px solid;
    border-radius: 5px;
    background: rgba(127, 127, 127, 0.06);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.inter-calendar-event:hover {
    filter: brightness(0.97);
}

.inter-calendar-event.planned {
    border-left-color: #4a82d6;
    background: rgba(70, 130, 220, 0.08);
}

.inter-calendar-event.in_progress {
    border-left-color: #d49724;
    background: rgba(230, 160, 35, 0.09);
}

.inter-calendar-event.completed {
    border-left-color: #35a65e;
    background: rgba(50, 170, 90, 0.08);
}

.inter-calendar-event.cancelled {
    border-left-color: #999;
    opacity: 0.55;
}

.inter-calendar-event-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 9px;
}

.inter-calendar-event strong {
    display: block;
    overflow: hidden;
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inter-calendar-event small {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .inter-calendar-header {
        grid-template-columns: 1fr;
    }

    .inter-calendar-header h2 {
        grid-row: 1;
    }

    .inter-calendar-navigation {
        justify-content: center;
    }

    .inter-calendar-legend {
        justify-content: center;
    }

    .inter-calendar-grid {
        min-width: 900px;
    }

    .inter-calendar-weekdays {
        min-width: 900px;
    }
}

.inter-workspace {
    grid-template-columns:
        380px
        minmax(0, 1fr);
}

.inter-detail-panel > #interventionDetail {
    width: min(
        100%,
        1180px
    );

    margin: 0 auto;

    background:
        var(--card-bg);
}

.inter-detail-header {
    position: sticky;
    top: 0;
    z-index: 5;

    align-items: center;

    padding:
        20px
        24px;

    background:
        var(--card-bg);

    box-shadow:
        0 1px 0
        var(--border-color);
}

.inter-detail-header h2 {
    font-size: 22px;
}

.inter-detail-subtitle {
    margin-top: 4px;

    font-size: 13px;
}

.inter-info-grid {
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 10px;

    padding:
        18px
        24px
        0;
}

.inter-info-item {
    min-height: 64px;

    padding:
        11px
        13px;

    border-radius:
        10px;
}

.inter-info-icon {
    width: 36px;
    height: 36px;

    flex-basis: 36px;

    border-radius:
        9px;

    background:
        rgba(127, 127, 127, 0.06);

    font-size:
        13px;
}

.inter-info-label {
    margin-bottom: 2px;

    font-size: 10px;

    text-transform:
        uppercase;

    letter-spacing:
        0.04em;
}

.inter-info-value {
    font-size: 13px;
}

.inter-section {
    margin:
        18px
        24px
        0;

    padding:
        16px;

    border:
        1px solid
        var(--border-color);

    border-radius:
        10px;

    background:
        var(--card-bg);
}

.inter-section-title {
    margin-bottom:
        12px;

    font-size:
        13px;
}

.inter-section-title i {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    border-radius:
        7px;

    background:
        rgba(127, 127, 127, 0.07);
}

.inter-furnaces {
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                220px,
                1fr
            )
        );
}

.inter-furnace-card {
    position: relative;

    padding:
        13px
        14px
        13px
        18px;

    border-radius:
        9px;

    overflow:
        hidden;
}

.inter-furnace-card::before {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;
    left: 0;

    width: 4px;

    background:
        var(--primary-color);
}

.inter-furnace-card strong {
    font-size:
        15px;
}

.inter-text-block {
    min-height: 0;

    padding: 0;

    border: 0;

    background:
        transparent;

    font-size:
        13px;

    line-height:
        1.6;
}

.inter-detail-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;

    margin:
        20px
        24px
        24px;

    padding-top:
        16px;

    border-top:
        1px solid
        var(--border-color);

    background:
        transparent;
}

.inter-detail-actions .btn {
    min-width:
        100px;
}

.inter-list {
    padding: 8px;
}

.inter-list-item {
    margin-bottom: 6px;

    padding:
        11px
        12px;

    border-radius:
        9px;
}

.inter-list-customer {
    margin-top: 6px;

    font-size:
        14px;
}

.inter-list-meta {
    gap: 3px;

    margin-top: 5px;
}

.inter-list-item-bottom {
    margin-top: 8px;

    padding-top: 7px;
}

.inter-list-item.active {
    border-color:
        rgba(
            211,
            62,
            55,
            0.35
        );

    background:
        rgba(
            211,
            62,
            55,
            0.055
        );

    box-shadow:
        inset
        4px
        0
        0
        var(--primary-color);
}

.inter-info-item,
.inter-section {
    border-color:
        rgba(127, 127, 127, 0.18);

    background:
        rgba(127, 127, 127, 0.075);
}

.inter-info-icon,
.inter-section-title i {
    background:
        rgba(127, 127, 127, 0.11);
}

.inter-list-group {
    margin-bottom: 14px;
}

.inter-list-group-title {
    position: sticky;
    top: 0;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin: 0 -2px 7px;
    padding: 7px 8px;

    background:
        var(--card-bg);

    color:
        var(--text-muted);

    font-size:
        10px;

    font-weight:
        700;

    text-transform:
        uppercase;

    letter-spacing:
        0.05em;
}

.inter-list-group-title > span:last-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 20px;
    height: 20px;

    padding: 0 6px;

    border-radius: 10px;

    background:
        rgba(127, 127, 127, 0.1);

    font-size:
        9px;
}

.inter-workspace.map-mode {
    display: block;
    min-height: 0;
}

.inter-map-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 600px;
}

.inter-map {
    flex: 1;
    width: 100%;
    min-height: 600px;
    border-radius: 10px;
    overflow: hidden;
}

.inter-map-info {
    padding: 10px 0 0;
    font-size: 13px;
    color: #64748b;
}

.inter-list-plan {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    margin-left: auto;

    color: var(--primary-color);

    font-weight: 600;

    cursor: pointer;
}

.inter-list-plan:hover {
    text-decoration: underline;
}

/* Interventions + post-interventions unifiées — Core 1.5.3 */

.inter-toolbar-unified {
    align-items: flex-start;
}

.inter-status-filters-unified {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.inter-filter-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.inter-filter-separator {
    width: 1px;
    height: 26px;
    flex: 0 0 1px;
    margin: 0 4px;
    background: var(--border-color);
}

.post-workflow-filter {
    position: relative;
}

.post-filter-count:not(:empty) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 10px;
    background: rgba(127, 127, 127, 0.12);
    font-size: 10px;
    line-height: 1;
}

.inter-status-filter.active .post-filter-count:not(:empty) {
    background: rgba(255, 255, 255, 0.18);
}

.post-inter-list-item {
    display: block;
    width: 100%;
    margin-bottom: 7px;
    padding: 13px 14px;
    border: 1px solid rgba(127, 127, 127, 0.18);
    border-radius: 10px;
    background: var(--card-bg);
    color: inherit;
    text-align: left;
    transition:
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease;
}

.post-inter-list-item:hover {
    border-color: rgba(127, 127, 127, 0.34);
    background: rgba(127, 127, 127, 0.045);
}

.post-inter-list-item.active {
    border-color: rgba(211, 62, 55, 0.35);
    background: rgba(211, 62, 55, 0.055);
    box-shadow: inset 4px 0 0 var(--primary-color);
}

.post-inter-list-top,
.post-inter-list-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.post-inter-list-top strong {
    font-size: 14px;
}

.post-inter-list-customer {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
}

.post-inter-list-site {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
}

.post-inter-list-bottom {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(127, 127, 127, 0.13);
    color: var(--text-muted);
    font-size: 11px;
}

.post-inter-list-bottom span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-badge {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.post-badge.pending_validation {
    background: #fff3cd;
    color: #664d03;
}

.post-badge.to_invoice {
    background: #d1e7dd;
    color: #0f5132;
}

.post-badge.completed {
    background: #cff4fc;
    color: #055160;
}

.post-integrated-detail {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding-bottom: 24px;
}

.post-integrated-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.post-integrated-header h2 {
    margin: 2px 0 0;
    font-size: 22px;
}

.post-integrated-kicker {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.post-integrated-subtitle {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 13px;
}

.post-integrated-detail > .post-detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(127, 127, 127, 0.035);
}

.post-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 18px 24px 0;
}

.post-summary-grid article {
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid rgba(127, 127, 127, 0.18);
    border-radius: 10px;
    background: rgba(127, 127, 127, 0.075);
}

.post-summary-grid span,
.post-validation-grid span,
.post-seal span {
    display: block;
    margin-bottom: 3px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.post-summary-grid strong {
    display: block;
    font-size: 14px;
}

.post-summary-grid small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 11px;
}

.post-section {
    margin: 18px 24px 0;
    padding: 16px;
    border: 1px solid rgba(127, 127, 127, 0.18);
    border-radius: 10px;
    background: rgba(127, 127, 127, 0.045);
}

.post-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 13px;
}

.post-section h3 > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(127, 127, 127, 0.11);
}

.post-section-total {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 12px;
}

.post-text {
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.6;
}

.post-client-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    font-size: 13px;
    line-height: 1.6;
}

.post-furnace-chip {
    display: inline-flex;
    margin: 0 5px 5px 0;
    padding: 5px 8px;
    border-radius: 7px;
    background: rgba(127, 127, 127, 0.1);
    font-weight: 600;
}

.post-table {
    margin-bottom: 0;
    font-size: 12px;
}

.post-table th {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.post-validation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.post-validation-grid > div {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(127, 127, 127, 0.075);
}

.post-seal {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(127, 127, 127, 0.075);
}

.post-seal code {
    display: block;
    overflow-wrap: anywhere;
    color: inherit;
    font-size: 11px;
}

.post-empty {
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}

.post-settings-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(0, 0, 0, .45);
}

.post-settings {
    position: fixed;
    z-index: 1051;
    top: 50%;
    left: 50%;
    width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 20px;
    overflow: auto;
    transform: translate(-50%, -50%);
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

.post-settings header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.post-settings header h2 {
    margin: 0;
    font-size: 20px;
}

.post-settings header p {
    margin: 3px 0 0;
    color: var(--text-muted);
    font-size: 12px;
}

.post-settings label {
    display: block;
    margin: 16px 0 6px;
    font-size: 13px;
    font-weight: 700;
}

.post-settings select {
    width: 100%;
    min-height: 150px;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: inherit;
}

.post-settings-help {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 11px;
}

.post-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 1200px) {
    .inter-toolbar-unified {
        flex-direction: column;
    }

    .inter-search {
        width: 100%;
    }

    .post-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .inter-filter-separator {
        display: none;
    }

    .inter-filter-group {
        flex-wrap: wrap;
    }

    .post-summary-grid,
    .post-client-grid,
    .post-validation-grid {
        grid-template-columns: 1fr;
    }

    .post-inter-list-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .post-integrated-header {
        position: static;
    }

    .post-integrated-detail > .post-detail-actions {
        justify-content: stretch;
        flex-direction: column;
    }

    .post-integrated-detail > .post-detail-actions .btn {
        width: 100%;
    }
}


/* Navigation unifiée — Interventions 1.0.27 */
.inter-status-filter {
    min-height: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
}

.inter-status-filter.active {
    border-color: rgba(211, 62, 55, 0.14);
    background: rgba(211, 62, 55, 0.08);
}

.inter-status-filter.active::after {
    display: none;
}

.inter-status-filter > span,
.post-filter-count,
.post-filter-count:not(:empty) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: 2px;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(127, 127, 127, 0.10);
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1;
}

.inter-status-filter.active > span,
.inter-status-filter.active .post-filter-count {
    background: rgba(211, 62, 55, 0.12);
    color: var(--primary-color);
}

.post-temp-curve-cell {
    width: 170px;
}

.post-temp-mini-graph {
    display: block;
    width: 150px;
    height: 46px;
    color: #2563eb;
    border: 1px solid rgba(127, 127, 127, 0.16);
    border-radius: 6px;
    background: rgba(127, 127, 127, 0.035);
}

.post-curve-empty {
    color: var(--text-muted);
}


/* Interventions 1.0.35 — navigation et listes unifiées */
.inter-status-filters-unified .inter-nav-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(127, 127, 127, 0.10);
    border-radius: 8px;
    background: rgba(127, 127, 127, 0.025);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.inter-status-filters-unified .inter-nav-tab:hover {
    border-color: rgba(127, 127, 127, 0.20);
    background: rgba(127, 127, 127, 0.06);
    color: var(--text-primary);
}

.inter-status-filters-unified .inter-nav-tab.active {
    border-color: rgba(211, 62, 55, 0.16);
    background: rgba(211, 62, 55, 0.08);
    color: var(--primary-color);
    font-weight: 600;
}

.inter-status-filters-unified .inter-nav-tab.active::after {
    display: none !important;
}

.inter-status-filters-unified .inter-nav-tab > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin: 0;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(127, 127, 127, 0.10);
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1;
}

.inter-status-filters-unified .inter-nav-tab.active > span {
    background: rgba(211, 62, 55, 0.12);
    color: var(--primary-color);
}

.inter-list-item {
    display: block;
    width: 100%;
    margin-bottom: 7px;
    padding: 13px 14px;
    border: 1px solid rgba(127, 127, 127, 0.18);
    border-radius: 10px;
    background: var(--card-bg);
    color: inherit;
    text-align: left;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.inter-list-item:hover {
    border-color: rgba(127, 127, 127, 0.34);
    background: rgba(127, 127, 127, 0.045);
}

.inter-list-item.active {
    border-color: rgba(211, 62, 55, 0.35);
    background: rgba(211, 62, 55, 0.055);
    box-shadow: inset 4px 0 0 var(--primary-color);
}

.inter-list-item-top,
.inter-list-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.inter-list-customer {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
}

.inter-list-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
}

.inter-list-item-bottom {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(127, 127, 127, 0.10);
    color: var(--text-muted);
    font-size: 11px;
}

.inter-training-list{display:flex;flex-direction:column;gap:8px}.inter-training-person,.post-training-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--border-color);border-radius:8px;background:var(--card-bg)}.inter-training-person>div{display:flex;flex-direction:column;min-width:0}.inter-training-person small{color:var(--text-muted)}.post-training-placeholder{display:flex;flex-direction:column;gap:8px}.post-training-row strong{flex:1}.post-training-row span{color:var(--text-muted);font-size:12px}.post-training-actions{margin-top:10px}


/* Formation 1.0.35 */
.inter-training-card { margin-top: 14px; }
.inter-training-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.inter-training-title > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.inter-training-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: rgba(127,127,127,.12); font-size: 12px; font-weight: 700; }
.inter-training-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.inter-training-person { display: grid; grid-template-columns: 34px minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--inter-border, #dfe3e8); border-radius: 10px; background: var(--inter-card, #fff); }
.inter-training-person-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(127,127,127,.10); }
.inter-training-person-main { display: flex; flex-direction: column; min-width: 0; }
.inter-training-person-main strong, .inter-training-person-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inter-training-person-main small { color: var(--text-muted, #6c757d); }
.inter-training-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.inter-training-badge.maintenance { background: rgba(230,159,0,.14); color: #8a5f00; }
.inter-training-badge.user { background: rgba(0,114,178,.12); color: #00618f; }
.inter-training-person-actions { display: flex; gap: 5px; }
.inter-training-empty, .inter-training-loading { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 72px; padding: 14px; border: 1px dashed var(--inter-border, #dfe3e8); border-radius: 10px; color: var(--text-muted, #6c757d); text-align: center; }
.inter-training-type-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inter-training-type-choice label { position: relative; cursor: pointer; }
.inter-training-type-choice input { position: absolute; opacity: 0; pointer-events: none; }
.inter-training-type-choice span { display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; align-items: center; min-height: 78px; padding: 12px; border: 1px solid var(--inter-border, #dfe3e8); border-radius: 10px; }
.inter-training-type-choice i { grid-row: 1 / 3; font-size: 18px; }
.inter-training-type-choice b { align-self: end; }
.inter-training-type-choice small { align-self: start; color: var(--text-muted, #6c757d); line-height: 1.25; }
.inter-training-type-choice input:checked + span { border-color: var(--primary-color, #d33e37); box-shadow: 0 0 0 2px rgba(211,62,55,.10); }
@media (max-width: 620px) {
    .inter-training-person { grid-template-columns: 34px minmax(0,1fr) auto; }
    .inter-training-badge { grid-column: 2; justify-self: start; }
    .inter-training-person-actions { grid-column: 3; grid-row: 1 / 3; }
    .inter-training-type-choice { grid-template-columns: 1fr; }
}

.post-training-section .post-training-row { display:grid; grid-template-columns:minmax(180px,1fr) minmax(120px,.8fr) auto; align-items:center; gap:12px; }
@media (max-width:700px){.post-training-section .post-training-row{grid-template-columns:1fr}.post-training-section .post-training-row .inter-training-badge{justify-self:start}}

/* 1.0.40 — scroll stable liste + détail, même après chargement du rapport */
.inter-page {
    min-height: 0;
    overflow: hidden;
}

.inter-workspace {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    overflow: hidden;
}

.inter-list-panel,
.inter-detail-panel {
    min-height: 0;
    height: 100%;
}

.inter-list-panel {
    overflow: hidden;
}

.inter-list {
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.inter-detail-panel {
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.inter-detail-panel > #interventionDetail {
    height: auto;
    min-height: 100%;
    max-height: none;
    overflow: visible;
}

@media (max-width: 900px) {
    .inter-page {
        overflow: visible;
    }

    .inter-workspace {
        height: auto;
        overflow: visible;
    }

    .inter-list-panel {
        height: auto;
        max-height: 360px;
    }

    .inter-detail-panel {
        height: auto;
        overflow: visible;
    }

    .inter-detail-panel > #interventionDetail {
        min-height: 500px;
    }
}


/* 1.0.41 — verrouillage du viewport uniquement pour le détail post-intervention */
.inter-workspace.post-detail-open {
    min-height: 0;
    overflow: hidden;
}

.inter-workspace.post-detail-open > .inter-list-panel,
.inter-workspace.post-detail-open > .inter-detail-panel {
    min-height: 0;
    height: 100%;
    max-height: 100%;
}

.inter-workspace.post-detail-open > .inter-list-panel {
    overflow: hidden;
}

.inter-workspace.post-detail-open > .inter-list-panel > .inter-list {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.inter-workspace.post-detail-open > .inter-detail-panel {
    overflow-y: auto;
    overflow-x: hidden;
}

.inter-workspace.post-detail-open
> .inter-detail-panel
> .post-integrated-detail {
    width: min(100%, 1180px);
    min-height: 0;
    margin: 0 auto;
}


/* 1.0.42 — le contenu post-intervention ne peut plus imposer la hauteur du grid */
.inter-workspace.post-detail-open > #interventionDetail {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    contain: layout paint;
}

.inter-workspace.post-detail-open
> #interventionDetail
> .post-integrated-detail {
    min-height: 0;
    max-height: none;
}


/* 1.0.43 — en-tête post-intervention compact et sticky */
.post-integrated-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.post-integrated-heading {
    min-width: 0;
    flex: 1 1 auto;
}

.post-integrated-header h2 {
    margin: 2px 0 0;
    font-size: 20px;
    line-height: 1.2;
}

.post-integrated-subtitle {
    margin-top: 3px;
}

.post-integrated-header .post-detail-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

@media (max-width: 1050px) {
    .post-integrated-header {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .post-integrated-header .post-detail-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ===== Interventions 1.0.53 · Garantie ===== */
.post-badge.warranty{gap:5px;background:#e8f1ff;color:#0b4ea2}.post-badge.internal{background:#eceff3;color:#495057}


/* Facturation 1.0.79 */
.post-invoice-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2200;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(2px);
}

.post-invoice-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 2210;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    transform: translate(-50%, -50%);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-color, #fff);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.post-invoice-modal > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px 16px;
    border-bottom: 1px solid var(--border-color);
}

.post-invoice-modal h2 {
    margin: 0;
    font-size: 20px;
}

.post-invoice-modal header p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.post-invoice-modal form {
    display: grid;
    gap: 18px;
    padding: 22px 24px 24px;
}

.post-invoice-field {
    display: grid;
    gap: 7px;
}

.post-invoice-field > label:first-child {
    font-size: 13px;
    font-weight: 650;
}

.post-invoice-field > label:first-child span {
    margin-left: 5px;
    color: var(--text-muted);
    font-weight: 400;
}

.post-invoice-dropzone {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 78px;
    padding: 12px 14px;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    background: rgba(127,127,127,.035);
}

.post-invoice-dropzone:hover {
    border-color: var(--primary-color);
    background: rgba(211,62,55,.035);
}

.post-invoice-dropzone > i {
    color: #c53d3d;
    font-size: 26px;
}

.post-invoice-dropzone > div {
    display: grid;
    flex: 1;
    gap: 3px;
    min-width: 0;
}

.post-invoice-dropzone strong,
.post-invoice-dropzone small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-invoice-dropzone small {
    color: var(--text-muted);
}

.post-invoice-notify {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    cursor: pointer;
}

.post-invoice-notify input {
    width: 16px;
    height: 16px;
}

.post-invoice-error {
    padding: 10px 12px;
    border: 1px solid rgba(197,61,61,.25);
    border-radius: 8px;
    color: #a52727;
    background: rgba(197,61,61,.08);
    font-size: 13px;
}

.post-invoice-modal footer {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 4px;
}

.post-invoice-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 14px;
    padding: 13px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(127,127,127,.035);
}

.post-invoice-summary > div {
    display: grid;
    gap: 2px;
}

.post-invoice-summary span,
.post-invoice-summary small {
    color: var(--text-muted);
    font-size: 12px;
}

@media (max-width: 650px) {
    .post-invoice-modal {
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: 92vh;
        transform: none;
        border-radius: 16px 16px 0 0;
    }

    .post-invoice-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .post-invoice-summary .btn {
        width: 100%;
    }
}




/* Module injecté : Articles 1.0.6 */

.articles-table-wrap{max-height:calc(100vh - 310px);min-height:420px;overflow:auto}.articles-list tr{cursor:pointer}.article-detail-grid dt{color:var(--bs-secondary-color);font-weight:500}.article-detail-grid dd{margin-bottom:.65rem}.article-description{white-space:pre-wrap}.article-kpi{height:100%;padding:1rem;border:1px solid var(--bs-border-color);border-radius:var(--bs-border-radius);background:var(--bs-tertiary-bg)}.article-kpi small{display:block;color:var(--bs-secondary-color);margin-bottom:.25rem}.article-kpi strong{font-size:1.25rem}.article-history-row{padding:.85rem 0;border-bottom:1px solid var(--bs-border-color)}.article-history-row:last-child{border-bottom:0}.article-history-values{font-family:var(--bs-font-monospace);font-size:.875rem;overflow-wrap:anywhere}.articles-toolbar{display:flex;gap:.75rem;align-items:center}.articles-search-group{flex:1 1 auto}.articles-supplier-group{flex:0 0 min(360px,38%)}@media(max-width:767.98px){.articles-toolbar{flex-direction:column;align-items:stretch}.articles-supplier-group{flex:1 1 auto;width:100%}}.articles-app .nav-tabs{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}.articles-app .nav-tabs .nav-link{white-space:nowrap}



/* Module injecté : Tasks 1.0.1 */


.bee-task-editor{min-height:170px;border:1px solid #dee2e6;border-radius:.375rem;padding:.75rem;background:#fff}
.bee-task-editor:focus{outline:0;border-color:#86b7fe;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}
.bee-task-editor img{max-width:100%;height:auto;border-radius:.375rem;margin:.4rem 0}
.bee-task-toolbar{display:flex;gap:.25rem;flex-wrap:wrap;margin-bottom:.4rem}
.bee-task-relation{font-size:.8rem;padding:.2rem .5rem;border-radius:999px;background:#eef2f6;display:inline-flex;margin:.15rem .15rem .15rem 0}.bee-kanban-column{min-height:420px;background:var(--bs-tertiary-bg);border:1px solid var(--bs-border-color)}.bee-kanban-card{cursor:grab;transition:transform .12s ease,box-shadow .12s ease}.bee-kanban-card:hover{transform:translateY(-1px);box-shadow:0 .25rem .75rem rgba(0,0,0,.08)}.bee-kanban-card:active{cursor:grabbing}.bee-task-detail-progress{height:8px}.bee-subtask-row:last-child{border-bottom:0!important}

.bee-kanban-column[data-status="new"]{background:#fff3e0}
.bee-kanban-column[data-status="in_progress"]{background:#fff9db}
.bee-kanban-column[data-status="waiting"]{background:#eaf4ff}
.bee-kanban-column[data-status="done"]{background:#e9f8ef}
.bee-task-tag{display:inline-flex;align-items:center;gap:.35rem;padding:.2rem .5rem;border-radius:999px;font-size:.78rem;border:1px solid rgba(0,0,0,.08)}
.bee-task-field-label{font-size:.78rem;color:var(--bs-secondary-color);margin-bottom:.2rem}
.bee-task-inline-edit{border:0;background:transparent;padding:.15rem .25rem;width:100%}
.bee-task-inline-edit:focus{background:var(--bs-body-bg);outline:1px solid var(--bs-primary);border-radius:.25rem}
.bee-task-activity{border-left:2px solid var(--bs-border-color);padding-left:.75rem;margin-left:.25rem}

.bee-assignee-picker{border:1px solid var(--bs-border-color);border-radius:.5rem;background:var(--bs-body-bg)}
.bee-assignee-search{border:0;border-bottom:1px solid var(--bs-border-color);border-radius:.5rem .5rem 0 0}
.bee-assignee-search:focus{box-shadow:none;border-color:var(--bs-border-color)}
.bee-assignee-list{max-height:230px;overflow:auto;padding:.35rem}
.bee-assignee-option{display:flex;align-items:center;gap:.55rem;padding:.45rem .55rem;border-radius:.4rem;cursor:pointer}
.bee-assignee-option:hover{background:var(--bs-tertiary-bg)}
.bee-assignee-option small{display:block;color:var(--bs-secondary-color)}
.bee-assignee-chips{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.5rem}
.bee-assignee-chip{display:inline-flex;align-items:center;gap:.35rem;padding:.25rem .55rem;border:1px solid var(--bs-border-color);border-radius:999px;background:var(--bs-tertiary-bg);font-size:.82rem}
.bee-task-thread{display:flex;flex-direction:column;gap:.75rem}
.bee-task-message{border:1px solid var(--bs-border-color);border-radius:.6rem;padding:.75rem;background:var(--bs-body-bg)}
.bee-task-message-body table{width:100%;border-collapse:collapse;margin:.5rem 0}
.bee-task-message-body td,.bee-task-message-body th{border:1px solid var(--bs-border-color);padding:.35rem}
.bee-task-compose{min-height:125px;border:1px solid var(--bs-border-color);border-radius:.4rem;padding:.65rem;background:var(--bs-body-bg)}
.bee-task-compose:focus{outline:0;border-color:#86b7fe;box-shadow:0 0 0 .2rem rgba(13,110,253,.15)}
.bee-task-compose:empty:before{content:attr(data-placeholder);color:var(--bs-secondary-color)}

.bee-task-scope .btn.active{font-weight:600}#taskMentionBox{display:block;position:absolute;left:0;right:0;top:100%;z-index:1080}#taskMentionBox.d-none{display:none!important}
.bee-case-card{transition:transform .12s ease,box-shadow .12s ease}.bee-case-card:hover{transform:translateY(-1px);box-shadow:0 .25rem .75rem rgba(0,0,0,.08)}.bee-case-step{display:grid;grid-template-columns:38px 1fr;gap:.65rem;position:relative;padding-bottom:.8rem}.bee-case-step:before{content:"";position:absolute;left:18px;top:32px;bottom:-4px;width:2px;background:var(--bs-border-color)}.bee-case-step:last-child:before{display:none}.bee-case-step-marker{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--bs-secondary-bg);border:2px solid var(--bs-border-color);z-index:1}.bee-case-step.done .bee-case-step-marker{background:var(--bs-success);color:#fff}.bee-case-step.blocked .bee-case-step-marker{background:var(--bs-warning-bg-subtle);border-color:var(--bs-warning)}
.bee-case-split-list{max-height:calc(100vh - 300px);overflow:auto}
.bee-case-split-list .list-group-item.active .text-body-secondary{color:rgba(255,255,255,.65)!important}
.bee-split-step{width:30px;height:30px;min-width:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--bs-secondary-bg);border:1px solid var(--bs-border-color);font-size:.8rem;font-weight:600}
.bee-split-step.done{background:var(--bs-success);border-color:var(--bs-success);color:#fff}
.bee-split-step.blocked{background:var(--bs-warning-bg-subtle);border-color:var(--bs-warning)}
@media (min-width:992px){.bee-case-split>div>.card{height:calc(100vh - 255px)}#beeSplitTasks>.card{height:calc(100vh - 255px);overflow:auto}}
.bee-case-tag{background:var(--bee-tag-color,var(--bs-secondary-bg));color:var(--bs-body-color);border:1px solid var(--bs-border-color)}
.bee-case-board{border:1px solid var(--bs-border-color);border-radius:.75rem;padding:.75rem;background:var(--bs-body-bg)}
.bee-case-strip{display:flex;gap:.65rem;overflow-x:auto;padding:.2rem .1rem .55rem;min-height:92px}
.bee-case-kanban-card,.bee-case-unfiled{flex:0 0 250px;border:1px solid var(--bs-border-color);border-radius:.65rem;padding:.7rem;background:var(--bs-tertiary-bg);transition:border-color .12s ease,box-shadow .12s ease,transform .12s ease}
.bee-case-kanban-card{cursor:grab}
.bee-case-kanban-card:active{cursor:grabbing}
.bee-case-drop.bee-drop-active{border-color:var(--bs-primary);box-shadow:0 0 0 .2rem rgba(var(--bs-primary-rgb),.12);transform:translateY(-1px)}
.bee-case-unfiled{display:flex;align-items:center;justify-content:center;color:var(--bs-secondary-color);border-style:dashed}
.min-w-0{min-width:0}

.bee-kanban-state-col{flex:1 0 260px;max-width:100%}
.bee-kanban-state-head{border-top:4px solid transparent;padding:.45rem .35rem .1rem}
.bee-status-dot{display:inline-block;width:.65rem;height:.65rem;border-radius:50%;margin-right:.45rem}
.bee-status-edit-row{display:grid;grid-template-columns:24px minmax(140px,1fr) 48px auto auto 38px;gap:.6rem;align-items:center;border:1px solid var(--bs-border-color);border-radius:.6rem;padding:.55rem;background:var(--bs-body-bg)}
.bee-status-grip{cursor:grab;text-align:center;color:var(--bs-secondary-color)}
.bee-status-grip:active{cursor:grabbing}
@media(max-width:575.98px){.bee-status-edit-row{grid-template-columns:24px 1fr 48px 38px}.bee-status-edit-row .form-check{grid-column:2/span 2}}

.bee-task-toolbar{display:flex;align-items:center;gap:.5rem;flex-wrap:nowrap;overflow-x:auto;padding:.45rem;border:1px solid var(--bs-border-color);border-radius:.65rem;background:var(--bs-body-bg);scrollbar-width:thin}
.bee-toolbar-separator{width:1px;height:26px;background:var(--bs-border-color);flex:0 0 1px}
.bee-toolbar-spacer{flex:1 1 auto;min-width:.5rem}
.bee-icon-picker{display:flex;align-items:center;gap:.4rem;position:relative}
.bee-icon-picker-btn{width:42px;height:38px;padding:0;font-size:1.15rem}
.bee-icon-palette{position:absolute;z-index:1080;top:calc(100% + .35rem);left:0;width:280px;max-height:240px;overflow:auto;display:grid;grid-template-columns:repeat(6,1fr);gap:.25rem;padding:.5rem;background:var(--bs-body-bg);border:1px solid var(--bs-border-color);border-radius:.6rem;box-shadow:var(--bs-box-shadow)}
.bee-icon-choice{border:1px solid transparent;background:transparent;border-radius:.4rem;min-height:38px;color:var(--bs-body-color)}
.bee-icon-choice:hover,.bee-icon-choice.active{border-color:var(--bs-primary);background:var(--bs-tertiary-bg)}
.bee-template-icon{width:42px;height:42px;border-radius:.6rem;background:var(--bs-tertiary-bg);display:grid;place-items:center;font-size:1.35rem;flex:0 0 42px}
@media(max-width:767.98px){.bee-task-toolbar{margin-left:-.25rem;margin-right:-.25rem}.bee-toolbar-spacer{display:none}}

/* 1.5.2 — Kanban colors + toolbar dropdown */
.bee-kanban-column{border:1px solid transparent;transition:background-color .15s ease,border-color .15s ease}
.bee-task-toolbar{overflow:visible!important;position:relative;z-index:20}
.bee-task-toolbar .dropdown-menu{z-index:1090}
@media(max-width:767.98px){
 .bee-task-toolbar{flex-wrap:wrap;overflow:visible!important}
}

.bee-subtask-row:last-child{border-bottom:0!important}
.bee-subtask-actions{display:flex;align-items:center;gap:.25rem;flex-shrink:0}
.bee-subtask-icon-btn{width:34px;height:34px;padding:0;border:0;background:transparent;color:var(--bs-secondary-color);display:inline-flex;align-items:center;justify-content:center;border-radius:50%}
.bee-subtask-icon-btn:hover{background:var(--bs-tertiary-bg);color:var(--bs-body-color)}
.bee-subtask-date{position:relative;overflow:hidden;cursor:pointer}
.bee-subtask-date.has-date{color:var(--bs-primary)}
.bee-subtask-date input[type=date]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.bee-subtask-user-menu{max-height:280px;overflow:auto;min-width:220px}
.bee-user-avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;object-fit:cover;vertical-align:middle;flex:0 0 auto}
.bee-user-avatar-fallback{background:var(--bs-secondary-bg);color:var(--bs-secondary-color);font-weight:700;border:1px solid var(--bs-border-color)}
.bee-avatar-stack{display:inline-flex;align-items:center;padding-left:6px}
.bee-avatar-stack .bee-user-avatar{margin-left:-6px;border:2px solid var(--bs-body-bg)}
.dropdown-toggle-no-caret::after{display:none!important}
@media(max-width:575.98px){.bee-subtask-row .bee-task-inline-edit{min-width:0}.bee-subtask-actions{gap:.1rem}}

/* 1.5.10 — compact multi-assignee + safe create modal scrolling */
#beeTasksModal .modal-content{max-height:calc(100vh - 2rem);overflow:hidden}
#beeTaskCreateForm{display:flex;flex-direction:column;min-height:0;max-height:calc(100vh - 2rem)}
#beeTaskCreateForm>.modal-body{overflow-y:auto;min-height:0;overscroll-behavior:contain}
#beeTaskCreateForm>.modal-header,#beeTaskCreateForm>.modal-footer{flex:0 0 auto}
.bee-assignee-picker-compact{display:inline-flex;max-width:100%}
.bee-assignee-trigger{min-width:38px;min-height:38px;padding:.2rem .35rem;border:0;background:transparent;color:var(--bs-secondary-color);display:inline-flex;align-items:center;justify-content:flex-start;border-radius:999px}
.bee-assignee-trigger:hover,.bee-assignee-trigger:focus,.bee-assignee-trigger.show{background:var(--bs-tertiary-bg);color:var(--bs-body-color)}
.bee-assignee-summary{display:inline-flex;align-items:center;min-height:30px}
.bee-assignee-menu{width:min(340px,calc(100vw - 2rem));box-shadow:var(--bs-box-shadow);overflow:hidden}
.bee-assignee-menu .bee-assignee-search{border:1px solid var(--bs-border-color);border-radius:.375rem}
.bee-assignee-menu .bee-assignee-list{max-height:300px;overflow:auto;padding:.35rem}
.bee-assignee-menu .bee-assignee-option{margin:0}
.bee-group-avatar{width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--bs-secondary-bg);color:var(--bs-secondary-color);flex:0 0 26px}
.bee-assignee-group-count,.bee-assignee-more{height:28px;min-width:28px;padding:0 .4rem;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;gap:.2rem;background:var(--bs-secondary-bg);border:2px solid var(--bs-body-bg);font-size:.75rem;font-weight:600;margin-left:-4px}
.bee-assignee-picker-compact .bee-avatar-stack{padding-left:6px}
.bee-assignee-picker-compact .bee-avatar-stack .bee-user-avatar{border-color:var(--bs-body-bg)}
@media(max-width:575.98px){#beeTasksModal .modal-dialog{margin:.5rem}#beeTasksModal .modal-content,#beeTaskCreateForm{max-height:calc(100vh - 1rem)}}

/* Tasks 1.5.11 · conversation */
.bee-task-thread{gap:.55rem}.bee-chat-row{display:flex;align-items:flex-end;gap:.45rem;max-width:86%}.bee-chat-row.mine{margin-left:auto;flex-direction:row-reverse}.bee-chat-avatar{flex:0 0 auto}.bee-chat-bubble{padding:.55rem .7rem;border-radius:1rem;background:var(--bs-tertiary-bg);min-width:90px;box-shadow:0 1px 2px rgba(0,0,0,.06)}.bee-chat-row.mine .bee-chat-bubble{background:var(--bs-primary-bg-subtle)}.bee-chat-meta{font-size:.72rem;color:var(--bs-secondary-color);display:flex;gap:.5rem;justify-content:space-between;margin-bottom:.18rem}.bee-chat-row.mine .bee-chat-meta{flex-direction:row-reverse}.bee-chat-attachments{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.45rem}.bee-chat-image{display:block;max-width:280px;max-height:220px;object-fit:cover;border-radius:.65rem;border:1px solid var(--bs-border-color);cursor:pointer}.bee-chat-file{display:inline-flex;align-items:center;gap:.4rem;padding:.35rem .5rem;border:1px solid var(--bs-border-color);border-radius:.55rem;text-decoration:none;background:var(--bs-body-bg)}.bee-paste-preview{display:flex;flex-wrap:wrap;gap:.4rem}.bee-paste-preview-item{position:relative}.bee-paste-preview-item img{width:72px;height:56px;object-fit:cover;border-radius:.4rem;border:1px solid var(--bs-border-color)}.bee-paste-preview-item button{position:absolute;right:-5px;top:-5px;width:20px;height:20px;border-radius:50%;padding:0;line-height:18px}.bee-mention-active{background:var(--bs-primary-bg-subtle)}

.bee-mention-chip{display:inline-flex;align-items:center;gap:.28rem;padding:.08rem .38rem .08rem .18rem;border-radius:999px;background:var(--bs-tertiary-bg);border:1px solid var(--bs-border-color);font-weight:600;vertical-align:middle;white-space:nowrap}
.bee-mention-chip .bee-user-avatar{flex:0 0 auto}
.bee-mention-chip .bee-group-avatar{width:20px;height:20px;font-size:10px}

/* Bee UI refresh · aligned with Core 1.8.8 */
.bee-cell-refresh,.bee-hr-page{color:var(--bee-text)}
.container-fluid.py-3{padding-top:.45rem!important;padding-bottom:1rem!important}
.container-fluid.py-3> .d-flex:first-child h1,.bee-hr-page .bee-page-head h1{font-size:1.5rem;font-weight:700;letter-spacing:-.02em;color:var(--bee-text)}
.container-fluid.py-3> .d-flex:first-child .text-secondary,.container-fluid.py-3> .d-flex:first-child .text-body-secondary{color:var(--bee-muted)!important;font-size:.9rem}
.card{border:1px solid var(--bee-border)!important;border-radius:12px!important;box-shadow:0 3px 14px rgba(25,45,30,.035)!important;background:var(--bee-card)}
.card-header{background:transparent!important;border-bottom:1px solid var(--bee-border)!important;padding:.8rem 1rem}
.card-body{padding:1rem}
.table{font-size:.9rem;margin-bottom:0}
.table>:not(caption)>*>*{padding:.58rem .68rem;border-bottom-color:var(--bee-border)}
.table thead th{font-size:.76rem;text-transform:uppercase;letter-spacing:.025em;color:var(--bee-muted);font-weight:700;background:#fafcfa}
.form-control,.form-select,.input-group-text{border-color:#dde4dd;border-radius:8px;font-size:.92rem;min-height:36px}
.form-control:focus,.form-select:focus{border-color:#9bcf78;box-shadow:0 0 0 .2rem rgba(114,184,63,.13)}
.btn{border-radius:8px;font-size:.9rem;font-weight:600}
.btn-primary{--bs-btn-bg:var(--bee-accent);--bs-btn-border-color:var(--bee-accent);--bs-btn-hover-bg:var(--bee-accent-strong);--bs-btn-hover-border-color:var(--bee-accent-strong);--bs-btn-active-bg:var(--bee-accent-strong);--bs-btn-active-border-color:var(--bee-accent-strong)}
.btn-outline-primary{--bs-btn-color:var(--bee-accent-strong);--bs-btn-border-color:#acd48f;--bs-btn-hover-bg:var(--bee-accent-soft);--bs-btn-hover-color:#24431d;--bs-btn-hover-border-color:#8cc465}
.badge{font-size:.72rem;font-weight:650;border-radius:999px}
.nav-tabs{border-bottom-color:var(--bee-border)}
.nav-tabs .nav-link{font-size:.88rem;color:#68746b;border:0;border-bottom:2px solid transparent;border-radius:0;padding:.55rem .8rem}
.nav-tabs .nav-link:hover{color:#284a21;background:#f7faf7}
.nav-tabs .nav-link.active{color:#284a21;border-bottom-color:var(--bee-accent);background:transparent}
.modal-content{border:1px solid var(--bee-border);border-radius:14px;box-shadow:0 20px 60px rgba(16,24,40,.14)}
.modal-header,.modal-footer{border-color:var(--bee-border)}
.dropdown-menu{border-color:var(--bee-border);border-radius:10px;box-shadow:0 14px 34px rgba(15,23,42,.12)}
.dropdown-item{border-radius:7px}
.alert{border-radius:10px}
@media(max-width:767.98px){.container-fluid.py-3{padding-left:.4rem!important;padding-right:.4rem!important}.card-body{padding:.85rem}.table-responsive{border-radius:10px}}

/* Tasks visual refresh */
.bee-task-toolbar{padding:.5rem;border:1px solid var(--bee-border);border-radius:10px;background:#fff;box-shadow:0 2px 8px rgba(25,45,30,.025)}
.bee-kanban-column{border-color:var(--bee-column-stroke,var(--bee-border))!important;border-radius:12px!important;background-color:var(--bee-column-tint,#f8faf8)!important}
.bee-kanban-card{border:1px solid var(--bee-border)!important;border-radius:10px!important;box-shadow:0 2px 8px rgba(25,45,30,.035)!important;background:#fff}
.bee-kanban-card:hover{transform:translateY(-1px);box-shadow:0 5px 16px rgba(25,45,30,.07)!important}
.bee-task-tag{border-color:#dce6dc!important;background:#f6f9f6!important;color:#4d5c51}
.bee-task-editor{border-color:#dde4dd!important;border-radius:10px!important}
.bee-task-editor:focus{border-color:#9bcf78!important;box-shadow:0 0 0 .2rem rgba(114,184,63,.13)!important}

.bee-status-edit-row{grid-template-columns:24px minmax(140px,1fr) 48px auto auto auto 38px}
.bee-kanban-automation-editor{box-shadow:0 0 0 1px var(--bs-border-color);padding-bottom:1rem}
@media(max-width:767px){.bee-status-edit-row{grid-template-columns:24px 1fr 48px auto}.bee-status-automation{grid-column:2/3}.bee-status-remove{grid-column:4/5}}

/* Tasks 1.6.11 : avatar photo depuis annuaire Core, initiales si image absente. */
.bee-user-avatar-fallback{position:relative;overflow:hidden;box-sizing:border-box}
.bee-user-avatar-fallback .bee-user-avatar-image{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;border-radius:50%;background:var(--bs-body-bg,#fff)}

.bee-task-tag-picker{border:1px solid var(--bs-border-color,#d6dde3);border-radius:.45rem;padding:.4rem;background:var(--bs-body-bg,#fff)}.bee-task-tag-choices{max-height:155px;overflow:auto;margin-top:.3rem}.bee-task-tag-choice{display:flex;align-items:center;gap:.5rem;padding:.32rem .45rem;border-radius:.3rem;cursor:pointer;font-size:.82rem}.bee-task-tag-choice:hover{background:var(--bs-tertiary-bg,#f3f5f7)}.bee-task-tag-choice input{accent-color:var(--bs-primary,#0d6efd)}.bee-task-tag-dot{width:11px;height:11px;min-width:11px;border-radius:50%}.bee-kanban-automation-editor{background:var(--bs-body-bg,#fff)!important}.bee-status-merge{white-space:nowrap}

.bee-task-tag-new-color{width:36px!important;height:31px;flex:0 0 36px;padding:3px}.bee-task-tag-create{height:31px;flex:0 0 34px}.bee-task-tag-search{min-width:0}

/* Bee Tasks 1.7.1: le statut métier n'est plus une colonne Kanban. */
.bee-status-automation{display:none!important}
.bee-board-column-edit summary{cursor:pointer}
.bee-board-column-edit .form-control-color{width:44px;min-width:44px}
#beeBoardColumnsEditor{max-height:55vh;overflow:auto}
.bee-kanban-column{min-height:110px}

/* Bee Tasks 1.7.2 — onglets Kanban distincts */
.bee-board-navigation{display:flex;flex-direction:column;gap:.35rem;border-bottom:1px solid var(--bs-border-color,#dee2e6);padding-bottom:.15rem}
.bee-board-tabs{display:flex;align-items:stretch;gap:.2rem;overflow-x:auto;white-space:nowrap;scrollbar-width:thin;padding:.15rem 0 0;max-width:100%}
.bee-board-tab{display:inline-flex;align-items:center;gap:.15rem;flex:0 0 auto;border:0;border-bottom:3px solid transparent;padding:.6rem .85rem .5rem;background:transparent;color:var(--bs-secondary-color,#6c757d);font-size:.86rem;cursor:pointer;border-radius:.4rem .4rem 0 0}
.bee-board-tab:hover{background:var(--bs-tertiary-bg,#f8f9fa);color:var(--bs-body-color,#212529)}
.bee-board-tab.active{border-bottom-color:var(--bee-accent,var(--bs-primary,#198754));color:var(--bs-body-color,#212529);background:var(--bs-tertiary-bg,#f8f9fa);font-weight:700}
.bee-board-tab:focus-visible{outline:2px solid var(--bs-primary,#0d6efd);outline-offset:-2px}
@media(max-width:575.98px){.bee-board-tab{padding:.55rem .6rem;font-size:.8rem}}

.bee-board-tab-count{font-size:.65rem;font-variant-numeric:tabular-nums;min-width:1.3rem;text-align:center;border-radius:999px;padding:.07rem .33rem;background:var(--bs-secondary-bg,#e9ecef);color:var(--bs-secondary-color,#6c757d);margin-left:.25rem}

/* Bee Tasks 1.7.3 · repérage des dossiers, sans filtrer le Kanban */
.bee-case-kanban-card,.bee-case-unfiled{transition:opacity .16s ease,background-color .16s ease,border-color .16s ease,box-shadow .16s ease}
.bee-case-kanban-card.bee-case-focused,.bee-case-unfiled.bee-case-focused{background:var(--bs-primary-bg-subtle,#e9f4e5);border-color:var(--bee-accent,var(--bs-primary,#198754));box-shadow:0 0 0 2px color-mix(in srgb,var(--bee-accent,#198754) 15%,transparent)}
.bee-case-kanban-card.bee-case-dimmed,.bee-case-unfiled.bee-case-dimmed{opacity:.48}
.bee-case-kanban-card:focus-visible,.bee-case-unfiled:focus-visible{outline:2px solid var(--bee-accent,#198754);outline-offset:2px}
.bee-kanban-card{transition:opacity .2s ease,filter .2s ease,transform .12s ease,box-shadow .12s ease}
.bee-kanban-card.bee-case-muted{opacity:.23;filter:grayscale(.6)}
.bee-kanban-card.bee-case-muted:hover,.bee-kanban-card.bee-case-muted:focus-within{opacity:.65}
.bee-kanban-card.bee-case-matched{box-shadow:0 1px 8px color-mix(in srgb,var(--bee-accent,#198754) 20%,transparent)!important}




/* Module injecté : Projects 1.1.0 */

.projects-page{display:flex;flex-direction:column;gap:1rem;min-width:0}.projects-head{display:flex;align-items:flex-end;gap:1rem;flex-wrap:wrap}.projects-head h1{margin:0;font-size:1.55rem}.projects-head p{margin:.25rem 0 0;color:var(--bs-secondary-color)}.projects-head-actions{margin-left:auto}.projects-kpis{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:.75rem}.project-kpi{border:1px solid var(--bs-border-color);border-radius:12px;padding:.75rem 1rem;background:var(--bs-body-bg);display:flex;justify-content:space-between;align-items:center;gap:.75rem}.project-kpi span{font-size:.78rem;color:var(--bs-secondary-color)}.project-kpi strong{font-size:1.35rem}.projects-toolbar{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.projects-search{position:relative;min-width:260px;flex:1}.projects-search i{position:absolute;left:.8rem;top:50%;transform:translateY(-50%);color:var(--bs-secondary-color)}.projects-search input{width:100%;border:1px solid var(--bs-border-color);border-radius:10px;background:var(--bs-body-bg);color:inherit;padding:.55rem .8rem .55rem 2.3rem}.projects-filters{display:flex;gap:.3rem;flex-wrap:wrap}.project-filter{border:1px solid var(--bs-border-color);background:var(--bs-body-bg);color:inherit;border-radius:999px;padding:.38rem .72rem;font-size:.78rem}.project-filter.active{background:var(--bs-primary);border-color:var(--bs-primary);color:#fff}.projects-type-filter{width:auto;min-width:155px}.projects-board-wrap{border:1px solid var(--bs-border-color);border-radius:14px;overflow:auto;background:var(--bs-body-bg)}.projects-board{width:100%;border-collapse:separate;border-spacing:0;min-width:1180px}.projects-board th{position:sticky;top:0;z-index:2;background:var(--bs-tertiary-bg);font-size:.72rem;text-transform:uppercase;letter-spacing:.03em;color:var(--bs-secondary-color);padding:.7rem .65rem;border-bottom:1px solid var(--bs-border-color);white-space:nowrap}.projects-board td{padding:.65rem;border-bottom:1px solid var(--bs-border-color);vertical-align:middle}.projects-board tbody tr{cursor:pointer}.projects-board tbody tr:hover{background:var(--bs-tertiary-bg)}.projects-board tbody tr:last-child td{border-bottom:0}.project-col-main{min-width:330px}.project-col-date{min-width:130px}.project-main{display:flex;flex-direction:column;gap:.14rem}.project-main-top{display:flex;align-items:center;gap:.45rem;min-width:0}.project-number{font-weight:750;font-size:.8rem;color:var(--bs-primary)}.project-title{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-sub{font-size:.72rem;color:var(--bs-secondary-color);display:flex;gap:.45rem;flex-wrap:wrap}.project-type{display:inline-flex;align-items:center;border-radius:999px;padding:.12rem .42rem;background:var(--bs-tertiary-bg);font-size:.66rem}.project-progress{height:4px;border-radius:999px;background:var(--bs-tertiary-bg);overflow:hidden;margin-top:.25rem}.project-progress>span{display:block;height:100%;background:var(--bs-primary)}.project-phase-cell{display:flex;flex-direction:column;gap:.18rem;min-width:105px}.project-phase-pill{display:inline-flex;align-items:center;gap:.35rem;font-size:.72rem;font-weight:650}.project-phase-bar{height:4px;background:var(--bs-tertiary-bg);border-radius:999px;overflow:hidden}.project-phase-bar span{display:block;height:100%;background:var(--bs-primary)}.project-phase-pill[data-state="done"]{color:var(--bs-success)}.project-phase-pill[data-state="blocked"]{color:var(--bs-danger)}.project-phase-pill[data-state="overdue"]{color:var(--bs-warning)}.project-phase-pill[data-state="na"]{color:var(--bs-secondary-color)}.project-due{font-size:.76rem;white-space:nowrap}.project-due.overdue{color:var(--bs-danger);font-weight:700}.projects-empty{text-align:center;padding:2rem;color:var(--bs-secondary-color)}.project-detail-head{display:flex;align-items:center}.project-detail-number{font-size:.75rem;font-weight:800;color:var(--bs-primary)}.project-detail-head h5{margin:.1rem 0}.project-detail-actions{margin-left:auto;display:flex;align-items:center;gap:.6rem}.project-cockpit{display:flex;flex-direction:column;gap:1rem}.project-summary{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:.65rem}.project-summary-card{border:1px solid var(--bs-border-color);border-radius:10px;padding:.65rem .8rem}.project-summary-card span{display:block;font-size:.7rem;color:var(--bs-secondary-color)}.project-summary-card strong{font-size:.95rem}.project-macro{display:grid;grid-template-columns:repeat(7,minmax(115px,1fr));gap:.45rem;overflow:auto}.project-macro-step{border:1px solid var(--bs-border-color);border-radius:10px;padding:.55rem;min-width:115px}.project-macro-step strong{display:block;font-size:.72rem}.project-macro-step span{font-size:.68rem;color:var(--bs-secondary-color)}.project-phase-card{border:1px solid var(--bs-border-color);border-radius:12px;overflow:hidden}.project-phase-head{display:flex;align-items:center;gap:.75rem;padding:.7rem .8rem;background:var(--bs-tertiary-bg)}.project-phase-head strong{font-size:.88rem}.project-phase-head .ms-auto{font-size:.72rem;color:var(--bs-secondary-color)}.project-milestone-row{display:grid;grid-template-columns:28px minmax(220px,1fr) 150px 120px 130px;gap:.6rem;align-items:center;padding:.58rem .8rem;border-top:1px solid var(--bs-border-color);cursor:pointer}.project-milestone-row:hover{background:var(--bs-tertiary-bg)}.project-milestone-icon{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--bs-tertiary-bg);font-size:.7rem}.project-milestone-label{min-width:0}.project-milestone-label strong{display:block;font-size:.8rem}.project-milestone-label small{display:block;color:var(--bs-secondary-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-status-badge{display:inline-flex;align-items:center;gap:.3rem;font-size:.7rem;font-weight:700}.project-status-badge[data-status="done"]{color:var(--bs-success)}.project-status-badge[data-status="blocked"]{color:var(--bs-danger)}.project-status-badge[data-status="in_progress"]{color:var(--bs-primary)}.project-status-badge[data-status="ready"]{color:var(--bs-info)}.project-status-badge[data-status="na"]{color:var(--bs-secondary-color)}.project-milestone-date{font-size:.72rem}.project-milestone-date.overdue{color:var(--bs-danger);font-weight:700}.min-w-0{min-width:0}@media(max-width:991.98px){.projects-kpis,.project-summary{grid-template-columns:repeat(2,minmax(130px,1fr))}.project-macro{grid-template-columns:repeat(7,130px)}.project-milestone-row{grid-template-columns:28px minmax(170px,1fr) 120px}.project-milestone-row>.project-assignee,.project-milestone-row>.project-milestone-date:nth-last-child(1){display:none}}@media(max-width:575.98px){.projects-kpis,.project-summary{grid-template-columns:1fr 1fr}.projects-filters{width:100%;overflow:auto;flex-wrap:nowrap}.projects-type-filter{width:100%}}.project-milestone-tasks{border-top:1px solid var(--bs-border-color);padding-top:1rem}.project-task-list{display:flex;flex-direction:column;gap:.45rem}.project-task-row{display:grid;grid-template-columns:24px minmax(0,1fr) auto auto;gap:.6rem;align-items:center;border:1px solid var(--bs-border-color);border-radius:10px;padding:.55rem .65rem;background:var(--bs-body-bg);cursor:pointer}.project-task-row:hover{background:var(--bs-tertiary-bg)}.project-task-icon{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--bs-tertiary-bg);font-size:.72rem}.project-task-main{min-width:0}.project-task-title{font-weight:600;font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-task-meta{font-size:.7rem;color:var(--bs-secondary-color)}.project-task-state{font-size:.7rem;font-weight:700}.project-task-state[data-status="done"]{color:var(--bs-success)}.project-task-state[data-status="in_progress"]{color:var(--bs-primary)}.project-task-state[data-status="waiting"]{color:var(--bs-warning)}.project-task-state[data-status="cancelled"]{color:var(--bs-secondary-color)}.project-task-empty{border:1px dashed var(--bs-border-color);border-radius:10px;padding:.75rem;color:var(--bs-secondary-color);font-size:.78rem}@media(max-width:575.98px){.project-task-row{grid-template-columns:24px minmax(0,1fr) auto}.project-task-row .project-task-due{display:none}}



/* Module injecté : Fours 1.4.16 */

.furn-storage-toolbar {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 20px;
margin-bottom: 20px;
}
.furn-storage-toolbar h2 {
margin: 0;
}
.furn-storage-toolbar p {
margin: 4px 0 0;
color: var(--text-muted);
}
.furn-storage-filters {
display: flex;
gap: 10px;
}
.furn-storage-card {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 20px;
padding: 16px 18px;
margin-bottom: 10px;
border: 1px solid var(--border-color);
border-radius: 10px;
background: var(--card-bg);
}
.furn-storage-card-main {
display: grid;
grid-template-columns: 130px 220px minmax(240px, 1fr);
align-items: center;
gap: 18px;
}
.furn-storage-number {
display: flex;
flex-direction: column;
gap: 5px;
}
.furn-storage-number strong {
font-size: 18px;
}
.furn-storage-type {
width: fit-content;
padding: 3px 7px;
border-radius: 5px;
font-size: 11px;
text-transform: uppercase;
}
.furn-storage-customer {
display: flex;
flex-direction: column;
}
.furn-storage-customer span {
color: var(--text-muted);
font-size: 13px;
}
.furn-storage-folder {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.furn-storage-folder div {
display: flex;
flex-direction: column;
min-width: 0;
}
.furn-storage-folder strong,
.furn-storage-folder small {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.furn-storage-folder small {
color: var(--text-muted);
}
.furn-storage-warning {
grid-column: 1 / -1;
font-size: 13px;
}
.furn-storage-card-actions {
display: flex;
align-items: center;
gap: 8px;
}
.furn-storage-confidence {
display: flex;
flex-direction: column;
align-items: flex-end;
margin-right: 5px;
}
.furn-storage-confidence span {
font-size: 11px;
color: var(--text-muted);
}
.furn-storage-empty,
.furn-storage-loading {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
min-height: 180px;
color: var(--text-muted);
}
.furn-tab-count {
margin-left: 5px;
padding: 2px 6px;
border-radius: 10px;
font-size: 11px;
}
.furnace-attribute-group {
margin-bottom: 24px;
}
.furnace-attribute-group h3 {
margin: 0 0 12px;
font-size: 15px;
}
.furnace-attribute-grid {
display: grid;
grid-template-columns: repeat(
auto-fit,
minmax(220px, 1fr)
);
gap: 10px;
}
.furnace-attribute-item {
padding: 12px 14px;
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--card-bg);
}
.furnace-attribute-label {
margin-bottom: 5px;
font-size: 12px;
color: var(--text-muted);
}
.furnace-attribute-value {
font-size: 16px;
font-weight: 600;
}
.furnace-attribute-unit {
font-size: 12px;
font-weight: 400;
color: var(--text-muted);
}
.furnace-attribute-source {
margin-top: 5px;
font-size: 10px;
color: var(--text-muted);
}
.furnace-attribute-bool {
display: inline-flex;
align-items: center;
gap: 5px;
}
.furnace-technical-loading,
.furnace-technical-empty {
display: flex;
align-items: center;
justify-content: center;
min-height: 180px;
color: var(--text-muted);
}
.furnace-photo-gallery {
display: grid;
grid-template-columns:
repeat(
auto-fill,
minmax(160px, 1fr)
);
gap: 12px;
}
.furnace-photo-card {
display: flex;
flex-direction: column;
gap: 7px;
padding: 0;
overflow: hidden;
border: 1px solid var(--bs-border-color);
border-radius: 10px;
background: var(--bs-body-bg);
color: inherit;
text-align: left;
cursor: pointer;
}
.furnace-photo-card img {
display: block;
width: 100%;
aspect-ratio: 4 / 3;
object-fit: cover;
}
.furnace-photo-name {
padding: 0 9px 9px;
overflow: hidden;
font-size: .8rem;
text-overflow: ellipsis;
white-space: nowrap;
}
@media (max-width: 600px) {
.furnace-photo-gallery {
grid-template-columns:
repeat(2, minmax(0, 1fr));
gap: 7px;
}
.furnace-photo-name {
display: none;
}
}
.furnace-photo-card {
cursor: pointer;
}
.furnace-photo-lightbox[hidden] {
display: none;
}
.furnace-photo-lightbox {
position: fixed;
inset: 0;
z-index: 10000;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, .9);
}
.furnace-photo-lightbox-name {
margin-top: 10px;
color: #fff;
font-size: .9rem;
}
.furnace-photo-lightbox-close,
.furnace-photo-lightbox-prev,
.furnace-photo-lightbox-next {
position: absolute;
z-index: 1;
border: 0;
color: #fff;
background: rgba(0, 0, 0, .4);
cursor: pointer;
}
.furnace-photo-lightbox-close {
top: 20px;
right: 20px;
width: 46px;
height: 46px;
border-radius: 50%;
font-size: 1.4rem;
}
.furnace-photo-lightbox-prev,
.furnace-photo-lightbox-next {
top: 50%;
width: 52px;
height: 72px;
transform: translateY(-50%);
border-radius: 10px;
font-size: 1.5rem;
}
.furnace-photo-lightbox-prev {
left: 20px;
}
.furnace-photo-lightbox-next {
right: 20px;
}
.furnace-photo-lightbox-open {
overflow: hidden;
}
.furnace-photo-lightbox-content {
width: calc(100vw - 150px);
height: calc(100vh - 70px);
display: flex;
flex-direction: column;
text-align: center;
}
.furnace-photo-lightbox-viewport {
flex: 1;
min-height: 0;
display: flex;
align-items: center;
justify-content: center;
overflow: auto;
touch-action: pinch-zoom;
overscroll-behavior: contain;
}
.furnace-photo-lightbox-content img {
display: block;
max-width: 100%;
max-height: 100%;
object-fit: contain;
user-select: none;
-webkit-user-drag: none;
}
@media (max-width: 768px) {
.furnace-photo-lightbox-content {
width: 100vw;
height: 100vh;
max-width: none;
max-height: none;
}
.furnace-photo-lightbox-viewport {
padding: 50px 0;
}
.furnace-photo-lightbox-prev,
.furnace-photo-lightbox-next {
display: none;
}
.furnace-photo-lightbox-name {
position: absolute;
left: 10px;
right: 10px;
bottom: 12px;
margin: 0;
pointer-events: none;
}
.furnace-photo-lightbox-close {
top: 10px;
right: 10px;
}
}
.furnace-photo-date {
grid-column: 1 / -1;
display: flex;
align-items: center;
gap: 12px;
margin: 18px 0 4px;
color: var(--bs-secondary-color);
font-size: .9rem;
font-weight: 600;
}
.furnace-photo-date::after {
content: "";
flex: 1;
height: 1px;
background: var(--bs-border-color);
}
.furnace-photo-date:first-child {
margin-top: 0;
}
.furnace-photo-date span::first-letter {
text-transform: uppercase;
}
.furnace-detail {
display: flex;
flex-direction: column;
min-height: 0;
overflow: hidden;
}
.furnace-title-row {
flex: 0 0 auto;
}
.furnace-tabs {
flex: 0 0 auto;
}
.furnaces-page {
height: 100%;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
.furnaces-header,
.furnaces-toolbar {
flex: 0 0 auto;
}
.furnaces-layout {
flex: 1 1 auto;
min-height: 0;
overflow: hidden;
}
.furnace-detail {
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
.furnace-title-row,
.furnace-tabs {
flex: 0 0 auto;
}
#furnaceTabContent {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
overflow-x: hidden;
}
.furnaces-list-panel {
min-height: 0;
overflow: hidden;
}
.furnaces-list {
height: 100%;
overflow-y: auto;
}
.furnace-title-actions {
display: flex;
align-items: center;
gap: 16px;
}
.furnace-qrcode {
padding: 5px;
background: #fff;
border: 1px solid #dee2e6;
border-radius: 6px;
cursor: pointer;
transition: transform .15s ease;
}
.furnace-qrcode:hover {
transform: scale(1.05);
}
.furnace-qrcode img,
.furnace-qrcode canvas {
display: block;
width: 96px;
height: 96px;
}
/* Fours 1.4.1 */
.furnace-title-actions{display:flex;align-items:center;gap:10px}.furn-edit-button{width:34px;height:34px;border:1px solid #d0d5dd;border-radius:8px;background:#fff;color:#475467}.furn-edit-button:hover{background:#f9fafb;color:#554bc3}.furn-create-storage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:4px}.furn-storage-match-card{height:100%;padding:11px;border:1px solid #d0d5dd;border-radius:10px;background:#f9fafb}.furn-storage-match-card.found{border-color:#b2ccff;background:#f5f8ff}.furn-storage-match-card.selected{border-color:#75e0a7;background:#ecfdf3}.furn-storage-match-title{display:flex;align-items:center;gap:7px;margin-bottom:7px;font-size:12px;font-weight:700;color:#344054}.furn-storage-match-path{overflow:hidden;margin:5px 0 9px;color:#667085;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.furn-document-groups{display:flex;flex-direction:column;gap:12px}.furn-document-group{border:1px solid #e4e7ec;border-radius:10px;overflow:hidden}.furn-document-group-title{padding:9px 12px;background:#f9fafb;color:#344054;font-size:12px;font-weight:700}.furn-document-row{display:flex;align-items:center;gap:10px;padding:9px 12px;border-top:1px solid #eaecf0}.furn-document-row-name{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.furn-doc-actions{display:flex;gap:5px}.furn-doc-link-card{padding:16px;border:1px dashed #98a2b3;border-radius:10px;background:#f9fafb}.furn-doc-link-card h4{margin:0 0 5px;font-size:14px}.furn-doc-link-card p{margin:0 0 12px;color:#667085;font-size:12px}@media(max-width:760px){.furn-create-storage-grid{grid-template-columns:1fr}}
/* Fours 1.4.8 · cartes de liaison NAS */
.furn141-unlinked {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 1rem 1.1rem;
border: 1px dashed var(--border, #d9dde3);
border-radius: .75rem;
background: var(--panel-soft, #f8f9fb);
}
.furn141-unlinked > div {
min-width: 0;
}
.furn141-unlinked strong {
display: flex;
align-items: center;
gap: .45rem;
margin-bottom: .2rem;
color: var(--text, #1f2933);
font-size: .95rem;
font-weight: 600;
}
.furn141-unlinked .small {
margin-bottom: .55rem;
}
.furn141-unlinked-path {
display: inline-block;
max-width: 100%;
padding: .32rem .5rem;
border: 1px solid var(--border, #d9dde3);
border-radius: .4rem;
background: var(--panel, #fff);
color: var(--muted, #6b7280);
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: .75rem;
line-height: 1.35;
overflow-wrap: anywhere;
}
.furn141-unlinked .btn {
flex: 0 0 auto;
white-space: nowrap;
}
@media (max-width: 767.98px) {
.furn141-unlinked {
align-items: stretch;
flex-direction: column;
}
.furn141-unlinked .btn {
align-self: flex-start;
}
}
/* Fours 1.4.10 · Documents : arborescence + ONLYOFFICE */
.furnace-document-tree{display:flex;flex-direction:column;gap:6px;padding:10px 0}
.furnace-document-folder{border:1px solid #e4e7ec;border-radius:10px;background:#fff;overflow:hidden}
.furnace-document-folder>summary{display:flex;align-items:center;gap:10px;min-height:44px;padding:9px 12px;cursor:pointer;list-style:none;user-select:none}
.furnace-document-folder>summary::-webkit-details-marker{display:none}
.furnace-document-folder>summary:hover{background:#f8fafc}
.furnace-document-folder-chevron{width:14px;color:#98a2b3;transition:transform .15s ease}
.furnace-document-folder[open]>summary .furnace-document-folder-chevron{transform:rotate(90deg)}
.furnace-document-folder-icon{color:#4f7cff}
.furnace-document-folder-count{margin-left:auto;min-width:24px;padding:2px 7px;border-radius:999px;background:#f2f4f7;color:#667085;font-size:11px;text-align:center}
.furnace-document-children{display:flex;flex-direction:column;gap:5px;padding:0 8px 8px 28px}
.furnace-document{display:flex;align-items:center;gap:11px;min-height:48px;padding:7px 10px;border:1px solid #e4e7ec;border-radius:9px;background:#fff}
.furnace-document:hover{border-color:#cfd5df;background:#fbfcfe}
.furnace-document-icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:8px;background:#f2f4f7;color:#667085;font-size:17px}
.furnace-document-content{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}
.furnace-document-content strong{overflow:hidden;color:#172033;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.furnace-document-content small{color:#98a2b3;font-size:11px}
.furnace-document-office{display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:7px;appearance:none;background:transparent;color:#98a2b3;font-size:13px;cursor:pointer}
.furnace-document-office:hover{background:#eef2ff;color:#315efb}
.furnace-document-actions{display:flex;align-items:center;gap:4px}
.furnace-document-action{display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:8px;background:transparent;color:#667085;text-decoration:none;cursor:pointer}
.furnace-document-action:hover{background:#eef2ff;color:#315efb}
.furnace-documents-empty{display:flex;align-items:center;justify-content:center;gap:9px}
@media(max-width:767.98px){.furnace-document-children{padding-left:14px}.furnace-document-office{display:none}}
/* Fours 1.4.11 · explorateur Documents à chargement différé */
.furnace-document-folder-placeholder,
.furnace-document-folder-loading,
.furnace-document-folder-empty,
.furnace-document-folder-error {
padding: 9px 10px;
color: var(--muted, #6b7280);
font-size: 12px;
}
.furnace-document-folder-loading {
display: flex;
align-items: center;
gap: 8px;
}
.furnace-document-folder-error {
color: var(--bs-danger, #dc3545);
}
/* Fours 1.4.12 · CSV + vignettes lazy */
.furnace-csv-preview{max-height:75vh;overflow:auto}
.furnace-csv-table{font-size:.78rem;white-space:nowrap}
.furnace-csv-table thead th{position:sticky;top:0;z-index:1;background:var(--panel,#fff)}
.furnace-document-thumb-popover{position:fixed;z-index:1085;width:320px;min-height:180px;padding:8px;border:1px solid var(--border,#d9dde3);border-radius:10px;background:var(--panel,#fff);box-shadow:0 12px 32px rgba(15,23,42,.18);pointer-events:none}
.furnace-document-thumb-popover img{display:none;width:100%;max-height:320px;object-fit:contain;border-radius:6px;background:#f5f6f8}
.furnace-document-thumb-popover.is-loaded img{display:block}
.furnace-document-thumb-loading{display:grid;place-items:center;min-height:160px;color:var(--muted,#6b7280)}
.furnace-document-thumb-popover.is-loaded .furnace-document-thumb-loading{display:none}
.furnace-document-thumb-name{margin-top:7px;overflow:hidden;color:var(--text,#1f2933);font-size:.75rem;text-overflow:ellipsis;white-space:nowrap}
@media(hover:none){.furnace-document-thumb-popover{display:none!important}}
/* Fours 1.4.17 · aperçu CSV tabulaire */
.furnace-csv-preview .table-responsive{max-height:72vh;overflow:auto}
.furnace-csv-table th,.furnace-csv-table td{padding:.38rem .55rem;vertical-align:middle}
.furnace-csv-table thead th{box-shadow:inset 0 -1px 0 var(--border,#d9dde3);font-weight:600}
.furnace-csv-table .furnace-csv-number{text-align:right;font-variant-numeric:tabular-nums}
.furnace-csv-meta{display:block;margin-top:2px;font-size:.75rem}

/* =========================================================
 * Mesures de température
 * ========================================================= */

.furnace-temperature-loading,
.furnace-temperature-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 180px;
    color: var(--text-muted);
}

.furnace-temperature-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
}

.furnace-temperature-card {
    overflow: hidden;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
}

.furnace-temperature-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 14px;
    border-bottom: 1px solid #eaecf0;
    background: #f9fafb;
}

.furnace-temperature-date {
    color: #101828;
    font-size: 13px;
    font-weight: 750;
}

.furnace-temperature-intervention {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    color: #667085;
    font-size: 11px;
}

.furnace-temperature-intervention strong {
    color: #344054;
}

.furnace-temperature-technician {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #475467;
    font-size: 12px;
    white-space: nowrap;
}

.furnace-temperature-values {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.furnace-temperature-values > div {
    min-width: 0;
    padding: 10px 12px;
    border-right: 1px solid #eaecf0;
}

.furnace-temperature-values > div:last-child {
    border-right: 0;
}

.furnace-temperature-values span {
    display: block;
    margin-bottom: 3px;
    color: #98a2b3;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.furnace-temperature-values strong {
    display: block;
    overflow: hidden;
    color: #344054;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .furnace-temperature-values {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .furnace-temperature-values > div {
        border-bottom: 1px solid #eaecf0;
    }

    .furnace-temperature-values > div:nth-child(3n) {
        border-right: 0;
    }

    .furnace-temperature-values > div:nth-last-child(-n + 3) {
        border-bottom: 0;
    }
}

@media (max-width: 767.98px) {
    .furnace-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }

    .furnace-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .furnace-temperature-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .furnace-temperature-technician {
        white-space: normal;
    }

    .furnace-temperature-values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .furnace-temperature-values > div,
    .furnace-temperature-values > div:nth-child(3n) {
        border-right: 1px solid #eaecf0;
        border-bottom: 1px solid #eaecf0;
    }

    .furnace-temperature-values > div:nth-child(2n) {
        border-right: 0;
    }

    .furnace-temperature-values > div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }
}


/* =========================================================
 * Création four · dossier technique existant
 * ========================================================= */

.furn-create-storage-match {
    margin-top: 8px;
}

.furn-create-storage-searching,
.furn-create-storage-none,
.furn-create-storage-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 8px;
    font-size: 12px;
}

.furn-create-storage-searching,
.furn-create-storage-none {
    background: #f8fafc;
    color: #667085;
}

.furn-create-storage-error {
    background: #fff4ed;
    color: #b54708;
}

.furn-create-storage-found {
    padding: 10px 11px;
    border: 1px solid #b2ccff;
    border-radius: 9px;
    background: #f5f8ff;
}

.furn-create-storage-found.selected {
    border-color: #75e0a7;
    background: #ecfdf3;
}

.furn-create-storage-found-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: #175cd3;
    font-size: 12px;
}

.furn-create-storage-found.selected
.furn-create-storage-found-title {
    color: #067647;
}

.furn-create-storage-candidates {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.furn-create-storage-candidate {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 7px;
    cursor: pointer;
}

.furn-create-storage-candidate:hover {
    background: rgba(255, 255, 255, .75);
}

.furn-create-storage-candidate input {
    margin-top: 3px;
}

.furn-create-storage-candidate span {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.furn-create-storage-candidate strong {
    color: #344054;
    font-size: 12px;
}

.furn-create-storage-candidate small {
    overflow: hidden;
    color: #667085;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.furn-create-storage-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
}


/* =========================================================
 * DeltaLog9 · Fours 1.3.4
 * ========================================================= */

.furnace-temperature-card[data-dl9-reading] {
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.furnace-temperature-card[data-dl9-reading]:hover {
    border-color: #8b83de;
    background: #fcfbff;
}

.furnace-dl9-target {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 4px;
    color: #667085;
    font-size: 12px;
}

.furnace-dl9-drop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 105px;
    padding: 18px;
    border: 1px dashed #b8b4ee;
    border-radius: 12px;
    background: #faf9ff;
    color: #554bc3;
    cursor: pointer;
}

.furnace-dl9-drop > i {
    font-size: 26px;
}

.furnace-dl9-drop span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.furnace-dl9-drop small {
    color: #667085;
    font-weight: 400;
}

.furnace-dl9-status {
    min-height: 22px;
    margin: 14px 0 8px;
    color: #667085;
    font-size: 12px;
}

.furnace-dl9-candidates {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.furnace-dl9-candidate {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 85px;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
}

.furnace-dl9-candidate.best {
    border-color: #b8b4ee;
    background: #fcfbff;
}

.furnace-dl9-preview {
    min-width: 0;
    padding: 4px 8px;
    border-radius: 7px;
    background: #f8fafc;
}

.furnace-dl9-graph {
    display: block;
    width: 100%;
    height: 82px;
}

.furnace-dl9-graph path {
    stroke: #475467;
    stroke-width: 1.7;
}

.furnace-dl9-candidate-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #101828;
    font-size: 13px;
}

.furnace-dl9-badge {
    padding: 3px 7px;
    border-radius: 999px;
    background: #eeecff;
    color: #554bc3;
    font-size: 9px;
    font-weight: 700;
}

.furnace-dl9-candidate-meta,
.furnace-dl9-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    margin-top: 7px;
    color: #667085;
    font-size: 11px;
}

.furnace-dl9-checks .ok {
    color: #067647;
}

.furnace-dl9-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.furnace-dl9-score span {
    color: #98a2b3;
    font-size: 9px;
    text-transform: uppercase;
}

.furnace-dl9-score strong {
    color: #344054;
    font-size: 20px;
}

.furnace-dl9-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
    color: #667085;
    text-align: center;
}

@media (max-width: 900px) {
    .furnace-dl9-candidate {
        grid-template-columns: 1fr auto;
    }

    .furnace-dl9-preview {
        grid-column: 1 / -1;
    }
}


/* DeltaLog9 · Fours 1.3.4 */
.furnace-dl9-status-help {
    display: block;
    margin-top: 4px;
    color: #475467;
}

button.furnace-dl9-candidate {
    width: 100%;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.furnace-dl9-candidate.candidate:hover {
    border-color: #8b83de;
    background: #faf9ff;
}

.furnace-dl9-candidate.rejected {
    opacity: .46;
    filter: grayscale(1);
    background: #f2f4f7;
}

.furnace-dl9-candidate.rejected:hover {
    opacity: .72;
    border-color: #98a2b3;
}

.furnace-dl9-candidate.saving {
    opacity: .6;
    cursor: wait;
}

.furnace-dl9-badge.rejected {
    background: #e4e7ec;
    color: #667085;
}

.furnace-dl9-checks .ko {
    color: #b42318;
}


/* =========================================================
 * Mesures de température · courbe + rapport · Fours 1.3.5
 * ========================================================= */
.furnace-temperature-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 205px;
    min-width: 0;
}

.furnace-temperature-curve-side {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-left: 1px solid #eaecf0;
    background: #fcfcfd;
}

.furnace-temperature-curve-side.empty {
    justify-content: center;
    color: #98a2b3;
}

.furnace-temperature-mini-graph {
    width: 112px;
    min-width: 0;
    padding: 2px 4px;
    border: 1px solid #eaecf0;
    border-radius: 6px;
    background: #fff;
}

.furnace-temperature-mini-svg {
    display: block;
    width: 100%;
    height: 48px;
}

.furnace-temperature-mini-svg polyline {
    stroke: #475467;
    stroke-width: 1.6;
}

.furnace-temperature-report-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 1050px) {
    .furnace-temperature-body { grid-template-columns: 1fr; }
    .furnace-temperature-curve-side { border-top: 1px solid #eaecf0; border-left: 0; justify-content: flex-end; }
    .furnace-temperature-mini-graph { width: 160px; }
}




/* Module injecté : FESP Settings 1.0.5 */


.fesp-settings{padding:22px;color:var(--bs-body-color,#222);max-width:1350px;margin:auto;font-family:inherit}.fesp-settings h1{font-size:24px;margin-bottom:5px}.fesp-settings small{opacity:.7}.fesp-set-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.fesp-set-tabs button{padding:10px 16px;background:#e7e9ed;border:0;border-radius:9px;cursor:pointer}.fesp-set-tabs button.active{background:#282f3b;color:#fff}.fesp-set-card{background:#fff;border:1px solid #dde1e7;padding:19px;border-radius:12px;margin-bottom:15px;box-shadow:0 2px 12px #00000008}.fesp-set-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}.fesp-set-field{display:flex;flex-direction:column;gap:5px;margin:10px 0}.fesp-set-field input,.fesp-set-field select{padding:9px;border:1px solid #c8ced6;border-radius:6px;min-width:0}.fesp-set-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px}.fesp-set-actions button,.fesp-set-primary{background:#2563eb;color:white;border:0;padding:10px 15px;border-radius:7px;cursor:pointer}.fesp-set-item{display:flex;gap:12px;align-items:center;padding:12px;border:1px solid #e4e5eb;border-radius:9px}.fesp-set-item i{font-size:22px}.fesp-set-badge{display:inline-block;background:#e5ecff;border-radius:16px;padding:3px 7px;font-size:12px}.fesp-settings .fesp-set-error{color:#b91c1c}.fesp-settings .fesp-set-success{color:#047857}

.fesp-set-overlay{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;background:rgba(15,23,42,.65);padding:18px}.fesp-set-dialog{background:var(--bs-body-bg,#fff);color:var(--bs-body-color,#222);width:min(760px,100%);max-height:calc(100vh - 36px);overflow:auto;border-radius:14px;padding:24px;box-shadow:0 20px 60px #0004}.fesp-set-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.fesp-set-dialog h2{margin:0;font-size:20px}.fesp-set-dialog .fesp-set-check{flex-direction:row;align-items:center}.fesp-set-secondary,.fesp-set-danger{border:0;border-radius:7px;cursor:pointer;padding:10px 16px}.fesp-set-secondary{background:#e6e9ef;color:#172033}.fesp-set-danger{background:#b91c1c;color:#fff}.fesp-set-iconbtn{border:0;background:transparent;font-size:30px;cursor:pointer;color:inherit}.fesp-set-confirm{max-width:460px}.fesp-set-tabs button{margin:2px}.fesp-set-item button{border:1px solid #cbd5e1;background:#f8fafc;border-radius:7px;padding:7px 10px;cursor:pointer}.fesp-set-card h2{font-size:19px}.fesp-set-error{overflow-wrap:anywhere}




/* ONLYOFFICE ----------------------------------------------------- */
.intranet-onlyoffice-modal .modal-content {
    min-width: 0;
    min-height: 0;
}

.intranet-onlyoffice-header {
    min-height: 54px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.intranet-onlyoffice-modal .modal-body {
    display: flex;
    min-width: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.intranet-onlyoffice-editor {
    flex: 1;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
}

.intranet-onlyoffice-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    min-height: 320px;
    color: var(--text-muted, #667085);
}

.account-page{padding:24px 28px;max-width:1300px;margin:0 auto}.account-head{margin-bottom:22px}.account-head h1{margin:0}.account-head p{margin:.35rem 0 0;color:var(--bs-secondary-color)}.account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.account-card{background:#fff;border:1px solid #dee2e6;border-radius:12px;padding:22px;min-width:0}.account-card h2{font-size:1.1rem;margin:0 0 18px}.account-row{display:flex;justify-content:space-between;gap:20px;padding:10px 0;border-top:1px solid #edf0f2}.account-status{display:inline-flex;padding:7px 11px;border-radius:999px;font-weight:700}.account-status.ok{background:#e4f5e9;color:#176b37}.account-status.warn{background:#fff3cd;color:#7a5b00}.account-help{font-size:.85rem;color:#6c757d;margin-top:12px}.account-signature-card{grid-column:1/-1}.signature-preview{display:flex;align-items:center;justify-content:center;min-height:170px;background:#f8f9fa;border:1px dashed #ced4da;border-radius:10px;margin-bottom:14px}.signature-preview img{max-width:100%;max-height:150px}.account-actions{display:flex;gap:10px;flex-wrap:wrap}.account-qr{display:inline-block;padding:12px;background:#fff;border:1px solid #dee2e6;border-radius:10px}.account-code{max-width:220px;font-size:1.5rem;letter-spacing:.25em;text-align:center}.account-mfa-enroll{max-width:680px}@media(max-width:800px){.account-grid{grid-template-columns:1fr}.account-signature-card{grid-column:auto}.account-page{padding:16px}}
.sidebar-user-menu a{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;text-decoration:none;color:inherit;border-radius:7px}.sidebar-user-menu a:hover{background:rgba(127,127,127,.1)}

.account-profile-head{display:flex;align-items:center;gap:1rem;margin-bottom:1.25rem}
.account-avatar{width:72px;height:72px;border-radius:50%;overflow:hidden;flex:0 0 72px;display:grid;place-items:center;background:var(--account-color,#6c757d);box-shadow:0 0 0 3px color-mix(in srgb,var(--account-color,#6c757d) 22%,transparent)}
.account-avatar-img{width:100%;height:100%;object-fit:cover}
.account-avatar-initials{color:#fff;font-size:1.65rem;font-weight:700}
.account-save-status{min-height:1.5rem}
.account-notification-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 0;border-bottom:1px solid rgba(0,0,0,.08)}
.account-notification-row:last-child{border-bottom:0}


/* Core 1.5.6 · scroll page Mon compte */
#intra-content[data-current-page="account"] {
    height: 100vh;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

#intra-content[data-current-page="account"] .account-page {
    min-height: 100%;
    box-sizing: border-box;
    padding-bottom: 48px;
}


/* ===== FESP Core 1.6.0 · Bee Chat / Notifications ===== */
:root{--bee-sidepanel-width:420px}
.bee-chat-panel{position:fixed;top:0;right:0;width:min(var(--bee-sidepanel-width),100vw);height:100dvh;background:var(--panel,#fff);border-left:1px solid var(--border,#d9dde3);box-shadow:-14px 0 40px rgba(15,23,42,.12);z-index:1085;transform:translateX(102%);transition:transform .2s ease;display:flex;flex-direction:column}
.bee-chat-panel.open{transform:translateX(0)}
.bee-chat-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.18);z-index:1080;opacity:0;pointer-events:none;transition:opacity .2s ease}
.bee-chat-backdrop.open{opacity:1;pointer-events:auto}
.bee-chat-toolbar{min-height:58px;display:flex;align-items:stretch;justify-content:space-between;border-bottom:1px solid var(--border,#d9dde3);background:#fff}
.bee-chat-tabs{display:flex;align-items:stretch;min-width:0;flex:1}
.bee-chat-tab{position:relative;display:flex;align-items:center;gap:8px;padding:0 16px;border:0;background:transparent;color:var(--muted,#6b7280);font-weight:650;white-space:nowrap}
.bee-chat-tab:hover{color:inherit;background:var(--panel-soft,#f8f9fb)}
.bee-chat-tab.active{color:var(--text,#1f2933)}
.bee-chat-tab.active::after{content:"";position:absolute;left:14px;right:14px;bottom:-1px;height:2px;background:var(--accent,#c43b32)}
.bee-chat-toolbar-actions{display:flex;align-items:center;padding:0 8px;gap:2px}
.bee-chat-close,.bee-chat-pin,.bee-chat-back{border:0;background:transparent;width:38px;height:38px;border-radius:10px;color:inherit}
.bee-chat-close:hover,.bee-chat-pin:hover,.bee-chat-back:hover{background:var(--panel-soft,#f8f9fb)}
.bee-chat-pin.active{background:var(--accent-soft,#f3dedc);color:var(--accent,#c43b32)}
.bee-chat-head{min-height:62px;display:flex;align-items:center;padding:10px 18px;border-bottom:1px solid var(--border,#d9dde3)}
.bee-chat-title{font-size:1.02rem;font-weight:700;display:flex;gap:10px;align-items:center}
.bee-chat-subtitle{font-size:.78rem;color:var(--muted,#6b7280);margin-top:2px}
.bee-chat-body{min-height:0;flex:1;position:relative;overflow:hidden}
.bee-chat-tab-pane{display:none;height:100%}
.bee-chat-tab-pane.active{display:flex;flex-direction:column}
.bee-chat-list-view,.bee-chat-thread-view{height:100%;display:flex;flex-direction:column}
.bee-chat-thread-view[hidden]{display:none!important}
.bee-chat-search-wrap{margin:14px 16px 8px;position:relative}
.bee-chat-search-wrap i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--muted,#6b7280);font-size:.85rem}
.bee-chat-search-wrap input{width:100%;border:1px solid var(--border,#d9dde3);background:var(--panel-soft,#f8f9fb);border-radius:12px;padding:9px 12px 9px 35px;outline:0}
.bee-chat-section-label{padding:13px 18px 7px;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#6b7280)}
.bee-chat-conversations,.bee-chat-users{overflow:auto}
.bee-chat-conversations{max-height:48%}
.bee-chat-users{flex:1}
.bee-chat-row{width:100%;display:flex;align-items:center;gap:11px;padding:10px 16px;border:0;background:transparent;text-align:left;color:inherit}
.bee-chat-row:hover{background:var(--panel-soft,#f8f9fb)}
.bee-chat-avatar,.bee-chat-thread-avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--panel-soft,#f1f3f5);border:1px solid var(--border,#d9dde3);flex:0 0 auto;font-weight:700;position:relative}
.fesp-presence-dot{width:9px;height:9px;border-radius:50%;background:#9ca3af;display:inline-block;margin-right:6px}
.fesp-presence-dot.online{background:#22c55e}
.bee-chat-row-main{min-width:0;flex:1}
.bee-chat-row-top{display:flex;justify-content:space-between;gap:8px}
.bee-chat-row-name{font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bee-chat-row-time{font-size:.7rem;color:var(--muted,#6b7280);white-space:nowrap}
.bee-chat-row-preview{font-size:.79rem;color:var(--muted,#6b7280);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px;display:block}
.bee-chat-unread,.fesp-collab-badge{min-width:20px;height:20px;border-radius:10px;padding:0 6px;place-items:center;background:var(--accent,#c43b32);color:#fff;font-size:.68rem;font-weight:700}
.bee-chat-unread{display:grid}
.bee-chat-empty{padding:22px 18px;color:var(--muted,#6b7280);font-size:.86rem;text-align:center}
.bee-chat-thread-head{height:64px;border-bottom:1px solid var(--border,#d9dde3);display:flex;align-items:center;gap:10px;padding:0 56px 0 56px;position:relative}
.bee-chat-back{position:absolute;left:8px}
.bee-chat-thread-head small{display:block;color:var(--muted,#6b7280);font-size:.73rem}
.bee-chat-messages{flex:1;overflow:auto;padding:18px 15px;display:flex;flex-direction:column;gap:8px;background:#fff}
.bee-chat-bubble{max-width:82%;padding:9px 12px;border-radius:14px;background:var(--panel-soft,#f1f3f5);align-self:flex-start;overflow-wrap:anywhere}
.bee-chat-bubble.mine{align-self:flex-end;background:var(--accent-soft,#f3dedc)}
.bee-chat-bubble-meta{font-size:.66rem;color:var(--muted,#6b7280);margin-top:4px;text-align:right}
.bee-chat-compose{display:flex;align-items:flex-end;gap:8px;padding:12px;border-top:1px solid var(--border,#d9dde3);background:#fff}
.bee-chat-compose textarea{flex:1;resize:none;max-height:130px;border:1px solid var(--border,#d9dde3);border-radius:14px;padding:10px 12px;outline:0}
.bee-chat-compose button{width:42px;height:42px;border:0;border-radius:50%;background:var(--accent,#c43b32);color:#fff;display:grid;place-items:center;flex:0 0 auto}
body.fesp-sidepanel-pinned #intra-content{margin-right:var(--bee-sidepanel-width)}
body.fesp-sidepanel-pinned .bee-chat-panel{box-shadow:none}
.fesp-collab-launcher{position:fixed;right:16px;bottom:18px;z-index:1070;display:flex;flex-direction:column;gap:8px}
.fesp-collab-launch{position:relative;width:46px;height:46px;border:1px solid var(--border,#d9dde3);border-radius:14px;background:#fff;color:#374151;box-shadow:0 8px 24px rgba(15,23,42,.14);font-size:1rem}
.fesp-collab-launch:hover{color:var(--accent,#c43b32);transform:translateY(-1px)}
.fesp-collab-badge{position:absolute;right:-5px;top:-5px;display:grid}
.fesp-notifications-list{height:100%;overflow:auto;padding:10px}
.fesp-notification{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #eceff2;background:transparent;padding:12px 10px;color:inherit;text-decoration:none}
.fesp-notification:hover{background:#f8f9fb}
.fesp-notification.unread{background:#fff8f7}
.fesp-notification-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.fesp-notification-title{font-weight:700}
.fesp-notification-time{font-size:.72rem;color:#6b7280}
.fesp-notification-message{margin-top:4px;font-size:.86rem;color:#5f6875}
.fesp-notification-source{margin-top:5px;font-size:.7rem;color:#8a93a0;text-transform:uppercase}
@media(max-width:991.98px){body.fesp-sidepanel-pinned #intra-content{margin-right:0}.bee-chat-pin{display:none}}
@media(max-width:767.98px){.bee-chat-panel{width:100vw;border-left:0}.bee-chat-backdrop{display:none}.bee-chat-tab span{display:none}.fesp-collab-launcher{right:10px;bottom:10px}}


/* ===== FESP workspace variable bridge ===== */
:root {
    --bee-bg: var(--bg);
    --bee-card: var(--panel);
    --bee-text: var(--text);
    --bee-muted: var(--muted);
    --bee-border: var(--border);
    --bee-accent: var(--accent);
}

.sidebar-user-display-mode {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.sidebar-user-display-mode:hover {
    background: rgba(255,255,255,.06);
}

.fesp-display-mode-modal .modal-dialog {
    max-width: 760px;
}

.fesp-display-mode-current {
    font-size: .8rem;
    color: var(--muted);
}

/* ===== FESP Core 1.6.3 · Desktop / Workspace ===== */
.bee-display-mode-choices {
   display: grid;
   grid-template-columns: repeat(3, minmax(0, 1fr));
   gap: 12px;
}

.bee-display-mode-choice {
   position: relative;
   display: flex;
   flex-direction: column;
   gap: 6px;
   min-height: 150px;
   padding: 14px;
   border: 1px solid var(--bee-border);
   border-radius: 12px;
   background: var(--bee-card);
   cursor: pointer;
}

.bee-display-mode-choice:has(input:checked) {
   border-color: #159a61;
   box-shadow: 0 0 0 2px rgba(21,154,97,.12);
}

.bee-display-mode-choice > input {
   position: absolute;
   top: 12px;
   right: 12px;
}

.bee-display-mode-choice small {
   color: var(--bee-muted);
}

.bee-display-mode-preview {
   display: grid;
   place-items: center;
   height: 72px;
   margin-bottom: 4px;
   border-radius: 9px;
   background: var(--bee-bg);
   color: #159a61;
   font-size: 28px;
}

.bee-display-mode-preview-desktop {
   background: linear-gradient(135deg, rgba(21,154,97,.12), rgba(21,154,97,.03));
}

.bee-display-capability {
   display: flex;
   align-items: center;
   gap: 10px;
   min-height: 42px;
   padding: 10px 12px;
   border: 1px solid var(--bee-border);
   border-radius: 9px;
   background: var(--bee-bg);
   color: var(--bee-muted);
}

.bee-display-capability.is-recommended {
   border-color: rgba(21,154,97,.35);
   background: rgba(21,154,97,.07);
   color: #117848;
}

.bee-desktop {
   position: fixed;
   inset: 0;
   z-index: 900;
   display: none;
   overflow: hidden;
   background:
      radial-gradient(circle at 20% 10%, rgba(21,154,97,.08), transparent 28%),
      linear-gradient(145deg, #eef2f5, #f8fafb 45%, #edf1f4);
}

body.bee-desktop-active .bee-desktop {
   display: block;
}

body.bee-desktop-active .bee-content {
   visibility: hidden;
   pointer-events: none;
}

body.bee-layout-sidebar.bee-desktop-active .bee-desktop {
   left: var(--bee-sidebar-width);
}

body.bee-layout-sidebar.bee-sidebar-compact.bee-desktop-active .bee-desktop {
   left: var(--bee-sidebar-compact-width);
}

body.bee-layout-topbar.bee-desktop-active .bee-desktop {
   top: var(--bee-topbar-height, 64px);
}

.bee-desktop-canvas {
   position: absolute;
   inset: 0 0 48px;
   overflow: hidden;
}

.bee-window {
   position: absolute;
   display: flex;
   flex-direction: column;
   min-width: 420px;
   min-height: 280px;
   overflow: hidden;
   border: 1px solid rgba(23,32,51,.18);
   border-radius: 12px;
   background: var(--bee-card);
   box-shadow: 0 16px 48px rgba(15,23,42,.17);
   resize: both;
}

.bee-window.is-active {
   box-shadow: 0 20px 60px rgba(15,23,42,.24), 0 0 0 1px rgba(21,154,97,.25);
}

.bee-window.is-maximized {
   inset: 8px !important;
   width: auto !important;
   height: auto !important;
   resize: none;
}

.bee-window.is-minimized {
   display: none;
}

.bee-window-header {
   display: flex;
   align-items: center;
   gap: 10px;
   flex: 0 0 42px;
   min-height: 42px;
   padding: 0 8px 0 12px;
   border-bottom: 1px solid var(--bee-border);
   background: color-mix(in srgb, var(--bee-card) 92%, var(--bee-bg));
   cursor: move;
   user-select: none;
}

.bee-window-title {
   display: flex;
   align-items: center;
   gap: 8px;
   min-width: 0;
   flex: 1;
   font-size: 13px;
   font-weight: 700;
}

.bee-window-title span {
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}

.bee-window-actions {
   display: flex;
   align-items: center;
   gap: 2px;
}

.bee-window-action,
.bee-desktop-taskbar-btn {
   display: grid;
   place-items: center;
   width: 32px;
   height: 32px;
   border: 0;
   border-radius: 7px;
   background: transparent;
   color: inherit;
}

.bee-window-action:hover,
.bee-desktop-taskbar-btn:hover {
   background: rgba(0,0,0,.07);
}

.bee-window-action[data-action="close"]:hover {
   background: #d92d20;
   color: #fff;
}

.bee-window-frame {
   display: block;
   flex: 1 1 auto;
   width: 100%;
   min-height: 0;
   border: 0;
   background: var(--bee-card);
}

.bee-desktop-taskbar {
   position: absolute;
   inset: auto 0 0;
   display: flex;
   align-items: center;
   gap: 8px;
   height: 48px;
   padding: 6px 10px;
   border-top: 1px solid rgba(23,32,51,.12);
   background: rgba(255,255,255,.88);
   backdrop-filter: blur(18px);
}

.bee-desktop-taskbar-windows {
   display: flex;
   align-items: center;
   gap: 6px;
   min-width: 0;
   flex: 1;
   overflow-x: auto;
}

.bee-desktop-task {
   display: flex;
   align-items: center;
   gap: 7px;
   min-width: 0;
   max-width: 210px;
   height: 34px;
   padding: 0 11px;
   border: 1px solid transparent;
   border-radius: 8px;
   background: rgba(255,255,255,.55);
   color: #344054;
   font-size: 12px;
}

.bee-desktop-task.is-active {
   border-color: rgba(21,154,97,.25);
   background: rgba(21,154,97,.10);
   color: #117848;
}

.bee-desktop-task span {
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}

.bee-ultrawide-suggestion {
   position: fixed;
   right: 20px;
   bottom: 20px;
   z-index: 5000;
   width: min(420px, calc(100vw - 40px));
   padding: 16px;
   border: 1px solid rgba(21,154,97,.28);
   border-radius: 14px;
   background: var(--bee-card);
   box-shadow: 0 18px 50px rgba(15,23,42,.22);
}

.bee-ultrawide-suggestion-icon {
   display: grid;
   place-items: center;
   flex: 0 0 42px;
   width: 42px;
   height: 42px;
   border-radius: 10px;
   background: rgba(21,154,97,.10);
   color: #159a61;
}

html.fesp-embedded body .intra-sidebar,
html.fesp-embedded body .fesp-collab-launcher,
html.fesp-embedded body .bee-chat-panel,
html.fesp-embedded body .bee-chat-backdrop,
html.fesp-embedded body .bee-desktop {
   display: none !important;
}

html.fesp-embedded body .intra-shell {
   display: block !important;
   grid-template-columns: 1fr !important;
   height: auto !important;
   min-height: 100vh;
   overflow: visible !important;
}

html.fesp-embedded body #intra-content {
   margin: 0 !important;
   padding: 14px !important;
   width: 100% !important;
   max-width: none !important;
   min-height: 100vh;
   height: auto !important;
   overflow: visible !important;
   visibility: visible !important;
}

html.fesp-embedded body {
   overflow: auto !important;
}


/* ===== FESP Core 1.6.4 · Workspace avec navigation persistante ===== */

/*
 * En mode Bureau, la sidebar FESP reste le lanceur principal.
 * Le workspace n'occupe que la zone métier située à droite.
 */
body.bee-desktop-active .bee-desktop {
    left: 248px;
}

/*
 * La navigation reste visible et cliquable au-dessus de son propre fond.
 */
body.bee-desktop-active .intra-sidebar {
    position: relative;
    z-index: 950;
}

/*
 * Le contenu standard reste derrière le workspace dans la zone centrale.
 * On évite tout clic accidentel sur la page sous-jacente.
 */
body.bee-desktop-active #intra-content {
    pointer-events: none;
    visibility: hidden;
}

/*
 * Le panneau utilisateur de la sidebar doit pouvoir s'afficher sans être
 * masqué par le workspace.
 */
body.bee-desktop-active .sidebar-user {
    position: relative;
    z-index: 960;
}

/*
 * Sur une page embarquée dans une fenêtre, aucune navigation FESP dupliquée.
 */
html.fesp-embedded body .intra-sidebar {
    display: none !important;
}

/*
 * Le mode Bureau n'est utilisé que sur grand écran, mais cette protection
 * évite un décalage si la fenêtre est réduite après activation.
 */
@media (max-width: 1199.98px) {
    body.bee-desktop-active .bee-desktop {
        left: 0;
    }
}


/* ===== FESP Core 1.6.5 · contenu des fenêtres Workspace ===== */
html.fesp-embedded,
html.fesp-embedded body {
    width: 100%;
    min-height: 100%;
    background: var(--bg);
}

html.fesp-embedded body #intra-content {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

html.fesp-embedded body #intra-content.is-loading {
    opacity: .7 !important;
}

html.fesp-embedded body.bee-desktop-active #intra-content {
    visibility: visible !important;
    pointer-events: auto !important;
}

html.fesp-embedded body .fesp-collab-launcher,
html.fesp-embedded body .bee-chat-panel,
html.fesp-embedded body .bee-chat-backdrop,
html.fesp-embedded body .bee-desktop {
    display: none !important;
}


/* ===== FESP Core 1.6.6 · Workspace natif sans iframe ===== */

.fesp-workspace-content {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding: 14px;
    background: var(--bg);
    color: var(--text);
}

.fesp-workspace-content.is-loading {
    cursor: progress;
}

.fesp-workspace-content > .intra-page-content,
.fesp-workspace-content > .page-content,
.fesp-workspace-content > section,
.fesp-workspace-content > .container-fluid {
    max-width: none;
}

.fesp-workspace-loading {
    min-height: 180px;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 10px;
    color: var(--muted);
}

.fesp-workspace-error {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    color: var(--muted);
}

.fesp-workspace-error > i {
    color: #d97706;
    font-size: 22px;
}

.fesp-workspace-error strong,
.fesp-workspace-error small {
    display: block;
}

.fesp-workspace-error small {
    margin-top: 3px;
}

/*
 * L'ancienne classe iframe peut encore être présente dans le CSS hérité
 * Bee, mais aucune fenêtre FESP 1.6.6 ne l'utilise.
 */
.bee-window > .fesp-workspace-content {
    border: 0;
}

/*
 * Le DOM métier vit maintenant dans le document principal.
 * Les modals Bootstrap et autres overlays peuvent donc sortir
 * correctement au-dessus des fenêtres.
 */
body.bee-desktop-active .modal {
    z-index: 7010 !important;
}

body.bee-desktop-active .modal-backdrop {
    z-index: 7000 !important;
}


/* ===== FESP Core 1.6.7 · Actions collaboration dans sidebar ===== */

.sidebar-bottom-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px 10px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-bottom-action {
    position: relative;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 14px;
    cursor: pointer;
}

.sidebar-bottom-action:hover {
    background: rgba(255,255,255,.08);
}

.sidebar-bottom-action:focus-visible {
    outline: 2px solid rgba(255,255,255,.45);
    outline-offset: 2px;
}

.sidebar-action-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #d83a32;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--sidebar-bg, #222831);
}

/*
 * Le launcher flottant n'est plus utilisé depuis 1.6.7.
 */
.fesp-collab-launcher {
    display: none !important;
}

/*
 * L'ancien bouton texte n'est plus utilisé.
 */
.sidebar-user-display-mode {
    display: none !important;
}


/* ===== FESP Core 1.6.8 · Actions fixes en bas de sidebar ===== */

.intra-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.intra-sidebar .sidebar-menu {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.sidebar-fixed-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 10px 11px;
    border-top: 1px solid rgba(255,255,255,.10);
    background: inherit;
}

.sidebar-fixed-action {
    position: relative;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    font-size: 14px;
    cursor: pointer;
}

.sidebar-fixed-action:hover {
    background: rgba(255,255,255,.09);
}

.sidebar-fixed-action:focus-visible {
    outline: 2px solid rgba(255,255,255,.45);
    outline-offset: 2px;
}

.sidebar-bottom-actions {
    display: none !important;
}


/* ===== FESP Core 1.6.9 · Modal / backdrop stacking fix ===== */

/*
 * Les fenêtres Workspace ont leur propre z-index dynamique.
 * Le backdrop doit être au-dessus de toutes les fenêtres,
 * mais toujours sous le modal actif.
 */
body.bee-desktop-active .modal-backdrop {
    z-index: 7000 !important;
}

body.bee-desktop-active .modal {
    z-index: 7010 !important;
}

/*
 * Certains composants Bootstrap utilisent leur propre couche interne.
 * On conserve la boîte de dialogue au-dessus du backdrop.
 */
body.bee-desktop-active .modal.show .modal-dialog {
    position: relative;
    z-index: 1;
}

/*
 * Les popovers/tooltips ouverts depuis un modal doivent eux aussi
 * rester au-dessus de la boîte de dialogue.
 */
body.bee-desktop-active .tooltip {
    z-index: 7030 !important;
}

body.bee-desktop-active .popover {
    z-index: 7040 !important;
}


/* ===== FESP Core 1.6.10 · Sidebar bottom bar visible ===== */

.intra-sidebar {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/*
 * Le menu occupe l'espace disponible mais réserve la hauteur de la barre.
 */
.intra-sidebar .sidebar-menu {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding-bottom: 64px !important;
}

/*
 * Barre réellement fixée en bas de la navigation.
 * Elle ne dépend plus du flux flex ni de la hauteur du menu.
 */
.sidebar-fixed-actions {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1200 !important;

    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;

    padding: 8px 10px !important;
    margin: 0 !important;

    border-top: 1px solid rgba(255,255,255,.12) !important;
    background: var(--sidebar) !important;
    color: var(--sidebar-text) !important;
}

.sidebar-fixed-action {
    position: relative !important;
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;

    display: grid !important;
    place-items: center !important;

    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: var(--sidebar-text) !important;

    font-size: 15px !important;
    cursor: pointer !important;
}

.sidebar-fixed-action:hover {
    background: var(--sidebar-soft) !important;
    color: #fff !important;
}

.sidebar-fixed-action i {
    pointer-events: none;
}

.sidebar-action-badge {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;

    min-width: 16px !important;
    height: 16px !important;
    padding: 0 4px !important;

    display: grid;
    place-items: center;

    border-radius: 8px;
    background: #d83a32;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--sidebar);
}

.sidebar-action-badge[hidden] {
    display: none !important;
}

/* Anciennes barres éventuelles neutralisées. */
.sidebar-bottom-actions,
.fesp-collab-launcher {
    display: none !important;
}

/*
 * Même en mode Bureau, la barre reste visible au-dessus du workspace.
 */
body.bee-desktop-active .intra-sidebar {
    z-index: 1300 !important;
}

body.bee-desktop-active .sidebar-fixed-actions {
    z-index: 1310 !important;
}

/* ===== Bee Chat / Notifications side panel ===== */
:root{--bee-sidepanel-width:420px}
.bee-chat-panel{position:fixed;top:0;right:0;width:min(var(--bee-sidepanel-width),100vw);height:100dvh;background:var(--panel,#fff);border-left:1px solid var(--border,#d9dde3);box-shadow:-14px 0 40px rgba(15,23,42,.12);z-index:1085;transform:translateX(102%);transition:transform .2s ease;display:flex;flex-direction:column}
.bee-chat-panel.open{transform:translateX(0)}
.bee-chat-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.18);z-index:1080;opacity:0;pointer-events:none;transition:opacity .2s ease}
.bee-chat-backdrop.open{opacity:1;pointer-events:auto}
.bee-chat-toolbar{min-height:58px;display:flex;align-items:stretch;justify-content:space-between;border-bottom:1px solid var(--border,#d9dde3);background:var(--panel,#fff)}
.bee-chat-tabs{display:flex;align-items:stretch;min-width:0;flex:1}
.bee-chat-tab{position:relative;display:flex;align-items:center;gap:8px;padding:0 16px;border:0;background:transparent;color:var(--muted,#6b7280);font-weight:650;white-space:nowrap}
.bee-chat-tab:hover{color:inherit;background:var(--panel-soft,#f8f9fb)}
.bee-chat-tab.active{color:var(--text,#1f2933)}
.bee-chat-tab.active::after{content:"";position:absolute;left:14px;right:14px;bottom:-1px;height:2px;background:var(--accent,#c43b32);border-radius:2px 2px 0 0}
.bee-chat-toolbar-actions{display:flex;align-items:center;padding:0 8px;gap:2px}
.bee-chat-close,.bee-chat-pin,.bee-chat-back{border:0;background:transparent;width:38px;height:38px;border-radius:10px;color:inherit}
.bee-chat-close:hover,.bee-chat-pin:hover,.bee-chat-back:hover{background:var(--panel-soft,#f8f9fb)}
.bee-chat-pin.active{background:var(--accent-soft,#f3dedc);color:var(--accent,#c43b32)}
.bee-chat-pin.active i{transform:rotate(-45deg)}
.bee-chat-pin i{transition:transform .15s ease}
.bee-chat-head{min-height:62px;display:flex;align-items:center;justify-content:space-between;padding:10px 18px;border-bottom:1px solid var(--border,#d9dde3)}
.bee-chat-title{font-size:1.02rem;font-weight:700;display:flex;gap:10px;align-items:center}.bee-chat-subtitle{font-size:.78rem;color:var(--muted,#6b7280);margin-top:2px}
.bee-chat-body{min-height:0;flex:1;position:relative;overflow:hidden}.bee-chat-tab-pane{display:none;height:100%}.bee-chat-tab-pane.active{display:flex;flex-direction:column}.bee-chat-list-view,.bee-chat-thread-view{height:100%;display:flex;flex-direction:column}.bee-chat-thread-view[hidden]{display:none!important}
.bee-chat-search-wrap{margin:14px 16px 8px;position:relative}.bee-chat-search-wrap i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--muted,#6b7280);font-size:.85rem}.bee-chat-search-wrap input{width:100%;border:1px solid var(--border,#d9dde3);background:var(--panel-soft,#f8f9fb);border-radius:12px;padding:9px 12px 9px 35px;outline:0}.bee-chat-search-wrap input:focus{border-color:var(--accent,#c43b32);background:var(--panel,#fff)}
.bee-chat-section-label{padding:13px 18px 7px;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#6b7280)}.bee-chat-conversations,.bee-chat-users{overflow:auto}.bee-chat-conversations{max-height:48%}.bee-chat-users{flex:1}.bee-chat-row{width:100%;display:flex;align-items:center;gap:11px;padding:10px 16px;border:0;background:transparent;text-align:left;color:inherit}.bee-chat-row:hover{background:var(--panel-soft,#f8f9fb)}
.bee-chat-avatar,.bee-chat-thread-avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--panel-soft,#f1f3f5);border:1px solid var(--border,#d9dde3);flex:0 0 auto;font-weight:700}.bee-chat-row-main{min-width:0;flex:1}.bee-chat-row-top{display:flex;justify-content:space-between;gap:8px}.bee-chat-row-name{font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bee-chat-row-time{font-size:.7rem;color:var(--muted,#6b7280);white-space:nowrap}.bee-chat-row-preview{font-size:.79rem;color:var(--muted,#6b7280);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}.bee-chat-unread{min-width:20px;height:20px;border-radius:10px;padding:0 6px;display:grid;place-items:center;background:var(--accent,#c43b32);color:#fff;font-size:.68rem;font-weight:700}
.bee-chat-empty{padding:22px 18px;color:var(--muted,#6b7280);font-size:.86rem;text-align:center}.bee-chat-thread-head{height:64px;border-bottom:1px solid var(--border,#d9dde3);display:flex;align-items:center;gap:10px;padding:0 56px 0 12px;position:relative}.bee-chat-back{position:absolute;left:8px}.bee-chat-thread-head small{display:block;color:var(--muted,#6b7280);font-size:.73rem}.bee-chat-messages{flex:1;overflow:auto;padding:18px 15px;display:flex;flex-direction:column;gap:8px;background:var(--bg,#fff)}
.bee-chat-bubble{max-width:82%;padding:9px 12px;border-radius:14px;background:var(--panel-soft,#f1f3f5);align-self:flex-start;overflow-wrap:anywhere}.bee-chat-bubble.mine{align-self:flex-end;background:var(--accent-soft,#f3dedc)}.bee-chat-bubble-meta{font-size:.66rem;color:var(--muted,#6b7280);margin-top:4px;text-align:right}.bee-chat-compose{display:flex;align-items:flex-end;gap:8px;padding:12px;border-top:1px solid var(--border,#d9dde3);background:var(--panel,#fff)}.bee-chat-compose textarea{flex:1;resize:none;max-height:130px;border:1px solid var(--border,#d9dde3);border-radius:14px;padding:10px 12px;outline:0}.bee-chat-compose textarea:focus{border-color:var(--accent,#c43b32)}.bee-chat-compose button{width:42px;height:42px;border:0;border-radius:50%;background:var(--accent,#c43b32);color:#fff;display:grid;place-items:center;flex:0 0 auto}
.bee-notifications-empty{margin:auto;padding:36px 24px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;color:var(--muted,#6b7280)}.bee-notifications-empty>i{font-size:2rem;margin-bottom:6px}.bee-notifications-empty strong{color:var(--text,#1f2933)}
body.bee-sidepanel-pinned .bee-chat-panel{box-shadow:none}
body.bee-sidepanel-pinned .bee-content{margin-right:var(--bee-sidepanel-width);transition:margin-left .2s ease,margin-right .2s ease}
body.bee-sidepanel-pinned.bee-layout-topbar .bee-topbar{right:var(--bee-sidepanel-width);transition:right .2s ease}
@media(max-width:991.98px){body.bee-sidepanel-pinned .bee-content{margin-right:0}body.bee-sidepanel-pinned.bee-layout-topbar .bee-topbar{right:0}.bee-chat-pin{display:none}}
@media(max-width:767.98px){.bee-chat-panel{width:100vw;border-left:0}.bee-chat-backdrop{display:none}.bee-chat-head{min-height:56px}.bee-chat-tab{padding:0 12px}.bee-chat-tab span{display:none}}

.bee-dashboard-grid.bee-dashboard-masonry{display:block;columns:340px;column-gap:1rem;grid-auto-rows:unset}
.bee-dashboard-masonry .bee-dashboard-widget{display:inline-flex;flex-direction:column;width:100%;height:auto!important;min-height:0;margin:0 0 1rem;break-inside:avoid;vertical-align:top}
.bee-dashboard-masonry .bee-dashboard-widget-body{height:auto;overflow:visible}
.bee-dashboard-masonry .bee-dashboard-widget-empty{min-height:140px}
.bee-dashboard-masonry .bee-dashboard-clock{min-height:165px}
.bee-dashboard-digital-clock{height:100%;min-height:105px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:.25rem}
.bee-digital-time{font-variant-numeric:tabular-nums;font-size:clamp(2.25rem,4vw,4.35rem);font-weight:750;line-height:.95;letter-spacing:-.04em}
.bee-digital-time span{font-size:.34em;font-weight:650;margin-left:.28em;color:var(--bs-secondary-color);vertical-align:top;position:relative;top:.18em}
.bee-digital-date{margin-top:.65rem;color:var(--bs-secondary-color);font-size:.92rem;text-transform:capitalize}
.bee-digital-timezone{margin-top:.25rem;color:var(--bs-secondary-color);font-size:.75rem}
@media(max-width:767.98px){.bee-dashboard-grid.bee-dashboard-masonry{columns:1}.bee-dashboard-head .btn-group [data-dashboard-layout]{font-size:0}.bee-dashboard-head .btn-group [data-dashboard-layout] i{font-size:.875rem;margin-right:0!important}}



/* Core 1.10.51 · Notification Center */
.bee-notification-center{display:flex;flex-direction:column;height:100%;min-height:0}
.bee-notification-center-toolbar{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.55rem .75rem;border-bottom:1px solid var(--bs-border-color);flex:0 0 auto}
.bee-notification-center-list{overflow:auto;min-height:0;flex:1}
.bee-notification-group{border-bottom:1px solid var(--bs-border-color)}
.bee-notification-group-head{width:100%;border:0;background:transparent;color:inherit;display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:.55rem;align-items:start;text-align:left;padding:.7rem .75rem}
.bee-notification-group-head:hover,.bee-notification-item:hover{background:var(--bs-tertiary-bg)}
.bee-notification-group.unread>.bee-notification-group-head{background:color-mix(in srgb,var(--bs-primary) 6%,transparent)}
.bee-notification-icon{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:var(--bs-tertiary-bg);color:var(--bee-notification-color,var(--bs-primary))}
.bee-notification-main{min-width:0}
.bee-notification-title{font-weight:700;font-size:.86rem;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bee-notification-preview{font-size:.76rem;color:var(--bs-secondary-color);line-height:1.35;margin-top:.14rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bee-notification-meta{font-size:.69rem;color:var(--bs-secondary-color);margin-top:.22rem}
.bee-notification-count{min-width:1.45rem;height:1.45rem;padding:0 .38rem;border-radius:999px;background:var(--bs-primary);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:.68rem;font-weight:700}
.bee-notification-chevron{font-size:.72rem;color:var(--bs-secondary-color);margin-top:.38rem;transition:transform .15s ease}
.bee-notification-group.open .bee-notification-chevron{transform:rotate(90deg)}
.bee-notification-group-items{display:none;padding:0 .45rem .45rem .9rem}
.bee-notification-group.open .bee-notification-group-items{display:block}
.bee-notification-item{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.4rem;width:100%;border:0;border-left:2px solid var(--bee-notification-color,var(--bs-border-color));background:transparent;color:inherit;text-align:left;padding:.48rem .55rem .48rem .65rem;border-radius:.35rem}
.bee-notification-item.unread{font-weight:600}
.bee-notification-item-actions{display:flex;gap:.15rem;align-items:start}
.bee-notification-item-actions button{width:24px;height:24px;border:0;background:transparent;color:var(--bs-secondary-color);border-radius:.3rem}
.bee-notification-item-actions button:hover{background:var(--bs-tertiary-bg);color:var(--bs-body-color)}
.bee-notification-empty{padding:3rem 1rem;text-align:center;color:var(--bs-secondary-color)}
.bee-notification-empty i{display:block;font-size:1.8rem;margin-bottom:.6rem}



/* ===== FESP Core 1.7.0 · Bee collaboration compatibility ===== */

body.bee-sidepanel-pinned #intra-content {
    margin-right: var(--bee-sidepanel-width);
}

body.bee-desktop-active.bee-sidepanel-pinned .bee-desktop {
    right: var(--bee-sidepanel-width);
}

.sidebar-action-badge,
#fespChatBadge,
#fespNotifBadge {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #d83a32;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.sidebar-action-badge[hidden],
#fespChatBadge[hidden],
#fespNotifBadge[hidden] {
    display: none !important;
}

.fesp-presence-dot {
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-radius: 50%;
    display: inline-block;
    background: #9ca3af;
}

.fesp-presence-dot.online {
    background: #22c55e;
}

@media (max-width: 991.98px) {
    body.bee-sidepanel-pinned #intra-content {
        margin-right: 0;
    }

    body.bee-desktop-active.bee-sidepanel-pinned .bee-desktop {
        right: 0;
    }
}


/* ===== Core 1.7.1 · Chat pièces jointes / médias ===== */

.bee-chat-compose {
    align-items: flex-end;
}

.bee-chat-compose-tools {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.bee-chat-compose .bee-chat-tool {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #667085;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
}

.bee-chat-compose .bee-chat-tool:hover {
    background: rgba(90, 100, 120, .1);
    color: var(--bs-primary);
}

.bee-chat-compose .bee-chat-send {
    flex: 0 0 auto;
}

.bee-chat-pending-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px 0;
    border-top: 1px solid rgba(120, 130, 145, .12);
}

.bee-chat-pending-file {
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 7px 6px 9px;
    border: 1px solid rgba(120, 130, 145, .2);
    border-radius: 10px;
    background: rgba(245, 247, 250, .9);
    color: #475467;
    font-size: 11px;
}

.bee-chat-pending-file > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.bee-chat-pending-file strong {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bee-chat-pending-file small {
    color: #98a2b3;
}

.bee-chat-pending-file button {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #667085;
}

.bee-chat-attachments {
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.bee-chat-media {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: #111827;
}

.bee-chat-image img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
}

.bee-chat-video video {
    display: block;
    width: 100%;
    max-height: 360px;
    background: #000;
}

.bee-chat-video > a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 9px;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
}

.bee-chat-file-card {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid rgba(120, 130, 145, .18);
    border-radius: 10px;
    background: rgba(255,255,255,.74);
    color: inherit;
    text-decoration: none;
}

.bee-chat-file-card > i {
    font-size: 20px;
}

.bee-chat-file-card > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.bee-chat-file-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bee-chat-file-card small {
    opacity: .65;
}

@media (max-width: 680px) {
    .bee-chat-compose {
        gap: 4px;
    }

    .bee-chat-compose-tools {
        gap: 0;
    }

    .bee-chat-compose .bee-chat-tool {
        width: 30px;
        height: 34px;
        flex-basis: 30px;
    }
}


/* ===== Core 1.7.2 · composeur Chat multimédia ===== */
.bee-chat-compose {
    display: grid !important;
    grid-template-columns:
        auto
        minmax(90px, 1fr)
        40px !important;
    align-items: end !important;
    gap: 6px !important;
    width: 100%;
}

.bee-chat-compose-tools {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 2px !important;
    min-width: max-content;
}

.bee-chat-compose textarea {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 40px;
    max-height: 110px;
    box-sizing: border-box;
    resize: none;
}

.bee-chat-compose .bee-chat-tool {
    width: 32px !important;
    height: 40px !important;
    flex: 0 0 32px !important;
    border-radius: 10px !important;
}

.bee-chat-compose .bee-chat-send {
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
}

@media (max-width: 520px) {
    .bee-chat-compose {
        grid-template-columns:
            auto
            minmax(70px, 1fr)
            40px !important;
        gap: 3px !important;
        padding-inline: 7px !important;
    }

    .bee-chat-compose .bee-chat-tool {
        width: 28px !important;
        flex-basis: 28px !important;
    }

    .bee-chat-compose textarea {
        font-size: 16px !important;
    }
}


/* ===== Core 1.7.3 · moteur de commandes Chat ===== */

.bee-chat-command-menu {
    max-height: 260px;
    overflow-y: auto;
    padding: 5px;
    border-top: 1px solid var(--bee-border, #e4e7ec);
    background: rgba(255,255,255,.98);
}

.bee-chat-command-menu[hidden] {
    display: none !important;
}

.bee-chat-command-item {
    width: 100%;
    display: grid;
    grid-template-columns: 32px minmax(0,1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    text-align: left;
}

.bee-chat-command-item:hover,
.bee-chat-command-item.active {
    background: rgba(21,154,97,.09);
}

.bee-chat-command-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(21,154,97,.10);
    color: #159a61;
}

.bee-chat-command-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.bee-chat-command-copy strong {
    font-size: 12px;
}

.bee-chat-command-copy small {
    overflow: hidden;
    color: #667085;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bee-chat-command-item kbd {
    padding: 2px 5px;
    border: 1px solid #d0d5dd;
    border-radius: 5px;
    background: #f8fafc;
    color: #667085;
    font-size: 9px;
}

.bee-chat-command-feedback {
    padding: 8px 10px;
    border-radius: 8px;
    background: #f5f8fc;
    color: #475467;
    font-size: 11px;
}

.bee-chat-command-feedback.success {
    background: #ecfdf3;
    color: #067647;
}

.bee-chat-command-feedback.error {
    background: #fff1f0;
    color: #b42318;
}


/* ===== Core 1.7.9 · UI Contexte Chat Intranet ===== */

.bee-chat-thread-view {
    position: relative;
}

.bee-chat-context-bar[hidden],
.bee-chat-context-sheet[hidden],
.bee-chat-context-furnace-results[hidden] {
    display: none !important;
}

.bee-chat-context-bar {
    display: grid;
    grid-template-columns:
        minmax(0,1fr)
        34px;
    gap: 6px;
    align-items: center;
    padding: 6px 10px;
    border-top: 1px solid rgba(120,130,145,.14);
    background: #f8fafc;
}

.bee-chat-context-current {
    min-width: 0;
    display: grid;
    grid-template-columns:
        30px
        minmax(0,1fr);
    gap: 8px;
    align-items: center;
    padding: 5px 7px;
    border: 0;
    border-radius: 10px;
    background: rgba(37,99,235,.08);
    color: #1d4ed8;
    text-align: left;
}

.bee-chat-context-current > i {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(37,99,235,.12);
}

.bee-chat-context-current > span {
    min-width: 0;
    display: grid;
}

.bee-chat-context-current strong,
.bee-chat-context-current small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bee-chat-context-current strong {
    font-size: 11px;
}

.bee-chat-context-current small {
    color: #667085;
    font-size: 9px;
}

.bee-chat-context-end {
    width: 34px !important;
    height: 34px !important;
    display: grid !important;
    place-items: center;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: #667085 !important;
}

.bee-chat-context-tool.active {
    background: rgba(37,99,235,.12) !important;
    color: #2563eb !important;
}

.bee-chat-context-sheet {
    position: absolute;
    z-index: 40;
    inset:
        64px
        0
        0
        0;
    display: grid;
    grid-template-rows:
        auto
        minmax(0,1fr);
    background: rgba(255,255,255,.99);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.bee-chat-context-sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border-bottom: 1px solid #e4e7ec;
}

.bee-chat-context-sheet-head > div {
    display: grid;
    gap: 2px;
}

.bee-chat-context-sheet-head strong {
    font-size: 13px;
}

.bee-chat-context-sheet-head small {
    color: #667085;
    font-size: 10px;
}

.bee-chat-context-sheet-head > button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: #f2f4f7;
    color: #475467;
}

.bee-chat-context-sheet-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 11px;
}

.bee-chat-context-none {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    background: #f8fafc;
    color: #667085;
    font-size: 10px;
}

.bee-chat-context-active-card {
    display: grid;
    grid-template-columns:
        38px
        minmax(0,1fr)
        auto;
    gap: 9px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid rgba(37,99,235,.16);
    border-radius: 12px;
    background: rgba(37,99,235,.06);
}

.bee-chat-context-active-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(37,99,235,.12);
    color: #2563eb;
}

.bee-chat-context-active-card > div {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.bee-chat-context-active-card small {
    color: #667085;
    font-size: 9px;
}

.bee-chat-context-active-card strong,
.bee-chat-context-active-card span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bee-chat-context-active-card strong {
    font-size: 12px;
}

.bee-chat-context-active-card span {
    color: #667085;
    font-size: 10px;
}

.bee-chat-context-active-card > button {
    min-width: 42px;
    height: 38px;
    padding: 0 9px;
    border: 0;
    border-radius: 9px;
    background: #fff;
    color: #b42318;
    font-size: 10px;
}

.bee-chat-context-auto-card {
    display: grid;
    grid-template-columns:
        22px
        minmax(0,1fr);
    gap: 8px;
    align-items: start;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #f8fafc;
}

.bee-chat-context-auto-card.enabled {
    border-color: rgba(22,130,76,.18);
    background: rgba(22,130,76,.05);
}

.bee-chat-context-auto-card > span {
    display: grid;
    gap: 2px;
}

.bee-chat-context-auto-card strong {
    font-size: 11px;
}

.bee-chat-context-auto-card small {
    color: #667085;
    font-size: 9px;
}

.bee-chat-context-manual {
    display: grid;
    gap: 9px;
}

.bee-chat-context-section-title {
    display: grid;
    grid-template-columns:
        30px
        minmax(0,1fr);
    gap: 8px;
    align-items: center;
}

.bee-chat-context-section-title > i {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eef4ff;
    color: #2563eb;
}

.bee-chat-context-section-title > span {
    display: grid;
}

.bee-chat-context-section-title strong {
    font-size: 11px;
}

.bee-chat-context-section-title small {
    color: #667085;
    font-size: 9px;
}

.bee-chat-context-manual > label {
    display: grid;
    gap: 4px;
}

.bee-chat-context-manual > label > span {
    color: #667085;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.bee-chat-context-manual input,
.bee-chat-context-manual select {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    padding: 7px 9px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    outline: none;
}

.bee-chat-context-manual input:focus,
.bee-chat-context-manual select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.09);
}

.bee-chat-context-furnace-results {
    display: grid;
    gap: 3px;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
}

.bee-chat-context-furnace-results button {
    width: 100%;
    display: grid;
    grid-template-columns:
        30px
        minmax(0,1fr);
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #27313b;
    text-align: left;
}

.bee-chat-context-furnace-results button:hover {
    background: #f5f8fc;
}

.bee-chat-context-furnace-results button > i {
    color: #667085;
}

.bee-chat-context-furnace-results button > span {
    min-width: 0;
    display: grid;
}

.bee-chat-context-furnace-results strong,
.bee-chat-context-furnace-results small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bee-chat-context-furnace-results strong {
    font-size: 11px;
}

.bee-chat-context-furnace-results small {
    color: #667085;
    font-size: 9px;
}

.bee-chat-context-search-loading,
.bee-chat-context-search-empty {
    padding: 10px;
    color: #667085;
    font-size: 10px;
    text-align: center;
}

.bee-chat-context-new-topic {
    display: grid;
    grid-template-columns:
        minmax(0,1fr)
        auto;
    gap: 6px;
}

.bee-chat-context-new-topic button,
.bee-chat-context-activate {
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    padding: 7px 10px;
}

.bee-chat-context-new-topic button {
    background: #f2f4f7;
    color: #344054;
}

.bee-chat-context-activate {
    background: #2563eb;
    color: #fff;
    font-weight: 700;
}

.bee-chat-context-help {
    display: grid;
    gap: 4px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eef1f4;
    color: #667085;
    font-size: 9px;
}

.bee-chat-context-loading,
.bee-chat-context-error {
    min-height: 140px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    text-align: center;
}

.bee-chat-context-error {
    min-height: auto;
    padding: 10px;
    border-radius: 10px;
    background: #fff1f0;
    color: #b42318;
}

.bee-chat-message-context {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    margin-bottom: 5px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(37,99,235,.09);
    color: #1d4ed8;
    font-size: 9px;
    font-weight: 800;
}

.bee-chat-message-context span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 520px) {
    .bee-chat-compose {
        grid-template-columns:
            auto
            minmax(72px,1fr)
            40px !important;
    }

    .bee-chat-compose .bee-chat-tool {
        width: 28px !important;
        flex-basis: 28px !important;
    }

    .bee-chat-compose-tools {
        gap: 0 !important;
    }
}


/* ===== Core 1.7.9 · UX contexte ===== */

.bee-chat-thread-head {
    min-width: 0;
}

.bee-chat-thread-copy {
    min-width: 0;
    display: grid;
}

.bee-chat-thread-context-button {
    margin-left: auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
    color: #475467;
    font-size: 10px;
    font-weight: 700;
}

.bee-chat-thread-context-button:hover,
.bee-chat-thread-context-button.active {
    border-color: rgba(37,99,235,.22);
    background: rgba(37,99,235,.08);
    color: #1d4ed8;
}

.bee-chat-context-mode-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 7px;
    margin-bottom: 12px;
}

.bee-chat-context-mode-card {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: 18px 30px minmax(0,1fr);
    gap: 6px;
    align-items: center;
    min-height: 62px;
    padding: 8px;
    border: 1px solid #e4e7ec;
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
}

.bee-chat-context-mode-card.selected {
    border-color: rgba(37,99,235,.30);
    background: rgba(37,99,235,.06);
}

.bee-chat-context-mode-card > input {
    margin: 0;
}

.bee-chat-context-mode-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f2f4f7;
    color: #667085;
}

.bee-chat-context-mode-icon.auto {
    background: #edf8f2;
    color: #117848;
}

.bee-chat-context-mode-icon.manual {
    background: #eef4ff;
    color: #2563eb;
}

.bee-chat-context-mode-card > span:last-child {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.bee-chat-context-mode-card strong {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bee-chat-context-mode-card small {
    display: -webkit-box;
    overflow: hidden;
    color: #667085;
    font-size: 8px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.bee-chat-context-auto-info {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr);
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    padding: 9px;
    border: 1px solid rgba(22,130,76,.16);
    border-radius: 11px;
    background: rgba(22,130,76,.05);
}

.bee-chat-context-auto-info > i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #fff0c7;
    color: #8a5800;
}

.bee-chat-context-auto-info > span {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.bee-chat-context-auto-info strong {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bee-chat-context-auto-info small {
    color: #667085;
    font-size: 9px;
}

.bee-chat-context-topic-results {
    display: grid;
    gap: 3px;
    max-height: 190px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
}

.bee-chat-context-topic-results[hidden] {
    display: none !important;
}

.bee-chat-context-topic-results button {
    width: 100%;
    min-height: 36px;
    display: grid;
    grid-template-columns: 28px minmax(0,1fr);
    gap: 7px;
    align-items: center;
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #344054;
    text-align: left;
}

.bee-chat-context-topic-results button:hover {
    background: #f5f8fc;
}

.bee-chat-context-topic-results button > i {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f2f4f7;
}

.bee-chat-context-topic-create {
    color: #1d4ed8 !important;
    font-weight: 700;
}

.bee-chat-context-manual label em {
    color: #98a2b3;
    font-size: 8px;
    font-style: normal;
    font-weight: 500;
    text-transform: none;
}

@media (max-width: 620px) {
    .bee-chat-thread-context-button {
        width: 34px;
        min-width: 34px;
        padding: 0;
        justify-content: center;
    }

    .bee-chat-thread-context-button > span {
        display: none;
    }

    .bee-chat-context-mode-grid {
        grid-template-columns: 1fr;
    }

    .bee-chat-context-mode-card {
        min-height: 52px;
    }
}

/* Core 1.8.4 — Desktop wallpaper shared under lateral chrome */
body.bee-desktop-active:has(#fespHomepage) .intra-sidebar {
    background-color: rgba(29, 35, 45, .95) !important;
    background-image: linear-gradient(rgba(29, 35, 45, .95), rgba(29, 35, 45, .95)), var(--fesp-home-shared-image, none) !important;
    background-position: center center !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}
body.bee-desktop-active:has(#fespHomepage) .bee-chat-panel {
    background-color: rgba(255, 255, 255, .95) !important;
    background-image: linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, .95)), var(--fesp-home-shared-image, none) !important;
    background-position: center center !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}
body.bee-desktop-active:has(#fespHomepage) .bee-chat-panel .bee-chat-toolbar,
body.bee-desktop-active:has(#fespHomepage) .bee-chat-panel .bee-chat-head {
    background: transparent !important;
}


/* Core 1.8.4 · Notification channels */
.bee-notification-center-actions{display:flex;align-items:center;justify-content:flex-end;gap:.15rem;flex-wrap:wrap}
.bee-notification-channel-toggle{display:inline-flex;align-items:center;gap:.3rem;color:var(--bs-secondary-color)}
.bee-notification-channel-toggle.active{color:var(--bs-primary);background:color-mix(in srgb,var(--bs-primary) 10%,transparent)}
.bee-notification-channel-toggle.is-denied{color:var(--bs-danger)}
.bee-notification-channel-toggle i{width:1rem;text-align:center}
@media(max-width:520px){.bee-notification-center-toolbar{align-items:flex-start;flex-direction:column}.bee-notification-center-actions{width:100%;justify-content:flex-start}}

/* Core 1.8.5 : accueil LAN sans session */
body:has(#fespHomepage[data-auth="0"]) {margin:0!important;padding:0!important;width:100%!important;height:100vh!important;overflow:auto!important;background:#111827!important;}
body:has(#fespHomepage[data-auth="0"]) .intra-shell {display:block!important;margin:0!important;padding:0!important;width:100%!important;height:100vh!important;min-height:100vh!important;overflow:visible!important;background:transparent!important;}
body:has(#fespHomepage[data-auth="0"]) .intra-sidebar,
body:has(#fespHomepage[data-auth="0"]) .sidebar-fixed-actions,
body:has(#fespHomepage[data-auth="0"]) .bee-chat-panel,
body:has(#fespHomepage[data-auth="0"]) .bee-chat-backdrop,
body:has(#fespHomepage[data-auth="0"]) .fesp-collab-launcher,
body:has(#fespHomepage[data-auth="0"]) .bee-desktop,
body:has(#fespHomepage[data-auth="0"]) .intra-page-title {display:none!important;}
body:has(#fespHomepage[data-auth="0"]) #intra-content,
body:has(#fespHomepage[data-auth="0"]) .intra-page-content,
body:has(#fespHomepage[data-auth="0"]) .intra-content {position:relative!important;display:block!important;inset:auto!important;max-width:none!important;width:100%!important;height:auto!important;min-height:100vh!important;margin:0!important;padding:0!important;border:0!important;overflow:visible!important;background:transparent!important;}
body:has(#fespHomepage[data-auth="0"]) #fespHomepage {min-height:100vh!important;width:100%!important;margin:0!important;border:0!important;border-radius:0!important;overflow:hidden!important;}
