/* Page de connexion — composition full-bleed Phishing Guardian */
:root {
  --bg0: #02060c;
  --ink: #e8eef8;
  --muted: #8b9bb4;
  --line: rgba(140, 180, 255, 0.22);
  --accent: #3d8bfd;
  --accent-2: #1ec98a;
  --field: rgba(6, 14, 26, 0.72);
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg0);
  overflow-x: hidden;
}

.login-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(61, 139, 253, 0.24), transparent 55%),
    radial-gradient(900px 600px at 90% 110%, rgba(30, 201, 138, 0.16), transparent 50%),
    linear-gradient(165deg, #030913 0%, #06101c 45%, #02060c 100%);
}

.login-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: drift 14s ease-in-out infinite alternate;
}

.login-glow-a {
  width: 42vw;
  height: 42vw;
  left: -8%;
  top: -12%;
  background: rgba(61, 139, 253, 0.3);
}

.login-glow-b {
  width: 36vw;
  height: 36vw;
  right: -10%;
  bottom: -16%;
  background: rgba(30, 201, 138, 0.22);
  animation-delay: -4s;
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  opacity: 0.7;
  animation: gridPulse 8s ease-in-out infinite;
}

.login-noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}

.login-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
}

.login-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.75rem, 5vw, 4rem);
  max-width: 520px;
  width: 100%;
  margin: 0 auto 0 0;
  margin-left: clamp(1rem, 8vw, 7rem);
}

.login-brand {
  margin-bottom: 2rem;
  animation: rise 0.7s ease both;
}

.login-shield {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #041018;
  background: linear-gradient(145deg, #7eb0ff 0%, #3d8bfd 45%, #1ec98a 100%);
  box-shadow: 0 12px 40px rgba(61, 139, 253, 0.35);
  margin-bottom: 1.35rem;
  animation: rise 0.7s ease both, shieldGlow 3.5s ease-in-out infinite;
}

.login-product {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 5.2vw, 3.1rem);
  letter-spacing: -0.04em;
  line-height: 0.98;
  margin-bottom: 1rem;
  background: linear-gradient(100deg, #f2f6ff 10%, #9ec0ff 55%, #5fe0ad 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.login-lead {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.5;
  max-width: 34ch;
}

.login-form {
  display: grid;
  gap: 1rem;
  animation: rise 0.85s ease both;
  animation-delay: 0.08s;
}

.login-field {
  display: grid;
  gap: 0.4rem;
}

.login-field span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.login-field input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-field input::placeholder {
  color: rgba(139, 155, 180, 0.55);
}

.login-field input:focus {
  border-color: rgba(61, 139, 253, 0.7);
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.18);
  background: rgba(8, 18, 34, 0.9);
}

.login-error {
  color: #ffb4bc;
  background: rgba(255, 107, 122, 0.12);
  border: 1px solid rgba(255, 107, 122, 0.35);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
}

.login-submit {
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #031018;
  cursor: pointer;
  background: linear-gradient(105deg, #8eb9ff 0%, #3d8bfd 48%, #22d392 100%);
  box-shadow: 0 14px 36px rgba(61, 139, 253, 0.28);
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.login-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.login-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.login-hint {
  margin-top: 1.5rem;
  color: rgba(139, 155, 180, 0.85);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  animation: rise 1s ease both;
  animation-delay: 0.14s;
}

.login-hint code {
  color: #b7c9e6;
}

/* Visual plane — radar full-bleed (pas une carte) */
.login-visual {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  border-left: 1px solid rgba(140, 180, 255, 0.1);
  background:
    radial-gradient(circle at 55% 48%, rgba(61, 139, 253, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(3, 10, 20, 0.2), rgba(2, 6, 12, 0.55));
  animation: rise 1s ease both;
  animation-delay: 0.12s;
}

.radar-ring {
  position: absolute;
  left: 55%;
  top: 48%;
  border: 1px solid rgba(142, 185, 255, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.radar-ring-a { width: min(62vw, 520px); height: min(62vw, 520px); }
.radar-ring-b {
  width: min(44vw, 360px);
  height: min(44vw, 360px);
  border-color: rgba(30, 201, 138, 0.25);
  animation: ringPulse 5s ease-in-out infinite;
}
.radar-ring-c {
  width: min(26vw, 210px);
  height: min(26vw, 210px);
  border-style: dashed;
  animation: ringPulse 5s ease-in-out infinite reverse;
}

.radar-beam {
  position: absolute;
  left: 55%;
  top: 48%;
  width: min(62vw, 520px);
  height: min(62vw, 520px);
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, rgba(61, 139, 253, 0.38), transparent 70deg, transparent 360deg);
  border-radius: 50%;
  animation: beamSpin 6s linear infinite;
  mask-image: radial-gradient(circle, black 0%, transparent 68%);
}

.radar-core {
  position: absolute;
  left: 55%;
  top: 48%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #8eb9ff;
  box-shadow: 0 0 24px rgba(61, 139, 253, 0.9), 0 0 48px rgba(30, 201, 138, 0.35);
}

.radar-hud {
  position: absolute;
  left: 8%;
  bottom: 10%;
  display: grid;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(178, 201, 230, 0.7);
}

.radar-hud span {
  opacity: 0;
  animation: hudIn 0.6s ease forwards;
}

.radar-hud span:nth-child(1) { animation-delay: 0.4s; }
.radar-hud span:nth-child(2) { animation-delay: 0.55s; }
.radar-hud span:nth-child(3) { animation-delay: 0.7s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(3%, 4%, 0) scale(1.08); }
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.85; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shieldGlow {
  0%, 100% { box-shadow: 0 12px 40px rgba(61, 139, 253, 0.3); }
  50% { box-shadow: 0 16px 48px rgba(30, 201, 138, 0.28); }
}

@keyframes beamSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.45; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.03); }
}

@keyframes hudIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 960px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 38vh;
    order: -1;
    border-left: 0;
    border-bottom: 1px solid rgba(140, 180, 255, 0.1);
  }

  .login-main {
    margin: 0 auto;
    padding-top: 1.5rem;
    justify-content: flex-start;
  }

  .radar-hud {
    left: 6%;
    bottom: 8%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-glow,
  .login-grid,
  .radar-beam,
  .radar-ring-b,
  .radar-ring-c,
  .login-shield {
    animation: none !important;
  }
}
