/**
 * File drop / transfer machine — style @code_candy (travel niche)
 * Idle: scène floutée + CTA sharp · Drag: réactivité · Upload: MACHINE→TAG→SCAN→SEND
 */

.lgk-ftm {
  --lgk-ftm-accent: var(--lgk-admin-accent, #00d4aa);
  --lgk-ftm-neon: #b8ff3c;
  --lgk-ftm-ink: #0b1220;
  --lgk-ftm-muted: #6b7280;
  --lgk-ftm-panel: #111827;
  --lgk-ftm-line: rgba(255, 255, 255, 0.1);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.75fr);
  gap: 1rem;
  min-height: 17rem;
  padding: 0.85rem;
  border-radius: 18px;
  border: 1px solid var(--lgk-ftm-line);
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(0, 212, 170, 0.12), transparent 55%),
    linear-gradient(160deg, #0a1018 0%, #0f1724 55%, #0b1220 100%);
  overflow: hidden;
  color: #e5e7eb;
}

.lgk-ftm--compact {
  grid-template-columns: 1fr;
  min-height: 14rem;
}

.lgk-ftm__stage {
  position: relative;
  min-height: 15rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--lgk-ftm-line);
  background: #070b12;
}

.lgk-ftm__route {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(8, 14, 22, 0.72);
  border: 1px solid var(--lgk-ftm-line);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}

.lgk-ftm__route-plane {
  color: var(--lgk-ftm-accent);
  animation: lgk-ftm-fly 2.4s ease-in-out infinite;
}

.lgk-ftm.is-uploading .lgk-ftm__route-plane,
.lgk-ftm.is-analyzing .lgk-ftm__route-plane {
  animation-duration: 0.9s;
  color: var(--lgk-ftm-neon);
}

.lgk-ftm__scene {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 40%, rgba(255, 140, 60, 0.18), transparent 42%),
    radial-gradient(circle at 30% 70%, rgba(0, 212, 170, 0.12), transparent 40%),
    linear-gradient(145deg, #121a26, #0a1018 60%);
  transition: filter 0.45s ease, opacity 0.45s ease, transform 0.45s ease;
}

/* Idle: blur the scene, keep the CTA sharp */
.lgk-ftm:not(.is-uploading):not(.is-analyzing):not(.is-dragover) .lgk-ftm__scene {
  filter: blur(5px);
  opacity: 0.78;
}

.lgk-ftm.is-dragover .lgk-ftm__scene {
  filter: blur(1.5px);
  opacity: 1;
  transform: scale(1.03);
}

.lgk-ftm.is-uploading .lgk-ftm__scene,
.lgk-ftm.is-analyzing .lgk-ftm__scene {
  filter: none;
  opacity: 1;
}

.lgk-ftm__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.lgk-ftm__suitcase {
  position: absolute;
  right: 12%;
  bottom: 18%;
  width: 4.5rem;
  height: 3.4rem;
  border-radius: 0.55rem 0.55rem 0.7rem 0.7rem;
  background: linear-gradient(160deg, #ff9a3c, #e06712);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.lgk-ftm__suitcase::before {
  content: "";
  position: absolute;
  top: -0.55rem;
  left: 50%;
  width: 1.6rem;
  height: 0.85rem;
  transform: translateX(-50%);
  border: 3px solid #c45a10;
  border-bottom: 0;
  border-radius: 0.55rem 0.55rem 0 0;
}

.lgk-ftm__doc {
  position: absolute;
  width: 2.4rem;
  height: 3rem;
  border-radius: 0.35rem;
  background: linear-gradient(180deg, #f8fafc, #e2e8f0);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.lgk-ftm__doc::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 28%;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    #94a3b8 0 40%,
    transparent 40% 55%
  );
  box-shadow: 0 6px 0 #94a3b8, 0 12px 0 #94a3b8;
}

.lgk-ftm__doc--1 {
  left: 14%;
  top: 28%;
  transform: rotate(-12deg);
  animation: lgk-ftm-float 3.2s ease-in-out infinite;
}

.lgk-ftm__doc--2 {
  left: 28%;
  top: 42%;
  transform: rotate(8deg);
  animation: lgk-ftm-float 3.8s ease-in-out infinite 0.4s;
}

.lgk-ftm__doc--3 {
  left: 42%;
  top: 24%;
  transform: rotate(-4deg);
  animation: lgk-ftm-float 3.5s ease-in-out infinite 0.8s;
}

.lgk-ftm.is-dragover .lgk-ftm__doc--1 {
  transform: translate(18px, 22px) rotate(-4deg) scale(0.92);
}
.lgk-ftm.is-dragover .lgk-ftm__doc--2 {
  transform: translate(8px, 10px) rotate(2deg) scale(0.94);
}
.lgk-ftm.is-dragover .lgk-ftm__doc--3 {
  transform: translate(-6px, 28px) rotate(0deg) scale(0.9);
}

.lgk-ftm__scanline {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lgk-ftm-neon), transparent);
  box-shadow: 0 0 18px var(--lgk-ftm-neon);
  animation: lgk-ftm-scan 1.4s linear infinite;
  z-index: 3;
}

.lgk-ftm.is-analyzing .lgk-ftm__scanline,
.lgk-ftm.is-uploading .lgk-ftm__scanline {
  display: block;
}

.lgk-ftm__drop-cue {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: min(92%, 20rem);
  padding: 1.15rem 1.25rem;
  border-radius: 1rem;
  background: #fff;
  color: var(--lgk-ftm-ink);
  text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.28s cubic-bezier(0.34, 1.35, 0.64, 1), box-shadow 0.28s ease;
  cursor: pointer;
}

.lgk-ftm.is-dragover .lgk-ftm__drop-cue {
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 22px 48px rgba(0, 212, 170, 0.28);
}

.lgk-ftm__drop-cue strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lgk-ftm__drop-cue span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lgk-ftm-muted);
}

.lgk-ftm__file-name {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--lgk-ftm-accent);
  word-break: break-all;
}

.lgk-ftm__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.lgk-ftm__side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.lgk-ftm__mini-drop {
  padding: 0.85rem;
  border-radius: 12px;
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  font-size: 0.8rem;
  color: #9ca3af;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.lgk-ftm.is-dragover .lgk-ftm__mini-drop {
  border-color: var(--lgk-ftm-accent);
  background: rgba(0, 212, 170, 0.08);
  color: #e5e7eb;
}

.lgk-ftm__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.lgk-ftm__step {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
  border: 1px solid transparent;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.lgk-ftm__step-num {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.06);
}

.lgk-ftm__step.is-active {
  color: #ecfccb;
  background: rgba(184, 255, 60, 0.08);
  border-color: rgba(184, 255, 60, 0.28);
}

.lgk-ftm__step.is-active .lgk-ftm__step-num {
  background: var(--lgk-ftm-neon);
  color: #0b1220;
}

.lgk-ftm__step.is-done {
  color: var(--lgk-ftm-accent);
}

.lgk-ftm__extras {
  display: grid;
  gap: 0.5rem;
}

.lgk-ftm__extras label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: #9ca3af;
}

.lgk-ftm__extras input,
.lgk-ftm__extras textarea,
.lgk-ftm__extras select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--lgk-ftm-line);
  background: rgba(0, 0, 0, 0.25);
  color: #f3f4f6;
  padding: 0.45rem 0.55rem;
  font: inherit;
}

.lgk-ftm__submit {
  margin-top: auto;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: var(--lgk-ftm-neon);
  color: #0b1220;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(184, 255, 60, 0.35), 0 10px 28px rgba(184, 255, 60, 0.22);
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.lgk-ftm__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.lgk-ftm__submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.lgk-ftm__status {
  font-size: 0.75rem;
  color: #9ca3af;
  min-height: 1.1em;
}

.lgk-ftm__status.is-error {
  color: #fca5a5;
}

.lgk-ftm__status.is-ok {
  color: var(--lgk-ftm-accent);
}

@keyframes lgk-ftm-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@keyframes lgk-ftm-fly {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(6px);
  }
}

@keyframes lgk-ftm-scan {
  0% {
    top: 8%;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    top: 88%;
    opacity: 0;
  }
}

@media (max-width: 820px) {
  .lgk-ftm {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lgk-ftm__doc,
  .lgk-ftm__route-plane,
  .lgk-ftm__scanline,
  .lgk-ftm__scene,
  .lgk-ftm__drop-cue {
    animation: none !important;
    transition: none !important;
  }
}
