/* Source: public/login.php */
/* 100% dark — aucune surface blanche. On hérite du fond global (pas de background blanc ajouté). */
:root{
  color-scheme: dark;
  --brand: var(--brand, #7c5cff);
  --on-brand: var(--on-brand, #ffffff);
  --text: var(--text, #e6e8ee);
  --muted: var(--muted, #a0a8c0);
  --surface: var(--surface, rgba(17, 20, 32, 0.7));
  --surface-strong: var(--surface-strong, rgba(17, 20, 32, 0.9));
  --stroke: var(--stroke, rgba(255,255,255,0.12));
  --ring: var(--ring, rgba(124,92,255,0.45));
}

.auth-layout{
  min-height: calc(100dvh - var(--header-height, 0px) - var(--footer-height, 0px));
  display: flex;
  align-items: flex-start;   /* top aligned to avoid big empty space above title */
  justify-content: center;
  gap: 0;
  padding: clamp(12px, 3vw, 32px);
  padding-top: clamp(16px, 6vh, 56px); /* comfortable space under the navbar */
  background: none;
}

.auth-card{ margin-top: 0;
  width: min(520px, 100%);
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: clamp(20px, 3vw, 32px);
  color: var(--text);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
 padding: 16px 24px 24px; }

.auth-header{ display:flex; flex-direction:column; gap:6px; margin-bottom:18px;  margin-top:0;}
.auth-header h1{ font-size: clamp(22px, 2.2vw, 28px); margin:0;  margin-top:0; margin-bottom:4px;}
.auth-subtitle{ margin:0; color: var(--muted); font-size: .95rem; }

.auth-alert{
  background: rgba(255, 87, 87, 0.14);
  border: 1px solid rgba(255,87,87,0.35);
  color: #ffd7d7;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 10px 0 16px;
}
.auth-alert.success{
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
  color: #d1fae5;
}

.auth-form{ display:grid; gap:16px; }

.field{ display:flex; flex-direction:column; gap:8px; }
.field-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.field label{ font-weight:600; font-size:.95rem; }

.input-wrap{
  position: relative;
  display:flex;
  align-items:center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 10px 12px 10px 40px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-wrap:focus-within{
  border-color: var(--ring);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--ring), transparent 65%);
  background: rgba(255,255,255,0.06);
}
.input-wrap input{
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}
.icon{ position:absolute; left:12px; opacity:.8; display:grid; place-items:center; }

.reveal{
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; padding: 2px 4px; margin-left: 8px; line-height:0; border-radius: 8px;
}
.reveal:hover{ background: rgba(255,255,255,0.06); }

.remember{ display:flex; align-items:center; gap:8px; color: var(--muted); user-select:none; }
.remember input{ accent-color: var(--brand); }

.auth-submit{
  width:100%;
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  border: 1px solid color-mix(in oklab, var(--brand), black 12%);
  background: linear-gradient(180deg, color-mix(in oklab, var(--brand), white 8%), var(--brand));
  color: var(--on-brand);
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: .2px;
  font-size: 1rem;
  cursor:pointer;
  box-shadow: 0 10px 24px color-mix(in oklab, var(--brand), transparent 80%);
}
.auth-submit:hover{ filter: brightness(1.05); }

.link{
  color: color-mix(in oklab, var(--brand), white 25%);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
  padding-bottom: 1px;
}
.link:hover{ opacity: .9; }

.auth-footer{ margin-top:18px; text-align:center; color: var(--muted); }

@media (max-width: 480px){
  .auth-card{ margin-top: 0; padding: 18px; border-radius: 16px;  padding: 16px 24px 24px; }
  .field-row{ flex-direction: column; align-items:flex-start; gap:10px; }
  .auth-submit{ font-size: .95rem; }
}

/* Hide the "Inscription" nav button on the login page */
body.page-login .nav a[href*="register.php"]{ display: none !important; }

