/* ============================================
   ShopLink - Auth Pages Styles
   frontend/src/styles/auth.css
   ============================================ */

body { min-height: 100vh; min-height: calc(var(--vh, 1vh) * 100); }

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: calc(var(--vh, 1vh) * 100);
}

/* LEFT PANEL */
.auth-left {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  color: white;
  position: relative;
  overflow: hidden;
}
.auth-left::after {
  content: "";
  position: absolute;
  bottom: -100px; right: -100px;
  width: 400px; height: 400px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.auth-brand .nav-logo { color: white; font-size: 1.4rem; display: flex; align-items: center; gap: .6rem; }
.auth-brand .logo-icon { font-size: 1.6rem; }
.auth-hero-text h1 { font-size: 2rem; font-weight: 800; line-height: 1.25; margin-bottom: 1rem; }
.auth-hero-text p { opacity: .85; margin-bottom: 2rem; }
.auth-features { display: flex; flex-direction: column; gap: .6rem; }
.auth-feature {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  background: rgba(255,255,255,.1);
  padding: .65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.15);
}

/* RIGHT PANEL */
.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  margin: auto 0;
}
.auth-title { font-size: 1.5rem; font-weight: 800; margin-bottom: .4rem; }
.auth-subtitle { color: var(--text-secondary); font-size: .9rem; margin-bottom: 1.75rem; }

.auth-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 1rem;
  word-break: break-word;
}

form { display: flex; flex-direction: column; gap: 1rem; }

.input-password { position: relative; }
.input-password input { padding-right: 3rem; }
.pwd-toggle {
  position: absolute;
  right: .75rem; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  min-width: 32px;
  min-height: 32px;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .875rem;
  color: var(--text-secondary);
}
.form-check input[type="checkbox"] {
  width: auto;
  margin-top: .1rem;
  flex-shrink: 0;
}
.form-check a { color: var(--green-wa); }

.form-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .875rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.link-small { color: var(--green-wa); font-size: .85rem; }

.auth-divider {
  text-align: center;
  margin: 1.25rem 0;
  position: relative;
  color: var(--text-muted);
  font-size: .8rem;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-link { text-align: center; font-size: .875rem; color: var(--text-secondary); }
.auth-link a { color: var(--green-wa); font-weight: 600; }

/* ─────────────────────────── RESPONSIVE ─────────────────────────── */

/* Tablettes (≤900px) : le grid 50/50 devient trop étroit pour le panneau gauche */
@media (max-width: 900px) {
  .auth-container { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 2rem 1.5rem; }
}

/* Mobiles (≤768px) */
@media (max-width: 768px) {
  .auth-right { padding: 1.5rem 1rem; }
  .auth-card { padding: 1.75rem; }
}

/* Petits mobiles (≤400px) */
@media (max-width: 400px) {
  .auth-card { padding: 1.25rem; border-radius: var(--radius-lg); }
  .auth-title { font-size: 1.3rem; }
}