/* Dynaparts 2026-09-30 — page connexion / inscription (authentication.tpl).
   Étape 1 : connexion + création de compte en cartes. Étape 2 (arrive en AJAX) : formulaire
   en cartes numérotées, libellés au-dessus, champs sur deux colonnes à partir de 768 px. */

body#authentication {
  --dpa-red: #e9271a;
  --dpa-red-dark: #c41f13;
  --dpa-ink: #282b2f;
  --dpa-muted: #5d636a;
  --dpa-line: #dfe2e6;
  --dpa-soft: #f5f6f7;
  --dpa-ok: #1f8a4c;
}

/* ---------- En-tête ---------- */
#authentication .dp-auth-head { max-width: 1040px; margin: 8px auto 26px; }
#authentication .dp-auth-head__kicker {
  margin: 0 0 6px;
  color: var(--dpa-red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
#authentication .dp-auth-head .page-heading {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--dpa-ink);
  font-family: 'DP Saira', Verdana, Geneva, sans-serif;
  font-size: 36px;
  font-style: italic;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}
#authentication .dp-auth-head__lead { margin: 10px 0 0; color: var(--dpa-muted); font-size: 15px; }

/* ---------- Étape 1 : deux cartes ---------- */
#authentication .dp-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
}
#authentication .dp-auth__card {
  position: relative;
  padding: 34px 36px 32px;
  border: 1px solid var(--dpa-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(40, 43, 47, .06);
}
#authentication .dp-auth__card .box { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
#authentication .dp-auth__card--create {
  overflow: hidden;
  border-color: var(--dpa-ink);
  background: var(--dpa-ink);
  color: #ffffff;
}
#authentication .dp-auth__card--create::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -40px;
  width: 190px;
  height: 190px;
  border: 26px solid rgba(233, 39, 26, .22);
  border-radius: 50%;
  pointer-events: none;
}
#authentication .dp-auth__title {
  margin: 0 0 6px;
  color: inherit;
  font-family: 'DP Saira', Verdana, Geneva, sans-serif;
  font-size: 24px;
  font-style: italic;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}
#authentication .dp-auth__card--login .dp-auth__title { color: var(--dpa-ink); }
#authentication .dp-auth__sub { margin: 0 0 22px; color: var(--dpa-muted); font-size: 14px; line-height: 1.5; }
#authentication .dp-auth__card--create .dp-auth__sub { margin-bottom: 14px; color: rgba(255, 255, 255, .72); }

#authentication .dp-auth__perks { position: relative; z-index: 1; margin: 18px 0 24px; padding: 0; list-style: none; }
#authentication .dp-auth__perks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.4;
}
#authentication .dp-auth__perks svg {
  flex-shrink: 0;
  margin-top: 1px;
  padding: 3px;
  border-radius: 50%;
  background: var(--dpa-red);
  color: #ffffff;
  box-sizing: content-box;
}

/* Champs */
#authentication .dp-auth .form-group { margin: 0 0 16px; }
#authentication .dp-auth label,
#authentication .dp-auth-create label {
  display: block;
  margin: 0 0 6px;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}
#authentication .dp-auth__card--login label { color: var(--dpa-ink); }
#authentication .dp-auth__label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#authentication .dp-auth__forgot { margin-bottom: 6px; color: var(--dpa-red); font-size: 13px; font-weight: 600; text-decoration: none; }
#authentication .dp-auth__forgot:hover,
#authentication .dp-auth__forgot:focus { color: var(--dpa-red-dark); text-decoration: underline; }

#authentication .dp-auth .form-control,
#authentication .dp-auth-create .form-control {
  width: 100%;
  max-width: none;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--dpa-line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
  color: var(--dpa-ink);
  font-size: 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#authentication .dp-auth-create textarea.form-control { height: auto; min-height: 96px; padding: 12px 14px; }
#authentication .dp-auth-create select.form-control { padding-right: 34px; }
#authentication .dp-auth .form-control:focus,
#authentication .dp-auth-create .form-control:focus {
  border-color: var(--dpa-ink);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(233, 39, 26, .14);
}
#authentication .dp-auth__card--create .form-control { border-color: #ffffff; }
#authentication .dp-auth__card--create .form-control:focus { border-color: var(--dpa-red); box-shadow: 0 0 0 4px rgba(233, 39, 26, .35); }
#authentication .form-error .form-control { border-color: var(--dpa-red); }
#authentication .form-ok .form-control { border-color: var(--dpa-ok); }

/* Mot de passe : bouton afficher */
#authentication .dp-pw { position: relative; }
#authentication .dp-pw .form-control { padding-right: 52px; }
#authentication .dp-pw__btn {
  position: absolute;
  top: 2px;
  right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--dpa-muted);
  cursor: pointer;
}
#authentication .dp-pw__btn:hover,
#authentication .dp-pw__btn:focus { color: var(--dpa-ink); }
#authentication .dp-pw__hide,
#authentication .dp-pw__btn[aria-pressed="true"] .dp-pw__show { display: none; }
#authentication .dp-pw__btn[aria-pressed="true"] .dp-pw__hide { display: block; }

/* Boutons */
#authentication .dp-auth .submit { margin: 22px 0 0; }
#authentication .dp-auth__btn,
#authentication #submitAccount {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--dpa-red);
  box-shadow: none;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background .15s ease, transform .15s ease;
}
#authentication .dp-auth__btn span,
#authentication #submitAccount span { padding: 0; border: 0; background: none; color: inherit; font: inherit; }
#authentication .dp-auth__btn:hover,
#authentication .dp-auth__btn:focus,
#authentication #submitAccount:hover,
#authentication #submitAccount:focus { background: var(--dpa-red-dark); color: #ffffff; }
#authentication .dp-auth__btn:active,
#authentication #submitAccount:active { transform: translateY(1px); }
#authentication .dp-auth__btn--light { background: #ffffff; color: var(--dpa-ink); }
#authentication .dp-auth__btn--light:hover,
#authentication .dp-auth__btn--light:focus { background: var(--dpa-red); color: #ffffff; }

#authentication #create_account_error { margin: 0 0 14px; border-radius: 10px; }

/* Réassurance */
#authentication .dp-auth__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  max-width: 1040px;
  margin: 26px auto 10px;
  padding: 0;
  color: var(--dpa-muted);
  font-size: 13px;
  list-style: none;
}
#authentication .dp-auth__trust li { position: relative; padding-left: 16px; }
#authentication .dp-auth__trust li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--dpa-red);
}
#authentication .dp-auth__trust a { color: var(--dpa-ink); font-weight: 700; }

/* ---------- Étape 2 : formulaire complet ---------- */
#authentication .dp-auth-create {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  counter-reset: dpa-step;
}
#authentication .dp-auth-create .account_creation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  margin: 0 0 20px;
  padding: 30px 32px 14px;
  border: 1px solid var(--dpa-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(40, 43, 47, .05);
}
#authentication .dp-auth-create .account_creation > * { grid-column: 1 / -1; }
#authentication .dp-auth-create .account_creation[style*="none"],
#authentication .dp-auth-create .account_creation.unvisible { display: none; }
#authentication .dp-auth-create .account_creation > h3.page-subheading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  color: var(--dpa-ink);
  font-family: 'DP Saira', Verdana, Geneva, sans-serif;
  font-size: 20px;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  counter-increment: dpa-step;
}
#authentication .dp-auth-create .account_creation > h3.page-subheading::before {
  content: counter(dpa-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--dpa-red);
  color: #ffffff;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 15px;
  font-style: normal;
}
#authentication .dp-auth-create .account_creation > p.required { display: none; }

/* Libellés au-dessus, fini la grille bootstrap horizontale */
#authentication .dp-auth-create .form-group { margin: 0 0 18px; }
#authentication .dp-auth-create .form-group > .control-label,
#authentication .dp-auth-create .inline-infos > label {
  float: none;
  width: auto;
  padding: 0;
  text-align: left;
}
#authentication .dp-auth-create .form-group > [class*="col-sm-"],
#authentication .dp-auth-create .inline-infos > [class*="col-sm-"] {
  float: none;
  width: 100%;
  margin-left: 0;
  padding: 0;
}
#authentication .dp-auth-create sup { color: var(--dpa-red); font-size: 12px; top: -.2em; }
#authentication .dp-auth-create .form_info,
#authentication .dp-auth-create .inline-infos label,
#authentication .dp-auth-create .form-group span.inline-infos {
  display: block;
  margin-top: 6px;
  color: var(--dpa-muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
}
#authentication .dp-auth-create .inline-infos { margin: -8px 0 18px; }

/* Deux colonnes (navigateurs récents) */
@media (min-width: 768px) {
  #authentication .dp-auth-create .account_creation > .form-group:has(#customer_firstname, #customer_lastname, #email, #passwd, #firstname, #lastname, #company, #vat_number, #postcode, #city, #id_country, #id_state, #phone_mobile, #alias) {
    grid-column: auto;
  }
}

/* Civilité en pastilles */
#authentication .dp-auth-create .radio-inline { display: inline-block; margin: 0 8px 8px 0; padding: 0; }
#authentication .dp-auth-create .radio-inline label.top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 0;
  padding: 0 16px;
  border: 1.5px solid var(--dpa-line);
  border-radius: 999px;
  color: var(--dpa-ink);
  font-weight: 600;
  cursor: pointer;
}
#authentication .dp-auth-create .radio-inline label.top:has(input:checked) { border-color: var(--dpa-ink); background: var(--dpa-soft); }
#authentication .dp-auth-create input[type="radio"],
#authentication .dp-auth-create input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--dpa-red);
}

/* Date de naissance : trois listes alignées */
#authentication .dp-auth-create .form-group:has(#days) .row { display: flex; gap: 10px; margin: 0; }
#authentication .dp-auth-create .form-group:has(#days) .row > div { flex: 1 1 0; width: auto; padding: 0; }
/* le clearfix bootstrap (::before/::after) deviendrait un élément flex et décalerait tout */
#authentication .dp-auth-create .form-group:has(#days) .row::before,
#authentication .dp-auth-create .form-group:has(#days) .row::after,
#authentication .dp-auth-create .submit::before,
#authentication .dp-auth-create .submit::after { display: none; }
#authentication .dp-auth-create .form-group:has(#days) .row > div:nth-child(2) { flex-grow: 1.6; }

/* Cases à cocher */
#authentication .dp-auth-create .checkbox { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; }
#authentication .dp-auth-create .checkbox label { margin: 0; font-weight: 500; cursor: pointer; }
#authentication .dp-auth-create .form-group:has(.checkbox) { margin-bottom: 12px; }

/* Envoi */
#authentication .dp-auth-create .submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 4px 0 10px;
}
#authentication .dp-auth-create #submitAccount { width: auto; min-width: 280px; }
#authentication .dp-auth-create .submit .required { float: none; margin: 0; color: var(--dpa-muted); font-size: 12.5px; }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  #authentication .dp-auth-head { margin: 0 0 18px; }
  #authentication .dp-auth-head .page-heading { font-size: 28px; }
  #authentication .dp-auth { grid-template-columns: 1fr; gap: 16px; }
  #authentication .dp-auth__card { padding: 24px 20px 22px; border-radius: 14px; }
  #authentication .dp-auth__title { font-size: 21px; }
  #authentication .dp-auth__trust { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 20px; }
  #authentication .dp-auth-create .account_creation { grid-template-columns: 1fr; padding: 22px 18px 8px; border-radius: 14px; }
  #authentication .dp-auth-create .account_creation > h3.page-subheading { font-size: 18px; }
  #authentication .dp-auth-create #submitAccount { width: 100%; min-width: 0; }
}

/* Erreurs PrestaShop (errors.tpl) alignées sur les cartes */
#authentication #center_column > .alert,
#authentication #noSlide > .alert,
#authentication #center_column > #order_step {
  max-width: 1040px;
  margin-right: auto;
  margin-left: auto;
}
#authentication #center_column > .alert,
#authentication #noSlide > .alert { margin-bottom: 20px; border-radius: 12px; }
