/* ===================================================
   RDOC – Créer un compte  |  register.css
   Pixel-accurate match to screenshot
   Mobile-first · Pure CSS · Black background
   =================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #000000; /* Pure black always */
  color: #ffffff;
}

/* ---------- Screen (phone constraint) ---------- */
.screen {
  width: 100%;
  max-width: 390px;
  min-height: 100vh;
  background: #000000;
  display: flex;
  flex-direction: column;
}

/* ---------- Container ---------- */
.register-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2.8rem 1.5rem 2rem;
}

/* ---------- Logo ---------- */
.logo-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 2.4rem;
}

.logo-img {
  width: auto;
  max-width: 160px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(32, 194, 220, 0.3));
}

/* ---------- Form ---------- */
.register-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0; /* controlled per field-group */
}

/* ---------- Field Group ---------- */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

/* Label above input — small, white/light */
.field-label {
  font-size: 0.82rem;
  font-weight: 400;
  color: #e0e0e0;
  letter-spacing: 0.01em;
  padding-left: 0.2rem;
  user-select: none;
}

/* White pill input */
.field-input-wrap {
  width: 100%;
  border-radius: 2.5rem;
  background: #ffffff;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.field-input-wrap:focus-within {
  box-shadow: 0 0 0 2px rgba(32, 194, 220, 0.6);
}

.field-input-wrap.has-error {
  box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.6);
}

.field-input {
  width: 100%;
  height: 3.2rem;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 1.4rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: #1a1a1a;
  -webkit-appearance: none;
  appearance: none;
}

/* Date input styling */
.field-date {
  color: #888;
}
.field-date:valid {
  color: #1a1a1a;
}

/* Remove date picker default icon on WebKit */
.field-date::-webkit-calendar-picker-indicator {
  opacity: 0.4;
  cursor: pointer;
}

/* ---------- Policy / Checkbox Row ---------- */
.policy-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.2rem;
  margin-bottom: 0; /* spacer handles gap */
  padding-left: 0.1rem;
}

.policy-checkbox {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  border: 1.5px solid #555;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}

.policy-checkbox:checked {
  background: #20c2dc;
  border-color: #20c2dc;
}

.policy-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 0px;
  width: 5px;
  height: 9px;
  border: 2px solid #000;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.policy-label {
  font-size: 0.85rem;
  font-weight: 400;
  color: #e0e0e0;
  cursor: pointer;
  letter-spacing: 0.01em;
}

/* ---------- Error message ---------- */
.form-error {
  font-size: 0.78rem;
  color: #ff6b6b;
  text-align: center;
  min-height: 1.1rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* ---------- Spacer ---------- */
.spacer {
  flex: 1;
  min-height: 2.5rem;
}

/* ---------- Create Account Button ---------- */
.btn-create {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 2.5rem;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #040d10;
  background: linear-gradient(135deg, #1ecde0 0%, #12afc2 55%, #0d9aad 100%);
  box-shadow:
    0 4px 22px rgba(18, 175, 194, 0.5),
    0 1px 4px rgba(0, 0, 0, 0.3);
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-create:hover {
  filter: brightness(1.1);
  box-shadow:
    0 6px 30px rgba(18, 175, 194, 0.6),
    0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-create:active {
  transform: scale(0.97);
  box-shadow: 0 2px 12px rgba(18, 175, 194, 0.35);
}

.btn-create:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Responsive ---------- */
@media (max-width: 375px) {
  .register-container {
    padding: 2.5rem 1.2rem 1.8rem;
  }

  .logo-img {
    max-width: 140px;
  }

  .field-input {
    height: 3rem;
    font-size: 0.85rem;
  }

  .btn-create {
    font-size: 0.95rem;
    padding: 0.88rem 1rem;
  }
}

@media (min-width: 480px) {
  body {
    padding: 2rem 1rem;
    justify-content: center;
  }

  .screen {
    border-radius: 2rem;
    min-height: auto;
    min-height: 780px;
    box-shadow:
      0 30px 80px rgba(0, 0, 0, 0.95),
      0 0 0 1px rgba(255, 255, 255, 0.04);
    margin: 2rem auto;
  }
}
