/* ══ AUTH PAGE ══════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Croix retour */
.auth-close {
  position: fixed;
  top: 24px;
  left: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--bd2);
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--tx2);
  text-decoration: none;
  transition: all .15s;
  z-index: 10;
  box-shadow: var(--shadow-card);
}
.auth-close:hover {
  color: var(--tx);
  border-color: var(--c2);
  box-shadow: 0 0 0 3px rgba(107,92,255,.1);
}

/* Conteneur centré */
.auth-centered {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
}

/* Boîte formulaire */
.auth-form-box {
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  border: 1px solid var(--bd);
  border-radius: 20px;
  padding: 44px 44px 40px;
  box-shadow: var(--shadow-card);
}

/* Logo en haut du formulaire */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--tx);
  text-decoration: none;
  margin-bottom: 32px;
}
.auth-logo .brand-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--grad);
  display: grid; place-items: center;
  font-size: 15px; color: #fff;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}
.auth-logo .brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--tx);
}
.auth-logo .brand-name span {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* En-tête */
.auth-form-header { margin-bottom: 28px; }
.auth-form-header h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--tx);
  margin-bottom: 6px;
}
.auth-form-header p { font-size: 15px; color: var(--tx2); font-weight: 400; }
.auth-form-header a { color: var(--c2); font-weight: 600; text-decoration: none; }
.auth-form-header a:hover { text-decoration: underline; }

/* Formulaire */
.auth-form { display: flex; flex-direction: column; gap: 18px; }

.fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--tx);
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.field-link {
  font-size: 13px; font-weight: 500;
  color: var(--c2); text-decoration: none;
}
.field-link:hover { text-decoration: underline; }

.field input,
.input-wrap input {
  width: 100%;
  height: 48px;
  background: var(--bg2);
  border: 1.5px solid var(--bd2);
  border-radius: var(--r-s);
  padding: 0 16px;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--tx);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder,
.input-wrap input::placeholder { color: var(--tx3); }
.field input:focus,
.input-wrap input:focus {
  border-color: var(--c2);
  box-shadow: 0 0 0 3px rgba(107,92,255,.1);
  background: var(--bg);
}

/* Input œil */
.input-wrap { position: relative; }
.input-wrap input { padding-right: 50px; }
.input-eye {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  font-size: 16px; cursor: pointer; opacity: .45;
  transition: opacity .12s; padding: 0; line-height: 1;
}
.input-eye:hover { opacity: 1; }

/* Force mdp */
.password-strength { display: flex; gap: 6px; margin-top: 8px; }
.password-strength .bar {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--bg3); transition: background .25s;
}
.password-strength .bar.active { background: var(--c1); }

/* Checkbox */
.field-check { margin-top: 2px; }
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14px;
  color: var(--tx2);
  font-weight: 400;
  cursor: pointer;
  line-height: 1.55;
}
.check-label input[type="checkbox"] { display: none; }
.check-box {
  width: 20px; height: 20px; min-width: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--bd2);
  background: var(--bg2);
  display: grid; place-items: center;
  margin-top: 1px;
  transition: all .12s; flex-shrink: 0;
}
.check-label input:checked + .check-box {
  background: var(--grad);
  border-color: transparent;
}
.check-label input:checked + .check-box::after {
  content: '✓'; font-size: 12px; font-weight: 800; color: #fff;
}
.check-label a { color: var(--c2); font-weight: 500; }
.check-label a:hover { text-decoration: underline; }

/* Bouton submit */
.auth-submit {
  width: 100%; height: 52px;
  background: var(--grad); color: #fff;
  border: none; border-radius: var(--r-s);
  font-size: 16px; font-weight: 700; letter-spacing: -.01em;
  cursor: pointer; box-shadow: var(--shadow-glow);
  transition: opacity .15s, transform .15s;
  margin-top: 4px;
}
.auth-submit:hover { opacity: .88; transform: translateY(-1px); }

/* Note bas de page */
.auth-footer-note {
  font-size: 13px; color: var(--tx3);
  text-align: center; margin-top: 22px;
}
.auth-footer-note a { color: var(--tx3); text-decoration: underline; }
.auth-footer-note a:hover { color: var(--tx2); }

/* ══ DARK MODE ══════════════════════════════════════════════════════ */
body.theme-dark .auth-form-box { background: var(--bg2); border-color: var(--bd); }
body.theme-dark .field input,
body.theme-dark .input-wrap input { background: var(--bg3); border-color: var(--bd2); }
body.theme-dark .field input:focus,
body.theme-dark .input-wrap input:focus { background: var(--bg2); }
body.theme-dark .auth-close { background: var(--bg2); }

/* ══ RESPONSIVE ═════════════════════════════════════════════════════ */
@media (max-width: 520px) {
  .auth-form-box { padding: 32px 24px 28px; border-radius: 16px; }
  .fields-row { grid-template-columns: 1fr; }
  .auth-form-header h1 { font-size: 24px; }
  .auth-close { top: 16px; left: 16px; }
}
