/* =========================
   TIMELINE — variables & reset
   ========================= */
:root{
  /* Compat JS + valeurs par défaut */
  --dayW: 24px;          /* lu par Core.DAY_W() */
  --gap: 4px;            /* lu par Core.GAP()    */
  --padX: 0px;           /* lu par Core.PADX()   */

  /* Variables module */
  --row-h: 28px;         /* hauteur d’une barre */
  --line-h: 105px;        /* hauteur d’une ligne (info + barre) */
  --row-h-mobile: 10px;         /* hauteur d’une barre */
  --line-h-mobile: 150px;        /* hauteur d’une ligne (info + barre) */

  --grid-line: rgba(255,255,255,0.05);
  --today: var(--accent);


  /* Variables thème globales attendues (déjà définies chez toi normalement) */
  /* --panel, --bg, --border, --hover, --bg, --text, --muted, --accent */
}

#board, .board, .month, .month-body, .grid, .grid-inner, .rows, .days, .row, .bar{
  box-sizing: border-box;
}

/* =========================
   Layout global / Toolbar
   ========================= */
#appRoot{ margin-top:20px; }
#appRoot.compact .row{ padding-top:4px; padding-bottom:4px; }
#appRoot.compact .bar{ height:28px; }



/* =========================
   Board + Mois
   ========================= */
#board, .board{ width:100%; max-width:1800px; margin:0 auto 24px; padding:0; display:grid; gap:4px; overflow-x:hidden; }

#monthNav { display: none;}
.month{
    --days: 31;
    margin-bottom: 14px;

}
#board > .month:first-child {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
#board > .month:last-child {
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}




.month-header{
  display:grid; grid-template-columns: 1fr auto; gap:8px; align-items:center;
  padding:0px 12px 10px 12px; 
  margin:0 ;
}
.month-title{
  display:flex; align-items:center; gap:8px; font-weight:700; font-size:16px; text-transform:capitalize; color: var(--muted);
}
.month-kebab.btn-icon{ border:0; background:transparent; padding:6px; cursor:pointer; }

.kpis{
  display:flex; gap:14px; align-items:center; justify-content:flex-end;
  color:var(--muted); 
}
.kpi-item .lucide { width:16px; height:16px; margin-right:6px; vertical-align:-2px; color:var(--accent); }

.legend{ margin:6px 12px 0; font-size:0.75rem; color:var(--text); }
.legend .dot{ display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:-1px; }
.legend .dot.ok{ background:var(--accent); }
.legend .dot.warn{ background:rgba(0,0,0,.15); }
.legend .dot.holiday{ background:#ef4444; }



/* =========================
   Bandeau des jours (header)
   ========================= */
.days{
  position:relative;
  display:grid;
  grid-template-columns: repeat(var(--days), 1fr);

  user-select:none;
  background: var(--accent-200);
  z-index: 90;
}
.day{
  text-align:center; font-size:0.72rem; padding:4px 0;
  color:var(--text);
   z-index: 1; /* 🔼 les chiffres au-dessus */
}
.day:last-child{ border-right:0; }
.day.weekend{ background: color-mix(in srgb, var(--accent) 20%, transparent); }
.day.holiday{ background: color-mix(in srgb, var(--accent) 20%, transparent); }

/* Ligne “aujourd’hui” (alignée au centre de la colonne) */
.today-line{
  position:absolute; top:0; bottom:0; width:2px; background:var(--today);
  pointer-events:none; transform: translateX(-1px);
    z-index: 0; /* 🔽 en dessous du texte */
}

/* ========================================
   Ligne du jour actuel — pleine hauteur
   ======================================== */
.today-line {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent, #4f46e5);
  opacity: 0.35;
  pointer-events: none;
  z-index: 89; /* Derrière les barres et le cercle du jour */
}

/* Le conteneur du mois doit permettre le positionnement absolu */
.month-body {
  position: relative;
}


/* =========================
   Grille (colonnes jours) + Lignes (projets)
   ========================= */
.grid{ position:relative; }
.grid-inner{
  display:grid;
  grid-template-columns: repeat(var(--days), 1fr);
  min-height:0;
  pointer-events:none; /* laisse les barres capter les clics */
}

/*.col{ border-right:1px dashed var(--grid-line); min-height:100%; } */

.col:last-child{ border-right:0; }
.col.weekend{ background:var(--weekend-bg); }
.col.holiday{ background:var(--holiday-bg); }

.rows{
  position:relative; /* plan d’empilement pour les barres */
  padding:0 var(--padX) 4px;
}

/* =========================
   Lignes + infos projet
   ========================= */
.row{
  position:relative;
  min-height:var(--line-h);
  padding:6px 0 0 0;            /* espace pour le bloc info */

  transition: height 120ms ease, margin 120ms ease;
  display: block !important;
  transition: all 0.2s ease;
  cursor: pointer;
 z-index:auto;

}
#board .row:hover{ background: var(--accent-200);}



.row-info{
    z-index: 2;
    padding: 10px 16px 4px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.row-top{ display:flex; align-items: flex-start; gap:8px; line-height:1.2; color:var(--text); }
.row-top .ico-proj{ width:16px; height:16px; opacity:.8; color:var(--accent); flex-shrink:0; }


.row-mid{ display:flex; align-items:center; gap:8px; margin-top:2px; font-size:0.85rem; color:var(--text); }


.avatar-entity{
  width:18px; height:18px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,0.15); font-size:0.7rem;
}

.row-kpis{ margin-top:2px; display:flex; flex-wrap:wrap; gap:8px 12px; font-size:0.82rem; color:var(--text); font-weight:600; }
.kpi-mini{ display:inline-flex; align-items:center; gap:6px; padding:2px 6px; border-radius:6px; background:var(--bg, rgba(255,255,255,.04)); }
.kpi-mini .lucide, .kpi-mini i{ width:14px; height:14px; }
.kpi-mini.ca{ color:var(--accent); } .kpi-mini.mat{ color:#f97316; } .kpi-mini.presta{ color:#06b6d4; } .kpi-mini.com{ color:#22c55e; }

.row-dates{ margin-top:2px; display:flex; gap:12px; font-size:0.78rem; color:var(--text);  justify-content: flex-end;}
.row-dates .lucide{ width:18px; height:18px; margin-right:4px; color:var(--accent); }
.row-dates span{ display:inline-flex; align-items:center; }

/* Kebab (bouton options ligne) */
.btn-open-projet {
  position:absolute; right:16px; top:8px;
  background: transparent; border:1px solid var(--accent); border-radius:8px; 
  color: var(--accent);
}
.btn-open-projet:hover {
  background:var(--panel);
}
/* =========================
   Barres (Gantt)
   ========================= */
.bar {
  position:absolute; z-index:1;                   /* en-dessous de row-info (z-index:2) */
  height:var(--row-h); bottom:15%;                  /* décale la barre sous les infos */
  border-radius:6px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.06));
  border:1px solid var(--border);
  box-shadow: var(--shadow-soft, none);
  color:var(--textNeg);
  display:flex; align-items:center; justify-content:center;
  font-size:0.72rem; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
  pointer-events:auto; user-select:none; cursor:grab; opacity:.98; z-index: 90;
}
.bar.confirmed, .bar.planned{ outline:2px solid color-mix(in srgb, var(--accent) 40%, transparent); }
/*.bar.planned{ outline:2px solid #dfdfdf; background: rgba(0,0,0,.10); }*/
.bar.dragging{ opacity:.9; cursor:grabbing; }
.bar.preview{ pointer-events:none; }
.bar.selected{ box-shadow:0 0 0 2px var(--accent), var(--shadow-pop, 0 6px 24px rgba(0,0,0,.35)); }

/* Badge “jours ouvrés” dans la barre */
.bar-days{
    position: absolute;
    right: 6px;
    font-size: 0.7rem;

    opacity: 1;
    background-color: inherit;
    filter: brightness(1.5);
    padding: 0px 6px 0px 6px;
    border-radius: 10px;
    pointer-events: none;
}

.bar-dates {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 30px;
    margin-left: 10px;
}

.bar {
  background: color-mix(in srgb, var(--bar-color) 25%, transparent);
  transition: outline 0.2s, box-shadow 0.2s;
}


.bar:hover {
  outline: 2px solid var(--bar-color);
  box-shadow: 0 0 10px color-mix(in srgb, var(--bar-color) 30%, transparent);
}

.bar {
  outline: 2px solid color-mix(in srgb, var(--bar-color) 50%, transparent);
  transition: opacity .2s ease, transform .2s ease;
}
.bar:hover {
  transform: scaleY(1.05);
}



/* Poignées (resize) */
.handle{ position:absolute; top:0; bottom:0; width:6px;     background-color: inherit;
    filter: brightness(1.5); opacity:0; transition:opacity .15s ease; }
.bar:hover .handle{ opacity:1; }
.handle.left{ left:0; border-radius:6px 0 0 6px; cursor:w-resize; }
.handle.right{ right:0; border-radius:0 6px 6px 0; cursor:e-resize; }

/* =========================
   Tableaux récap
   ========================= */
table.lines{
  width:100%; border-collapse:collapse; font-size:13px; margin-top:10px;
}
table.lines th, table.lines td{ padding:6px 8px; text-align:left; }
table.lines th{ background:var(--panel); color:var(--muted); position:sticky; top:0; z-index:1; }
:root.light-theme table.lines th{ background:#f1f3f5; }
table.lines tfoot td{ font-weight:700; }
table.lines input, table.lines select{
  width:100%; box-sizing:border-box; background:var(--bg); color:var(--text);
  border:1px solid var(--border); border-radius:6px; padding:6px 8px; outline:none;
}
:root.light-theme table.lines input,
:root.light-theme table.lines select{ background:#fff; color:#111; }


.card-meta .estime {
  opacity: .7;
  font-style: italic;
}

/* =========================
   Drag & Drop (placeholders / ghosts)
   ========================= */
.row.placeholder{
  border:1px dashed var(--border, #3a3f4b);
  border-radius:10px;
  background: color-mix(in srgb, var(--accent, #4f46e5) 10%, transparent);
  margin:6px 0; height:44px;
  transition: margin 120ms ease, height 120ms ease;
}

.bar, .grip{ cursor: grab; }
.month .rows.dragging .bar, .dragging .grip{ cursor: grabbing; }

.drag-ghost{
  box-shadow:0 10px 24px rgba(0,0,0,.25);
  border-radius:10px; transform: translateZ(0); will-change: transform;
  transition: transform 60ms linear;
}
.drag-ghost .bar{ visibility:visible !important; }

.v-ghost{
  position:fixed !important; z-index:2147483647 !important;
  pointer-events:none !important; opacity:.95 !important;
  box-shadow:0 10px 24px rgba(0,0,0,.25); border-radius:10px; transform: translateZ(0);
  will-change: top, left; transition:none !important;
}
.v-ghost .bar{ visibility:visible !important; opacity:1 !important; }

/* Pendant le drag vertical, cacher proprement la source */
.rows.dragging .row.drag-src .bar{ visibility:hidden !important; pointer-events:none !important; }
.rows.dragging .row.drag-src .row-info{ display:none !important; }
.rows.dragging .row.drag-src{
  min-height:0 !important; height:0 !important; margin:0 !important; padding:0 !important; border:0 !important; overflow:hidden !important;
}

/* Placeholder final (hauteur contrôlée côté JS) */
.row.placeholder{
  border:0 dashed var(--border, #3a3f4b);
  border-radius:10px;
  background: color-mix(in srgb, var(--accent, #4f46e5) 10%, transparent);
  margin:0; min-height:0; height:auto; max-height:30px !important;
}




/* =========================
   Modales 
   ========================= */

/* Boutons génériques */
.btn-icon{
  background:transparent; border:0; color:var(--text);
  border-radius:8px; padding:6px 8px 4px 8px; height: 36px; cursor:pointer; font-size:14px;
}
.btn-icon:hover{ background:rgba(255,255,255,.08); }
.btn-icon .lucide{ height:20px; width:20px; }

/* KPIs budget */
.kpi-grid{ display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.kpi .label{ color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
.kpi .val{ font-size:16px; font-weight:900; margin-top:4px; }

/* Stacks 
.stack{ display:flex; height:14px; border-radius:999px; overflow:hidden; border:1px solid var(--border); background:var(--bg); }
.stack .seg{ height:100%; }
.seg.mat{ background:#14b8a6; } .seg.presta{ background:#a78bfa; } .seg.other{ background:#f97316; } .seg.margin{ background:#22c55e; }
.stack-legend{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; font-size:12px; color:var(--muted); }
.stack-legend .dot{ width:10px; height:10px; border-radius:50%; display:inline-block; vertical-align:middle; margin-right:6px; }
.dot.mat{ background:#14b8a6; } .dot.presta{ background:#a78bfa; } .dot.other{ background:#f97316; } .dot.margin{ background:#22c55e; }
.load .stack, .stack{ background: color-mix(in srgb, var(--accent) 20%, var(--panel)) !important; }
*/
.empty {
  padding: 16px;
  color: var(--muted);
}

@media (max-width:600px){ 

  #appRoot{  padding: 0 10px;}

  .kpis, .bar.confirmed .dates, .bar.confirmed .status-chip{ display: none; } 
  .row .bar { height: 15%; bottom: 10%; }
  #board .row { min-height: 100px; padding: 10px 0; } 
  .day { font-size: 0.5rem; } 
  table.lines { font-size: 0.8rem; } 

  
  .row-kpis { font-size: 12px; } 
  .bar-days { font-size: 0.6rem; top: 0px;} 

  }
.bar-dates {
    margin-top: 3px;
}


  /* Sécurité overflow */
.month .grid,
.month .grid .rows,
.month .grid .grid-inner{ overflow:hidden; }

.month .grid .rows,.month .grid {
  display: grid;
  gap: 4px;
 
}

/* ==========================================================
   📊 MONTH ANALYTICS — fix scroll horizontal sans "push"
   ========================================================== */

.month-analytics {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  color: var(--text);
  animation: fadeInUp 0.35s ease;
  width: 100%;
  overflow: hidden; /* ✅ empêche le contenu interne de dépasser */
  box-sizing: border-box;
  position: relative;
  z-index: 90;
}

/* --- Header --- */
.month-analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.month-analytics-header h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}
.month-analytics-header .meta {
  font-size: 13px;
  opacity: 0.7;
}

/* --- KPI Band --- */
.kpi-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}
.kpi {
  background: var(--bg-alt);
  padding: 10px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;

  font-size: 13px;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
}
.kpi .lucide { color: var(--accent); opacity: 0.9; }
.kpi span { font-weight: 700; font-size: 14px; }
.kpi label { opacity: 0.6; }

/* ==========================================================
   TABLEAU RECAP — scroll horizontal natif, stable
   ========================================================== */

.table-wrapper {
  display: block;
  width: 100%;
  overflow-x: auto;                /* ✅ scroll horizontal natif */
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  margin-bottom: 16px;
  box-sizing: border-box;
}
.table-wrapper::-webkit-scrollbar {
  height: 6px;
}
.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}

/* Le tableau peut être plus large sans pousser */
.table-wrapper > .recap-table {
  width: max-content;              /* ✅ prend juste la place qu’il faut */
  min-width: 100%;                 /* ✅ jamais plus petit que le conteneur */
  border-collapse: collapse;
  table-layout: auto;
  font-size: 13px;
}

/* Colonnes */
.recap-table th,
.recap-table td {
  min-width: 90px;               /* ✅ largeur mini → scroll auto */
  padding: 8px 10px;
  text-align: right;
  white-space: nowrap;
}

.recap-table th:first-child,
.recap-table td:first-child {
  text-align: left;
  min-width: 150px;
}

/* Header sticky */
.recap-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--accent-200);
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  font-size: 12px;
}

/* Lignes alternées */
.recap-table tbody tr:nth-child(odd) {
  background: var(--bg);
}

/* Totaux */
.recap-table tfoot tr.total td {
  background: rgba(255,255,255,0.03);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-weight: 700;
}

/* Colonne marge compacte */
.recap-table th.cell-marge,
.recap-table td.cell-marge {
  min-width: 100px;
  text-align: right;
  white-space: nowrap;
}
.recap-table td.cell-marge .pct {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 4px;
}

/* Part-bar */
.part-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  margin-top: 6px;
}
.part-bar .mini-bar {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
  transition: width 0.4s ease;
}

/* Couleurs selon performance */
.part-bar[data-perf="good"] .mini-bar { background: linear-gradient(90deg,#22c55e,#16a34a); }
.part-bar[data-perf="avg"]  .mini-bar { background: linear-gradient(90deg,#facc15,#eab308); }
.part-bar[data-perf="bad"]  .mini-bar { background: linear-gradient(90deg,#ef4444,#dc2626); }

.part-bar .pct {
  position: absolute;
  right: 0;
  top: -16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted,#9ca3af);
}

/* Responsive */
@media (max-width: 900px) {
  .recap-table th, .recap-table td { padding: 6px 8px; font-size: 12px; }
  .month-analytics-header h3 { font-size: 14px; }
  .kpi-band { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .recap-table th, .recap-table td { font-size: 11px; padding: 5px 6px; }
  .part-bar .pct { display: none; }
}

/* ==========================================================
   ANIMATION
   ========================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ==========================================================
   🧩 Correctif "scroll horizontal sans push"
   ========================================================== */

/* Empêche chaque mois d’élargir le grid parent (#board) */
.month {
  width: 100%;
  min-width: 0;        /* ⚡ la ligne magique */
  overflow-x: hidden;  /* empêche tout débordement */
  box-sizing: border-box;
}

/* Empêche .month-body d’étirer le parent */
.month-body {
  width: 100%;
  min-width: 0;        /* ⚡ sinon le contenu large pousse tout */
  overflow-x: hidden;
}

/* La table scrollable reste la seule à gérer l’overflow */
.month-analytics .table-wrapper {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* ==========================================================
   🎯 LIGNE ACTIVE — Filtre projets par artiste
   ========================================================== */

.recap-table tbody tr.active {
  background: color-mix(in srgb, var(--accent) 20%, transparent) !important;
 
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

/* Accentue le nom de l'artiste sélectionné */
.recap-table tbody tr.active td:first-child strong {
  color: var(--accent);
}


/* Ajoute un léger hover même quand sélectionné */
.recap-table tbody tr.active:hover {
  background: color-mix(in srgb, var(--accent) 28%, transparent) !important;
}


/* ============================================================================
   apercu.css — styles dédiés à l’onglet APERÇU (fiche projet)
   Place ce contenu dans ton bundle CSS global, puis supprime tout injecteur JS.
   ============================================================================ */

/* Layout principal */
.apercu-layout{display:grid;grid-template-columns:2fr 1.2fr;gap:12px}
@media(max-width:1100px){.apercu-layout{grid-template-columns:1fr}}
.apercu-col{display:grid;gap:12px}

/* Cartes */


.apercu-card h4 .link-edit{font-size:12px;opacity:.9;margin-left:auto}
.link-edit{display:inline-flex;align-items:center;gap:6px;text-decoration:none}
.link-edit:hover{opacity:1}
.link-edit-group{display:inline-flex;gap:8px;margin-left:auto}

/* En‑tête du projet */
.ap-hd .title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ap-hd .title{margin:0;font-size:18px}
.ap-hd .badge{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border:1px solid var(--border);border-radius:999px;font-size:12px; color: var(--text);}
.ap-hd .badge.ok{background:rgba(34,197,94,.08)}
.ap-hd .badge.pending{background:rgba(99,102,241,.08)}
.ap-hd .sub-row,.ap-hd .dates-row{display:flex;align-items:center;gap:14px;margin-top:6px;flex-wrap:wrap}
.ap-hd .meta{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}
.dot{width:10px;height:10px;border-radius:999px;background:var(--c);border:1px solid var(--border)}

/* Carte Client */
.client-card{display:grid;gap:6px}

.client-contact{display:flex;align-items:center;gap:8px;font-size:13px}
.client-contact a{color:inherit}

/* Adresse Chantier + Map */
.apercu-addr-muted{
  margin-bottom:8px;  
    font-size: 13px;
    color: var(--text);
    padding-left: 30px;  
  }
.fiche-map{width:100%;height:220px;border:0;border-radius:12px}

/* Fiche technique */
.tech-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.tech-grid .full{grid-column:1 / -1}


/* Budget (aperçu) */
.mini-kpis{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:8px;
  margin-top:6px
}

@media(max-width:600px){.tech-grid{grid-template-columns:1fr} .mini-kpis{ grid-template-columns:repeat(3,1fr); }}

 
.mini-kpis .k {
    border-radius: 10px;
    padding: 8px;
    background: var(--accent-200);
    text-align: center;
}
.mini-kpis .k-lbl {
    display: flex;
    font-size: 0.8rem;
    color: var(--muted);
    gap: 6px;
    justify-content: center;
}
.mini-kpis .k-val {
    display: block;
    font-size: 1rem;
    color: var(--accent);
}

.bar-mini{position:relative;height:8px;border-radius:999px;background:var(--border);overflow:hidden;margin-top:10px}
.bar-mini .bar-seg{position:absolute;top:0;bottom:0}
/* Couleurs par défaut (surchargables via variables) */
.bar-mini .mat{background:var(--chart-mat,#94a3b8)}
.bar-mini .presta{background:var(--chart-presta,#60a5fa)}
.bar-mini .com{background:var(--chart-com,#f59e0b)}
.bar-mini .marge{background:var(--chart-marge,#22c55e)}
.legend.compact{margin-top:8px;font-size:12px;color:var(--muted);display:flex;gap:12px;flex-wrap:wrap}
.legend .dot{width:10px;height:10px}
.legend .dot.mat{background:var(--chart-mat,#94a3b8)}
.legend .dot.presta{background:var(--chart-presta,#60a5fa)}
.legend .dot.com{background:var(--chart-com,#f59e0b)}
.legend .dot.marge{background:var(--chart-marge,#22c55e)}

/* Listes Matériel / Prestataires */
.list-block{display:grid;gap:6px;margin-top:6px}
.row-line{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px dashed var(--border);padding:4px 0}
.row-text{ }
.row-amt{font-variant-numeric:tabular-nums}
.row-total{display:flex;align-items:center;justify-content:space-between;margin-top:8px;font-size:13px}
.empty{color:var(--muted)}

/* Documents */
.btn-doc{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border);border-radius:10px;padding:6px 10px;font-size:12px}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.file-chip{display:inline-flex; gap:6px;border:1px solid var(--border);border-radius:999px;padding:4px 8px;font-size:12px}
.more{color:var(--muted);font-size:12px}

/* Impression */
@media print{
  .tabs,.modal-footer{display:none!important}
  .apercu-card{box-shadow:none;border-color:#e5e7eb}
  .apercu-layout{grid-template-columns:1fr}
}


/* 1) Passe la grille à 1 colonne */
.apercu-layout{
  display:grid;
  grid-template-columns: 1fr;   /* ← au lieu de 2fr 1.2fr */
  gap:12px;
}

/* 2) Aplatis les wrappers de colonnes pour que toutes les cartes
      s’enchaînent dans le flux comme une seule colonne */
.apercu-col{
  display: contents;            /* ← au lieu de display:grid */
}


.lbl .lucide { 
  color: var(--accent); 
    width: 16px;
    height: 16px;
}
.lblh2 .lucide { 
  color: var(--accent); 
    width: 20px;
    height: 20px;
}

/* --- Carte Client & contacts --- */
.client-sheet {
  display: grid;
  gap: 12px;
}

.client-header {
  display: flex;
  align-items: center;
  gap: 12px;

  padding-bottom: 8px;
}

.avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.client-meta {
  flex: 1;
  min-width: 0;
}

.client-company,
.client-contact-name {
  line-height: 1.2;
}
.client-company{
  font-size: 1.2rem;
}
.client-company span {
  font-size: 0.9rem;
}
.client-contact-name {
  font-size: 0.9rem;
}



.client-infos {
  display: grid;
  gap: 6px 12px;
  padding-top: 6px;
 
}

.info-item {
  display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.info-item .lucide {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.info-item a {
  color: inherit;
  text-decoration: none;
}

.info-item a:hover {
  text-decoration: underline;
}

/* Responsive simplifié */
@media (max-width: 600px) {
  .client-infos {
    grid-template-columns: 1fr;
  }
}


/* --- Cercle coloré derrière l'icône du header modal projet --- */


.modal-header-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Cercle coloré derrière l’icône */
.modal-header .icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--textNeg);
  border-radius: 50%;
  background: var(--circle-color, var(--accent));
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}


/* Effet subtil au survol */
.modal-header .icon-circle:hover {
  transform: scale(1.08);
  transition: transform 0.2s ease;
}




/* === HEADER PROJET — version épurée et stable === */
.apercu-header.clean {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 20px 16px  0px;
}




/* --- Statut --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 15px;
  
  padding-left: 10px;
  line-height: 1.4;
}

.status-badge.ok {
  color: var(--success);
  border-left: 3px solid var(--success);
}

.status-badge.pending {
  color: var(--muted);
  border-left: 3px solid var(--muted);
}

/* --- Dates --- */
.dates {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.dates .lucide {
  width: 15px;
  height: 15px;
  opacity: 0.5;
}

.dates .sep {
  opacity: 0.4;
  margin: 0 4px;
}



/* === FICHE TECHNIQUE — version sobre & structurée === */
.apercu-tech.clean {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0 8px;
 
}

/* --- Header --- */
.tech-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}

.tech-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: 0.2px;
}

.tech-header .lucide {
  width: 16px;
  height: 16px;
  color: var(--accent-projet, var(--accent));
  opacity: 0.9;
}

/* --- Grille 3 colonnes --- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 20px;
  padding-top: 4px;
}

@media (max-width: 900px) {
  .tech-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* --- Items --- */
.tech-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
}

.tech-item .lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .2px;
}

.tech-item .lbl .lucide {
  width: 15px;
  height: 15px;
  color: var(--text);
  opacity: 0.5;
}

.tech-item .val {
  color: var(--text);
  line-height: 1.45;
  
}
.fiche-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-item, .file-chip {
  background: var(--panel);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  display: flex;

  gap: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.file-item:hover {
  background: var(--hover);
}

.file-item .lucide {
  opacity: .7;
}


.file-item {
  display: flex;

  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 6px;
  transition: background 0.25s ease;
}
.file-item:hover {
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
}

.preview-thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
}
.preview-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.file-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.file-name a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.file-info small {
  color: var(--muted);
}
.fade-in {
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
/* === Zone Drag & Drop === */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 95%, transparent);
  padding: 30px 20px;
  margin-bottom: 50px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.drop-zone .lucide {
  width: 36px;
  height: 36px;
  color: var(--accent);
  margin-bottom: 8px;
}
.drop-zone .dz-text strong {
  color: var(--text);
  font-weight: 500;
}
.drop-zone .dz-text small {
  color: var(--muted);
  opacity: 0.8;
}
.drop-zone.hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--panel));
  color: var(--accent);
}
.drop-zone.hover .lucide {
  color: var(--accent);
  transform: scale(1.1);
}
.drop-zone .lucide,
.drop-zone .dz-text {
  transition: transform 0.25s ease, color 0.25s ease;
}

#file-upload[hidden] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.file-list .file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 6px;
  background: var(--panel);
  transition: background 0.2s;
}
.file-list .file-item:hover {
  background: var(--hover);
}
.file-list .file-meta small {
  color: var(--text-muted);
}
.apercu-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.file-chip-doc {
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}

.file-chip-doc:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.file-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  overflow: hidden;
}

.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-thumb.icon .lucide {
  color: var(--accent);
  width: 32px;
  height: 32px;
}

.file-chip-meta {
  padding: 8px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.readonly-id {
  font-size: 14px;
  padding: 6px 8px;
  background: var(--bg-muted);
  border-radius: 6px;
  color: var(--text);
  user-select: text;
}

.id-devis-link {
  text-decoration: none;
  color: var(--accent);
  font-weight: 500;
}

.id-devis-link:hover {
  text-decoration: underline;
}


/* Responsive simplifié */
@media (max-width: 600px) {
.apercu-files-grid {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}
}





/* =========================
   PROJETS MODAL — CHARGES HEADER (scopé)
   ========================= */

.pm-chg-kpis{
  display:grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap:10px;
  align-items:stretch;
}

.pm-chg-item{
    display: flex;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--panel, rgba(255, 255, 255, .04));
    border: 1px solid var(--border, rgba(255, 255, 255, .08));
    min-width: 0;
    flex-direction: column;
    justify-content: space-around;
}

.pm-chg-label{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  line-height:1.1;
  color: var(--muted, #9aa0a6);

  overflow:hidden;
  text-overflow:ellipsis;
}

.pm-chg-label .lucide{
  width:16px;
  height:16px;
  flex:0 0 auto;
  color: var(--accent);

}

.pm-chg-value{
  margin-top:6px;
  font-size:15px;
  font-weight:700;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.pm-chg-value.pm-chg-input{
  display:flex;
  align-items:center;
  gap:6px;
}

.pm-chg-value.pm-chg-input input{
  width:72px;
  padding:6px 8px;
  font-size:14px;
  border-radius:10px;
  border:1px solid var(--border, rgba(255,255,255,.10));
  background: var(--bg, rgba(0,0,0,.15));
  color: inherit;
}

.pm-chg-suffix{
  font-size:12px;
  color: var(--muted, #9aa0a6);
}

@media (max-width: 1200px){
  .pm-chg-kpis{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 700px){
  .pm-chg-kpis{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-chg-item{ padding:10px; }
}



.artist-label {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-popover.noBorder {
  border: none  ;
  background: transparent !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-shadow: none ;
}


/* Dot couleur dans la première colonne */
.projets-row .id-col{
  display: flex;
  align-items: center;
  gap: 10px;
}

.projets-row .color-dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 12px;
  box-shadow: 0 0 0 2px var(--panel, #fff);
}

.rows-group-title{
  margin: 10px 0 6px;
  font-weight: 700;
  opacity: .8;
}










/* ===========================
   MINI MODAL (theme-aware, sans ombre)
   =========================== */

#miniModal{
  position:fixed;
  inset:0;
  display:none;
  z-index:9999;
  color: var(--text, rgba(255,255,255,.92));
}
#miniModal.open{ display:block; }

#miniModal .mm-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.60);
}

#miniModal .mm-panel{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);

  width:min(520px, calc(100vw - 24px));
  border-radius:16px;

  background: color-mix(in srgb, var(--panel, rgba(0,0,0,.55)) 80%, transparent);
  border:1px solid var(--border, rgba(255,255,255,.14));
  padding:12px;
}

#miniModal .mm-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;

  padding-bottom:8px;
  border-bottom:1px solid var(--line, rgba(255,255,255,.10));
}

#miniModal .mm-title{
  font-weight:900;
  letter-spacing:.2px;
}

#miniModal .mm-body{
  margin-top:10px;
  display:grid;
  gap:10px;
}

#miniModal .mm-foot{
  margin-top:12px;
  display:flex;
  justify-content:flex-end;
  gap:8px;
}

#miniModal select,
#miniModal input{
  width:100%;
  padding:10px;
  border-radius:12px;

  background: transparent;
  border:1px solid var(--line, rgba(255,255,255,.12));
  color: inherit;

  outline: none;
}

#miniModal select:focus,
#miniModal input:focus{
  border-color: var(--border, rgba(255,255,255,.18));
}





/* ===========================
   PROJETS KANBAN — CSS SCOPÉ (theme-aware)
   Tokens attendus: --bg, --panel, --text, --border, --line
   - pas de dégradé
   - pas d'ombre
   - fin, sobre, pro
   =========================== */

#projetsKanban.projets-kanban{
  /* Fallbacks si jamais un token est absent */
  --kb-bg:      var(--bg, #0b0d10);
  --kb-panel:   var(--panel, rgba(255,255,255,.04));
  --kb-text:    var(--text, rgba(255,255,255,.92));
  --kb-border:  var(--border, rgba(255,255,255,.14));
  --kb-line:    var(--line, rgba(255,255,255,.08));

  /* micro tons utilitaires */
  --kb-muted:   color-mix(in srgb, var(--kb-text) 70%, transparent);
  --kb-faint:   color-mix(in srgb, var(--kb-text) 55%, transparent);
  --kb-hover:   color-mix(in srgb, var(--kb-text) 6%, transparent);
  --kb-hover2:  color-mix(in srgb, var(--kb-text) 9%, transparent);

  
}

#projetsKanban.projets-kanban::-webkit-scrollbar{ height:10px; }
#projetsKanban.projets-kanban::-webkit-scrollbar-thumb{
  background: color-mix(in srgb, var(--kb-text) 16%, transparent);
  border-radius:999px;
}
#projetsKanban.projets-kanban::-webkit-scrollbar-track{ background: transparent; }

/* Colonne */
#projetsKanban .kb-col{

  scroll-snap-align:start;

  border-radius:16px;
  background: var(--bg);
  border: 1px solid var(--kb-border);

align-items: start;
 
}

/* Header colonne : simple, net */
#projetsKanban .kb-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px 8px;

  position:sticky;
  top:0;

  /* surface très discrète */
  background: color-mix(in srgb, var(--kb-panel) 60%, transparent);
  border-bottom: 1px solid var(--kb-line);

  border-top-left-radius:16px;
  border-top-right-radius:16px;
  z-index:2;
}

#projetsKanban .kb-title {
    font-size: 1rem;
    letter-spacing: .2px;
    white-space: nowrap;
    display: flex;
    gap: 10px;
    align-items: center;
}
#projetsKanban .kb-title .lucide {
  color: var(--accent);
}

#projetsKanban .kb-count{
    font-size: 0.78rem;
    color: var(--muted);
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--hover);
}

/* Drop zone */
#projetsKanban .kb-drop{
    padding: 10px 0;
    overflow: auto;
 
    display: flex;
    grid-template-columns: 1fr;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: 
 color-mix(in srgb, var(--kb-text) 14%, transparent) transparent;
    flex-direction: row;
    flex-wrap: wrap;
    
}
#projetsKanban .kb-drop::-webkit-scrollbar{ width:10px; }
#projetsKanban .kb-drop::-webkit-scrollbar-thumb{
  background: color-mix(in srgb, var(--kb-text) 12%, transparent);
  border-radius:999px;
}
#projetsKanban .kb-drop::-webkit-scrollbar-track{ background: transparent; }

/* Carte projet : minimal */
#projetsKanban .kb-card{
  border-radius:14px;
  border: 1px solid var(--card-accent);
  border-top: 5px solid var(--card-accent);
  background: var(--panel);
  padding:10px 10px 9px;
  width: 100%;

  user-select:none;

  transition: border-color .12s ease, background-color .12s ease;
  cursor: pointer;
}

#projetsKanban .kb-card:hover{

  background: color-mix(in srgb, var(----card-accent) 55%, transparent);
  border-color: var(--card-accent); 
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--card-accent) 35%, transparent);
}


#projetsKanban .kb-card.dragging{
  opacity:.58;
  transform: scale(.99);
}

/* Haut de carte */
#projetsKanban .kb-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

#projetsKanban .kb-name{
    font-weight: 600;
    /* font-size: 0.95rem; */
    line-height: 1.15;
}

#projetsKanban .kb-sub{
  margin-top:3px;
  font-size:0.78rem;

  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Bloc client */
#projetsKanban .kb-client{
  display:flex;
  gap:6px;
  padding: 0 10px;
  border-top: 0;
}

#projetsKanban .kb-link{
  display:inline-flex;
  align-items:center;
  gap:6px;

  border:0;
  background:transparent;
  padding:0;

  color: inherit;
  text-decoration:none;
  cursor:pointer;

  opacity:.86;
  transition: opacity .12s ease, text-decoration-color .12s ease;
}

#projetsKanban .kb-link:hover{
  opacity:1;
  text-decoration:underline;
  text-decoration-color: color-mix(in srgb, var(--kb-text) 35%, transparent);
}

#projetsKanban .kb-muted{
  color: var(--kb-faint);
  display:inline-flex;
  gap:6px;
  align-items:center;
}

#projetsKanban .kb-client .ico{
  width:16px;
  height:16px;
  opacity:.82;
}

/* Pills KPI : fines */
#projetsKanban .kb-mini{
  margin-top:10px;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

#projetsKanban .mini-pill{
  font-size:0.77rem;
  padding:3px 8px;
  border-radius:999px;

  background: transparent;
  border: 1px solid var(--kb-line);
  color: var(--kb-muted);

  white-space:nowrap;
}

#projetsKanban .mini-pill strong{
  color: var(--kb-text);
  font-weight:900;
  letter-spacing:.1px;
}

/* Actions : boutons sobres */
#projetsKanban .kb-actions{
  margin-top:10px;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

#projetsKanban .kb-actions .btn{
  padding:6px 8px;
  font-size:0.82rem;
  line-height:1;

  border-radius:10px;
  border: 1px solid var(--kb-line);
  background: transparent;
  color: inherit;

  transition: border-color .12s ease, background-color .12s ease, opacity .12s ease;
}

#projetsKanban .kb-actions .btn:hover{
  border-color: var(--kb-border);
  background: var(--kb-hover);
}

#projetsKanban .kb-actions .btn:disabled{
  opacity:.45;
  cursor:not-allowed;
}

#projetsKanban .kb-actions .btn.btn-primary{
  border-color: var(--kb-border);
  background: var(--kb-hover2);
}

#projetsKanban .kb-actions .btn.btn-primary:hover{
  background: color-mix(in srgb, var(--kb-text) 12%, transparent);
}

#projetsKanban .kb-actions .btn i.ico{
  width:16px;
  height:16px;
  opacity:.9;
}

/* Drop feedback : fin, pas agressif */
#projetsKanban .kb-col.drag-over{
  border-color: color-mix(in srgb, var(--kb-text) 26%, transparent);
  background: color-mix(in srgb, var(--kb-panel) 15%, transparent);
}

#projetsKanban .kb-col.drag-over .kb-head{
  border-bottom-color: color-mix(in srgb, var(--kb-text) 18%, transparent);
}



#projetsKanban .kb-name{
  display:flex;
  align-items:center;
  gap:8px;
}

#projetsKanban .kb-dot{
  width:10px;
  height:10px;
  border-radius:999px;

  background: var(--dot, transparent) !important;
  border: 1px solid var(--kb-line);

  flex: 0 0 10px;
}

/* si aucune couleur : dot neutre */
#projetsKanban .kb-dot:empty,
#projetsKanban .kb-dot[style=""]{
  background: transparent;
}


#projetsKanban .kb-card{
  position:relative;
}


/* Carte : plus de padding global, on gère par sections */
#projetsKanban .kb-card{
  padding:0;
  overflow:hidden; /* ✅ le header colore jusqu’au bord + coins propres */
  border-radius:14px;

  background: color-mix(in srgb, var(--kb-panel) 40%, transparent);
}


/* corps de carte */
#projetsKanban .kb-cardBody{
  padding:0 10px 10px 10px;
}


#projetsKanban.projets-kanban{ 

    display: flex;
    gap: 16px;
    display: grid;

    grid-template-columns: 1fr /*  */ 1fr /*  */ 1fr /*  */ 1fr /*  */;
  
  }


#projetsKanban .kb-card{
  padding:0;
  overflow:hidden;
  border-radius:14px;

  background: var(--panel);
}



#projetsKanban .kb-cardBody{
  padding:10px;
}

 
#projetsKanban .kb-actions .btn[data-action="open-projet"]{
  border-color: color-mix(in srgb, var(--text) 18%, transparent);
}




#projetsKanban .kb-actions{ margin-top:10px; }

#projetsKanban .btn-split{
  position:relative;
  display:inline-flex;
  width:100%;
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  background: var(--panel);
}

#projetsKanban .btn-split .btn-left,
#projetsKanban .btn-split .btn-right{
  border:0;
  background:transparent;
  color:inherit;
  padding:8px 10px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
}

#projetsKanban .btn-split .btn-left{ flex:1; justify-content:flex-start; }
#projetsKanban .btn-split .btn-right{ border-left:1px solid var(--line); }

#projetsKanban .btn-split .menu{
  position:absolute;
  left:0; right:0;
  top:calc(100% + 6px);
  background: var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:6px;
  display:none;
  z-index:50;
}

#projetsKanban .btn-split.open .menu{ display:block; }

#projetsKanban .btn-split .menu-item{
  width:100%;
  border:0;
  background:transparent;
  color:inherit;
  padding:8px 10px;
  border-radius:10px;
  display:flex;
  gap:8px;
  align-items:center;
  cursor:pointer;
}

#projetsKanban .btn-split .menu-item:hover{
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
/* Header coloré plein bord */
#projetsKanban .kb-card{ overflow:hidden; } /* important pour que le header touche les bords arrondis */



/* Actions accordéon */
#projetsKanban .kb-actions{
  margin-top: 10px;
  display:flex;
  flex-direction: column;
  gap: 8px;
}

#projetsKanban .kb-actionsBtn{
  width: 100%;
  display:flex;
  align-items:center;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

#projetsKanban .kb-actionsBtn .ico{ width:16px; height:16px; }
#projetsKanban .kb-actionsBtn .chev{ opacity:.7; }

#projetsKanban .kb-card.kb-menuOpen .kb-actionsBtn .chev{
  transform: rotate(180deg);
}

#projetsKanban .kb-menu{
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;

  max-height: 0;
  opacity: 0;
  transform: translateY(-2px);
  pointer-events: none;
  transition: max-height .18s ease, opacity .12s ease, transform .12s ease;
}

#projetsKanban .kb-card.kb-menuOpen .kb-menu{
  max-height: 520px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#projetsKanban .kb-menuItem{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  text-align:left;
}

#projetsKanban .kb-menuItem:hover{
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

#projetsKanban .kb-menuItem .ico{ width:16px; height:16px; opacity:.9; }



/* ===========================
   CARD — variables + header
   =========================== */

#projetsKanban .kb-card{
  border-radius: 12px;
  overflow: hidden; /* ✅ important pour que la couleur du header colle aux bords */
}



/* Sous-texte dans le header un peu plus doux */
#projetsKanban .kb-cardHead .kb-sub{ opacity: .9; }

/* Badge dans header : si besoin, tu peux forcer lisibilité */
#projetsKanban .kb-cardHead .status-badge{ background: rgba(0,0,0,.12); }

/* Body conserve son padding */
#projetsKanban .kb-cardBody{
  padding: 10px;
}

/* ===========================
   ACTIONS — full width, bord à bord
   =========================== */

#projetsKanban .kb-actions{
  margin-top: 10px;

  /* ✅ on annule le padding du body pour aller toucher les bords de la carte */
  margin-left: -10px;
  margin-right: -10px;
  margin-bottom: -10px;
}

/* Bouton Actions = “footer” coloré */
#projetsKanban .kb-actionsBtn{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px 12px;
  border: 0;
  cursor: pointer;

  background: color-mix(in srgb, var(--card-accent, var(--panel)) 88%, var(--panel));
  color: var(--card-accentText, var(--text));

  border-top: 1px solid color-mix(in srgb, var(--card-accent, var(--border)) 25%, var(--border));

  /* bas arrondi */
  border-radius: 0 0 12px 12px;

  /* no shadow, sobre */
}

#projetsKanban .kb-actionsBtn .ico{
  width: 16px;
  height: 16px;
}

/* chevron à droite */
#projetsKanban .kb-actionsBtn .chev{
  margin-left: auto;
  opacity: .9;
  transition: transform .15s ease;
}

/* Menu accordéon : dans le flux */
#projetsKanban .kb-menu{
  display: grid;
  gap: 8px;

  background: var(--panel);
  border-top: 1px solid var(--border);

  /* fermé */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 10px;

  transition: max-height .18s ease, opacity .12s ease, padding .18s ease;
}

/* ouvert (sur la CARD) */
#projetsKanban .kb-card.kb-menuOpen .kb-menu{
  max-height: 520px;
  opacity: 1;
  padding: 10px 10px 12px;
}

/* quand menu ouvert : le bas arrondi doit passer sur le menu, pas sur le bouton */
#projetsKanban .kb-card.kb-menuOpen .kb-actionsBtn{
  border-radius: 0;
}
#projetsKanban .kb-card.kb-menuOpen .kb-menu{
  border-radius: 0 0 12px 12px;
}

/* chevron tourne */
#projetsKanban .kb-card.kb-menuOpen .kb-actionsBtn .chev{
  transform: rotate(180deg);
}

/* items menu */
#projetsKanban .kb-menuItem{
  display: flex;
  align-items: center;
  gap: 10px;

  width: 100%;
  padding: 10px 12px;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

#projetsKanban .kb-menuItem:hover{
  background: color-mix(in srgb, var(--card-accent, var(--accent)) 10%, var(--bg));
}

#projetsKanban .kb-menuItem .ico{
  width: 16px;
  height: 16px;
}







/* ===========================
   CARD (clean) + HEADER + ACTIONS (footer)
   =========================== */

/* carte */
#projetsKanban .kb-card{
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
}

/* header plein bord coloré */
#projetsKanban .kb-cardHead{
  padding: 10px 10px 0px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
 /*
  background: color-mix(in srgb, var(--card-accent, var(--kb-panel)) 78%, var(--kb-panel));
  border-bottom: 1px solid color-mix(in srgb, var(--card-accent, var(--kb-line)) 22%, var(--kb-line));
  */


  cursor: pointer;
}

.kb-dragHandle {
  cursor: grab !important;
}
#projetsKanban .kb-cardBody{ padding: 10px; }

/* dot dans le header (si tu l’utilises là) */
#projetsKanban .kb-cardHead .kb-dot{
  border-color: color-mix(in srgb, var(--card-accentText, var(--kb-text)) 18%, transparent);
}

/* ===========================
   ACTIONS (ça doit lire comme un bouton)
   =========================== */

/* zone actions collée en bas, bord à bord */
#projetsKanban .kb-actions{
  margin-top: 10px;

  /* annule le padding du body pour toucher les bords de la carte */
  margin-left: -10px;
  margin-right: -10px;
  margin-bottom: -10px;
}

/* bouton actions : look "button" */
#projetsKanban .kb-actionsBtn{
  width: 100%;
  display:flex;
  align-items:center;
  gap:10px;

  padding: 11px 12px;
  border: 0;
  cursor: pointer;

  /* on garde la couleur projet, mais plus "CTA" */
  background: color-mix(in srgb, var(--card-accent, var(--kb-panel)) 88%, var(--kb-panel));
  color: var(--card-accentText, var(--kb-text));

  border-top: 1px solid color-mix(in srgb, var(--card-accent, var(--kb-line)) 22%, var(--kb-line));
  border-radius: 0 0 14px 14px;

  /* indices visuels de bouton */
  font-weight: 800;
  letter-spacing: .2px;
  user-select: none;
  transition: filter .12s ease, transform .12s ease;
}

#projetsKanban .kb-actionsBtn:hover{ filter: brightness(1.04); }
#projetsKanban .kb-actionsBtn:active{ transform: translateY(1px); }

#projetsKanban .kb-actionsBtn .ico{ width:16px; height:16px; opacity:.95; }
#projetsKanban .kb-actionsBtn .chev{
  margin-left: auto;
  opacity: .9;
  transition: transform .15s ease;
}
#projetsKanban .kb-card.kb-menuOpen .kb-actionsBtn .chev{ transform: rotate(180deg); }/* ===========================
   ACTIONS — vrai bouton CTA
   =========================== */

#projetsKanban .kb-actions{
  margin-top: 12px;
  display:flex;
  flex-direction: column;
  gap: 8px;

  /* ✅ on reste dans le padding du body */
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
}

/* ✅ vrai bouton (pas plein bord) */
#projetsKanban .kb-actionsBtn{
  width: fit-content;
  max-width: 100%;
  align-self: flex-start;          /* ou center si tu veux */
  display:inline-flex;
  align-items:center;
  gap:10px;

  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--card-accent, var(--kb-border)) 55%, var(--kb-border));
  background: color-mix(in srgb, var(--card-accent, var(--kb-panel)) 18%, var(--kb-panel));
  color: var(--kb-text);

  font-weight: 850;
  letter-spacing: .2px;

  cursor: pointer;
  user-select: none;

  /* ✅ “bouton” : micro relief */
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--kb-text) 10%, transparent) inset,
    0 6px 16px rgba(0,0,0,0.14);
  transition: transform .12s ease, filter .12s ease, background-color .12s ease, border-color .12s ease;
}

#projetsKanban .kb-actionsBtn:hover{
  filter: brightness(1.05);
  border-color: color-mix(in srgb, var(--card-accent, var(--kb-border)) 75%, var(--kb-border));
  background: color-mix(in srgb, var(--card-accent, var(--kb-panel)) 26%, var(--kb-panel));
}

#projetsKanban .kb-actionsBtn:active{
  transform: translateY(1px);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--kb-text) 10%, transparent) inset,
    0 3px 10px rgba(0,0,0,0.16);
}

/* icônes */
#projetsKanban .kb-actionsBtn .ico{ width:16px; height:16px; opacity:.95; }
#projetsKanban .kb-actionsBtn .chev{
  opacity: .8;
  transition: transform .15s ease;
}
#projetsKanban .kb-card.kb-menuOpen .kb-actionsBtn .chev{ transform: rotate(180deg); }

/* ===========================
   MENU — moderne, léger
   =========================== */

#projetsKanban .kb-menu{
  background: color-mix(in srgb, var(--kb-panel) 65%, transparent);
  border: 1px solid var(--kb-line);
  border-radius: 12px;

  /* fermé */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;

  pointer-events: none;
  transform: translateY(-2px);
  transition: max-height .18s ease, opacity .12s ease, padding .18s ease, transform .12s ease;
}

#projetsKanban .kb-card.kb-menuOpen .kb-menu{
  max-height: 520px;
  opacity: 1;
  padding: 6px 0;
  pointer-events: auto;
  transform: translateY(0);
}

/* items : pas de bordures imbriquées */
#projetsKanban .kb-menuItem{
  width: 100%;
  display:flex;
  align-items:center;
  gap:10px;

  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--kb-text);

  cursor: pointer;
  text-align: left;
  transition: background-color .12s ease;
}

#projetsKanban .kb-menuItem:hover{
  background: color-mix(in srgb, var(--kb-text) 6%, transparent);
}

#projetsKanban .kb-menuItem .ico{ width:16px; height:16px; opacity:.92; }
#projetsKanban .kb-menuItem + .kb-menuItem{
  border-top: 1px solid color-mix(in srgb, var(--kb-text) 7%, transparent);
}



/* Actions directes : 1 CTA + icônes */

#projetsKanban .kb-actionsRow{
    margin-top: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    flex-direction: column;
    
}

#projetsKanban .kb-actionsPrimary{
  flex: 1 1 auto;
  min-width: 160px;
  width: 100%;
}

#projetsKanban .kb-actionsSecondary{
  display:flex;
  gap:6px;
  flex: 0 0 auto;
  flex-wrap:wrap;
  justify-content:flex-end;
  display: none;
}

/* base bouton */
#projetsKanban .kb-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border: 1px solid var(--kb-line);
  background: transparent;
  color: var(--kb-text);
  padding: 5px 10px;
  border-radius: 8px;
  cursor:pointer;
  transition: filter .12s ease, background-color .12s ease, border-color .12s ease, transform .12s ease;
}

#projetsKanban .kb-btn:hover{
  background: color-mix(in srgb, var(--kb-text) 6%, transparent);
}

#projetsKanban .kb-btn:active{
  transform: translateY(1px);
}

#projetsKanban .kb-btn .ico{
  width:20px; 
  height:20px;
}
#projetsKanban .kb-actionsSecondary .kb-btn .ico{
  color: var(--accent);
}



/* CTA : teinté couleur projet mais bouton évident */
#projetsKanban .kb-btnPrimary{
  width: 100%;
  justify-content:center;
  letter-spacing: .2px;
  color: var(--card-accent, var(--kb-text));
  background: color-mix(in srgb, var(--card-accent, var(--kb-panel)) 22%, var(--kb-panel));
  border: 1px solid;
 }

 #projetsKanban .kb-btnPrimary .ico{
  width: 18px !important;
  height: 18px !important;

 }

#projetsKanban .kb-btnPrimary:hover{
  filter: brightness(1.05);
  background: color-mix(in srgb, var(--card-accent, var(--kb-panel)) 30%, var(--kb-panel));
}

/* Boutons icône = carrés discrets */
#projetsKanban .kb-btnIcon{
  padding: 8px;
  gap:0;
  width: 40px;
  height: 40px;
  justify-content:center;
}
/* Ligne "Devis TTC / Estimatif" dans le header */
#projetsKanban .kb-refline{
  display:flex;
  align-items:baseline;
  gap:8px;
  flex-wrap:wrap;
}

#projetsKanban .kb-refLabel{
  font-size:.78rem;
  opacity:.9;
  font-weight:700;
}

#projetsKanban .kb-refValue{
  font-size:.88rem;
  font-weight:900;
  letter-spacing:.2px;
}

#projetsKanban .kb-refMeta{
  font-size:.75rem;
  opacity:.75;
}

/* KPIs en grille 2x2 */
#projetsKanban .kb-kpis{
 
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:8px;
}

#projetsKanban .kb-kpisSolo{
  grid-template-columns: 1fr;
}

#projetsKanban .kpi{
  padding:0px 10px 0px 10px;
  border:1px solid var(--kb-line);
  border-radius:12px;
  background: transparent;
}

#projetsKanban .kpi-label{
  font-size:.74rem;
  color: var(--kb-muted);
  margin-bottom:2px;
}

#projetsKanban .kpi-value{
  font-size:.9rem;
  color: var(--kb-text);
}


.kb-headRight{ display:flex; flex-direction:column; gap:8px; align-items:flex-end; }
.kb-btnHeadOpen{ padding:6px; }


/* Badge confirmé / non confirmé (kanban) */

/* Icone 2x (lucide) */
.kb-confirmBadge .ico,
.kb-confirmBadge svg{
  width:18px;
  height:18px;
  stroke-width:2.4;
  color: var(--textNeg);
}


/* RESPONSIVE CARD PROJETS  */

@media (max-width:1200px){ 
  #projetsKanban.projets-kanban {
      grid-template-columns: 1fr 1fr 1fr;
  }
}
@media (max-width:900px){ 
  #projetsKanban.projets-kanban {
      grid-template-columns: 1fr 1fr;
  }
}
@media (max-width:600px){ 
  #projetsKanban.projets-kanban {
      grid-template-columns: 1fr;
  }
}

.actionSwitchView {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.lionel {
  background: var(--accent-200) !important;

}

.apercu-header .ap-row.top{
  display:flex;
  align-items:center;
  gap:12px;
}
@media (max-width:600px){ 
  .apercu-header .ap-row.top{
    display:grid;
  }
}


.apercu-header .dates{
  flex:1;
  min-width:0;
}

.apercu-header .ap-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
}

.btn-devis-top{
  white-space:nowrap;
}



.apercuClientBox {

    background: var(--bg);
    padding: 16px;
    border-radius: var(--radius);
}

#projetsKanban {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

#projetsKanban .kb-col { min-width: 0; }

 .kb-datesLine{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .7rem;
    padding: 5px 10px;
    opacity: .8;
}
.kb-datesLine .ico{
  width: 14px;
  height: 14px;
  opacity: .9;
}


.kb-card--dragging{ opacity:.55; }

.kb-dropPlaceholder{
  border: 2px dashed var(--border, rgba(255,255,255,.18));
  border-radius: 12px;
  min-height: 64px;        /* hauteur moyenne d’une card */
  margin: 8px 0;
  background: rgba(255,255,255,.04);
}

.kb-col [data-dropzone]{
  min-height: 24px;
  position: relative;
}


.apercu-card {
  margin-top: 30px;
}

#taux-com-estime {

    width: 40px;
    /* text-align: right; */
    border: 0;
    color: var(--accent);
    font-size: 1rem;
    padding: 0;
    text-align: left;

}

/* Surfaces – fiche technique client */
.ft-surfaces .ft-surface-card .lbl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ft-surfaces .ft-surface-card textarea {
  resize: vertical;
}


.postIt {
  background: #faffba !important;
  box-shadow: var(--shadow-soft) !important;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
}


/* ============================================================
   📄 APERCU — Fiche technique (PM.Render.tech)
   Cible : .apercu-card#apercuTechBox .apercu-tech .tech-grid...
   ============================================================ */

#apercuTechBox .apercu-tech{
  --tech-accent: var(--accent-projet, var(--accent, #facc15));
  --tech-bg: var(--panel, rgba(0,0,0,.02));
  --tech-muted: var(--muted, rgba(15,23,42,.65));
  --tech-radius: 16px;
  --tech-gap: 12px;

}


/* Grille principale */
#apercuTechBox .tech-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--tech-gap);
}

/* Item */


#apercuTechBox .tech-item--full{
  grid-column: 1 / -1;
}

/* Label */
#apercuTechBox .tech-item .lbl{
  display:flex;
  align-items:center;
  gap:8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--tech-text);
  opacity: .95;
  margin-bottom: 8px;
  line-height: 1.2;
}

#apercuTechBox .tech-item .lbl svg,
#apercuTechBox .tech-item .lbl .lucide{
  width: 16px;
  height: 16px;
  opacity: .9;
}

#apercuTechBox .tech-item .lbl.accent{
  position: relative;
}


/* Valeur */
#apercuTechBox .tech-item .val{
  color: var(--tech-text);
  line-height: 1.45;
  
  word-break: break-word;
}

#apercuTechBox .tech-item .val a{
  color: inherit;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--tech-accent) 60%, transparent);
  text-underline-offset: 2px;
}
#apercuTechBox .tech-item .val a:hover{
  text-decoration-color: var(--tech-accent);
}

/* Muted / séparateurs */
#apercuTechBox .muted{
  color: var(--tech-muted);
  opacity: 1;
}
#apercuTechBox .sep{
  margin: 0 6px;
  opacity: .7;
}

/* Icônes inline dans mandataire */
#apercuTechBox .ico-inline{
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 6px;
  opacity: .85;
}

/* Surfaces */
#apercuTechBox .surface-total{
  font-weight: 100;
}
#apercuTechBox .surface-total strong{
  color: var(--tech-text);
  font-weight: 100;
}

#apercuTechBox .surface-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: var(--tech-gap);
}


#apercuTechBox .surface-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 6px;
}
#apercuTechBox .surface-head strong{
    font-weight: 200;
    font-size: 0.9rem;
}

#apercuTechBox .surface-m2{
    flex: 0 0 auto;
    font-size: 0.7rem;
    color: var(--accent);
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--tech-accent) 40%, var(--tech-border));
    background: color-mix(in srgb, var(--accent) 14%, transparent);
}

#apercuTechBox .surface-meta{
    font-size: 0.8rem;
    color: var(--tech-muted);
    line-height: 1.35;
 

}
#apercuTechBox .surface-meta span{
  white-space: nowrap;
}
#apercuTechBox .surface-desc{
  margin-top: 8px;
  font-size: 13px;
  color: var(--tech-text);
  opacity: .95;
  
}

/* Responsive */
@media (max-width: 820px){
  #apercuTechBox .tech-grid{
    grid-template-columns: 1fr;
  }
  #apercuTechBox .surface-grid{
    grid-template-columns: 1fr;
  }
}
/* ===== FICHE TECH – compacité ===== */
#apercuTechBox .val,
#apercuTechBox .val * {
  line-height: 1.25;
}

#apercuTechBox .val > div {
  margin: 0;
  padding: 0;
}
#apercuTechBox .tech-item .val {
  font-size: 0.8rem;
  line-height: 1.25;
}

#apercuTechBox .tech-item .val * {
  line-height: inherit;
}

.surface-card {
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.surface-card .ico{
  width:14px; height:14px;
  vertical-align:-2px;
  margin-right:6px;
  opacity:.85;
}
.surface-meta .meta-item{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-right:14px;
  margin-top:6px;
  flex-wrap:wrap;
}
.surface-desc{
  display:flex;
  align-items:flex-start;
  gap:6px;
  margin-top:10px;
}
.surface-m2 .ico{ margin-right:6px; }


.tab-accent {
    background: var(--accent) !important;
    color: var(--textNeg) !important;
    border-radius: 0 0 8px 8px;
}





.kb-resp {
  margin-top: 10px;
  padding: 0 10px

}



.projets-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem; /* espace horizontal */
  padding: 0.5rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.projets-line .col {
  flex: 1 1 0;
  min-width: 120px; /* largeur minimum pour éviter trop de rétrécissement */
}

.projets-line .col-title {
  flex: 2 1 0; /* le titre prend plus de place */
  font-weight: bold;
}

.projets-line .col-montant,
.projets-line .col-artiste,
.projets-line .col-client,
.projets-line .col-actions {
  text-align: right; /* alignement pour chiffres ou actions */
}

.projets-line .col-actions {
  flex: 0 0 auto; /* les actions (kebab) ne prennent que la place nécessaire */
}


.kb-kebabBtn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 28px;
    border: 0;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    /* background: rgba(0, 0, 0, .06); */
    transition: all ease 0.2s;
  
}
.kb-kebabBtn:hover{ background:rgba(0,0,0,.12); }






/* ==========================================================
   PROJETS.MODAL.FACTURE.CSS
   Cockpit facturation projet
   ========================================================== */

#apercuFactuBox {
  margin-top: 18px;
}

/* bloc global */
.apercu-facturation {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.apercu-facturation h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

/* ligne responsable projet */
.factu-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.factu-summary-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.factu-summary-line .lbl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: .8;
}

/* KPI */
.factu-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.factu-kpis .k {
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.factu-kpis .k-lbl {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .92rem;
  opacity: .82;
  line-height: 1.3;
}

.factu-kpis .k-val {
  font-size: 1.1rem;
 
  line-height: 1.2;
  word-break: break-word;
}

/* panels */
.factu-panels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.factu-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;

}

.factu-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.factu-panel-head > div:first-child {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.factu-panel-head strong {
  font-size: 1rem;
}

/* table-like layout */
.factu-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.factu-head,
.factu-row {
  display: grid;
  align-items: center;
  gap: 10px;
  width: 100%;
  font-size: 0.8rem;
}

/* 9 colonnes */
.factu-head,
.factu-row {
  grid-template-columns:
    minmax(120px, 1.1fr)
    minmax(110px, 1fr)
    minmax(100px, .9fr)
    minmax(95px, .8fr)
    minmax(130px, 1.1fr)
    minmax(95px, .8fr)
   minmax(90px, .75fr)
  
}


.factu-head {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  font-size: .82rem;
 
  opacity: .8;
}

.factu-row {
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.06);
}

.factu-row > div,
.factu-head > div {
  min-width: 0;
  overflow-wrap: anywhere;
}



.factu-row a {
  text-decoration: none;
}

.factu-row a:hover {
  text-decoration: underline;
}

/* sous-ligne matériel */
.factu-subrow {
  margin-top: -2px;
  padding: 0 10px 4px 10px;
}

.factu-subrow-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 8px 6px 8px;
}

/* zone actions */
.factu-actions-cell {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.factu-actions-cell .btn,
.factu-actions-cell .btn-secondary,
.factu-action {
  white-space: nowrap;
}

/* badges */
.factu-row .status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* empty */
.apercu-facturation .empty {
  padding: 18px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  border: 1px dashed rgba(255,255,255,0.08);
  opacity: .8;
}

/* chip list */
.apercu-facturation .chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .7rem;
  line-height: 1.2;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border)
}

/* muted */
.apercu-facturation .muted {
 color: var(--muted);
 
}

/* responsive */
@media (max-width: 1200px) {
  .factu-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .factu-head,
  .factu-row {
    grid-template-columns:
      minmax(120px, 1fr)
      minmax(110px, 1fr)
      minmax(100px, .9fr)
      minmax(90px, .8fr)
      minmax(120px, 1fr)
      minmax(90px, .8fr)
      minmax(90px, .8fr)
      auto;
  }

  .factu-head > div:nth-child(8),
  .factu-row > div:nth-child(8) {
    display: none;
  }
}

@media (max-width: 860px) {
  .factu-kpis {
    grid-template-columns: 1fr;
  }

  .factu-panel {
    padding: 12px;
  }

  .factu-head {
    display: none;
  }

  .factu-row {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 10px 14px;
    padding: 14px;
  }

  .factu-row > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .factu-row > div::before {
    font-size: .75rem;
 
    opacity: .6;
    text-transform: uppercase;
    letter-spacing: .03em;
  }

  /* labels mobile selon colonnes */
  .factu-row > div:nth-child(1)::before { content: "Réf / acteur"; }
  .factu-row > div:nth-child(2)::before { content: "Type / désignation"; }
  .factu-row > div:nth-child(3)::before { content: "Statut"; }
  .factu-row > div:nth-child(4)::before { content: "Date / lignes"; }
  .factu-row > div:nth-child(5)::before { content: "Client / facture"; }
  .factu-row > div:nth-child(6)::before { content: "Montant"; }
  .factu-row > div:nth-child(7)::before { content: "Réglé"; }
  .factu-row > div:nth-child(8)::before { content: "Reste"; }
  .factu-row > div:nth-child(9)::before { content: "Action"; }

  .factu-actions-cell {
    justify-content: flex-start;
  }

  .factu-subrow {
    padding: 0 0 4px 0;
  }

  .factu-subrow-lines {
    padding: 0;
  }
}

@media (max-width: 560px) {
  .factu-row {
    grid-template-columns: 1fr;
  }

  .factu-row > div:nth-child(8) {
    display: flex;
  }

  .factu-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .factu-summary-line {
    width: 100%;
    justify-content: space-between;
  }
}



.kb-projectId {
  margin-bottom: 2px;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--card-accent);
}



.hd-project-head{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.hd-project-head__top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
}

.hd-project-head__status{
 
  flex-wrap:wrap;
}

.hd-project-head__actionsRow{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  flex-wrap:wrap;
  padding: 16px; 
  background: var(--accent-200); 
  border-radius: var(--radius);
}

.hd-project-head__primary{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:220px;
  flex:0 0 auto;
}

.hd-project-head__primary-label{
  font-size:.78rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted);
}

.hd-project-main-action{
  display:flex;
  align-items:center;
}

.hd-project-main-action__btn{
  width:auto;
  min-height:40px;
  padding:10px 14px;
  font-size:.95rem;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

.hd-project-head__secondary{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  flex:1 1 auto;
}

.hd-project-head__danger{
  margin-left:auto;
}

.hd-project-head .dates{
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}