/* ============================================================
   BlockPulse Halal : connexion, inscription, mon compte
   ============================================================ */

.auth-page {
  position: relative; z-index: 1;
  flex: 1 0 auto;
  padding: 3rem 0 4.5rem;
}
.auth-shell {
  width: min(calc(100% - 2rem), 1040px); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 1.5rem; align-items: start;
}
.auth-shell--account { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.auth-card {
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 1px solid var(--bp-border); border-radius: var(--bp-radius-xl);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  box-shadow: var(--bp-shadow), inset 0 1px 0 rgba(255,255,255,.05);
}
.auth-title { margin: .9rem 0 .4rem; font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 900; line-height: 1.1; color: #fff; }
.auth-h2 { margin: 0 0 1.2rem; font-size: 1.3rem; font-weight: 800; color: #fff; }
.auth-sub { margin: 0 0 1.6rem; color: var(--muted); }
.auth-sub a, .auth-check a { color: var(--accent-3); font-weight: 700; }

.auth-alert { margin: 0 0 1.2rem; padding: .85rem 1rem; border-radius: 12px; font-size: .9rem; line-height: 1.5; }
.auth-alert--error { border: 1px solid rgba(239,68,68,.45); background: rgba(239,68,68,.1); color: #fecaca; }
.auth-alert--ok    { border: 1px solid rgba(16,185,129,.45); background: rgba(16,185,129,.1); color: #a7f3d0; }

.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }
.auth-field label { display: block; margin-bottom: .4rem; font-size: .84rem; font-weight: 700; color: var(--text); }
.auth-field input[type="text"], .auth-field input[type="email"], .auth-field input[type="password"] {
  width: 100%; min-height: 50px; padding: .75rem .95rem;
  border: 1px solid rgba(255,255,255,.14); border-radius: 12px;
  background: rgba(11,18,32,.75); color: #fff;
  font: inherit; font-size: 1rem;
}
.auth-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,159,110,.25); }
.auth-field input[aria-invalid="true"] { border-color: rgba(239,68,68,.7); }
.auth-help { display: block; margin-top: .4rem; font-size: .78rem; color: var(--muted); }
.auth-error { margin: .4rem 0 0; font-size: .82rem; font-weight: 600; color: #fca5a5; }

.auth-pw { position: relative; }
.auth-pw input { padding-right: 6rem !important; }
.auth-pw__toggle {
  position: absolute; right: .45rem; top: 50%; transform: translateY(-50%);
  padding: .4rem .7rem; border: 0; border-radius: 9px;
  background: rgba(255,255,255,.08); color: var(--text);
  font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
}
.auth-pw__toggle:hover { background: rgba(255,255,255,.14); }

.auth-meter { height: 5px; margin-top: .55rem; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.auth-meter i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .25s ease, background .25s ease; }

.auth-check { display: flex; align-items: flex-start; gap: .65rem; font-size: .86rem; line-height: 1.5; color: var(--muted); }
.auth-check input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--accent); }

.auth-submit { width: 100%; margin-top: .3rem; font: inherit; font-weight: 800; font-size: 1rem; }
.auth-foot { margin: 1.2rem 0 0; font-size: .8rem; line-height: 1.55; color: var(--muted); }

/* Piège à robots : champ invisible pour les humains */
.auth-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Colonne d'avantages */
.auth-aside {
  padding: 1.8rem;
  border: 1px solid rgba(212,175,55,.3); border-radius: var(--bp-radius-xl);
  background: radial-gradient(420px 220px at 100% 0%, rgba(212,175,55,.12), transparent 60%), rgba(255,255,255,.02);
}
.auth-aside h2 { margin: 0 0 1.2rem; font-size: 1.2rem; font-weight: 800; color: #fff; }
.auth-aside ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.auth-aside li { display: flex; gap: .85rem; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.auth-aside li > span { flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.05); font-size: 1.15rem; }
.auth-aside b { display: block; color: #fff; }

/* Mon compte */
.auth-profile { margin: 1.2rem 0; display: flex; flex-direction: column; gap: .6rem; }
.auth-profile > div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px solid rgba(255,255,255,.06); font-size: .92rem; }
.auth-profile dt { color: var(--muted); }
.auth-profile dd { margin: 0; color: #fff; font-weight: 700; text-align: right; word-break: break-all; }
.auth-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1.4rem 0; }
.auth-shortcuts a {
  display: flex; align-items: center; gap: .55rem;
  padding: .75rem .85rem; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03);
  color: #fff; font-size: .86rem; font-weight: 700; text-decoration: none;
}
.auth-shortcuts a:hover { border-color: var(--bp-border-strong); }
.auth-logout .bp-btn-secondary { width: 100%; font: inherit; font-weight: 700; }

@media (max-width: 860px) {
  .auth-shell, .auth-shell--account { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .auth-page { padding: 14px 0 2rem; margin-top: calc(56px + env(safe-area-inset-top)); }
  .auth-shell { width: min(calc(100% - 1rem), 1040px); }
  .auth-shortcuts { grid-template-columns: 1fr; }
}

/* Rôle du compte */
.auth-role { display: inline-block; padding: .18rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 800; }
.auth-role--user  { background: rgba(255,255,255,.08); color: var(--text); }
.auth-role--admin { background: rgba(212,175,55,.16); border: 1px solid rgba(212,175,55,.45); color: var(--gold); }
.auth-shortcuts .auth-shortcut--admin { grid-column: 1 / -1; border-color: rgba(212,175,55,.45); background: rgba(212,175,55,.08); }
.auth-shell--single { grid-template-columns: minmax(0, 620px); justify-content: center; }
.auth-shell--narrow { grid-template-columns: minmax(0, 460px); justify-content: center; }

/* Connexion et inscription : formulaire seul, centré horizontalement et verticalement */
.auth-page:has(.auth-shell--narrow) { display: flex; flex-direction: column; justify-content: center; }
.auth-shell--narrow { width: min(calc(100% - 2rem), 480px); grid-template-columns: 1fr; }
.auth-shell--narrow .auth-card { text-align: left; }
.auth-shell--narrow .auth-card > .section-badge { margin: 0 auto; display: flex; }
.auth-shell--narrow .auth-title, .auth-shell--narrow .auth-sub { text-align: center; }
