/**
 * Auth LeGeekShop — portail prise + panneau connexion / inscription
 */

@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap");

/* ——— Neon text ——— */
.lgk-neon-text {
  margin: 0;
  font-family: "Bebas Neue", var(--font-display, Impact), sans-serif;
  font-size: clamp(2rem, 6vw, 2.65rem);
  letter-spacing: 0.08em;
  color: #fff;
  text-align: center;
  text-shadow:
    0 0 2px #fff,
    0 0 8px #fff,
    0 0 16px #00d4ff,
    0 0 32px #00d4ff,
    0 0 48px rgba(0, 212, 255, 0.75),
    0 0 72px rgba(123, 47, 255, 0.45);
}

/* ——— Power plug gate ——— */
.lgk-auth-gate {
  --gate-cyan: #00d4ff;
  --gate-violet: #7b2fff;
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1.75rem;
  border-radius: 22px;
  border: 1px solid rgba(0, 212, 255, 0.22);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 212, 255, 0.12), transparent 60%),
    rgba(8, 10, 14, 0.94);
  box-shadow:
    0 0 0 1px rgba(123, 47, 255, 0.12),
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(0, 212, 255, 0.08);
  overflow: hidden;
  isolation: isolate;
}

.lgk-auth-gate__eyebrow {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.75);
}

.lgk-auth-gate__hint {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: #9aa3b2;
}

.lgk-auth-gate__hint strong {
  color: #e8eaef;
  font-weight: 600;
}

.lgk-auth-gate__skip {
  display: block;
  margin: 0.85rem auto 0;
  border: none;
  background: none;
  color: #6b7280;
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.lgk-auth-gate__skip:hover {
  color: #c4c9d2;
}

.lgk-auth-gate__track {
  position: relative;
  height: 88px;
  margin-top: 1.35rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.lgk-auth-gate__rail {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.55), rgba(123, 47, 255, 0.35));
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.35);
  pointer-events: none;
}

.lgk-auth-gate__socket {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  height: 56px;
  border-radius: 12px;
  border: 2px solid rgba(0, 212, 255, 0.45);
  background: rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 0 0 18px rgba(0, 212, 255, 0.12),
    0 0 18px rgba(0, 212, 255, 0.15);
  display: grid;
  place-items: center;
  gap: 0;
}

.lgk-auth-gate__socket-label {
  position: absolute;
  top: -1.15rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(0, 212, 255, 0.85);
}

.lgk-auth-gate__socket-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lgk-auth-gate__socket-slots span {
  display: block;
  width: 28px;
  height: 8px;
  border-radius: 3px;
  background: #0a0c10;
  border: 1px solid rgba(0, 212, 255, 0.35);
  box-shadow: inset 0 0 6px rgba(0, 212, 255, 0.2);
}

.lgk-auth-gate__socket.is-hot {
  border-color: #00d4ff;
  box-shadow:
    inset 0 0 22px rgba(0, 212, 255, 0.28),
    0 0 28px rgba(0, 212, 255, 0.45);
}

.lgk-auth-gate__plug {
  position: absolute;
  top: 50%;
  width: 78px;
  height: 48px;
  transform: translate(-50%, -50%);
  cursor: grab;
  z-index: 2;
  touch-action: none;
  will-change: left;
}

.lgk-auth-gate__plug.is-snapping {
  transition: left 0.42s cubic-bezier(0.22, 1.15, 0.36, 1);
}

.lgk-auth-gate__plug:active,
.lgk-auth-gate__plug.is-dragging {
  cursor: grabbing;
  transition: none;
}

.lgk-auth-gate.is-dragging .lgk-auth-gate__plug {
  transition: none;
}

.lgk-auth-gate__plug-body {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(180deg, #2a3140, #141820);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.lgk-auth-gate__prongs {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lgk-auth-gate__prongs span {
  display: block;
  width: 36px;
  height: 7px;
  border-radius: 3px;
  background: linear-gradient(90deg, #00d4ff, #7ee8ff);
  box-shadow:
    0 0 8px #00d4ff,
    0 0 16px rgba(0, 212, 255, 0.55);
}

.lgk-auth-gate.is-powered .lgk-auth-gate__plug .lgk-auth-gate__prongs span,
.lgk-auth-gate.is-hot .lgk-auth-gate__plug .lgk-auth-gate__prongs span {
  box-shadow:
    0 0 10px #fff,
    0 0 22px #00d4ff,
    0 0 40px rgba(123, 47, 255, 0.55);
}

.lgk-auth-gate.is-powered .lgk-auth-gate__socket,
.lgk-auth-gate.is-hot .lgk-auth-gate__socket {
  border-color: #fff;
  box-shadow:
    inset 0 0 28px rgba(0, 212, 255, 0.45),
    0 0 40px rgba(0, 212, 255, 0.65),
    0 0 70px rgba(123, 47, 255, 0.35);
}

.lgk-auth-gate.is-leaving {
  animation: lgk-gate-leave 0.55s cubic-bezier(0.77, 0, 0.18, 1) forwards;
}

@keyframes lgk-gate-leave {
  to {
    opacity: 0;
    transform: scale(0.94) translateY(12px);
    filter: blur(6px);
  }
}

/* ——— Sliding auth shell ——— */
.lgk-auth-candy {
  --candy-pink: #ff4ecd;
  --candy-violet: #7b2fff;
  --candy-blue: #3b82f6;
  --candy-ease: cubic-bezier(0.77, 0, 0.18, 1);
  position: relative;
  z-index: 1;
  width: min(100%, 960px);
  min-height: 580px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(ellipse 70% 55% at 18% 0%, rgba(123, 47, 255, 0.1), transparent 55%),
    rgba(10, 12, 16, 0.97);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(123, 47, 255, 0.08);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  filter: blur(4px);
}

.lgk-auth-candy.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
  transition:
    opacity 0.55s var(--candy-ease),
    transform 0.55s var(--candy-ease),
    filter 0.55s ease;
}

.lgk-auth-candy__forms {
  position: relative;
  width: 100%;
  min-height: 580px;
}

.lgk-auth-candy__panel {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  padding: 2.4rem 2.2rem 2rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  transition: opacity 0.45s ease, visibility 0.45s;
}

.lgk-auth-candy__panel--login {
  left: 0;
}

.lgk-auth-candy__panel--register {
  right: 0;
}

.lgk-auth-candy:not(.is-register) .lgk-auth-candy__panel--register {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lgk-auth-candy.is-register .lgk-auth-candy__panel--login {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lgk-auth-candy__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ff4ecd;
}

.lgk-auth-candy__title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.lgk-auth-candy__lead {
  margin: 0 0 1.35rem;
  color: #9aa3b2;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 36ch;
}

.lgk-auth-candy__form {
  display: flex;
  flex-direction: column;
}

.lgk-auth-candy__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.1rem 0 1rem;
  font-size: 0.82rem;
  color: #8b93a3;
}

.lgk-auth-candy__row a {
  color: #00d4aa;
  text-decoration: none;
  font-weight: 600;
}

.lgk-auth-candy__row a:hover {
  color: #5eead4;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lgk-auth-candy__remember {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
}

.lgk-auth-candy__remember input {
  accent-color: #ff4ecd;
}

.lgk-auth-candy__submit {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  margin-top: 0.35rem;
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #ff4ecd 0%, #7b2fff 100%);
  /* glow à l’intérieur uniquement */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -10px 28px rgba(123, 47, 255, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s;
}

.lgk-auth-candy__submit::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle 7rem at var(--lgk-btn-mx, 50%) var(--lgk-btn-my, 50%),
    rgba(255, 255, 255, 0.28) 0%,
    transparent 65%
  );
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.22s ease;
}

.lgk-auth-candy__submit:hover:not(:disabled)::before,
.lgk-auth-candy__submit:focus-visible::before {
  opacity: 1;
}

.lgk-auth-candy__submit:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -12px 32px rgba(255, 78, 205, 0.4);
}

.lgk-auth-candy__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.lgk-auth-candy__footer {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-size: 0.82rem;
  color: #6b7280;
}

.lgk-auth-candy__footer a {
  color: #00d4aa;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Overlay panel with slanted clip-path */
.lgk-auth-candy__overlay {
  position: absolute;
  inset: 0 auto 0 50%;
  width: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 2.25rem 2rem;
  box-sizing: border-box;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(145deg, #3b82f6 0%, #7b2fff 48%, #ff4ecd 100%);
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
  transform: translateX(0);
  transition:
    transform 900ms var(--candy-ease),
    clip-path 900ms var(--candy-ease);
}

.lgk-auth-candy.is-register .lgk-auth-candy__overlay {
  transform: translateX(-100%);
  clip-path: polygon(0 0, 86% 0, 100% 100%, 0 100%);
}

.lgk-auth-candy__overlay-face {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 28ch;
  margin: 0 auto;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.4s ease 0.12s,
    transform 0.45s var(--candy-ease) 0.08s,
    visibility 0.4s;
}

.lgk-auth-candy__overlay-face.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.lgk-auth-candy__overlay-inner {
  max-width: 26ch;
}

.lgk-auth-candy__overlay-title {
  margin: 0 0 0.7rem;
  font-size: clamp(1.4rem, 2.7vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lgk-auth-candy__overlay-text {
  margin: 0 0 1.45rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  text-wrap: pretty;
}

.lgk-auth-candy__overlay-btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 0.7rem 1.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.lgk-auth-candy__overlay-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle 5.5rem at var(--lgk-btn-mx, 50%) var(--lgk-btn-my, 50%),
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.12) 42%,
    transparent 68%
  );
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.22s ease;
}

.lgk-auth-candy__overlay-btn:hover::before,
.lgk-auth-candy__overlay-btn:focus-visible::before {
  opacity: 1;
}

.lgk-auth-candy__overlay-btn:hover {
  background: #fff;
  color: #5b21b6;
  transform: translateY(-1px);
  /* plus de halo externe — reflet intérieur seulement */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.lgk-auth-candy__overlay-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Field overrides inside candy shell */
.lgk-auth-candy .lgk-auth__field {
  margin-bottom: 0.85rem;
}

.lgk-auth-candy .lgk-auth__field label {
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  color: #8b93a3;
}

.lgk-auth-candy .lgk-auth__field input {
  background: #0a0c10;
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.1);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.lgk-auth-candy .lgk-auth__field input:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.lgk-auth-candy .lgk-auth__field input:focus {
  border-color: #ff4ecd;
  box-shadow: 0 0 0 3px rgba(255, 78, 205, 0.22);
  background: #0c0f14;
}

/* Light theme */
html.lgk-theme--light .lgk-auth-candy,
body.lgk-theme--light .lgk-auth-candy {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(28, 25, 23, 0.1);
}

html.lgk-theme--light .lgk-auth-candy__title,
body.lgk-theme--light .lgk-auth-candy__title {
  color: #1c1917;
}

html.lgk-theme--light .lgk-auth-gate,
body.lgk-theme--light .lgk-auth-gate {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 212, 255, 0.1), transparent 60%),
    rgba(255, 255, 255, 0.96);
  border-color: rgba(0, 150, 180, 0.25);
}

@media (max-width: 860px) {
  .lgk-auth-candy {
    min-height: auto;
    display: flex;
    flex-direction: column;
  }

  .lgk-auth-candy__forms {
    min-height: auto;
    display: contents;
  }

  .lgk-auth-candy__panel {
    position: relative;
    width: 100%;
    height: auto;
    padding: 1.75rem 1.35rem 1.5rem;
  }

  .lgk-auth-candy__panel--login,
  .lgk-auth-candy__panel--register {
    left: auto;
    right: auto;
  }

  .lgk-auth-candy:not(.is-register) .lgk-auth-candy__panel--register,
  .lgk-auth-candy.is-register .lgk-auth-candy__panel--login {
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .lgk-auth-candy__overlay {
    position: relative;
    inset: auto;
    width: 100%;
    order: -1;
    clip-path: none !important;
    transform: none !important;
    padding: 1.5rem 1.25rem;
    border-radius: 0;
    min-height: 11rem;
  }

  .lgk-auth-candy__overlay-face {
    max-width: 34ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lgk-auth-candy__overlay,
  .lgk-auth-candy__overlay-face,
  .lgk-auth-candy,
  .lgk-auth-gate.is-leaving {
    transition: none !important;
    animation: none !important;
  }
}
