/* ==========================================================
   CAP PILOT — Custom styles on top of Bootstrap 5
   DA inspirée de la carte de visite : palette champagne / noir
   profond / fond crème, motifs hexagonaux line-art.
   ========================================================== */

/* Thèmes alternatifs (opt-in via classe sur <body>) */
@import "themes/cap-noir-gSoout2.css";

:root {
    --cap-sidebar-w: 256px;
    --cap-topbar-h: 64px;
    --cap-primary: #1a1a1a;
    --cap-primary-rgb: 26, 26, 26;
    --cap-primary-dark: #000000;
    --cap-accent: #eab98a;
    --cap-accent-rgb: 234, 185, 138;
    --cap-accent-dark: #d4a574;
    --cap-accent-soft: #f5dcc0;
    --cap-bg: #fafaf7;
    --cap-card-border: #ece9e0;
    --cap-text-secondary: #6b7280;
}

/* ── Bootstrap variable overrides ── */
[data-bs-theme="light"], :root {
    --bs-primary: var(--cap-primary);
    --bs-primary-rgb: var(--cap-primary-rgb);
    --bs-link-color: var(--cap-primary);
    --bs-link-hover-color: var(--cap-primary-dark);
    --bs-body-bg: var(--cap-bg);
    --bs-body-color: #1a1a1a;
    --bs-body-font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --bs-body-font-size: 0.875rem;
    --bs-border-color: var(--cap-card-border);
    --bs-border-radius: 0.625rem;
}

body { -webkit-font-smoothing: antialiased; }

.btn-primary {
    --bs-btn-bg: var(--cap-primary);
    --bs-btn-border-color: var(--cap-primary);
    --bs-btn-hover-bg: var(--cap-primary-dark);
    --bs-btn-hover-border-color: var(--cap-primary-dark);
    --bs-btn-active-bg: var(--cap-primary-dark);
    --bs-btn-active-border-color: var(--cap-primary-dark);
    --bs-btn-disabled-bg: var(--cap-primary);
    --bs-btn-disabled-border-color: var(--cap-primary);
}

.text-primary { color: var(--cap-primary) !important; }

/* ==========================================================
   LAYOUT — Wrapper, Sidebar, Main, Topbar
   ========================================================== */

.cap-wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.cap-sidebar {
    width: var(--cap-sidebar-w);
    position: fixed;
    inset: 0 auto 0 0;
    background: linear-gradient(180deg, var(--cap-primary) 0%, var(--cap-primary-dark) 100%);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1030;
    box-shadow: 4px 0 12px rgba(0,0,0,.04);
}

.cap-sidebar .sidebar-brand {
    padding: 20px 20px 18px;
    display: flex; align-items: center; gap: 12px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}
.cap-sidebar .sidebar-brand {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 18px 18px 16px;
}
.cap-sidebar .sidebar-brand-logo {
    display: block;
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}
.cap-sidebar .sidebar-brand-tag {
    color: var(--cap-accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    text-align: center;
    padding-top: 4px;
    border-top: 1px solid rgba(234,185,138,0.18);
}

/* Legacy / fallback (compact brand) — kept for safety */
.cap-sidebar .brand-mark {
    width: 42px; height: 42px;
    color: var(--cap-accent);
    flex-shrink: 0;
}
.cap-sidebar .brand-mark svg { width: 100%; height: 100%; display: block; }
.cap-sidebar .brand-name {
    color: #fff;
    font-size: 14px; font-weight: 800; line-height: 1.15;
    letter-spacing: 0.6px;
}
.cap-sidebar .brand-sub {
    color: var(--cap-accent);
    font-size: 9.5px; font-weight: 700; letter-spacing: 1.6px;
    text-transform: uppercase;
}

.cap-sidebar .nav-section-label {
    padding: 18px 22px 6px;
    font-size: 10.5px; font-weight: 700;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: rgba(255,255,255,.32);
}

.cap-sidebar .nav-link {
    display: flex; align-items: center; gap: 12px;
    margin: 1px 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: rgba(255,255,255,.7);
    font-size: 13.5px; font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s;
    position: relative;
}
.cap-sidebar .nav-link i {
    font-size: 17px;
    width: 20px;
    text-align: center;
    line-height: 1;
}
.cap-sidebar .nav-link:hover {
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.95);
}
.cap-sidebar .nav-link.active {
    background: rgba(255,255,255,.13);
    color: #fff;
    font-weight: 600;
}
.cap-sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: -10px; top: 22%; bottom: 22%;
    width: 3px;
    background: var(--cap-accent);
    border-radius: 0 3px 3px 0;
}
.cap-sidebar .nav-link .badge-mini {
    margin-left: auto;
    background: rgba(var(--cap-accent-rgb), .85);
    color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    line-height: 1.2;
}

.cap-sidebar .sidebar-user {
    margin-top: auto;
    padding: 14px 12px;
    border-top: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}
.cap-sidebar .user-link {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s;
}
.cap-sidebar .user-link:hover { background: rgba(255,255,255,.07); }
.cap-sidebar .user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cap-accent) 0%, var(--cap-accent-dark) 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 12.5px;
    flex-shrink: 0;
}
.cap-sidebar .user-name { color: #fff; font-size: 13px; font-weight: 600; line-height: 1.2; }
.cap-sidebar .user-meta { color: rgba(255,255,255,.45); font-size: 11px; line-height: 1.3; }

/* ── Main ── */
.cap-main {
    margin-left: var(--cap-sidebar-w);
    flex: 1;
    display: flex; flex-direction: column;
    min-height: 100vh;
}

/* ── Topbar ── */
.cap-topbar {
    height: var(--cap-topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--cap-card-border);
    box-shadow: none;
    position: sticky; top: 0; z-index: 1020;
    display: flex; align-items: center;
    padding: 0 28px; gap: 14px;
    flex-shrink: 0;
    /* Signature DA : motif hexagonal champagne en filigrane à l'extrême droite */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 64' fill='none'%3E%3Cpolygon points='170,8 188,18 188,46 170,56 152,46 152,18' stroke='%23eab98a' stroke-width='1.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right -20px center;
    background-size: 200px 64px;
}
.cap-topbar .page-title {
    font-size: 17px; font-weight: 700;
    margin: 0; flex: 1;
    color: #1a1a1a;
    padding-left: 12px;
    border-left: 2px solid var(--cap-accent);
}
.cap-topbar .topbar-search {
    position: relative;
    width: 280px;
    max-width: 100%;
}
.cap-topbar .topbar-search i {
    position: absolute;
    top: 50%; left: 12px;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
}
.cap-topbar .topbar-search input {
    height: 36px;
    padding-left: 34px;
    background: #f9fafb;
    border-color: #e5e7eb;
    font-size: 13px;
}
.cap-topbar .topbar-search input:focus {
    background: #fff;
    border-color: var(--cap-primary);
    box-shadow: 0 0 0 3px rgba(var(--cap-primary-rgb), .1);
}

.cap-topbar .topbar-icon-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: #4b5563;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, border-color .15s;
    position: relative;
    cursor: pointer;
    font-size: 16px;
}
.cap-topbar .topbar-icon-btn:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}
.cap-topbar .topbar-icon-btn .dot-notif {
    position: absolute;
    top: 7px; right: 7px;
    width: 8px; height: 8px;
    background: #dc3545;
    border: 2px solid #fff;
    border-radius: 50%;
}

.topbar-avatar-circle {
    width: 34px; height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cap-primary) 0%, var(--cap-primary-dark) 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 12px;
    border: 0;
    padding: 0;
}

/* Chip utilisateur en haut à droite : avatar + nom + rôle. Pour l'admin,
   c'est le déclencheur du menu de bascule en mode démo (audit Julien
   2026-07-16). Remplace l'ancien badge « ADMINISTRATEUR » criard. */
.topbar-user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 3px 8px 3px 3px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    max-width: 220px;
}
.topbar-user-chip:hover,
.topbar-user-chip[aria-expanded="true"] {
    background: #f3f4f6;
    border-color: #e5e7eb;
}
.topbar-user-chip--static { cursor: default; }
.topbar-user-chip--static:hover { background: transparent; border-color: transparent; }
.topbar-user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    min-width: 0;
    text-align: left;
}
.topbar-user-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #1f2937;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar-user-role {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.topbar-user-role::before {
    content: "";
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #9ca3af;
}
.topbar-user-role[data-role="admin"]::before  { background: var(--cap-primary); }
.topbar-user-role[data-role="collab"]::before { background: #10b981; }
.topbar-user-role[data-role="client"]::before { background: #f59e0b; }
.topbar-user-caret {
    font-size: 10px;
    color: #9ca3af;
    transition: transform .15s;
}
.topbar-user-chip[aria-expanded="true"] .topbar-user-caret { transform: rotate(180deg); }

/* Sur écran étroit : on ne garde que l'avatar pour ne pas encombrer. */
@media (max-width: 1100px) {
    .topbar-user-meta, .topbar-user-caret { display: none; }
    .topbar-user-chip { max-width: none; padding: 3px; gap: 0; }
}

/* ── Page content ── */
.page { padding: 28px; }

/* ==========================================================
   CARDS & KPI
   ========================================================== */

.card {
    border: 1px solid var(--cap-card-border);
    border-radius: 12px;
    box-shadow: none;
    background: #ffffff;
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--cap-card-border);
    padding: 18px 24px;
}
.card-body { padding: 22px 24px; }

.section-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    color: #1a1a1a;
    letter-spacing: -0.1px;
}
.section-sub { font-size: 12.5px; color: var(--cap-text-secondary); margin: 2px 0 0; }

/* Page heading (h2.fw-bold dans les vues) */
.cap-wrapper h2.fw-bold,
.cap-page-title {
    font-size: 28px !important;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* ==========================================================
   SIGNATURE DA — barre verticale champagne + motifs hexagonaux
   (DA carte de visite Julien 2026-05-27)
   ========================================================== */

/* Barre verticale champagne — séparateur de bloc info (style carte de visite) */
.cap-accent-bar {
    border-left: 2px solid var(--cap-accent);
    padding-left: 16px;
}
.cap-accent-bar-faded {
    border-left: 2px solid rgba(var(--cap-accent-rgb), 0.4);
    padding-left: 16px;
}

/* Motifs hexagonaux décoratifs en line-art champagne
   Usage : <div class="cap-hex-deco cap-hex-deco-top-right"></div> dans un container relative */
.cap-hex-deco {
    position: absolute;
    width: 140px;
    height: 140px;
    pointer-events: none;
    opacity: 0.55;
    background-repeat: no-repeat;
    background-size: contain;
}
.cap-hex-deco-top-right {
    top: -22px;
    right: -22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 140' fill='none'%3E%3Cpolygon points='100,10 130,30 130,72 100,92 70,72 70,30' stroke='%23eab98a' stroke-width='1.4'/%3E%3Cpath d='M 70 30 L 70 72' stroke='%23eab98a' stroke-width='1.4'/%3E%3C/svg%3E");
}
.cap-hex-deco-bottom-right {
    bottom: -22px;
    right: -22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 140' fill='none'%3E%3Cpolygon points='100,48 130,68 130,110 100,130 70,110 70,68' stroke='%23eab98a' stroke-width='1.4'/%3E%3C/svg%3E");
}

/* Wrapper relatif pour pouvoir poser le motif décoratif */
.cap-page-with-deco { position: relative; overflow: hidden; }

/* ==========================================================
   OUTILS / SIMULATEURS — onglets + grilles + résultats
   ========================================================== */

.outils-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--cap-card-border);
}
.outils-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    color: var(--cap-text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.outils-tab i { font-size: 14px; }
.outils-tab:hover { color: var(--cap-primary); }
.outils-tab.is-active {
    color: var(--cap-primary);
    border-bottom-color: var(--cap-accent);
}

/* Saisie d'un simulateur — grille à 2 colonnes responsive */
.sim-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 18px;
}
@media (max-width: 640px) { .sim-grid { grid-template-columns: 1fr; } }
.sim-field { display: flex; flex-direction: column; gap: 4px; }
.sim-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--cap-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.sim-input-wrap {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--cap-card-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color .15s;
}
.sim-input-wrap:focus-within {
    border-color: var(--cap-accent);
    box-shadow: 0 0 0 3px rgba(var(--cap-accent-rgb), .15);
}
.sim-input-wrap input {
    flex: 1;
    border: 0;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cap-primary);
    background: transparent;
    min-width: 0;
    outline: none;
}
.sim-input-wrap input[type=text] { font-weight: 500; }
.sim-unit {
    padding: 9px 12px;
    font-size: 12px;
    color: var(--cap-text-secondary);
    background: #fafaf7;
    border-left: 1px solid var(--cap-card-border);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.sim-derived {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--cap-accent-soft);
    border-left: 3px solid var(--cap-accent);
    border-radius: 0 8px 8px 0;
    font-size: 13px;
}
.sim-derived span { color: var(--cap-text-secondary); font-weight: 600; }
.sim-derived strong { color: var(--cap-primary); font-size: 15px; font-weight: 800; }
.sim-derived small { font-size: 11px; }

/* Carte résultats à droite */
.sim-result-card { border: 1px solid var(--cap-card-border); }
.sim-result-hero {
    text-align: center;
    padding: 4px 0 6px;
}
.sim-result-hero .sim-result-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--cap-accent-dark);
    margin-bottom: 8px;
}
.sim-result-hero .sim-result-value {
    display: block;
    font-size: 38px;
    font-weight: 800;
    color: var(--cap-primary);
    line-height: 1;
    letter-spacing: -1px;
}
.sim-result-hero .sim-result-sub {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--cap-text-secondary);
}
.sim-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 13px;
}
.sim-result-row span { color: var(--cap-text-secondary); }
.sim-result-row strong { color: var(--cap-primary); font-weight: 700; }

.sim-result-table tbody td { font-size: 13px; padding: 7px 10px; }
.sim-result-table tbody tr.table-active td { background: var(--cap-accent-soft); }
.sim-result-table tbody tr.table-active td strong { color: var(--cap-primary); }

/* Historique repliable — bouton header style cardheader + chevron pivotant */
.renta-history-toggle {
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}
.renta-history-toggle:hover { background: #fafaf7; }
.renta-history-toggle:focus { outline: none; box-shadow: none; }
.renta-history-chevron {
    transition: transform .22s ease;
    color: var(--cap-text-secondary);
    font-size: 14px;
}
.renta-history-toggle[aria-expanded="true"] .renta-history-chevron {
    transform: rotate(180deg);
}

/* KPI cards */
.kpi-card {
    border-top: 3px solid var(--cap-accent);
    transition: transform .15s, box-shadow .15s;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.kpi-card .kpi-icon {
    width: 44px; height: 44px;
    border-radius: 11px;
    background: rgba(var(--cap-accent-rgb), .12);
    color: var(--cap-accent-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.kpi-card .kpi-label {
    font-size: 11.5px; font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6b7280;
}
.kpi-card .kpi-value {
    font-size: 28px; font-weight: 800;
    color: #111827;
    line-height: 1.1;
    margin: 6px 0 8px;
}
.kpi-card .kpi-trend {
    font-size: 11.5px; font-weight: 600;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
}
.kpi-card .kpi-trend.up   { background: #d1fae5; color: #065f46; }
.kpi-card .kpi-trend.down { background: #fee2e2; color: #991b1b; }
.kpi-card .kpi-trend.neu  { background: #f3f4f6; color: #4b5563; }

/* ==========================================================
   PILIERS
   ========================================================== */
.pilier-row {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #f3f4f6;
}
.pilier-row:last-child { border-bottom: none; }
.pilier-score {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 12.5px;
    flex-shrink: 0;
}
.pilier-name  { font-size: 13px; font-weight: 600; color: #111827; }

/* ==========================================================
   TABLE
   ========================================================== */
.table { margin: 0; }
.table > :not(caption) > * > * { padding: 13px 22px; }
.table thead th {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
.table tbody td { font-size: 13.5px; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }

/* ==========================================================
   LOGIN
   ========================================================== */
.login-page { min-height: 100vh; display: flex; }

.login-left {
    background: linear-gradient(160deg, var(--cap-primary) 0%, var(--cap-primary-dark) 100%);
    position: relative;
    overflow: hidden;
    flex-direction: column;
    justify-content: center;
    padding: 56px;
}
.login-left::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(var(--cap-accent-rgb), .18) 0%, transparent 55%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, .12) 0%, transparent 55%);
    pointer-events: none;
}
.login-left .login-content {
    position: relative; z-index: 1;
    max-width: 460px; margin: 0 auto;
}
.login-brand-logo {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    margin-bottom: 28px;
    filter: drop-shadow(0 0 24px rgba(var(--cap-accent-rgb), .25));
}
.login-welcome {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--cap-accent);
    margin-bottom: 14px;
}
.login-headline {
    color: #fff;
    font-size: 27px; font-weight: 800;
    line-height: 1.25;
    margin-bottom: 12px;
    /* « Donnez une trajectoire claire » doit tenir sur une seule ligne
       (le saut de ligne voulu est le <br> avant « à votre entreprise »). */
    white-space: nowrap;
}
.login-headline em {
    color: var(--cap-accent);
    font-style: normal;
}
.login-desc {
    color: rgba(255,255,255,.6);
    font-size: 14px; line-height: 1.65;
    margin-bottom: 24px;
    text-align: justify;
}
/* « Cap Pilot » reprend exactement la couleur de « trajectoire claire »
   (.login-headline em) : accent par défaut, primary en thème noir. */
.login-brand-accent {
    color: var(--cap-accent);
    font-weight: 700;
    font-style: normal;
}
.login-tagline {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
}
.login-tagline li {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    padding-left: 22px;
    position: relative;
}
.login-tagline li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.65em;
    width: 12px; height: 2px;
    background: var(--cap-accent);
    border-radius: 2px;
}

.feature-item {
    display: flex; align-items: center; gap: 12px;
    color: rgba(255,255,255,.78);
    font-size: 13.5px;
    margin-bottom: 14px;
}
.feature-item:last-child { margin-bottom: 0; }
.feature-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,.07);
    display: flex; align-items: center; justify-content: center;
    color: var(--cap-accent);
    font-size: 17px;
    flex-shrink: 0;
}

.login-right {
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    padding: 48px 40px;
}
.login-right .login-form-wrap { width: 100%; max-width: 420px; }
.login-form-wrap h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; color: #111827; }

.demo-account-btn {
    display: flex; align-items: center; gap: 12px;
    width: 100%; text-align: left;
    padding: 11px 14px;
    margin-bottom: 8px;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .1s;
    font-family: inherit;
}
.demo-account-btn:last-child { margin-bottom: 0; }
.demo-account-btn:hover {
    background: #eff6ff;
    border-color: var(--cap-primary);
}
.demo-account-btn:active { transform: scale(.99); }

.demo-icon {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}
.demo-icon.admin  { background: linear-gradient(135deg, var(--cap-primary), #404040); }
.demo-icon.collab { background: linear-gradient(135deg, #198754, #20c997); }
.demo-icon.client { background: linear-gradient(135deg, #fd7e14, #ffc107); }

.demo-role { font-size: 13px; font-weight: 700; color: #111827; line-height: 1.2; }
.demo-mail { font-size: 11.5px; color: #6b7280; line-height: 1.3; margin-top: 1px; }

/* ==========================================================
   SELECTS — style global CAP
   ========================================================== */
.form-select {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    color: #1f2937;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231e3a5f' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 32px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    transition: border-color .15s, box-shadow .15s, background-color .15s;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
.form-select:not(:disabled):hover {
    border-color: #9ca3af;
    background-color: #fafbfc;
}
.form-select:focus {
    border-color: var(--cap-primary);
    box-shadow: 0 0 0 3px rgba(var(--cap-primary-rgb), .10);
    background-color: #fff;
    outline: none;
}
.form-select:disabled {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}
.form-select-sm {
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 12.5px;
    border-radius: 8px;
}

/* ==========================================================
   PAGES D'ERREUR (404 / 403 / 500)
   ========================================================== */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 80%, rgba(var(--cap-accent-rgb), .07) 0%, transparent 55%),
        radial-gradient(circle at 80% 20%, rgba(var(--cap-primary-rgb), .07) 0%, transparent 55%),
        var(--cap-bg);
}
.error-card {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    padding: 48px 40px;
    text-align: center;
}
.error-mark {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--cap-primary), var(--cap-primary-dark));
    color: #fff;
    font-size: 32px;
    margin: 0 auto 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(var(--cap-primary-rgb), .25);
}
.error-code {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--cap-accent);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.error-title {
    font-size: 26px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 12px;
    line-height: 1.2;
}
.error-desc {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 28px;
}
.error-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================
   EMPTY STATES
   ========================================================== */
.cap-empty {
    text-align: center;
    padding: 48px 24px;
    color: #6b7280;
}
.cap-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(var(--cap-primary-rgb), .08), rgba(var(--cap-primary-rgb), .03));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--cap-primary);
    font-size: 30px;
    margin-bottom: 16px;
}
.cap-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 6px;
}
.cap-empty-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.55;
    max-width: 380px;
    margin: 0 auto 16px;
}

/* ==========================================================
   RESPONSIVE
   ==========================================================
   Audit Julien 2026-07-16 : « même visu quel que soit le zoom tant
   qu'on est sur PC ». Le zoom navigateur réduit la largeur effective
   du viewport et déclenchait la vue mobile (sidebar escamotée, layout
   remanié). Le mode mobile est donc réservé aux écrans TACTILES
   (pointer: coarse) ; sur desktop, le layout garde sa forme et scrolle
   horizontalement si le zoom est très fort. */
@media (max-width: 991.98px) and (pointer: coarse) {
    .cap-sidebar { transform: translateX(-100%); transition: transform .25s; }
    .cap-sidebar.show { transform: translateX(0); }
    .cap-main { margin-left: 0; }
}
@media (max-width: 991.98px) {
    .login-left { display: none !important; }
    .cap-topbar .topbar-search { display: none; }
}
@media (pointer: fine) {
    /* Largeur plancher du layout desktop : au-delà, scroll horizontal
       plutôt que réorganisation des blocs. Le burger mobile n'a pas de
       raison d'apparaître sur PC. */
    body { min-width: 1240px; }
    .cap-topbar > .topbar-icon-btn.d-lg-none { display: none !important; }
}

/* ==========================================================
   TOM SELECT — design CAP
   ========================================================== */

/* Le contrôle principal (état fermé) — affiche l'item sélectionné + chevron */
.ts-wrapper.single .ts-control,
.ts-wrapper.multi .ts-control {
    min-height: 38px !important;
    padding: 7px 36px 7px 14px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 14px !important;
    color: #1f2937 !important;
    font-size: 13.5px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.04) !important;
    transition: border-color .15s, box-shadow .15s, background-color .15s !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 4px;
    cursor: pointer;
}

.ts-wrapper.single .ts-control > .item {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ts-wrapper.single .ts-control:hover,
.ts-wrapper.multi .ts-control:hover {
    border-color: #9ca3af !important;
    background-color: #fafbfc !important;
}
.ts-wrapper.focus .ts-control,
.ts-wrapper.dropdown-active .ts-control {
    border-color: var(--cap-primary) !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 3px rgba(var(--cap-primary-rgb), .12) !important;
}
/* Chevron qui pivote quand le dropdown est ouvert (effet caret) */
.ts-wrapper.dropdown-active .ts-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231e3a5f' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='m2 11 6-6 6 6'/%3e%3c/svg%3e") !important;
}

.ts-wrapper.single .ts-control .item {
    color: #1f2937 !important;
}

/* Panel dropdown */
.ts-dropdown {
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #1f2937 !important;
    box-shadow: 0 16px 40px -8px rgba(15, 23, 42, .18),
                0 2px 4px rgba(15, 23, 42, .04) !important;
    margin-top: 6px !important;
    overflow: hidden !important;
    z-index: 2000 !important;
    /* Largeur adaptée à l'option la plus longue (sinon Tom Select copie
       la largeur du contrôle, qui est plus étroite que les libellés). */
    min-width: max-content !important;
    max-width: min(420px, 95vw) !important;
    /* léger fade-in à l'ouverture */
    animation: tsDropdownIn .12s ease-out;
}
@keyframes tsDropdownIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Searchbox au sommet du dropdown (plugin dropdown_input) */
.ts-dropdown .dropdown-input-wrap {
    padding: 10px 10px 8px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    background: #fafbfc !important;
}
.ts-dropdown .dropdown-input {
    width: 100% !important;
    padding: 8px 12px 8px 36px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 7px !important;
    font-size: 13px !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='M11 11l3 3m-2-7a5 5 0 1 1-10 0 5 5 0 0 1 10 0z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: 11px center !important;
    background-size: 14px !important;
    color: #1f2937 !important;
    transition: border-color .15s, box-shadow .15s !important;
    outline: none !important;
}
.ts-dropdown .dropdown-input::placeholder { color: #9ca3af !important; }
.ts-dropdown .dropdown-input:focus {
    border-color: var(--cap-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--cap-primary-rgb), .12) !important;
}

/* Liste d'options */
.ts-dropdown .ts-dropdown-content {
    background: #fff !important;
    color: #1f2937 !important;
    padding: 4px !important;
    max-height: 260px !important;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
.ts-dropdown .option {
    padding: 9px 12px !important;
    margin: 1px 0 !important;
    color: #1f2937 !important;
    background: transparent !important;
    font-size: 13.5px !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: background .1s, color .1s;
}
.ts-dropdown .option.active,
.ts-dropdown .option:hover {
    background: rgba(var(--cap-primary-rgb), .08) !important;
    color: var(--cap-primary) !important;
}
.ts-dropdown .option.selected {
    background: rgba(var(--cap-primary-rgb), .14) !important;
    color: var(--cap-primary) !important;
    font-weight: 600 !important;
}
.ts-dropdown .option.selected.active {
    background: rgba(var(--cap-primary-rgb), .22) !important;
}
.ts-dropdown .no-results {
    padding: 14px !important;
    color: #6b7280 !important;
    background: transparent !important;
    font-style: italic;
    font-size: 13px !important;
    text-align: center;
}
.ts-dropdown .ts-dropdown-content::-webkit-scrollbar { width: 8px; }
.ts-dropdown .ts-dropdown-content::-webkit-scrollbar-track { background: transparent; }
.ts-dropdown .ts-dropdown-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}
.ts-dropdown .ts-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Multi : pills cuivre */
.ts-wrapper.multi .ts-control > .item {
    background: rgba(var(--cap-primary-rgb), .12) !important;
    color: var(--cap-primary) !important;
    border: 1px solid rgba(var(--cap-primary-rgb), .30) !important;
    border-radius: 999px !important;
    padding: 2px 8px 2px 12px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
}
.ts-wrapper.multi .ts-control > .item.active {
    background: var(--cap-primary) !important;
    color: #fff !important;
    border-color: var(--cap-primary) !important;
}

/* ==========================================================
   AUDIT — panel d'historique d'activité
   ========================================================== */

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

/* Hero */
.audit-hero {
    background: linear-gradient(135deg,
        rgba(var(--cap-primary-rgb), .08),
        rgba(var(--cap-primary-rgb), .02));
    border: 1px solid rgba(var(--cap-primary-rgb), .18);
    border-radius: 16px;
    padding: 22px 26px;
}
.audit-hero-body { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.audit-hero-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cap-primary), var(--cap-primary-dark));
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 8px 22px rgba(var(--cap-primary-rgb), .30);
}
.audit-hero-text { flex: 1 1 auto; min-width: 0; }
.audit-hero-title { font-size: 22px; font-weight: 800; color: #111827; margin: 0 0 4px; line-height: 1.2; }
.audit-hero-sub   { font-size: 13.5px; color: #6b7280; margin: 0; }
.audit-hero-stat {
    text-align: right;
    padding: 6px 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    flex-shrink: 0;
}
.audit-hero-stat-num { font-size: 24px; font-weight: 800; color: var(--cap-primary); line-height: 1.1; }
.audit-hero-stat-lbl { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: .6px; }

/* Filtres : searchbox prominente + ligne de dropdowns natifs */
.audit-filters {
    display: flex; flex-direction: column; gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

/* Searchbox */
.audit-search {
    position: relative;
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.audit-search:focus-within {
    background: #fff;
    border-color: var(--cap-primary);
    box-shadow: 0 0 0 3px rgba(var(--cap-primary-rgb), .12);
}
.audit-search-icon {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    font-size: 16px;
    pointer-events: none;
}
.audit-search-input {
    flex: 1 1 auto;
    background: transparent;
    border: 0;
    padding: 11px 14px 11px 42px;
    font-size: 14px;
    color: #111827;
    outline: 0;
}
.audit-search-input::placeholder { color: #9ca3af; }
.audit-search-go {
    margin-right: 6px;
    padding: 7px 14px;
    background: var(--cap-primary);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    flex-shrink: 0;
}
.audit-search-go:hover { background: var(--cap-primary-dark); }
.audit-search-go:active { transform: scale(.98); }

/* Ligne de dropdowns natifs sous la searchbox */
.audit-filter-row {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
}
.audit-filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* Largeur dictée par le contenu (le plus long label de l'option), avec
       un plancher juste assez pour rester lisible et un plafond pour ne pas
       qu'un libellé monstrueux casse la barre de filtres. */
    min-width: 0;
    width: auto;
    max-width: 280px;
}
/* Tom Select : par défaut Bootstrap pose width:100% sur .form-select →
   on force auto pour que la pillule s'aligne sur le contenu. */
.audit-filter .ts-wrapper,
.audit-filter .ts-wrapper.form-select {
    width: auto;
    min-width: max-content;
    display: inline-flex;
    flex-direction: column;
}
.audit-filter input[type="date"] { width: 140px; }
.audit-filter-label {
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
    color: #6b7280;
    margin: 0;
}
.audit-filter-reset { align-self: center; min-width: 0; padding-bottom: 2px; }

/* Timeline */
.audit-timeline { display: flex; flex-direction: column; gap: 24px; }

.audit-day-head {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e5e7eb;
}
.audit-day-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--cap-primary);
    box-shadow: 0 0 0 4px rgba(var(--cap-primary-rgb), .15);
    flex-shrink: 0;
}
.audit-day-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    text-transform: capitalize;
}
.audit-day-count {
    margin-left: auto;
    font-size: 11px; font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 9px;
    border-radius: 999px;
}

.audit-day-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 6px;
    display: flex; flex-direction: column; gap: 4px;
    position: relative;
}
.audit-day-list::before {
    content: '';
    position: absolute;
    left: 17px; top: 8px; bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg,
        rgba(var(--cap-primary-rgb), .35) 0%,
        rgba(var(--cap-primary-rgb), .08) 100%);
}

.audit-item {
    display: flex; gap: 14px;
    padding: 12px 14px 12px 0;
    border-radius: 10px;
    transition: background .15s;
    position: relative;
    z-index: 1;
}
.audit-item:hover { background: #fafbfc; }

.audit-item-marker { flex-shrink: 0; padding-top: 2px; }
.audit-item-marker-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 0 0 4px #fff,
                0 2px 6px rgba(0,0,0,.10);
}
.audit-act-info    { background: #3b82f6; }
.audit-act-success { background: #10b981; }
.audit-act-warning { background: #f59e0b; }
.audit-act-danger  { background: #ef4444; }
.audit-act-soft    { background: #9ca3af; }

.audit-item-body { flex: 1 1 auto; min-width: 0; }

.audit-item-head {
    display: flex; flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    line-height: 1.45;
}
.audit-item-actor {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px;
    color: #111827;
    flex-shrink: 0;
}
.audit-actor-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cap-primary), var(--cap-primary-dark));
    color: #fff;
    font-size: 10px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    text-transform: uppercase;
    flex-shrink: 0;
}
.audit-item-msg { font-size: 13.5px; color: #1f2937; flex: 1 1 auto; min-width: 0; }
.audit-item-time {
    font-size: 11.5px;
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    margin-left: auto;
}

.audit-item-meta {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 6px;
}
.audit-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
}
.audit-tag-link { background: rgba(var(--cap-primary-rgb), .10); color: var(--cap-primary-dark); }
.audit-tag-link:hover { background: rgba(var(--cap-primary-rgb), .18); color: var(--cap-primary-dark); }
.audit-tag-soft  { background: transparent; border-color: #e5e7eb; }

.audit-diff-toggle {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.audit-diff-toggle:hover { background: #f3f4f6; color: #111827; border-color: #d1d5db; }
.audit-diff-toggle.is-open { background: rgba(var(--cap-primary-rgb), .12); color: var(--cap-primary-dark); border-color: rgba(var(--cap-primary-rgb), .35); }
.audit-diff-toggle.is-open .bi-arrows-angle-expand::before { content: "\F12B"; /* bi-arrows-angle-contract */ }

.audit-diff {
    margin-top: 10px;
    background: #fafbfc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}
.audit-diff-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}
.audit-diff-table th {
    text-align: left;
    padding: 6px 12px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-bottom: 1px solid #e5e7eb;
}
.audit-diff-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
    color: #1f2937;
    word-break: break-word;
}
.audit-diff-table td code {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 11px;
    color: #6b7280;
}
.audit-diff-old { color: #b91c1c; text-decoration: line-through; text-decoration-thickness: 1px; }
.audit-diff-new { color: #047857; font-weight: 500; }
.audit-diff-table tr:last-child td { border-bottom: none; }

/* Sévérité — accent à gauche de l'item */
.audit-item.severity-critical { background: rgba(239, 68, 68, .04); border-left: 3px solid #ef4444; padding-left: 11px; }
.audit-item.severity-warning  { border-left: 3px solid #f59e0b; padding-left: 11px; }
.audit-item.severity-success  { border-left: 3px solid #10b981; padding-left: 11px; }

/* Pagination */
.audit-pagination {
    display: flex; align-items: center; gap: 14px;
    justify-content: center;
    padding: 14px;
    margin-top: 4px;
}
.audit-pagination-info {
    font-size: 12.5px;
    color: #6b7280;
    font-weight: 500;
}

/* ==========================================================
   ANALYSE DE GESTION — table TDB
   ========================================================== */
.tdb-scroll {
    max-height: 560px;
    overflow-y: auto;
    overflow-x: hidden;
}
.tdb-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    table-layout: fixed;
    font-size: 11px !important;
}
.tdb-table thead th,
.tdb-table tbody td {
    padding: 4px 2px !important;
}
.tdb-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f3f5f9;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 6px 6px;
    border-bottom: 2px solid #e5e7eb;
}
.tdb-table tbody td {
    padding: 4px 4px;
    border-bottom: 1px solid #f3f4f6;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.tdb-poste {
    background: #fff;
    width: 22%;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tdb-table thead .tdb-poste {
    background: #f3f5f9;
}
.tdb-compte {
    background: #fff;
    width: 3.5%;
    font-size: 10px;
    color: #9ca3af;
}
.tdb-table thead .tdb-compte {
    background: #f3f5f9;
}
.tdb-total {
    background: #fafbfc;
    font-weight: 600;
    width: 6%;
}
.tdb-total.tdb-obj {
    background: #fff8e6;
    color: #b07700;
    font-weight: 500;
    width: 5%;
}
.tdb-total.tdb-n1 {
    color: #6b7280;
    font-weight: 500;
    width: 5%;
}
.tdb-table thead .tdb-total {
    z-index: 4;
    background: #eef0f4;
}
.tdb-table thead .tdb-total.tdb-obj {
    background: #fff3d6;
    color: #8a5f00;
}
.tdb-input.tdb-input-obj:hover, .tdb-input.tdb-input-obj:focus {
    background: #fff8e6;
    border-color: var(--cap-accent);
}
/* Bouton actif "Réalisé/Prévisionnel" reste cohérent avec la charte */
.tdb-mode-switch .btn { padding: 4px 12px; font-size: 12px; font-weight: 600; }
tr.tdb-calc td {
    background: #f9fafb;
    color: #4b5563;
}
tr.tdb-calc .tdb-poste { background: #f9fafb; }
/* Lignes SIG majeures plus marquées (audit Julien 2026-07-16) : fond plus
   soutenu, liserés haut/bas, graisse renforcée y compris sur cumul/obj/N-1. */
tr.tdb-hero td {
    background: rgba(30,58,95,0.10) !important;
    color: var(--cap-primary);
    font-weight: 600;
    border-top: 1px solid rgba(30,58,95,0.22);
    border-bottom: 1px solid rgba(30,58,95,0.22);
}
tr.tdb-hero .tdb-poste { background: rgba(30,58,95,0.10) !important; }
tr.tdb-hero td.tdb-total { font-weight: 700; }
/* Séparation nette entre les 12 mois et le bloc de synthèse Cumul/Obj/N-1. */
.tdb-table th.tdb-total-first,
.tdb-table td.tdb-total-first { border-left: 2px solid #d8dee6; }
/* Colonne du mois courant subtilement surlignée. */
.tdb-table th.tdb-mois-courant,
.tdb-table td.tdb-mois-courant { background: rgba(240,165,0,0.07); }
tr.tdb-hero td.tdb-mois-courant { background: rgba(240,165,0,0.16) !important; }
tr.tdb-saisi:hover td { background: rgba(240,165,0,0.05); }
tr.tdb-saisi:hover .tdb-poste { background: rgba(240,165,0,0.05); }
.tdb-input {
    width: 100%;
    min-width: 0;
    font-size: 10.5px;
    padding: 2px 3px;
    border-color: transparent;
    background: transparent;
    text-align: center;
}
.tdb-input:hover, .tdb-input:focus {
    background: #fff;
    border-color: #d1d5db;
}
.tdb-input::-webkit-outer-spin-button,
.tdb-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.tdb-input[type=number] { -moz-appearance: textfield; }

/* Bouton « recopier jusqu'à décembre » d'une cellule (TDB + suivi des
   charges, audit Julien 2026-07-16). Position absolue dans .tdb-cell pour
   ne pas élargir la colonne ; visible au survol/focus de la cellule. */
.tdb-cell {
    position: relative;
}
.tdb-copy-right {
    display: none;
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #6b7280;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.tdb-cell:hover .tdb-copy-right,
.tdb-cell:focus-within .tdb-copy-right {
    display: inline-flex;
}
.tdb-copy-right:hover {
    background: var(--cap-accent, #f0a500);
    border-color: var(--cap-accent, #f0a500);
    color: #fff;
}

/* ==========================================================
   Inline assign-picker (overflow-safe, with search)
   ========================================================== */
.assign-picker-menu {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.06);
    z-index: 2000;
    overflow: hidden;
}
.assign-picker-search {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid #f3f4f6;
    background: #fafbfc;
}
.assign-picker-search > .bi-search {
    color: #9ca3af;
    font-size: 13px;
}
.assign-picker-search input {
    border: none;
    box-shadow: none !important;
    background: transparent;
    padding: 4px 0;
    font-size: 12.5px;
}
.assign-picker-search input:focus {
    border: none;
    outline: none;
}
.assign-picker-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 280px;
    overflow-y: auto;
}
.assign-picker-list li {
    margin: 0;
}
.assign-picker-item {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 12px;
    background: transparent;
    border: 0;
    text-align: left;
    font-size: 12.5px;
    cursor: pointer;
    color: #1f2937;
}
.assign-picker-item:hover,
.assign-picker-item:focus {
    background: rgba(30, 58, 95, 0.06);
    outline: none;
}
.assign-picker-item-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.assign-picker-item-meta {
    color: #9ca3af;
    font-size: 10.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Bouton trigger qui mime un <select> Bootstrap */
.consultant-trigger {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #1f2937;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    text-align: left;
    min-width: 180px;
    box-shadow: none;
}
.consultant-trigger:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}
.consultant-trigger.is-empty span {
    font-style: italic;
}
.assign-picker-item.is-active {
    background: rgba(25, 135, 84, 0.08);
    font-weight: 600;
}

/* ==========================================================
   Admin forms (création / édition client & collaborateur)
   ========================================================== */
.admin-form .form-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 4px;
}
.admin-form .form-control,
.admin-form .form-select {
    font-size: 13.5px;
    padding: 8px 12px;
    border-color: #e5e7eb;
    border-radius: 8px;
}
.admin-form .form-control:focus,
.admin-form .form-select:focus {
    border-color: var(--cap-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.10);
}
.admin-form .input-group-text {
    border-color: #e5e7eb;
    color: #9ca3af;
    font-size: 13px;
}
.admin-form .input-group:focus-within .input-group-text {
    color: var(--cap-primary);
    border-color: var(--cap-primary);
}
.admin-form .form-text {
    font-size: 11.5px;
    color: #9ca3af;
    margin-top: 4px;
}
.admin-form .invalid-feedback {
    font-size: 11.5px;
    /* Bootstrap masque .invalid-feedback à l'intérieur d'un input-group ;
       le forcer affiché (Symfony ne rend ce div qu'en cas d'erreur). */
    display: block;
    color: #dc3545;
}
.admin-form .form-control.is-invalid,
.admin-form .form-select.is-invalid {
    border-color: #dc3545;
}
.admin-form .input-group:has(.is-invalid) .input-group-text {
    border-color: #dc3545;
    color: #dc3545;
}

.admin-form-card {
    border: 1px solid #eef0f4;
}
.admin-form-card .card-header {
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
    padding: 16px 20px;
}
.admin-form-card .card-body {
    padding: 20px;
}

.form-section-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cap-primary), #404040);
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
}
.form-section-icon.collab {
    background: linear-gradient(135deg, #198754, #28a745);
}

.admin-form-side {
    border: 1px solid #eef0f4;
    background: #fafbfc;
}
.admin-form-side .card-body {
    padding: 18px 20px;
}
.admin-side-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12.5px;
    color: #4b5563;
}
.admin-side-list li {
    position: relative;
    padding: 6px 0 6px 18px;
    line-height: 1.5;
}
.admin-side-list li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: var(--cap-accent);
    font-weight: 700;
}
.admin-meta {
    margin: 0;
    font-size: 12px;
}
.admin-meta dt {
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10.5px;
    letter-spacing: .4px;
    margin-bottom: 2px;
}
.admin-meta dd {
    color: #1f2937;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.admin-form-actions {
    position: sticky;
    bottom: 0;
    margin-top: 24px;
    padding: 14px 20px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.04);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    z-index: 5;
}

/* Toggle "Saisie client" (liste admin/clients) */
.tdb-edit-switch {
    display: inline-flex;
    cursor: pointer;
    margin: 0;
    user-select: none;
}
.tdb-edit-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.tdb-edit-switch-slider {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 92px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    transition: all .15s;
}
.tdb-edit-switch-slider::after {
    content: "Verrouillé";
}
.tdb-edit-switch:hover .tdb-edit-switch-slider {
    border-color: #9ca3af;
}
.tdb-edit-switch input:checked + .tdb-edit-switch-slider {
    background: rgba(240,165,0,.12);
    color: var(--cap-accent-dark);
    border-color: rgba(240,165,0,.45);
}
.tdb-edit-switch input:checked + .tdb-edit-switch-slider::after {
    content: "Autorisée";
}
.tdb-edit-switch input:focus-visible + .tdb-edit-switch-slider {
    box-shadow: 0 0 0 3px rgba(var(--cap-primary-rgb), .12);
}

/* Toggle de permission (form Entreprise) */
.permission-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin: 0;
    background: #fafbfc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: background .15s, border-color .15s;
}
.permission-toggle:hover {
    background: #fff;
    border-color: #9ca3af;
}
.permission-toggle:has(input:checked) {
    background: rgba(240,165,0,0.08);
    border-color: var(--cap-accent);
}
.permission-toggle .form-check-input {
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}
.permission-toggle-body {
    flex: 1;
    min-width: 0;
}
.permission-toggle-title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 6px;
}
.permission-toggle-help {
    font-size: 11.5px;
    color: #6b7280;
    margin-top: 4px;
    line-height: 1.45;
}

/* Grid de checkboxes des piliers actifs (form Entreprise) */
.piliers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
.pilier-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.15s;
    cursor: pointer;
}
.pilier-checkbox:hover {
    background: #fff;
    border-color: var(--cap-primary);
}
.pilier-checkbox:has(input:checked) {
    background: rgba(240,165,0,0.10);
    border-color: var(--cap-accent);
}
.pilier-checkbox {
    margin: 0;
    user-select: none;
}
.pilier-checkbox .pilier-checkbox-label {
    font-size: 12.5px;
    font-weight: 500;
    color: #1f2937;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.3;
}
.pilier-checkbox input[type=checkbox] {
    flex-shrink: 0;
    cursor: pointer;
}

.pilier-row.pilier-inactif {
    opacity: 0.55;
}
.pilier-row.pilier-inactif .pilier-score {
    background: #d1d5db !important;
    color: #6b7280;
}
.pilier-row.pilier-inactif .pilier-name {
    color: #9ca3af;
    font-style: italic;
}

/* ==========================================================
   Synthèse maturité — liste cliquable des piliers
   ========================================================== */
.maturite-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.maturite-list li {
    margin: 0;
    padding: 0;
}
.maturite-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 0;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #f3f4f6;
    border-left: 3px solid transparent;
    text-align: left;
    cursor: pointer;
    outline: none;
    transition: background .15s, border-color .15s;
    box-sizing: border-box;
}
.maturite-list li:last-child .maturite-item { border-bottom: 0; }
.maturite-item:hover { background: #fafbfc; }
.maturite-item:focus { outline: none; }
.maturite-item:focus-visible {
    background: #f3f5f9;
    border-left-color: var(--cap-primary);
}
.maturite-item.is-selected {
    background: rgba(30, 58, 95, 0.06);
    border-left-color: var(--cap-primary);
}
.maturite-item.is-inactif { opacity: 0.55; }
.maturite-item.is-inactif .maturite-name { color: #9ca3af; font-style: italic; }

.maturite-score {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 12.5px;
    flex-shrink: 0;
}
.maturite-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.maturite-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.maturite-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.maturite-tag {
    background: #f3f4f6;
    color: #6b7280;
    font-size: 9.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 2px 7px;
    border-radius: 999px;
    flex-shrink: 0;
}
.maturite-bar {
    display: block;
    height: 4px;
    width: 100%;
    background: #f3f4f6;
    border-radius: 2px;
    overflow: hidden;
}
.maturite-bar-fill {
    display: block;
    height: 100%;
    border-radius: 2px;
    transition: width .25s;
}

/* Détail axes du pilier sélectionné — radar + légende lettrée */
.axe-radar-wrap {
    height: 360px;
    padding: 4px;
}
/* Légende du radar « maturité par pilier » — refonte Lot 6 phase D audit Julien.
   Le radar à gauche affiche des mots-clés (axes), la légende à droite donne le
   détail : mot-clé en titre, libellé complet en sous-texte, score + barre. */
.axe-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.axe-legend-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 0;
}
.axe-letter {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 11.5px;
    font-family: 'Inter', system-ui, sans-serif;
    box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 2px rgba(255,255,255,.85);
}
.axe-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.axe-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.axe-short {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cap-primary);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}
.axe-pct {
    font-size: 12.5px;
    font-weight: 700;
    flex-shrink: 0;
}
.axe-bar {
    display: block;
    height: 4px;
    width: 100%;
    background: #f3f4f6;
    border-radius: 2px;
    overflow: hidden;
}
.axe-bar-fill {
    display: block;
    height: 100%;
    border-radius: 2px;
    transition: width .25s;
}
.axe-libelle {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.35;
    /* Pleine largeur, 2 lignes max avec ellipsis si débordement (truc CSS clamp). */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.axe-empty .axe-short   { color: #9ca3af; font-style: italic; }
.axe-empty .axe-libelle { color: #9ca3af; }
.axe-empty .axe-pct     { color: #9ca3af; }

/* ==========================================================
   FEUILLE DE ROUTE
   ========================================================== */
.fdr-scroll {
    max-height: 75vh;
    overflow: auto;
}
.fdr-table {
    font-size: 12.5px;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}
.fdr-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f3f5f9;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 10px 10px;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}
.fdr-table tbody td {
    padding: 10px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

/* Couleur identitaire par pilier (audit Julien 2026-07-16) : la variable
   --fdr-pc est posée en inline-style sur chaque ligne ; la ligne pilier
   la porte en soutenu, l'objectif et les actions en déclinaison claire.
   Fallback champagne pour les lignes sans variable. */
.fdr-pilier-head td {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--fdr-pc, var(--cap-accent-dark)) 30%, transparent),
        color-mix(in srgb, var(--fdr-pc, var(--cap-accent-dark)) 9%, transparent));
    color: color-mix(in srgb, var(--fdr-pc, var(--cap-primary)) 82%, #1f2937);
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    padding: 22px 18px !important;
    border-top: 4px solid var(--fdr-pc, var(--cap-accent-dark));
    text-transform: none;
}
.fdr-pilier-head td strong { font-weight: 800; }
.fdr-pilier-head td > span:first-child { font-size: 28px; margin-right: 12px !important; vertical-align: -2px; }
.fdr-objectif-head td {
    background: color-mix(in srgb, var(--fdr-pc, #9ca3af) 10%, transparent);
    padding: 8px 12px !important;
    border-bottom: 1px solid #e5e7eb;
}
.fdr-objectif-head td:first-child {
    border-left: 4px solid var(--fdr-pc, transparent);
}
.fdr-objectif-label {
    color: #1f2937;
    font-weight: 600;
    font-size: 12.5px;
}
.fdr-action-row td:first-child {
    border-left: 4px solid color-mix(in srgb, var(--fdr-pc, transparent) 30%, transparent);
}

.fdr-col-pilier   { width: 70px; padding-left: 16px !important; }
.fdr-col-action   { min-width: 220px; }
.fdr-col-who      { width: 185px; }
.fdr-col-deadline { width: 185px; }
.fdr-col-status   { width: 115px; }
.fdr-col-progress { width: 165px; }
.fdr-col-comment  { width: 220px; }
.fdr-col-actions  { width: 50px; }

/* Colonne commentaire : dernier message en extrait + bouton popup. */
.fdr-comment-excerpt {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fdr-comment-btn {
    font-size: 12px;
    text-decoration: none;
}

/* Pilote/Superviseur et Butoir/Finale : deux colonnes côte à côte,
   libellé au-dessus de la valeur (audit Julien 2026-06-17). */
.fdr-pair { display: flex; gap: 10px; }
.fdr-pair-col { flex: 1 1 0; min-width: 0; }
.fdr-pair-val {
    font-size: 12.5px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fdr-action-icon {
    color: var(--cap-primary);
    font-size: 18px;
    line-height: 1;
}
/* Anciennement .fdr-action-id (numéro #N) — gardé pour compat éventuelle. */
.fdr-action-id {
    color: #9ca3af;
    font-size: 10.5px;
}
.fdr-libelle {
    color: #1f2937;
    font-weight: 500;
    line-height: 1.35;
}
.fdr-conversation-toggle {
    font-size: 11px;
    color: #6b7280;
    text-decoration: none;
    padding: 2px 0;
}
.fdr-conversation-toggle:hover { color: var(--cap-primary); }
.fdr-conversation-row > td { background: #f7f9fc; padding: 14px 18px !important; }
.fdr-conversation { max-width: 720px; }
.fdr-conversation-empty { padding: 8px 0; }
.fdr-message {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 12.5px;
    line-height: 1.45;
    max-width: 85%;
}
.fdr-message-mine { margin-left: auto; background: #eef2fb; border-color: #d6e0f2; }
.fdr-message-meta { font-size: 10.5px; color: #6b7280; margin-bottom: 3px; }
.fdr-message-meta strong { color: var(--cap-primary); }
.fdr-message-body { color: #1f2937; }
.fdr-conversation-form textarea { font-size: 12.5px; }
.fdr-input {
    font-size: 11.5px;
    padding: 4px 8px;
    height: auto;
}
.fdr-mini-label {
    font-size: 9.5px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .3px;
    margin: 0 0 1px 0;
    display: block;
    line-height: 1;
}

.fdr-status-select {
    font-size: 11.5px;
    padding: 4px 28px 4px 8px;
    font-weight: 600;
    height: auto;
    border-radius: 6px;
    min-width: 110px;
}
.fdr-status-badge { font-size: 11.5px; padding: 5px 11px; font-weight: 700; letter-spacing: 0.02em; }

/* Badges (vue lecture seule) — couleurs pleines saturées, fini les pastels
   (audit Julien 2026-05-26). */
.fdr-status-badge.fdr-status-a_faire  { background: #6b7280; color: #ffffff; border: 1px solid #4b5563; }
.fdr-status-badge.fdr-status-en_cours { background: #0d6efd; color: #ffffff; border: 1px solid #0a58ca; }
.fdr-status-badge.fdr-status-standby  { background: #d97706; color: #ffffff; border: 1px solid #b45309;
                                         box-shadow: 0 0 0 2px rgba(217,119,6,0.22); }
.fdr-status-badge.fdr-status-termine  { background: #198754; color: #ffffff; border: 1px solid #146c43; }

/* Selects (vue éditable) — couleur visible mais le texte des options
   reste lisible quand on déroule le menu. */
.fdr-status-select.fdr-status-a_faire  { background: #f3f4f6; color: #1f2937; border-color: #9ca3af; }
.fdr-status-select.fdr-status-en_cours { background: #cfe2ff; color: #0a3d80; border-color: #0d6efd; font-weight: 700; }
.fdr-status-select.fdr-status-standby  { background: #fde68a; color: #78350f; border-color: #d97706; font-weight: 700;
                                         box-shadow: 0 0 0 2px rgba(217,119,6,0.20); }
.fdr-status-select.fdr-status-termine  { background: #d1fae5; color: #065f46; border-color: #198754; font-weight: 700; }

/* Standby = signal fort sur la ligne (audit Julien 2026-05-26) */
tr.fdr-action-row:has(.fdr-status-standby) { background: rgba(217,119,6,0.05); }
tr.fdr-action-row:has(.fdr-status-standby) td:first-child {
    box-shadow: inset 4px 0 0 #d97706;
}

.fdr-action-row.fdr-done .fdr-libelle {
    text-decoration: line-through;
    color: #9ca3af;
}
.fdr-overdue td { background: rgba(220,53,69,0.04); }

.fdr-avancement-value {
    font-size: 11px;
    font-weight: 700;
    color: #4b5563;
    min-width: 36px;
    text-align: right;
}
.fdr-range { height: 6px; padding: 0; }

/* ============================================================
   DIAGNOSTIC — saisie questionnaire CAP
   ============================================================ */

.diag-wrapper {
    padding-bottom: 90px; /* place pour le footer sticky */
}

/* Section thème (en-tête + bloc de questions) */
.diag-section { margin-bottom: 32px; scroll-margin-top: 80px; }
.diag-section-head {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--theme-color) 12%, #fff) 0%,
        color-mix(in srgb, var(--theme-color) 4%, #fff) 100%);
    border-left: 4px solid var(--theme-color);
    border-radius: 10px;
    margin-bottom: 14px;
}
.diag-section-icon {
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--theme-color); color: #fff;
    border-radius: 10px;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--theme-color) 35%, transparent);
}
.diag-section-text { flex: 1 1 auto; min-width: 0; }
.diag-section-title { font-size: 17px; font-weight: 700; margin: 0 0 2px; color: #111827; }
.diag-section-sub { font-size: 12.5px; color: #6b7280; margin: 0; }
.diag-section-progress { width: 120px; flex-shrink: 0; }
.diag-section-bar {
    height: 6px; border-radius: 999px;
    background: rgba(255,255,255,0.6);
    overflow: hidden;
}
.diag-section-bar-fill {
    height: 100%; background: var(--theme-color);
    transition: width 250ms ease;
}

/* Liste des questions */
.diag-questions { display: flex; flex-direction: column; gap: 14px; }
.diag-question {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px 20px;
    transition: box-shadow 150ms ease, border-color 150ms ease;
}
.diag-question:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.04); }
.diag-question.is-answered { border-color: #d1fae5; background: #f7fffb; }

.diag-question-head {
    display: flex; align-items: flex-start; gap: 12px;
    margin-bottom: 14px;
}
.diag-question-num {
    width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f3f4f6; color: #6b7280;
    border-radius: 50%;
    font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}
.diag-question.is-answered .diag-question-num { background: #10b981; color: #fff; }
.diag-question-title { flex: 1 1 auto; font-size: 15px; font-weight: 600; color: #111827; margin: 4px 0 0; line-height: 1.4; }

.diag-score-pill {
    flex-shrink: 0;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px; font-weight: 600;
    margin-top: 2px;
}
.diag-score-pill.lvl-1 { background: #fee2e2; color: #b91c1c; }
.diag-score-pill.lvl-2 { background: #ffedd5; color: #c2410c; }
.diag-score-pill.lvl-3 { background: #fef3c7; color: #a16207; }
.diag-score-pill.lvl-4 { background: #d1fae5; color: #047857; }

/* Choix de réponse */
.diag-choices { display: flex; flex-direction: column; gap: 8px; }
.diag-choice {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    color: #1f2937;
    text-align: left;
    cursor: pointer;
    transition: transform 100ms ease, border-color 120ms ease, background 120ms ease;
    width: 100%;
}
.diag-choice:hover:not(:disabled) { transform: translateY(-1px); border-color: #9ca3af; }
.diag-choice:disabled { cursor: default; opacity: 0.7; }

.diag-choice-score {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-weight: 700; font-size: 14px;
    flex-shrink: 0;
    transition: background 120ms ease, color 120ms ease;
}
.diag-choice.lvl-1 .diag-choice-score { background: #fee2e2; color: #b91c1c; }
.diag-choice.lvl-2 .diag-choice-score { background: #ffedd5; color: #c2410c; }
.diag-choice.lvl-3 .diag-choice-score { background: #fef3c7; color: #a16207; }
.diag-choice.lvl-4 .diag-choice-score { background: #d1fae5; color: #047857; }

.diag-choice-text { flex: 1 1 auto; font-size: 14px; line-height: 1.4; }
.diag-choice-check { font-size: 18px; flex-shrink: 0; }

.diag-choice.is-selected { color: #fff; }
.diag-choice.is-selected.lvl-1 { background: #ef4444; border-color: #dc2626; }
.diag-choice.is-selected.lvl-2 { background: #f97316; border-color: #ea580c; }
.diag-choice.is-selected.lvl-3 { background: #f59e0b; border-color: #d97706; }
.diag-choice.is-selected.lvl-4 { background: #10b981; border-color: #059669; }
.diag-choice.is-selected .diag-choice-score { background: rgba(255,255,255,0.25); color: #fff; }
.diag-choice.is-selected .diag-choice-check { color: #fff; }

/* Vue client (Lot 5 audit Julien 2026-05-12) : neutralise scores et couleurs
   pour ne pas orienter les réponses du dirigeant. */
.diag-wrapper.is-client-view .diag-choice { background: #fff; border-color: #d1d5db; }
.diag-wrapper.is-client-view .diag-choice:hover:not(:disabled) { border-color: #6b7280; background: #f9fafb; }
.diag-wrapper.is-client-view .diag-choice.is-selected {
    background: var(--cap-primary);
    border-color: var(--cap-primary);
    color: #fff;
}
.diag-wrapper.is-client-view .diag-choice.is-selected .diag-choice-check { color: #fff; }
.diag-score-pill.diag-score-pill-neutral { background: #e0e7ef; color: var(--cap-primary); }

/* Remarque par question (Lot 5) — discrète, sous chaque article. */
.diag-question-remarque { margin-top: 10px; display: flex; align-items: flex-start; gap: 8px; }
.diag-question-remarque-label {
    flex-shrink: 0; font-size: 11px; color: #6b7280;
    padding-top: 6px; min-width: 70px;
}
.diag-question-remarque-input { font-size: 12.5px; background: #fafbfc; }
.diag-question-remarque-input:focus { background: #fff; }

/* Remarque libre */
.diag-remarque {
    margin-top: 22px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    border-radius: 14px;
}
.diag-remarque-head {
    display: flex; align-items: flex-start; gap: 12px;
    margin-bottom: 12px;
}
.diag-remarque-head > i {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f59e0b; color: #fff;
    border-radius: 10px;
    font-size: 16px;
    flex-shrink: 0;
}
.diag-remarque-head h4 { margin: 4px 0 2px; font-size: 15px; font-weight: 700; color: #92400e; }
.diag-remarque-head p  { margin: 0; font-size: 12.5px; color: #92400e; opacity: 0.85; }
.diag-remarque-input {
    background: #fff;
    border: 1px solid #fde68a;
    font-size: 13.5px;
}
.diag-remarque-input:focus { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }

/* Footer sticky */
.diag-footer {
    position: sticky;
    bottom: 0;
    margin: 22px -16px 0;
    padding: 14px 24px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.04);
    display: flex; align-items: center; gap: 18px;
    z-index: 10;
}
.diag-footer-progress { flex: 1 1 auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.diag-footer-numbers { display: flex; flex-direction: column; line-height: 1.1; min-width: 100px; }
.diag-footer-numbers strong { font-size: 18px; color: #111827; }
.diag-footer-numbers span   { font-size: 11.5px; color: #6b7280; }
.diag-footer-bar {
    flex: 1 1 auto;
    height: 8px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
    min-width: 80px;
}
.diag-footer-bar-fill { height: 100%; border-radius: 999px; transition: width 200ms ease; }
.diag-footer-pct { font-weight: 700; font-size: 14px; min-width: 40px; text-align: right; }
.diag-finish-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 13px;
    border-radius: 10px;
}
.diag-finish-btn:disabled { background: #e5e7eb; border-color: #e5e7eb; color: #9ca3af; }

/* ============================================================
   GED — module documentaire
   ============================================================ */

/* Bandeau de stats en haut */
.ged-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}
.ged-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    border-left: 4px solid var(--c);
    transition: transform 120ms ease, box-shadow 120ms ease;
}
.ged-stat:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.05); }
.ged-stat-icon {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--c) 14%, #fff);
    color: var(--c);
    border-radius: 10px;
    font-size: 20px;
    flex-shrink: 0;
}
.ged-stat-num { font-size: 22px; font-weight: 700; color: #111827; line-height: 1.1; }
.ged-stat-lbl { font-size: 12px; color: #6b7280; }

/* Section générique GED */
.ged-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}
.ged-section-head {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
    margin-bottom: 14px;
}

/* Filtres catégorie en pills */
.ged-cat-filter {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.ged-cat-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    color: #4b5563;
    text-decoration: none;
    font-size: 12px;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}
.ged-cat-pill:hover {
    border-color: var(--c, #9ca3af);
    color: var(--c, #1f2937);
}
.ged-cat-pill.is-active {
    background: var(--c, #1f2937);
    border-color: var(--c, #1f2937);
    color: #fff;
}
.ged-cat-pill.is-active:hover { color: #fff; }

/* Pièces attendues : cartes avec liserai gauche coloré */
.ged-pieces { display: flex; flex-direction: column; gap: 10px; }
.ged-piece {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--statut-color);
    border-radius: 10px;
    transition: box-shadow 120ms ease;
}
.ged-piece:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.ged-piece-icon {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--statut-color) 14%, #fff);
    color: var(--statut-color);
    border-radius: 10px;
    font-size: 18px;
    flex-shrink: 0;
}
.ged-piece-body { flex: 1 1 auto; min-width: 0; }
.ged-piece-title { font-weight: 600; font-size: 14.5px; color: #111827; }
.ged-piece-desc { font-size: 12.5px; color: #6b7280; margin-top: 2px; }
.ged-piece-badge {
    color: #fff; font-size: 11px; font-weight: 600;
    padding: 3px 9px; border-radius: 999px;
    flex-shrink: 0;
}
.ged-piece-meta {
    display: flex; flex-wrap: wrap; gap: 14px;
    margin-top: 8px;
    font-size: 12px; color: #6b7280;
}
.ged-piece-meta i { margin-right: 4px; }
.ged-piece-comment {
    margin-top: 8px;
    padding: 6px 10px;
    background: #f9fafb;
    border-left: 2px solid #d1d5db;
    border-radius: 4px;
    font-size: 12.5px;
    color: #4b5563;
}
.ged-piece-actions {
    display: flex; align-items: center; gap: 6px;
    flex-shrink: 0;
}

/* Documents : grille de cartes */
.ged-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.ged-doc {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.ged-doc:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: var(--c);
}
.ged-doc-preview {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--c) 8%, #fff) 0%,
        color-mix(in srgb, var(--c) 15%, #fff) 100%);
    border: none;
    border-bottom: 1px solid #e5e7eb;
    color: var(--c);
    font-size: 56px;
    cursor: pointer;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    transition: background 120ms ease;
}
.ged-doc-preview:hover { background: color-mix(in srgb, var(--c) 22%, #fff); }
.ged-doc-body {
    padding: 12px 14px 8px;
    flex: 1 1 auto;
    display: flex; flex-direction: column; gap: 6px;
}
.ged-doc-name {
    font-weight: 600; font-size: 13.5px; color: #111827;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.ged-doc-meta {
    display: flex; align-items: center; gap: 6px;
    font-size: 11.5px;
    flex-wrap: wrap;
}
.ged-doc-meta i { margin-right: 3px; }
.ged-doc-cat {
    font-weight: 600; color: var(--c);
}
.ged-doc-link {
    margin-top: 4px;
    padding: 3px 8px;
    background: color-mix(in srgb, var(--c) 10%, #fff);
    color: var(--c);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}
.ged-doc-actions {
    display: flex; gap: 4px;
    padding: 8px 12px;
    border-top: 1px solid #f3f4f6;
    background: #fafbfc;
}
.ged-doc-actions .btn { flex: 1; }

/* État vide GED */
.ged-empty {
    text-align: center;
    padding: 48px 20px;
    color: #6b7280;
}
.ged-empty-icon {
    font-size: 56px;
    color: #d1d5db;
    margin-bottom: 12px;
}
.ged-empty-title {
    font-size: 17px; font-weight: 700; color: #374151;
    margin-bottom: 6px;
}
.ged-empty-desc { font-size: 13.5px; }

/* ==============================================================
   RAPPORT — page d'édition (Lot 6 audit Julien 2026-05-12)
   Refonte visuelle : zones de texte clairement distinguées par
   code couleur, bandeau de niveau de maturité par section.
   ============================================================== */
.rapport-section {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04);
    margin-bottom: 28px;
    overflow: hidden;
}
.rapport-section::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 5px; background: #d1d5db;
}
.rapport-section-faible::before    { background: linear-gradient(180deg, #ef4444, #dc2626); }
.rapport-section-partiel::before   { background: linear-gradient(180deg, #f59e0b, #d97706); }
.rapport-section-structure::before { background: linear-gradient(180deg, #0ea5e9, #0284c7); }
.rapport-section-maitrise::before  { background: linear-gradient(180deg, #10b981, #059669); }

.rapport-section-head {
    padding: 18px 22px 14px 28px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}
.rapport-section-title { display: flex; align-items: center; gap: 14px; }
.rapport-section-num {
    flex-shrink: 0;
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--cap-primary); color: #fff;
    border-radius: 50%; font-weight: 700; font-size: 14px;
}
.rapport-section-head h3 { font-size: 16px; font-weight: 700; color: #0f172a; }
.rapport-section-meta {
    display: flex; align-items: center; gap: 10px; margin-top: 2px;
    font-size: 13px; color: #475569;
}
.rapport-section-meta strong { color: var(--cap-primary); font-size: 14px; }

.rapport-section-body { padding: 18px 22px 22px 28px; }

.rapport-fields {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 16px;
}
@media (max-width: 991px) { .rapport-fields { grid-template-columns: 1fr; } }

.rapport-field {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    transition: border-color .15s, box-shadow .15s;
}
.rapport-field:focus-within { box-shadow: 0 0 0 3px rgba(30, 58, 95, .08); }

.rapport-field-ai           { border-top: 3px solid #7c3aed; background: linear-gradient(180deg, #faf7ff 0%, #ffffff 26%); }
.rapport-field-consultant   { border-top: 3px solid #f59e0b; background: linear-gradient(180deg, #fffbeb 0%, #ffffff 26%); }
.rapport-field-predictif    { border-top: 3px solid #2563eb; background: linear-gradient(180deg, #eff6ff 0%, #ffffff 22%); margin-top: 16px; }

.rapport-field-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px;
    font-size: 11.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.6px;
}
.rapport-field-head i { font-size: 14px; }
.rapport-field-ai .rapport-field-head,
.rapport-field-ai .rapport-field-head i        { color: #6d28d9; }
.rapport-field-consultant .rapport-field-head,
.rapport-field-consultant .rapport-field-head i { color: #b45309; }
.rapport-field-predictif .rapport-field-head,
.rapport-field-predictif .rapport-field-head i  { color: #1d4ed8; }
.rapport-field-hint {
    margin-left: auto;
    font-size: 11px; font-weight: 500; text-transform: none;
    letter-spacing: 0; color: #94a3b8; font-style: italic;
}
.rapport-field-tranche {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    background: #dbeafe; color: #1d4ed8; font-size: 10.5px;
    font-weight: 700; letter-spacing: 0.4px;
}

.rapport-section-field {
    font-size: 13px; line-height: 1.55;
    border: 1px solid #e5e7eb;
    background: #fff;
    resize: vertical;
}
.rapport-section-field:focus { border-color: var(--cap-primary); box-shadow: none; }
.rapport-field-ai .rapport-section-field:focus        { border-color: #7c3aed; }
.rapport-field-consultant .rapport-section-field:focus { border-color: #f59e0b; }
.rapport-field-predictif .rapport-section-field:focus  { border-color: #2563eb; }

/* Layout split édition + aperçu PDF live (Lot 6 phase C audit Julien).
   Le rapport est en paysage : on donne ~55% à l'iframe pour que le PDF
   soit lisible (paragraphes, radar) sans devoir scroller horizontalement. */
.rapport-edit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(640px, 55%);
    gap: 22px;
    align-items: start;
}
.rapport-edit-layout--single { grid-template-columns: minmax(0, 1fr); }
.rapport-edit-layout--single .rapport-edit-preview { display: none; }

@media (max-width: 1599px) {
    .rapport-edit-layout { grid-template-columns: minmax(0, 1fr) minmax(560px, 50%); }
}
@media (max-width: 1299px) {
    .rapport-edit-layout { grid-template-columns: minmax(0, 1fr); }
    .rapport-edit-preview { display: none; }
}

.rapport-edit-preview {
    position: sticky; top: 16px;
    height: calc(100vh - 110px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 18px rgba(15, 23, 42, .06);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.rapport-edit-preview-head {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px;
}
.rapport-edit-preview-indicator {
    font-size: 11px; padding: 2px 8px; border-radius: 999px; margin-left: 8px;
}
.rapport-edit-preview-indicator[data-kind="loading"],
.rapport-edit-preview-indicator[data-kind="pending"] {
    background: #fef3c7; color: #92400e;
}
.rapport-edit-preview-indicator[data-kind="ok"] {
    background: #d1fae5; color: #047857;
}
.rapport-edit-preview iframe {
    flex: 1; width: 100%; border: 0; background: #525659;
}

/* Bouton flottant pour réafficher l'aperçu masqué */
.rapport-edit-preview-fab {
    position: fixed; right: 22px; bottom: 22px;
    width: 50px; height: 50px; padding: 0;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(30, 58, 95, .35);
    z-index: 100;
}
.rapport-edit-preview-fab i { font-size: 22px; }

/* Cadres -50% (Lot 6 phase C audit Julien) : sections plus compactes */
.rapport-section { margin-bottom: 16px; }
.rapport-section-head { padding: 12px 18px 10px 24px; }
.rapport-section-body { padding: 12px 18px 16px 24px; }
.rapport-fields { gap: 12px; }
.rapport-field { padding: 10px 12px; }
.rapport-field-predictif { margin-top: 12px; }

/* ==============================================================
   FEUILLE DE ROUTE — conversation sous chaque action (B retenue par Julien 2026-05-12)
   ============================================================== */

.conv-B-row > td {
    background: #f9fafb;
    border-left: 3px solid var(--cap-accent) !important;
    padding: 12px 22px !important;
}
/* Épuré quand il n'y a aucun commentaire : fond neutre, simple liseré discret,
   on n'affiche que le champ de saisie (audit Julien 2026-06-17). */
.conv-B-row--empty > td {
    background: transparent;
    border-left: 3px solid #e5e7eb !important;
    padding: 8px 22px !important;
}
.conv-B-thread { max-width: 800px; }
.conv-B-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 10px;
    color: var(--cap-text-secondary); font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.6px; font-weight: 700;
}
.conv-B-msg {
    display: flex; gap: 10px;
    margin-bottom: 10px;
}
.conv-B-msg.mine { flex-direction: row-reverse; }
.conv-B-avatar {
    flex-shrink: 0; width: 32px; height: 32px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 13px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.conv-B-bubble {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 8px 12px; max-width: 70%; font-size: 12.5px; line-height: 1.45;
}
.conv-B-msg.mine .conv-B-bubble { background: var(--cap-primary); color: #fff; border-color: var(--cap-primary); }
.conv-B-msg.mine .conv-B-bubble strong,
.conv-B-msg.mine .conv-B-bubble span { color: #cbd5e1; }
.conv-B-msg-meta { font-size: 10.5px; color: #64748b; margin-bottom: 3px; }
.conv-B-msg-meta strong { color: var(--cap-primary); }
.conv-B-form {
    display: flex; gap: 6px; align-items: center;
    margin-top: 6px; padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}
/* Formulaire seul (action sans commentaire) : pas de séparateur, compact. */
.conv-B-form--solo { margin-top: 0; padding-top: 0; border-top: none; }
.conv-B-form input[type="text"] { font-size: 12.5px; }

/* ==============================================================
   FICHE CLIENT — passe design (Lot 9 audit Julien 2026-05-12)
   ============================================================== */

/* Label avec icône intégrée — alternative à l'input-group autour des Tom Select */
.admin-field .form-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 600;
    color: #475569; text-transform: uppercase; letter-spacing: 0.4px;
    margin-bottom: 6px;
}
.admin-field .form-label i {
    color: #64748b; font-size: 13.5px; opacity: 0.8;
}

/* Tom Select dans la fiche client : on laisse les styles globaux gérer le
   rendu du contrôle (.ts-control), on ne touche qu'aux optgroups et au toggle.
   Les overrides agressifs créaient des conflits visuels avec le tom-select
   par défaut (border / padding empilés). */

/* Optgroups (catégories du référentiel secteur) */
.ts-dropdown .optgroup-header {
    background: #f1f5f9;
    color: var(--cap-primary);
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 6px 12px;
    border-top: 1px solid #e2e8f0;
}
.ts-dropdown .optgroup-header:first-child { border-top: 0; }
.ts-dropdown .option {
    padding: 7px 16px;
    font-size: 13px;
    color: #1e293b;
}
.ts-dropdown .option.active {
    background: var(--cap-primary);
    color: #fff;
}
.ts-dropdown .option.selected { background: #e0f2fe; color: #0c4a6e; }

/* Toggle « Préciser le secteur » : animation soft au lieu de display:none */
.admin-field-autre {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height .25s ease, opacity .2s ease, transform .25s ease;
    pointer-events: none;
}
.admin-field-autre.is-revealed {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Espacement plus aéré entre champs */
.admin-form-card .card-body { padding: 18px 22px 20px; }
.admin-form-card .form-text { font-size: 11.5px; color: #94a3b8; margin-top: 4px; }

/* ==============================================================
   ANALYSE DE GESTION & OUTILS (Lot 8 audit Julien 2026-05-12)
   ============================================================== */
.ag-tabs .nav-link {
    color: #475569; font-weight: 500; font-size: 13.5px;
    padding: 8px 14px; border-radius: 8px;
}
.ag-tabs .nav-link:hover { background: #f1f5f9; }
.ag-tabs .nav-link.active {
    background: var(--cap-primary); color: #fff;
    box-shadow: 0 2px 6px rgba(30, 58, 95, .15);
}

.ag-kpi {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.ag-kpi-label { font-size: 11.5px; text-transform: uppercase; color: #64748b; letter-spacing: 0.4px; }
.ag-kpi-value { font-size: 22px; font-weight: 700; color: var(--cap-primary); margin: 4px 0 2px; }
.ag-kpi-foot { font-size: 11px; color: #94a3b8; }

.ag-table { font-size: 13px; }
.ag-table thead th {
    background: #f1f5f9; color: var(--cap-primary); font-weight: 700; font-size: 11.5px;
    text-transform: uppercase; letter-spacing: 0.4px; padding: 8px 6px;
    border-bottom: 2px solid #cbd5e1;
}
.ag-table thead th.ag-col-label { text-align: left; padding-left: 14px; }
.ag-table thead th.ag-col-mois { text-align: center; min-width: 70px; }
.ag-table thead th.ag-col-total { background: var(--cap-primary); color: #fff; text-align: right; padding-right: 14px; }
.ag-table tbody td { padding: 6px; vertical-align: middle; border-bottom: 1px solid #e2e8f0; }
.ag-table tbody td.ag-col-label { padding-left: 14px; font-weight: 500; color: #334155; }
.ag-table tbody td.ag-col-mois { text-align: center; }
.ag-table tbody td.ag-col-total { text-align: right; padding-right: 14px; font-weight: 700; color: var(--cap-primary); background: #f8fafc; }
.ag-table .ag-row-calc td { background: #fef3c7; color: #78350f; font-weight: 600; }
.ag-table .ag-row-calc td.ag-col-label { color: var(--cap-primary); }
.ag-table .ag-row-auto td { background: #eff6ff; color: var(--cap-primary); font-weight: 600; }
.ag-table .ag-row-auto td.ag-col-label { color: var(--cap-primary); }
.ag-cell-auto { color: #1d4ed8; font-variant-numeric: tabular-nums; }
.salarie-table thead th {
    background: #f1f5f9; color: var(--cap-primary); font-weight: 700; font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.4px; padding: 10px 12px;
    border-bottom: 2px solid #cbd5e1;
}
.salarie-table tbody td { padding: 10px 12px; border-bottom: 1px solid #e5e7eb; vertical-align: middle; }
.salarie-table .salarie-sorti td { opacity: 0.65; background: #fafbfc; }
.salarie-table tbody tr:hover td { background: #f8fafc; }
.ag-cell-input { text-align: right; font-size: 12.5px; padding: 4px 6px; }
.ag-cell-input.is-saving { background: #fef3c7; }
.ag-cell-input.is-saved  { background: #d1fae5; transition: background .4s; }
.ag-cell-input.is-error  { background: #fee2e2; }
.ag-cell-readonly { color: #475569; font-size: 12.5px; }
.ag-cell-calc { color: #92400e; font-variant-numeric: tabular-nums; }

.outils-table { font-size: 13.5px; }
.outils-table thead th { background: #f8fafc; color: var(--cap-primary); font-weight: 700; font-size: 12px; padding: 10px 12px; border-bottom: 2px solid #cbd5e1; }
.outils-table tbody td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; }
.outils-table tbody tr:hover td { background: #f8fafc; }
.outils-sim-current td { background: #eff6ff !important; border-left: 3px solid #2563eb; }
.outils-sim-kpi {
    background: linear-gradient(180deg, #f0f9ff, #fff); border: 1px solid #bae6fd; border-radius: 10px;
    padding: 14px 16px; text-align: center;
}
.outils-sim-kpi-label { font-size: 11.5px; color: #0c4a6e; text-transform: uppercase; letter-spacing: 0.4px; }
.outils-sim-kpi-value { font-size: 24px; font-weight: 700; color: var(--cap-primary); margin-top: 4px; }

/* ==============================================================
   DESIGN 2026 — refresh global (Lot 8 audit Julien 2026-05-12)
   Espacements généreux, ombres douces, typo Inter, chiffres tabulaires.
   Ciblé sur les modules Analyse de gestion / Salariés / Outils.
   ============================================================== */

.module-2026 {
    --m26-bg:          #f8fafc;
    --m26-surface:     #ffffff;
    --m26-surface-alt: #f1f5f9;
    --m26-border:      #e2e8f0;
    --m26-border-soft: #f1f5f9;
    --m26-text:        #0f172a;
    --m26-text-mute:   #64748b;
    --m26-text-soft:   #94a3b8;
    --m26-primary:     var(--cap-primary);
    --m26-primary-soft:#dbeafe;
    --m26-accent:      #f59e0b;
    --m26-success:     #059669;
    --m26-danger:      #dc2626;
    --m26-shadow:      0 1px 2px rgba(15,23,42,.04), 0 4px 16px rgba(15,23,42,.06);
    --m26-shadow-lg:   0 4px 12px rgba(15,23,42,.08), 0 24px 48px rgba(15,23,42,.08);
    font-feature-settings: "tnum" 1, "lnum" 1, "cv11" 1;
}

.module-2026 .m26-hero {
    background: linear-gradient(135deg, var(--cap-primary) 0%, #404040 100%);
    color: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 22px;
    box-shadow: var(--m26-shadow-lg);
    position: relative; overflow: hidden;
}
.module-2026 .m26-hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at top right, rgba(245,158,11,.18), transparent 60%);
    pointer-events: none;
}
.module-2026 .m26-hero-eyebrow {
    font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.6px;
    color: rgba(255,255,255,.7); font-weight: 600;
}
.module-2026 .m26-hero h1 { font-size: 28px; font-weight: 700; margin: 6px 0 4px; }
.module-2026 .m26-hero .m26-hero-sub { color: rgba(255,255,255,.78); font-size: 14px; max-width: 720px; }
.module-2026 .m26-hero-toolbar { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.module-2026 .m26-hero-field { display: flex; flex-direction: column; gap: 4px; }
.module-2026 .m26-hero-field-label {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.8px;
    color: rgba(255,255,255,.78); font-weight: 600;
}
.module-2026 .m26-hero-toolbar .form-control,
.module-2026 .m26-hero-toolbar .form-select,
.module-2026 .m26-hero-toolbar .ts-control {
    background: #fff !important;
    border: 1px solid rgba(255,255,255,.4) !important;
    color: var(--m26-text) !important;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.module-2026 .m26-hero-toolbar .ts-control .item { color: var(--m26-text) !important; }

/* CTA primaire sur fond dark : blanc plein, marine au texte, ombre marquée */
.module-2026 .m26-hero .btn-on-dark {
    background: #fff;
    border: 0;
    color: var(--m26-primary);
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,.22), 0 1px 3px rgba(0,0,0,.14);
    transition: transform .15s, box-shadow .15s;
}
.module-2026 .m26-hero .btn-on-dark:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0,0,0,.3), 0 2px 4px rgba(0,0,0,.18);
    color: var(--m26-primary);
}
.module-2026 .m26-hero .btn-on-dark i { color: var(--m26-accent); }

/* Variante secondaire (boutons « Salariés », « Retour », etc.) */
.module-2026 .m26-hero .btn-glass {
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.32);
    color: #fff;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 10px;
}
.module-2026 .m26-hero .btn-glass:hover { background: rgba(255,255,255,.24); color: #fff; }

.module-2026 .m26-tabs {
    display: inline-flex; gap: 4px; padding: 5px;
    background: rgba(255,255,255,.12);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.18);
}
.module-2026 .m26-tab {
    padding: 7px 16px; border-radius: 999px;
    color: rgba(255,255,255,.78); text-decoration: none;
    font-size: 13px; font-weight: 500; transition: all .15s;
}
.module-2026 .m26-tab:hover { color: #fff; background: rgba(255,255,255,.1); }
.module-2026 .m26-tab.active { background: #fff; color: var(--cap-primary); box-shadow: 0 2px 6px rgba(0,0,0,.12); }

.module-2026 .m26-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 22px; }
.module-2026 .m26-kpi {
    background: var(--m26-surface);
    border: 1px solid var(--m26-border);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: var(--m26-shadow);
    position: relative; overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}
.module-2026 .m26-kpi:hover { transform: translateY(-1px); box-shadow: var(--m26-shadow-lg); }
.module-2026 .m26-kpi-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--m26-text-mute); font-weight: 600; }
.module-2026 .m26-kpi-value {
    font-size: 28px; font-weight: 700; color: var(--m26-text); margin: 8px 0 4px;
    font-variant-numeric: tabular-nums;
}
.module-2026 .m26-kpi-unit { font-size: 14px; color: var(--m26-text-mute); font-weight: 500; margin-left: 3px; }
.module-2026 .m26-kpi-hint { font-size: 11.5px; color: var(--m26-text-soft); }
.module-2026 .m26-kpi-icon {
    position: absolute; top: 18px; right: 18px;
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--m26-primary-soft); color: var(--m26-primary);
    border-radius: 10px; font-size: 16px;
}
.module-2026 .m26-kpi--accent .m26-kpi-icon { background: rgba(245,158,11,.15); color: var(--m26-accent); }
.module-2026 .m26-kpi--success .m26-kpi-icon { background: rgba(5,150,105,.15); color: var(--m26-success); }
.module-2026 .m26-kpi--danger  .m26-kpi-icon { background: rgba(220,38,38,.15);  color: var(--m26-danger); }

.module-2026 .m26-card {
    background: var(--m26-surface);
    border: 1px solid var(--m26-border);
    border-radius: 14px;
    box-shadow: var(--m26-shadow);
    overflow: hidden;
    margin-bottom: 20px;
}
.module-2026 .m26-card-head {
    padding: 18px 22px 14px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    border-bottom: 1px solid var(--m26-border-soft);
}
.module-2026 .m26-card-head h3 { font-size: 16px; font-weight: 700; margin: 0; color: var(--m26-text); }
.module-2026 .m26-card-head p  { font-size: 13px; color: var(--m26-text-mute); margin: 4px 0 0; }
.module-2026 .m26-card-body { padding: 16px 22px 20px; }

.module-2026 .m26-table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    font-size: 13px; font-variant-numeric: tabular-nums;
}
.module-2026 .m26-table thead th {
    background: var(--m26-surface-alt);
    color: var(--m26-text-mute);
    font-weight: 600; font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.7px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--m26-border);
    text-align: right;
}
.module-2026 .m26-table thead th:first-child { text-align: left; }
.module-2026 .m26-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--m26-border-soft);
    text-align: right;
    color: var(--m26-text);
}
.module-2026 .m26-table tbody td:first-child { text-align: left; font-weight: 500; }
.module-2026 .m26-table tbody tr:hover td { background: var(--m26-surface-alt); }
.module-2026 .m26-table tbody tr.is-auto td { background: linear-gradient(90deg, rgba(30,58,95,.04), rgba(30,58,95,0)); }
.module-2026 .m26-table tbody tr.is-total td {
    background: var(--m26-primary); color: #fff; font-weight: 700;
    border-top: 2px solid var(--m26-primary);
}
.module-2026 .m26-table tbody tr.is-total td:first-child { color: #fff; }
.module-2026 .m26-cell-input {
    width: 100%; border: 1px solid transparent; background: transparent;
    text-align: right; font-size: 13px;
    padding: 4px 8px; border-radius: 6px;
    font-variant-numeric: tabular-nums; color: var(--m26-text);
}
.module-2026 .m26-cell-input:hover  { background: var(--m26-surface-alt); border-color: var(--m26-border); }
.module-2026 .m26-cell-input:focus  { background: #fff; border-color: var(--m26-primary); outline: none; box-shadow: 0 0 0 3px rgba(30,58,95,.1); }
.module-2026 .m26-cell-input.is-saving { background: #fef3c7; }
.module-2026 .m26-cell-input.is-saved  { background: #d1fae5; transition: background .4s; }

.module-2026 .m26-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 999px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
}
.module-2026 .m26-pill--auto    { background: #dbeafe; color: #1d4ed8; }
.module-2026 .m26-pill--manual  { background: #fef3c7; color: #92400e; }
.module-2026 .m26-pill--neutral { background: #f1f5f9; color: #475569; }

.module-2026 .m26-empty { text-align: center; padding: 48px 24px; color: var(--m26-text-mute); }
.module-2026 .m26-empty-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--m26-surface-alt); border-radius: 16px;
    font-size: 28px; color: var(--m26-text-soft);
}
.module-2026 .m26-empty h4 { font-size: 16px; color: var(--m26-text); font-weight: 600; margin-bottom: 6px; }
.module-2026 .m26-empty p  { font-size: 13.5px; max-width: 440px; margin: 0 auto 16px; }

.module-2026 .m26-trend-up   { color: var(--m26-success); font-weight: 600; }
.module-2026 .m26-trend-down { color: var(--m26-danger);  font-weight: 600; }

/* ─────────────────────────────────────────────────────────────────
   Outils — redesign 2026-05-15 : marqueurs vitaux + grille KPI
   ───────────────────────────────────────────────────────────── */
.outils-header {
    display:flex; justify-content:space-between; align-items:flex-end;
    flex-wrap:wrap; gap:16px; margin-bottom:20px;
}
.outils-title    { font-size:22px; font-weight:700; margin:0 0 4px; color:#0f172a; letter-spacing:-0.01em; }
.outils-subtitle { font-size:13.5px; color:#64748b; margin:0; }
.outils-filters  { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }

/* Hero KPIs — productivité + écart */
.outils-hero {
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:14px;
    padding:20px 22px;
    height:100%;
    position:relative;
    overflow:hidden;
    box-shadow:0 1px 2px rgba(15,23,42,0.04);
    transition:box-shadow .2s ease, transform .2s ease;
}
.outils-hero:hover { box-shadow:0 4px 12px rgba(15,23,42,0.07); }
.outils-hero::before {
    content:""; position:absolute; left:0; top:0; bottom:0; width:4px;
    background:linear-gradient(180deg, var(--cap-primary), #404040);
    border-radius:14px 0 0 14px;
}
.outils-hero--ecart::before { background:linear-gradient(180deg, #10b981, #059669); }

.outils-hero-head {
    display:flex; justify-content:space-between; align-items:center;
    margin-bottom:14px;
}
.outils-hero-eyebrow {
    font-size:11.5px; font-weight:600; letter-spacing:0.05em;
    text-transform:uppercase; color:#64748b;
    display:inline-flex; align-items:center; gap:6px;
}
.outils-hero-eyebrow i { font-size:14px; color:var(--cap-primary); }
.outils-hero--ecart .outils-hero-eyebrow i { color:#10b981; }

.outils-hero-side {
    font-size:11px; color:#94a3b8; font-style:italic;
}
.outils-hero-trend {
    font-size:12px; font-weight:600; padding:3px 10px; border-radius:999px;
    display:inline-flex; align-items:center; gap:4px;
}
.outils-hero-trend.is-positive { background:#d1fae5; color:#065f46; }
.outils-hero-trend.is-negative { background:#fee2e2; color:#991b1b; }

.outils-hero-body {
    display:flex; justify-content:space-between; align-items:baseline;
    gap:16px; margin-bottom:14px;
}
.outils-hero-main { display:flex; flex-direction:column; }
.outils-hero-value {
    font-size:42px; font-weight:700; line-height:1; letter-spacing:-0.02em;
}
.outils-hero-unit    { font-size:22px; font-weight:600; margin-left:4px; opacity:0.85; }
.outils-hero-unit-sm { font-size:14px; font-weight:600; margin-left:3px; opacity:0.85; }
.outils-hero-caption { font-size:11.5px; color:#94a3b8; margin-top:4px; }

.outils-hero-aside {
    display:flex; flex-direction:column; align-items:flex-end;
    padding-left:16px; border-left:1px solid #e5e7eb;
}
.outils-hero-aside-value {
    font-size:24px; font-weight:600; color:#64748b; line-height:1;
}
.outils-hero-aside-caption { font-size:11px; color:#94a3b8; margin-top:4px; }

.outils-hero-gauge {
    height:8px; background:#f1f5f9; border-radius:999px; overflow:hidden;
}
.outils-hero-gauge-bar { height:100%; border-radius:999px; transition:width .4s ease; }
.outils-hero-gauge-legend {
    display:flex; justify-content:space-between;
    font-size:10.5px; color:#94a3b8; margin-top:5px;
}

.outils-hero-breakdown {
    border-top:1px solid #f1f5f9; padding-top:12px; margin-top:4px;
}
.outils-hero-breakdown-row {
    display:flex; justify-content:space-between; align-items:center;
    padding:4px 0; font-size:12.5px;
}
.outils-hero-breakdown-row .label { color:#64748b; }
.outils-hero-breakdown-row .label small { color:#94a3b8; font-size:10.5px; margin-left:4px; }
.outils-hero-breakdown-row .label i { color:#cbd5e1; font-size:14px; }
.outils-hero-breakdown-row .value { font-weight:600; color:#0f172a; }

.outils-hero-empty {
    color:#94a3b8; font-size:13px; padding:20px 0;
}
.outils-hero-empty a { color:var(--cap-primary); text-decoration:none; font-weight:600; }
.outils-hero-empty a:hover { text-decoration:underline; }

/* Section header (grille KPI) */
.outils-section-header {
    display:flex; justify-content:space-between; align-items:flex-end;
    margin:8px 4px 12px; flex-wrap:wrap; gap:10px;
}
.outils-section-title {
    font-size:16px; font-weight:700; color:#0f172a; margin:0;
}
.outils-section-sub {
    font-size:12.5px; color:#64748b; margin:2px 0 0;
}
.outils-section-sub .dot { color:#cbd5e1; margin:0 4px; }
.outils-source {
    font-size:10.5px; color:#94a3b8;
    text-transform:uppercase; letter-spacing:0.05em; font-weight:600;
}

/* Cartes KPI avec mini-charts */
.outils-kpi-card {
    background:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:16px 18px;
    height:100%;
    transition:box-shadow .2s ease, border-color .2s ease;
}
.outils-kpi-card:hover { box-shadow:0 4px 12px rgba(15,23,42,0.06); border-color:#cbd5e1; }

.outils-kpi-head {
    display:flex; justify-content:space-between; align-items:flex-start; gap:12px;
    margin-bottom:10px;
}
.outils-kpi-label { font-size:12px; color:#64748b; font-weight:500; letter-spacing:0.01em; }
.outils-kpi-value {
    font-size:22px; font-weight:700; color:#0f172a; letter-spacing:-0.01em; line-height:1.2;
    margin-top:2px;
}
.outils-kpi-unit { font-size:12.5px; font-weight:500; color:#94a3b8; margin-left:3px; }
.outils-kpi-empty { font-size:12px; color:#94a3b8; margin-top:8px; }

.outils-kpi-deltas { display:flex; flex-direction:column; align-items:flex-end; gap:3px; }
.outils-kpi-deltas .delta {
    font-size:12px; font-weight:600;
}
.outils-kpi-deltas .delta small { font-weight:400; opacity:0.7; margin-left:3px; }
.outils-kpi-deltas .delta.is-positive { color:#059669; }
.outils-kpi-deltas .delta.is-negative { color:#dc2626; }
.outils-kpi-deltas .delta--muted { font-size:11px; opacity:0.75; }

.outils-kpi-chart { height:170px; margin-top:4px; }

/* Notes consultant (encours + stocks) — section discrète en fin de page */
.outils-notes {
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:12px;
    padding:16px 18px;
}
.outils-notes-head {
    font-size:13px; font-weight:600; color:#475569;
    display:inline-flex; align-items:center; gap:6px;
    margin-bottom:12px;
}
.outils-notes-head i { color:#94a3b8; }
.outils-note-label {
    font-size:12px; color:#64748b; font-weight:500;
    margin-bottom:5px;
    display:inline-flex; align-items:center; gap:5px;
}
.outils-note-label i { color:#94a3b8; }
.outils-note-input { background:#ffffff; border-color:#e2e8f0; resize:vertical; }
.outils-note-input:focus { border-color:var(--cap-primary); box-shadow:0 0 0 3px rgba(30,58,95,0.08); }
