:root {
  --bg: #0a0f1c;
  --bg-2: #131a2e;
  --card: #1a2847;
  --card-2: #212d52;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #2a3f5f;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-2);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ========== COMMON ========== */
.hidden {
  display: none !important;
}

.view-container {
  width: 100%;
  min-height: 100vh;
}

/* ========== LANDING PAGE ========== */

/* --------- TOP NAVIGATION --------- */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  background: rgba(10, 15, 28, 0.7);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-weight: 800;
  font-size: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.brand:hover {
  opacity: 0.8;
}

.brand .logo {
  font-size: 28px;
}

.accent {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

/* --------- BUTTONS --------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: white;
}

.btn.secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.danger {
  background: var(--danger);
  color: white;
}

.btn.large {
  padding: 14px 32px;
  font-size: 16px;
}

.btn.full-width {
  width: 100%;
}

/* --------- HERO SECTION --------- */
.hero-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 24px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0 0 32px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-trust {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-card {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  width: 100%;
  max-width: 380px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--card-2);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f57;
}

.dot.yellow {
  background: #febc2e;
}

.dot.green {
  background: #28c840;
}

.card-title {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
}

.card-body {
  padding: 24px;
}

.fake-video {
  font-size: 64px;
  text-align: center;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 100%);
  padding: 40px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.alert-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.alert-item {
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--text-muted);
}

.alert-item.critical {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-left: 3px solid var(--danger);
  padding-left: 9px;
}

/* --------- HOW IT WORKS --------- */
.how-it-works {
  max-width: 1400px;
  margin: 80px auto 0;
  padding: 60px 40px;
  text-align: center;
}

.how-it-works h2 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 16px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 48px;
}

.step {
  text-align: center;
}

.step-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
}

.step p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* --------- SCENARIOS SHOWCASE --------- */
.scenarios-showcase {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px;
}

.scenarios-showcase h2 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.scenarios-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.scenario-showcase-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s;
}

.scenario-showcase-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.scenario-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.scenario-showcase-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}

.scenario-showcase-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* --------- PRICING --------- */
.pricing-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px;
}

.pricing-section h2 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.2);
  transform: scale(1.05);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 24px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--success) 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.plan-name {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
}

.plan-price {
  font-size: 42px;
  font-weight: 800;
  color: var(--accent);
  margin: 8px 0;
}

.plan-period {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 400;
}

.plan-camera {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex-grow: 1;
}

.plan-features li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* --------- SHOP --------- */
.shop-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px;
}

.shop-section h2 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.shop-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s;
}

.shop-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.shop-icon {
  font-size: 48px;
  margin-bottom: 16px;
  text-align: center;
}

.shop-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.shop-badge.green {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.shop-badge.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.shop-badge.gold {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

.shop-badge.red {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.shop-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}

.shop-pitch {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.shop-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.shop-specs li {
  padding: 4px 0;
}

.shop-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  margin: 16px 0;
}

/* --------- SUPPORT --------- */
.support-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px;
}

.support-section h2 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.support-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}

.support-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.support-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px;
}

.support-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.support-contact {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

/* --------- FOOTER --------- */
.landing-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 48px 40px 24px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer-section h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
}

.footer-section p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section ul a:hover {
  color: var(--text);
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== DASHBOARD ========== */

.dashboard-wrapper {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  gap: 0;
}

/* --------- SIDEBAR --------- */
.dashboard-sidebar {
  background: var(--card);
  border-right: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

.sidebar-brand {
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  transition: opacity 0.2s;
}

.sidebar-brand:hover {
  opacity: 0.8;
}

.sidebar-brand .logo {
  font-size: 24px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
}

.nav-item:hover {
  background: var(--card-2);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent);
  color: white;
}

.nav-icon {
  font-size: 18px;
}

/* --------- DASHBOARD MAIN --------- */
.dashboard-main {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.dashboard-topbar h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

.status-indicator {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-indicator.offline {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.status-indicator.online {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.dashboard-pages {
  padding: 40px;
  flex-grow: 1;
}

.dashboard-page {
  display: none;
}

.dashboard-page.active {
  display: block;
}

.page-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
}

.page-card h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 24px;
}

.page-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
}

/* --------- FORMS --------- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-hint code {
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 20px;
}

.checkbox-label input {
  width: auto;
}

.button-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.result-message {
  display: none;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin-top: 12px;
}

.result-message.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.result-message.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* --------- CAMERA PAGE --------- */
.preview-container {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.preview-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: contain;
  background: #000;
}

/* --------- SURVEILLANCE PAGE --------- */
.surveillance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.surveillance-controls {
  display: flex;
  gap: 12px;
}

.scenarios-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.scenario-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--card-2);
  border-radius: 6px;
  font-size: 13px;
}

.live-feed-container {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}

.live-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: contain;
  background: #000;
}

.live-timestamp {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text);
}

.real-time-log {
  background: var(--bg-2);
  border-radius: 8px;
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
  min-height: 200px;
}

.log-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 32px 16px;
}

.log-entry {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-entry.critical {
  color: #fca5a5;
}

.log-entry.warning {
  color: #fcd34d;
}

.log-entry time {
  color: var(--text-muted);
  display: block;
  font-size: 11px;
  margin-bottom: 4px;
}

/* --------- ALERTS PAGE --------- */
.alerts-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.alert-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px;
}

.alert-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.alert-image {
  width: 120px;
  height: 80px;
  object-fit: cover;
  background: #000;
}

.alert-content {
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.alert-title {
  font-weight: 600;
  margin: 0 0 4px;
  font-size: 14px;
}

.alert-title.critical {
  color: #fca5a5;
}

.alert-title.warning {
  color: #fcd34d;
}

.alert-summary {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.alert-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* --------- SUBSCRIPTION PAGE --------- */
.subscription-status {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
}

.plan-info h3 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
}

.plan-info p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 16px;
}

.plan-price-display {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
}

.plan-price-display span {
  font-size: 16px;
  font-weight: 500;
}

.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.upgrade-option {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.upgrade-option h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.upgrade-option p {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 12px;
}

.upgrade-option ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  text-align: left;
}

.upgrade-option li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 4px 0;
}

/* --------- SCENARIOS SELECTION --------- */
.scenarios-selection {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.scenario-checkbox {
  background: var(--card-2);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.scenario-checkbox:hover {
  border-color: var(--accent);
}

.scenario-checkbox.selected {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
  border-color: var(--accent);
}

.scenario-checkbox input {
  display: none;
}

.scenario-emoji {
  font-size: 32px;
  margin-bottom: 8px;
}

.scenario-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ========== DETECTION SECTION (Settings) ========== */

/* --- Sous-titres de section --- */
.detection-sub-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Badge "optionnel" --- */
.optional-badge {
  font-size: 11px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  letter-spacing: 0.3px;
}

/* --- Séparateur entre les deux sous-sections --- */
#panel-prompt {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* --- Scenario cards grid --- */
.scenario-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

/* --- Individual scenario card --- */
.scenario-card {
  background: var(--card-2);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 18px 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  user-select: none;
}

.scenario-card:hover {
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.scenario-card.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 16px rgba(59, 130, 246, 0.2);
}

.scenario-card-emoji {
  font-size: 36px;
  line-height: 1;
}

.scenario-card-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
}

.scenario-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

/* --- iOS-style toggle on card --- */
.scenario-toggle-wrap {
  position: absolute;
  top: 10px;
  right: 10px;
}

.scenario-toggle {
  position: relative;
  width: 32px;
  height: 18px;
  display: inline-block;
}

.scenario-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.scenario-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 18px;
  transition: 0.2s;
  cursor: pointer;
}

.scenario-toggle-slider::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  transition: 0.2s;
}

.scenario-toggle input:checked + .scenario-toggle-slider {
  background: var(--accent);
}

.scenario-toggle input:checked + .scenario-toggle-slider::before {
  transform: translateX(14px);
}

/* ========== MINORITY REPORT TOGGLE ========== */

.minority-report-toggle {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(59, 130, 246, 0.06) 100%);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
}

.minority-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.minority-report-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.minority-report-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.minority-report-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.minority-report-warning {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  font-size: 12px;
  color: #fcd34d;
  line-height: 1.5;
}

.minority-report-warning code {
  background: rgba(245, 158, 11, 0.15);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
}

/* ========== MÉMOIRE CONTEXTUELLE ========== */

.memory-card {
  border-color: rgba(59, 130, 246, 0.3);
  background: linear-gradient(135deg, var(--card) 0%, rgba(59, 130, 246, 0.04) 100%);
}

.memory-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.memory-header h2 {
  margin-bottom: 0;
}

/* Toggle on/off mémoire */
.memory-toggle-wrap {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 4px;
}

.memory-toggle-wrap input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.memory-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 26px;
  transition: 0.25s;
}

.memory-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  left: 4px;
  top: 4px;
  transition: 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.memory-toggle-wrap input:checked + .memory-toggle-slider {
  background: var(--accent);
}

.memory-toggle-wrap input:checked + .memory-toggle-slider::before {
  transform: translateX(22px);
}

/* Barre de statut */
.memory-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}

.memory-next {
  font-weight: 600;
  color: var(--accent-light);
  font-size: 12px;
}

/* Boutons actions mémoire */
.memory-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 32px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pricing-card.featured {
    transform: scale(1);
  }

  .support-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .scenario-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 768px) {
  .topnav {
    padding: 16px 20px;
    flex-direction: column;
    gap: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .hero-cta {
    flex-direction: column;
  }

  .dashboard-wrapper {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px;
    flex-direction: row;
    overflow-x: auto;
    gap: 12px;
  }

  .sidebar-nav {
    flex-direction: row;
    gap: 4px;
  }

  .nav-item {
    padding: 8px 12px;
    font-size: 12px;
  }

  .dashboard-topbar {
    padding: 16px 20px;
  }

  .dashboard-pages {
    padding: 20px;
  }

  .page-card {
    padding: 20px;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .scenarios-cards-grid,
  .shop-grid {
    grid-template-columns: 1fr;
  }

  .alert-card {
    grid-template-columns: 80px 1fr;
  }

  .alert-image {
    width: 80px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .scenario-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topnav {
    padding: 12px 16px;
  }

  .brand {
    font-size: 20px;
  }

  .nav-links {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .nav-links a,
  .nav-links button {
    width: 100%;
    text-align: center;
  }

  .hero-section {
    padding: 32px 16px;
  }

  .hero-content h1 {
    font-size: 24px;
  }

  .hero-trust {
    flex-direction: column;
    gap: 8px;
  }

  .how-it-works,
  .scenarios-showcase,
  .pricing-section,
  .shop-section,
  .support-section {
    padding: 40px 16px;
  }

  .steps-grid,
  .scenarios-cards-grid,
  .pricing-grid,
  .shop-grid,
  .support-grid,
  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    padding-top: 16px;
  }

  .dashboard-topbar h1 {
    font-size: 20px;
  }

  .surveillance-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .surveillance-controls {
    width: 100%;
  }

  .surveillance-controls .btn {
    flex: 1;
  }
}

/* ========== AUTH VIEW ========== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 24px;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-brand .logo {
  font-size: 28px;
}

.auth-brand .accent {
  color: var(--accent-light);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.auth-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.auth-form.hidden {
  display: none;
}

.auth-form .form-group {
  margin-bottom: 16px;
}

.auth-form .result-message {
  margin-top: 12px;
  min-height: 20px;
}

/* ========== SIDEBAR USER BLOCK ========== */
.sidebar-user {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-user-email {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  word-break: break-all;
}

/* ========== DISCOVER MODAL ========== */
.discover-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.discover-modal.hidden {
  display: none;
}

.discover-modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

.discover-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.discover-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.discover-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
}

.discover-modal-close:hover {
  color: var(--text);
}

.discover-modal-body {
  padding: 22px;
}

.discover-cam-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.discover-cam-item:hover {
  border-color: var(--accent);
  transform: translateX(2px);
}

.discover-cam-info {
  flex: 1;
  min-width: 0;
}

.discover-cam-ip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

.discover-cam-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.discover-cam-brand {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.discover-cam-brand.unknown {
  background: var(--border);
  color: var(--text-muted);
}

/* ============ Onboarding wizard ============ */
.ob-step {
  flex:1;
  padding:8px 12px;
  background:rgba(255,255,255,0.05);
  border-radius:6px;
  text-align:center;
  font-size:13px;
  color:rgba(255,255,255,0.5);
  border:1px solid rgba(255,255,255,0.08);
}
.ob-step.done {
  background:rgba(34,197,94,0.12);
  color:#22c55e;
  border-color:rgba(34,197,94,0.3);
}
.ob-step.active {
  background:rgba(59,130,246,0.15);
  color:#60a5fa;
  border-color:rgba(59,130,246,0.4);
  font-weight:600;
}
.ob-panel {
  padding:20px;
  background:rgba(255,255,255,0.02);
  border-radius:12px;
}
.ob-panel.hidden { display:none; }
#ob-checks li {
  padding:8px 0;
  font-size:14px;
}
#ob-checks li.ok::before { content:"✅ "; }
