/**
 * THOTIKA - Creation de compte Particulier et Professionnel
 * Theme Upmotion / PrestaShop 9 / LPS Pro Account
 * v1.0 - 2026-10-13
 *
 * CSS uniquement : aucun champ, libelle, validateur ou formulaire n'est modifie.
 * Cible les formulaires natifs #lpsproaccountFormB2C et #lpsproaccountFormB2B.
 * Charge par les templates LPS registrationb2c.tpl et registrationb2b.tpl.
 */

/* 01. Cadre de page - exclusivement ces deux inscriptions. */
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) {
  --tdr-ink: #103f40;
  --tdr-label: #17484a;
  --tdr-muted: #71837f;
  --tdr-border: #d9e6e1;
  --tdr-mint: #39e8a6;
  --tdr-soft: #f5faf7;
  box-sizing: border-box;
  width: min(100%, 1060px);
  max-width: 1060px;
  margin: 22px auto 72px;
  padding: 0 12px;
  color: var(--tdr-ink);
}
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B),
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) * {
  box-sizing: border-box;
}
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) > .page-header {
  margin: 0 0 17px;
  padding: 0 2px;
  background: transparent;
  border: 0;
  text-align: left;
}
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) > .page-header h1 {
  margin: 0;
  color: var(--tdr-ink);
  font-size: clamp(23px, 2.4vw, 29px);
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -.025em;
  text-transform: none;
}
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) > #content.page-content {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(22px, 3.5vw, 43px);
  background: #fff;
  border: 1px solid #edf1ee;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(10, 55, 49, .025);
  color: var(--tdr-ink);
  overflow: visible;
}
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) .register-form {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
/* Lien deja client : reste au-dessus du formulaire, sans deplacer le DOM. */
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) .register-form > p {
  margin: 0 0 31px;
  padding: 0 0 22px;
  border-bottom: 1px solid #eaf0ed;
  color: var(--tdr-muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: right;
}
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) .register-form > p a {
  color: #145c54;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #a7d4c3;
  text-underline-offset: 3px;
}
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) .register-form > p a:hover {
  color: #0d3e3d;
  text-decoration-color: currentColor;
}

/* 02. Grille sans JS - les champs et le comportement natif sont inchanges. */
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}
/* Le particulier a une liste directe de champs. */
#lpsproaccountFormB2C > div:first-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 26px;
  row-gap: 22px;
  align-items: start;
}
#lpsproaccountFormB2C > div:first-child > .form-group:has(input[name="id_gender"]),
#lpsproaccountFormB2C > div:first-child > .lpsproaccount-section-additional {
  grid-column: 1 / -1;
}
/* Le professionnel comporte des sections structurees. */
#lpsproaccountFormB2B > div:first-child,
#lpsproaccountFormB2B .lpsproaccount-section {
  min-width: 0;
}
#lpsproaccountFormB2B .lpsproaccount-section-info,
#lpsproaccountFormB2B .lpsproaccount-section-pro {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 26px;
  row-gap: 22px;
  align-items: start;
}
#lpsproaccountFormB2B .lpsproaccount-section-info > h2,
#lpsproaccountFormB2B .lpsproaccount-section-pro > h2,
#lpsproaccountFormB2B .lpsproaccount-section-info > .form-group:has(input[name="id_gender"]) {
  grid-column: 1 / -1;
}
#lpsproaccountFormB2B .lpsproaccount-section-info > h2,
#lpsproaccountFormB2B .lpsproaccount-section-pro > h2 {
  width: 100%;
  margin: 0 0 1px;
  padding: 0 0 17px;
  border-bottom: 1px solid #e8efeb;
  color: var(--tdr-ink);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 750;
  letter-spacing: -.015em;
  text-align: left;
}
#lpsproaccountFormB2B .lpsproaccount-section-pro {
  margin-top: 34px;
}

/* 03. Nettoyage du systeme de colonnes Bootstrap d'origine des champs. */
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .form-group.row {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  float: none;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .form-group.row > label.form-control-label {
  display: block;
  float: none;
  flex: none;
  width: 100%;
  max-width: none;
  margin: 0 0 8px;
  padding: 0;
  color: var(--tdr-label);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  text-align: left;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .form-group.row > .js-input-column {
  display: block;
  float: none;
  flex: none;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}
/* Ces colonnes de Classic sont vides, sauf le texte optionnel du SIRET. */
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .form-group.row > .col-md-3.form-control-comment {
  display: none;
}
#lpsproaccountFormB2B .form-group.row:has(#field-lpsproaccount_siret) > .col-md-3.form-control-comment {
  display: block;
  width: 100%;
  max-width: none;
  margin: 5px 0 0;
  padding: 0;
  color: var(--tdr-muted);
  font-size: 11px;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .js-input-column > .form-control-comment {
  display: block;
  margin: 6px 0 0;
  padding: 0;
  color: var(--tdr-muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}

/* 04. Champs et focus. */
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) input.form-control,
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) select.form-control {
  display: block;
  float: none;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 47px;
  min-height: 47px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #d5e3dd;
  border-radius: 10px;
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(15, 61, 58, .025);
  color: #143f40;
  font: inherit;
  font-size: 14px;
  line-height: normal;
  transition: border-color .16s ease, box-shadow .16s ease;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .field-password-policy input.form-control{
      border-bottom-right-radius: initial!important;
    border-top-right-radius: initial!important;
    border-radius: 10px;
}

:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) input.form-control::placeholder {
  color: #93a9a3;
  opacity: 1;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) input.form-control:focus,
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) select.form-control:focus {
  outline: 0;
  border-color: #30b98e;
  box-shadow: 0 0 0 3px rgba(57, 232, 166, .18);
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) input.form-control[aria-invalid="true"],
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .form-group.has-error input.form-control {
  border-color: #d66b65;
  box-shadow: 0 0 0 2px rgba(214, 107, 101, .08);
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) select.form-control {
  appearance: auto;
  cursor: pointer;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .lps_text {
  display: block;
  width: 100%;
}

/* 05. Civilite : champs radio restent de vrais input PrestaShop. */
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .form-group:has(input[name="id_gender"]) > .js-input-column {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .form-group label.radio-inline {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  width: auto;
  min-height: 42px;
  margin: 0;
  padding: 8px 15px;
  border: 1px solid var(--tdr-border);
  border-radius: 9px;
  background: #fff;
  color: var(--tdr-label);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .form-group label.radio-inline:has(input:checked) {
  border-color: #37c694;
  background: #effaf5;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .form-group label.radio-inline:focus-within {
  outline: 2px solid #64c5a4;
  outline-offset: 2px;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .form-group label.radio-inline .custom-radio {
  flex: 0 0 auto;
  margin: 0;
}

/* 06. Mot de passe : ne pas remplacer le bouton natif de PrestaShop. */
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .field-password-policy {
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .field-password-policy .input-group.js-parent-focus {
  display: flex;
  position: relative;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .field-password-policy .input-group.js-parent-focus > input.form-control {
  flex: 1 1 auto;
  padding-right: 54px;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .field-password-policy .group_password {
  position: absolute;
  inset: 4px 5px 4px auto;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: auto;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  background: transparent;
  color: #738d88;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .field-password-policy .group_password:hover {
  background: #eef8f3;
  color: #1b685a;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .field-password-policy .group_password svg {
  width: 19px;
  height: 19px;
  flex: none;
  pointer-events: none;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .group_password button[data-action="show-password"] {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  cursor: pointer;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .group_password button[data-action="show-password"]:focus-visible {
  outline: 2px solid #289e7b;
  outline-offset: 2px;
}
/* Les messages de securite restent entierement geres par PrestaShop. */
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .password-strength-feedback {
  width: 100%;
  margin-top: 10px;
  color: #506c68;
  font-size: 11px;
  line-height: 1.5;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .password-strength-feedback .progress {
  height: 5px;
  background: #edf2ef;
  border-radius: 50px;
  overflow: hidden;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .password-strength-feedback .progress-bar {
  height: 100%;
  border-radius: inherit;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .password-requirements p {
  margin: 4px 0;
  line-height: 1.4;
}

/* 07. Conditions et confidentialite : necessaires, donc toujours visibles. */
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .lpsproaccount-section-additional {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  min-width: 0;
  margin-top: 4px;
  padding: 20px 21px;
  background: #f7faf8;
  border: 1px solid #e5eeea;
  border-radius: 12px;
}
#lpsproaccountFormB2B .lpsproaccount-section-additional {
  margin-top: 32px;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .lpsproaccount-section-additional .form-group.row > label.form-control-label {
  display: none; /* Ces labels d'encadrement sont vides dans le HTML fourni. */
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .lpsproaccount-section-additional .custom-checkbox {
  display: block;
  width: 100%;
  min-width: 0;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .lpsproaccount-section-additional .custom-checkbox > label {
  display: block;
  max-width: 100%;
  padding: 0;
  margin: 0;
  color: #315452;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.65;
  cursor: pointer;
  white-space: normal;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .lpsproaccount-section-additional .custom-checkbox > label > span {
  margin-right: 8px;
  vertical-align: -3px;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .lpsproaccount-section-additional .custom-checkbox a {
  color: #145f56;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .lpsproaccount-section-additional .custom-checkbox em {
  display: inline;
  color: #738984;
  font-size: 11px;
  font-style: normal;
  line-height: 1.6;
}

/* 08. Bouton Enregistrer ; champs caches/token/back restent intacts. */
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) > footer.form-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  min-width: 0;
  margin: 27px 0 0;
  padding: 25px 0 0;
  border: 0;
  border-top: 1px solid #e7efea;
  background: transparent;
  text-align: right;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) > footer.form-footer .btn.form-control-submit {
  display: inline-flex;
  float: none;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 200px;
  min-height: 47px;
  padding: 11px 24px;
  margin: 0;
  background: var(--tdr-mint);
  border: 1px solid var(--tdr-mint);
  border-radius: 10px;
  box-shadow: none;
  color: #103f40;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 750;
  text-align: center;
  text-transform: none;
  transition: background .17s ease, border-color .17s ease, transform .17s ease;
  cursor: pointer;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) > footer.form-footer .btn.form-control-submit:hover {
  background: #2ed99b;
  border-color: #2ed99b;
  color: #103f40;
  transform: translateY(-1px);
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) > footer.form-footer .btn.form-control-submit:focus-visible {
  outline: 3px solid #126d60;
  outline-offset: 3px;
}
:is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) > footer.form-footer .btn.form-control-submit:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) .alert,
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) .help-block,
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) .invalid-feedback {
  max-width: 100%;
  overflow-wrap: anywhere;
}
#main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) > .page-footer {
  margin: 0;
  padding: 0;
}

/* 09. Responsive : deux colonnes jusqu'a 700 px comme le checkout Thotika. */
@media (max-width: 700px) {
  #main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) {
    margin: 12px auto 40px;
    padding: 0 10px;
  }
  #main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) > #content.page-content {
    padding: 23px 20px;
    border-radius: 16px;
  }
  #main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) .register-form > p {
    margin-bottom: 24px;
    padding-bottom: 19px;
    text-align: left;
  }
  #lpsproaccountFormB2C > div:first-child,
  #lpsproaccountFormB2B .lpsproaccount-section-info,
  #lpsproaccountFormB2B .lpsproaccount-section-pro {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  #lpsproaccountFormB2B .lpsproaccount-section-info > h2,
  #lpsproaccountFormB2B .lpsproaccount-section-pro > h2 {
    grid-column: 1;
  }
  #lpsproaccountFormB2B .lpsproaccount-section-pro {
    margin-top: 30px;
  }
  :is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) .lpsproaccount-section-additional {
    padding: 17px 15px;
  }
  :is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) > footer.form-footer .btn.form-control-submit {
    width: 100%;
  }
}
@media (max-width: 370px) {
  #main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) > #content.page-content {
    padding: 20px 15px;
  }
  #main:has(form#lpsproaccountFormB2C, form#lpsproaccountFormB2B) > .page-header h1 {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  :is(#lpsproaccountFormB2C, #lpsproaccountFormB2B) * { transition: none !important; }
}
