/* Vente : feuille de saisie compacte. Dernière couche, après les styles v11. */
#mandat-section-vente .v1146-finance-card,#mandat-section-vente .v1146-finance-card *{box-sizing:border-box}
#mandat-section-vente .v1146-finance-card{width:100%!important;min-width:0;overflow:hidden!important;border:1px solid var(--bord)!important;border-radius:12px!important;background:var(--bg)!important;box-shadow:0 4px 18px #182b2010!important;backdrop-filter:none!important}
#mandat-section-vente .v1146-finance-card>header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;min-height:34px!important;padding:6px 12px!important;background:var(--bg)!important}
#mandat-section-vente .v1146-finance-card>header h4{margin:0!important;font-size:14px!important;font-weight:650!important;line-height:1.3!important}
#mandat-section-vente .v1146-finance-card>header p{margin:0!important;font-size:11px!important;color:var(--ink3)!important}
#mandat-section-vente .v1146-finance-card .v1192-flow{display:none!important}
.v1232-reservation{display:grid;grid-template-columns:.8fr repeat(7,minmax(0,1fr));align-items:center;gap:8px;padding:8px 12px;border-block:1px solid var(--bord);background:var(--bg2)}
.v1232-reservation>div,.v1232-reservation-label{min-width:0;display:grid;gap:3px}
.v1232-reservation span{font-size:10px;color:var(--ink3)}
.v1232-reservation-label{font-weight:650}.v1232-reservation-label small{font-size:9px;font-weight:400}
.v1232-reservation strong{font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink)}
#mandat-section-vente .v1146-finance-workspace{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,.9fr)!important;grid-template-areas:"note note note" "revenue cost result" "recovery recovery recovery" "save save save"!important;align-items:stretch!important;min-width:0!important;width:100%!important;background:var(--bg)!important}
#mandat-section-vente .v1146-finance-workspace>.v1192-finance-note{grid-area:note!important;display:flex!important;gap:8px!important;align-items:center;margin:0!important;padding:6px 12px!important;border:0!important;border-bottom:1px solid var(--bord)!important;border-radius:0!important;background:var(--bg)!important;font-size:10px!important;line-height:1.3!important}
#mandat-section-vente .v1146-finance-workspace>section:nth-of-type(1){grid-area:revenue!important}
#mandat-section-vente .v1146-finance-workspace>section:nth-of-type(2){grid-area:cost!important}
#mandat-section-vente .v1146-finance-workspace>section:nth-of-type(3){grid-area:result!important}
#mandat-section-vente .v1146-finance-workspace>section{position:static!important;inset:auto!important;min-width:0!important;min-height:0!important;width:100%!important;padding:10px!important;border:0!important;background:transparent!important}
#mandat-section-vente .v1146-finance-workspace>section:nth-of-type(n+2){border-left:1px solid var(--bord)!important}
#mandat-section-vente .v1146-section-title{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:2px!important;margin:0 0 8px!important}
#mandat-section-vente .v1146-section-title strong{font-size:12px!important;font-weight:650!important}
#mandat-section-vente .v1146-section-title small{display:block!important;text-align:left!important;font-size:9px!important;line-height:1.3!important;color:var(--ink3)!important}
#mandat-section-vente .v1146-finance-card .v1146-fields{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important;min-width:0!important;width:100%!important;border:1px solid var(--bord);border-radius:6px;overflow:hidden}
#mandat-section-vente .v1146-finance-card .v1146-field{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(90px,108px)!important;grid-template-rows:auto!important;gap:0!important;align-items:center!important;grid-column:auto!important;grid-row:auto!important;min-height:34px!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;border-bottom:1px solid var(--bord)!important;border-radius:0!important;background:var(--bg)!important;box-shadow:none!important;overflow:hidden!important}
#mandat-section-vente .v1146-finance-card .v1146-field:nth-child(even){background:var(--bg2)!important}
#mandat-section-vente .v1146-finance-card .v1146-field:last-child{border-bottom:0!important}
#mandat-section-vente .v1146-finance-card .v1146-field>span{grid-column:1!important;grid-row:1!important;align-self:center!important;min-width:0;padding:5px 8px!important;margin:0!important;white-space:normal!important;line-height:1.25!important;font-size:11px!important;font-weight:500!important;color:var(--ink)!important}
#mandat-section-vente .v1146-finance-card .v1146-field>small{display:none!important}
#mandat-section-vente .v1146-finance-card .v1146-field>div{position:relative!important;display:flex!important;grid-column:2!important;grid-row:1!important;align-self:stretch!important;min-width:0!important;width:100%!important;margin:0!important;border-left:1px solid var(--bord)}
#mandat-section-vente .v1146-finance-card .v1146-field input{width:100%!important;min-width:0!important;min-height:34px!important;height:100%!important;margin:0!important;padding:5px 22px 5px 7px!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--ink)!important;text-align:right!important;font-family:inherit!important;font-size:13px!important;line-height:1.3!important;font-weight:600!important;font-variant-numeric:tabular-nums;appearance:textfield;-moz-appearance:textfield}
#mandat-section-vente .v1146-field input::-webkit-inner-spin-button,#mandat-section-vente .v1146-field input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
#mandat-section-vente .v1146-finance-card .v1146-field input:focus{outline:2px solid #248458!important;outline-offset:-2px;background:#eaf6ef!important;box-shadow:none!important;color:#142b21!important}
#mandat-section-vente .v1146-finance-card .v1146-field em{position:absolute!important;right:8px!important;top:50%!important;transform:translateY(-50%)!important;font-size:10px!important;font-style:normal;color:var(--ink3)!important;pointer-events:none}
#mandat-section-vente .v1146-finance-card .v1175-warranty-picker{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto!important;grid-column:1/-1!important;gap:4px!important;min-width:0!important;min-height:0!important;width:100%!important;margin:0!important;padding:6px 8px!important;border:0!important;border-bottom:1px solid var(--bord)!important;border-radius:0!important;background:var(--bg2)!important}
#mandat-section-vente .v1146-finance-card .v1175-warranty-picker>span{grid-column:1!important;grid-row:auto!important;font-size:10px!important;font-weight:600!important}
#mandat-section-vente .v1146-finance-card .v1175-warranty-picker>small,#mandat-section-vente .v1146-finance-card .v1175-warranty-picker>em{display:none!important}
#mandat-section-vente .v1146-finance-card .v1175-warranty-picker select,#mandat-section-vente .v1146-finance-card .v1175-warranty-picker input{grid-column:1!important;grid-row:auto!important;min-width:0!important;width:100%!important;min-height:30px!important;height:30px!important;margin:0!important;padding:4px 6px!important;font-size:11px!important;background:var(--bg)!important;color:var(--ink)!important;border:1px solid var(--bord)!important;border-radius:4px!important}
#mandat-section-vente #v1175-warranty-custom[hidden]{display:none!important}
#mandat-section-vente .v1146-calculation #v1146-results{width:100%!important;min-width:0!important}
#mandat-section-vente .v1232-balance{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important;border:1px solid var(--bord);border-radius:6px;overflow:hidden}
#mandat-section-vente .v1232-balance-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;padding:5px 8px;border-bottom:1px solid var(--bord);font-size:11px;line-height:1.25;color:var(--ink);background:var(--bg)}
#mandat-section-vente .v1232-balance-row strong{font-size:13px;font-weight:650;white-space:nowrap;font-variant-numeric:tabular-nums}
#mandat-section-vente .v1232-balance-row.subtotal{background:var(--bg2);font-weight:650}
#mandat-section-vente .v1232-balance-row.final{border:0;background:#e9f5ed;color:#185e3a;font-weight:700;min-height:34px}
#mandat-section-vente .v1232-balance-row.final strong{font-size:17px}
#mandat-section-vente .v1146-finance-workspace>.v1213-finance-recovery{grid-area:recovery;min-width:0;margin:0;padding:10px;flex-wrap:wrap}
#mandat-section-vente .v1146-finance-workspace>footer.v1176-autosave{grid-area:save!important;position:static!important;min-height:48px!important;margin:0!important;padding:7px 12px!important;border-top:1px solid var(--bord)!important;border-radius:0!important;background:var(--bg)!important;gap:10px!important}
#mandat-section-vente .v1176-autosave strong{font-size:11px!important}#mandat-section-vente .v1176-autosave small{font-size:10px!important}
#mandat-section-vente .v1176-autosave .btn{min-height:32px;font-size:11px}
#mandat-section-vente .v1143-sale{padding:10px!important}
#mandat-section-vente .v1143-sale-head{align-items:center!important;margin-bottom:8px!important;padding:0!important}
#mandat-section-vente .v1143-sale-head h3{font-size:16px!important;margin:0!important}
#mandat-section-vente .v1143-sale-head p,#mandat-section-vente .v1143-sale-head>div>span{display:none!important}
#mandat-section-vente .v1184-attribution{display:grid!important;grid-template-columns:auto minmax(150px,1fr) minmax(140px,.65fr) auto!important;gap:10px!important;align-items:center!important;margin:0 0 8px!important;padding:6px 8px!important}
#mandat-section-vente .v1184-attribution>strong{grid-column:auto!important;font-size:11px!important}
#mandat-section-vente .v1184-attribution label{display:flex;align-items:center;gap:7px;min-width:0}
#mandat-section-vente .v1184-attribution select,#mandat-section-vente .v1184-attribution input{height:30px!important;min-height:30px!important;margin:0!important;font-size:11px!important}
#mandat-section-vente .v1184-attribution small{display:none!important}
#mandat-section-vente .v1184-attribution .btn{font-size:10px;min-height:30px}
/* En mode Vente, conserver les noms et le véhicule dans un en-tête réduit.
   Les coordonnées complètes restent accessibles dans Fiche mandat. */
#v-mandat-detail:has(>#mandat-section-vente.on)>.v1165-unified-head{padding:10px 12px!important;margin-bottom:8px!important}
#v-mandat-detail:has(>#mandat-section-vente.on) .v1165-primary-grid{margin-top:8px!important;gap:12px!important}
#v-mandat-detail:has(>#mandat-section-vente.on) .v1165-primary-section{padding:0!important;border:0!important;background:transparent!important}
#v-mandat-detail:has(>#mandat-section-vente.on) .v1165-primary-section> :not(header){display:none!important}
#v-mandat-detail:has(>#mandat-section-vente.on) .v1165-primary-section>header{margin:0!important;padding:0!important}
#v-mandat-detail:has(>#mandat-section-vente.on) .v1165-primary-section>header strong{font-size:12px!important}
#v-mandat-detail:has(>#mandat-section-vente.on)>.mandat-tabs{margin-bottom:8px!important}
@media(max-width:1100px){
  #mandat-section-vente .v1146-finance-workspace{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-areas:"note note" "revenue cost" "result result" "recovery recovery" "save save"!important}
  #mandat-section-vente .v1146-finance-workspace>section:nth-of-type(3){border-left:0!important;border-top:1px solid var(--bord)!important}
  #mandat-section-vente .v1232-balance{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  #mandat-section-vente .v1232-balance-row{display:grid;gap:4px;align-content:center;border:0;border-right:1px solid var(--bord);border-bottom:1px solid var(--bord)}
  .v1232-reservation{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:760px){
  #mandat-section-vente .v1146-finance-card>header{align-items:flex-start!important;flex-direction:column!important;gap:3px!important}
  #mandat-section-vente .v1146-finance-workspace{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"note" "revenue" "cost" "result" "recovery" "save"!important}
  #mandat-section-vente .v1146-finance-workspace>section:nth-of-type(n+2){border-left:0!important;border-top:1px solid var(--bord)!important}
  #mandat-section-vente .v1232-balance{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #mandat-section-vente .v1146-finance-card .v1146-field{grid-template-columns:minmax(0,1fr) 112px!important;min-height:40px!important}
  #mandat-section-vente .v1146-finance-card .v1146-field input{min-height:40px!important;font-size:16px!important}
  #mandat-section-vente .v1184-attribution{grid-template-columns:1fr 1fr!important}
  #mandat-section-vente .v1184-attribution>strong{grid-column:1/-1!important}
  #mandat-section-vente .v1184-attribution label{display:grid;gap:3px}
  #mandat-section-vente .v1146-finance-workspace>.v1192-finance-note{align-items:flex-start;flex-direction:column;gap:2px!important}
  .v1232-reservation{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(min-width:1101px){
  #v-mandat-detail:has(>#mandat-section-vente.on) .v1165-headerbar{padding:2px 0 7px!important;gap:10px!important}
  #v-mandat-detail:has(>#mandat-section-vente.on) .v1165-primary-grid{margin-top:6px!important}
  #v-mandat-detail:has(>#mandat-section-vente.on) .v1165-primary-section>header>div>span{display:none!important}
}

@media(min-width:1101px){
  #v-mandat-detail:has(>#mandat-section-vente.on)>.mandat-tabs{min-height:44px!important}
  #v-mandat-detail:has(>#mandat-section-vente.on)>.mandat-tabs>.mandat-tab{min-height:34px!important;padding:7px 12px!important;font-size:12px!important}
}

/* Attribution de la vente : même feuille compacte, avec un aperçu explicite. */
#mandat-section-vente .v1236-attribution .v1236-attribution-detail{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:5px 16px;font-size:10px;color:var(--ink3)}
#mandat-section-vente .v1236-attribution #v1178-commission-preview{font-weight:650;color:var(--ink2)}
#mandat-section-vente .v1236-attribution #v1178-attribution-status{grid-column:1/-1;font-size:10px;color:var(--ink2);min-height:14px}
#mandat-section-vente .v1236-attribution .v1178-rate{min-width:84px}
#mandat-section-vente .v1236-attribution .v1178-rate i{top:6px}
#mandat-section-vente .v1236-attribution-readonly{display:flex!important;flex-wrap:wrap;gap:10px!important;font-size:11px}
