/* ═══════════════════════════════════════════════════════════
   DOSSIERS — page « Mes dossiers » + fiche dossier
   ═══════════════════════════════════════════════════════════ */

/* ── communs ── */
.ds-loading, .ds-empty { color: var(--slate-400); text-align: center; padding: 40px 20px; font-size: 13.5px; }
.ds-error { color: var(--rose); padding: 30px; text-align: center; }
.ds-muted { color: var(--slate-400); font-size: 12.5px; }
.ds-link { color: var(--indigo); font-weight: 600; text-decoration: none; font-size: 12.5px; }
.ds-btn-sm { padding: 7px 14px !important; font-size: 12.5px !important; }
.ds-btn-xs { padding: 4px 10px !important; font-size: 11.5px !important; }
.btn-secondary.active { border-color: var(--indigo); color: var(--indigo); background: #eef2ff; }
.ds-select, .ds-inp, .ds-search {
  font: inherit; font-size: 13px; padding: 8px 10px; border: 1.5px solid var(--slate-200); border-radius: 8px;
  background: white; color: var(--slate-800); outline: none; transition: border-color .15s;
}
.ds-select:focus, .ds-inp:focus, .ds-search:focus { border-color: var(--indigo); }
.ds-search { min-width: 220px; }
.ds-inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.ds-pill {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); border: 1px solid color-mix(in srgb, var(--c) 35%, white);
}
.ds-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--slate-100); color: var(--slate-600); }
.ds-tag-projet { background: #eef2ff; color: #4338ca; }
.ds-tag-money { background: #ecfdf5; color: #047857; }
.ds-tag-prio { background: #fff1f2; color: #be123c; }
.ds-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: var(--slate-100); color: var(--slate-600); }
.ds-chip-src { background: #eef2ff; color: #4338ca; }
.ds-chip-muted { color: var(--slate-400); }
.ds-chip-warn { background: #fffbeb; color: #b45309; }
.ds-chip-danger { background: #fff1f2; color: #be123c; }
.ds-chip-ok { background: #ecfdf5; color: #047857; }
.ds-avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--indigo); color: white; font-size: 11px; font-weight: 700; }
.ds-x { background: none; border: none; color: var(--slate-400); cursor: pointer; font-size: 13px; line-height: 1; padding: 0 2px; }
.ds-x:hover { color: var(--rose); }
.nav-badge.ds-badge-hot { background: #dc2626; color: white; }

/* ── page Mes dossiers ── */
.ds-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ds-toolbar-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ds-seg { display: inline-flex; background: var(--slate-100); border-radius: 10px; padding: 3px; }
.ds-seg button { border: none; background: transparent; padding: 7px 14px; border-radius: 8px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--slate-600); cursor: pointer; }
.ds-seg button.active { background: white; color: var(--indigo); box-shadow: var(--shadow-sm); }
.ds-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.ds-kpi { background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 14px 18px; }
.ds-kpi.hot { border-color: #fecaca; background: #fff5f5; }
.ds-kpi-n { font-size: 24px; font-weight: 800; color: var(--slate-800); line-height: 1.1; }
.ds-kpi.hot .ds-kpi-n { color: #dc2626; }
.ds-kpi-l { font-size: 12px; color: var(--slate-400); margin-top: 3px; }
.ds-queue { background: white; border: 1px solid var(--slate-200); border-left: 4px solid var(--qc); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.ds-queue-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--slate-50); border-bottom: 1px solid var(--slate-100); }
.ds-queue-head.clickable { cursor: pointer; }
.ds-queue-title { font-size: 13px; font-weight: 800; color: var(--slate-800); text-transform: uppercase; letter-spacing: .04em; }
.ds-queue-count { font-size: 12px; font-weight: 700; color: var(--qc); background: color-mix(in srgb, var(--qc) 12%, white); padding: 1px 9px; border-radius: 99px; }
.ds-queue-hint { font-size: 12px; color: var(--slate-400); }
.ds-queue-toggle { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--indigo); }
.ds-row {
  display: grid; grid-template-columns: 10px minmax(0, 2.2fr) minmax(0, 1.6fr) 90px 44px 90px; gap: 14px; align-items: center;
  padding: 12px 18px; border-bottom: 1px solid var(--slate-100); cursor: pointer; transition: background .12s;
}
.ds-row:last-child { border-bottom: none; }
.ds-row:hover { background: #f8f9ff; }
.ds-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ds-row-main { min-width: 0; }
.ds-row-title { font-size: 13.5px; color: var(--slate-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-row-title strong { font-weight: 700; }
.ds-row-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.ds-row-action { font-size: 12.5px; line-height: 1.35; }
.ds-row-deadline { font-size: 12.5px; color: var(--slate-600); text-align: center; }
.ds-row-who { text-align: center; }
.ds-row-maj { font-size: 11.5px; color: var(--slate-400); text-align: right; white-space: nowrap; }
.ds-row-cta { grid-column: span 3; text-align: right; }
@media (max-width: 1100px) {
  .ds-row { grid-template-columns: 10px minmax(0, 1fr) 44px; }
  .ds-row-action { grid-column: 2; }
  .ds-row-deadline, .ds-row-maj { display: none; }
  .ds-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* ── fiche dossier (le conteneur #page-grant-detail est stylé dans app.css) ── */
.ds-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.ds-back { background: white; border: 1.5px solid var(--slate-200); border-radius: 8px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 600; color: var(--slate-600); cursor: pointer; white-space: nowrap; }
.ds-back:hover { border-color: var(--indigo); color: var(--indigo); }
.ds-head-main { flex: 1; min-width: 0; }
.ds-head-fin { font-size: 12px; font-weight: 700; color: var(--indigo); text-transform: uppercase; letter-spacing: .05em; }
.ds-head-title { font-size: 20px; font-weight: 800; color: var(--slate-800); line-height: 1.25; margin: 2px 0 8px; }
.ds-head-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ds-head-right { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.ds-status-select {
  font: inherit; font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: 10px; cursor: pointer; outline: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 10%, white); border: 2px solid color-mix(in srgb, var(--c) 45%, white);
}
.ds-stepper { display: flex; align-items: center; gap: 4px; background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; overflow-x: auto; }
.ds-step { display: flex; align-items: center; gap: 7px; background: none; border: none; padding: 6px 8px; border-radius: 8px; font: inherit; font-size: 12px; font-weight: 600; color: var(--slate-400); cursor: pointer; white-space: nowrap; }
.ds-step:hover { background: var(--slate-100); color: var(--slate-800); }
.ds-step-n { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; background: var(--slate-100); color: var(--slate-400); }
.ds-step.done .ds-step-n { background: #dcfce7; color: #15803d; }
.ds-step.done { color: var(--slate-600); }
.ds-step.current { color: var(--indigo); background: #eef2ff; }
.ds-step.current .ds-step-n { background: var(--indigo); color: white; }
.ds-step-sep { flex: 1; min-width: 10px; height: 2px; background: var(--slate-200); }
.ds-issue { border: 1.5px solid color-mix(in srgb, var(--c) 45%, white); background: color-mix(in srgb, var(--c) 8%, white); color: var(--slate-800); border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.ds-next { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: white; border: 1px solid var(--slate-200); border-left: 5px solid var(--indigo); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; }
.ds-next.hot { border-left-color: #dc2626; background: #fff7f7; }
.ds-next.warm { border-left-color: #d97706; background: #fffcf5; }
.ds-next-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-400); }
.ds-next-text { font-size: 15px; font-weight: 700; color: var(--slate-800); flex: 1; min-width: 200px; }
.ds-next.hot .ds-next-text { color: #b91c1c; }
.ds-next-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ds-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .ds-grid { grid-template-columns: 1fr; } }
.ds-main { min-width: 0; }
.ds-side { min-width: 0; }
.ds-card { background: white; border: 1px solid var(--slate-200); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.ds-card-etape { border-color: #c7d2fe; box-shadow: 0 0 0 3px #eef2ff; }
.ds-card-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14.5px; font-weight: 800; color: var(--slate-800); margin-bottom: 12px; }
.ds-card-sub { font-size: 12px; font-weight: 500; color: var(--slate-400); }
.ds-sub-title { font-size: 11.5px; font-weight: 800; color: var(--slate-400); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.ds-details > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
.ds-details[open] > summary { margin-bottom: 12px; }
.ds-details > summary::before { content: '▸'; color: var(--slate-400); margin-right: 4px; }
.ds-details[open] > summary::before { content: '▾'; }
.ds-field { display: flex; flex-direction: column; gap: 4px; }
.ds-field label { font-size: 11.5px; font-weight: 700; color: var(--slate-500, #64748b); text-transform: uppercase; letter-spacing: .04em; }
.ds-field .ds-inp, .ds-field input[type=date], .ds-field input[type=number], .ds-field select, .ds-field textarea {
  font: inherit; font-size: 13px; padding: 8px 10px; border: 1.5px solid var(--slate-200); border-radius: 8px; outline: none; width: 100%; background: white;
}
.ds-field input:focus, .ds-field select:focus, .ds-field textarea:focus { border-color: var(--indigo); }
.ds-input-eur { display: flex; align-items: center; border: 1.5px solid var(--slate-200); border-radius: 8px; overflow: hidden; background: white; }
.ds-input-eur input { border: none !important; flex: 1; min-width: 0; }
.ds-input-eur span { padding: 0 10px; color: var(--slate-400); font-weight: 700; font-size: 13px; }
.ds-hint { font-size: 11.5px; color: var(--slate-400); }
.ds-etape-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.ds-etape-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.ds-side-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.ds-qualif { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin-bottom: 14px; }
.ds-qualif > div { display: flex; flex-direction: column; }
.ds-k { font-size: 11px; font-weight: 700; color: var(--slate-400); text-transform: uppercase; letter-spacing: .04em; }
.ds-v { font-size: 13.5px; font-weight: 600; color: var(--slate-800); }
.ds-etape-ia { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--slate-50); border-radius: 10px; padding: 10px 14px; font-size: 12.5px; color: var(--slate-600); margin-top: 6px; }
.ds-progress-line { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--slate-600); margin: 6px 0 10px; }
.ds-progress { flex: 1; height: 8px; background: var(--slate-100); border-radius: 99px; overflow: hidden; }
.ds-progress > div { height: 100%; background: linear-gradient(90deg, var(--indigo), var(--emerald)); border-radius: 99px; transition: width .3s; }
.ds-progress-line a { font-size: 12px; color: var(--indigo); font-weight: 600; text-decoration: none; }
.ds-projets { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ds-linkbtn { background: none; border: 1.5px dashed var(--slate-200); border-radius: 6px; padding: 2px 8px; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--indigo); cursor: pointer; }
.ds-linkbtn:hover { border-color: var(--indigo); }
.ds-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--slate-800); cursor: pointer; }
.ds-check input { width: 15px; height: 15px; accent-color: var(--indigo); }
.ds-check-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.ds-checklist { display: flex; flex-direction: column; gap: 2px; }
.ds-notes { width: 100%; font: inherit; font-size: 13.5px; line-height: 1.6; padding: 10px 12px; border: 1.5px solid var(--slate-200); border-radius: 8px; outline: none; resize: vertical; }
.ds-notes:focus { border-color: var(--indigo); }
.ds-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--slate-100); }
.ds-kv > div { display: flex; flex-direction: column; }
.ds-kv span { font-size: 11px; color: var(--slate-400); font-weight: 600; }
.ds-kv strong { font-size: 13.5px; color: var(--slate-800); }
.ds-lignee { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--slate-800); text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--slate-100); }
.ds-lignee:hover { color: var(--indigo); }
.ds-desc { font-size: 13px; color: var(--slate-600); line-height: 1.7; white-space: pre-wrap; }
.ds-line { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--slate-100); font-size: 12.5px; }
.ds-line > span:first-child { flex: 1; }
.ds-howto { padding-left: 18px; font-size: 13px; color: var(--slate-600); line-height: 1.6; display: flex; flex-direction: column; gap: 6px; }
.ds-redac { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .ds-redac { grid-template-columns: 1fr; } }
.ds-redac-types { display: flex; flex-direction: column; gap: 6px; }
.ds-redac-result { font-size: 13.5px; color: var(--slate-600); line-height: 1.8; white-space: pre-wrap; min-height: 120px; background: var(--slate-50); border-radius: 10px; padding: 14px; }
