/* Auth pages (DEV) - Sports Équilibre
   Palette: noir/blanc dominant + accent bleu
*/

:root {
  --auth-bg: #f6f7fb;
  --auth-card: #ffffff;
  --auth-text: #0b1220;
  --auth-muted: rgba(11, 18, 32, 0.62);
  --auth-border: rgba(0, 0, 0, 0.10);
  --auth-shadow: 0 18px 50px rgba(0, 0, 0, 0.12), 0 6px 18px rgba(0, 0, 0, 0.08);
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-text);
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(37, 99, 235, 0.08), transparent 55%),
    radial-gradient(900px 500px at 80% 20%, rgba(0, 0, 0, 0.06), transparent 60%),
    var(--auth-bg);
}

/* Ensure borders/padding never overflow width (fixes button slight overflow) */
body.auth-page *,
body.auth-page *::before,
body.auth-page *::after {
  box-sizing: border-box;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  box-shadow: var(--auth-shadow);
  padding: 28px;
}

.auth-card--wide {
  max-width: 860px;
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.auth-brand {
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.75);
  text-decoration: none;
}

.auth-brand span {
  color: var(--brand);
}

.auth-back {
  font-size: 13px;
  color: var(--auth-muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
}

.auth-back:hover {
  background: rgba(37, 99, 235, 0.08);
  color: rgba(0, 0, 0, 0.78);
}

.auth-header {
  text-align: center;
  margin: 6px 0 18px;
}

.auth-title {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.auth-subtitle {
  margin: 0;
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.6;
}

.auth-error {
  display: none;
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 14px 0;
  font-size: 14px;
}

.btn-auth {
  width: 100%;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  color: #111;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.10);
  border-color: rgba(37, 99, 235, 0.35);
}

.btn-auth:active {
  transform: translateY(0);
}

.btn-primary-auth {
  border: 1px solid rgba(37, 99, 235, 0.35);
  background: var(--brand);
  color: #fff;
}

.btn-primary-auth:hover {
  background: var(--brand-hover);
  border-color: rgba(37, 99, 235, 0.55);
}

.btn-danger-auth {
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: #ef4444;
  color: #fff;
}

.btn-danger-auth:hover {
  background: #dc2626;
  border-color: rgba(239, 68, 68, 0.55);
}

.google-logo {
  width: 20px;
  height: 20px;
}

.auth-note {
  margin: 14px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}

/* Conditions content */
.conditions-scroll {
  margin-top: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.02);
  border-radius: 14px;
  padding: 16px;
  max-height: 48vh;
  overflow: auto;
}

.conditions-scroll h2 {
  font-size: 16px;
  margin: 18px 0 10px;
  font-weight: 800;
}

.conditions-scroll p, .conditions-scroll li {
  color: rgba(0, 0, 0, 0.75);
  font-size: 14px;
  line-height: 1.8;
}

.conditions-checks {
  margin-top: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  border-radius: 14px;
  padding: 14px;
}

.check-row {
  display: flex;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 12px;
}

.check-row + .check-row {
  margin-top: 6px;
}

.check-row:hover {
  background: rgba(37, 99, 235, 0.06);
}

.check-row input[type="checkbox"] {
  /* Custom checkbox to ensure identical size across states/browsers */
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  flex: 0 0 20px;
  border-radius: 6px;
  border: 2px solid rgba(0, 0, 0, 0.22);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.check-row label {
  margin: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(0,0,0,0.78);
}

.check-row input[type="checkbox"]::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: rotate(-45deg);
  margin-top: -1px;
}

.check-row input[type="checkbox"]:checked {
  background: var(--brand);
  border-color: rgba(37, 99, 235, 0.9);
}

.check-row input[type="checkbox"]:checked::after {
  border-left-color: #fff;
  border-bottom-color: #fff;
}

.check-row input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.22);
  border-color: rgba(37, 99, 235, 0.9);
}

.auth-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-actions .btn-auth {
  flex: 1;
  min-width: 220px;
}

/* Account */
.account-head {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 10px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(37, 99, 235, 0.25);
  background: #f3f4f6;
}

.account-meta h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.account-meta p {
  margin: 4px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
}

@media (max-width: 520px) {
  .auth-card { padding: 20px; }
  .auth-title { font-size: 24px; }
  .conditions-scroll { max-height: 52vh; }
}

