/*
 * DanIT Login Page Override
 * Scoped to #authentication, #registration, #password pages.
 */

:root {
  --dlp-accent: #4C3CFF;
  --dlp-grad-start: #000000;
  --dlp-grad-mid: #4C3CFF;
  --dlp-grad-end: #87A1FF;
}

body#authentication #wrapper,
body#registration #wrapper,
body#password #wrapper {
  background: #fff;
  padding: 0;
}

body#authentication .page-content,
body#registration .page-content,
body#password .page-content {
  max-width: 1040px;
  margin: 60px auto !important;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 20px;
  padding: 0 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
  font-family: 'Poppins', sans-serif;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-height: 560px;
}

/* ── Brand panel (left on desktop) ───────────────────────── */
body#authentication .dlp-brand-panel,
body#registration .dlp-brand-panel,
body#password .dlp-brand-panel {
  position: relative;
  background-image:
      linear-gradient(135deg, rgba(0, 0, 8, 0.78) 0%, rgba(30, 20, 120, 0.72) 45%, rgba(76, 60, 255, 0.55) 100%),
      url("Ray-Ban-Meta-Smart-Glasses-3.jpg");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat;
  color: #fff;
  padding: 56px 44px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

body#authentication .dlp-brand-panel::before,
body#registration .dlp-brand-panel::before,
body#password .dlp-brand-panel::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

body#authentication .dlp-brand-panel::after,
body#registration .dlp-brand-panel::after,
body#password .dlp-brand-panel::after {
  content: "";
  position: absolute;
  bottom: -120px;
  left: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.dlp-brand-inner {
  position: relative;
  z-index: 1;
}

.dlp-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 0;
  margin-bottom: 24px;
}

.dlp-brand-logo img {
  display: block;
  height: 40px;
  width: auto;
}

.dlp-brand-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin: 0 0 16px;
}

.dlp-brand-tagline {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 28px;
}

/* ── Form panel (right on desktop) ───────────────────────── */
.dlp-form-panel {
  padding: 52px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dlp-form-title {
  font-family: 'Poppins', sans-serif !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  margin: 0 0 6px !important;
  line-height: 1.2;
}

.dlp-form-subtitle {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: #6b6b7b;
  margin: 0 0 28px;
  line-height: 1.5;
}

/* Hide the original page-title if theme renders one above the card */
body#authentication > #wrapper > .container > h1.page-title,
body#registration > #wrapper > .container > h1.page-title,
body#password > #wrapper > .container > h1.page-title {
  display: none;
}

/* ── Headings ──────────────────────────────────────────────── */
body#authentication h1.page-title,
body#registration h1.page-title,
body#password h1.page-title {
  font-family: 'Poppins', sans-serif !important;
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  margin-bottom: 24px !important;
  line-height: 1.2;
}

/* ── Labels ────────────────────────────────────────────────── */
body#authentication .login-form label,
body#registration .login-form label,
body#password label,
body#authentication .form-group label.col-form-label,
body#registration .form-group label.col-form-label,
body#password .form-group label.col-form-label {
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  color: #1a1a1a !important;
  text-transform: none;
  letter-spacing: 0;
}

/* ── Inputs ────────────────────────────────────────────────── */
body#authentication .login-form .form-control,
body#registration .form-control,
body#password .form-control {
  font-family: 'Poppins', sans-serif !important;
  font-size: 1rem !important;
  color: #1a1a1a !important;
  background: #f5f4ff !important;
  border: 1.5px solid transparent !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  height: auto !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body#authentication .login-form .form-control:focus,
body#registration .form-control:focus,
body#password .form-control:focus {
  background: #fff !important;
  border-color: var(--dlp-accent) !important;
  box-shadow: 0 0 0 3px rgba(76, 60, 255, 0.15) !important;
  outline: none !important;
}

body#authentication .login-form .form-control::placeholder,
body#registration .form-control::placeholder,
body#password .form-control::placeholder {
  color: #8a8a9a;
  opacity: 1;
}

/* Password input-group */
body#authentication .input-group,
body#registration .input-group,
body#password .input-group {
  border-radius: 10px;
  overflow: hidden;
  background: #f5f4ff;
  border: 1.5px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body#authentication .input-group.js-child-focus,
body#authentication .input-group:focus-within,
body#registration .input-group:focus-within,
body#password .input-group:focus-within {
  background: #fff;
  border-color: var(--dlp-accent);
  box-shadow: 0 0 0 3px rgba(76, 60, 255, 0.15);
}

body#authentication .input-group .form-control,
body#registration .input-group .form-control,
body#password .input-group .form-control {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body#authentication .input-group .input-group-append,
body#registration .input-group .input-group-append,
body#password .input-group .input-group-append {
  display: flex;
  align-items: center;
}

body#authentication .input-group [data-action="show-password"],
body#registration .input-group [data-action="show-password"],
body#password .input-group [data-action="show-password"] {
  background: #1a1a1a !important;
  border: none !important;
  color: #fff !important;
  padding: 0 16px !important;
  margin: 4px !important;
  border-radius: 8px !important;
  height: calc(100% - 8px);
  transition: background 0.2s ease;
}

body#authentication .input-group [data-action="show-password"]:hover,
body#registration .input-group [data-action="show-password"]:hover,
body#password .input-group [data-action="show-password"]:hover {
  background: var(--dlp-accent) !important;
}

/* ── Forgot password link ─────────────────────────────────── */
body#authentication .forgot-password {
  text-align: center;
  margin: 18px 0 8px;
}

body#authentication .forgot-password a,
body#password .forgot-password a {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

body#authentication .forgot-password a:hover,
body#password .forgot-password a:hover {
  color: var(--dlp-accent);
  border-bottom-color: var(--dlp-accent);
}

/* ── Submit button — gradient ─────────────────────────────── */
body#authentication .form-footer,
body#registration .form-footer,
body#password .form-footer {
  text-align: center;
  margin-top: 20px;
}

body#authentication #submit-login,
body#authentication .form-footer .btn-primary,
body#registration .form-footer .btn-primary,
body#password .form-footer .btn-primary,
body#password button[type="submit"] {
  min-width: 220px;
  padding: 12px 48px !important;
  border-radius: 999px !important;
  border: none !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #fff !important;
  background-image: linear-gradient(34deg,
      var(--dlp-grad-start) -10%,
      var(--dlp-grad-mid) 30%,
      var(--dlp-grad-end) 70%,
      var(--dlp-grad-mid) 90%,
      var(--dlp-grad-start) 120%) !important;
  background-color: transparent !important;
  background-size: 300% 100% !important;
  background-position: 0% 50% !important;
  transition: background-position 0.6s ease !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  cursor: pointer;
}

body#authentication #submit-login:hover,
body#authentication .form-footer .btn-primary:hover,
body#registration .form-footer .btn-primary:hover,
body#password .form-footer .btn-primary:hover,
body#password button[type="submit"]:hover {
  background-position: 50% 20% !important;
  color: #fff !important;
}

/* ── Divider / "No account" link ──────────────────────────── */
body#authentication hr {
  border: none;
  border-top: 1px solid #ececec;
  margin: 24px 0;
}

body#authentication .no-account {
  text-align: center;
  margin-top: 8px;
}

body#authentication .no-account a {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
}

body#authentication .no-account a:hover {
  color: var(--dlp-accent);
}

body#authentication .no-account a i {
  margin-left: 4px;
  transition: transform 0.2s ease;
}

body#authentication .no-account a:hover i {
  transform: translateX(3px);
}

/* ── Registration page extras ─────────────────────────────── */
body#registration .register-form .form-control-comment {
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  color: #666;
}

body#registration .custom-checkbox label {
  font-size: 0.9rem;
  color: #444;
}

body#registration .custom-checkbox input[type="checkbox"] + span {
  border-radius: 4px;
  border-color: #d0d0d0;
}

body#registration .custom-checkbox input[type="checkbox"]:checked + span {
  background: var(--dlp-accent);
  border-color: var(--dlp-accent);
}

/* ── Validation states ────────────────────────────────────── */
body#authentication .form-control.is-invalid,
body#registration .form-control.is-invalid,
body#password .form-control.is-invalid {
  border-color: #e53935 !important;
  background: #fff5f5 !important;
}

body#authentication .help-block,
body#registration .help-block,
body#password .help-block {
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  margin-top: 6px;
  color: #e53935;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  body#authentication .page-content,
  body#registration .page-content,
  body#password .page-content {
    grid-template-columns: 1fr;
    min-height: 0;
    margin: 24px 16px !important;
  }

  body#authentication .dlp-brand-panel,
  body#registration .dlp-brand-panel,
  body#password .dlp-brand-panel {
    padding: 36px 28px 28px;
  }

  .dlp-brand-title {
    font-size: 1.5rem;
  }

  .dlp-form-panel {
    padding: 32px 24px;
  }

  .dlp-form-title {
    font-size: 1.4rem !important;
  }
}

@media (max-width: 768px) {

  body#authentication h1.page-title,
  body#registration h1.page-title,
  body#password h1.page-title {
    font-size: 1.6rem !important;
  }

  body#authentication #submit-login,
  body#authentication .form-footer .btn-primary,
  body#registration .form-footer .btn-primary,
  body#password .form-footer .btn-primary {
    width: 100%;
    min-width: 0;
  }
}

/* ═══════════════════════════════════════════════════════════
 * CHECKOUT — inline login + register forms (body#checkout)
 * ═══════════════════════════════════════════════════════════ */
body#checkout #checkout-personal-information-step,
body#checkout .js-personal-information,
body#checkout #customer-form,
body#checkout #login-form {
  font-family: 'Poppins', sans-serif !important;
}

/* Step heading */
body#checkout .checkout-step .step-title,
body#checkout #checkout-personal-information-step .step-title {
  font-family: 'Poppins', sans-serif !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  margin-bottom: 22px !important;
}

/* "Vous avez déjà un compte ? Connectez-vous !" banner */
body#checkout .login-form > div:first-child,
body#checkout .nav.nav-inline,
body#checkout .no-account {
  margin-bottom: 18px;
}

body#checkout .login-form a,
body#checkout .no-account a {
  color: var(--dlp-accent) !important;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

body#checkout .login-form a:hover,
body#checkout .no-account a:hover {
  border-bottom-color: var(--dlp-accent);
}

/* Labels */
body#checkout #customer-form label,
body#checkout #login-form label,
body#checkout .form-group label.col-form-label,
body#checkout .form-group label {
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  color: #1a1a1a !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* Inputs */
body#checkout #customer-form .form-control,
body#checkout #login-form .form-control,
body#checkout .js-personal-information .form-control {
  font-family: 'Poppins', sans-serif !important;
  font-size: 1rem !important;
  color: #1a1a1a !important;
  background: #f5f4ff !important;
  border: 1.5px solid transparent !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  height: auto !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body#checkout #customer-form .form-control:focus,
body#checkout #login-form .form-control:focus,
body#checkout .js-personal-information .form-control:focus {
  background: #fff !important;
  border-color: var(--dlp-accent) !important;
  box-shadow: 0 0 0 3px rgba(76, 60, 255, 0.15) !important;
  outline: none !important;
}

body#checkout #customer-form .form-control::placeholder,
body#checkout #login-form .form-control::placeholder {
  color: #8a8a9a !important;
  opacity: 1 !important;
}

/* Password input-group */
body#checkout #login-form .input-group,
body#checkout #customer-form .input-group {
  border-radius: 10px;
  overflow: hidden;
  background: #f5f4ff;
  border: 1.5px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body#checkout #login-form .input-group:focus-within,
body#checkout #customer-form .input-group:focus-within {
  background: #fff;
  border-color: var(--dlp-accent);
  box-shadow: 0 0 0 3px rgba(76, 60, 255, 0.15);
}

body#checkout #login-form .input-group .form-control,
body#checkout #customer-form .input-group .form-control {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body#checkout [data-action="show-password"] {
  background: #1a1a1a !important;
  border: none !important;
  color: #fff !important;
  padding: 0 16px !important;
  margin: 4px !important;
  border-radius: 8px !important;
  height: calc(100% - 8px);
  transition: background 0.2s ease;
}

body#checkout [data-action="show-password"]:hover {
  background: var(--dlp-accent) !important;
}

/* Title (M./Mme) radio group */
body#checkout #customer-form .radio-inline,
body#checkout #customer-form .custom-radio {
  margin-right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
}

/* Field help text — "Seules les lettres..." / "Optionnel" */
body#checkout .form-control-comment,
body#checkout .col-form-label + small,
body#checkout .help-block:not(.error),
body#checkout small.form-text {
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.78rem !important;
  color: #888 !important;
  font-weight: 400 !important;
  line-height: 1.4;
  margin-top: 4px;
}

/* Validation error */
body#checkout .help-block.error,
body#checkout .form-control.is-invalid + .help-block {
  color: #e53935 !important;
  font-size: 0.82rem !important;
}

body#checkout .form-control.is-invalid {
  border-color: #e53935 !important;
  background: #fff5f5 !important;
}

/* Custom checkboxes */
body#checkout .custom-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

body#checkout .custom-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid #d0d0d0;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

body#checkout .custom-checkbox input[type="checkbox"]:hover {
  border-color: var(--dlp-accent);
}

body#checkout .custom-checkbox input[type="checkbox"]:checked {
  border-color: var(--dlp-accent);
  background: var(--dlp-accent);
}

body#checkout .custom-checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

body#checkout .custom-checkbox label,
body#checkout .custom-checkbox > span {
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  color: #444 !important;
  line-height: 1.5;
  cursor: pointer;
}

/* Submit buttons (Connexion / Continuer) */
body#checkout #submit-login,
body#checkout #customer-form .form-footer .btn-primary,
body#checkout #customer-form button[type="submit"],
body#checkout #login-form .form-footer .btn-primary,
body#checkout .js-personal-information button.continue[type="submit"] {
  min-width: 220px;
  width: 100%;
  padding: 14px 48px !important;
  border-radius: 999px !important;
  border: none !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  background-image: linear-gradient(34deg,
      var(--dlp-grad-start) -10%,
      var(--dlp-grad-mid) 30%,
      var(--dlp-grad-end) 70%,
      var(--dlp-grad-mid) 90%,
      var(--dlp-grad-start) 120%) !important;
  background-color: transparent !important;
  background-size: 300% 100% !important;
  background-position: 0% 50% !important;
  transition: background-position 0.6s ease !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(76, 60, 255, 0.28);
}

body#checkout #submit-login:hover,
body#checkout #customer-form .form-footer .btn-primary:hover,
body#checkout #login-form .form-footer .btn-primary:hover,
body#checkout .js-personal-information button.continue[type="submit"]:hover {
  background-position: 50% 20% !important;
  color: #fff !important;
}

/* Forgot password link */
body#checkout .forgot-password {
  text-align: center;
  margin: 14px 0 20px;
}

body#checkout .forgot-password a {
  font-family: 'Poppins', sans-serif !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  color: #1a1a1a !important;
  text-decoration: none !important;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

body#checkout .forgot-password a:hover {
  color: var(--dlp-accent) !important;
  border-bottom-color: var(--dlp-accent);
}

/* Optionnel / field helper badge */
body#checkout .col-form-label + .form-control-comment,
body#checkout .form-group .col-md-2 {
  color: #888;
  font-size: 0.82rem;
  font-weight: 500;
}

/* Separator between login and register sections */
body#checkout hr,
body#checkout .login-form + hr,
body#checkout .js-personal-information hr {
  border: none;
  border-top: 1px solid #ececec;
  margin: 28px 0;
}

/* Compact the register form */
body#checkout #customer-form .form-group.row,
body#checkout #login-form .form-group.row {
  margin-bottom: 18px !important;
  align-items: center;
}
