/* ═══════════════════════════════════════════════════════════
   DashSPIE — écran de verrouillage (ajout isolé, ne touche pas
   au moteur canonique). Utilise les tokens de styles.css.
   ═══════════════════════════════════════════════════════════ */

body:not(.unlocked) .smooth,
body:not(.unlocked) .dock { display: none; }

body:not(.unlocked) { overflow: hidden; height: 100vh; }

.gate {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bone);
  opacity: 1; visibility: visible;
  transition: opacity .6s cubic-bezier(.4,0,.2,1), visibility 0s linear 0s;
}
.gate.gate-hidden {
  opacity: 0; visibility: hidden;
  transition: opacity .6s cubic-bezier(.4,0,.2,1), visibility 0s linear .6s;
}

.gate-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(var(--ink-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--ink-rgb), 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 45%, #000 40%, transparent 85%);
  pointer-events: none;
}

.gate-sweep {
  position: absolute; left: 50%; top: 45%;
  width: 640px; height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 0deg, rgba(230,20,44,0.16), transparent 28%);
  animation: gate-rotate 7s linear infinite;
}
@keyframes gate-rotate { to { transform: rotate(360deg); } }

.gate-panel {
  position: relative; z-index: 1;
  width: min(400px, calc(100vw - 48px));
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  gap: 18px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 4px 2px;
}

.gate-kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ash);
}

.gate-wordmark {
  font-family: var(--sans); font-size: clamp(32px, 7vw, 44px);
  letter-spacing: -0.02em; color: var(--ink); line-height: 1;
}

.gate-sub {
  font-size: 14px; color: var(--ash); line-height: 1.5; max-width: 300px;
}

.gate-tabs {
  display: flex; gap: 6px;
  background: rgba(var(--ink-rgb), 0.06);
  border-radius: 999px;
  padding: 4px;
}
.gate-tab {
  border: none; background: transparent; cursor: pointer;
  padding: 9px 18px;
  border-radius: 999px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash);
  transition: background .25s ease, color .25s ease;
}
.gate-tab.is-active { background: var(--lime); color: var(--lime-ink); }

.gate-form {
  width: 100%;
  display: flex; flex-direction: column; gap: 14px; margin-top: 4px;
}
.gate-form[hidden] { display: none; }

.gate-input-row {
  position: relative; width: 100%;
}

.gate-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.3);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-align: center;
  padding: 10px 4px 12px;
  outline: none;
  transition: border-color .25s ease;
}
.gate-input::placeholder { color: rgba(var(--ink-rgb), 0.35); letter-spacing: 0.08em; }
.gate-input:focus { border-color: var(--lime); }

.gate-form.gate-error .gate-input { border-color: var(--lime); }
.gate-form.gate-error .gate-input-row:last-of-type { animation: gate-shake .42s ease; }
@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

.gate-msg {
  min-height: 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--lime);
  opacity: 0; transition: opacity .25s ease;
}
.gate-form.gate-error .gate-msg { opacity: 1; }

.gate-submit {
  margin-top: 6px;
  align-self: center;
  padding: 13px 30px;
  border-radius: 999px;
  border: none;
  background: var(--lime);
  color: var(--lime-ink);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .25s ease, opacity .25s ease;
}
.gate-submit:hover { transform: translateY(-2px); }
.gate-submit:active { transform: translateY(0); }
.gate-submit:disabled { opacity: 0.5; cursor: default; transform: none; }

.gate-foot {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; color: rgba(var(--ink-rgb), 0.4);
  margin-top: 8px;
}
