/* ===========================================
   CyberWatch4All - Rainbow4All Inspired Theme
   =========================================== */

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --dark-bg: #0f0f1a;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --accent-purple: #667eea;
  --accent-pink: #f093fb;
  --accent-blue: #4facfe;

  /* Severity colors */
  --severity-critical: #ff4757;
  --severity-high: #ff6b35;
  --severity-medium: #ffa502;
  --severity-low: #2ed573;
  --severity-unknown: #95a5a6;

  /* Layout */
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

i[class*="fa-"]::before {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Bloquer le scroll du body quand le modal est ouvert (mobile) */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Background Animation */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(102, 126, 234, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(240, 147, 251, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(79, 172, 254, 0.1) 0%,
      transparent 40%
    );
  pointer-events: none;
  z-index: -1;
}

/* =========================================== 
   Loading Overlay
   =========================================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  margin-top: 20px;
  font-size: 1.1rem;
  color: var(--text-primary);
  animation: pulse 1.5s ease-in-out infinite;
  text-align: center;
  line-height: 1.6;
}

.loading-text i {
  color: var(--accent-blue);
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* =========================================== 
   Navbar
   =========================================== */
.navbar {
  background: rgba(15, 15, 26, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-container {
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.navbar-brand i {
  font-size: 1.8rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar-brand--banner {
  background: none;
  -webkit-text-fill-color: initial;
}

.navbar-brand-banner {
  display: block;
  width: min(280px, 18vw);
  min-width: 120px;
  height: auto;
}

.navbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* =========================================== 
   Buttons
   =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-purple);
}

/* Bouton de retour (page favoris) — texte sur une ligne, pas de rond */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  white-space: nowrap;
  padding: 8px 16px;
}

.btn-donate-nav {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 9px 18px;
  white-space: nowrap;
}

.btn-donate-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.45);
}

.btn-donate-nav.active {
  filter: saturate(1.1);
}
.btn-contact-nav {
  white-space: nowrap;
}

.btn-icon {
  padding: 10px;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  justify-content: center;
}

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

.btn-danger {
  background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-group {
  display: flex;
  gap: 8px;
}

/* =========================================== 
   Main Layout
   =========================================== */
.main-container {
  display: flex;
  flex: 1 0 auto;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 20px;
  gap: 24px;
}

/* ===========================================
   Donate Page
   =========================================== */
.donate-container {
  align-items: flex-start;
}

.donate-hero-card {
  padding: 22px;
}

.donate-hero-top {
  display: grid;
  gap: 12px;
}

.donate-hero-top h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  margin: 0;
  line-height: 1.12;
}

.donate-intro-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.donate-intro-lead {
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 1.03rem;
  margin: 0;
  max-width: 980px;
}

.donate-intro-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.donate-intro-points li {
  position: relative;
  color: var(--text-secondary);
  line-height: 1.38;
  font-size: 0.92rem;
  background: rgba(79, 172, 254, 0.08);
  border: 1px solid rgba(79, 172, 254, 0.2);
  border-radius: 12px;
  padding: 10px 12px 10px 32px;
}

.donate-intro-points li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4facfe;
  transform: translateY(-50%);
}

.donate-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, 0.4);
  background: rgba(249, 115, 22, 0.14);
  color: #ffb48a;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.donate-offer-highlight {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(79, 172, 254, 0.35);
  background: linear-gradient(135deg, rgba(79, 172, 254, 0.12) 0%, rgba(102, 126, 234, 0.12) 100%);
  display: flex;
  gap: 16px;
  align-items: center;
}

.donate-offer-highlight h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.donate-offer-highlight p {
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.donate-cta-row {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.donate-legal-note {
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.donate-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.donate-feature-card {
  min-height: 140px;
  padding: 16px;
}

.donate-feature-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 1.02rem;
}

.donate-feature-card h3 i {
  color: #4facfe;
}

.donate-feature-card p {
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* =========================================== 
   Sidebar
   =========================================== */
.sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 90px;
  height: fit-content;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 8px;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 3px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 20px;
  backdrop-filter: blur(10px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
}

.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i {
  font-size: 1rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.filters-help {
  position: static;
  display: inline-flex;
  align-items: center;
}

.filters-help-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(102, 126, 234, 0.45);
  background: rgba(102, 126, 234, 0.16);
  color: #c8d0ff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.filters-help-btn:hover,
.filters-help-btn:focus-visible {
  background: rgba(102, 126, 234, 0.28);
  border-color: rgba(102, 126, 234, 0.8);
  color: #ffffff;
  outline: none;
}

.filters-help-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  left: 12px;
  right: 12px;
  width: auto;
  max-width: none;
  background: rgba(10, 14, 30, 0.96);
  border: 1px solid rgba(102, 126, 234, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 0.78rem;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  overflow-wrap: anywhere;
  z-index: 30;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.filters-help-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 8px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: rgba(10, 14, 30, 0.96);
  border-left: 1px solid rgba(102, 126, 234, 0.35);
  border-top: 1px solid rgba(102, 126, 234, 0.35);
}

.filters-help:hover .filters-help-tooltip,
.filters-help:focus-within .filters-help-tooltip,
.filters-help-btn:active + .filters-help-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* =========================================== 
   Filters
   =========================================== */
.filter-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-actions .btn {
  flex: 1;
  min-width: 90px;
  justify-content: center;
  font-size: 0.75rem;
  padding: 8px 10px;
}

.filters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 40px;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(102, 126, 234, 0.2);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: var(--transition);
  cursor: pointer;
}

.filter-badge:hover {
  background: rgba(102, 126, 234, 0.3);
  border-color: var(--accent-purple);
}

.filter-badge.inactive {
  opacity: 0.5;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Variante inclusion (défaut) — bleu/violet */
.filter-badge--include {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.3);
}

.filter-badge--include:hover {
  background: rgba(102, 126, 234, 0.35);
  border-color: var(--accent-purple);
}

/* Variante exclusion — rouge/orange */
.filter-badge--exclude {
  background: rgba(255, 71, 87, 0.15);
  border-color: rgba(255, 71, 87, 0.35);
  color: #ff6b7a;
}

.filter-badge--exclude:hover {
  background: rgba(255, 71, 87, 0.28);
  border-color: #ff4757;
}

/* Bouton de bascule include/exclude */
.filter-type-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}

.filter-badge--include .filter-type-toggle {
  background: rgba(102, 126, 234, 0.4);
  color: #a5b4fc;
}

.filter-badge--exclude .filter-type-toggle {
  background: rgba(255, 71, 87, 0.35);
  color: #ff9ca5;
}

.filter-type-toggle:hover {
  transform: scale(1.2);
}

.filter-badge .remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 0.7rem;
  transition: var(--transition);
}

.filter-badge .remove-btn:hover {
  background: var(--severity-critical);
}

.filters-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: transparent;
  border: 1px dashed rgba(102, 126, 234, 0.35);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--accent-purple);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  opacity: 0.8;
}

.filters-toggle-btn:hover {
  background: rgba(102, 126, 234, 0.12);
  border-color: rgba(102, 126, 234, 0.6);
  opacity: 1;
}

.filters-toggle-btn i {
  font-size: 0.70rem;
}

.filter-input-group {
  display: flex;
  gap: 8px;
}

.filter-input-meta {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}

.filter-char-counter {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.filter-char-counter.warning {
  color: #ffa502;
}

.filter-char-counter.error {
  color: #ff4757;
  font-weight: 600;
}

.filter-input-group input,
.search-input-wrapper input,
.form-group input,
.page-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  transition: var(--transition);
}

.filter-input-group input,
.form-group input {
  padding: 12px 16px;
  font-size: 0.9rem;
}

.filter-input-group input {
  flex: 1;
}

.filter-input-group input:focus,
.search-input-wrapper input:focus,
.form-group input:focus,
.page-input:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.filter-input-group input.input-invalid,
.form-group input.input-invalid {
  border-color: #ff4757;
  box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.15);
}

#pref-new-filter-include.input-invalid,
#pref-new-filter-exclude.input-invalid,
#new-filter.input-invalid {
  border-color: #ff4757 !important;
  box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.15) !important;
}

.filter-input-group input::placeholder {
  color: var(--text-muted);
}

.filter-input-group .btn {
  padding: 12px 16px;
}

/* =========================================== 
   Stats
   =========================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  text-align: center;
}

.stat-card-full {
  grid-column: span 2;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-value.critical {
  background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-value.high {
  background: linear-gradient(135deg, #ff6b35 0%, #ffa502 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-value.medium {
  background: linear-gradient(135deg, #ffc107 0%, #ffdb58 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-value.low {
  background: linear-gradient(135deg, #2ed573 0%, #7bed9f 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-value.unknown {
  background: linear-gradient(135deg, #a4b0be 0%, #dfe4ea 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* =========================================== 
   Main Content
   =========================================== */
.content {
  flex: 1;
  min-width: 0;
}

/* =========================================== 
   Search & Filters Bar
   =========================================== */
.search-bar {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 20px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.search-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.search-input-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.search-input-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--accent-purple);
  background: rgba(102, 126, 234, 0.1);
}

.search-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.filter-selects {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.quick-filters-trigger-wrapper {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
}

.quick-filters-trigger {
  min-height: 46px;
  white-space: nowrap;
}

.select-wrapper {
  position: relative;
}

.select-wrapper select {
  appearance: none;
  padding: 14px 40px 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  min-width: 160px;
}

.select-wrapper select:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.select-wrapper::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.8rem;
}

.select-wrapper select option {
  background: var(--dark-bg);
  color: var(--text-primary);
}

/* Multi-Select Dropdowns */
.multi-select-wrapper {
  position: relative;
}

/* Backdrop pour bloquer les interactions en dessous */
.dropdown-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2147483646;
  display: none;
}

.dropdown-backdrop.active {
  display: block;
}

.multi-select-button {
  appearance: none;
  padding: 14px 40px 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.multi-select-wrapper {
  position: relative;
}

.multi-select-button:hover {
  border-color: var(--accent-purple);
  background: rgba(255, 255, 255, 0.08);
}

.multi-select-button:active {
  background: rgba(255, 255, 255, 0.12);
}

.multi-select-button i.fa-chevron-down {
  margin-left: auto;
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.multi-select-button.active i.fa-chevron-down {
  transform: rotate(180deg);
}

.multi-select-dropdown {
  position: fixed;
  min-width: 200px;
  background: rgba(20, 20, 30, 1);
  border: 2px solid var(--accent-purple);
  border-radius: var(--border-radius-sm);
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.8);
  z-index: 2147483647;
  padding: 8px;
  max-height: 300px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .multi-select-dropdown {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: 90vw;
    min-width: 280px;
    max-height: 60vh;
  }
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.multi-select-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

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

.multi-select-option .severity-badge {
  flex: 1;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
}

/* =========================================== 
   CVE Cards
   =========================================== */
.cve-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cve-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 24px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.cve-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--card-border);
}

.cve-card.severity-critical::before {
  background: var(--severity-critical);
}

.cve-card.severity-high::before {
  background: var(--severity-high);
}

.cve-card.severity-medium::before {
  background: var(--severity-medium);
}

.cve-card.severity-low::before {
  background: var(--severity-low);
}

.cve-card.severity-unknown::before {
  background: var(--severity-unknown);
}

.cve-card:hover {
  transform: translateY(-4px);
  border-color: rgba(102, 126, 234, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cve-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

/* Barre d'actions : lu/non lu, favori, sélection — sous le header */
.cve-card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  min-height: 26px;
  opacity: 0;
  transition: opacity 0.18s ease;
}

/* Afficher au survol */
.cve-card:hover .cve-card-actions {
  opacity: 1;
}

/* Toujours afficher si la carte est sélectionnée ou en favoris */
.cve-card.favorited .cve-card-actions,
.cve-card.selected .cve-card-actions {
  opacity: 1;
}

/* (gardé pour compatibilité d'autres éléments éventuels) */
.cve-header-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-delete-test {
  position: absolute;
  top: 55px;
  right: 12px;
  background: rgba(255, 71, 87, 0.2);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-delete-test:hover {
  background: rgba(255, 71, 87, 0.3);
  border-color: rgba(255, 71, 87, 0.5);
  transform: scale(1.05);
}

.btn-delete-test i {
  font-size: 0.9rem;
}

.cve-id {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-purple);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.severity-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.severity-critical {
  background: rgba(255, 71, 87, 0.2);
  color: var(--severity-critical);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.severity-high {
  background: rgba(255, 107, 53, 0.2);
  color: var(--severity-high);
  border: 1px solid rgba(255, 107, 53, 0.3);
}

.severity-medium {
  background: rgba(255, 165, 2, 0.2);
  color: var(--severity-medium);
  border: 1px solid rgba(255, 165, 2, 0.3);
}

.severity-low {
  background: rgba(46, 213, 115, 0.2);
  color: var(--severity-low);
  border: 1px solid rgba(46, 213, 115, 0.3);
}

.severity-unknown {
  background: rgba(149, 165, 166, 0.2);
  color: var(--severity-unknown);
  border: 1px solid rgba(149, 165, 166, 0.3);
}

/* Technology and Attack Badges Container */
.cve-badges-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.cve-technologies,
.cve-attacks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cve-technologies i,
.cve-attacks i {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-right: 4px;
}

.cve-technologies i {
  color: var(--accent-blue);
}

.cve-attacks i {
  color: #ff6b6b;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: linear-gradient(
    135deg,
    rgba(79, 172, 254, 0.15) 0%,
    rgba(0, 242, 254, 0.15) 100%
  );
  border: 1px solid rgba(79, 172, 254, 0.3);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-blue);
  letter-spacing: 0.3px;
}

.attack-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: linear-gradient(
    135deg,
    rgba(255, 107, 107, 0.15) 0%,
    rgba(255, 142, 83, 0.15) 100%
  );
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #ff6b6b;
  letter-spacing: 0.3px;
}

.cve-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.cve-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.cve-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
  flex-wrap: wrap;
  gap: 12px;
}

.cve-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cve-meta-item i {
  color: var(--accent-purple);
}

.cve-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}

.cve-link:hover {
  color: var(--accent-pink);
}

/* =========================================== 
   Empty State
   =========================================== */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
}

.empty-state i {
  font-size: 4rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

/* Ne pas affecter les icônes dans les boutons */
.empty-state .btn i {
  font-size: inherit;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: currentColor;
  margin-bottom: 0;
}

.empty-state h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.empty-state p {
  color: var(--text-muted);
}

/* =========================================== 
   Loading State
   =========================================== */
.loading-state {
  text-align: center;
  padding: 60px 40px;
}

.loading-state .spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loading-state p {
  color: var(--text-secondary);
}

/* =========================================== 
   Pagination
   =========================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 0;
  flex-wrap: wrap;
}

.pagination-dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, calc(100% - 34px));
  z-index: 1080;
  width: min(1120px, 96vw);
  background: rgba(10, 14, 32, 0.82);
  border: 1px solid var(--card-border);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.pagination-dock:hover,
.pagination-dock:focus-within {
  transform: translate(-50%, 0);
  box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.45);
}

.pagination-dock::after {
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 28px;
  background: transparent;
  pointer-events: auto;
}

.pagination-dock-peek {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 2px;
}

.pagination-dock-handle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 2px 14px 4px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  touch-action: manipulation;
}

.pagination-dock-peek-text {
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  opacity: 0.96;
  font-weight: 600;
  text-transform: uppercase;
}

.pagination-dock-peek-pill {
  width: 74px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(79, 172, 254, 0.9), rgba(240, 147, 251, 0.9));
  box-shadow: 0 0 10px rgba(79, 172, 254, 0.35);
}

.pagination-dock-content {
  padding: 8px 10px 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

/* CVE Count Display */
.cve-count {
  text-align: center;
  padding: 12px 24px;
  margin: 16px auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 400px;
  backdrop-filter: blur(10px);
}

.cve-count strong {
  color: #3f59b8;
  -webkit-text-fill-color: currentColor;
  font-weight: 700;
}

.pagination-btn {
  padding: 7px 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(102, 126, 234, 0.2);
  border-color: var(--accent-purple);
}

.pagination-btn.active {
  background: var(--primary-gradient);
  border-color: transparent;
}

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

.pagination-ellipsis {
  padding: 10px 8px;
  color: var(--text-muted);
  font-size: 1.2rem;
}

.pagination-info {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-left: 6px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
}

.pagination-goto {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  margin-left: 8px;
}

@media (min-width: 769px) {
  body.pagination-dock-visible .app-footer {
    padding-bottom: 74px;
  }
}

@media (max-width: 768px) {
  body.pagination-dock-visible {
    padding-bottom: 56px;
  }

  body.pagination-dock-visible.pagination-mobile-open {
    padding-bottom: 252px;
  }

  .pagination {
    gap: 3px;
  }

  .pagination-dock {
    width: 98vw;
    transform: translate(-50%, calc(100% - 20px));
  }

  .pagination-dock.mobile-open,
  .pagination-dock.mobile-open:hover,
  .pagination-dock.mobile-open:focus-within {
    transform: translate(-50%, 0);
  }

  .pagination-dock:not(.mobile-open) .pagination-dock-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .pagination-dock.mobile-open .pagination-dock-content {
    max-height: 220px;
    opacity: 1;
    pointer-events: auto;
  }

  .pagination-dock-peek {
    min-height: 48px;
    padding-top: 0;
  }

  .pagination-dock-handle {
    width: 100%;
    min-height: 48px;
    justify-content: flex-start;
    padding: 4px 12px 8px;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
  }

  .pagination-dock-peek-text {
    font-size: 0.76rem;
  }

  .pagination-dock::after {
    width: 100%;
    height: 28px;
  }

  .pagination-dock-content {
    padding: 7px 8px 9px;
    transition: max-height 0.2s ease, opacity 0.18s ease, padding 0.18s ease;
  }

  .pagination-btn {
    padding: 6px 8px;
    font-size: 0.78rem;
  }

  .pagination-info {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    order: -1;
  }

  .pagination-goto {
    width: auto;
    justify-content: center;
    margin-left: 0;
    margin-top: 0;
    flex-wrap: nowrap;
    row-gap: 0;
  }
}

.pagination-goto span {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.page-input {
  width: 52px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  text-align: center;
  font-size: 0.82rem;
}

.page-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  background: rgba(255, 255, 255, 0.08);
}

/* Scroll Buttons */
.scroll-btn {
  position: fixed;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--primary-gradient);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  transition: var(--transition);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.scroll-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.scroll-top {
  bottom: 100px;
}

.scroll-bottom {
  bottom: 30px;
}

/* =========================================== 
   Modal
   =========================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 26, 0.9);
  backdrop-filter: blur(8px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  overflow: hidden; /* Empêche le scroll */
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--dark-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  z-index: 2001;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Container ne scroll pas */
  -webkit-overflow-scrolling: touch; /* Smooth scroll sur iOS */
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: var(--primary-gradient);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch; /* Smooth scroll sur iOS */
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input {
  padding-right: 44px;
}

.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
}

.password-input-wrapper:hover .password-visibility-toggle,
.password-input-wrapper:focus-within .password-visibility-toggle {
  opacity: 1;
}

.password-visibility-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.password-visibility-toggle:focus-visible {
  opacity: 1;
  outline: 1px solid var(--accent-purple);
  outline-offset: 1px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.form-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-purple);
}

.account-security-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(79, 172, 254, 0.28);
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(79, 172, 254, 0.08) 0%,
    rgba(102, 126, 234, 0.08) 100%
  );
}

.account-security-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #a9d7ff;
  font-weight: 600;
}

.account-security-text {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.password-change-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.password-change-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.password-change-feedback {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid transparent;
}

.password-change-feedback.success {
  color: #69f0a7;
  background: rgba(46, 213, 115, 0.12);
  border-color: rgba(46, 213, 115, 0.35);
}

.password-change-feedback.error {
  color: #ff8f95;
  background: rgba(255, 71, 87, 0.12);
  border-color: rgba(255, 71, 87, 0.35);
}

/* Preferences section in modal */
.preferences-section {
  margin-top: 10px;
}

.connected-account-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.connected-account-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.connected-account-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.connected-account-nav-btn:hover {
  border-color: rgba(102, 126, 234, 0.55);
  color: var(--text-primary);
}

.connected-account-nav-btn.active {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.6);
  color: #dfe6ff;
}

.connected-account-pages {
  min-height: 220px;
}

.connected-account-identity {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(102, 126, 234, 0.28);
  border-radius: 10px;
  background: rgba(102, 126, 234, 0.1);
}

.connected-account-identity-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.connected-account-identity-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.connected-account-page[data-page="main"] .connected-account-logout-block {
  margin-top: 14px;
}

.connected-account-page {
  display: none;
  animation: accountPageIn 0.2s ease;
}

.connected-account-page.active {
  display: block;
}

@keyframes accountPageIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.severity-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px;
}

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

.severity-checkbox-label .severity-badge {
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
  transition: var(--transition);
}

.severity-checkbox-label input[type="checkbox"]:not(:checked) + .severity-badge {
  opacity: 0.4;
  filter: grayscale(0.8);
}

.pref-filter-badge {
  background: rgba(102, 126, 234, 0.2);
  color: var(--accent-purple);
  border: 1px solid rgba(102, 126, 234, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pref-filter-badge .remove-btn {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.pref-filter-badge .remove-btn:hover {
  opacity: 1;
  color: #ff4757;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--card-border);
}

/* Help Modal Styles */
.help-section {
  margin-bottom: 32px;
}

.help-section:last-child {
  margin-bottom: 0;
}

.help-section h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.help-section h3 i {
  color: var(--accent-blue);
  font-size: 1rem;
}

.help-section p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.help-section ul,
.help-section ol {
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 24px;
}

.help-section li {
  margin-bottom: 10px;
}

.help-section li strong {
  color: var(--text-primary);
}

.help-section li p {
  margin-top: 4px;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.help-note {
  background: rgba(79, 172, 254, 0.1);
  border-left: 3px solid var(--accent-blue);
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  margin-top: 16px;
  display: flex;
  gap: 12px;
  align-items: start;
}

.help-note i {
  color: var(--accent-blue);
  margin-top: 2px;
}

.help-note strong {
  color: var(--accent-blue);
}

/* Quick Filters Modal */
.quick-filters-modal-intro {
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.5;
}

.quick-filter-pack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-filter-pack-btn {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.quick-filter-pack-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent-purple);
}

.quick-filter-pack-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.35;
}

.quick-filter-pack-btn[data-pack="windows"] {
  background: rgba(0, 120, 215, 0.15);
  border-color: rgba(0, 120, 215, 0.45);
}

.quick-filter-pack-btn[data-pack="navigateurs"] {
  background: rgba(255, 107, 107, 0.15);
  border-color: rgba(255, 107, 107, 0.45);
}

.quick-filter-pack-btn[data-pack="serveurs"] {
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.45);
}

.quick-filter-pack-btn[data-pack="databases"] {
  background: rgba(86, 171, 47, 0.15);
  border-color: rgba(86, 171, 47, 0.45);
}

.quick-filter-pack-btn[data-pack="cloud"] {
  background: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.45);
}

.quick-filter-pack-btn[data-pack="dev"] {
  background: rgba(156, 39, 176, 0.15);
  border-color: rgba(156, 39, 176, 0.45);
}

/* =========================================== 
   Toast Notifications
   =========================================== */
.toast-container {
  position: fixed;
  bottom: 96px;
  left: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--dark-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.3s ease-out;
  min-width: 300px;
  pointer-events: auto;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes suckIn {
  0% {
    transform: translateX(0) translateY(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(-40px) translateY(30px) scale(0.8);
    opacity: 0.6;
  }
  100% {
    transform: translateX(-80px) translateY(60px) scale(0.1);
    opacity: 0;
  }
}

.toast.success,
.toast.error,
.toast.info {
  border-left-width: 4px;
  border-left-style: solid;
}

.toast.success {
  border-left-color: var(--severity-low);
}

.toast.error {
  border-left-color: var(--severity-critical);
}

.toast.info {
  border-left-color: var(--accent-blue);
}

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

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

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

.toast-message {
  flex: 1;
  font-size: 0.9rem;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

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

.toast.toast-progress {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  min-width: 360px;
  max-width: min(92vw, 560px);
  z-index: 3200;
}

.toast-progress-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.toast-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.toast-progress-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-blue), #22d3ee);
  transition: width 0.25s ease;
}

/* Notification Button */
.notification-btn {
  position: fixed;
  bottom: 24px;
  left: -32px;
  width: 56px;
  height: 56px;
  background: var(--accent-blue);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2999;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
}

/* Zone de détection étendue jusqu'au bord gauche */
.notification-btn::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100px;
  background: transparent;
}

.notification-btn.has-notifications {
  left: 24px;
}

.notification-btn:hover {
  left: 24px !important;
  background: var(--accent-blue-hover, #4a9eff);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.notification-btn:active {
  transform: scale(0.95);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Notification Panel */
.notification-panel {
  position: fixed;
  bottom: 96px;
  left: 24px;
  width: 400px;
  max-height: 500px;
  background: var(--dark-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  z-index: 2998;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 768px) {
  .notification-panel {
    left: 8px;
    right: 8px;
    width: auto;
    max-width: calc(100vw - 16px);
    bottom: 80px;
  }

  body.pagination-mobile-open .notification-btn {
    left: -32px !important;
    transform: none !important;
    pointer-events: none;
  }

  body.pagination-mobile-open .notification-panel {
    display: none !important;
  }
}

.notification-panel.show {
  display: flex;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.notification-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-panel-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
}

.notification-panel-actions {
  display: flex;
  gap: 8px;
}

.notification-panel-actions button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.85rem;
  transition: var(--transition);
}

.notification-panel-actions button:hover {
  color: var(--accent-blue);
}

.notification-panel-body {
  overflow-y: auto;
  max-height: 400px;
}

.notification-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.notification-item.unread {
  background: rgba(59, 130, 246, 0.05);
  border-left: 3px solid var(--accent-blue);
}

.notification-item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.notification-item-icon {
  font-size: 1.2rem;
  min-width: 24px;
}

.notification-item.success .notification-item-icon {
  color: var(--severity-low);
}

.notification-item.error .notification-item-icon {
  color: var(--severity-critical);
}

.notification-item.info .notification-item-icon {
  color: var(--accent-blue);
}

.notification-item-content {
  flex: 1;
}

.notification-item-message {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.notification-item-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.notification-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.notification-item-btn {
  background: var(--accent-blue);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.notification-item-btn:hover {
  background: var(--accent-blue-hover, #4a9eff);
}

.notification-item-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
  font-size: 0.9rem;
}

.notification-item-close:hover {
  color: var(--text-primary);
}

.notification-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =========================================== 
   Responsive
   =========================================== */
@media (max-width: 1200px) {
  .main-container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
    max-height: none;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar .card {
    flex: 1;
    min-width: 280px;
  }
}

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

  .navbar-container {
    flex-wrap: nowrap;
    gap: 12px;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .navbar-brand i {
    font-size: 1.4rem;
  }

  .navbar-brand--banner {
    flex: 1;
    min-width: 0;
  }

  .navbar-brand-banner {
    width: min(100%, 150px);
    min-width: 0;
  }

  .navbar-left {
    flex: 1;
    justify-content: flex-start;
    gap: 12px;
  }

  .filters-help-tooltip {
    font-size: 0.76rem;
  }

  .filters-help-tooltip::before {
    right: 12px;
  }

  .filters-help-btn {
    width: 24px;
    height: 24px;
  }

  .btn-donate-nav {
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  /* Modal responsive pour mobile */
  .modal {
    width: 95%;
    max-width: none;
    max-height: 90vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 20px;
    max-height: calc(90vh - 140px);
  }

  .connected-account-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .connected-account-nav-btn {
    flex: 0 0 auto;
  }

  .modal-footer {
    padding: 16px 20px;
  }

  /* Champ de code de vérification plus grand sur mobile */
  #verification-code-input {
    font-size: 28px !important;
    padding: 16px !important;
    letter-spacing: 6px !important;
  }

  /* Boutons plus faciles à cliquer sur mobile */
  .btn-primary {
    min-height: 48px;
    font-size: 1rem;
  }

  /* Formulaire responsive */
  .form-group input {
    font-size: 16px; /* Évite le zoom sur iOS */
    min-height: 48px;
  }

  .form-group label {
    font-size: 0.95rem;
  }

  .navbar-actions {
    width: auto;
    justify-content: flex-end;
    flex: 0;
  }

  .donate-offer-highlight {
    flex-direction: column;
    align-items: flex-start;
  }

  .donate-intro-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .donate-intro-points {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .donate-intro-points li {
    font-size: 0.85rem;
    padding: 7px 9px 7px 26px;
  }

  .donate-intro-points li::before {
    left: 10px;
    width: 7px;
    height: 7px;
  }

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

  .btn-icon {
    padding: 10px;
  }

  .btn-primary span {
    display: none;
  }

  #auth-btn {
    display: none !important;
  }

  .search-row {
    flex-direction: column;
  }

  .search-input-wrapper {
    min-width: 100%;
  }

  .filter-selects {
    width: 100%;
  }

  .quick-filters-trigger-wrapper {
    margin-left: 0;
    width: 100%;
  }

  .quick-filters-trigger {
    width: 100%;
    justify-content: center;
  }

  .quick-filter-pack-grid {
    grid-template-columns: 1fr;
  }

  .select-wrapper {
    flex: 1;
  }

  .select-wrapper select {
    width: 100%;
    min-width: auto;
  }

  .cve-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================== 
   Mobile très petits écrans (< 480px)
   =========================================== */
@media (max-width: 480px) {
  .modal {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    top: 0;
    left: 0;
    transform: translate(0, 0) scale(0.95);
  }

  .modal.active {
    transform: translate(0, 0) scale(1);
  }

  .modal-header {
    border-radius: 0;
  }

  .modal-body {
    max-height: calc(100vh - 140px);
    padding: 16px;
  }

  #verification-code-input {
    font-size: 24px !important;
    letter-spacing: 4px !important;
  }

  /* Préférences responsive */
  .preferences-section h4 {
    font-size: 1rem;
  }

  .severity-checkbox-label {
    font-size: 0.85rem;
  }

  .severity-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  .quick-filters-modal-intro {
    font-size: 0.9rem;
  }
}

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

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* =========================================== 
   No Filters Message
   =========================================== */
.no-filters-msg {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--border-radius-sm);
  border: 1px dashed var(--card-border);
}

/* =========================================== 
   Filter Pack Button Title
   =========================================== */
.pack-title {
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
}

/* =========================================== 
   Footer
   =========================================== */
.app-footer {
  margin-top: auto;
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
}

.app-footer p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.app-footer p:hover {
  color: var(--text);
  transition: color 0.3s ease;
}
.contact-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
}
.contact-footer-link:hover {
  border-color: rgba(102, 126, 234, 0.6);
  background: rgba(102, 126, 234, 0.12);
  color: var(--text-primary);
}

.app-footer .contact-footer-cta {
  margin-bottom: 18px;
}
.contact-page-container {
  align-items: flex-start;
}
.contact-card {
  width: 100%;
}
.contact-intro {
  margin-bottom: 18px;
  color: var(--text-secondary);
}

.contact-title-preview {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed var(--card-border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.contact-antispam-hint {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}
.contact-card textarea,
.contact-card select {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 12px;
  font-size: 0.95rem;
}
.contact-honeypot {
  position: absolute;
  left: -5000px;
  opacity: 0;
  pointer-events: none;
}
.contact-feedback {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  font-size: 0.92rem;
}
.contact-feedback.success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.45);
  color: #22c55e;
}
.contact-feedback.error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

/* Sources Status Scrolling */
.sources-status-label {
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.55;
  margin: 0 0 8px 0;
}

.sources-status-container {
  width: 100%;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 4px 0;
  /* Masque de fondu sur les bords pour un rendu professionnel */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.sources-status-track {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
}

.sources-status-content {
  display: flex;
  gap: 28px;
  white-space: nowrap;
  animation: scroll-left 60s linear infinite;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.source-status-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 12px 4px 10px;
  border: 1px solid rgba(102, 126, 234, 0.18);
  border-radius: 20px;
  background: rgba(102, 126, 234, 0.06);
  transition: border-color 0.2s ease, background 0.2s ease;
}

a.source-status-item {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.source-status-item:hover {
  border-color: rgba(102, 126, 234, 0.35);
  background: rgba(102, 126, 234, 0.10);
}

.source-status-item::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-purple);
  opacity: 0.7;
  flex-shrink: 0;
}

.source-status-item .source-name {
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.1px;
}

.source-status-item .source-status-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.source-status-item .source-status-link:hover {
  border-bottom-color: rgba(102, 126, 234, 0.45);
  opacity: 0.95;
}

.source-status-item .source-time {
  color: var(--text-muted);
  font-size: 11px;
  opacity: 0.70;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Pause l'animation au survol */
.sources-status-container:hover .sources-status-content {
  animation-play-state: paused;
}

/* Mobile: ajuster la durée et le comportement de l'animation */
@media (max-width: 768px) {
  .sources-status-content {
    animation: scroll-left 120s linear infinite;
  }
}

/* ===========================================
   Bandeau filtre digest email (?since=...)
   =========================================== */
.digest-banner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
  border: 1px solid rgba(102, 126, 234, 0.4);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text);
}

.digest-banner__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.digest-banner__text {
  display: flex;
  align-items: center;
  gap: 10px;
}

.digest-banner__text i {
  color: #667eea;
  font-size: 16px;
  flex-shrink: 0;
}

.digest-banner__text strong {
  color: #a78bfa;
}

.digest-banner__close {
  background: rgba(102, 126, 234, 0.2);
  border: 1px solid rgba(102, 126, 234, 0.4);
  border-radius: 6px;
  color: #a78bfa;
  font-size: 12px;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
  .contact-desktop-link {
    display: none;
  }
  transition: background 0.2s, color 0.2s;
}

.digest-banner__close:hover {
  background: rgba(102, 126, 234, 0.35);
  color: #ffffff;
}

.digest-banner__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(102, 126, 234, 0.2);
  font-size: 13px;
}

.digest-filter-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.digest-filter-sep {
  color: var(--text-muted);
  opacity: 0.4;
}

.digest-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.digest-badge--inc {
  background: rgba(79, 172, 254, 0.15);
  border: 1px solid rgba(79, 172, 254, 0.4);
  color: #4facfe;
}

.digest-badge--exc {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.35);
  color: #ff6b81;
}

.digest-badge--sev-critical {
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.4);
  color: #ff4757;
}

.digest-badge--sev-high {
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.4);
  color: #ff6b35;
}

.digest-badge--sev-medium {
  background: rgba(255, 165, 2, 0.15);
  border: 1px solid rgba(255, 165, 2, 0.4);
  color: #ffa502;
}

.digest-badge--sev-low {
  background: rgba(46, 213, 115, 0.15);
  border: 1px solid rgba(46, 213, 115, 0.4);
  color: #2ed573;
}

.digest-badge--sev-unknown {
  background: rgba(58, 58, 78, 0.5);
  border: 1px solid #3a3a4e;
  color: #888899;
}

.digest-badge--src {
  background: rgba(118, 75, 162, 0.15);
  border: 1px solid rgba(118, 75, 162, 0.4);
  color: #a78bfa;
}

/* ===========================================
   Read / Unread Status
   =========================================== */

/* Barre d'actions lecture */
.read-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 8px 12px;
  margin: 16px 0 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  backdrop-filter: blur(10px);
  overflow-x: auto;
  scrollbar-width: thin;
}

/* Compteur d'alertes non lues */
.unread-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent-purple);
  background: rgba(102, 126, 234, 0.12);
  border: 1px solid rgba(102, 126, 234, 0.25);
  border-radius: 20px;
  padding: 4px 10px;
  white-space: nowrap;
}

.read-toolbar-count {
  align-items: center;
  padding: 4px 10px;
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--card-border);
  border-radius: 16px;
  white-space: nowrap;
}

.unread-counter .fa-envelope {
  font-size: 0.85rem;
}

/* Badge "0 non lue" : toujours visible mais discret */
.unread-counter.all-read {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--card-border);
}

.unread-counter.all-read .fa-check-circle {
  color: #2ed573;
}

/* Groupe de boutons lecture */
.read-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  margin-left: auto;
}

.read-actions .btn {
  font-size: 0.76rem;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .read-toolbar {
    gap: 6px;
    padding: 7px 10px;
  }

  .unread-counter {
    font-size: 0.78rem;
    padding: 3px 8px;
  }

  .read-toolbar-count {
    font-size: 0.74rem;
    padding: 3px 8px;
  }

  .read-actions .btn {
    font-size: 0.72rem;
    padding: 4px 8px;
  }
}

/* Bouton filtre "Non lues uniquement" — accent violet */
#btn-show-unread {
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.4);
  color: #a5b4fc;
}

#btn-show-unread:hover {
  background: rgba(102, 126, 234, 0.28);
  border-color: var(--accent-purple);
  color: #c4b5fd;
}

#btn-show-unread.active {
  background: rgba(102, 126, 234, 0.35);
  border-color: var(--accent-purple);
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

/* Carte déjà lue : légèrement atténuée */
.cve-card.read {
  opacity: 0.52;
  filter: saturate(0.55) brightness(0.9);
  transition: opacity 0.25s ease, filter 0.25s ease, transform 0.25s ease,
    border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Au survol, la carte lue reprend une apparence normale */
.cve-card.read:hover {
  opacity: 1;
  filter: saturate(1) brightness(1);
}

/* Indicateur visuel "lu" dans le coin de la carte */
.cve-read-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.6;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cve-card:not(.read) .cve-read-badge {
  display: none;
}

/* Bouton "marquer lu/non lu" — dans .cve-card-actions */
.btn-read-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 3px 9px;
  border-radius: 20px;
  transition: background 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.btn-read-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* ============================================================
   SÉLECTION DE CARTES CVE
   ============================================================ */

/* Wrapper de case à cocher — dans .cve-card-actions */
.cve-checkbox-wrapper {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: pointer;
}

/* Masquer l'input natif */
.cve-checkbox-wrapper input.cve-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Case à cocher personnalisée */
.cve-checkbox-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--card-border, rgba(255,255,255,0.12));
  background: var(--card-bg, #1e2330);
  color: transparent;
  font-size: 11px;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.cve-checkbox-custom::after {
  content: "\f00c"; /* fa-check */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

/* État coché */
.cve-card.selected .cve-checkbox-custom {
  background: var(--accent-purple, #7c3aed);
  border-color: var(--accent-purple, #7c3aed);
  color: #fff;
}

/* Carte sélectionnée : mise en évidence */
.cve-card.selected {
  border-color: var(--accent-purple, #7c3aed) !important;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.35), 0 4px 16px rgba(124, 58, 237, 0.15);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-purple, #7c3aed) 8%, var(--card-bg, #1e2330)),
    var(--card-bg, #1e2330)
  );
}

/* ============================================================
   BARRE DE SÉLECTION FLOTTANTE (bas de l'écran)
   ============================================================ */

.selection-toolbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 40px));
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--sidebar-bg, #161b2a);
  border: 1px solid var(--accent-purple, #7c3aed);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 58, 237, 0.3);
  width: max-content;
  max-width: calc(100vw - 32px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .selection-toolbar {
    bottom: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
    width: calc(100vw - 24px);
    white-space: normal;
    border-radius: 12px;
  }
  .selection-toolbar-left {
    justify-content: center;
  }
  .selection-toolbar-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  /* Boutons plus grands pour le toucher */
  .selection-toolbar-actions .btn {
    padding: 11px 20px;
    font-size: 0.95rem;
    min-width: 56px;
    min-height: 44px;
    border-radius: 10px;
  }
  .selection-toolbar-actions .btn i {
    font-size: 1.1rem;
  }
  /* Masquer le texte des boutons, garder uniquement les icônes */
  .selection-toolbar-actions .btn-label {
    display: none;
  }
}

.selection-toolbar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.selection-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary, #e2e8f0);
  font-size: 0.92rem;
}

.selection-toolbar-left i {
  color: var(--accent-purple, #7c3aed);
  font-size: 1rem;
}

.selection-toolbar-left strong {
  color: var(--accent-purple, #7c3aed);
  font-size: 1.05rem;
}

.selection-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Bouton Exporter dans la barre de sélection */
.btn.btn-export {
  background: linear-gradient(135deg, var(--accent-purple, #7c3aed), #5b21b6);
  color: #fff;
  border: none;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn.btn-export:hover {
  background: linear-gradient(135deg, #6d28d9, #4c1d95);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.45);
}

/* ============================================================
   MODALE D'EXPORT
   ============================================================ */

#export-modal-backdrop {
  z-index: 1800;
  display: none;
}

#export-modal-backdrop.active {
  display: block;
}

#export-modal {
  z-index: 1900;
}

/* Options de format (radio cards) */
.export-format-options {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.export-format-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid var(--card-border, rgba(255,255,255,0.1));
  background: var(--card-bg, #1e2330);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  user-select: none;
}

.export-format-option:hover {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.07);
}

.export-format-option:has(input:checked) {
  border-color: var(--accent-purple, #7c3aed);
  background: rgba(124, 58, 237, 0.12);
}

.export-format-option input[type="radio"] {
  accent-color: var(--accent-purple, #7c3aed);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.export-format-icon {
  font-size: 1.3rem;
  color: var(--text-muted, #94a3b8);
  flex-shrink: 0;
}

.export-format-option:has(input:checked) .export-format-icon {
  color: var(--accent-purple, #7c3aed);
}

.export-format-option span:last-child {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--text-primary, #e2e8f0);
  font-weight: 500;
}

.export-format-option small {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 400;
}

/* Info sur la sélection dans la modale */
.export-selection-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0;
}

.export-selection-info i {
  color: var(--accent-purple, #7c3aed);
  flex-shrink: 0;
}

/* ============================================================
   BOUTON ÉTOILE (FAVORIS) — SUR LES CARTES CVE
   ============================================================ */

.btn-favorite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.15s ease, background 0.15s ease;
  padding: 0;
}

/* Couleur dorée quand favori actif */
.btn-favorite.active,
.cve-card.favorited .btn-favorite {
  color: #f59e0b;
}

.btn-favorite:hover {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  transform: scale(1.15);
}

.btn-favorite.active:hover {
  color: #fbbf24;
  transform: scale(1.15);
}

/* Animation d'ajout */
@keyframes starPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}

.btn-favorite.active {
  animation: starPop 0.25s ease;
}

/* Carte favorisée : légère teinte dorée */
.cve-card.favorited {
  border-color: rgba(245, 158, 11, 0.4) !important;
}

.cve-card.favorited::before {
  background: linear-gradient(to bottom, #f59e0b, rgba(245, 158, 11, 0.4));
}

/* ============================================================
   BOUTON FAVORIS DANS LA NAVBAR
   ============================================================ */

.btn-favorites-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  color: var(--text-secondary, #94a3b8);
  transition: color 0.18s ease, background 0.18s ease;
}

.btn-favorites-nav i {
  font-size: 0.9rem;
  color: #f59e0b;
}

.fav-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #f59e0b;
  color: #1a1a2e;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

/* ============================================================
   PAGE FAVORIS DÉDIÉE
   ============================================================ */

.favorites-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--card-border, rgba(255,255,255,0.08));
}

.favorites-page-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.favorites-page-title > i {
  font-size: 1.6rem;
  color: #f59e0b;
}

.favorites-page-title h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary, #e2e8f0);
  margin: 0;
}

.fav-page-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 13px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #f59e0b;
  font-size: 0.85rem;
  font-weight: 700;
}

.favorites-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Message de connexion requise */
.fav-login-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted, #94a3b8);
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--card-border, rgba(255,255,255,0.1));
  border-radius: 12px;
  margin-bottom: 24px;
}

.fav-login-notice i {
  font-size: 2.5rem;
  color: #f59e0b;
  opacity: 0.6;
}

.fav-login-notice p {
  font-size: 1rem;
  max-width: 360px;
  margin: 0;
}

/* Empty state spécifique à la page favoris */
.empty-state .empty-icon {
  font-size: 3rem;
  color: rgba(245, 158, 11, 0.3);
  margin-bottom: 16px;
}

/* ============================================================
   SUPPORT TACTILE — appareils sans hover (mobiles, tablettes)
   Les boutons cachés par opacity:0 jusqu'au hover desktop
   doivent être toujours visibles sur écran tactile.
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
  /* Sur mobile/tablette tactile uniquement — la barre d'actions est toujours visible */
  .cve-card-actions {
    opacity: 1;
  }
}

/* ===========================================
   Sélecteur de thème — cartes visuelles
   =========================================== */
.theme-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 4px 0;
}

.theme-card {
  cursor: pointer;
  border-radius: 12px;
  border: 2px solid var(--card-border);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  user-select: none;
}

.theme-card:hover {
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.28);
}

.theme-card.active {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18);
}

.theme-card-preview {
  height: 80px;
  position: relative;
  overflow: hidden;
}

.theme-card-preview-dark  { background: #0f0f1a; }
.theme-card-preview-light { background: #ebedf5; }

.theme-card-preview-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(102,126,234,.28) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(240,147,251,.22) 0%, transparent 60%);
}

.theme-card-preview-light::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(102,126,234,.11) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(240,147,251,.09) 0%, transparent 60%);
}

.theme-card-preview-inner {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
}

.theme-card-preview-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .07);
  margin-bottom: 6px;
}

.theme-card-preview-light .theme-card-preview-bar {
  background: rgba(102, 126, 234, .18);
}

.theme-card-preview-block {
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
}

.theme-card-preview-light .theme-card-preview-block {
  background: rgba(255, 255, 255, .88);
  border-color: rgba(102, 126, 234, .20);
}

.theme-card-label {
  padding: 12px 14px;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.theme-card-label-text {
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--text-primary);
}

.theme-card-label-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.theme-card-check {
  color: var(--accent-purple);
  font-size: 1.1rem;
}

/* ===========================================
   MODE CLAIR — body.light-mode
   =========================================== */
body.light-mode {
  --dark-bg: #ebedf5;
  --card-bg: rgba(255, 255, 255, 0.80);
  --card-border: rgba(102, 126, 234, 0.17);
  --text-primary: #1a1a2e;
  --text-secondary: rgba(26, 26, 46, 0.72);
  --text-muted: rgba(26, 26, 46, 0.48);
  background: var(--dark-bg);
  color: var(--text-primary);
}

/* Fond dégradé — même esprit, tons plus légers */
body.light-mode::before {
  background:
    radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(240, 147, 251, 0.09) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(79, 172, 254, 0.07) 0%, transparent 40%);
}

/* Navbar */
body.light-mode .navbar {
  background: rgba(235, 237, 247, 0.88);
  border-bottom-color: rgba(102, 126, 234, 0.14);
}

/* Cards & panneaux */
body.light-mode .card,
body.light-mode .search-bar,
body.light-mode .cve-count,
body.light-mode .empty-state {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(102, 126, 234, 0.13);
  box-shadow: 0 2px 12px rgba(102, 126, 234, 0.05);
}

body.light-mode .cve-count strong {
  color: #1f3f8a;
  -webkit-text-fill-color: currentColor;
}

body.light-mode .card-header {
  border-bottom-color: rgba(102, 126, 234, 0.11);
}

body.light-mode .filters-help-btn {
  background: rgba(102, 126, 234, 0.12);
  border-color: rgba(102, 126, 234, 0.25);
  color: #3d4680;
}

body.light-mode .filters-help-btn:hover,
body.light-mode .filters-help-btn:focus-visible {
  background: rgba(102, 126, 234, 0.22);
  border-color: rgba(102, 126, 234, 0.42);
  color: #1f2757;
}

body.light-mode .filters-help-tooltip {
  background: rgba(246, 248, 255, 0.98);
  border-color: rgba(102, 126, 234, 0.25);
  color: #1a1a2e;
  box-shadow: 0 10px 24px rgba(57, 70, 132, 0.15);
}

body.light-mode .filters-help-tooltip::before {
  background: rgba(246, 248, 255, 0.98);
  border-left-color: rgba(102, 126, 234, 0.25);
  border-top-color: rgba(102, 126, 234, 0.25);
}

/* CVE cards */
body.light-mode .cve-card {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(102, 126, 234, 0.13);
}

/* Teintes de sévérité sur les cards en mode clair */
body.light-mode .cve-card.severity-critical {
  background: rgba(255, 71, 87, 0.06);
  border-color: rgba(255, 71, 87, 0.18);
}

body.light-mode .cve-card.severity-high {
  background: rgba(255, 107, 53, 0.05);
  border-color: rgba(255, 107, 53, 0.16);
}

body.light-mode .cve-card.severity-medium {
  background: rgba(255, 165, 2, 0.05);
  border-color: rgba(255, 165, 2, 0.15);
}

body.light-mode .cve-card.severity-low {
  background: rgba(46, 213, 115, 0.05);
  border-color: rgba(46, 213, 115, 0.15);
}

body.light-mode .cve-card.severity-unknown {
  background: rgba(149, 165, 166, 0.05);
  border-color: rgba(149, 165, 166, 0.15);
}

body.light-mode .cve-card:hover {
  border-color: rgba(102, 126, 234, 0.40);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.11);
}

body.light-mode .cve-card::before {
  opacity: 1;
}

body.light-mode .cve-description {
  color: rgba(26, 26, 46, 0.70);
}

body.light-mode .cve-meta {
  border-top-color: rgba(102, 126, 234, 0.11);
}

body.light-mode .cve-meta-item {
  color: rgba(26, 26, 46, 0.58);
}

/* Stat cards */
body.light-mode .stat-card {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(102, 126, 234, 0.11);
}

/* Inputs, selects */
body.light-mode .filter-input-group input,
body.light-mode .search-input-wrapper input,
body.light-mode .form-group input,
body.light-mode .page-input {
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(102, 126, 234, 0.19);
  color: var(--text-primary);
}

body.light-mode .form-group input.input-invalid,
body.light-mode .filter-input-group input.input-invalid,
body.light-mode #pref-new-filter-include.input-invalid,
body.light-mode #pref-new-filter-exclude.input-invalid,
body.light-mode #new-filter.input-invalid {
  border-color: #ff4757 !important;
  box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.2) !important;
}

body.light-mode .search-input-wrapper input:focus {
  background: #ffffff;
  border-color: var(--accent-purple);
}

body.light-mode .filter-input-group input::placeholder,
body.light-mode .search-input-wrapper input::placeholder {
  color: rgba(26, 26, 46, 0.36);
}

body.light-mode .filter-char-counter {
  color: rgba(26, 26, 46, 0.55);
}

body.light-mode .select-wrapper select,
body.light-mode .multi-select-button {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(102, 126, 234, 0.17);
  color: var(--text-primary);
}

body.light-mode .multi-select-button:hover {
  background: rgba(102, 126, 234, 0.07);
  border-color: var(--accent-purple);
}

body.light-mode .select-wrapper select option {
  background: #f0f2fa;
  color: #1a1a2e;
}

body.light-mode .select-wrapper::after {
  color: rgba(26, 26, 46, 0.36);
}

/* Multi-select dropdown : fond sombre codé en dur → override */
body.light-mode .multi-select-dropdown {
  background: rgba(247, 248, 255, 0.99);
  border-color: var(--accent-purple);
  box-shadow: 0 12px 48px rgba(102, 126, 234, 0.16);
}

body.light-mode .multi-select-option:hover {
  background: rgba(102, 126, 234, 0.07);
}

/* Loading overlay : fond sombre codé en dur → override */
body.light-mode .loading-overlay {
  background: rgba(235, 237, 245, 0.92);
}

body.light-mode .loading-spinner {
  border-color: rgba(102, 126, 234, 0.14);
  border-top-color: var(--accent-purple);
}

body.light-mode .loading-state .spinner {
  border-color: rgba(26, 26, 46, 0.08);
  border-top-color: var(--accent-purple);
}

/* Backdrop dropdown */
body.light-mode .dropdown-backdrop {
  background: rgba(26, 26, 46, 0.18);
}

/* Modal backdrop : fond sombre codé en dur → override */
body.light-mode .modal-backdrop {
  background: rgba(80, 80, 130, 0.42);
}

/* Modal */
body.light-mode .modal {
  background: #f2f3fa;
  border-color: rgba(102, 126, 234, 0.17);
}

body.light-mode .modal-footer {
  border-top-color: rgba(102, 126, 234, 0.13);
}

/* Labels de fréquence (inline styles → !important) */
body.light-mode .notification-frequency-label {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: rgba(102, 126, 234, 0.15) !important;
}

/* Conserver la teinte rouge de l'option "Pas de notifications" en light mode */
body.light-mode .notification-frequency-label:has(input[value="none"]) {
  background: rgba(255, 71, 87, 0.05) !important;
  border-color: rgba(255, 71, 87, 0.22) !important;
}

/* Titres blancs codés en dur dans la modal (color:#ffffff inline) */
body.light-mode .modal [style*="color: #ffffff"],
body.light-mode .modal [style*="color:#ffffff"] {
  color: var(--text-primary) !important;
}

/* Titre de section label dans le modal (inline color:#ffffff) */
body.light-mode .modal .form-group > label,
body.light-mode .modal .form-group > label i {
  color: var(--text-primary) !important;
}

body.light-mode .password-visibility-toggle {
  color: rgba(26, 26, 46, 0.55);
}

body.light-mode .password-visibility-toggle:hover {
  color: #1a1a2e;
  background: rgba(0, 0, 0, 0.06);
}

/* Titres des options de fréquence (font-weight:600 inline) */
body.light-mode .notification-frequency-label > div > div:first-child {
  color: var(--text-primary) !important;
}

/* Libellés inline des time/day pickers */
body.light-mode #daily-time-picker label,
body.light-mode #weekly-day-picker label,
body.light-mode #monthly-day-picker label {
  color: var(--text-primary) !important;
}

/* Titre des packs de filtres (color:#ffffff CSS class) */
body.light-mode .pack-title {
  color: var(--text-primary) !important;
}

/* Day/time pickers (inline rgba(0,0,0,0.2) → override) */
body.light-mode #daily-time-picker,
body.light-mode #weekly-day-picker,
body.light-mode #monthly-day-picker {
  background: rgba(102, 126, 234, 0.05) !important;
}

body.light-mode #pref-notification-time,
body.light-mode #pref-notification-day-weekly,
body.light-mode #pref-notification-day-monthly {
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(102, 126, 234, 0.17);
  color: #1a1a2e;
}

/* Boutons secondaires */
body.light-mode .btn-secondary {
  background: rgba(255, 255, 255, 0.80);
  border-color: rgba(102, 126, 234, 0.17);
  color: #1a1a2e;
}

body.light-mode .btn-secondary:hover {
  background: rgba(102, 126, 234, 0.09);
  border-color: var(--accent-purple);
}

/* Filter badges */
body.light-mode .filter-badge,
body.light-mode .filter-badge--include {
  background: rgba(102, 126, 234, 0.10);
  border-color: rgba(102, 126, 234, 0.22);
  color: #2a2a4a;
}

body.light-mode .filter-badge--exclude {
  background: rgba(255, 71, 87, 0.08);
  border-color: rgba(255, 71, 87, 0.24);
  color: #c01525;
}

body.light-mode .filter-badge.inactive {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Pagination */
body.light-mode .pagination-btn {
  background: rgba(255, 255, 255, 0.80);
  border-color: rgba(102, 126, 234, 0.13);
  color: #1a1a2e;
}

body.light-mode .pagination-btn:hover:not(:disabled) {
  background: rgba(102, 126, 234, 0.09);
}

body.light-mode .pagination-info,
body.light-mode .pagination-goto {
  background: rgba(255, 255, 255, 0.80);
  border-color: rgba(102, 126, 234, 0.13);
  color: rgba(26, 26, 46, 0.65);
}

/* Toast */
body.light-mode .toast {
  background: #f2f3fa;
  border-color: rgba(102, 126, 234, 0.15);
  color: #1a1a2e;
}

body.light-mode .toast-message { color: #1a1a2e; }
body.light-mode .toast-close   { color: rgba(26, 26, 46, 0.42); }
body.light-mode .toast-close:hover { color: #1a1a2e; }

/* Scrollbars */
body.light-mode .sidebar::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.18);
}

/* Pref filter badges */
body.light-mode .pref-filter-badge {
  background: rgba(102, 126, 234, 0.09);
  border-color: rgba(102, 126, 234, 0.20);
}

/* Help modal */
body.light-mode .help-section p,
body.light-mode .help-section ul,
body.light-mode .help-section ol { color: rgba(26, 26, 46, 0.70); }
body.light-mode .help-section li p { color: rgba(26, 26, 46, 0.53); }
body.light-mode .help-section li strong { color: #1a1a2e; }
body.light-mode .help-note { background: rgba(79, 172, 254, 0.06); }

/* Unread counter */
body.light-mode .unread-counter {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(102, 126, 234, 0.17);
  color: #1a1a2e;
}

/* Notification panel */
body.light-mode .notification-panel {
  background: #f2f3fa;
  border-color: rgba(102, 126, 234, 0.15);
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.12);
}

body.light-mode .notification-panel-header {
  border-bottom-color: rgba(102, 126, 234, 0.12);
}

body.light-mode .notification-item {
  border-bottom-color: rgba(102, 126, 234, 0.08);
}

body.light-mode .notification-item:hover {
  background: rgba(102, 126, 234, 0.04);
}

/* Fav page */
body.light-mode .fav-login-notice {
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(102, 126, 234, 0.13);
  color: rgba(26, 26, 46, 0.52);
}

/* Zone dangereuse en light mode */
body.light-mode details > summary { color: rgba(200, 50, 50, 0.70) !important; }
body.light-mode .modal [style*="rgba(255,71,87,0.05)"] {
  background: rgba(255, 71, 87, 0.04) !important;
}

/* Delete test btn */
body.light-mode .btn-delete-test {
  background: rgba(255, 71, 87, 0.09);
  border-color: rgba(255, 71, 87, 0.20);
}

/* Read toggle */
body.light-mode .btn-read-toggle {
  color: rgba(26, 26, 46, 0.62);
}

body.light-mode .btn-read-toggle:hover {
  background: rgba(102, 126, 234, 0.09);
}

/* Sources status en mode light */
body.light-mode .source-status-item {
  border-color: rgba(102, 126, 234, 0.22);
  background: rgba(102, 126, 234, 0.05);
}

body.light-mode .source-status-item:hover {
  border-color: rgba(102, 126, 234, 0.40);
  background: rgba(102, 126, 234, 0.10);
}

body.light-mode .source-status-item .source-name {
  color: rgba(26, 26, 46, 0.65);
}

body.light-mode .source-status-item .source-status-link:hover {
  border-bottom-color: rgba(102, 126, 234, 0.55);
}

body.light-mode .source-status-item .source-time {
  color: rgba(26, 26, 46, 0.42);
}

/* ===========================================
   Details / <summary> — zone dangereuse
   =========================================== */
details > summary { outline: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] #danger-chevron { transform: rotate(90deg); }

/* ===========================================
   ONBOARDING OVERLAY
   =========================================== */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 30% 40%, rgba(102, 126, 234, 0.18) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 70%, rgba(118, 75, 162, 0.15) 0%, transparent 55%),
              rgba(10, 10, 24, 0.96);
  backdrop-filter: blur(6px);
  padding: 24px 16px 32px;
  animation: onboarding-fade-in 0.4s ease;
}

@keyframes onboarding-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Bouton fermer (×) */
.onboarding-close {
  position: absolute;
  top: 20px;
  right: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.onboarding-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Points de progression */
.onboarding-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}
.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.3s, transform 0.3s;
}
.onboarding-dot.active {
  background: #667eea;
  transform: scale(1.35);
}
.onboarding-dot.done {
  background: rgba(102, 126, 234, 0.45);
}

/* Carte principale */
.onboarding-card {
  width: 100%;
  max-width: 560px;
  min-height: 380px;
  display: flex;
  align-items: stretch;
}

/* Étape individuelle */
.onboarding-step {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: onboarding-step-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes onboarding-step-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Icône centrale */
.onboarding-icon-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.25), rgba(118, 75, 162, 0.25));
  border: 1px solid rgba(102, 126, 234, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #a78bfa;
  margin-bottom: 28px;
  flex-shrink: 0;
}
.onboarding-icon-welcome {
  width: 96px;
  height: 96px;
  font-size: 40px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.35), rgba(118, 75, 162, 0.35));
  border-color: rgba(102, 126, 234, 0.5);
  animation: onboarding-pulse 3s ease-in-out infinite;
}
.onboarding-icon-final {
  background: linear-gradient(135deg, rgba(250, 189, 47, 0.25), rgba(245, 130, 32, 0.20));
  border-color: rgba(250, 189, 47, 0.45);
  color: #fbbf24;
}
.onboarding-icon-glow {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.25) 0%, transparent 70%);
  animation: onboarding-glow-pulse 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes onboarding-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.3); }
  50%       { box-shadow: 0 0 0 14px rgba(102, 126, 234, 0); }
}
@keyframes onboarding-glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.08); }
}

/* Titre bienvenu */
.onboarding-welcome-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}
.onboarding-welcome-title span {
  background: linear-gradient(135deg, #667eea, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.onboarding-welcome-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 18px;
  line-height: 1.5;
}

/* Titre étapes normales */
.onboarding-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
  letter-spacing: -0.3px;
}

/* Description */
.onboarding-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.65;
  margin: 0 0 18px;
  max-width: 460px;
}

/* Liste des features */
.onboarding-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.onboarding-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
}
.onboarding-list li i {
  color: #667eea;
  font-size: 12px;
  margin-top: 3px;
  flex-shrink: 0;
  width: 14px;
}

/* Message final */
.onboarding-ready {
  margin-top: 22px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.18), rgba(118, 75, 162, 0.18));
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 20px;
  padding: 10px 24px;
}

/* Navigation (bas) */
.onboarding-nav {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.onboarding-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.55);
  padding: 10px 20px;
  border-radius: 22px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: border-color 0.2s, color 0.2s;
}
.onboarding-btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.onboarding-btn-next {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  color: #fff;
  padding: 11px 26px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.15s;
}
.onboarding-btn-next:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.onboarding-btn-skip {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.onboarding-btn-skip:hover { color: rgba(255, 255, 255, 0.65); }

/* Light mode adaptations */
body.light-mode .onboarding-overlay {
  background: radial-gradient(ellipse at 30% 40%, rgba(102, 126, 234, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 70%, rgba(118, 75, 162, 0.10) 0%, transparent 55%),
              rgba(240, 242, 255, 0.97);
}
body.light-mode .onboarding-close {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.45);
}
body.light-mode .onboarding-close:hover { background: rgba(0,0,0,0.1); color: #000; }
body.light-mode .onboarding-dot { background: rgba(0,0,0,0.15); }
body.light-mode .onboarding-dot.active { background: #667eea; }
body.light-mode .onboarding-dot.done { background: rgba(102, 126, 234, 0.4); }
body.light-mode .onboarding-welcome-title { color: #1a1a2e; }
body.light-mode .onboarding-title        { color: #1a1a2e; }
body.light-mode .onboarding-desc         { color: rgba(26, 26, 46, 0.65); }
body.light-mode .onboarding-list li      { color: rgba(26, 26, 46, 0.70); }
body.light-mode .onboarding-welcome-sub  { color: rgba(26, 26, 46, 0.55); }
body.light-mode .onboarding-ready        { color: rgba(26, 26, 46, 0.85); }
body.light-mode .onboarding-btn-ghost    { border-color: rgba(0,0,0,0.18); color: rgba(0,0,0,0.5); }
body.light-mode .onboarding-btn-ghost:hover { border-color: rgba(0,0,0,0.4); color: #000; }
body.light-mode .onboarding-btn-skip { color: rgba(0,0,0,0.3); }
body.light-mode .onboarding-btn-skip:hover { color: rgba(0,0,0,0.6); }


/* ============================================================
   CVSS GAUGE — barre numérique sur les cartes CVE
   ============================================================ */
.cvss-gauge-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 4px;
}
.cvss-gauge-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}
.cvss-gauge-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease, background 0.4s ease;
}
.cvss-score-label {
  font-size: 12px;
  font-weight: 700;
  min-width: 38px;
  text-align: right;
  letter-spacing: 0.02em;
  line-height: 1;
}
body.light-mode .cvss-gauge-track { background: rgba(0, 0, 0, 0.08); }
.cvss-auto-badge {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  padding: 2px 7px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
body.light-mode .cvss-auto-badge {
  color: rgba(26, 26, 46, 0.45);
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

/* ============================================================
   CVSS FILTER — slider dans la barre de filtres de la toolbar
   ============================================================ */
.cvss-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 280px;
  flex-wrap: wrap;
}
.cvss-filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.cvss-filter-label strong {
  color: #ffffff;
  min-width: 26px;
  display: inline-block;
}
.cvss-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 100px;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(to right, #667eea 0%, rgba(255,255,255,0.1) 0%);
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}
.cvss-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cvss-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
}
.cvss-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  cursor: pointer;
}
.cvss-unknown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.cvss-unknown-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #667eea;
}
body.light-mode .cvss-filter-wrapper {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-mode .cvss-filter-label { color: rgba(26, 26, 46, 0.6); }
body.light-mode .cvss-filter-label strong { color: #1a1a2e; }
body.light-mode .cvss-unknown-toggle { color: rgba(26, 26, 46, 0.6); }

/* ============================================================
   CVSS PREFERENCES BLOCK — slider dans le modal Mon compte
   ============================================================ */
.cvss-pref-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 8px;
}
.cvss-pref-value-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.cvss-pref-label-text {
  font-size: 13px;
  color: var(--text-secondary);
}
.cvss-label-value {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  min-width: 32px;
  line-height: 1;
}
.cvss-level-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
  border: 1px solid rgba(102, 126, 234, 0.3);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cvss-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 2px;
}

.cvss-pref-block .cvss-unknown-toggle {
  margin-top: 12px;
  align-items: flex-start;
  white-space: normal;
  gap: 8px;
  line-height: 1.35;
}

.cvss-pref-block .cvss-unknown-toggle span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cvss-pref-block .cvss-unknown-toggle input[type="checkbox"] {
  margin-top: 1px;
  flex-shrink: 0;
}

body.light-mode .cvss-pref-block {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-mode .cvss-label-value { color: #1a1a2e; }

/* ===========================================
   Restrictions de fonctionnalités par plan
   =========================================== */

/* Zones bloquées pour les utilisateurs "user" */
body.subscription-user .feature-restricted {
  position: relative;
  opacity: 0.6;
  pointer-events: none;
}

body.subscription-user .feature-restricted::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  border-radius: inherit;
  z-index: 1;
  cursor: not-allowed;
}

body.subscription-user .feature-restricted:hover::after {
  background: rgba(0, 0, 0, 0.5);
}

/* Tooltip au survol pour les zones bloquées */
body.subscription-user .feature-restricted-container {
  position: relative;
}

body.subscription-user .feature-restricted-container:hover .upgrade-tooltip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.upgrade-tooltip {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(102, 126, 234, 0.95);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.upgrade-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(102, 126, 234, 0.95);
}

/* Les éléments avec subscription-founder ne sont pas affectés */
body.subscription-founder .feature-restricted {
  opacity: 1;
  pointer-events: auto;
}

body.subscription-founder .feature-restricted::after {
  display: none;
}

/* Pour les founders: masquer le bouton "Activer l'upgrade" dans la navbar */
body.subscription-founder .btn-donate-nav {
  display: none !important;
}

/* Pour les founders: masquer la CTA de paiement sur la page donate */
body.subscription-founder .donate-cta-row {
  display: none;
}

/* Rainbow Banner Styles */
.rainbow-banner-wrapper {
  margin: 16px 0 24px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
  text-align: center;
}

.rainbow-banner-wrapper a {
  display: inline-block;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.rainbow-banner-wrapper a:hover {
  opacity: 0.9;
  transform: scale(1.01);
}

.rainbow-banner {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius-sm);
}

/* =========================================== 
   Hamburger Menu for Mobile
   =========================================== */

/* Hamburger Button - Hidden on desktop */
.hamburger-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

.hamburger-menu-btn span {
  width: 24px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-menu-btn:hover span {
  background: var(--primary);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1990;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 280px;
  background: rgba(15, 15, 26, 0.95);
  border-left: 1px solid var(--card-border);
  z-index: 1991;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  display: flex;
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--card-border);
  gap: 16px;
}

.mobile-menu-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mobile-menu-close {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mobile-menu-close:hover {
  color: var(--primary);
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  flex: 1;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(102, 126, 234, 0.08);
  color: var(--text-primary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-align: left;
  width: 100%;
}

.mobile-menu-item:hover {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary);
}

.mobile-menu-item i {
  font-size: 1.1rem;
  min-width: 24px;
  text-align: center;
}

.mobile-fav-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--accent-purple);
  color: white;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

/* Desktop: Hide hamburger and mobile menu */
@media (min-width: 769px) {
  .hamburger-menu-btn {
    display: none !important;
  }

  .mobile-menu-overlay,
  .mobile-menu {
    display: none !important;
  }

  .navbar-actions {
    flex-wrap: nowrap;
  }
}

/* Mobile: Show hamburger and hide some desktop elements */
@media (max-width: 768px) {
  .hamburger-menu-btn {
    display: flex;
  }

  .navbar-actions {
    width: auto;
  }

  /* Hide all action buttons on mobile */
  .btn-donate-nav,
  .btn-contact-nav,
  .navbar-actions .btn-secondary:not(.btn-donate-nav),
  .navbar-actions .btn-primary {
    display: none;
  }
}

/* Light mode adjustments */
body.light-mode .hamburger-menu-btn span {
  background: var(--text-secondary);
}

body.light-mode .hamburger-menu-btn:hover span {
  background: var(--primary);
}

body.light-mode .mobile-menu {
  background: rgba(245, 245, 250, 0.95);
}

body.light-mode .mobile-menu-item:hover {
  background: rgba(102, 126, 234, 0.15);
}
