:root[data-theme="dark"] {
  color-scheme: dark;
  --night: #080b12;
  --panel: #111722;
  --ink: #f6f4f0;
  --muted: #bec7d2;
  --line: #d9e3f01f;
  --red: #ff6657;
  --pink: #ff8f7a;
  --amber: #ffd18a;
}

:root[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] body { background: #080b12; color: #f6f4f0; }
html[data-theme="dark"] body::before { background: radial-gradient(ellipse at 74% 24%,#6b2d4261,transparent 36%),radial-gradient(ellipse at 10% 82%,#19283b88,transparent 39%),#080b12; }
html[data-theme="dark"] .top { background: #0c111bef; border-bottom-color: #d9e3f02b; }
html[data-theme="dark"] .nav a { color: #d5dbe4; }
html[data-theme="dark"] .nav a:hover { color: #fff; }
html[data-theme="dark"] .nav .submit { border-color: #ff806d; color: #ffb09f; }
html[data-theme="dark"] .nav .submit:hover { background: #e6564b; color: #fff; }
html[data-theme="dark"] .hero::before { background: linear-gradient(90deg,#080b12f7 0%,#080b12dd 43%,#080b1222 78%),linear-gradient(0deg,#080b12 0%,transparent 40%,#080b1248 100%); }
html[data-theme="dark"] h1 { color: #f6f4f0; }
html[data-theme="dark"] h1 em { color: #ff8572; text-shadow: 0 0 30px #ff67574a; }
html[data-theme="dark"] .eyebrow,.stage-caption,.stage-index { color: #ffab93; }
html[data-theme="dark"] .lead,html[data-theme="dark"] .catalog-head p,html[data-theme="dark"] .method p,html[data-theme="dark"] .summary,html[data-theme="dark"] .discovery-head p,html[data-theme="dark"] .discovery-status,html[data-theme="dark"] .discovery-note,html[data-theme="dark"] .results-meta,html[data-theme="dark"] .difficulty,html[data-theme="dark"] .platforms,html[data-theme="dark"] .domain-note,html[data-theme="dark"] .search-note { color: #c5ceda; }
html[data-theme="dark"] .quick small { color: #b9c3d0; }
html[data-theme="dark"] .quick button { color: #e4e8ee; border-color: #c5d0dd66; }
html[data-theme="dark"] .searchbox input,html[data-theme="dark"] .sort,html[data-theme="dark"] .discovery-filter select { background: #131b28; color: #f5f7fa; border-color: #8492a766; }
html[data-theme="dark"] .searchbox input::placeholder { color: #aab5c4; }
html[data-theme="dark"] .catalog-head h2,html[data-theme="dark"] .discovery-head h3,html[data-theme="dark"] .project-row h3,html[data-theme="dark"] .discovery-card-title { color: #f5f3ef; }
html[data-theme="dark"] .catalog-head { border-color: #dce6f033; }
html[data-theme="dark"] .catalog-head .section-kicker,html[data-theme="dark"] .section-kicker { color: #ff9c88; }
html[data-theme="dark"] .project-list,html[data-theme="dark"] .project-row { border-color: #dce6f027; }
html[data-theme="dark"] .project-row { background: linear-gradient(145deg,#17202c 10%,#121a25 70%,#101620); box-shadow: 0 12px 30px #0006; }
html[data-theme="dark"] .project-row:hover,html[data-theme="dark"] .project-row:focus-within { background: linear-gradient(145deg,#1c2937 10%,#141d29 75%); border-color: #ff806d9c; box-shadow: 0 18px 38px #0009; }
html[data-theme="dark"] .project-row::before { background: linear-gradient(90deg,var(--icon-color),#ff705f 62%,#f2bd83); }
html[data-theme="dark"] .row-kicker { background: #ff8b7419; color: #ffad98; }
html[data-theme="dark"] .project-icon { box-shadow: inset 0 0 0 1px #ffffff18; }
html[data-theme="dark"] .replaces { color: #c3cbd5; }
html[data-theme="dark"] .replaces b { background: #202b39; color: #f2f4f5; }
html[data-theme="dark"] .row-stats { border-color: #dce6f02b; color: #d8e0e9; }
html[data-theme="dark"] .stars { color: #ffd18a; }
html[data-theme="dark"] .difficulty.easy { color: #a9e5c4; }
html[data-theme="dark"] .difficulty.medium { color: #ffd18a; }
html[data-theme="dark"] .difficulty.technical { color: #ff9a8b; }
html[data-theme="dark"] .difficulty.unknown,html[data-theme="dark"] .platforms { color: #c8d1dc; }
html[data-theme="dark"] .link { color: #e1e6eb; }
html[data-theme="dark"] .link.primary { color: #ffab94; }
html[data-theme="dark"] .details-toggle { background: #273d37; color: #effff6; border-color: #668d7f; }
html[data-theme="dark"] .details-toggle:hover,html[data-theme="dark"] .details-toggle:focus-visible { background: #34574b; border-color: #9bd0ba; }
html[data-theme="dark"] .domain-section,html[data-theme="dark"] .discovery-feed { border-color: #dce6f02c; }
html[data-theme="dark"] .domain-button { border-color: #93a1b33d; background: linear-gradient(145deg,#172230,#111923); color: #eef2f6; box-shadow: 0 5px 16px #0004; }
html[data-theme="dark"] .domain-copy strong { color: #f3f4f4; }
html[data-theme="dark"] .domain-copy small { color: #c1cbd7; }
html[data-theme="dark"] .domain-icon { background: #33232b; color: #ffae9c; }
html[data-theme="dark"] .domain-button:hover,html[data-theme="dark"] .domain-button:focus-visible,html[data-theme="dark"] .domain-button.selected { background: linear-gradient(145deg,#29313b,#1d2631); border-color: #ff907c; box-shadow: 0 8px 22px #0006; }
html[data-theme="dark"] .domain-button.selected::after { color: #ffb5a0; }
html[data-theme="dark"] .domain-total { color: #d2dbe5; }
html[data-theme="dark"] .discovery-card { border-color: #dce6f039; background: linear-gradient(145deg,#1a2431,#131c28 75%); box-shadow: 0 8px 24px #0005; }
html[data-theme="dark"] .discovery-card-label { color: #ffab95; }
html[data-theme="dark"] .discovery-card-summary { color: #d0d8e2; }
html[data-theme="dark"] .discovery-card-meta { color: #e2c79d; }
html[data-theme="dark"] .discovery-card-meta a { color: #ffb09a; }
html[data-theme="dark"] .discovery-carousel-controls button { background: #182230; color: #f2f4f6; border-color: #9eacba88; }
html[data-theme="dark"] .discovery-carousel-controls #discovery-pause { background: #355246; color: #fff; border-color: #78a28f; }
html[data-theme="dark"] .discovery-carousel-controls #discovery-pause:hover { background: #426a59; }
html[data-theme="dark"] .discovery-empty { border-color: #8c9bab; color: #d0d8e2; }
html[data-theme="dark"] .method h3 { color: #f4eee9; }
html[data-theme="dark"] .footer { border-color: #dce6f02d; color: #c0cad5; }
html[data-theme="dark"] .footer a:hover { color: #fff; }
html[data-theme="dark"] .project-details { border-color: #8493a44f; background: linear-gradient(135deg,#182230,#101720); }
html[data-theme="dark"] .project-details p,html[data-theme="dark"] .project-details ul { color: #d6dee7; }
html[data-theme="dark"] .detail-label { color: #ffab95; }
html[data-theme="dark"] .paid-comparison { background: #2a2029; }
html[data-theme="dark"] .paid-comparison h4 { color: #fff1e9; }
html[data-theme="dark"] .paid-comparison .comparison-gap { color: #d2c6c9; }
html[data-theme="dark"] .drawer-comparison { background: linear-gradient(140deg,#34252c,#20232c 75%); }
html[data-theme="dark"] .drawer-comparison h3 { color: #fff2e9; }
html[data-theme="dark"] .drawer-comparison .comparison-gap { color: #d1d9e1; }
html[data-theme="dark"] .drawer-panel { background: linear-gradient(155deg,#151e2a,#101720 62%); box-shadow: -28px 0 80px #0009; }
html[data-theme="dark"] .drawer-header { border-color: #dce6f02b; background: #101722ed; }
html[data-theme="dark"] .drawer-header h2 { color: #f5f4f1; }
html[data-theme="dark"] .drawer-kicker,html[data-theme="dark"] .drawer-source-link { color: #ffab96; }
html[data-theme="dark"] .drawer-content { color: #e1e6eb; }
html[data-theme="dark"] .drawer-section { border-color: #dce6f02d; background: #182230; }
html[data-theme="dark"] .drawer-section h3 { color: #f4f4f1; }
html[data-theme="dark"] .drawer-section p,html[data-theme="dark"] .drawer-section ul,html[data-theme="dark"] .drawer-comparison .comparison-gap { color: #d0d9e3; }
html[data-theme="dark"] .drawer-close { color: #f2f4f6; border-color: #a9b5c388; background: #182230; }
html[data-theme="dark"] .empty { border-color: #8392a1; background: #172230; color: #d1d9e2; }
html[data-theme="dark"] .empty b { color: #f4f2ee; }
html[data-theme="dark"] .search-submit { border-color: #ff8574; background: linear-gradient(130deg,#f36654,#bf3d4c); color: #fff; }
html[data-theme="dark"] .domain-heading h2 { color: #f5f4f0; }
html[data-theme="dark"] .domain-heading p { color: #c6d0dc; }

.brand-mark { display: block; width: 46px; height: 46px; flex: none; border-radius: 14px; box-shadow: 0 6px 22px #0004; }
.theme-toggle { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid #81777a77; border-radius: 10px; background: #fff; color: #6d5143; cursor: pointer; transition: background .18s,border-color .18s,transform .18s; }
.theme-toggle:hover { transform: translateY(-1px); background: #f2e9e4; border-color: #a3483d; }
.theme-toggle:focus-visible { outline: 3px solid #e26d5c; outline-offset: 3px; }
.theme-toggle svg { display: block; width: 19px; height: 19px; }
html[data-theme="dark"] .theme-toggle { color: #f8d89f; border-color: #8796a777; background: #172230; }
html[data-theme="dark"] .theme-toggle:hover { background: #263446; border-color: #ffbd8f; }
html[data-theme="light"] .brand-mark { box-shadow: 0 5px 18px #29191b20; }
@media(max-width:680px) { .theme-toggle { width: 44px; height: 44px; } .brand-mark { width: 42px; height: 42px; } .nav { gap: 9px; } }
@media(prefers-reduced-motion:reduce) { .theme-toggle { transition: none; } }

/* Repères de recherche et filtres : lisibles dans les deux thèmes et utilisables au clavier. */
.search-examples{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px;color:#51464b;font-size:12px}
.search-examples button{min-height:44px;padding:8px 11px;border:1px solid #75666b55;border-radius:999px;background:#fff;color:#40353a;font:650 12px/1.25 var(--sans);cursor:pointer}
.search-examples button:hover{border-color:#b7483e;background:#fff1ed;color:#8d302c}
.catalog-filters{display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin:0 0 16px;padding:14px;border:1px solid #56474d30;border-radius:10px;background:#fff8}
.catalog-filters label{display:grid;gap:5px;color:#51464b;font-size:11px;font-weight:700}
.catalog-filters select{min-height:44px;min-width:160px;padding:7px 30px 7px 10px;border:1px solid #75666b66;border-radius:6px;background:#fff;color:#30272c;font:600 12px var(--sans)}
.catalog-filters .filter-check{display:flex;align-items:center;min-height:44px;padding:0 4px;gap:8px}
.filter-check input{width:20px;height:20px;accent-color:#a83d35}
#clear-filters{min-height:42px;padding:8px 12px;border:1px solid #75666b66;border-radius:6px;background:#fff;color:#51464b;font:700 11px var(--sans);cursor:pointer}
.maintenance,.license{display:inline-flex;align-items:center;width:fit-content;max-width:100%;padding:4px 8px;border:1px solid #72656a44;border-radius:5px;background:#f5f0ed;color:#51464b;font-size:10px;line-height:1.4}
.maintenance.archived{border-color:#9f3b3655;background:#fbe8e4;color:#872b27;font-weight:750}
.source-note{font-size:11px!important;color:#6b6064!important}
:where(a,button,input,select,[tabindex]):focus-visible{outline:2px solid #587483!important;outline-offset:2px!important}
html[data-theme="dark"] :where(a,button,input,select,[tabindex]):focus-visible{outline-color:#a8c4d2!important}
html[data-theme="dark"] .search-examples{color:#d6dce5}
html[data-theme="dark"] .search-examples button{border-color:#9ba8b777;background:#182230;color:#edf1f5}
html[data-theme="dark"] .search-examples button:hover{border-color:#ff9b87;background:#29222a;color:#fff1e9}
html[data-theme="dark"] .catalog-filters{border-color:#c5d0dc44;background:#121b27}
html[data-theme="dark"] .catalog-filters label{color:#d5dce5}
html[data-theme="dark"] .catalog-filters select,html[data-theme="dark"] #clear-filters{border-color:#a1adbb99;background:#1a2532;color:#f1f4f7}
html[data-theme="dark"] .catalog-filters .filter-check input{accent-color:#ff8c78}
html[data-theme="dark"] .maintenance,html[data-theme="dark"] .license{border-color:#a9b6c166;background:#1c2936;color:#dce4ec}
html[data-theme="dark"] .maintenance.archived{border-color:#ff998c;background:#45252b;color:#ffe5df}
html[data-theme="dark"] .source-note{color:#c4ced9!important}
@media(max-width:680px){.search-examples{gap:6px;font-size:11px}.search-examples button{min-height:44px;font-size:11px}.catalog-filters{display:grid;grid-template-columns:1fr 1fr;align-items:stretch;padding:11px;gap:9px}.catalog-filters label{min-width:0}.catalog-filters select{width:100%;min-width:0;min-height:44px}.catalog-filters .filter-check{grid-column:1/-1;justify-content:flex-start;min-height:44px}.catalog-filters #clear-filters{grid-column:1/-1;width:100%;min-height:44px}.maintenance{font-size:10px}}
@media(max-width:360px){.catalog-filters{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.search-examples button{transition:none!important}}
