/* PRATINIUM v379 — réduction mesurée de la hauteur du formulaire /identite.
   Portée strictement limitée à la page identité. Les alignements et la logique
   particulier/entreprise existants sont conservés. */

body#identity,
body.page-identity,
body.pratinium-identity-page-v379 {
  --pi358-height: 48px;
  --pi367-height: 48px;
  --pi379-control-height: 48px;
}

/* Carte principale plus compacte sans modifier sa largeur. */
body#identity #customer-form,
body#identity form.js-customer-form,
body.page-identity #customer-form,
body.page-identity form.js-customer-form,
body.pratinium-identity-page-v379 #customer-form {
  padding-top: 20px !important;
  padding-bottom: 20px !important;
}

/* Réduit la hauteur de chaque ligne/carte. */
body#identity #customer-form > section,
body#identity form.js-customer-form > section,
body.page-identity #customer-form > section,
body.page-identity form.js-customer-form > section {
  gap: 9px !important;
  margin-bottom: 9px !important;
}

body#identity #customer-form section > .form-group,
body#identity #customer-form section > .form-group.row,
body#identity form.js-customer-form section > .form-group,
body#identity form.js-customer-form section > .form-group.row,
body.page-identity #customer-form section > .form-group,
body.page-identity #customer-form section > .form-group.row,
body.pratinium-identity-page-v379 #customer-form section > .form-group {
  row-gap: 5px !important;
  padding-top: 13px !important;
  padding-bottom: 13px !important;
  border-radius: 17px !important;
}

/* Libellés centrés par rapport aux contrôles plus bas. */
body#identity #customer-form .pi358-label-cell,
body#identity form.js-customer-form .pi358-label-cell,
body.page-identity #customer-form .pi358-label-cell,
body.pratinium-identity-page-v379 #customer-form .pi358-label-cell {
  padding-top: 12px !important;
}

/* Tous les champs texte, email, téléphone, date et listes ont la même hauteur. */
body#identity #customer-form .pi358-control-cell input.form-control,
body#identity #customer-form .pi358-control-cell select.form-control,
body#identity #customer-form .pi358-control-cell .custom-select,
body#identity form.js-customer-form .pi358-control-cell input.form-control,
body#identity form.js-customer-form .pi358-control-cell select.form-control,
body.page-identity #customer-form .pi358-control-cell input.form-control,
body.page-identity #customer-form .pi358-control-cell select.form-control,
body.pratinium-identity-page-v379 #customer-form .pi358-control-cell input.form-control,
body.pratinium-identity-page-v379 #customer-form .pi358-control-cell select.form-control {
  height: var(--pi379-control-height) !important;
  min-height: var(--pi379-control-height) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Le choix de civilité reste confortable mais ne crée plus une carte surdimensionnée. */
body#identity #customer-form .pi358-choice-field,
body#identity form.js-customer-form .pi358-choice-field,
body.page-identity #customer-form .pi358-choice-field,
body.pratinium-identity-page-v379 #customer-form .pi358-choice-field,
body#identity #customer-form .pratinium-v357-choice-field,
body.page-identity #customer-form .pratinium-v357-choice-field {
  min-height: 38px !important;
  gap: 8px 18px !important;
}

/* Mot de passe : même hauteur que les autres champs, œil toujours intégré. */
body#identity #customer-form .pi358-password-shell,
body#identity form.js-customer-form .pi358-password-shell,
body.page-identity #customer-form .pi358-password-shell,
body.pratinium-identity-page-v379 #customer-form .pi358-password-shell {
  height: var(--pi379-control-height) !important;
  min-height: var(--pi379-control-height) !important;
}

body#identity #customer-form .pi358-password-toggle,
body#identity form.js-customer-form .pi358-password-toggle,
body.page-identity #customer-form .pi358-password-toggle,
body.pratinium-identity-page-v379 #customer-form .pi358-password-toggle {
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
}

body#identity #customer-form .pi358-password-shell > input.form-control,
body#identity form.js-customer-form .pi358-password-shell > input.form-control,
body.page-identity #customer-form .pi358-password-shell > input.form-control {
  padding-right: 62px !important;
}

/* Notes rapprochées du champ afin de réduire la hauteur globale des cartes. */
body#identity #customer-form .pi358-field-note,
body#identity form.js-customer-form .pi358-field-note,
body.page-identity #customer-form .pi358-field-note,
body.pratinium-identity-page-v379 #customer-form .pi358-field-note {
  margin-top: 5px !important;
  line-height: 1.3 !important;
}

/* Le textarea garde une hauteur adaptée au contenu. */
body#identity #customer-form .pi358-control-cell textarea.form-control,
body#identity form.js-customer-form .pi358-control-cell textarea.form-control,
body.page-identity #customer-form .pi358-control-cell textarea.form-control {
  height: auto !important;
  min-height: 96px !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

@media (max-width: 860px) {
  body#identity #customer-form section > .form-group,
  body#identity #customer-form section > .form-group.row,
  body#identity form.js-customer-form section > .form-group,
  body.page-identity #customer-form section > .form-group {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  body#identity #customer-form .pi358-label-cell,
  body.page-identity #customer-form .pi358-label-cell {
    padding-top: 0 !important;
  }
}
