.bdp-workspace { color:#302642; display:grid; gap:.8rem; min-width:0; }
.modal:has(.bdp-workspace) { width:min(960px,96vw); max-width:100%; }
.bdp-workspace nav,.bdp-tools,.bdp-workspace footer { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
.bdp-workspace nav span { color:#554269; padding:.3rem .5rem; background:#f5f1fa; border-radius:.5rem; font-size:.8rem; }
.bdp-workspace nav [aria-current] { background:#603595; color:white; }
.bdp-workspace label { display:grid; gap:.25rem; font-size:.85rem; }
.bdp-workspace label:has(input[type=checkbox]) { display:flex; align-items:center; gap:.4rem; }
.bdp-workspace input:not([type=checkbox]),.bdp-workspace select,.bdp-workspace textarea { min-width:0; max-width:100%; width:100%; border:1px solid #d7cbe2; border-radius:8px; padding:.5rem; background:white; color:inherit; font:inherit; }
.bdp-workspace fieldset,.bdp-lot { border:1px solid #ded4ea; border-radius:10px; min-width:0; padding:.6rem; }
.bdp-workspace [hidden] { display:none!important; }
.bdp-workspace summary { cursor:pointer; overflow-wrap:anywhere; }
.bdp-workspace .bdp-lot>summary { font-weight:650; color:#563381; }
.bdp-line { padding:.5rem 0; border-bottom:1px solid #e6dfee; }
.bdp-line>summary,.bdp-columns { display:grid; grid-template-columns:minmax(120px,2.4fr) .45fr .7fr .7fr .85fr .8fr; gap:.4rem; align-items:center; }
.bdp-columns { font-size:.76rem; font-weight:bold; margin-top:.65rem; }
.bdp-map,.bdp-edit,.bdp-totals,.bdp-workspace dl { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(125px,100%),1fr)); gap:.5rem; }
.bdp-totals div,.bdp-workspace dl div { display:grid; gap:.15rem; background:#f6f1fb; border-radius:8px; padding:.55rem; overflow-wrap:anywhere; }
.bdp-workspace article { padding:.55rem .1rem; border-bottom:1px solid #e6dfee; }
.bdp-workspace dd { margin:0; }
.bdp-workspace [role=alert] { color:#922943; white-space:pre-wrap; }
.bdp-workspace footer { justify-content:flex-end; }
.bdp-workspace footer button:last-child { background:#603595; color:white; }
@media(max-width:650px) {
 .bdp-columns {display:none;}
 .bdp-line>summary {grid-template-columns:repeat(3,minmax(0,1fr));font-size:.82rem;gap:.25rem;}
 .bdp-line>summary span:first-child {grid-column:1/-1;font-weight:600;}
 .bdp-line>summary span:nth-child(3)::before {content:"Qté ";}
 .bdp-line>summary span:nth-child(4)::before {content:"PU ";}
 .bdp-line>summary b::before {content:"HT ";}
 .bdp-tools>* {flex:1 1 9rem;}
 .modal:has(.bdp-workspace) {padding:.75rem;}
}

.bdp-task-panel,.bdp-task-lot{min-width:0;padding:.8rem;border:1px solid #ded7ef;border-radius:12px;background:#fff;margin:.55rem 0;color:#292139}
.bdp-task-panel{background:#f7f4ff}.bdp-task-stat,.bdp-task-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr));gap:.65rem;margin-bottom:.65rem}
.bdp-task-stat small,.bdp-task-facts small{display:block;color:#625870}.bdp-task-lot>summary{cursor:pointer;color:#493076;overflow-wrap:anywhere}.bdp-task-lot>summary span{margin-inline-start:.8rem;white-space:nowrap;font-variant-numeric:tabular-nums}.bdp-task-lot .task-card{margin:.35rem 0}.bdp-task-lot p{overflow-wrap:anywhere}.bdp-task-facts bdi{font-variant-numeric:tabular-nums}
.bdp-line>summary>span:first-child{padding-inline-start:calc(var(--bdp-depth,0)*.65rem)}
.bdp-source{grid-column:1/-1;min-width:0}.bdp-source pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.75rem;margin:.4rem 0;max-height:220px;overflow-y:auto;overscroll-behavior:contain}.bdp-provenance{font-size:.8rem;grid-column:1/-1;color:var(--primary)}

.bdp-edit>p,.bdp-edit>small:first-child,.bdp-edit>label:has([data-accept]){grid-column:1/-1}
