:root {
  color-scheme: dark;
  --brand: #4f46e5;
  --brand-hover: #6366f1;
}

html {
  color-scheme: dark;
}

body {
  background-color: #09090b;
  color: #d4d4d8;
  -webkit-font-smoothing: antialiased;
}

.card {
  background: #101014;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.75rem;
}

.status-card.critical { border-color: rgba(239, 68, 68, 0.4); }
.status-card.warning { border-color: rgba(245, 158, 11, 0.4); }
.status-card.safe { border-color: rgba(16, 185, 129, 0.4); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.22rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 500;
  white-space: nowrap;
}

.pill .dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  flex-shrink: 0;
}

.pill-red { color: #fca5a5; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.22); }
.pill-red .dot-red { background: #ef4444; }
.pill-yellow { color: #fcd34d; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.22); }
.pill-yellow .dot-yellow { background: #f59e0b; }
.pill-green { color: #6ee7b7; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.22); }
.pill-green .dot-green { background: #10b981; }
.pill-gray { color: #cbd5e1; background: rgba(100, 116, 139, 0.1); border: 1px solid rgba(100, 116, 139, 0.25); }
.pill-gray .dot-gray { background: #94a3b8; }
.pill-orange { color: #fdba74; background: rgba(249, 115, 22, 0.1); border: 1px solid rgba(249, 115, 22, 0.22); }
.pill-orange .dot-orange { background: #f97316; }

.sev {
  padding: 0.14rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 500;
}

.sev-critical { color: #fca5a5; background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.28); }
.sev-high { color: #fdba74; background: rgba(249, 115, 22, 0.1); border: 1px solid rgba(249, 115, 22, 0.28); }
.sev-medium { color: #fde047; background: rgba(234, 179, 8, 0.1); border: 1px solid rgba(234, 179, 8, 0.28); }
.sev-low { color: #6ee7b7; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.24); }
.sev-unknown { color: #cbd5e1; background: rgba(100, 116, 139, 0.1); border: 1px solid rgba(100, 116, 139, 0.25); }

.sev-risk { color: #fca5a5; background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2); }

.vchip {
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #a1a1aa;
  background: rgba(63, 63, 70, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s;
}
.vchip:hover { color: #e4e4e7; border-color: rgba(255, 255, 255, 0.2); }
.vchip.active { color: #a5b4fc; background: rgba(99, 102, 241, 0.14); border-color: rgba(99, 102, 241, 0.4); }
.vchip-critical { color: #fca5a5; }
.vchip-high { color: #fdba74; }
.vchip-medium { color: #fde047; }
.vchip-low { color: #6ee7b7; }

.cve-link {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  transition: filter 0.15s;
}
.cve-link:hover { filter: brightness(1.25); }
.cve-more { color: #a5b4fc; background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.35); }
.cve-more:hover { border-color: rgba(99, 102, 241, 0.6); }
.no-underline { text-decoration: none; }

kbd {
  font-family: inherit;
  padding: 0.05rem 0.35rem;
  border-radius: 0.3rem;
  background: rgba(63, 63, 70, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.7rem;
  color: #a1a1aa;
}

/* Focus clavier visible partout */
:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}
input:focus-visible, select:focus-visible { outline-offset: 0; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--brand);
  color: #fff;
  font-size: 0.875rem;
}
.skip-link:focus { top: 0.5rem; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  color: #d4d4d8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-icon:hover { background-color: rgba(63, 63, 70, 0.6); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.btn-icon:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-icon-sm { width: 2rem; height: 2rem; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 0.5rem;
  font-weight: 500;
  color: #d4d4d8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-ghost:hover:not(:disabled) { background-color: rgba(63, 63, 70, 0.6); color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-close { width: 2rem; height: 2rem; flex-shrink: 0; border-radius: 0.5rem; color: #a1a1aa; }
.btn-close:hover { color: #fff; background-color: rgba(63, 63, 70, 0.6); }

.menu-item { display: block; width: 100%; padding: 0.5rem 1rem; text-align: left; font-size: 0.875rem; color: #d4d4d8; }
.menu-item:hover, .menu-item:focus-visible { background-color: rgba(63, 63, 70, 0.5); color: #fff; }
.menu-item:focus-visible { outline-offset: -2px; }

.link-quiet { color: #a1a1aa; text-decoration: underline; text-underline-offset: 2px; transition: color 0.15s; }
.link-quiet:hover { color: #e4e4e7; }

.field-select {
  flex: 1 1 8.5rem;
  min-width: 0;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  background-color: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: #d4d4d8;
}
@media (min-width: 1024px) { .field-select { flex: 0 0 auto; } }

.follow-btn {
  display: inline-flex;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  color: #d4d4d8;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.follow-btn:hover { background-color: rgba(63, 63, 70, 0.6); color: #fff; }
.follow-btn[aria-pressed="true"] { color: #6ee7b7; background-color: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.3); }
.follow-btn:disabled { opacity: 0.5; }

#a-confirmer { scroll-margin-top: 4.5rem; }

/* L'accueil a déjà sa grande recherche */
.page-home #header-search-box { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #09090b; }
::-webkit-scrollbar-thumb { background: rgba(113, 113, 122, 0.35); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(113, 113, 122, 0.6); }