/* ═══════════════════ SMPC — Surveillance Monitoring Présence Caméra ═══════════════════ */
:root {
  --bg: #0a0e17;
  --surface: #111827;
  --surface2: #1a2236;
  --border: #1e2d4a;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --muted: #64748b;
  --accent: #22D3EE;
  --accent2: #6366F1;
  --green: #10B981;
  --red: #EF4444;
  --orange: #F59E0B;
  --yellow: #EAB308;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 200ms ease;
}

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

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ═══════════════════ NAV ═══════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,14,23,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; cursor: pointer; }
.nav-brand span { color: var(--accent); font-size: 1.5rem; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--text2); text-decoration: none; font-size: .9rem; font-weight: 500; transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }
.btn-nav {
  background: var(--accent); color: #0a0e17; border: none;
  padding: 10px 24px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .9rem; cursor: pointer;
  transition: all var(--transition);
}
.btn-nav:hover { background: #06b6d4; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(34,211,238,.3); }

/* ═══════════════════ HERO ═══════════════════ */
.hero {
  padding: 140px 2rem 100px;
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.2);
  padding: 6px 16px; border-radius: 100px;
  font-size: .85rem; color: var(--accent); margin-bottom: 1.5rem;
}
.hero-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.hero h1 { font-size: 3.2rem; font-weight: 800; line-height: 1.15; margin-bottom: 1.5rem; }
.hero h1 span { background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.15rem; color: var(--text2); margin-bottom: 2.5rem; max-width: 500px; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-hero {
  padding: 14px 32px; border-radius: var(--radius-sm); font-weight: 600;
  font-size: 1rem; cursor: pointer; border: none; transition: all var(--transition);
}
.btn-hero.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; box-shadow: 0 4px 20px rgba(34,211,238,.35);
}
.btn-hero.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(34,211,238,.5); }
.btn-hero.ghost {
  background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-hero.ghost:hover { background: var(--surface2); border-color: var(--text2); }

.hero-visual {
  position: relative;
}
.hero-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.hero-card-header {
  background: var(--surface2); padding: 12px 16px; display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.hero-card-dot { width: 12px; height: 12px; border-radius: 50%; }
.hero-card-dot.r { background: var(--red); }
.hero-card-dot.y { background: var(--yellow); }
.hero-card-dot.g { background: var(--green); }
.hero-card-title { font-size: .8rem; color: var(--text2); margin-left: 8px; }
.hero-card-body { padding: 16px; aspect-ratio: 16/10; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.hero-preview {
  width: 100%; height: 100%; border-radius: 6px;
  background: radial-gradient(ellipse at center, rgba(34,211,238,.08) 0%, transparent 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.hero-preview-icon { font-size: 3rem; }
.hero-preview-text { font-size: .85rem; color: var(--muted); }
.hero-grid-overlay {
  position: absolute; inset: 0; border-radius: 6px;
  background: repeating-linear-gradient(0deg, transparent, transparent 24px, rgba(34,211,238,.06) 24px, rgba(34,211,238,.06) 25px),
              repeating-linear-gradient(90deg, transparent, transparent 24px, rgba(34,211,238,.06) 24px, rgba(34,211,238,.06) 25px);
  pointer-events: none;
}
.hero-zone {
  position: absolute; border: 2px dashed rgba(34,211,238,.5);
  background: rgba(34,211,238,.08); border-radius: 4px;
}
.hero-zone:nth-child(1) { top: 15%; left: 10%; width: 35%; height: 40%; }
.hero-zone:nth-child(2) { top: 45%; left: 55%; width: 30%; height: 30%; }

/* ═══════════════════ STATS BAR ═══════════════════ */
.stats-bar {
  max-width: 1280px; margin: 0 auto 80px; padding: 0 2rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
}
.stat-card strong { display: block; font-size: 1.8rem; font-weight: 700; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card span { font-size: .85rem; color: var(--text2); display: block; margin-top: 4px; }

/* ═══════════════════ SECTIONS ═══════════════════ */
.section { padding: 80px 2rem; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-tag {
  display: inline-block; background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2);
  padding: 4px 14px; border-radius: 100px; font-size: .8rem;
  color: var(--accent2); font-weight: 500; margin-bottom: 1rem; letter-spacing: .5px; text-transform: uppercase;
}
.section h2 { font-size: 2.2rem; font-weight: 700; margin-bottom: 1rem; }
.section h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: .5rem; }
.section-lead { color: var(--text2); font-size: 1.1rem; margin-bottom: 3rem; max-width: 600px; }

/* ═══════════════════ FEATURES ═══════════════════ */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.feat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: all var(--transition);
}
.feat-card:hover { border-color: rgba(34,211,238,.3); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,.3); }
.feat-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1rem;
}
.feat-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.feat-card p { color: var(--text2); font-size: .9rem; line-height: 1.65; }
.feat-card.featured { border-color: rgba(34,211,238,.25); background: var(--surface2); }
.feat-badge {
  display: inline-block; background: var(--accent); color: #0a0e17;
  padding: 3px 10px; border-radius: 100px; font-size: .75rem;
  font-weight: 600; margin-bottom: .75rem;
}

/* ═══════════════════ HOW IT WORKS ═══════════════════ */
.steps-grid { display: flex; gap: 1.5rem; align-items: flex-start; }
.step {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; text-align: center;
}
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.2rem; margin: 0 auto 1rem;
  color: #fff;
}
.step h4 { margin-bottom: .5rem; }
.step p { color: var(--text2); font-size: .9rem; }
.step-arrow { display: flex; align-items: center; padding-top: 40px; font-size: 1.5rem; color: var(--accent); flex-shrink: 0; }

/* ═══════════════════ COMPARISON TABLE ═══════════════════ */
.comparison-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
}
.comparison-table th, .comparison-table td {
  padding: 16px 20px; text-align: center; font-size: .9rem;
}
.comparison-table th { background: var(--surface2); font-weight: 600; color: var(--text); }
.comparison-table th:first-child { text-align: left; }
.comparison-table td { border-top: 1px solid var(--border); }
.comparison-table td:first-child { text-align: left; font-weight: 500; }
.comparison-table .smpc-col { background: rgba(34,211,238,.06); }
.comparison-table .smpc-col th { color: var(--accent); }
.check { color: var(--green); font-weight: 700; }
.cross { color: var(--muted); }
.half { color: var(--orange); }

/* ═══════════════════ CTA ═══════════════════ */
.cta-section {
  text-align: center; padding: 80px 2rem;
  background: radial-gradient(ellipse at center, rgba(34,211,238,.06) 0%, transparent 70%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.cta-section h2 { font-size: 2rem; margin-bottom: 1rem; }
.cta-section p { color: var(--text2); margin-bottom: 2rem; font-size: 1.1rem; }

/* ═══════════════════ APP SECTION ═══════════════════ */
#app-section { padding: 80px 2rem; }
.app-container {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem;
}
.app-main-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.app-header-bar {
  padding: 14px 20px; background: var(--surface2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.app-title { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.status-indicator {
  display: flex; align-items: center; gap: 6px; font-size: .85rem;
}
.status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--muted);
}
.status-dot.active { background: var(--green); animation: pulse-dot 2s infinite; }
.status-dot.alert { background: var(--red); animation: pulse-dot .5s infinite; }
.camera-container {
  position: relative; background: #000;
  aspect-ratio: 16/10; max-height: 480px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
#camera-feed { width: 100%; height: 100%; object-fit: contain; display: none; }
#camera-feed.active { display: block; }
#zone-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 2;
}
#zone-canvas.editing { pointer-events: auto; }
.camera-placeholder {
  text-align: center; color: var(--muted);
}
.camera-placeholder .icon { font-size: 3rem; margin-bottom: .5rem; }
.camera-placeholder p { font-size: .9rem; }
.btn-camera {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border: none; padding: 12px 28px;
  border-radius: var(--radius-sm); font-weight: 600; cursor: pointer;
  margin-top: 1rem; transition: all var(--transition);
}
.btn-camera:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(34,211,238,.3); }
.btn-camera.stop { background: var(--red); }
.btn-camera.stop:hover { box-shadow: 0 4px 20px rgba(239,68,68,.3); }

.app-toolbar {
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.tool-btn {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text2); padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: .8rem; cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.tool-btn:hover { background: var(--border); color: var(--text); }
.tool-btn.active { background: var(--accent); color: #0a0e17; border-color: var(--accent); font-weight: 600; }
.tool-btn.alert-btn { background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.3); color: var(--red); }
.tool-btn.alert-btn:hover { background: var(--red); color: #fff; }

/* ═══════════════════ SIDE PANEL ═══════════════════ */
.side-panel {
  display: flex; flex-direction: column; gap: 1rem;
}
.side-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.side-card h4 {
  font-size: .85rem; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text2); margin-bottom: 1rem; font-weight: 600;
}
.setting-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .85rem;
}
.setting-row:last-child { border-bottom: none; }
.setting-row label { color: var(--text); }
.setting-row input[type="range"] {
  width: 120px; accent-color: var(--accent);
}
.setting-row input[type="email"], .setting-row input[type="text"] {
  width: 100%; padding: 8px 12px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: .85rem; margin-top: 4px;
}
.setting-row input::placeholder { color: var(--muted); }
.setting-value { color: var(--accent); font-weight: 600; font-size: .8rem; min-width: 32px; text-align: right; }

/* Sound meter */
.sound-meter {
  height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 8px;
}
.sound-meter-fill {
  height: 100%; border-radius: 3px; transition: width 100ms linear, background var(--transition);
  background: var(--green);
}
.sound-meter-fill.warn { background: var(--orange); }
.sound-meter-fill.alert { background: var(--red); }

/* Event log */
.event-log {
  max-height: 200px; overflow-y: auto; font-size: .8rem;
}
.event-item {
  padding: 6px 0; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 1rem;
}
.event-time { color: var(--muted); white-space: nowrap; }
.event-msg { color: var(--text2); }
.event-item.alert-event .event-msg { color: var(--red); }
.event-item.record-event .event-msg { color: var(--accent); }

.btn-save {
  width: 100%; background: var(--accent2); color: #fff; border: none;
  padding: 10px; border-radius: var(--radius-sm); font-weight: 600;
  cursor: pointer; margin-top: .5rem; transition: all var(--transition);
}
.btn-save:hover { background: #4f46e5; }

/* ═══════════════════ AFFILIATE SECTION ═══════════════════ */
.affiliate-section { background: var(--surface2); border-top: 1px solid var(--border); padding: 60px 2rem; }
.affiliate-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.affiliate-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; text-align: center;
  transition: all var(--transition);
}
.affiliate-card:hover { border-color: rgba(34,211,238,.3); transform: translateY(-2px); }
.affiliate-card .icon { font-size: 2.5rem; margin-bottom: .75rem; }
.affiliate-card h4 { margin-bottom: .5rem; }
.affiliate-card p { color: var(--text2); font-size: .85rem; margin-bottom: 1rem; }
.btn-affiliate {
  display: inline-block; background: var(--accent); color: #0a0e17;
  padding: 10px 24px; border-radius: var(--radius-sm); font-weight: 600;
  font-size: .9rem; text-decoration: none; transition: all var(--transition);
}
.btn-affiliate:hover { background: #06b6d4; }

/* ═══════════════════ FOOTER ═══════════════════ */
.footer {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 40px 2rem; text-align: center;
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-brand { font-weight: 700; font-size: 1.1rem; margin-bottom: .5rem; }
.footer-tagline { color: var(--text2); font-size: .85rem; margin-bottom: 1.5rem; }
.footer-links { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .85rem; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--muted); font-size: .8rem; }

/* ═══════════════════ MODALS ═══════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; max-width: 500px; width: 90%;
  box-shadow: var(--shadow);
}
.modal-box h3 { margin-bottom: .5rem; }
.modal-box p { color: var(--text2); font-size: .9rem; margin-bottom: 1rem; }
.modal-close {
  float: right; background: none; border: none; color: var(--muted);
  font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--text); }

/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero h1 { font-size: 2.4rem; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .app-container { grid-template-columns: 1fr; }
  .affiliate-grid { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .steps-grid { flex-direction: column; }
  .step-arrow { display: none; }
}
@media (max-width: 640px) {
  .hero { padding: 100px 1rem 60px; }
  .hero h1 { font-size: 2rem; }
  .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .affiliate-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr; }
  .section { padding: 40px 1rem; }
}
