/* PRATINIUM v358 — formulaire identité réellement aligné et champs mot de passe unifiés.
   Portée strictement limitée à la page /identite. */

body#identity,
body.page-identity,
body.pratinium-identity-page-v358 {
  --pi358-label-width: 220px;
  --pi358-height: 58px;
  --pi358-radius: 15px;
  --pi358-ink: #0d203c;
  --pi358-muted: #71829c;
  --pi358-line: #cedae8;
  --pi358-line-active: #20afe7;
  --pi358-navy: #092c50;
  --pi358-cyan: #18afe9;
}

/* Carte principale plus nette et plus premium. */
body#identity #customer-form,
body#identity form.js-customer-form,
body.page-identity #customer-form,
body.pratinium-identity-page-v358 #customer-form {
  padding: 28px !important;
  border: 1px solid rgba(148, 163, 184, .24) !important;
  border-radius: 26px !important;
  background:
    radial-gradient(circle at 100% 0, rgba(32,175,231,.09), transparent 27%),
    linear-gradient(145deg, rgba(255,255,255,.995), rgba(247,251,255,.985)) !important;
  box-shadow: 0 24px 62px rgba(15, 35, 62, .105), inset 0 1px 0 rgba(255,255,255,.95) !important;
}

/* Une seule colonne : chaque ligne utilise exactement la même grille. */
body#identity #customer-form > section,
body#identity form.js-customer-form > section,
body.page-identity #customer-form > section,
body.pratinium-identity-page-v358 #customer-form > section {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 13px !important;
  width: 100% !important;
  min-width: 0 !important;
}

body#identity #customer-form .form-group.row,
body#identity form.js-customer-form .form-group.row,
body.page-identity #customer-form .form-group.row,
body.pratinium-identity-page-v358 #customer-form .form-group.row {
  position: relative !important;
  display: grid !important;
  grid-template-columns: var(--pi358-label-width) minmax(0, 1fr) !important;
  column-gap: 24px !important;
  row-gap: 8px !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 20px 26px !important;
  overflow: visible !important;
  border: 1px solid rgba(201, 213, 227, .86) !important;
  border-radius: 19px !important;
  background: linear-gradient(145deg, rgba(255,255,255,.985), rgba(248,251,255,.975)) !important;
  box-shadow: 0 9px 26px rgba(15, 35, 62, .045), inset 0 1px 0 rgba(255,255,255,.95) !important;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}

body#identity #customer-form .form-group.row::before,
body#identity form.js-customer-form .form-group.row::before,
body.page-identity #customer-form .form-group.row::before,
body.pratinium-identity-page-v358 #customer-form .form-group.row::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 20px !important;
  bottom: 20px !important;
  width: 3px !important;
  border-radius: 0 4px 4px 0 !important;
  background: linear-gradient(180deg, transparent, rgba(24,175,233,.72), transparent) !important;
  opacity: .34 !important;
  transition: opacity .18s ease !important;
}

body#identity #customer-form .form-group.row:hover,
body#identity form.js-customer-form .form-group.row:hover,
body.page-identity #customer-form .form-group.row:hover,
body.pratinium-identity-page-v358 #customer-form .form-group.row:hover {
  border-color: rgba(148, 163, 184, .78) !important;
  box-shadow: 0 14px 34px rgba(15,35,62,.065), inset 0 1px 0 rgba(255,255,255,.97) !important;
}

body#identity #customer-form .form-group.row:focus-within,
body#identity form.js-customer-form .form-group.row:focus-within,
body.page-identity #customer-form .form-group.row:focus-within,
body.pratinium-identity-page-v358 #customer-form .form-group.row:focus-within {
  transform: translateY(-1px) !important;
  border-color: rgba(32,175,231,.48) !important;
  box-shadow: 0 16px 40px rgba(18,145,202,.095), 0 0 0 3px rgba(32,175,231,.055) !important;
}

body#identity #customer-form .form-group.row:focus-within::before,
body#identity form.js-customer-form .form-group.row:focus-within::before,
body.page-identity #customer-form .form-group.row:focus-within::before {
  opacity: 1 !important;
}

/* Cellule libellé et cellule contrôle normalisées par le JS v358. */
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-v358 #customer-form .pi358-label-cell {
  grid-column: 1 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 17px 0 0 !important;
  color: var(--pi358-ink) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  text-align: left !important;
  letter-spacing: -.01em !important;
}

body#identity #customer-form .pi358-label-cell label,
body#identity form.js-customer-form .pi358-label-cell label,
body.page-identity #customer-form .pi358-label-cell label {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font: inherit !important;
  text-align: inherit !important;
}

body#identity #customer-form .pi358-control-cell,
body#identity form.js-customer-form .pi358-control-cell,
body.page-identity #customer-form .pi358-control-cell,
body.pratinium-identity-page-v358 #customer-form .pi358-control-cell {
  grid-column: 2 !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body#identity #customer-form .pi358-no-label .pi358-control-cell,
body#identity form.js-customer-form .pi358-no-label .pi358-control-cell,
body.page-identity #customer-form .pi358-no-label .pi358-control-cell {
  grid-column: 1 / -1 !important;
}

/* Neutralise les colonnes Bootstrap sans casser les champs. */
body#identity #customer-form .form-group.row > [class*="col-"],
body#identity form.js-customer-form .form-group.row > [class*="col-"],
body.page-identity #customer-form .form-group.row > [class*="col-"] {
  float: none !important;
  flex: none !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Tous les champs partagent exactement les mêmes dimensions. */
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 textarea.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-v358 #customer-form .pi358-control-cell input.form-control {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: var(--pi358-height) !important;
  min-height: var(--pi358-height) !important;
  margin: 0 !important;
  padding: 0 19px !important;
  border: 1px solid var(--pi358-line) !important;
  border-radius: var(--pi358-radius) !important;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%) !important;
  color: var(--pi358-ink) !important;
  font-size: 15px !important;
  font-weight: 520 !important;
  line-height: 1.2 !important;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.025), 0 1px 0 rgba(255,255,255,.9) !important;
  outline: 0 !important;
  box-sizing: border-box !important;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease !important;
}

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: 118px !important;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

body#identity #customer-form .pi358-control-cell input.form-control:focus,
body#identity #customer-form .pi358-control-cell select.form-control:focus,
body#identity #customer-form .pi358-control-cell textarea.form-control:focus,
body#identity form.js-customer-form .pi358-control-cell input.form-control:focus,
body.page-identity #customer-form .pi358-control-cell input.form-control:focus {
  border-color: rgba(32,175,231,.78) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(32,175,231,.105), inset 0 1px 2px rgba(15,23,42,.02) !important;
}

body#identity #customer-form .pi358-control-cell input.form-control::placeholder,
body#identity form.js-customer-form .pi358-control-cell input.form-control::placeholder,
body.page-identity #customer-form .pi358-control-cell input.form-control::placeholder {
  color: #9aa8b9 !important;
  opacity: 1 !important;
}

/* Mot de passe : une seule enveloppe, un seul bord, un seul rayon. */
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-v358 #customer-form .pi358-password-shell {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: var(--pi358-height) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--pi358-line) !important;
  border-radius: var(--pi358-radius) !important;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%) !important;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.025), 0 1px 0 rgba(255,255,255,.9) !important;
  box-sizing: border-box !important;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease !important;
}

body#identity #customer-form .pi358-password-shell:focus-within,
body#identity form.js-customer-form .pi358-password-shell:focus-within,
body.page-identity #customer-form .pi358-password-shell:focus-within {
  border-color: rgba(32,175,231,.78) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(32,175,231,.105), inset 0 1px 2px rgba(15,23,42,.02) !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,
body.pratinium-identity-page-v358 #customer-form .pi358-password-shell > input.form-control {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 72px 0 19px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
  box-sizing: border-box !important;
}

body#identity #customer-form .pi358-password-shell > input.form-control:focus,
body#identity form.js-customer-form .pi358-password-shell > input.form-control:focus,
body.page-identity #customer-form .pi358-password-shell > input.form-control:focus {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !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-v358 #customer-form .pi358-password-toggle {
  position: absolute !important;
  z-index: 2 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 60px !important;
  min-width: 60px !important;
  max-width: 60px !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-left: 1px solid var(--pi358-line) !important;
  border-radius: 0 var(--pi358-radius) var(--pi358-radius) 0 !important;
  background: linear-gradient(180deg, #eef3f8 0%, #e4ebf3 100%) !important;
  color: #334155 !important;
  line-height: 0 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9) !important;
  transform: none !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  transition: background .16s ease, color .16s ease, border-color .16s ease !important;
}

body#identity #customer-form .pi358-password-toggle:hover,
body#identity form.js-customer-form .pi358-password-toggle:hover,
body.page-identity #customer-form .pi358-password-toggle:hover {
  background: linear-gradient(180deg, #e7f8ff 0%, #d9f1fc 100%) !important;
  color: #087eac !important;
}

body#identity #customer-form .pi358-password-shell:focus-within .pi358-password-toggle,
body#identity form.js-customer-form .pi358-password-shell:focus-within .pi358-password-toggle,
body.page-identity #customer-form .pi358-password-shell:focus-within .pi358-password-toggle {
  border-left-color: rgba(32,175,231,.64) !important;
}

body#identity #customer-form .pi358-password-toggle svg,
body#identity form.js-customer-form .pi358-password-toggle svg,
body.page-identity #customer-form .pi358-password-toggle svg {
  display: block !important;
  width: 21px !important;
  height: 21px !important;
  margin: 0 !important;
  padding: 0 !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
}

/* Cache les anciens boutons si un module tente de les réinjecter. */
body#identity #customer-form .pi358-password-legacy,
body#identity form.js-customer-form .pi358-password-legacy,
body.page-identity #customer-form .pi358-password-legacy {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

body#identity #customer-form input[type="password"]::-ms-reveal,
body#identity #customer-form input[type="password"]::-ms-clear,
body#identity #customer-form input[type="password"]::-webkit-credentials-auto-fill-button,
body#identity form.js-customer-form input[type="password"]::-ms-reveal,
body.page-identity #customer-form input[type="password"]::-ms-reveal {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Notes systématiquement sous le champ, jamais sur sa droite. */
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-v358 #customer-form .pi358-field-note {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  color: var(--pi358-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  text-align: left !important;
}

body#identity #customer-form .pi358-field-note .form-control-comment,
body#identity #customer-form .pi358-field-note small,
body#identity form.js-customer-form .pi358-field-note .form-control-comment,
body.page-identity #customer-form .pi358-field-note .form-control-comment {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font: inherit !important;
}

body#identity #customer-form .pi358-choice-field,
body#identity form.js-customer-form .pi358-choice-field,
body.page-identity #customer-form .pi358-choice-field {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 12px 20px !important;
  min-height: var(--pi358-height) !important;
}

body#identity #customer-form input[type="radio"],
body#identity #customer-form input[type="checkbox"],
body#identity form.js-customer-form input[type="radio"],
body#identity form.js-customer-form input[type="checkbox"] {
  accent-color: var(--pi358-cyan) !important;
}

/* CTA premium. */
body#identity #customer-form footer.form-footer,
body#identity form.js-customer-form footer.form-footer,
body.page-identity #customer-form footer.form-footer,
body.pratinium-identity-page-v358 #customer-form footer.form-footer {
  margin-top: 26px !important;
  padding-top: 22px !important;
  border-top: 1px solid rgba(203,213,225,.74) !important;
}

body#identity #customer-form .form-control-submit,
body#identity #customer-form button[type="submit"],
body#identity form.js-customer-form .form-control-submit,
body.page-identity #customer-form .form-control-submit,
body.pratinium-identity-page-v358 #customer-form .form-control-submit {
  min-width: 260px !important;
  min-height: 58px !important;
  padding: 0 28px !important;
  border: 0 !important;
  border-radius: 15px !important;
  background: linear-gradient(135deg, #092744 0%, #0c6fae 48%, #20b8ef 100%) !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  letter-spacing: .025em !important;
  box-shadow: 0 16px 36px rgba(14,165,233,.23), inset 0 1px 0 rgba(255,255,255,.25) !important;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease !important;
}

body#identity #customer-form .form-control-submit:hover,
body#identity #customer-form button[type="submit"]:hover,
body.page-identity #customer-form .form-control-submit:hover {
  transform: translateY(-1px) !important;
  filter: saturate(1.08) !important;
  box-shadow: 0 20px 42px rgba(14,165,233,.29), inset 0 1px 0 rgba(255,255,255,.28) !important;
}

@media (max-width: 1050px) {
  body#identity,
  body.page-identity,
  body.pratinium-identity-page-v358 {
    --pi358-label-width: 190px;
  }
}

@media (max-width: 860px) {
  body#identity #customer-form,
  body#identity form.js-customer-form,
  body.page-identity #customer-form {
    padding: 20px !important;
    border-radius: 21px !important;
  }

  body#identity #customer-form .form-group.row,
  body#identity form.js-customer-form .form-group.row,
  body.page-identity #customer-form .form-group.row {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 18px !important;
  }

  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#identity #customer-form .pi358-control-cell,
  body#identity form.js-customer-form .pi358-control-cell,
  body.page-identity #customer-form .pi358-control-cell {
    grid-column: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

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

@media (max-width: 575px) {
  body#identity #customer-form,
  body#identity form.js-customer-form,
  body.page-identity #customer-form {
    padding: 14px !important;
  }

  body#identity #customer-form .form-group.row,
  body#identity form.js-customer-form .form-group.row,
  body.page-identity #customer-form .form-group.row {
    padding: 16px 14px !important;
    border-radius: 16px !important;
  }

  body#identity #customer-form .form-control-submit,
  body#identity #customer-form button[type="submit"],
  body.page-identity #customer-form .form-control-submit {
    width: 100% !important;
    min-width: 0 !important;
  }
}
