/* CRM BlueIa · vue « Pipeline » et composant partagé stage-actions (module pipeline). Classes préfixées .pipeline- */

/* --- Vue ------------------------------------------------------------------------------------------ */
.pipeline-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-4); }
.pipeline-toolbar__group { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.pipeline-money { font-family: var(--font-mono); letter-spacing: -0.02em; }
.pipeline-board { margin-top: var(--s-5); }
.pipeline-age { display: inline-flex; align-items: center; gap: var(--s-1); }
.pipeline-age--late { color: var(--warn-fg); font-weight: 600; }
.pipeline-hidden { display: flex; flex-direction: column; align-items: center; gap: var(--s-1); padding: var(--s-3) var(--s-2); text-align: center; color: var(--muted); font-size: var(--fs-sm); border-top: 1px dashed var(--line-strong); margin-top: var(--s-1); }

.pipeline-drawer { display: flex; flex-direction: column; gap: var(--s-3); }
.pipeline-drawer__links { display: flex; gap: var(--s-2); }

/* --- Composant : étape et devis d'un prospect (tiroir du pipeline et fiche prospect) ---------------- */
.pipeline-stage { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.pipeline-stage__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.pipeline-stage__current, .pipeline-stage__total { display: flex; flex-direction: column; gap: var(--s-1); align-items: flex-start; }
.pipeline-stage__total { align-items: flex-end; }
.pipeline-stage__total-value { font-family: var(--font-mono); font-size: var(--fs-lg); font-weight: 600; color: var(--ink); }
.pipeline-stage__hint { margin: 0; color: var(--muted); font-size: var(--fs-sm); }

.pipeline-stage__deals { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.pipeline-stage__deal { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: var(--s-3); padding: var(--s-3); border-top: 1px solid var(--line); }
.pipeline-stage__deal:first-child { border-top: 0; }
.pipeline-stage__deal.is-lost .pipeline-stage__deal-amount { color: var(--muted); text-decoration: line-through; }
.pipeline-stage__deal-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pipeline-stage__deal-num { font-family: var(--font-mono); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pipeline-stage__deal-sub { font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
.pipeline-stage__deal-amount { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; text-align: right; }
.pipeline-stage__deal-actions { display: flex; align-items: center; gap: var(--s-1); justify-content: flex-end; }
.pipeline-stage__none { padding: var(--s-4); text-align: center; color: var(--muted); font-size: var(--fs-sm); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }

.pipeline-stage__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pipeline-stage__panel { border: 1px solid var(--accent-line); background: var(--soft); border-radius: var(--r-lg); padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.pipeline-stage__panel[hidden] { display: none; }
.pipeline-stage__panel-title { font-family: var(--font-title); font-weight: 600; font-size: var(--fs-md); }

@media (max-width: 900px) {
  .pipeline-stage__deal { grid-template-columns: minmax(0, 1fr) auto; }
  .pipeline-stage__deal-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
