/* ─── Reset global (repris de RAD4BIKE_PYTHON pour cohérence visuelle) ─── */
html, body {
    margin: 0;
    padding: 0;
    background-color: #0d1117;
}

table { font-family: 'Inter', 'Segoe UI', sans-serif; }

.Select-control {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
}
.Select-menu-outer {
    background-color: #161b22 !important;
    border-color: #30363d !important;
}

/* ─── Tuiles d'accès aux sections (accueil admin, façon Odoo) ─────────── */
.admin-app-tile > div {
    transition: border-color 0.15s ease, transform 0.1s ease;
    cursor: pointer;
}
.admin-app-tile:hover > div {
    border-color: #58a6ff !important;
    transform: translateY(-2px);
}

/* Barre de sous-menu de l'application en cours (façon Odoo) */
.admin-app-bar-link:hover {
    color: #e6edf3 !important;
    border-bottom-color: #30363d !important;
}

/* Pastilles d'alertes dépliables + bloc Tendances de l'accueil */
.admin-alert-chip[open] { flex-basis: 100% !important; }
.admin-alert-chip a:hover { background-color: rgba(88, 166, 255, 0.08); }
.admin-trends > summary { padding: 8px 0; }

/* Menus déroulants du tableau de lignes des devis : fond sombre imposé
   ci-dessus (.Select-menu-outer), donc texte clair et option survolée
   visible - sinon texte sombre sur fond sombre, illisible. */
.dash-spreadsheet .Select-menu-outer,
.dash-spreadsheet .Select-option { color: #e6edf3 !important; background-color: #161b22 !important; }
.dash-spreadsheet .Select-option.is-focused { background-color: #1f6feb !important; }
.dash-spreadsheet .Select-value-label,
.dash-spreadsheet .Select-placeholder { color: #e6edf3 !important; }

/* Recherche globale de l'en-tête (Ctrl+K, cf. layout_common.py / global_search.js) */
.global-search-hit:hover, .global-search-hit:focus { background: rgba(88, 166, 255, 0.12); outline: none; }

/* Composants Dash 4 (menus déroulants, cases à cocher, boutons radio,
   calendriers) : leur thème par défaut est clair (fond blanc, texte bleu
   nuit) - illisible sur le fond sombre de l'Admin (texte clair sur fond
   blanc dans les menus, libellés quasi invisibles). Leurs variables de thème
   sont redéfinies ici une fois pour toutes. */
:root {
  --Dash-Fill-Inverse-Strong: #0d1117;
  --Dash-Text-Primary: #e6edf3;
  --Dash-Text-Strong: #e6edf3;
  --Dash-Text-Weak: #8b949e;
  --Dash-Text-Disabled: #6e7681;
  --Dash-Stroke-Strong: #484f58;
  --Dash-Stroke-Weak: #30363d;
  --Dash-Fill-Primary-Hover: rgba(88, 166, 255, 0.10);
  --Dash-Fill-Primary-Active: rgba(88, 166, 255, 0.18);
  --Dash-Fill-Interactive-Weak: rgba(88, 166, 255, 0.08);
  --Dash-Fill-Interactive-Strong: #58a6ff;
  --Dash-Fill-Disabled: rgba(255, 255, 255, 0.06);
  --Dash-Shading-Strong: rgba(0, 0, 0, 0.55);
  --Dash-Shading-Weak: rgba(0, 0, 0, 0.35);
}

/* ── Page Commandes : tableau par étape (refonte 2026-10-09) ─────────────── */
.ob-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.ob-title { font-size: 22px; margin: 0; }
.ob-search { flex: 0 1 340px; padding: 8px 12px; font-size: 13px; background: #161b22; color: #e6edf3;
  border: 1px solid #30363d; border-radius: 8px; }
.ob-top-links { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.ob-ghost { font-size: 12.5px; color: #e6edf3; text-decoration: none; border: 1px solid #30363d;
  border-radius: 8px; padding: 7px 12px; background: #161b22; }
.ob-ghost:hover { border-color: #58a6ff; }
.ob-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ob-chip { font-size: 12px; padding: 5px 11px; border-radius: 999px; border: 1px solid #30363d;
  color: #8b949e; background: #161b22; cursor: pointer; margin: 0; }
.ob-chips .dash-options-list-option { padding: 0; margin: 0; background: none; border: 0; }
.ob-chips .dash-options-list-option-wrapper { display: none; }
.ob-chips .dash-options-list-option.selected .ob-chip { background: #e6edf3; color: #0d1117; border-color: #e6edf3; font-weight: 600; }
.ob-chip-input { display: none; }
.ob-feedback { font-size: 12.5px; color: #7ee787; min-height: 18px; margin-bottom: 6px; }
.ob-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ob-kpi { background: #161b22; border: 1px solid #30363d; border-radius: 10px; padding: 11px 14px;
  display: flex; flex-direction: column; gap: 1px; }
.ob-kpi-l { font-size: 11.5px; color: #8b949e; }
.ob-kpi-v { font: 600 22px/1.15 ui-monospace, "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; }
.ob-kpi-s { font-size: 11.5px; color: #8b949e; }
.ob-kpi-s--warn { color: #ffa657; }
.ob-board-scroll { overflow-x: auto; padding-bottom: 6px; }
.ob-board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)) auto; gap: 12px;
  align-items: start; min-width: 1060px; }
.ob-col { background: #10151c; border: 1px solid #21262d; border-radius: 12px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ob-col-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; font-weight: 600; font-size: 13px; }
.ob-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ob-count { font: 600 11.5px ui-monospace, monospace; color: #8b949e; background: #1c2129;
  border-radius: 999px; padding: 1px 8px; }
.ob-col--done { width: 150px; }
.ob-col--done[open] { width: 270px; }
.ob-col--done > summary { cursor: pointer; list-style: none; color: #8b949e; }
.ob-col--done > summary::-webkit-details-marker { display: none; }
.ob-col--done > summary::after { content: "▸"; margin-left: auto; }
.ob-col--done[open] > summary::after { content: "▾"; }
.ob-done-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ob-done-note { padding: 0 4px; }
.ob-col--done .ob-card { opacity: .85; }
.ob-empty { font-size: 12.5px; color: #8b949e; padding: 10px 6px; }
.ob-card { background: #161b22; border: 1px solid #30363d; border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ob-card:hover { border-color: #484f58; }
.ob-card--blocked { border-left: 3px solid #ffa657; }
.ob-r1 { display: flex; align-items: center; gap: 8px; }
.ob-id { font: 600 12px ui-monospace, monospace; color: #8b949e; text-decoration: none; }
.ob-id:hover { color: #58a6ff; }
.ob-amt { margin-left: auto; font: 600 13.5px ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.ob-who { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; flex-wrap: wrap;
  overflow-wrap: anywhere; }
.ob-sub { font-size: 11.5px; color: #8b949e; overflow-wrap: anywhere; }
.ob-items { font-size: 12px; color: #8b949e; }
.ob-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.ob-tag { font-size: 11px; font-weight: 600; border-radius: 5px; padding: 2px 7px; background: #1c2129;
  color: #8b949e; border: 1px solid #21262d; }
.ob-tag--warn { color: #ffa657; border-color: #5a3d1e; background: #22190f; }
.ob-tag--bad { color: #ff7b72; border-color: #5c2a27; background: #231312; }
.ob-tag--ok { color: #7ee787; border-color: #2f5d38; background: #102016; }
.ob-tag--club { color: #d2a8ff; border-color: #4b3a66; background: #1b1626; }
.ob-link { color: inherit; text-decoration: none; }
.ob-link:hover { color: #58a6ff; }
.ob-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: #8b949e; }
.ob-age--late { color: #ffa657; font-weight: 600; }
.ob-track { flex: 1 1 110px; min-width: 0; font: 500 11.5px ui-monospace, monospace; background: #0d1117;
  color: #e6edf3; border: 1px solid #30363d; border-radius: 6px; padding: 5px 8px; }
.ob-btn { margin-left: auto; font-size: 12px; font-weight: 600; border-radius: 7px; padding: 6px 11px;
  background: #58a6ff; color: #0d1117; border: 0; cursor: pointer; white-space: nowrap; }
.ob-btn:hover { filter: brightness(1.1); }
.ob-btn--muted { background: #1c2129; color: #8b949e; border: 1px solid #30363d; }
.ob-settings { margin-top: 22px; }
.ob-settings > summary { cursor: pointer; font-size: 13px; color: #8b949e; padding: 8px 0; }
.ob-settings[open] > summary { margin-bottom: 10px; }

/* ── Page Conversations (2026-10-09) ─────────────────────────────────────── */
.cv-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.cv-title { font-size: 22px; margin: 0; }
.cv-search { flex: 0 1 300px; padding: 8px 12px; font-size: 13px; background: #161b22; color: #e6edf3;
  border: 1px solid #30363d; border-radius: 8px; }
.cv-hint { font-size: 12px; }
.cv-muted { color: #8b949e; font-size: 12px; }
.cv-split { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .cv-split { grid-template-columns: 1fr; } }
.cv-list { background: #161b22; border: 1px solid #30363d; border-radius: 12px; overflow: hidden;
  max-height: 75vh; overflow-y: auto; }
.cv-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; align-items: center;
  width: 100%; text-align: left; padding: 11px 14px; border: 0; border-bottom: 1px solid #21262d;
  background: transparent; color: #e6edf3; font: inherit; cursor: pointer; }
.cv-item:hover { background: #1c2129; }
.cv-item--sel { background: #12233a; box-shadow: inset 3px 0 0 #58a6ff; }
.cv-av { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 12px; background: #1c2129; color: #8b949e; }
.cv-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; font-size: 13.5px; }
.cv-name-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-dot { width: 8px; height: 8px; border-radius: 50%; background: #ffa657; flex-shrink: 0; }
.cv-kind { font-size: 10.5px; font-weight: 600; border-radius: 5px; padding: 1px 6px; border: 1px solid #21262d; color: #8b949e; }
.cv-kind--club { color: #d2a8ff; border-color: #4b3a66; }
.cv-kind--pro { color: #58a6ff; border-color: #1f4a7a; }
.cv-when { font-size: 11.5px; color: #8b949e; }
.cv-last { grid-column: 2 / 4; font-size: 12.5px; color: #8b949e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-dir--in { color: #ffa657; font-weight: 600; }
.cv-thread { background: #161b22; border: 1px solid #30363d; border-radius: 12px; display: flex; flex-direction: column;
  min-height: 520px; min-width: 0; }
.cv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid #21262d; }
.cv-who { font-weight: 700; font-size: 15px; }
.cv-actions { margin-left: auto; display: flex; gap: 8px; }
.cv-msgs { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow-y: auto; }
.cv-day { align-self: center; font-size: 11px; color: #8b949e; background: #1c2129; border-radius: 999px; padding: 2px 10px; }
.cv-msg { max-width: 78%; border-radius: 12px; padding: 10px 13px; display: flex; flex-direction: column; gap: 5px;
  border: 1px solid #21262d; min-width: 0; }
.cv-msg--in { background: #1f2a37; align-self: flex-start; border-top-left-radius: 4px; }
.cv-msg--out { background: #0f2a46; align-self: flex-end; border-top-right-radius: 4px; border-color: #1f4a7a; }
.cv-msg--sys { align-self: center; background: transparent; border: 1px dashed #30363d; max-width: 92%;
  font-size: 12px; color: #8b949e; padding: 5px 12px; }
.cv-meta { font-size: 11px; color: #8b949e; }
.cv-meta b { color: #e6edf3; font-weight: 600; }
.cv-txt { font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cv-quoted > summary { cursor: pointer; font-size: 11.5px; color: #8b949e; }
.cv-quoted .cv-txt { font-size: 12px; color: #8b949e; margin-top: 6px; }
.cv-att { font-size: 11.5px; color: #8b949e; }
.cv-composer { flex-direction: column; gap: 8px; border-top: 1px solid #21262d; padding: 12px 16px; }
.cv-input { width: 100%; padding: 8px 12px; font-size: 13px; background: #0d1117; color: #e6edf3;
  border: 1px solid #30363d; border-radius: 8px; box-sizing: border-box; }
.cv-textarea { width: 100%; min-height: 110px; padding: 10px 12px; font-size: 13px; background: #0d1117; color: #e6edf3;
  border: 1px solid #30363d; border-radius: 8px; box-sizing: border-box; font-family: inherit; }
.cv-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cv-grow { flex: 1; }
.cv-btn { font-size: 13px; font-weight: 600; border-radius: 7px; padding: 8px 16px; background: #58a6ff; color: #0d1117;
  border: 0; cursor: pointer; }
.cv-btn2 { font-size: 12.5px; border-radius: 7px; padding: 7px 12px; background: transparent; color: #e6edf3;
  border: 1px solid #30363d; cursor: pointer; }
.cv-btn2:hover { border-color: #58a6ff; }
.cv-feedback { font-size: 12.5px; min-height: 16px; color: #7ee787; }
.cv-manual > summary { cursor: pointer; font-size: 12px; color: #8b949e; padding: 4px 0; }
.cv-manual[open] { display: flex; flex-direction: column; gap: 8px; }
.cv-empty { font-size: 13px; color: #8b949e; padding: 18px 16px; }

/* ── Fiche client v2 (2026-10-09) ────────────────────────────────────────── */
.cl-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-bottom: 12px; }
@media (max-width: 900px) { .cl-head { grid-template-columns: auto minmax(0, 1fr); } .cl-qa { grid-column: 1 / -1; justify-content: flex-start; } }
.cl-av { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 18px;
  background: #12233a; color: #58a6ff; border: 1px solid #1f4a7a; }
.cl-idn { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cl-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cl-name { font-size: 22px; margin: 0; overflow-wrap: anywhere; }
.cl-pill { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 9px; border: 1px solid #30363d; color: #8b949e; }
.cl-pill--ok { color: #7ee787; border-color: #2f5d38; }
.cl-pill--bad { color: #ff7b72; border-color: #5c2a27; }
.cl-pill--warn { color: #ffa657; border-color: #5a3d1e; background: #22190f; }
.cl-pill--blue { color: #58a6ff; border-color: #1f4a7a; }
.cl-pill--violet { color: #d2a8ff; border-color: #4b3a66; }
.cl-contact { font-size: 12.5px; color: #8b949e; display: flex; gap: 14px; flex-wrap: wrap; overflow-wrap: anywhere; }
.cl-qa { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cl-qbtn { font-size: 12.5px; border-radius: 8px; padding: 7px 11px; background: #161b22; border: 1px solid #30363d;
  color: #e6edf3; cursor: pointer; text-decoration: none; }
.cl-qbtn:hover { border-color: #58a6ff; }
.cl-qbtn--primary { background: #58a6ff; color: #0d1117; border-color: #58a6ff; font-weight: 600; }
.cl-alerts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cl-alerts:empty { display: none; }
.cl-alert { font-size: 12.5px; border-radius: 8px; padding: 6px 11px; border: 1px solid; }
.cl-alert--warn { color: #ffa657; border-color: #5a3d1e; background: #22190f; }
.cl-alert--info { color: #58a6ff; border-color: #1f4a7a; background: #0f1d2e; }
.cl-body { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .cl-body { grid-template-columns: 1fr; } }
.cl-main { min-width: 0; }
.cl-tabs { display: flex; gap: 2px; border-bottom: 1px solid #21262d; margin-bottom: 12px; flex-wrap: wrap; }
.cl-tabs .dash-options-list-option { padding: 0; margin: 0; background: none; border: 0; }
.cl-tabs .dash-options-list-option-wrapper { display: none; }
.cl-tab { display: inline-block; padding: 9px 13px; font-size: 13px; color: #8b949e; border-bottom: 2px solid transparent; cursor: pointer; }
.cl-tabs .dash-options-list-option.selected .cl-tab { color: #e6edf3; border-bottom-color: #58a6ff; font-weight: 600; }
.cl-card { background: #161b22; border: 1px solid #30363d; border-radius: 12px; display: flex; flex-direction: column; min-width: 0; }
.cl-pad { padding: 12px 14px; gap: 8px; }
.cl-composer { display: flex; }
.cl-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cl-h3 { font-size: 12px; color: #8b949e; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.cl-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cl-kpis > div { background: #1c2129; border-radius: 8px; padding: 8px 10px; }
.cl-kl { font-size: 11px; color: #8b949e; }
.cl-kv { font: 600 15px ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.cl-kvlist { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; font-size: 12.5px; }
.cl-kvlist > span:nth-child(odd) { color: #8b949e; }
.cl-kvlist a { color: #58a6ff; }
.cl-pinned { font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cv-msg--note { align-self: center; max-width: 86%; background: #1d1a10; border-color: #4d4320; }
.cv-kind--new { color: #ffa657; border-color: #5a3d1e; }
.cv-list--full { max-height: none; }
.cv-list--full .cv-item { text-decoration: none; box-sizing: border-box; }
.cv-msgs--bottom { flex-direction: column-reverse; }

/* ── Clients & prospects + étapes du parcours (lot 2, 2026-10-09) ───────── */
.cl-stage { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 9px; border: 1px solid #30363d; color: #8b949e; margin-left: 6px; }
.cl-stage--contact { color: #ffa657; border-color: #5a3d1e; background: #22190f; }
.cl-stage--discussion { color: #58a6ff; border-color: #1f4a7a; background: #0f1d2e; }
.cl-stage--devis { color: #d2a8ff; border-color: #4b3a66; background: #1b1626; }
.cl-stage--client { color: #7ee787; border-color: #2f5d38; background: #102016; }
.cl-stage--fidele { color: #0d1117; border-color: #7ee787; background: #7ee787; }
.cl-stage--pause { color: #8b949e; border-color: #484f58; }
.cl-stage--perdu { color: #ff7b72; border-color: #5c2a27; background: #231312; }
.cl-steps { display: flex; background: #161b22; border: 1px solid #30363d; border-radius: 10px; overflow: hidden; margin-bottom: 8px; flex-wrap: wrap; }
.cl-step { flex: 1 1 120px; padding: 7px 12px; font-size: 12px; color: #8b949e; border-right: 1px solid #21262d; }
.cl-step:last-child { border-right: 0; }
.cl-step--done { color: #7ee787; }
.cl-step--cur { background: #12233a; color: #e6edf3; font-weight: 600; box-shadow: inset 0 -2px 0 #58a6ff; }
.cl-crm-edit { margin-bottom: 10px; }
.cl-crm-edit > summary { cursor: pointer; font-size: 12px; color: #8b949e; }
.cl-crm-edit[open] > summary { margin-bottom: 8px; }
.clist { background: #161b22; border: 1px solid #30363d; border-radius: 12px; overflow-x: auto; }
.clist-row { display: grid; grid-template-columns: minmax(220px, 2fr) 140px 140px 110px 90px minmax(160px, 1.5fr); gap: 12px;
  align-items: center; padding: 10px 16px; border-bottom: 1px solid #21262d; font-size: 13px; color: #e6edf3;
  text-decoration: none; min-width: 900px; box-sizing: border-box; }
.clist-row:hover { background: #1c2129; }
.clist-row:last-child { border-bottom: 0; }
.clist-row--head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #8b949e; background: #12171e; }
.clist-row--head:hover { background: #12171e; }
.clist-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.clist-who { display: flex; flex-direction: column; min-width: 0; }
.clist-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clist-mail { font-size: 11.5px; color: #8b949e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clist-row .cl-stage { margin-left: 0; justify-self: start; }
.clist-type, .clist-when { font-size: 12.5px; color: #8b949e; }
.clist-num { font: 600 12.5px ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.clist-task { font-size: 12px; color: #8b949e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clist-task--late { color: #ff7b72; font-weight: 600; }

/* ── Contacts d'une organisation (lot 3, 2026-10-09) ─────────────────────── */
.cl-contact-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 7px 0; border-bottom: 1px solid #21262d; font-size: 13px; }
.cl-contact-row:last-of-type { border-bottom: 0; }
.cl-contact-del { background: transparent; border: 0; color: #8b949e; cursor: pointer; font-size: 13px; }
.cl-contact-del:hover { color: #ff7b72; }

/* ══ Refonte « esprit CRM » étape 1 (2026-10-09) : menu latéral + accueil ══ */
.adm-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.adm-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  background: #0a0e13; border-right: 1px solid #21262d; padding: 14px 10px 10px; box-sizing: border-box; z-index: 40; }
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; color: #e6edf3; text-decoration: none;
  font-weight: 800; font-size: 16px; letter-spacing: .01em; }
.adm-logo { width: 28px; height: 28px; border-radius: 8px; background: #7e0000; color: #fff; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; }
.adm-search { position: relative; padding: 0 2px 8px; }
.adm-search input, .adm-search-in { width: 100%; box-sizing: border-box; background: #161b22; color: #e6edf3;
  border: 1px solid #30363d; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; }
.adm-search #global-search-results { left: 0; right: auto; width: min(560px, calc(100vw - 32px)); }
.adm-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; }
.adm-space-h, .adm-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  text-decoration: none; color: #8b949e; font-size: 13.5px; }
.adm-space-h:hover, .adm-item:hover { background: #161b22; color: #e6edf3; }
.adm-space--open > .adm-space-h { color: #e6edf3; font-weight: 700; }
.adm-ic { width: 20px; text-align: center; flex-shrink: 0; }
.adm-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-count { font-size: 10.5px; font-weight: 700; color: #fff; background: #ff7b72; border-radius: 999px; padding: 1px 7px; }
.adm-items { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 8px 12px; padding-left: 8px; border-left: 1px solid #21262d; }
.adm-item { padding: 6px 10px; font-size: 13px; }
.adm-item > span[title] { margin-left: auto; }
.adm-item--on { background: #12233a; color: #e6edf3; font-weight: 600; box-shadow: inset 3px 0 0 #58a6ff; }
.adm-me { display: flex; align-items: center; gap: 8px; padding: 10px 6px 2px; border-top: 1px solid #21262d; min-width: 0; }
.adm-me-av { width: 26px; height: 26px; border-radius: 50%; background: #1c2129; color: #e6edf3; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; flex-shrink: 0; }
.adm-me-mail { flex: 1; min-width: 0; font-size: 11.5px; color: #8b949e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-logout { background: transparent; border: 1px solid #30363d; color: #e6edf3; border-radius: 7px; padding: 4px 8px;
  font-size: 11.5px; cursor: pointer; }
.adm-logout:hover { border-color: #ff7b72; color: #ff7b72; }
.adm-main { min-width: 0; }
.adm-content { max-width: 1200px; margin: 0 auto; padding: 24px; }
.adm-top { display: none; }
@media (max-width: 900px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-side { position: fixed; left: 0; top: 0; width: 270px; transform: translateX(-105%); transition: transform .2s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
  .adm-side--open { transform: none; }
  .adm-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #161b22; border-bottom: 1px solid #30363d;
    position: sticky; top: 0; z-index: 30; }
  .adm-burger { background: none; border: 1px solid #30363d; border-radius: 6px; color: #e6edf3; font-size: 15px; padding: 5px 11px; cursor: pointer; }
  .adm-top-brand { color: #e6edf3; text-decoration: none; font-weight: 700; }
  .adm-content { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .adm-side { transition: none; } }

/* Accueil « Aujourd'hui » */
.td-greet { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.td-greet h1 { font-size: 26px; margin: 0; }
.td-greet span { font-size: 13.5px; color: #8b949e; }
.td-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.td-kpi { background: #161b22; border: 1px solid #30363d; border-radius: 12px; padding: 13px 15px; display: flex; flex-direction: column; gap: 4px; }
.td-kpi-l { font-size: 12px; color: #8b949e; }
.td-kpi-v { font: 600 23px/1.15 ui-monospace, "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; }
.td-kpi-s { font-size: 11.5px; color: #8b949e; }
.td-kpi-s--up { color: #7ee787; }
.td-kpi-s--down { color: #ff7b72; }
.td-spark { height: 26px; display: flex; align-items: flex-end; gap: 3px; }
.td-spark i { flex: 1; background: #1f3a5c; border-radius: 2px; }
.td-spark i:last-child { background: #58a6ff; }
.td-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .td-cols { grid-template-columns: 1fr; } }
.td-card { background: #161b22; border: 1px solid #30363d; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.td-card h2 { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8b949e;
  display: flex; justify-content: space-between; }
.td-card h2 span { text-transform: none; letter-spacing: 0; font-weight: 500; color: #5f6a76; }
.td-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px;
  border-radius: 10px; background: #0d1117; border: 1px solid #21262d; text-decoration: none; color: #e6edf3; }
.td-row:hover { border-color: #484f58; }
.td-row--hot { border-color: #5c2a27; background: #1a1213; }
.td-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; background: #1c2129; }
.td-row--hot .td-ic { background: #2a1513; }
.td-txt { display: flex; flex-direction: column; min-width: 0; }
.td-txt b { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.td-txt small { font-size: 12px; color: #8b949e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-go { font-size: 12px; font-weight: 600; color: #0d1117; background: #58a6ff; border-radius: 7px; padding: 5px 10px; white-space: nowrap; }
.td-empty { font-size: 13.5px; color: #7ee787; padding: 6px 2px; }
.td-ev { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid #21262d;
  font-size: 13px; align-items: baseline; }
.td-ev:last-child { border-bottom: 0; }
.td-ev-ic { text-align: center; }
.td-ev-txt { overflow-wrap: anywhere; }
.td-ev-txt a { color: #e6edf3; text-decoration: none; }
.td-ev-txt a:hover { color: #58a6ff; }
.td-ev-at { font-size: 11.5px; color: #8b949e; white-space: nowrap; }

/* ── Pipeline & Affaires (refonte étape 3, 2026-10-09) ──────────────────── */
.pl-board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)) auto; gap: 10px; align-items: start; min-width: 1120px; }
.pl-col { background: #10151c; border: 1px solid #21262d; border-radius: 12px; padding: 10px; display: flex; flex-direction: column;
  gap: 8px; min-width: 0; }
.pl-col-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; padding: 0 2px 2px; }
.pl-col--side { width: 150px; }
.pl-col--side[open] { width: 240px; }
.pl-col--side > summary { cursor: pointer; list-style: none; color: #8b949e; }
.pl-col--side > summary::-webkit-details-marker { display: none; }
.pl-side-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pl-card { background: #161b22; border: 1px solid #30363d; border-radius: 10px; padding: 9px 10px; display: flex; flex-direction: column;
  gap: 4px; text-decoration: none; color: #e6edf3; min-width: 0; }
.pl-card:hover { border-color: #58a6ff; }
.pl-r1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pl-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-type { font-size: 11px; color: #8b949e; }
.pl-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: #8b949e; }
.pl-task { font-size: 11.5px; color: #8b949e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-task--late { color: #ff7b72; font-weight: 600; }
.af-list { display: flex; flex-direction: column; }
.af-row { display: grid; grid-template-columns: minmax(200px, 1.3fr) minmax(220px, 1.6fr) 150px minmax(300px, 2fr) 90px; gap: 12px;
  align-items: center; padding: 10px 16px; border-bottom: 1px solid #21262d; font-size: 13px; min-width: 1000px; box-sizing: border-box; }
.af-row:last-child { border-bottom: 0; }
.af-row--head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #8b949e; background: #12171e; }
.af-row a { color: #e6edf3; text-decoration: none; }
.af-row a:hover { color: #58a6ff; }
.af-who { display: flex; align-items: center; flex-wrap: wrap; min-width: 0; font-weight: 600; }
.af-title { display: flex; flex-direction: column; min-width: 0; }
.af-title small { font-size: 11.5px; color: #8b949e; }
.af-steps { display: flex; gap: 3px; flex-wrap: wrap; }
.af-step { font-size: 10.5px; padding: 3px 7px; border-radius: 5px; background: #1c2129; color: #5f6a76; border: 1px solid #21262d; }
.af-step--done { color: #7ee787; border-color: #2f5d38; background: #102016; }
.af-step--cur { color: #0d1117; background: #58a6ff; border-color: #58a6ff; font-weight: 700; }
.cl-deal { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px solid #21262d; font-size: 13px; }
.cl-deal:last-child { border-bottom: 0; }

/* ── Onglets des pages regroupées (refonte étape 4, 2026-10-09) ─────────── */
.adm-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid #21262d; margin: -6px 0 18px; }
.adm-tab { padding: 9px 14px; font-size: 13px; color: #8b949e; text-decoration: none; border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; }
.adm-tab:hover { color: #e6edf3; }
.adm-tab--on { color: #e6edf3; font-weight: 700; border-bottom-color: #58a6ff; }

/* Clients & prospects : création d'une fiche à la main (2026-10-12) */
.clist-new { margin: 0 0 12px; }
.clist-new > summary { display: inline-block; list-style: none; cursor: pointer; }
.clist-new > summary::-webkit-details-marker { display: none; }
.clist-new-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 14px 16px; max-width: 860px;
  background: #161b22; border: 1px solid #30363d; border-radius: 8px; }
.clist-new-f { flex: 1 1 220px; width: auto; min-width: 0; }
.clist-new-note { min-height: 70px; }

/* Fiche client : pièces jointes des notes et des courriels (2026-10-12) */
.cl-upload { font-size: 12.5px; color: #8b949e; border: 1px dashed #30363d; border-radius: 7px; padding: 6px 12px; cursor: pointer; }
.cl-upload:hover { border-color: #58a6ff; color: #e6edf3; }
.cl-progress { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; color: #8b949e; }
.cl-progress[hidden] { display: none; }
#client-compose-submit:disabled { opacity: .5; cursor: default; }
.cl-progress-track { flex: 1 1 auto; height: 8px; min-width: 80px; background: #21262d; border-radius: 4px; overflow: hidden; }
.cl-progress-fill { width: 0; height: 100%; background: #58a6ff; border-radius: 4px; transition: width .2s linear; }
.cl-progress.busy .cl-progress-fill { animation: cl-progress-pulse 1.2s ease-in-out infinite; }
.cl-progress.failed { color: #ff7b72; }
.cl-progress.failed .cl-progress-fill { background: #ff7b72; }
@keyframes cl-progress-pulse { 50% { opacity: .45; } }
.cv-att a { color: #58a6ff; text-decoration: none; }
.cv-att a:hover { text-decoration: underline; }

/* ─── Éditeur de texte enrichi des courriels (rich_editor.js, 2026-10-18) ─── */
.rte { border: 1px solid #30363d; border-radius: 8px; background: #0d1117; overflow: hidden; }
.rte:focus-within { border-color: #58a6ff; }
.rte-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 5px; background: #1c2129;
  border-bottom: 1px solid #30363d; }
.rte-tools button { font: inherit; font-size: 12.5px; min-width: 30px; height: 28px; padding: 0 8px; border-radius: 5px;
  border: 1px solid transparent; background: transparent; color: #e6edf3; cursor: pointer; }
.rte-tools button:hover:not(:disabled) { background: #ffffff14; }
.rte-tools button:focus-visible { outline: 2px solid #58a6ff; outline-offset: 1px; }
.rte-tools button:disabled { opacity: .35; cursor: default; }
.rte-sep { width: 1px; align-self: stretch; background: #30363d; margin: 4px; }
.rte-grow { flex: 1; }
.rte-tools .rte-toggle { color: #58a6ff; }
.rte-area { min-height: 140px; padding: 10px 12px; font-size: 13.5px; line-height: 1.55; color: #e6edf3; outline: none;
  overflow-wrap: anywhere; }
.rte-area p { margin: 0 0 8px; }
.rte-area ul, .rte-area ol { margin: 0 0 8px; padding-left: 22px; }
.rte-area a { color: #58a6ff; }
.rte-area.rte-empty::before { content: attr(data-placeholder); color: #6e7681; pointer-events: none; }
.rte.rte-html { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* Message mis en forme réaffiché dans l'Admin (rich_text.display). */
.rt-body { white-space: normal; }
.rt-body p { margin: 0 0 6px; }
.rt-body p:last-child { margin-bottom: 0; }
.rt-body ul, .rt-body ol { margin: 0 0 6px; padding-left: 20px; }
.rt-body a { color: #58a6ff; }

/* Vue d'ensemble (/vue-ensemble, layout_overview.py) */
.ov-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ov-head .ob-chips { margin-bottom: 0; }
.ov-wrap { display: grid; gap: 14px; }
.ov-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; }
@media (max-width: 1100px) { .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ov-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.ov-span-4 { grid-column: span 4; } .ov-span-5 { grid-column: span 5; } .ov-span-6 { grid-column: span 6; }
.ov-span-7 { grid-column: span 7; } .ov-span-8 { grid-column: span 8; } .ov-span-12 { grid-column: span 12; }
.ov-stack { display: grid; gap: 12px; align-content: start; min-width: 0; }
@media (max-width: 1100px) { .ov-grid > div { grid-column: span 12; } }
.ov-bar { display: grid; grid-template-columns: minmax(110px, 200px) 1fr auto; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 6px; }
.ov-track { height: 14px; background: #1c2129; border-radius: 0 4px 4px 0; }
.ov-track div { height: 100%; background: #58a6ff; border-radius: 0 4px 4px 0; }
.ov-n { font: 13px ui-monospace, "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ov-n small { color: #8b949e; font-size: 11px; margin-left: 6px; }
.ov-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #30363d; font-size: 13px; }
.ov-row:last-child { border-bottom: 0; }
.ov-row > span:last-child { font-family: ui-monospace, "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ov-link { color: #58a6ff; text-decoration: none; }
.ov-link:hover { text-decoration: underline; }
