/* Saisie compacte : même rythme de lignes pour charges et matériel. */
.charge-head,.charge-main{grid-template-columns:minmax(130px,1.7fr) minmax(100px,1fr) minmax(100px,1fr) 85px 62px 28px 30px;gap:10px}
.charge-head,.material-head{font-size:15px;font-weight:650;line-height:1.3;color:#34432c;padding:16px 12px;background:#e9ede5;border-radius:9px;margin:22px 0 8px}
.material-head{display:grid;grid-template-columns:minmax(0,1fr) 160px 68px 32px;align-items:center;gap:16px}
#charges>.charge,#cfeCharge{padding:13px 12px;border:0;border-radius:9px;margin:4px 0;background:#fff}
#charges>.charge:nth-child(even){background:#f1f3ef}
#charges:has(>.charge:nth-child(odd):last-child)+#cfeCharge{background:#f1f3ef}
.charge-main input,.charge-main select{font-size:14px;padding:9px 7px;background:#fff;border-color:#ced5c7}
.charge-main .charge-name{font-size:14px;padding-left:0}
[data-panel="1"]>p.muted,[data-panel="2"]>p.muted{font-size:14px;line-height:1.6;max-width:660px}
@media(min-width:601px) and (max-width:1000px){
  .charge-head,.charge-main{grid-template-columns:minmax(85px,1.5fr) 78px 84px 60px 44px 28px 30px;gap:6px}
  .charge-head{font-size:15px;overflow-wrap:anywhere}
  .charge-main input,.charge-main select{padding:8px 3px;font-size:12px}
}
@media(max-width:600px){
  .charge-main{grid-template-columns:minmax(65px,1fr) 75px 65px 30px;gap:8px}
  .charge-main [data-label]:before{font-size:11px;color:#43523b;font-weight:600}
}
@media(max-width:1000px){
  #forecast.charges-view{padding-bottom:145px}
  #forecast.layout.charges-view #stepHelp{position:fixed;inset:auto 12px 12px;display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:16px;z-index:20;box-shadow:0 4px 22px #20351225}
  #forecast.charges-view #stepHelp .line{padding:0;margin:0;border:0;font-size:12px;gap:6px}
  #forecast.charges-view #stepHelp .line b{font-size:24px;letter-spacing:-.6px}
}
#forecast.charges-view #stepHelp{position:sticky;top:24px;align-self:start;background:#f1f4ed;border-color:#d5dfcb;padding:24px;z-index:5}
#stepHelp.expense-totals .line{display:flex;flex-direction:column;align-items:flex-start;gap:7px;font-size:14px;padding:0 0 20px;margin-bottom:20px}
#stepHelp.expense-totals .line:last-child{padding:0;margin:0;border:0}
#stepHelp.expense-totals .line b{font-size:29px;line-height:1.25;letter-spacing:-.8px;font-weight:650}
#materials .equipment{border:0;border-radius:9px;background:#fff;margin:4px 0;padding:0 12px}
#materials .equipment:nth-child(even){background:#f1f3ef}
#materials .equipment>summary{display:grid;grid-template-columns:minmax(0,1fr) 160px 68px 32px;align-items:center;gap:16px;padding:15px 0;list-style:none}
#materials .equipment>summary::-webkit-details-marker{display:none}
#materials .equipment>summary::before{display:none}
#materials .material-identity{min-width:0;display:flex;flex-direction:column;gap:4px}
#materials .material-title{font-size:15px;font-weight:550;overflow-wrap:anywhere}
#materials .material-identity small{font-size:12px}
#materials .material-direct-price .field-caption{font-size:11px;line-height:1.2;gap:5px;margin-bottom:3px}
#materials .material-direct-price input{margin:0;min-height:44px;font-size:15px;font-weight:550;text-align:right;background:#fff;border:1px solid #bdc8b3}
#materials .material-direct-price .info-dot{width:28px;min-height:28px;height:28px;margin:0}
#materials .material-more{font-size:12px;color:var(--muted);text-align:right}
#materials .material-more:after{content:'⌄';margin-left:5px}
#materials .equipment[open] .material-more:after{content:'⌃'}
#materials .equipment .form{background:#f5f7f1;border-radius:8px;padding:18px;margin:0 0 18px}
#materials .equipment .delete-button{width:32px;min-height:40px}
@media(max-width:600px){
  .material-head{grid-template-columns:minmax(0,1fr) 118px 44px;gap:10px}
  .material-head>span:nth-child(n+3){display:none}
  #materials .equipment>summary{grid-template-columns:minmax(0,1fr) 118px 44px;gap:10px;padding:14px 0}
  #materials .material-more{grid-row:2;grid-column:1/3;text-align:left}
  #materials .equipment>summary>.delete-button{grid-column:3;grid-row:1;width:44px;min-height:44px}
  #materials .material-direct-price input{min-height:44px}
  #materials .material-direct-price .field-caption{flex-wrap:wrap}
  #materials .material-direct-price .info-dot{width:36px;height:36px;min-height:36px}
  #materials .equipment .form{padding:14px}
  #stepHelp.expense-totals .line b{font-size:30px}
}
