/* =============== Phase 5 — Register (mobile-first) =============== */

#screen-register {
  align-items: center;
  justify-content: center;
}

#starfield-reg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.reg-wrap {
  position: relative;
  z-index: 2;
  width: min(92vw, 920px);
  display: grid;
  place-items: center;
  padding: 12px;
}

.reg-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, rgba(8,14,22,.65), rgba(8,14,22,.35));
  border: 1px solid var(--sc-border, rgba(92,199,255,.35));
  border-radius: 18px;
  box-shadow: 0 0 40px rgba(92,199,255,.12);
  padding: 18px 16px 16px;
  overflow: hidden;
}

/* Holo vertical scan */
.scan-overlay {
  position: absolute;
  top: -120%;
  left: 0; right: 0;
  height: 120%;
  background:
    linear-gradient(
      180deg,
      rgba(92,199,255,0) 0%,
      rgba(92,199,255,.18) 45%,
      rgba(92,199,255,.35) 50%,
      rgba(92,199,255,.18) 55%,
      rgba(92,199,255,0) 100%
    );
  filter: blur(0.5px);
  transform: translateY(-100%);
  pointer-events: none;
  opacity: 0;
}
.reg-card.scanning .scan-overlay {
  opacity: 1;
  animation: holoScan 1.2s ease-out forwards;
}
@keyframes holoScan {
  0%   { transform: translateY(-110%); }
  100% { transform: translateY(110%); }
}

/* KAR-2 */
.reg-kar2 {
  width: 120px;
  height: auto;
  display: block;
  margin: 6px auto 10px;
  filter: drop-shadow(0 6px 30px rgba(92,199,255,.25));
}

/* Textes */
.reg-title {
  text-align: center;
  color: #dff4ff;
  margin: 2px 0 6px;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(92,199,255,.35);
  font-size: clamp(18px, 4.6vw, 28px);
}
.reg-sub {
  text-align: center;
  color: #cfe8ff;
  opacity: .9;
  margin: 0 8px 14px;
  font-size: clamp(14px, 3.8vw, 16px);
}

/* Form */
.reg-form {
  display: grid;
  gap: 10px;
  margin: 0 6px 6px;
}
.reg-label {
  display: grid;
  gap: 6px;
}
.reg-label span { color: #cfe8ff; font-size: 14px; opacity: .95; }
.reg-input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid var(--sc-border, rgba(92,199,255,.35));
  background: rgba(6,12,20,.55);
  color: #e8f6ff;
  outline: none;
}
.reg-input:focus {
  box-shadow: 0 0 0 3px rgba(92,199,255,.25);
}

/* CTA */
.reg-btn {
  width: 100%;
  margin-top: 4px;
  padding: 12px 14px;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid var(--sc-border, rgba(92,199,255,.45));
  background: linear-gradient(180deg, rgba(12,24,38,.9), rgba(12,24,38,.6));
  color: #eaf7ff;
  cursor: pointer;
  transition: transform .15s ease, opacity .2s ease, box-shadow .3s ease;
}
.reg-btn:hover:not(:disabled) { transform: translateY(-1px); }
.reg-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Erreur + Privacy */
.reg-error { color: #ff9aa2; text-align: center; min-height: 18px; font-size: 13px; margin-top: 6px; }
.reg-privacy { text-align: center; color: #a9d6ff; opacity: .8; margin: 6px 8px 0 8px; font-size: 12px; }

/* Desktop enhancements */
@media (min-width: 720px) {
  .reg-card { padding: 22px 22px 18px; border-radius: 20px; }
  .reg-kar2 { width: 160px; margin-top: 2px; margin-bottom: 12px; }
  .reg-title { font-size: 28px; }
  .reg-sub { font-size: 16px; margin-bottom: 16px; }
  .reg-btn { padding: 14px 16px; font-size: 16px; }
}
