/* ── Theme toggle button ─────────────────────────────────────── */
.theme-toggle-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 1rem; transition: all var(--t-fast); flex-shrink: 0;
}
.theme-toggle-btn:hover { background: var(--surface-3); border-color: var(--border-hover); }
.theme-icon-light { display: none; }
html.theme-light .theme-icon-dark { display: none; }
html.theme-light .theme-icon-light { display: inline; }

/* ── Light theme (soft, warm, not bright) ────────────────────── */
html.theme-light {
  --bg: #f1efe9; --bg-alt: #ebe8e0;
  --surface: #faf9f6; --surface-2: #efede6; --surface-3: #e4e1d7;
  --border: rgba(40,35,25,0.12); --border-hover: rgba(37,99,235,0.4);
  --text: #26231e; --text-muted: #5a554b; --text-dim: #8c867a;
  --accent: #2563eb; --accent-hover: #1d4ed8; --accent-light: #1d4ed8;
  --accent-glow: rgba(37,99,235,0.10);
  --france-bg: rgba(0,35,149,0.09); --eu: #166534; --eu-bg: rgba(22,101,52,0.10);
  --gdpr-bg: rgba(109,40,217,0.09); --sill: #92400e; --sill-bg: rgba(146,64,14,0.10);
  --sponsor-bg: rgba(146,64,14,0.08);
  --shadow-sm: 0 1px 4px rgba(60,50,30,0.10);
  --shadow-md: 0 4px 20px rgba(60,50,30,0.12);
  --shadow-lg: 0 8px 32px rgba(60,50,30,0.16);
  --shadow-accent: 0 6px 22px rgba(37,99,235,0.16), 0 0 0 1px rgba(37,99,235,0.25);
  color-scheme: light;
}
html.theme-light .site-header { background: rgba(241,239,233,0.92); }
html.theme-light .hero::before {
  background-image:
    linear-gradient(rgba(40,35,25,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40,35,25,0.04) 1px, transparent 1px);
}
html.theme-light .card-features .feat-check { color: #15803d; }
html.theme-light .card-btn-detail:hover { color: #1e40af; }
html.theme-light .software-card { box-shadow: 0 1px 3px rgba(60,50,30,0.08); }
html.theme-light .software-card:hover { box-shadow: var(--shadow-accent); }

/* ── Light theme: colour revision (dark-mode pastels → readable tones) ── */
html.theme-light {
  --text-dim: #7a7468;                 /* was too faint (3.4:1) → ~4.6:1 */
  --success: #15803d;
  --warning: #b45309;
  --danger:  #dc2626;
}
html.theme-light ::selection { background: rgba(37,99,235,.18); }
html.theme-light ::placeholder { color: var(--text-dim); opacity: 1; }

/* Sovereignty badges: deep tones instead of neon pastels */
html.theme-light .badge-france { color: #1e3a8a; background: rgba(30,58,138,.09);  border-color: rgba(30,58,138,.28); }
html.theme-light .badge-eu     { color: #166534; background: rgba(22,101,52,.09);  border-color: rgba(22,101,52,.28); }
html.theme-light .badge-gdpr   { color: #6d28d9; background: rgba(109,40,217,.08); border-color: rgba(109,40,217,.26); }
html.theme-light .card-sill-tag,
html.theme-light .badge[style*="sill"] { color: #92400e; }

/* Green check marks */
html.theme-light .card-features .feat-check { color: #15803d; }
html.theme-light .feature-check { background: rgba(21,128,61,.12); color: #15803d; }
html.theme-light .compliance-item.ok .ci-value { color: #15803d; }

/* Links + soft accents (links already use --accent-light, which is dark blue here) */
html.theme-light .nav-link { color: var(--text-muted); }
html.theme-light .nav-link:hover, html.theme-light .nav-link.active { color: #1d4ed8; background: var(--surface-2); }
html.theme-light .nav-cta { color: #fff !important; }
html.theme-light .btn-primary, html.theme-light .empty-reset-btn { color: #fff; }
html.theme-light .alt-chip { background: var(--surface-3); color: var(--text); }
html.theme-light .card-license { background: var(--surface-3); color: var(--text-muted); }
html.theme-light .cat-pill { background: var(--surface); color: var(--text-muted); border-color: var(--border); }
html.theme-light .cat-pill:hover { background: var(--surface-2); color: var(--text); }
html.theme-light .cat-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Sponsored / featured: softer amber */
html.theme-light .sponsor-card, html.theme-light .prest-card.featured {
  background: linear-gradient(135deg, rgba(180,83,9,.07) 0%, var(--surface) 60%);
}

/* Inputs, drawer, overlays */
html.theme-light input[type="search"], html.theme-light input[type="text"],
html.theme-light input[type="email"], html.theme-light textarea, html.theme-light select {
  background: var(--surface); color: var(--text);
}
html.theme-light .filter-backdrop { background: rgba(38,35,30,.40); }
html.theme-light .filter-drawer { background: var(--surface); }
html.theme-light .notice.info { background: rgba(37,99,235,.06); border-color: rgba(37,99,235,.22); }
html.theme-light .site-footer { background: var(--bg-alt); }
html.theme-light .footer-links a:hover, html.theme-light .footer-legal a:hover { color: var(--text); }
