/* ============================================================================
   Cara · Components · Deep Search (scope DEEP_SEARCH)
   ----------------------------------------------------------------------------
   - Bloc `.deep` in-chat (mode A) : bordure latérale légère, PAS de carte pleine
     (anti carte-dans-carte, le bloc vit déjà dans la bulle Cara). Sources +
     favicons (ellipsis anti-débordement), pills de confiance, repli des étapes.
   - Panneau rapport (mode B) `.deep-report-panel` : split-screen calqué sur
     _doc-preview.css (body.doc-preview-active), cinématique d'écriture, charts.
   Tokens DAAT uniquement (--ds-color-*/--ds-space-*/--ds-radius-*), zéro couleur
   en dur. Light-only.
   ============================================================================ */

/* ── Mode A : bloc in-chat ─────────────────────────────────────────────────── */
.deep {
    min-width: 0;
    margin-bottom: var(--ds-space-3);
}
/* Indicateur de travail (anti « tourne dans le vide ») : phase + chrono. */
.deep-working {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    margin-top: var(--ds-space-2);
    font-size: var(--ds-text-sm);
    color: var(--ds-color-text-muted);
}
.deep-work-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ds-color-brand);
    flex: 0 0 auto;
    animation: deepWorkPulse 1.1s ease-in-out infinite;
}
.deep-work-time {
    margin-left: auto;
    font-family: var(--ds-font-mono);
    font-size: var(--ds-text-xs);
    color: var(--ds-color-text-muted);
    font-variant-numeric: tabular-nums;
}
@keyframes deepWorkPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
    .deep-work-dot { animation: none; opacity: 0.8; }
}
.deep-head {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
}
.deep-head .lbl {
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-font-weight-medium);
    color: var(--ds-color-text-muted);
}
.deep-head .ti {
    color: var(--ds-color-brand-deep);
    font-size: 15px;
}
.deep-plan {
    font-size: var(--ds-text-sm);
    line-height: var(--ds-leading-normal);
    color: var(--ds-color-text-muted);
    margin-top: var(--ds-space-2);
    max-width: 64ch;
}

/* Liste des étapes : filet latéral léger (jamais de carte) */
.deep-steps {
    margin-top: var(--ds-space-3);
    padding-left: var(--ds-space-3);
    border-left: 2px solid var(--ds-color-divider);
    display: flex;
    flex-direction: column;
    gap: var(--ds-space-3);
}
.deep-step {
    min-width: 0;
}
.deep-say {
    display: flex;
    gap: var(--ds-space-2);
    font-size: var(--ds-text-sm);
    color: var(--ds-color-text);
}
.deep-say .ti {
    color: var(--ds-color-brand-deep);
    font-size: 14px;
    margin-top: 2px;
    flex: 0 0 auto;
}
.deep-src {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    margin-top: var(--ds-space-2);
    margin-left: var(--ds-space-5);
    min-width: 0;
}
.deep-fav {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border-radius: 5px;
    object-fit: cover;
    background: var(--ds-color-surface-2);
    border: 1px solid var(--ds-color-divider);
}
.deep-link {
    font-family: var(--ds-font-mono);
    font-size: var(--ds-text-xs);
    color: var(--ds-color-text-muted);
    text-decoration: none;
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
    line-height: 1.45;
}
.deep-link:hover {
    color: var(--ds-color-brand);
    text-decoration: underline;
}
/* Source EN COURS de lecture (défilé Codex) : ligne surlignée. */
.deep-src.cur {
    background: var(--ds-color-brand-soft, var(--ds-color-surface-2));
    border-radius: var(--ds-radius-sm, 8px);
    padding: 4px 6px;
    margin-left: calc(var(--ds-space-5) - 6px);
}
.deep-src.cur .deep-link { color: var(--ds-color-text); }
.deep-stt.running { color: var(--ds-color-brand); }
.deep-stt.ok { color: var(--ds-color-success-text); }

/* ── Intro + axes couverts (chips) ─────────────────────────────────────────── */
.deep-intro {
    font-size: var(--ds-text-md, 15px);
    color: var(--ds-color-text);
    line-height: 1.6;
    margin-bottom: var(--ds-space-2);
}
.deep-axes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--ds-space-3); }
.deep-axe {
    font-size: var(--ds-text-xs);
    color: var(--ds-color-brand);
    background: var(--ds-color-brand-soft, var(--ds-color-surface-2));
    border: 1px solid var(--ds-color-border);
    border-radius: 999px;
    padding: 3px 10px;
    font-weight: 500;
}

/* ── Recap repliable « N sources analysées ▾ » ─────────────────────────────── */
.deep-recap {
    display: inline-flex;
    align-items: center;
    gap: var(--ds-space-2);
    font-size: var(--ds-text-sm);
    color: var(--ds-color-text-muted);
    background: var(--ds-color-surface-2);
    border: 1px solid var(--ds-color-border);
    border-radius: 999px;
    padding: 5px 12px;
    cursor: pointer;
    user-select: none;
    margin: var(--ds-space-2) 0 var(--ds-space-3);
    width: fit-content;
}
.deep-recap:hover { color: var(--ds-color-text); }
.deep-recap-favs { display: inline-flex; }
.deep-recap-fav {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    margin-left: -5px;
    border: 1.5px solid var(--ds-color-surface);
    background: var(--ds-color-surface-2);
    object-fit: cover;
}
.deep-recap-favs .deep-recap-fav:first-child { margin-left: 0; }
.deep-recap-chev .ti { font-size: 14px; }

/* ── Phrase de transition au-dessus de l'essentiel ─────────────────────────── */
.deep-trans { font-size: var(--ds-text-sm); color: var(--ds-color-text); margin-bottom: var(--ds-space-2); }

/* ── Carte rapport UNIQUE (Télécharger / Ouvrir) ───────────────────────────── */
.deep-card {
    display: flex;
    align-items: center;
    gap: var(--ds-space-3);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    background: var(--ds-color-surface);
    padding: var(--ds-space-3);
    margin: var(--ds-space-2) 0 var(--ds-space-3);
}
.deep-card-doc {
    width: 36px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 6px;
    background: linear-gradient(160deg, #FF5A5F, #E11D48);
    position: relative;
}
.deep-card-doc::after {
    content: "PDF";
    position: absolute;
    bottom: 5px; left: 0; right: 0;
    text-align: center;
    color: #fff;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.deep-card-meta { flex: 1 1 auto; min-width: 0; }
.deep-card-t {
    font-weight: 600;
    font-size: var(--ds-text-sm);
    color: var(--ds-color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.deep-card-s { font-size: var(--ds-text-xs); color: var(--ds-color-text-muted); margin-top: 1px; }
.deep-card-acts { display: flex; gap: var(--ds-space-2); flex: 0 0 auto; }
.deep-btn {
    font-size: var(--ds-text-sm);
    font-weight: 500;
    border-radius: var(--ds-radius-sm, 8px);
    padding: 7px 13px;
    cursor: pointer;
    border: 1px solid var(--ds-color-border);
    background: var(--ds-color-surface);
    color: var(--ds-color-text);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.deep-btn:hover { background: var(--ds-color-surface-2); }
.deep-btn.pri { background: var(--ds-color-brand); border-color: var(--ds-color-brand); color: #fff; }
.deep-btn.pri:hover { filter: brightness(1.05); }
.deep-stt {
    font-size: var(--ds-text-xs);
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.deep-stt.running { color: var(--ds-color-text-soft); }
.deep-stt.ok { color: var(--ds-color-success-text); }
.deep-stt.error { color: var(--ds-color-error-text); }
.deep-stt.skipped { color: var(--ds-color-text-soft); }
.deep-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-color-text-soft);
    display: inline-block;
    animation: deep-pulse 1.1s ease-in-out infinite;
}
@keyframes deep-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* Ligne de repli (research_done) */
.deep-sum {
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    cursor: pointer;
    color: var(--ds-color-text-muted);
    padding: 2px 0;
    transition: color 0.15s var(--ds-ease-smooth);
}
.deep-sum:hover { color: var(--ds-color-text); }
.deep-sum .ti.ti-circle-check { color: var(--ds-color-success-text); font-size: 15px; flex: 0 0 auto; }
.deep-sum .lbl { font-size: var(--ds-text-sm); }
.deep-detail {
    margin-top: var(--ds-space-3);
    padding-left: var(--ds-space-3);
    border-left: 2px solid var(--ds-color-divider);
}

.deep-eye {
    font-size: var(--ds-text-2xs);
    font-weight: var(--ds-font-weight-semibold);
    letter-spacing: var(--ds-tracking-caps);
    text-transform: uppercase;
    color: var(--ds-color-success-text);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: var(--ds-space-3) 0 var(--ds-space-2);
}

/* Citations + pills de confiance */
.deep-cites {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ds-space-2);
    align-items: center;
}
.cite {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ds-color-text-soft);
    transition: color 0.15s var(--ds-ease-smooth);
}
.cite:hover { color: var(--ds-color-brand); }
.cite-n {
    font-family: var(--ds-font-mono);
    font-size: var(--ds-text-xs);
}
/* Popover preuve au survol d'une citation */
.cpop {
    position: absolute;
    left: 0;
    top: calc(100% + 7px);
    width: 280px;
    max-width: 80vw;
    background: var(--ds-color-surface);
    border: 1px solid var(--ds-color-border-strong);
    border-radius: var(--ds-radius-md);
    box-shadow: var(--ds-shadow-overlay);
    padding: 11px 12px;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s var(--ds-ease-smooth), transform 0.15s var(--ds-ease-smooth);
    text-align: left;
    white-space: normal;
    pointer-events: none;
}
.cite:hover .cpop { opacity: 1; visibility: visible; transform: none; }
.cpop .cph {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--ds-font-mono);
    font-size: var(--ds-text-xs);
    color: var(--ds-color-brand-text);
    overflow-wrap: anywhere;
}
.cpop .cpf {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    object-fit: cover;
    background: var(--ds-color-surface-2);
    flex: 0 0 auto;
}
.cpop .cpt {
    display: block;
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-font-weight-medium);
    color: var(--ds-color-text);
    margin-top: 7px;
}
.cpop .cpo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--ds-text-xs);
    color: var(--ds-color-brand);
    margin-top: 8px;
}

/* Carte « Ouvrir le rapport détaillé » (mode B persisté, dans le fil) */
.deep-report-card {
    display: flex;
    align-items: center;
    gap: var(--ds-space-3);
    margin-top: var(--ds-space-3);
    padding: var(--ds-space-3) var(--ds-space-4);
    background: var(--ds-color-surface-2);
    border: 1px solid var(--ds-color-border);
    border-left: 3px solid var(--ds-color-brand);
    border-radius: var(--ds-radius-md);
}
.deep-report-card .drc-icon .ti {
    font-size: 20px;
    color: var(--ds-color-brand-deep);
}
.deep-report-card .drc-body {
    display: flex;
    align-items: center;
    gap: var(--ds-space-3);
    flex: 1 1 auto;
    min-width: 0;
}
.deep-report-card .drc-title {
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-font-weight-medium);
    color: var(--ds-color-text);
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}
.deep-report-card .drc-open { margin-left: auto; flex: 0 0 auto; }

/* ── Mode B bulle in-chat : encadré « L'ESSENTIEL » ───────────────────────── */
.chat-essentiel {
    background: var(--ds-color-surface-2);
    border: 1px solid var(--ds-color-border);
    border-left: 3px solid var(--ds-color-brand);
    border-radius: var(--ds-radius-md);
    padding: 12px 14px;
    margin: var(--ds-space-3) 0;
}
.chat-essentiel .ce-head {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--ds-text-2xs);
    font-weight: var(--ds-font-weight-semibold);
    letter-spacing: var(--ds-tracking-caps);
    text-transform: uppercase;
    color: var(--ds-color-brand-deep);
    margin-bottom: 9px;
}
.chat-essentiel .ce-head .ti { font-size: 14px; }
.chat-essentiel ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.chat-essentiel li {
    position: relative;
    padding-left: 15px;
    font-size: var(--ds-text-sm);
    line-height: 1.5;
    color: var(--ds-color-text);
    overflow-wrap: anywhere;
}
.chat-essentiel li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ds-color-brand);
}

/* ── Mode B : zone de dépôt white-label (logo / papier à en-tête) ──────────── */
.deep-brand-ask {
    margin-top: var(--ds-space-3);
    padding-top: 12px;
    border-top: 1px solid var(--ds-color-divider);
}
.deep-brand-ask .ba-q {
    display: block;
    font-size: var(--ds-text-sm);
    line-height: 1.45;
    color: var(--ds-color-text-muted);
    margin-bottom: 9px;
}
.deep-brand-drop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1.5px dashed var(--ds-color-brand-border);
    background: var(--ds-color-brand-bg);
    border-radius: var(--ds-radius-md);
    padding: 11px 14px;
    cursor: pointer;
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-font-weight-medium);
    color: var(--ds-color-brand-text);
    text-align: center;
    transition: border-color 0.15s var(--ds-ease-smooth), background 0.15s var(--ds-ease-smooth);
}
.deep-brand-drop:hover,
.deep-brand-drop.drag {
    border-color: var(--ds-color-brand);
    background: var(--ds-color-surface-2);
}
.deep-brand-drop .ti { font-size: 17px; flex: 0 0 auto; }
.deep-brand-saved {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--ds-text-sm);
    color: var(--ds-color-success-text);
}
.deep-brand-saved .ti { font-size: 15px; color: var(--ds-color-success-text); }

/* ── Bouton « Deep Search » dans la barre d'envoi ──────────────────────────── */
.deep-search-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    font-size: var(--ds-text-sm);
    cursor: pointer;
    border: 1px solid var(--ds-color-border);
    background: var(--ds-color-surface);
    color: var(--ds-color-text-muted);
    border-radius: var(--ds-radius-pill);
    padding: 6px 11px;
    transition: background 0.15s var(--ds-ease-smooth), border-color 0.15s var(--ds-ease-smooth), color 0.15s var(--ds-ease-smooth);
    flex: 0 0 auto;
}
.deep-search-toggle:hover {
    background: var(--ds-color-brand-bg);
    border-color: var(--ds-color-brand-border);
    color: var(--ds-color-brand-text);
}
.deep-search-toggle.on {
    background: var(--ds-color-brand);
    border-color: var(--ds-color-brand);
    color: var(--ds-color-text-on-brand);
}
.deep-search-toggle svg { width: 16px; height: 16px; }

/* ── Mode B : panneau rapport (split-screen) ──────────────────────────────── */
.deep-report-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--doc-preview-width, 46vw);
    display: flex;
    flex-direction: column;
    background: var(--ds-color-surface);
    border-left: 1px solid var(--ds-color-border);
    box-shadow: var(--ds-shadow-overlay);
    z-index: var(--ds-z-modal);
    transform: translateX(100%);
    transition: transform var(--ds-duration-standard) var(--ds-ease-smooth);
}
.deep-report-panel.open { transform: translateX(0); }

.drp-top {
    display: flex;
    align-items: center;
    gap: var(--ds-space-3);
    padding: 12px 16px;
    border-bottom: 1px solid var(--ds-color-divider);
    flex: 0 0 auto;
}
.drp-top .ti { color: var(--ds-color-brand-deep); font-size: 18px; }
.drp-top .drp-doc-ic { color: var(--ds-color-brand-deep); flex: 0 0 auto; }
.drp-k {
    font-size: var(--ds-text-2xs);
    font-weight: var(--ds-font-weight-semibold);
    letter-spacing: var(--ds-tracking-caps);
    text-transform: uppercase;
    color: var(--ds-color-text-muted);
}
.drp-close {
    border: 1px solid var(--ds-color-border);
    background: var(--ds-color-surface);
    color: var(--ds-color-text-muted);
    border-radius: var(--ds-radius-sm);
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.drp-close:hover { background: var(--ds-color-surface-2); color: var(--ds-color-text); }
.drp-close svg { width: 18px; height: 18px; display: block; }
.drp-replay { margin-left: auto; }
.drp-replay + .drp-close { margin-left: 6px; }
.drp-replay svg { width: 16px; height: 16px; }

/* indicateur « Cara rédige le rapport… » (cinématique) */
.drp-writing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0 2px;
    color: var(--ds-color-text-muted);
    font-size: var(--ds-text-sm);
}
.drp-writing .drp-wd {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ds-color-brand);
    flex: 0 0 auto;
    animation: deepWorkPulse 1s ease-in-out infinite;
}
.drp-writing .drp-wlbl.ok { color: var(--ds-color-success-text); }
.drp-writing .ti { color: var(--ds-color-success-text); font-size: 15px; }
@media (prefers-reduced-motion: reduce) {
    .drp-writing .drp-wd { animation: none; opacity: 0.8; }
}

.drp-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 34px 70px;
}
.drp-doc { max-width: 64ch; margin: 0 auto; }

/* cinématique d'écriture */
.drp-doc.writing > * {
    opacity: 0;
    transform: translateY(12px);
}
/* l'indicateur d'écriture reste visible pendant la cinématique */
.drp-doc.writing > .drp-writing {
    opacity: 1;
    transform: none;
}
.drp-doc > .w-show {
    opacity: 1 !important;
    transform: none !important;
    transition: opacity 0.42s var(--ds-ease-smooth), transform 0.42s var(--ds-ease-smooth);
}

/* cover */
.drp-cover { padding: 30px 0 18px; }
.drp-rule { height: 2px; width: 64px; background: var(--ds-color-brand); }
.drp-ov {
    font-size: var(--ds-text-2xs);
    font-weight: var(--ds-font-weight-semibold);
    letter-spacing: var(--ds-tracking-caps);
    text-transform: uppercase;
    color: var(--ds-color-brand-deep);
    margin-top: 14px;
}
.drp-cover h1 {
    font-size: var(--ds-text-2xl);
    font-weight: var(--ds-font-weight-semibold);
    line-height: 1.32;
    margin: 8px 0 0;
}
.drp-meta {
    font-size: var(--ds-text-sm);
    color: var(--ds-color-text-muted);
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.drp-meta .mono { font-family: var(--ds-font-mono); }

/* sections */
.drp-section {
    padding: 26px 0;
    border-top: 1px solid var(--ds-color-divider);
}
.drp-section h2 {
    font-size: var(--ds-text-xl);
    font-weight: var(--ds-font-weight-semibold);
    line-height: 1.32;
    margin: 6px 0 0;
}
.drp-section h3 {
    font-size: var(--ds-text-md);
    font-weight: var(--ds-font-weight-semibold);
    margin: 24px 0 0;
}
.drp-section p {
    font-size: var(--ds-text-base);
    line-height: var(--ds-leading-relaxed);
    margin: 16px 0 0;
}
.drp-chapo {
    font-size: var(--ds-text-md);
    line-height: var(--ds-leading-relaxed);
    color: var(--ds-color-text);
    margin: 12px 0 0;
}

/* figure / charts */
.drp-figure { margin: 24px auto 0; max-width: 78ch; }
.drp-figure .figtitle {
    font-size: var(--ds-text-md);
    font-weight: var(--ds-font-weight-semibold);
    line-height: 1.32;
    margin-bottom: 2px;
}
.drp-figure .figsub {
    font-size: var(--ds-text-xs);
    color: var(--ds-color-text-muted);
    margin-bottom: 10px;
}
.drp-figure .src {
    font-size: var(--ds-text-xs);
    color: var(--ds-color-text-soft);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--ds-color-divider);
}
.drp-chartbox { position: relative; height: 230px; }

/* metric cards */
.drp-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 22px;
}
.drp-kpi {
    background: var(--ds-color-surface-2);
    border-radius: var(--ds-radius-md);
    padding: 13px 15px;
}
.drp-kpi .lab { font-size: var(--ds-text-xs); color: var(--ds-color-text-muted); }
.drp-kpi .val {
    font-family: var(--ds-font-mono);
    font-weight: var(--ds-font-weight-medium);
    font-size: var(--ds-text-2xl);
    line-height: 1.2;
    margin-top: 3px;
    color: var(--ds-color-brand-deep);
}

/* takeaway / callout */
.drp-takeaway {
    background: var(--ds-color-surface-2);
    border-left: 3px solid var(--ds-color-brand);
    border-radius: var(--ds-radius-md);
    padding: 14px 18px;
    margin: 24px 0 0;
}
.drp-takeaway.risk { border-left-color: var(--ds-color-warn); }
.drp-takeaway .ov {
    font-size: var(--ds-text-2xs);
    font-weight: var(--ds-font-weight-semibold);
    letter-spacing: var(--ds-tracking-caps);
    text-transform: uppercase;
    color: var(--ds-color-text-muted);
}
.drp-takeaway p {
    margin: 6px 0 0;
    font-size: var(--ds-text-base);
    line-height: var(--ds-leading-normal);
}

/* table */
.drp-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 0;
    font-size: var(--ds-text-sm);
}
.drp-table th {
    font-size: var(--ds-text-2xs);
    font-weight: var(--ds-font-weight-semibold);
    letter-spacing: var(--ds-tracking-wider);
    text-transform: uppercase;
    color: var(--ds-color-text-muted);
    text-align: left;
    padding: 8px 10px;
    background: var(--ds-color-surface-2);
    border-bottom: 1px solid var(--ds-color-border);
}
.drp-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--ds-color-divider);
    line-height: var(--ds-leading-normal);
}
.drp-table tr:nth-child(even) td { background: var(--ds-color-surface-3); }

/* timeline */
.drp-tl { display: flex; gap: 0; margin: 18px 0 0; }
.drp-tl-step { flex: 1; position: relative; padding-top: 22px; }
.drp-tl-step::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--ds-color-border);
}
.drp-tl-step.key::before { background: var(--ds-color-brand); }
.drp-tl-step .dot {
    position: absolute;
    top: 1px;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: var(--ds-radius-pill);
    background: var(--ds-color-surface);
    border: 2px solid var(--ds-color-border);
}
.drp-tl-step.key .dot { border-color: var(--ds-color-brand); background: var(--ds-color-brand); }
.drp-tl-step .yr {
    font-family: var(--ds-font-mono);
    font-weight: var(--ds-font-weight-medium);
    font-size: var(--ds-text-sm);
    color: var(--ds-color-text);
}
.drp-tl-step .lab {
    font-size: var(--ds-text-xs);
    color: var(--ds-color-text-muted);
    margin-top: 4px;
    line-height: 1.4;
    padding-right: 10px;
}

/* action bar (PDF + partage) */
.drp-actionbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: var(--ds-space-2);
    padding: 11px 22px;
    border-top: 1px solid var(--ds-color-divider);
    background: var(--ds-color-surface);
}
.drp-btn {
    font: inherit;
    font-size: var(--ds-text-sm);
    cursor: pointer;
    border: 1px solid var(--ds-color-border);
    background: var(--ds-color-surface);
    color: var(--ds-color-text);
    border-radius: var(--ds-radius-sm);
    padding: 8px 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: background 0.15s var(--ds-ease-smooth), border-color 0.15s var(--ds-ease-smooth), color 0.15s var(--ds-ease-smooth);
}
.drp-btn:hover {
    background: var(--ds-color-brand-bg);
    border-color: var(--ds-color-brand-border);
    color: var(--ds-color-brand-deep);
}
.drp-btn.pri { background: var(--ds-color-brand); border-color: var(--ds-color-brand); color: var(--ds-color-text-on-brand); }
.drp-btn.pri:hover { background: var(--ds-color-brand-deep); color: var(--ds-color-text-on-brand); }
.drp-btn.sm { font-size: var(--ds-text-xs); padding: 6px 10px; }
.drp-btn[disabled] { opacity: 0.55; cursor: default; }

/* popover partage */
.drp-share-wrap { position: relative; display: inline-flex; }
.drp-share-pop {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 300px;
    max-width: 80vw;
    background: var(--ds-color-surface);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-md);
    box-shadow: var(--ds-shadow-overlay);
    padding: 13px;
    z-index: 30;
}
.drp-share-pop[hidden] { display: none; }
.drp-share-pop .sp-h {
    font-size: var(--ds-text-sm);
    font-weight: var(--ds-font-weight-semibold);
    color: var(--ds-color-text);
}
.drp-share-pop .sp-sub {
    font-size: var(--ds-text-xs);
    line-height: 1.4;
    color: var(--ds-color-text-muted);
    margin: 3px 0 10px;
}
.drp-share-pop .sp-make { width: 100%; justify-content: center; }
.drp-share-pop .sp-row {
    display: flex;
    gap: 6px;
    align-items: center;
}
.drp-share-pop .sp-url {
    flex: 1 1 auto;
    min-width: 0;
    font-family: var(--ds-font-mono);
    font-size: var(--ds-text-xs);
    color: var(--ds-color-brand-deep);
    background: var(--ds-color-surface-2);
    border: 1px solid var(--ds-color-border);
    border-radius: var(--ds-radius-sm);
    padding: 8px 9px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Références du rapport (M-05) — les renvois [1], [2]… du corps doivent mener
   quelque part. Titre cliquable, URL entière dessous : « auditable » suppose de
   voir où l'on va AVANT de cliquer, pas seulement le domaine. */
.drp-sources {
    /* Pas de max-width : .drp-doc borne déjà à 64ch, en poser une autre ici
       serait inerte ou divergente. */
    margin: 32px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--ds-color-border);
}
.drp-sources h2 {
    font-size: var(--ds-text-md);
    font-weight: var(--ds-font-weight-semibold);
    line-height: 1.32;
    margin: 0 0 12px;
}
.drp-cites {
    margin: 0;
    /* 3ch : un marqueur à deux chiffres (« 10. ») fait ~3ch — 2.2ch le faisait
       déborder dès la dixième source, cas courant en recherche approfondie. */
    padding-left: 3ch;
}
.drp-cites li {
    font-size: var(--ds-text-sm);
    line-height: var(--ds-leading-normal);
}
.drp-cites li + li { margin-top: 10px; }
/* Le titre est un TITRE, pas une URL : il reprend la typo du document
   (.deep-link est mono/miniature/gris, pensée pour les URL du défilé in-chat). */
.drp-cites a.deep-link,
.drp-cites span.deep-link {
    font-family: inherit;
    font-size: var(--ds-text-sm);
    color: var(--ds-color-text);
    word-break: normal;
    overflow-wrap: anywhere;
}
.drp-cites a.deep-link:hover { text-decoration: underline; }
.drp-cite-url {
    display: block;
    color: var(--ds-color-text-muted);
    font-size: var(--ds-text-xs);
    word-break: break-all;
}

/* Le chat se rétracte déjà via body.doc-preview-active (cf. _doc-preview.css). */

@media (prefers-reduced-motion: reduce) {
    .deep-dot { animation: none; }
    .drp-doc.writing > *,
    .drp-doc > .w-show { transition: none; }
    .deep-report-panel { transition: none; }
}
