/* ================================================================
   Windows Optimus — Website Styles
   Custom CSS on top of Tailwind CDN
   ================================================================ */

/* ── Base / Reset ─────────────────────────────────────────────── */
:root {
  --bg-dark: #060a14;
  --bg-card: #0d1321;
  --bg-card-hover: #131b2e;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --purple: #8b5cf6;
  --emerald: #10b981;
  --amber: #f59e0b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-dark);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

/* ── Animated gradient background ─────────────────────────────── */
.hero-bg {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(139, 92, 246, 0.08), transparent),
    linear-gradient(180deg, #060a14 0%, #0a0f1e 100%);
}

/* ── Glassmorphism cards ──────────────────────────────────────── */
.glass-card {
  background: rgba(13, 19, 33, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s ease;
}
.glass-card:hover {
  background: rgba(19, 27, 46, 0.8);
  border-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.1);
}

/* ── Glow button ──────────────────────────────────────────────── */
.btn-glow {
  position: relative;
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  color: white;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow), 0 0 64px rgba(139, 92, 246, 0.15);
}
.btn-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  z-index: -1;
  opacity: 0.5;
  filter: blur(12px);
  transition: opacity 0.3s;
}
.btn-glow:hover::before { opacity: 0.8; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-outline:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

/* ── Section styling ──────────────────────────────────────────── */
.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ── Feature icons ────────────────────────────────────────────── */
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.feature-icon.blue   { background: rgba(59, 130, 246, 0.15); }
.feature-icon.purple { background: rgba(139, 92, 246, 0.15); }
.feature-icon.green  { background: rgba(16, 185, 129, 0.15); }
.feature-icon.amber  { background: rgba(245, 158, 11, 0.15); }
.feature-icon.red    { background: rgba(239, 68, 68, 0.15); }

/* ── Pricing cards ────────────────────────────────────────────── */
.pricing-card {
  background: rgba(13, 19, 33, 0.7);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s;
}
.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.15);
  position: relative;
}
.pricing-card.popular::before {
  content: '⭐ Populaire';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(59, 130, 246, 0.15);
}

.price-tag {
  font-size: 3rem;
  font-weight: 800;
  color: white;
}
.price-tag .currency { font-size: 1.5rem; vertical-align: super; }
.price-tag .period { font-size: 1rem; font-weight: 400; color: var(--text-muted); }

/* ── Comparison table ─────────────────────────────────────────── */
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.compare-table th,
.compare-table td {
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
}
.compare-table thead th {
  background: rgba(59, 130, 246, 0.08);
  font-weight: 700;
  font-size: 0.9rem;
}
.compare-table .highlight {
  background: rgba(59, 130, 246, 0.05);
}

/* ── Chatbot ──────────────────────────────────────────────────── */
.chatbot-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px var(--accent-glow);
  z-index: 1000;
  transition: all 0.3s;
}
.chatbot-toggle:hover { transform: scale(1.1); }

.chatbot-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  max-height: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}
.chatbot-window.open { display: flex; }

.chatbot-header {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  padding: 16px 20px;
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 360px;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}
.chat-msg.bot {
  background: rgba(59, 130, 246, 0.12);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: var(--accent);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chatbot-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.chatbot-input input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}
.chatbot-input input:focus { border-color: var(--accent); }
.chatbot-input button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.chatbot-input button:hover { background: var(--accent-hover); }

/* ── FAQ Accordion ────────────────────────────────────────────── */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
}
.faq-item:hover { border-color: rgba(59, 130, 246, 0.2); }
.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 16px 20px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.3s;
}
.faq-item.open .faq-question::after {
  content: '−';
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
  padding: 0 20px;
  color: var(--text-muted);
  line-height: 1.7;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 20px 16px;
}

/* ── Navbar ───────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(6, 10, 20, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
.navbar.scrolled {
  background: rgba(6, 10, 20, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  padding: 8px 0;
}
.nav-link:hover, .nav-link.active { color: white; }

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
  background: rgba(6, 10, 20, 0.95);
  border-top: 1px solid var(--border);
}
.footer a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--accent); }

/* ── Stat counter animation ───────────────────────────────────── */
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--emerald));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Animations ───────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile hamburger ─────────────────────────────────────────── */
.mobile-menu { display: none; }
.hamburger { display: none; cursor: pointer; }

@media (max-width: 768px) {
  .nav-links { display: none !important; }
  .hamburger { display: flex; }
  .mobile-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(6, 10, 20, 0.98);
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .section-title { font-size: 1.8rem; }
  .chatbot-window { width: calc(100vw - 32px); right: 16px; }
  .hero-stats { flex-direction: column; gap: 16px !important; }
}

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #334155; }

/* ── Admin specific ───────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
}
.stat-card .label { color: var(--text-muted); font-size: 0.85rem; }
.stat-card .value { font-size: 2rem; font-weight: 800; color: white; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.admin-table th { color: var(--text-muted); font-weight: 600; }
.admin-table tbody tr:hover { background: rgba(59, 130, 246, 0.05); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.active   { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.badge.expired  { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge.revoked  { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.badge.trial    { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.badge.pro      { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.badge.new      { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.badge.replied  { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.badge.completed { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.badge.pending  { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge.refunded { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
