/**
 * Modules terrain — Crosscall Core-T4 (1280×800, 8")
 * Actif uniquement lorsque body.tablet-field-layout (routes accueil → prélèvement).
 * Paysage et portrait supportés — aucune orientation forcée.
 */

@media (min-width: 768px) and (max-width: 1320px) {
  body.tablet-field-layout .form-control,
  body.tablet-field-layout .form-select,
  body.tablet-field-layout .dataTable-selector,
  body.tablet-field-layout .dataTable-input {
    min-height: 44px;
    font-size: 1rem;
  }

  body.tablet-field-layout .form-control-sm {
    min-height: 40px;
    font-size: 0.9375rem;
  }

  body.tablet-field-layout .btn:not(.btn-link):not(.btn-icon) {
    min-height: 44px;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
  }

  body.tablet-field-layout .btn-icon {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.tablet-field-layout .alert .btn-sm {
    min-height: 40px;
    padding: 0.375rem 0.875rem;
  }

  body.tablet-field-layout input[type='checkbox'],
  body.tablet-field-layout input[type='radio'] {
    width: 22px;
    height: 22px;
    cursor: pointer;
  }

  body.tablet-field-layout .ng-select .ng-select-container {
    min-height: 44px !important;
  }

  body.tablet-field-layout .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  body.tablet-field-layout .nav-tabs .nav-link {
    white-space: nowrap;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1rem;
  }

  body.tablet-field-layout .table-responsive {
    -webkit-overflow-scrolling: touch;
  }

  body.tablet-field-layout .table th,
  body.tablet-field-layout .table td {
    padding: 0.5rem 0.4rem;
    font-size: 0.875rem;
    vertical-align: middle;
  }

  body.tablet-field-layout .mat-step-header {
    min-height: 48px;
  }

  body.tablet-field-layout .mat-step-label {
    font-size: 0.875rem;
  }

  body.tablet-field-layout .pagination .page-link {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.tablet-field-layout .modal-dialog {
    max-width: calc(100vw - 24px);
    margin: 12px auto;
  }

  body.tablet-field-layout .card-header .row > [class*='col-'] {
    margin-bottom: 0.5rem;
  }

  body.tablet-field-layout .pc-content {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Portrait tablette (800 px) — empiler les colonnes de formulaires */
@media (max-width: 900px) and (orientation: portrait) {
  body.tablet-field-layout [class*='col-md-'],
  body.tablet-field-layout [class*='col-sm-4'],
  body.tablet-field-layout [class*='col-sm-6'] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  body.tablet-field-layout .d-flex.justify-content-between > [class*='col-'] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  body.tablet-field-layout .card-header .row {
    flex-direction: column;
  }
}
