/* ML-UREL V7.7 — Canvas de saisie large et confortable
   UI uniquement : aucun impact API / métier / base de données. */

/* Desktop : environ la moitié de l'écran, sans masquer totalement le dashboard */
.pilotage-drawer {
  width: clamp(720px, 52vw, 980px) !important;
  max-width: calc(100vw - 84px) !important;
}

/* Confort visuel dans le formulaire élargi */
.pilotage-drawer-head {
  padding-left: 20px !important;
  padding-right: 20px !important;
}
.pilotage-drawer-body {
  padding: 18px 20px !important;
}
.pilotage-drawer-footer {
  padding: 14px 20px !important;
}
.pilotage-form-section {
  padding: 16px !important;
}
.pilotage-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}
.pilotage-form-grid.cols3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.pilotage-input input,
.pilotage-input select,
.pilotage-input textarea {
  min-height: 40px !important;
}

/* Écrans intermédiaires : grand panneau, mais on conserve un peu du dashboard */
@media (max-width: 1100px) {
  .pilotage-drawer {
    width: 72vw !important;
    max-width: 92vw !important;
    min-width: 0 !important;
  }
}

/* Tablettes */
@media (max-width: 820px) {
  .pilotage-drawer {
    width: 92vw !important;
    max-width: 92vw !important;
  }
  .pilotage-form-grid.cols3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Mobile : plein écran et formulaire en une colonne */
@media (max-width: 700px) {
  .pilotage-overlay {
    left: 0 !important;
    inset-left: 0 !important;
  }
  .pilotage-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
  }
  .pilotage-form-grid,
  .pilotage-form-grid.cols3 {
    grid-template-columns: 1fr !important;
  }
}
