@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

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

::selection { background-color: rgba(99, 102, 241, 0.3); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgb(9 9 11); }
::-webkit-scrollbar-thumb { background: rgb(63 63 70); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgb(82 82 91); }

body {
  background-color: rgb(9 9 11);
  color: rgb(244 244 245);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Gradient glow background behind hero */
.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(63,63,70,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63,63,70,0.15) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 80%);
  pointer-events: none;
}

/* Code syntax highlighting */
.code-comment { color: rgb(113 113 122); }
.code-keyword { color: rgb(129 140 248); }
.code-string  { color: rgb(110 231 183); }
.code-number  { color: rgb(251 191 36); }
.code-key     { color: rgb(196 181 253); }
.code-method  { color: rgb(129 140 248); }
.code-url     { color: rgb(148 163 184); }

.gradient-text {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── 3D Card System ─────────────────────────────────────────────────── */
.card-3d-wrap {
  perspective: 1000px;
}

.card-3d {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.card-3d::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg,
    rgba(99,102,241,0.0) 0%,
    rgba(99,102,241,0.0) 40%,
    rgba(99,102,241,0.15) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.card-3d:hover::before { opacity: 1; }

/* Shine overlay */
.card-3d .card-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255,255,255,0.06),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}
.card-3d:hover .card-shine { opacity: 1; }

/* 3D lift on hover via JS */
.card-3d:hover {
  box-shadow:
    0 20px 60px rgba(0,0,0,0.6),
    0 0 0 1px rgba(99,102,241,0.2),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Pricing card Pro gets stronger glow */
.card-3d-pro:hover {
  box-shadow:
    0 24px 70px rgba(99,102,241,0.3),
    0 0 0 1px rgba(99,102,241,0.5),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Glassmorphism subtle */
.glass {
  background: rgba(24, 24, 27, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Animated gradient border */
.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
    rgba(99,102,241,0.6) 0%,
    rgba(167,139,250,0.4) 50%,
    rgba(99,102,241,0.6) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: borderRotate 4s linear infinite;
  background-size: 200% 200%;
}
@keyframes borderRotate {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Feature icon glow on hover */
.icon-glow {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card-3d:hover .icon-glow {
  transform: scale(1.1) translateZ(8px);
}

/* Floating particles */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.4; }
  50%       { transform: translateY(-20px) rotate(180deg); opacity: 0.7; }
}
.particle {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(99,102,241,0.6);
  animation: float linear infinite;
  pointer-events: none;
}

/* Neon underline on nav links */
nav a { position: relative; }
nav a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.8), transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
nav a:hover::after { transform: scaleX(1); }

/* Legacy card-hover kept for non-3d elements */
.card-hover {
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  border-color: rgb(82 82 91);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.method-get    { background: rgba(16,185,129,0.15); color: rgb(52,211,153); border: 1px solid rgba(16,185,129,0.25); }
.method-post   { background: rgba(99,102,241,0.15); color: rgb(129,140,248); border: 1px solid rgba(99,102,241,0.25); }
.method-patch  { background: rgba(245,158,11,0.15); color: rgb(251,191,36);  border: 1px solid rgba(245,158,11,0.25); }
.method-delete { background: rgba(239,68,68,0.15);  color: rgb(252,165,165); border: 1px solid rgba(239,68,68,0.25); }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.cursor { animation: blink 1s step-end infinite; }

.step-line {
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: -24px;
  width: 2px;
  background: linear-gradient(to bottom, rgb(63 63 70), transparent);
}

/* ── Dashboard preview : caché jusqu'au scroll ── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
