/* DSA CRM v11.70 — réservation structurée et raccourcis contextuels. */

/* Les anciens champs étaient injectés par deux modules indépendants dans le
   même header. Ils restent dans le DOM pour la compatibilité, sans affichage. */
#mandat-section-vente .v1162-cancel-reservation,
#mandat-section-vente .v1164-planned-delivery {
  display: none !important;
}

.v1170-reserved-action {
  min-width: 86px;
}
.v1170-reserved-action.delivery {
  color: #1558a6;
  border-color: rgba(31, 111, 235, .24);
  background: rgba(245, 249, 255, .92);
}
.v1170-reserved-action.finance,
.v1170-reserved-action.done {
  color: #137044;
  border-color: rgba(19, 112, 68, .22);
  background: rgba(245, 252, 248, .92);
}
.v1170-reserved-action.cancel {
  color: #9c2337;
  border-color: rgba(156, 35, 55, .2);
  background: rgba(255, 248, 249, .94);
}

.v1170-reservation-command {
  margin: 14px 0 16px;
  padding: 16px;
  border: 1px solid rgba(35, 39, 47, .09);
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% -15%, rgba(47, 116, 240, .08), transparent 35%),
    rgba(250, 251, 253, .88);
  box-shadow: 0 8px 28px rgba(20, 24, 32, .055);
}
.v1170-reservation-command > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 0 2px;
}
.v1170-reservation-command > header div {
  display: grid;
  gap: 3px;
}
.v1170-reservation-command > header span {
  color: #9c2337;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.v1170-reservation-command > header strong {
  color: #16171a;
  font-size: 18px;
  letter-spacing: -.02em;
}
.v1170-reservation-command > header small {
  color: #777b83;
  font-size: 12px;
}
.v1170-command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.v1170-command-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 76px;
  padding: 13px;
  border: 1px solid rgba(35, 39, 47, .1);
  border-radius: 16px;
  color: #24262b;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 3px 12px rgba(20, 24, 32, .04);
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.v1170-command-card:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 111, 235, .24);
  box-shadow: 0 8px 22px rgba(20, 24, 32, .08);
}
.v1170-command-card i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #1558a6;
  background: #edf5ff;
  font-size: 17px;
  font-style: normal;
  font-weight: 800;
}
.v1170-command-card span {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.v1170-command-card strong {
  font-size: 13px;
  line-height: 1.2;
}
.v1170-command-card small {
  overflow: hidden;
  color: #747780;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v1170-command-card b {
  color: #a4a7ae;
  font-size: 19px;
}
.v1170-command-card.finance i {
  color: #147044;
  background: #eaf8f0;
}
.v1170-command-card.cancel i {
  color: #9c2337;
  background: #fdeff2;
}
.v1170-command-card.cancel:hover {
  border-color: rgba(156, 35, 55, .25);
}

.v1170-delivery-modal {
  display: grid;
  gap: 18px;
}
.v1170-delivery-intro {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid rgba(31, 111, 235, .14);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(240, 247, 255, .96), rgba(250, 252, 255, .92));
}
.v1170-delivery-intro > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #1558a6;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 5px 16px rgba(21, 88, 166, .1);
  font-size: 21px;
}
.v1170-delivery-intro div {
  display: grid;
  gap: 4px;
}
.v1170-delivery-intro strong {
  color: #1c2027;
  font-size: 14px;
}
.v1170-delivery-intro small {
  color: #666b75;
  font-size: 11.5px;
  line-height: 1.45;
}
.v1170-delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.v1170-span-2 {
  grid-column: 1 / -1;
}
.v1170-form-error {
  min-height: 16px;
  color: #a02035;
  font-size: 12px;
  font-weight: 700;
}
.v1170-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 2px;
}

.v1170-proposal-note {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(31, 111, 235, .17);
  border-radius: 14px;
  background: #f4f8ff;
}
.v1170-proposal-note strong,
.v1170-proposal-note small {
  display: block;
}
.v1170-proposal-note strong {
  color: #1558a6;
  font-size: 12px;
}
.v1170-proposal-note small {
  margin-top: 3px;
  color: #5f6672;
  font-size: 11px;
  line-height: 1.4;
}
.v1146-finance-card.v1170-focus {
  border-color: rgba(24, 126, 75, .36) !important;
  box-shadow: 0 0 0 4px rgba(24, 126, 75, .08), 0 14px 34px rgba(24, 126, 75, .09) !important;
  transition: box-shadow .25s ease, border-color .25s ease;
}

@media (max-width: 1100px) {
  .v1170-command-grid { grid-template-columns: 1fr; }
  .v1170-command-card { min-height: 68px; }
}
@media (max-width: 760px) {
  .v1170-reserved-action { min-width: 0; }
  .v1170-reservation-command { margin: 10px 0 13px; padding: 12px; border-radius: 18px; }
  .v1170-reservation-command > header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .v1170-delivery-grid { grid-template-columns: 1fr; }
  .v1170-span-2 { grid-column: auto; }
  .v1170-modal-actions { flex-direction: column-reverse; }
  .v1170-modal-actions .btn { width: 100%; justify-content: center; }
}
