  /* ============================================================
     EN PRODUCTION · phase chantier actif
     Tableau dynamique des fiches en stage='production'.
     Skeleton identique a Demandes d estimation et Nouveaux contrats.
     Cartes : avancement / budget / marge avec barres de progression.
     ============================================================ */

  .content { background: var(--surface-soft) !important; padding: 0 !important; }
  .pipeline-wrap {
    padding: var(--space-lg) var(--space-xl) var(--space-xxl);
    background: var(--surface-soft);
    min-height: 100%;
  }

  /* Stage nav · meme style que index.html */
  .stage-nav {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-bottom: var(--space-lg);
  }
  .stage-nav a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--r-pill);
    font-size: 13px; font-weight: 500; text-decoration: none;
    border: 1px solid var(--hairline);
    background: var(--canvas); color: var(--body);
    transition: all 0.15s;
  }
  .stage-nav a:hover { border-color: var(--primary); color: var(--primary); }
  .stage-nav a.active {
    background: var(--primary); border-color: var(--primary);
    color: #fff; font-weight: 600;
  }
  .stage-nav a .count {
    background: rgba(255,255,255,0.25); border-radius: var(--r-pill);
    padding: 1px 7px; font-size: 11px; font-family: var(--font-display); font-variant-numeric: tabular-nums;
    min-width: 20px; text-align: center;
  }
  .stage-nav a:not(.active) .count {
    background: var(--surface-strong); color: var(--muted);
  }

  /* Filter bar */
  .filters-bar {
    display: flex; align-items: center; gap: var(--space-xs);
    flex-wrap: wrap; margin-bottom: var(--space-base);
  }
  /* Groupe recherche · input + bouton Filtre (pastille) dans un seul pill */
  .search-group {
    display: flex; align-items: center;
    flex: 1; max-width: 560px;
    height: 47px; padding-right: 5px;
    border: 1px solid var(--hairline); border-radius: var(--r-pill);
    background: var(--canvas);
    transition: border-color 0.15s;
  }
  .search-group:focus-within { border-color: var(--primary); }
  .search-group input[type="search"] {
    flex: 1; min-width: 0; height: 100%;
    border: none; background: transparent; outline: none;
    padding: 0 14px; font-size: 13px; font-family: inherit; color: var(--ink);
    border-radius: var(--r-pill);
  }
  /* Toggle de vue · maintenant dans assets/styles.css (partagé) */
  .view-toggle { margin-left: auto; }

  /* Kanban */
  .kanban-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: var(--space-base);
    margin: 0 calc(-1 * var(--space-xl));
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
    cursor: grab;
    user-select: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .kanban-scroll::-webkit-scrollbar { display: none; }
  .kanban-scroll.dragging { cursor: grabbing; scroll-behavior: auto; }
  .kanban-scroll.dragging .demande-card { pointer-events: none; }
  .kanban-board {
    display: flex; gap: 20px;
    min-width: max-content;
    align-items: flex-start;
  }
  .kanban-col { width: 300px; flex-shrink: 0; }
  .col-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 4px 10px;
  }
  .col-header-left { display: flex; align-items: center; gap: 8px; }
  .col-dot { width: 8px; height: 8px; border-radius: var(--r-full); flex-shrink: 0; }
  .col-label {
    font-size: 13px; font-weight: 500; color: var(--muted);
  }
  .col-count {
    font-size: 11px; font-family: var(--font-display); font-variant-numeric: tabular-nums;
    color: var(--muted); background: var(--surface-soft);
    border-radius: var(--r-pill); padding: 1px 7px;
  }
  .col-cards { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
  .col-empty {
    padding: 16px 12px; text-align: center;
    font-size: 11px; color: var(--muted-soft);
  }

  /* ============================================================
     CARTE PRODUCTION · barres avancement, budget, marge
     ============================================================ */
  /* `.demande-card`, `:hover`, `.card-name` et `.card-sub` vivent dans le socle
     partagé (board/index.css). Ce qui était déclaré ici ne gagnait pas la
     cascade (annulees.css, chargée après, imposait la taille du titre et des
     lignes) · la police tabulaire des lignes, elle, fuyait sur TOUS les
     tableaux et a été remontée dans le socle. */
  .board-production .card-po {
    font-size: var(--text-caption); font-family: var(--font-mono);
    color: var(--muted); margin-bottom: 2px;
  }
  .board-production .card-sub em { font-family: var(--font-body); font-style: italic; color: var(--muted-soft); }

  /* Indicateurs production sur la carte · Matériaux, Hydro-Québec, Urgence
     Affiches seulement si l'utilisateur a explicitement ajoute le livrable
     correspondant via le +Ajouter de la fiche. Etat 'fait' → vert. */
  .board-production .card-indicators {
    display: flex; align-items: center; gap: 6px;
    margin-top: 2px; margin-bottom: 10px;
    min-height: 18px;
  }
  .board-production .card-indicator {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px;
    border-radius: var(--r-full);
    background: var(--surface-soft);
    color: var(--muted);
    border: 1px solid var(--hairline);
    transition: all 0.15s;
  }
  .board-production .card-indicator.done {
    background: var(--semantic-up);
    color: var(--canvas);
    border-color: var(--semantic-up);
  }
  /* Urgence · point rouge plein, pas d'icone interne (pas de blanc dedans) */
  .board-production .card-indicator.urgent {
    background: var(--semantic-down);
    border-color: var(--semantic-down);
  }
  .board-production .card-indicator.urgent.done {
    background: var(--semantic-up);
    border-color: var(--semantic-up);
  }
  .board-production .card-indicator svg { width: 11px; height: 11px; }
  /* HQ · logo Hydro-Quebec (eclair orange), wrapper transparent par defaut */
  .board-production .card-indicator.hq {
    background: var(--canvas);
    border-color: var(--hairline);
    padding: 1px;
  }
  .board-production .card-indicator.hq svg { width: 14px; height: 14px; }
  .board-production .card-indicator.hq.done svg path { fill: var(--canvas) !important; }

  .board-production .prod-bar-row {
    margin-bottom: 8px;
  }
  .board-production .prod-bar-row:last-of-type { margin-bottom: 10px; }
  .board-production .prod-bar-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 3px;
  }
  .board-production .prod-bar-label {
    font-size: 12px; font-weight: 500; color: var(--muted);
  }
  .board-production .prod-bar-val {
    font-size: 11px; font-family: var(--font-display); font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600;
  }
  .board-production .prod-bar-val.up { color: var(--semantic-up); }
  .board-production .prod-bar-val.down { color: var(--semantic-down); }
  .board-production .prod-bar-val.warn { color: var(--accent-yellow); }
  .board-production .prod-bar {
    height: 4px; background: var(--surface-strong); border-radius: var(--r-full);
    overflow: hidden;
  }
  .board-production .prod-bar-fill {
    height: 100%; background: var(--primary); border-radius: var(--r-full);
    transition: width 0.3s;
  }
  .board-production .prod-bar-fill.up { background: var(--semantic-up); }
  .board-production .prod-bar-fill.down { background: var(--semantic-down); }
  .board-production .prod-bar-fill.warn { background: var(--accent-yellow); }

  /* Scopé · ce bloc fournissait aussi, par fuite, le pied de carte du tableau
     Projets (padding-top, filet, 11px). Projets porte désormais ses propres
     valeurs, identiques à ce qu'il affichait. */
  /* margin-top · venait de projets.css, qui fuyait jusqu'ici. Ce fichier ne
     l'a jamais déclaré, mais le pied de carte l'affichait. Repris pour ne rien
     changer (écart attrapé par la comparaison avant/après). */
  .board-production .card-foot {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--hairline-soft);
    font-size: 11px; color: var(--muted);
  }
  .board-production .card-foot .team {
    color: var(--ink); font-weight: 500;
  }
  .board-production .card-foot .dates { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: var(--text-caption); }

  /* Liste · groupes par statut (meme pattern) */
  .list-group {
    border: none;
    box-shadow: var(--shadow);
    border-radius: var(--r-xl);
    overflow: hidden;
    margin-bottom: var(--space-base);
    background: var(--canvas);
  }
  .list-group:last-child { margin-bottom: 0; }
  .list-group-head {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--hairline-soft);
    background: var(--surface-soft);
  }
  .list-group-dot { width: 7px; height: 7px; border-radius: var(--r-full); flex-shrink: 0; }
  .list-group-label { font-size: 13px; font-weight: 500; color: var(--ink); }
  .list-group-count { font-size: 11px; font-family: var(--font-display); font-variant-numeric: tabular-nums; color: var(--muted); margin-left: auto; }
  .list-table-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .list-table-scroll::-webkit-scrollbar { display: none; }
  .list-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  /* Règles de vue liste retirées · copies non scopées qui ne gagnaient jamais
     (annulees.css les écrasait). Le socle board/index.css les porte. */
  @media (max-width: 768px) { .list-table { min-width: 720px; } }

  .loading-state, .empty-state {
    text-align: center; padding: 80px 24px;
    color: var(--muted);
    font-size: 13px;
  }
  .empty-state { color: var(--muted-soft); font-style: italic; }

  @media (max-width: 768px) {
    .pipeline-wrap { padding: var(--space-lg) var(--space-base) var(--space-xxl); }
    .kanban-scroll { margin: 0 calc(-1 * var(--space-base)); padding: 0 var(--space-base) var(--space-base); }
    .kanban-col { width: 250px; }
  }

/* ============================================================
   Édition de colonnes EN CONTEXTE (admin) · mécanisme partagé
   assets/board-columns.js. Poignée de glissement, renommage en place,
   réordonnancement fluide (SortableJS), bouton « + colonne ».
   ============================================================ */
.col-label-editable { cursor: pointer; border-radius: var(--r-md); padding: 3px 8px; margin: -3px -8px; }
.col-label-editable:hover { background: var(--surface-strong); }
.col-label-editing {
  cursor: text; color: var(--ink);
  background: var(--canvas);
  outline: none;
  box-shadow: 0 0 0 1px var(--hairline);
}
.col-grip {
  cursor: grab; color: var(--muted-soft);
  font-size: 14px; line-height: 1; letter-spacing: -2px;
  padding-right: 2px; user-select: none;
  opacity: 0.5; transition: opacity 0.15s, color 0.15s;
}
.col-grip:hover { opacity: 1; color: var(--ink); }
.kanban-col.col-ghost { opacity: 0.35; background: var(--surface-strong); border-radius: var(--r-lg); }
.kanban-col.col-ghost > * { visibility: hidden; }
.kanban-col.col-chosen { cursor: grabbing; }
.btn-add-col {
  flex-shrink: 0; margin-left: var(--space-xs);
  display: inline-flex; align-items: center; gap: 5px;
  height: 44px; padding: 0 16px;
  background: var(--canvas); color: var(--body);
  border: 1px solid var(--hairline); border-radius: var(--r-pill);
  font-size: var(--text-label); white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-add-col:hover { border-color: var(--ink); color: var(--ink); }
.btn-add-col-plus { font-size: 16px; line-height: 1; }
