@import url('global.css');

/* ══════════════════════════════════
   CANVAS BACKGROUND (particles)
   ══════════════════════════════════ */
#bgCanvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  padding: 16px 0;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.navbar.scrolled {
  padding: 10px 0;
  background: rgba(255,255,255,0.95);
  border-bottom-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none; font-size: 0.9rem;
  font-weight: 500; transition: color 0.3s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--primary-blue); border-radius: 2px; transition: width 0.3s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  background: var(--gradient-main); color: #fff; padding: 10px 24px; border-radius: 50px;
  text-decoration: none; font-weight: 600; font-size: 0.9rem;
  transition: transform 0.3s, box-shadow 0.3s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(4,159,217,0.25); }
.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; }
.burger span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: 0.3s; }

/* ── Hero ── */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; padding: 120px 24px 80px;
  background: var(--bg-primary);
}
.hero-bg {
  position: absolute; inset: 0; overflow: hidden; z-index: 0;
}
.hero-bg .shape {
  position: absolute; border-radius: 50%; opacity: 0.08;
  animation: drift 20s ease-in-out infinite;
}
.hero-bg .shape:nth-child(1) { width: 600px; height: 600px; background: var(--primary-blue); top: -15%; left: -10%; }
.hero-bg .shape:nth-child(2) { width: 450px; height: 450px; background: var(--secondary-purple); bottom: -10%; right: -5%; animation-delay: -7s; }
.hero-bg .shape:nth-child(3) { width: 350px; height: 350px; background: var(--secondary-green); top: 40%; right: 15%; animation-delay: -12s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(20px, -15px) scale(1.03); }
  50% { transform: translate(-10px, 20px) scale(0.97); }
  75% { transform: translate(15px, 10px) scale(1.02); }
}

.hero-content { position: relative; z-index: 1; max-width: 780px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  padding: 8px 20px; border-radius: 50px; font-size: 0.85rem;
  color: var(--primary-blue); margin-bottom: 28px;
  animation: fadeUp 0.8s ease-out;
}
.hero-badge .dot { width: 8px; height: 8px; background: var(--accent-green); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.2rem); font-weight: 900;
  line-height: 1.12; margin-bottom: 24px; color: var(--text-primary);
  animation: fadeUp 0.8s ease-out 0.1s both;
}
.hero p {
  font-size: 1.15rem; color: var(--text-secondary); max-width: 580px;
  margin: 0 auto 40px; animation: fadeUp 0.8s ease-out 0.2s both;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; animation: fadeUp 0.8s ease-out 0.3s both; }

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

/* ── Price Highlight ── */
.price-highlight { padding: 50px 24px; text-align: center; background: var(--bg-primary); position: relative; z-index: 1; }
.price-box {
  display: inline-flex; align-items: baseline; gap: 8px;
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  padding: 24px 48px; border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.price-box .amount { font-size: 3.8rem; font-weight: 900; }
.price-box .currency { font-size: 1.4rem; color: var(--primary-blue-dark); font-weight: 600; }
.price-box .per { font-size: 1rem; color: var(--text-tertiary); }

/* ── Section titles ── */
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 2.4rem; font-weight: 800; margin-bottom: 12px; color: var(--text-primary); }
.section-title p { color: var(--text-secondary); font-size: 1.05rem; max-width: 520px; margin: 0 auto; }

/* ── Features ── */
.features { padding: 100px 0; background: var(--bg-secondary); position: relative; z-index: 1; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.feature-card {
  background: var(--bg-primary); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 36px;
  transition: transform 0.4s, box-shadow 0.4s;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.feature-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 20px;
  background: var(--gradient-soft);
  border: 1px solid rgba(4,159,217,0.12);
}
.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; color: var(--text-primary); }
.feature-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* ── Code Demo ── */
.code-section { padding: 100px 0; background: var(--bg-primary); position: relative; z-index: 1; }
.code-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.code-block { background: var(--network-gray); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.code-header { display: flex; align-items: center; gap: 8px; padding: 14px 20px; background: rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.08); }
.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.code-dot:nth-child(1) { background: #ff5f57; }
.code-dot:nth-child(2) { background: #ffbd2e; }
.code-dot:nth-child(3) { background: #28c840; }
.code-block pre { padding: 24px; margin: 0; overflow-x: auto; font-size: 0.85rem; font-family: 'JetBrains Mono', 'Fira Code', monospace; line-height: 1.8; }
.code-block code { color: #c0c5d0; }
.code-block .kw { color: #a78bfa; }
.code-block .str { color: #6ee7b7; }
.code-block .fn { color: #fbbf24; }
.code-block .cmt { color: #555e6e; font-style: italic; }

.code-info h2 { font-size: 2.1rem; font-weight: 800; margin-bottom: 16px; color: var(--text-primary); }
.code-info p { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 24px; }
.code-steps { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.code-steps li { display: flex; align-items: center; gap: 14px; background: var(--bg-secondary); border: 1px solid var(--border-color); padding: 16px 20px; border-radius: var(--radius-sm); transition: var(--transition); }
.code-steps li:hover { box-shadow: var(--shadow-sm); }
.step-num { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; background: var(--gradient-main); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }
.code-steps li span { font-size: 0.95rem; color: var(--text-secondary); }
.code-steps li span strong { color: var(--text-primary); }

/* ── Pricing ── */
.pricing { padding: 100px 0; background: var(--bg-secondary); position: relative; z-index: 1; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.pricing-card { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 40px; text-align: center; transition: transform 0.4s, box-shadow 0.4s; position: relative; }
.pricing-card.popular { border-color: var(--primary-blue); box-shadow: 0 8px 30px rgba(4,159,217,0.12); }
.pricing-card.popular::before { content: 'Populaire'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--gradient-main); color: #fff; padding: 6px 20px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; }
.pricing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pricing-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.pricing-card .price { font-size: 2.8rem; font-weight: 900; margin: 20px 0; }
.pricing-card .price small { font-size: 1rem; color: var(--text-tertiary); }
.pricing-card ul { list-style: none; margin: 24px 0; text-align: left; }
.pricing-card li { padding: 10px 0; color: var(--text-secondary); font-size: 0.95rem; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 10px; }
.pricing-card li::before { content: '✓'; color: var(--accent-green); font-weight: 700; }
.pricing-card .btn-primary { display: block; width: 100%; text-align: center; }

/* ── Stats ── */
.stats { padding: 80px 0; background: var(--bg-primary); position: relative; z-index: 1; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-item { text-align: center; padding: 32px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius); transition: var(--transition); }
.stat-item:hover { box-shadow: var(--shadow-md); }
.stat-item .number { font-size: 2.5rem; font-weight: 900; display: block; }
.stat-item .label { color: var(--text-tertiary); font-size: 0.9rem; margin-top: 4px; }

/* ── Footer ── */
.footer { padding: 60px 0 30px; background: var(--bg-secondary); border-top: 1px solid var(--border-color); position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { color: var(--text-tertiary); margin-top: 12px; font-size: 0.9rem; max-width: 320px; }
.footer h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: color 0.3s; }
.footer ul a:hover { color: var(--primary-blue); }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid var(--border-color); color: var(--text-tertiary); font-size: 0.85rem; }

/* ── Scroll reveal ── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .code-wrapper { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .burger { display: flex; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; padding: 24px; background: rgba(255,255,255,0.97); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-color); }
  .hero h1 { font-size: 2.2rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
