.gate {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 28px;
  background: var(--bg-sidebar);
}

.gate-card {
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.gate-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 20px;
  border-radius: 16px;
  background: var(--accent);
  box-shadow: 0 6px 20px rgba(224, 163, 58, 0.35);
}

.gate-mark svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gate h1 {
  font-size: 1.3125rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.gate .subtitle {
  margin-top: 5px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.gate form {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.field {
  width: 100%;
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  /* Jamais sous 16px : en dessous, iOS zoome à la mise au point. */
  font-size: max(1rem, 16px);
  text-align: center;
}

.field:focus {
  border-color: var(--accent);
}

.primary {
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: filter 0.12s ease;
}

.primary:hover {
  filter: brightness(1.05);
}

.primary:disabled {
  opacity: 0.55;
  cursor: default;
}

.gate .error {
  min-height: 18px;
  font-size: 0.8125rem;
  color: var(--danger);
}

.profiles {
  display: grid;
  gap: 7px;
  margin-top: 22px;
  text-align: left;
}

.profile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  font-size: 0.9375rem;
  transition: border-color 0.12s ease, transform 0.08s ease;
}

.profile:hover {
  border-color: var(--line-strong);
}

.profile:active {
  transform: scale(0.985);
}

.profile .avatar {
  width: 30px;
  height: 30px;
  margin: 0;
  border: none;
  font-size: 0.75rem;
}

.profile.new {
  background: none;
  border-style: dashed;
  color: var(--text-muted);
  justify-content: center;
}

.color-picker {
  display: flex;
  justify-content: center;
  gap: 9px;
  padding: 4px 0 2px;
}

.swatch {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 2px solid transparent;
  outline-offset: 2px;
  transition: transform 0.1s ease;
}

.swatch[aria-pressed="true"] {
  border-color: var(--text);
  transform: scale(1.12);
}

.link-button {
  margin-top: 14px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-button:hover {
  color: var(--text);
}
