/* ── Variables & Reset ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Bebas+Neue&family=Syne:wght@700;800&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #07060d;
  --bg-secondary: #0e0b1a;
  --bg-card: #140f22;
  --bg-card-hover: #1c1530;
  --accent: #7c3aed;
  --accent-hover: #a855f7;
  --accent-glow: rgba(124, 58, 237, 0.35);
  --accent-dim: rgba(124, 58, 237, 0.15);
  --danger: #ef4444;
  --danger-dim: rgba(239,68,68,.12);
  --success: #22c55e;
  --success-dim: rgba(34,197,94,.12);
  --warning: #f59e0b;
  --warning-dim: rgba(245,158,11,.12);
  --text-primary: #eef0f5;
  --text-secondary: #8b8aa0;
  --text-muted: #4a4560;
  --border: rgba(124, 58, 237, 0.15);
  --border-hover: rgba(168, 85, 247, 0.35);
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-heading: 'Bebas Neue', 'Syne', 'Inter', sans-serif;
  --font-mono: 'DM Mono', 'Consolas', monospace;
  --shadow: 0 4px 24px rgba(0,0,0,.5);
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent-hover);
  text-decoration: none;
  transition: color .2s;
}

a:hover {
  color: var(--text-primary);
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
}

/* ── Constellation Canvas ── */
#constellation-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
/* Tout le contenu passe au-dessus du canvas constellation */
.navbar, .hero-split, .section, .section-alt,
.stats-band, .login-wrap, footer { position: relative; z-index: 1; }

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

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

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

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(7, 6, 13, .82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  height: 56px;
}

.navbar > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--text-primary);
  white-space: nowrap;
}

.navbar-brand .brand-word { color: var(--text-primary); transition: color .15s; }
.navbar-brand .accent-word { color: var(--accent); }
.navbar-brand:hover .brand-word { color: var(--accent-hover); }

.navbar-brand .brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #c026d3 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.navbar-links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color .2s;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text-primary);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.lang-switcher {
  background: none; border: 1px solid var(--border); color: var(--text-secondary);
  border-radius: 6px; padding: 3px 8px; font-size: 12px; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.lang-switcher:hover { border-color: var(--accent); color: var(--accent); }

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .4rem;
  cursor: pointer;
}

.navbar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all .3s;
}

/* Bouton hamburger réel (SVG) : masqué en desktop, affiché en mobile.
   Sans ceci il devient un 3e enfant flex et casse le space-between. */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: .4rem;
}
.mobile-menu-btn:hover { color: var(--accent); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .6rem 1.3rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  transition: all .22s ease;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #c026d3 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 14px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.12);
  box-shadow: 0 4px 28px rgba(124, 58, 237, 0.55);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  filter: brightness(.95);
}

.btn-outline {
  background: transparent;
  color: var(--accent-hover);
  border-color: var(--border-hover);
}

.btn-outline:hover {
  background: var(--accent-dim);
  border-color: var(--accent-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border-color: rgba(239,68,68,.25);
}

.btn-danger:hover {
  background: rgba(239,68,68,.22);
  border-color: var(--danger);
}

.btn-success {
  background: rgba(22,163,74,.12);
  color: #16a34a;
  border-color: rgba(22,163,74,.35);
}
.btn-success:hover {
  background: rgba(22,163,74,.22);
  border-color: #16a34a;
}

.btn-blue {
  background: rgba(59,130,246,.12);
  color: #3b82f6;
  border-color: rgba(59,130,246,.35);
}
.btn-blue:hover {
  background: rgba(59,130,246,.22);
  border-color: #3b82f6;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--accent-dim);
  color: var(--text-primary);
}

.btn-sm {
  padding: .35rem .8rem;
  font-size: .78rem;
  border-radius: 8px;
}

.btn-xs {
  padding: .2rem .5rem;
  font-size: .75rem;
  border-radius: 5px;
}

.btn-icon {
  padding: 0 !important;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  line-height: 1;
  border-radius: 6px;
  flex-shrink: 0;
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: border-color .22s, box-shadow .22s, background .22s;
  position: relative;
  z-index: 1;
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color .22s, box-shadow .22s, transform .22s;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(124, 58, 237, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

.feature-card:hover {
  border-color: var(--accent-hover);
  box-shadow: 0 8px 32px var(--accent-glow);
  transform: translateY(-2px);
}

.feature-card .fc-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: var(--accent-hover);
}

.feature-card .fc-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .4rem;
  color: var(--text-primary);
}

.feature-card .fc-desc {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 5rem 2rem 4rem;
  background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(124, 58, 237, 0.18) 0%, transparent 70%),
              radial-gradient(ellipse 60% 40% at 20% 80%, rgba(192, 38, 211, 0.10) 0%, transparent 60%);
}

.hero-badge {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  /* Fond OPAQUE : la constellation ne transparaît pas à travers la pastille.
     Pas de halo ici — le halo qui suit la souris est sur le bandeau de stats. */
  background: linear-gradient(var(--accent-dim), var(--accent-dim)), var(--bg-primary);
  border: 1px solid var(--border-hover);
  border-radius: 99px;
  padding: .3rem .9rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent-hover);
  margin-bottom: 1.5rem;
  letter-spacing: .04em;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: .02em;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 40%, #a855f7 80%, #c026d3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.2rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-split {
  padding: 60px 0 20px;
  background: radial-gradient(ellipse 90% 60% at 70% -5%, rgba(124, 58, 237, .10) 0%, transparent 65%);
}

.hero-split .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-left {
  min-width: 0;
  padding-right: 1rem;
  align-self: flex-start;
  margin-top: 20px;
  z-index: 1;
}

.hero-claim {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 1.25rem;
}
.hero-claim .line1 { color: var(--text-secondary); display: block; }
.hero-claim .line2 {
  background: linear-gradient(125deg, var(--text-primary) 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  white-space: nowrap;   /* "avant qu'elles ne vous coûtent." sur une seule ligne */
}
.hero-sub-new {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-right-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
  min-width: 0;
  max-width: 100%;
  min-height: 380px;
  z-index: 1;
}

/* ── Radar SVG ── */
.radar-wrap {
  position: relative;
  width: 360px;
  height: 360px;
  flex-shrink: 0;
}

.hero-right-col .radar-wrap {
  position: absolute;
  top: 46%; left: 50%;
  transform: translate(-50%, -50%);
  width: 512px; height: 512px;
  margin: 0;
  z-index: 0;
  pointer-events: none;
}

.radar-svg {
  width: 100%;
  height: 100%;
}

.radar-svg circle {
  fill: none;
}

.radar-svg .radar-cross {
  stroke-width: 1;
}

.radar-sweep {
  transform-origin: 50% 50%;
  animation: radar-spin 4s linear infinite;
}

.radar-sweep-path {
  fill: none;
  stroke: url(#sweep-gradient);
  stroke-width: 1;
}

.radar-sweep-sector {
  fill: url(#sector-gradient);
}

@keyframes radar-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.radar-ping { animation: radar-ping-pulse 4s ease-out infinite; }
.radar-ping-2 { animation-delay: 1.4s; }
.radar-ping-3 { animation-delay: 2.7s; }

@keyframes radar-ping-pulse {
  0%,70% { opacity: 0; r: 2; }
  75%    { opacity: 1; r: 4; }
  85%    { opacity: .8; r: 6; }
  100%   { opacity: 0; r: 8; }
}

/* Blips statiques : point plein toujours visible + halo qui pulse */
.radar-blip circle:first-child {
  filter: drop-shadow(0 0 5px currentColor);
}
.radar-blip .blip-ring {
  stroke-width: 1.5;
  transform-origin: center;
  animation: blip-pulse 2.8s ease-out infinite;
}
@keyframes blip-pulse {
  0%   { opacity: .7; r: 3px; }
  70%  { opacity: 0;  r: 13px; }
  100% { opacity: 0;  r: 13px; }
}

.radar-dot {
  fill: var(--accent-hover);
  filter: drop-shadow(0 0 6px var(--accent-hover));
}

.radar-dot-danger {
  fill: var(--danger);
  filter: drop-shadow(0 0 6px var(--danger));
}

/* ── CVE Ticker ── */
.threat-ticker-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 70px;
  transition: box-shadow .25s, border-color .25s;
}
.threat-ticker-wrap:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 26px var(--accent-glow);
}
.ticker-live-badge {
  flex-shrink: 0;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}
.ticker-track {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}
.ticker-inner {
  display: inline-flex;
  white-space: nowrap;
  gap: 2.5rem;
  animation: tickerScroll 38s linear infinite;
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.ticker-item-domain { color: var(--accent-hover); font-weight: 500; }
.ticker-item-tag { color: #c026d3; }
.ticker-sep { color: var(--text-muted); opacity: .6; }
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feat-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feat-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .2s, transform .2s;
  display: flex;
  flex-direction: column;
}

.feat-group:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.feat-group:has(.feat-group-label.det):hover  { border-color: rgba(124,58,237,.45); box-shadow: 0 10px 32px rgba(124,58,237,.14); }
.feat-group:has(.feat-group-label.intel):hover { border-color: rgba(99,102,241,.45); box-shadow: 0 10px 32px rgba(99,102,241,.14); }
.feat-group:has(.feat-group-label.resp):hover  { border-color: rgba(192,38,211,.45); box-shadow: 0 10px 32px rgba(192,38,211,.14); }
.feat-group:has(.feat-group-label.det):hover  .feat-group-label.det   { box-shadow: 0 0 16px rgba(124,58,237,.45); }
.feat-group:has(.feat-group-label.intel):hover .feat-group-label.intel { box-shadow: 0 0 16px rgba(99,102,241,.45); }
.feat-group:has(.feat-group-label.resp):hover .feat-group-label.resp  { box-shadow: 0 0 16px rgba(192,38,211,.45); }

.feat-group-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: 4px;
  border: 1px solid;
  margin-bottom: 1.25rem;
}

.feat-group-label.det {
  color: #a78bfa;
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.28);
}

.feat-group-label.intel {
  color: #818cf8;
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.28);
}

.feat-group-label.resp {
  color: #e879f9;
  background: rgba(192, 38, 211, 0.12);
  border-color: rgba(192, 38, 211, 0.28);
}

.feat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.feat-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.feat-item-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.feat-item-dot.det   { background: #a78bfa; }
.feat-item-dot.intel { background: #818cf8; }
.feat-item-dot.resp  { background: #e879f9; }

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color .22s, box-shadow .22s;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 40px var(--accent-glow);
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.12) 0%, var(--bg-card) 60%);
  position: relative;
}

.pricing-card.featured::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-hover), transparent);
  border-radius: 99px;
}

.pricing-badge {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .22rem .65rem;
  border-radius: 99px;
}

.pricing-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.pricing-price {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  color: var(--text-primary);
  line-height: 1;
}

.pricing-price.gradient-price {
  background: linear-gradient(135deg, #a78bfa, #c026d3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-period {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

.pricing-desc {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pricing-divider {
  border: none;
  border-top: 1px solid var(--border);
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .85rem;
  color: var(--text-secondary);
}

.pricing-features li .pf-icon {
  flex-shrink: 0;
  margin-top: .1rem;
  color: var(--success);
  font-size: .9rem;
}

.pricing-features li .pf-icon.no {
  color: var(--text-muted);
}

/* ── Dashboard Layout ── */
.dash-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 56px;
  left: 0;
  width: 240px;
  height: calc(100vh - 56px);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.75rem 0;
  overflow-y: auto;
  z-index: 50;
  transition: transform .3s ease;
}

.sidebar-section {
  padding: 0 .75rem;
  margin-bottom: .25rem;
}

.sidebar-section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: .6rem .75rem .3rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem .75rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .18s, color .18s;
  text-decoration: none;
  position: relative;
}

.sidebar-item:hover {
  background: var(--accent-dim);
  color: var(--text-primary);
}

.sidebar-item.active {
  background: var(--accent-dim);
  color: var(--accent-hover);
  font-weight: 600;
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: linear-gradient(180deg, #7c3aed, #a855f7);
  border-radius: 0 3px 3px 0;
}

.sidebar-item .si-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: .75;
}

.sidebar-item.active .si-icon,
.sidebar-item:hover .si-icon {
  opacity: 1;
}

.sidebar-item .si-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: .1rem .42rem;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: .75rem;
  border-top: 1px solid var(--border);
}

/* ── Main Content ── */
.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 2rem;
  min-width: 0;
  position: relative;
  z-index: 1;
}

/* ── Environment Cards ── */
.env-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.env-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.env-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  letter-spacing: .04em;
  color: var(--text-primary);
  margin: 0;
}
.env-card-desc {
  font-size: .85rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}
.env-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .2rem;
}
.env-card-stats > span {
  font-size: .78rem;
  font-weight: 600;
  padding: .28rem .6rem;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--text-secondary);
}
.env-card-stats .cve-count {
  background: rgba(34, 197, 94, .12);
  color: var(--success);
}
.env-card-stats .cve-count.has-vulns {
  background: rgba(239, 68, 68, .14);
  color: var(--danger);
}
.env-card-scan {
  font-size: .72rem;
  color: var(--text-muted);
}
.env-card-actions {
  display: flex;
  gap: .5rem;
  margin-top: auto;
  padding-top: .4rem;
}
.env-card-actions .btn {
  flex: 1;
}

/* ── Commandes copiables (curl | bash) ── */
.cmd-row {
  display: flex;
  align-items: stretch;
  gap: .5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .45rem .55rem;
}
.cmd-os {
  flex: 0 0 auto;
  align-self: center;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: .22rem .5rem;
  border-radius: 5px;
  white-space: nowrap;
}
.cmd-code {
  flex: 1 1 auto;
  align-self: center;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: nowrap;
  min-width: 0;
  scrollbar-width: thin;
}
.cmd-code::-webkit-scrollbar { height: 5px; }
.cmd-code::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 5px; }
.cmd-copy {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.cmd-copy:hover {
  background: var(--accent-dim);
  color: var(--accent-hover);
  border-color: var(--border-hover);
}
.cmd-copy.copied {
  color: var(--success);
  border-color: var(--success);
}

/* ── Stats Bar ── */
.stats-bar {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stats-bar.--four {
  grid-template-columns: repeat(4, 1fr);
}

.stats-bar.--three {
  grid-template-columns: repeat(3, 1fr);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  transition: border-color .2s, box-shadow .2s;
}

.stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1;
}

.stat-number.accent {
  color: var(--accent-hover);
}

.stat-number.danger {
  color: var(--danger);
}

.stat-number.success {
  color: var(--success);
}

.stat-number.warning {
  color: var(--warning);
}

.stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.stat-delta {
  font-size: .78rem;
  display: flex;
  align-items: center;
  gap: .25rem;
}

.stat-delta.up { color: var(--danger); }
.stat-delta.down { color: var(--success); }

/* ── Paramètres : disposition 2 colonnes ── */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 1120px;
  align-items: start;
}

.settings-grid > .card {
  max-width: none;
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Severity Badges ── */
.sev-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .18rem .55rem;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sev-critical {
  background: rgba(239,68,68,.15);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,.3);
}

.sev-high {
  background: rgba(249,115,22,.12);
  color: #f97316;
  border: 1px solid rgba(249,115,22,.28);
}

.sev-medium {
  background: rgba(234,179,8,.1);
  color: #eab308;
  border: 1px solid rgba(234,179,8,.25);
}

.sev-low {
  background: rgba(34,197,94,.1);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,.22);
}

.sev-info {
  background: rgba(59,130,246,.1);
  color: #60a5fa;
  border: 1px solid rgba(59,130,246,.22);
}

/* ── Status Pills ── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .15rem .55rem;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-open {
  background: rgba(239,68,68,.1);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,.22);
}

.status-acknowledged {
  background: rgba(245,158,11,.1);
  color: var(--warning);
  border: 1px solid rgba(245,158,11,.22);
}

.status-resolved {
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(34,197,94,.22);
}

.status-ignored {
  background: rgba(74, 69, 96, .18);
  color: var(--text-muted);
  border: 1px solid rgba(74,69,96,.35);
}

/* ── Vulnerability Table ── */
.vuln-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.vuln-table thead th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  position: sticky;
  top: 0;
  white-space: nowrap;
}

.vuln-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .18s;
}

.vuln-table tbody tr:hover {
  background: var(--accent-dim);
}

.vuln-table tbody td {
  padding: .85rem 1rem;
  color: var(--text-primary);
  vertical-align: middle;
}

.vuln-table .col-cve { width: 140px; }
.vuln-table .col-sev { width: 110px; }
.vuln-table .col-cvss { width: 80px; text-align: center; }
.vuln-table .col-status { width: 130px; }
.vuln-table .col-date { width: 120px; color: var(--text-secondary); font-size: .8rem; }
.vuln-table .col-actions { width: 170px; }
.actions-cell { display: flex; gap: .3rem; align-items: center; flex-wrap: nowrap; white-space: nowrap; }

.vuln-table th[data-sort] { cursor: pointer; user-select: none; }
.vuln-table th[data-sort]:hover { color: var(--accent-hover); }
.vuln-table th[data-sort]::after { content: ' ⇅'; opacity: .3; font-size: .7em; }
.vuln-table th[data-sort-dir="asc"]::after { content: ' ↑'; opacity: .8; color: var(--accent-hover); }
.vuln-table th[data-sort-dir="desc"]::after { content: ' ↓'; opacity: .8; color: var(--accent-hover); }

.vuln-table .cve-id {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--accent-hover);
}

.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}

.table-title {
  font-weight: 700;
  font-size: .95rem;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ── Admin ── */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  transition: border-color .18s, transform .18s;
}

.admin-kpi:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.admin-kpi-val {
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 1;
  color: var(--accent-hover);
  letter-spacing: .02em;
}

.admin-kpi-lbl {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.admin-table thead th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.admin-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .18s;
}

.admin-table tbody tr:last-child { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--accent-dim); }

.admin-table tbody td {
  padding: .75rem 1rem;
  color: var(--text-primary);
  vertical-align: middle;
}

.admin-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.admin-plan-sel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: .4rem .6rem;
  font-size: .82rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: border-color .18s;
}

.admin-plan-sel:hover,
.admin-plan-sel:focus { border-color: var(--border-hover); outline: none; }

/* Admin — gestion des tickets */
.admin-section-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  letter-spacing: .03em;
  color: var(--text-primary);
  margin: 2rem 0 1rem;
}

.admin-tickets-empty {
  color: var(--text-secondary);
  font-size: .9rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.admin-ticket {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  transition: border-color .18s;
}

.admin-ticket:hover { border-color: var(--border-hover); }

.admin-ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  flex-wrap: wrap;
}

.admin-ticket-subj {
  font-weight: 700;
  color: var(--text-primary);
  font-size: .95rem;
}

.admin-ticket-meta {
  font-size: .78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.admin-ticket-ref {
  font-family: var(--font-mono);
  color: var(--accent-hover);
}

.ticket-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.ticket-badge.open      { background: var(--warning-dim); color: var(--warning); }
.ticket-badge.answered  { background: var(--accent-dim); color: var(--accent-hover); }
.ticket-badge.closed    { background: var(--success-dim); color: var(--success); }

.admin-ticket-body {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.admin-ticket-msgs {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1rem;
}

.admin-msg {
  padding: .65rem .9rem;
  border-radius: 10px;
  font-size: .85rem;
  line-height: 1.5;
  max-width: 85%;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-msg-author {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .25rem;
  opacity: .8;
}

.admin-msg.user {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  align-self: flex-start;
}

.admin-msg.admin {
  background: var(--accent-dim);
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
  align-self: flex-end;
}

.admin-ticket-reply {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.admin-ticket-reply textarea {
  width: 100%;
  min-height: 80px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  padding: .7rem .9rem;
  font-family: var(--font-sans);
  font-size: .85rem;
  resize: vertical;
  transition: border-color .18s;
}

.admin-ticket-reply textarea:focus { border-color: var(--border-hover); outline: none; }

.admin-ticket-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-msg { max-width: 100%; }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 6, 13, .75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 16px 64px rgba(0,0,0,.65), 0 0 0 1px var(--accent-glow);
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.75rem;
  transform: translateY(16px) scale(.97);
  transition: transform .22s ease;
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

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

.modal-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  margin: 0 0 1.5rem;
  padding-right: 2.5rem;
}

.modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all .18s;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--danger-dim);
  color: var(--danger);
  border-color: rgba(239,68,68,.3);
}

.modal-body {
  padding: 1.5rem 1.75rem;
}

.modal-footer {
  padding: 1rem 1.75rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
}

/* ── Forms ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin-bottom: 1.1rem;
}

.form-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .6rem .9rem;
  color: var(--text-primary);
  font-size: .875rem;
  font-family: var(--font-sans);
  transition: border-color .18s, box-shadow .18s;
  outline: none;
  width: 100%;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-control:disabled {
  opacity: .5;
  cursor: not-allowed;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b8aa0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.2rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

.form-hint {
  font-size: .78rem;
  color: var(--text-muted);
}

.form-error {
  font-size: .78rem;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: .3rem;
}

/* ── Login Page ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: radial-gradient(ellipse 60% 40% at 50% 20%, rgba(124, 58, 237, .08) 0%, transparent 70%);
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 2.5rem 2.25rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px var(--accent-glow);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  letter-spacing: .08em;
  color: var(--text-primary);
  margin-bottom: 1.75rem;
}

.login-logo .brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #c026d3 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-title {
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: .4rem;
}

.login-subtitle {
  font-size: .875rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-error {
  background: var(--danger-dim);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 8px;
  padding: .7rem .9rem;
  font-size: .85rem;
  color: var(--danger);
  margin-bottom: 1rem;
  /* Masqué par défaut — affiché seulement quand showError() est appelé.
     Sinon une boîte rouge vide s'affiche au chargement. */
  display: none;
  align-items: center;
  gap: .5rem;
}

.login-toggle {
  margin-top: 1.25rem;
  text-align: center;
  font-size: .875rem;
  color: var(--text-secondary);
}

.login-toggle a {
  color: var(--accent-hover);
  font-weight: 600;
}

/* ── Section Helpers ── */
.section {
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}

.section-alt {
  background: var(--bg-secondary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: .04em;
  color: var(--text-primary);
  margin-bottom: .6rem;
}

.section-title.gradient {
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.6;
}

.text-center {
  text-align: center;
}

.text-center .section-subtitle,
.section-subtitle.text-center {
  margin-left: auto;
  margin-right: auto;
}

/* Espace l'intro des 3 cartes juste en dessous */
.section-subtitle.text-center {
  margin-bottom: 2.75rem;
}

.section-header {
  margin-bottom: 3rem;
}

/* ── Toast Notifications ── */
#toast-container {
  position: fixed;
  top: 80px;
  right: 1.5rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  pointer-events: none;
}

/* Toast unique du dashboard : superposé (fixe), ne pousse PAS la navbar */
#toast {
  position: fixed;
  top: 70px;
  right: 1.5rem;
  z-index: 600;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1.1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: .875rem;
  min-width: 280px;
  max-width: 380px;
  pointer-events: all;
  transform: translateX(110%);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  opacity: 0;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.success {
  border-color: rgba(34,197,94,.3);
  background: linear-gradient(90deg, var(--success-dim), var(--bg-card));
}

.toast.success .toast-icon { color: var(--success); }

.toast.error {
  border-color: rgba(239,68,68,.3);
  background: linear-gradient(90deg, var(--danger-dim), var(--bg-card));
}

.toast.error .toast-icon { color: var(--danger); }

.toast.warning {
  border-color: rgba(245,158,11,.3);
  background: linear-gradient(90deg, var(--warning-dim), var(--bg-card));
}

.toast.warning .toast-icon { color: var(--warning); }

.toast.info {
  border-color: var(--border-hover);
  background: linear-gradient(90deg, var(--accent-dim), var(--bg-card));
}

.toast.info .toast-icon { color: var(--accent-hover); }

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast-msg {
  flex: 1;
  color: var(--text-primary);
}

.toast-close {
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.toast-close:hover {
  color: var(--text-secondary);
}

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-dim);
  border-top-color: var(--accent-hover);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.spinner.lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

.spinner-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  gap: 1rem;
}

.empty-state .es-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--accent-hover);
}

.empty-state .es-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.empty-state .es-desc {
  font-size: .875rem;
  color: var(--text-secondary);
  max-width: 320px;
}

/* ── Upgrade Banner ── */
.upgrade-banner {
  background: var(--accent-dim);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.upgrade-banner .ub-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  color: var(--accent-hover);
}

.upgrade-banner .ub-text {
  flex: 1;
  font-size: .875rem;
  color: var(--text-secondary);
}

.upgrade-banner .ub-text strong {
  color: var(--text-primary);
}

/* ── Progress Bar ── */
.progress-wrap {
  background: var(--bg-secondary);
  border-radius: 99px;
  overflow: hidden;
  height: 6px;
  width: 100%;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #c026d3);
  border-radius: 99px;
  transition: width .4s ease;
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .78rem;
  color: var(--text-secondary);
  margin-bottom: .35rem;
}

/* ── Dashboard Tabs ── */
.dash-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.dash-tab {
  padding: .7rem 1.1rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .18s, border-color .18s;
  margin-bottom: -1px;
}

.dash-tab:hover {
  color: var(--text-primary);
}

.dash-tab.active {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
  font-weight: 600;
}

/* ── Bottom Nav Mobile ── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  z-index: 100;
  height: 60px;
  align-items: stretch;
  justify-content: space-around;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  flex: 1;
  font-size: .65rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .18s;
  text-decoration: none;
  padding: .4rem 0;
}

.bottom-nav-item .bn-icon {
  font-size: 1.1rem;
}

.bottom-nav-item.active {
  color: var(--accent-hover);
}

/* ── Stats Band ── */
.stats-band {
  /* Fond OPAQUE : la constellation ne doit pas transparaître sous le bandeau. */
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
/* Halo violet léger qui suit la souris (copie BrandRadar). */
.stats-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(168, 85, 247, .10), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.stats-band:hover::before { opacity: .8; }
.stats-band .container { position: relative; z-index: 1; }

.stats-band-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.stat-band-num {
  font-family: var(--font-heading);
  font-size: 3rem;
  background: linear-gradient(135deg, #a78bfa, #c026d3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: .3rem;
}

.stat-band-label {
  font-size: .82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── How It Works ── */
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  text-align: center;
}

.step-num {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--accent);
  opacity: .22;
  margin-bottom: .75rem;
  user-select: none;
}

.step-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .5rem;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.step-text {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* ── CTA Card ── */
.cta-index-card {
  background: linear-gradient(135deg,
    rgba(124, 58, 237, 0.18) 0%,
    rgba(168, 85, 247, 0.1) 50%,
    rgba(192, 38, 211, 0.08) 100%);
  border: 1px solid var(--border-hover);
  border-radius: calc(var(--radius) + 4px);
  padding: 3.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-index-card::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.15) 0%, transparent 65%);
  pointer-events: none;
}

.cta-index-card .cta-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: .04em;
  margin-bottom: .75rem;
  position: relative;
  z-index: 1;
}

.cta-index-card .cta-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.cta-index-card .cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

/* ── Legal ── */
.legal-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.legal-tab {
  padding: .45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .875rem;
  color: var(--text-secondary);
  cursor: pointer;
  background: transparent;
  transition: all .18s;
}

.legal-tab:hover,
.legal-tab.active {
  background: var(--accent-dim);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.legal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
}

.legal-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .75rem;
  margin-top: 1.75rem;
  color: var(--text-primary);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  font-size: .9rem;
  color: var(--text-secondary);
  margin-bottom: .75rem;
  line-height: 1.65;
}

/* ── Tickets ── */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.ticket-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color .18s, background .18s;
  cursor: pointer;
}

.ticket-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.ticket-item .ti-id {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ticket-item .ti-title {
  flex: 1;
  font-weight: 500;
  font-size: .875rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-item .ti-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.ticket-item .ti-date {
  font-size: .78rem;
  color: var(--text-muted);
}

/* ── Nav Item (generic) ── */
.nav-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .8rem;
  border-radius: 8px;
  font-size: .875rem;
  color: var(--text-secondary);
  transition: background .18s, color .18s;
  text-decoration: none;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--accent-dim);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent-hover);
  font-weight: 600;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.page-title {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: .2rem;
}

.page-subtitle {
  font-size: .875rem;
  color: var(--text-secondary);
}

/* ── Info Box ── */
.info-box {
  background: var(--accent-dim);
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}

.info-box .ib-icon {
  color: var(--accent-hover);
  flex-shrink: 0;
  margin-top: .1rem;
}

/* ── Search Bar ── */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar .search-icon {
  position: absolute;
  left: .75rem;
  color: var(--text-muted);
  pointer-events: none;
  font-size: .9rem;
}

.search-bar .form-control {
  padding-left: 2.2rem;
}

/* ── Filter Chips ── */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: .78rem;
  cursor: pointer;
  transition: all .18s;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: var(--border-hover);
  background: var(--accent-dim);
  color: var(--text-primary);
}

/* ── Animations ── */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fade-in-up .5s ease both;
}

.fade-in-up:nth-child(1) { animation-delay: .0s; }
.fade-in-up:nth-child(2) { animation-delay: .08s; }
.fade-in-up:nth-child(3) { animation-delay: .16s; }
.fade-in-up:nth-child(4) { animation-delay: .24s; }
.fade-in-up:nth-child(5) { animation-delay: .32s; }
.fade-in-up:nth-child(6) { animation-delay: .40s; }

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 12px var(--accent-glow); }
  50%       { box-shadow: 0 0 28px rgba(124, 58, 237, 0.55); }
}

.glow-pulse {
  animation: glow-pulse 2.5s ease-in-out infinite;
}

/* ── Utility ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.w-full { width: 100%; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-0 { padding: 0; }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent-hover); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Media Queries ── */
@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-split .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-left { padding-right: 0; }
  .hero-sub-new { margin-left: auto; margin-right: auto; }
  .hero-split .hero-ctas { justify-content: center; margin-left: 0; }

  .hero-right-col {
    display: none;
  }

  .feat-groups {
    grid-template-columns: 1fr;
  }

  .how-steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stats-band-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .stats-bar.--four {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
  }

  .navbar-links {
    display: none;
  }

  /* Menu déroulant mobile quand on ouvre le hamburger */
  .navbar-links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(7, 6, 13, .98);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 1.25rem;
  }

  .bottom-nav {
    display: flex;
  }

  body.has-bottom-nav .main-content {
    padding-bottom: 80px;
  }

  .hero {
    padding: 3.5rem 1.25rem 3rem;
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 9vw, 3rem);
  }

  .section {
    padding: 3.5rem 1.25rem;
  }

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

  .how-steps {
    grid-template-columns: 1fr;
  }

  .stats-band-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-bar.--four,
  .stats-bar.--three {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .modal-card {
    max-width: 100%;
    margin: 0 .5rem;
  }

  .login-card {
    padding: 1.75rem 1.5rem;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-index-card {
    padding: 2.5rem 1.5rem;
  }

  .legal-content {
    padding: 1.5rem 1.25rem;
  }
}

/* ── Print ── */
@media print {
  .sidebar,
  .navbar,
  .bottom-nav,
  #constellation-canvas,
  .toast,
  #toast-container,
  .upgrade-banner,
  .btn {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .card,
  .stat-card,
  .table-wrap {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .vuln-table th,
  .vuln-table td {
    color: #000 !important;
  }
}

/* ── Impression devis Enterprise (admin) — n'imprimer que l'aperçu ── */
body.printing-devis * { visibility: hidden; }
body.printing-devis #dv-preview,
body.printing-devis #dv-preview * { visibility: visible; }
body.printing-devis #dv-preview {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  background: #fff;
  color: #000;
  z-index: 99999;
}

@media (max-width: 720px) { .devis-cols { grid-template-columns: 1fr !important; } }

/* ── Remediation plan rendered markdown ────────────────────────────── */
#remediation-content .rem-heading {
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  margin: 1rem 0 .35rem;
}
#remediation-content .rem-heading:first-child { margin-top: 0; }
#remediation-content .rem-bullet {
  position: relative;
  padding-left: 1rem;
  margin-bottom: .2rem;
  font-size: 13px;
  line-height: 1.55;
}
#remediation-content .rem-bullet::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: .7;
}
#remediation-content .rem-line {
  font-size: 13px;
  line-height: 1.55;
}
#remediation-content .rem-code-block {
  background: rgba(0,0,0,.35);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .55rem .8rem;
  margin: .3rem 0 .5rem 1rem;
  overflow-x: auto;
}
#remediation-content .rem-code-block code {
  font-family: var(--font-mono, 'DM Mono', monospace);
  font-size: 12px;
  color: #86efac;
  white-space: pre;
}
#remediation-content .rem-inline-code {
  background: rgba(139,92,246,.15);
  border: 1px solid rgba(139,92,246,.25);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: #c4b5fd;
}
