/* ================================================================
   ACCOUNT (LOGIN / REGISTER) – herboristerie-ambre
   ================================================================ */

/* ── Page wrapper ────────────────────────────────────────────── */
.auth-page {
  background: var(--beige-light);
  min-height: 100vh;
  padding: 40px 0 80px;
}

/* ── Brand header ────────────────────────────────────────────── */
.auth-brand {
  text-align: center;
  margin-bottom: 40px;
}
.auth-logo {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 10px;
}
.auth-logo-img {
  height: 130px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  display: block;
  margin: -26px auto;
}
.auth-tagline {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Two-column grid ─────────────────────────────────────────── */
.auth-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: start;
  max-width: 900px;
  margin: 0 auto 36px;
}

/* ── Cards ───────────────────────────────────────────────────── */
.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: box-shadow .3s ease;
}
.auth-card:hover { box-shadow: var(--shadow-md); }
.auth-card--register { border-color: #c6d9c4; }

.auth-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.auth-icon-wrap {
  width: 44px;
  height: 44px;
  background: var(--beige);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}
.auth-icon-wrap--green {
  background: #eef5ed;
  border-color: #c6d9c4;
  color: var(--green-primary);
}
.auth-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--green-dark);
  margin-bottom: 3px;
}
.auth-card-sub {
  font-size: .82rem;
  color: var(--text-muted);
}

/* ── Vertical divider ────────────────────────────────────────── */
.auth-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px 0;
  gap: 10px;
  user-select: none;
}
.auth-divider-line {
  width: 1px;
  flex: 1;
  background: var(--border);
  min-height: 40px;
}
.auth-divider-text {
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--beige-light);
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* ── Benefits list ───────────────────────────────────────────── */
.auth-benefits {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f3f7f2;
  border: 1px solid #d4e6d2;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 24px;
}
.auth-benefit {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .85rem;
  color: var(--green-dark);
  font-weight: 500;
}
.auth-benefit svg { flex-shrink: 0; }

/* ── Form fields ─────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 18px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; }

.auth-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--green-dark);
  letter-spacing: .01em;
}
.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.auth-forgot {
  font-size: .78rem;
  color: var(--green-primary);
  font-weight: 500;
  transition: var(--transition);
}
.auth-forgot:hover { color: var(--green-dark); }

/* Input wrapper */
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}
.auth-input {
  width: 100%;
  padding: 11px 42px 11px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  color: var(--text);
  background: var(--beige-light);
  transition: var(--transition);
  outline: none;
}
.auth-input:focus {
  border-color: var(--green-primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(74,103,65,.12);
}
.auth-input::placeholder { color: #b0b8b0; }
/* No icon variant */
.auth-input-wrap:not(:has(.auth-input-icon)) .auth-input {
  padding-left: 14px;
}

/* Password eye toggle */
.auth-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  line-height: 0;
  transition: color .2s;
}
.auth-eye:hover { color: var(--green-primary); }
.auth-eye.visible .eye-slash { display: block; }
.auth-eye.visible .eye-open  { display: none; }

/* Two column row */
.auth-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.auth-row-2 .auth-input { padding-left: 14px; }

/* ── Password strength ───────────────────────────────────────── */
.auth-strength-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.auth-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width .3s ease, background .3s ease;
}
.auth-strength-fill.weak   { background: #e74c3c; }
.auth-strength-fill.medium { background: #f0a500; }
.auth-strength-fill.strong { background: var(--green-primary); }
.auth-strength-label {
  font-size: .74rem;
  color: var(--text-muted);
  margin-top: 4px;
  min-height: 16px;
}

/* ── Remember / checkbox ─────────────────────────────────────── */
.auth-remember { margin-top: -4px; }
.auth-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: .85rem;
  color: var(--text-muted);
  user-select: none;
}
.auth-terms-label {
  align-items: flex-start;
  line-height: 1.6;
}
.auth-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.auth-checkmark {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: var(--beige-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  margin-top: 2px;
}
.auth-checkbox:checked + .auth-checkmark {
  background: var(--green-primary);
  border-color: var(--green-primary);
}
.auth-checkbox:checked + .auth-checkmark::after {
  content: '';
  display: block;
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.auth-link {
  color: var(--green-primary);
  text-decoration: underline;
  font-weight: 500;
}
.auth-link:hover { color: var(--green-dark); }

/* ── Submit buttons ──────────────────────────────────────────── */
.auth-submit-btn {
  width: 100%;
  padding: 13px 20px;
  background: var(--green-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: .01em;
}
.auth-submit-btn:hover { background: var(--green-dark); transform: translateY(-1px); }
.auth-submit-btn:active { transform: translateY(0); }
.auth-submit-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.auth-submit-btn--outline {
  background: transparent;
  color: var(--green-primary);
  border: 2px solid var(--green-primary);
}
.auth-submit-btn--outline:hover {
  background: var(--green-primary);
  color: #fff;
}

/* ── Switch link ─────────────────────────────────────────────── */
.auth-switch {
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 18px;
}
.auth-switch-link {
  color: var(--green-primary);
  font-weight: 600;
  transition: color .2s;
}
.auth-switch-link:hover { color: var(--green-dark); }

/* ── Bottom trust bar ────────────────────────────────────────── */
.auth-trust-bar {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── WooCommerce error/notice overrides ──────────────────────── */
.auth-page .woocommerce-error,
.auth-page .woocommerce-message,
.auth-page .woocommerce-info {
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: .88rem;
  border-left-width: 4px;
  padding: 12px 16px;
  list-style: none;
}
.auth-page .woocommerce-error {
  background: #fff5f5;
  border-color: #e74c3c;
  color: #c0392b;
}
.auth-page .woocommerce-message {
  background: #f3f7f2;
  border-color: var(--green-primary);
  color: var(--green-dark);
}

/* ── Field error state ───────────────────────────────────────── */
.auth-input.field-error {
  border-color: #e74c3c;
  background: #fff5f5;
}
.auth-field-error-msg {
  font-size: .76rem;
  color: #e74c3c;
  margin-top: 3px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .auth-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .auth-divider {
    flex-direction: row;
    padding: 0;
    height: 32px;
  }
  .auth-divider-line {
    width: auto;
    height: 1px;
    flex: 1;
    min-height: unset;
  }
}

@media (max-width: 540px) {
  .auth-page    { padding: 28px 0 60px; }
  .auth-card    { padding: 24px 20px; }
  .auth-row-2   { grid-template-columns: 1fr; }
  .auth-trust-bar { gap: 18px; flex-direction: column; align-items: center; }
}

/* ── Responsive Enhancements v2 ──────────────────────────────── */
/* iOS auto-zoom: .auth-input is .9rem (~14.4px) — Safari zooms on focus */
@media (max-width: 768px) {
  .auth-input { font-size: 16px !important; }
}
@media (min-width: 769px) {
  .auth-input { font-size: .9rem; }
}

/* Minimum touch target on submit */
.auth-submit-btn { min-height: 44px; }

/* Tightest phones */
@media (max-width: 400px) {
  .auth-card      { padding: 20px 16px; }
  .auth-page      { padding: 20px 0 40px; }
  .auth-trust-bar { gap: 12px; }
}

/* ================================================================
   LOST PASSWORD PAGE
   ================================================================ */

.alp-wrap {
  max-width: 480px;
  margin: 0 auto 36px;
}

.alp-card {
  text-align: left;
}

.alp-icon-wrap {
  background: #fff3e0;
  border-color: #f0c78a;
  color: #c87e20;
}

/* Steps indicator */
.alp-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 28px;
  padding: 18px 20px;
  background: var(--beige-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.alp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
}

.alp-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s, color .3s;
}

.alp-step--active .alp-step-dot {
  background: var(--green-primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(74,103,65,.18);
}

.alp-step-label {
  font-size: .7rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.alp-step--active .alp-step-label {
  color: var(--green-dark);
  font-weight: 600;
}

.alp-step-line {
  height: 2px;
  flex: 1;
  background: var(--border);
  margin-bottom: 20px;
}

/* Info notice box */
.alp-info-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: #f0f7ff;
  border: 1px solid #c3d9f5;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  color: #2563a8;
  line-height: 1.5;
}

.alp-info-box svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #2563a8;
}

/* Submit button with icon */
.alp-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* RTL: flip text-align and input icon */
html[dir="rtl"] .alp-card,
html[data-dir="rtl"] .alp-card,
body.dir-rtl .alp-card         { text-align: right; direction: rtl; }

html[dir="rtl"] .alp-steps,
html[data-dir="rtl"] .alp-steps,
body.dir-rtl .alp-steps        { flex-direction: row-reverse; }

html[dir="rtl"] .auth-input-icon,
html[data-dir="rtl"] .auth-input-icon,
body.dir-rtl .auth-input-icon  { left: auto; right: 14px; }

html[dir="rtl"] .alp-card .auth-input,
html[data-dir="rtl"] .alp-card .auth-input,
body.dir-rtl .alp-card .auth-input {
  padding-left: 14px;
  padding-right: 42px;
}

html[dir="rtl"] .alp-info-box,
html[data-dir="rtl"] .alp-info-box,
body.dir-rtl .alp-info-box     { flex-direction: row-reverse; text-align: right; }

/* Responsive */
@media (max-width: 540px) {
  .alp-step-label { display: none; }
  .alp-steps      { padding: 14px 12px; }
}

/* ================================================================
   ACCOUNT / AUTH – RTL
   ================================================================ */

html[dir="rtl"] .auth-page,
html[data-dir="rtl"] .auth-page,
body.dir-rtl .auth-page               { direction: rtl; }

html[dir="rtl"] .auth-card,
html[data-dir="rtl"] .auth-card,
body.dir-rtl .auth-card               { direction: rtl; }

html[dir="rtl"] .auth-header,
html[data-dir="rtl"] .auth-header,
body.dir-rtl .auth-header             { direction: rtl; }

html[dir="rtl"] .auth-form,
html[data-dir="rtl"] .auth-form,
body.dir-rtl .auth-form               { direction: rtl; }

html[dir="rtl"] .auth-row-2,
html[data-dir="rtl"] .auth-row-2,
body.dir-rtl .auth-row-2              { direction: rtl; }

html[dir="rtl"] .auth-trust-bar,
html[data-dir="rtl"] .auth-trust-bar,
body.dir-rtl .auth-trust-bar          { flex-direction: row-reverse; }

html[dir="rtl"] .auth-input,
html[data-dir="rtl"] .auth-input,
body.dir-rtl .auth-input              { text-align: right; }
