/* ==========================================================================
   HellPC — feuille de style principale
   Identité informatique & rétro 8 bits, contraste élevé, thèmes clair / sombre,
   coins aux arrondis subtils, sans dépendance externe ni cookie.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Polices locales (SIL OFL 1.1, hébergées localement)
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Galmuri11";
  src: url("../fonts/Galmuri11-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Departure Mono";
  src: url("../fonts/DepartureMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   1. Variables et thèmes
   -------------------------------------------------------------------------- */

:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Galmuri11", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-pixel: "Departure Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --bg: #f4f1ea;
  --bg-alt: #e7e2d6;
  --surface: #ffffff;
  --surface-2: #efece3;
  --text: #141923;
  --muted: #3a4354;
  --border: #b8b0a0;
  --border-strong: #8e8677;
  --accent: #b83b14;
  --accent-strong: #8f2909;
  --accent-soft: #fce9df;
  --accent-border: #dfa084;
  --on-accent: #ffffff;
  --secondary: #134b8a;
  --secondary-strong: #0d3869;
  --secondary-soft: #e3eef9;
  --secondary-border: #8fb4de;
  --crt: #0e6b36;
  --crt-soft: #dbf5e5;
  --link: #0d4782;
  --focus: #0d4782;
  --ring: rgba(13, 71, 130, 0.35);
  --head-glow-left: rgba(235, 118, 62, 0.22);
  --head-glow-right: rgba(34, 108, 188, 0.18);
  --grid-dot: rgba(20, 25, 35, 0.11);
  --warn-bg: #fff3d6;
  --warn-border: #b87514;
  --warn-text: #663800;
  --shadow: 0 2px 0 rgba(20, 25, 35, 0.1), 0 8px 20px rgba(20, 25, 35, 0.08);
  --bevel: 0 2px 0 rgba(20, 25, 35, 0.1);
  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0f141d;
  --bg-alt: #151c28;
  --surface: #1a2230;
  --surface-2: #222c3e;
  --text: #f3f6fa;
  --muted: #c7d0de;
  --border: #3a465e;
  --border-strong: #536382;
  --accent: #ff8547;
  --accent-strong: #ffb067;
  --accent-soft: #382118;
  --accent-border: #9a4a24;
  --on-accent: #140b06;
  --secondary: #70bcff;
  --secondary-strong: #9ed2ff;
  --secondary-soft: #172b42;
  --secondary-border: #346394;
  --crt: #52f792;
  --crt-soft: #11351f;
  --link: #7ec6ff;
  --focus: #ffd166;
  --ring: rgba(255, 209, 102, 0.45);
  --head-glow-left: rgba(255, 120, 52, 0.24);
  --head-glow-right: rgba(66, 158, 255, 0.2);
  --grid-dot: rgba(199, 208, 222, 0.11);
  --warn-bg: #36260c;
  --warn-border: #d99b38;
  --warn-text: #ffe0a3;
  --shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 12px 26px rgba(0, 0, 0, 0.35);
  --bevel: 0 2px 0 rgba(0, 0, 0, 0.38);
  color-scheme: dark;
}

/* Sans JavaScript, on suit la préférence du système. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0f141d;
    --bg-alt: #151c28;
    --surface: #1a2230;
    --surface-2: #222c3e;
    --text: #f3f6fa;
    --muted: #c7d0de;
    --border: #3a465e;
    --border-strong: #536382;
    --accent: #ff8547;
    --accent-strong: #ffb067;
    --accent-soft: #382118;
    --accent-border: #9a4a24;
    --on-accent: #140b06;
    --secondary: #70bcff;
    --secondary-strong: #9ed2ff;
    --secondary-soft: #172b42;
    --secondary-border: #346394;
    --crt: #52f792;
    --crt-soft: #11351f;
    --link: #7ec6ff;
    --focus: #ffd166;
    --ring: rgba(255, 209, 102, 0.45);
    --head-glow-left: rgba(255, 120, 52, 0.24);
    --head-glow-right: rgba(66, 158, 255, 0.2);
    --grid-dot: rgba(199, 208, 222, 0.11);
    --warn-bg: #36260c;
    --warn-border: #d99b38;
    --warn-text: #ffe0a3;
    --shadow: 0 2px 0 rgba(0, 0, 0, 0.45), 0 12px 26px rgba(0, 0, 0, 0.35);
    --bevel: 0 2px 0 rgba(0, 0, 0, 0.38);
    color-scheme: dark;
  }
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

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

html {
  font-size: 112.5%; /* 18px par défaut, adapté à la lecture prolongée */
  scroll-padding-top: 7.5rem;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2 {
  font-family: var(--font-display);
  line-height: 1.18;
  letter-spacing: 0.01em;
  font-weight: 700;
}

h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--link);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   3. Utilitaires
   -------------------------------------------------------------------------- */

.wrap {
  width: min(1140px, 100% - 2.5rem);
  margin-inline: auto;
}

@media (max-width: 480px) {
  .wrap {
    width: min(1140px, 100% - 1.75rem);
  }
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.2em;
  height: 1.2em;
  display: inline-block;
  vertical-align: -0.18em;
  flex: none;
}

.icon--os {
  width: 15px;
  height: 15px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   4. En-tête
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.site-header::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #e07a1f 45%, var(--secondary) 100%);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.25rem;
  padding-block: 0.65rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  width: 44px;
  height: 44px;
  flex: none;
  object-fit: contain;
  padding: 2px;
  background: #14161e;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand__tagline {
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-btn {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  box-shadow: var(--bevel);
  cursor: pointer;
}

html.js .theme-btn {
  display: grid;
}

.theme-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.theme-btn__icon {
  width: 22px;
  height: 22px;
}

.theme-btn__icon--sun {
  display: none;
}

:root[data-theme="dark"] .theme-btn__icon--sun {
  display: block;
}

:root[data-theme="dark"] .theme-btn__icon--moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn__icon--sun {
    display: block;
  }

  :root:not([data-theme]) .theme-btn__icon--moon {
    display: none;
  }
}

.site-nav {
  order: 3;
  flex-basis: 100%;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  line-height: 1.2;
}

.site-nav__icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.site-nav a:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.site-nav a:hover .site-nav__icon {
  color: var(--accent-strong);
}

.site-nav a[aria-current="page"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-strong);
  box-shadow: var(--bevel);
}

.site-nav a[aria-current="page"] .site-nav__icon {
  color: var(--accent-strong);
}

@media (min-width: 880px) {
  .site-nav {
    order: 2;
    flex-basis: auto;
  }

  .site-header__actions {
    order: 3;
  }
}

/* --------------------------------------------------------------------------
   5. Structure des pages
   -------------------------------------------------------------------------- */

.site-main {
  flex: 1 0 auto;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.22rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.eyebrow::before {
  content: "> ";
  color: var(--secondary);
}

.hero,
.page-head {
  background-color: var(--bg-alt);
  background-image:
    radial-gradient(circle at 12% 20%, var(--head-glow-left) 0%, transparent 48%),
    radial-gradient(circle at 88% 22%, var(--head-glow-right) 0%, transparent 44%),
    radial-gradient(var(--grid-dot) 1.25px, transparent 1.25px);
  background-size: auto, auto, 18px 18px;
  border-bottom: 2px solid var(--border);
}

.hero {
  padding: 2.7rem 0 2.3rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.95rem, 4.6vw, 2.95rem);
}

.page-head {
  padding: 2.2rem 0 1.7rem;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.page__body {
  padding-block: 2.2rem 4.5rem;
}

/* --------------------------------------------------------------------------
   6. Contenu rédactionnel
   -------------------------------------------------------------------------- */

.prose > p:first-of-type {
  font-size: 1.08rem;
}

.prose--home > p:first-of-type {
  font-size: clamp(1.08rem, 1.6vw, 1.24rem);
  line-height: 1.62;
}

.prose > h2 {
  margin: 2.8rem 0 1.1rem;
  padding-bottom: 0.45rem;
  font-size: clamp(1.45rem, 2.7vw, 1.95rem);
  border-bottom: 2px solid var(--border);
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose > h3 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.15rem;
}

.prose > ul:not([class]),
.prose > ol:not([class]) {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

.prose > ul:not([class]) > li,
.prose > ol:not([class]) > li {
  margin-bottom: 0.4rem;
}

.prose > ul:not([class]) > li::marker,
.prose > ol:not([class]) > li::marker {
  color: var(--accent-strong);
  font-weight: 700;
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose hr {
  margin: 2rem 0;
  border: 0;
  border-top: 2px dashed var(--border);
}

.prose code {
  padding: 0.12em 0.38em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-pixel);
  font-size: 0.88em;
}

.prose pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-2);
  font-family: var(--font-pixel);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   7. Boutons et coordonnées
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.55rem 1rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--bevel);
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-strong);
  color: var(--on-accent);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn--outline {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent-strong);
}

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

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.6rem 0 2rem;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-card__body {
  flex: 1;
  min-width: 0;
}

.contact-card__label {
  margin: 0 0 0.5rem;
  font-family: var(--font-pixel);
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-card .btn {
  width: 100%;
}

.contact-card__value {
  margin: 1.05rem 0 0.55rem;
}

.contact-card__value:empty {
  display: none;
}

.contact-card__value a {
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.contact-card__value a:hover {
  text-decoration: underline;
}

.contact-list__title {
  margin: 1.8rem 0 0.8rem;
  font-size: 1.15rem;
}

.contact-list {
  display: grid;
  gap: 0.9rem;
  margin: 1.4rem 0 2rem;
  padding: 0;
  list-style: none;
}

.contact-list__item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--bevel);
}

.contact-list__body {
  min-width: 0;
  flex: 1;
}

.contact-list__label {
  margin: 0 0 0.15rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.contact-list__value {
  margin: 0.1rem 0 0;
  font-size: 1.02rem;
  font-weight: 600;
}

.contact-list__value:empty {
  display: none;
}

.contact-list__value a {
  text-decoration: none;
}

.contact-list__value a:hover {
  text-decoration: underline;
}

.contact-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.88rem;
}

/* --------------------------------------------------------------------------
   8. Cartes de prestations
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0.5rem;
}

.card {
  padding: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--secondary);
  border-radius: var(--radius);
  box-shadow: var(--bevel);
}

.card__title {
  margin: 0.8rem 0 0.35rem;
  font-size: 1.05rem;
}

.card__text {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--muted);
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.icon-tile .icon {
  width: 22px;
  height: 22px;
}

.icon-tile--lg {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
}

.icon-tile--lg .icon {
  width: 26px;
  height: 26px;
}

.card .icon-tile {
  border-color: var(--secondary-border);
  background: var(--secondary-soft);
  color: var(--secondary);
}

/* --------------------------------------------------------------------------
   9. Tarifs
   -------------------------------------------------------------------------- */

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
  margin: 1.6rem 0 1.4rem;
}

.price-card {
  padding: 1.5rem 1.5rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.price-card--pro {
  border-top-color: var(--secondary);
}

.price-card--pro .icon-tile {
  border-color: var(--secondary-border);
  background: var(--secondary-soft);
  color: var(--secondary);
}

.price-card__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.price-card__title {
  margin: 0;
  font-size: 1.2rem;
}

.price-card__amount {
  margin: 1rem 0 0.25rem;
  color: var(--accent-strong);
}

.price-card--pro .price-card__amount {
  color: var(--secondary);
}

.price-card__amount strong {
  font-family: var(--font-pixel);
  font-size: 2.35rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.price-card__amount span {
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  color: var(--muted);
}

.price-card__list {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.94rem;
}

.price-card__list li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.price-card__list .icon {
  margin-top: 0.22em;
  color: var(--crt);
}

/* --------------------------------------------------------------------------
   10. Radar CRT monochrome vert
   -------------------------------------------------------------------------- */

.radar {
  max-width: 700px;
  margin: 1.6rem auto 1.2rem;
  padding: 0.9rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.radar__screen {
  position: relative;
  overflow: hidden;
  border: 2px solid #205c33;
  border-radius: var(--radius);
  background: #020c05;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.75);
}

.radar__canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

.radar__noscript {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1.5rem;
  color: #c8ffd6;
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  text-align: center;
  background: #020c05;
}

.radar__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  padding: 0.85rem 0.35rem 0.2rem;
}

.radar__legend {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.radar__dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--crt);
  box-shadow: 0 0 0 3px var(--crt-soft);
}

.radar__cities {
  font-size: 0.88rem;
}

.radar__cities summary {
  color: var(--link);
  cursor: pointer;
  font-weight: 700;
}

.radar__cities ul {
  columns: 3 8rem;
  gap: 1.5rem;
  margin: 0.55rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.radar__cities li {
  break-inside: avoid;
  font-size: 0.84rem;
}

/* --------------------------------------------------------------------------
   11. Catalogue de logiciels
   -------------------------------------------------------------------------- */

.cat-nav {
  margin: 1.6rem 0 2.6rem;
}

.cat-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cat-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-pixel);
  font-size: 0.82rem;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: var(--bevel);
}

.cat-nav__icon {
  width: 15px;
  height: 15px;
  color: var(--accent-strong);
}

.cat-nav a:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.cat {
  margin-top: 2.6rem;
  scroll-margin-top: 7.5rem;
}

.cat__head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--border);
}

.cat__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.cat__count {
  margin-left: auto;
  padding: 0.15rem 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.sw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1rem;
  margin-top: 1.1rem;
}

.sw-card {
  display: flex;
  flex-direction: column;
  padding: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--bevel);
}

.sw-card:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.sw-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.sw-card__heading {
  min-width: 0;
  flex: 1;
}

.sw-card__title {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.3;
}

.sw-card__title a {
  color: var(--text);
  text-decoration: none;
}

.sw-card__title a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.sw-logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: none;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

:root[data-theme="dark"] .sw-logo:not(.sw-logo--mono) {
  background: #f3f5f8;
  border-color: var(--border-strong);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .sw-logo:not(.sw-logo--mono) {
    background: #f3f5f8;
    border-color: var(--border-strong);
  }
}

.sw-logo svg,
.sw-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.sw-logo--img {
  padding: 6px;
}

.sw-logo--mono {
  padding: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sw-logo--c1 { background: #e0f2fe; color: #075985; }
.sw-logo--c2 { background: #dcfce7; color: #166534; }
.sw-logo--c3 { background: #fef3c7; color: #92400e; }
.sw-logo--c4 { background: #fee2e2; color: #991b1b; }
.sw-logo--c5 { background: #ede9fe; color: #5b21b6; }
.sw-logo--c6 { background: #cffafe; color: #155e75; }
.sw-logo--c7 { background: #fce7f3; color: #9d174d; }
.sw-logo--c8 { background: #e2e8f0; color: #334155; }

.sw-os {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
}

.os-badge {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.sw-card__desc {
  margin: 0.7rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.sw-warning {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  margin: 0.75rem 0 0;
  padding: 0.22rem 0.55rem;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-sm);
  color: var(--warn-text);
  font-family: var(--font-pixel);
  font-size: 0.76rem;
}

.sw-warning .icon {
  width: 15px;
  height: 15px;
}

.sw-extras {
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--border);
  font-size: 0.82rem;
}

.sw-extras__label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
  color: var(--muted);
}

.sw-extras__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sw-extras__list li {
  padding: 0.1rem 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  line-height: 1.5;
  color: var(--muted);
}

.sw-extras__list a {
  text-decoration: none;
}

.sw-extras__list a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   12. Pied de page
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: 2rem;
  padding-top: 2.4rem;
  background: var(--bg-alt);
  border-top: 2px solid var(--border);
  font-size: 0.92rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.site-footer__brand {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
}

.site-footer__about p {
  color: var(--muted);
}

.site-footer__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.site-footer__nav ul {
  display: grid;
  gap: 0.38rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1rem 1.4rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.84rem;
}

.site-footer__bottom p {
  margin: 0;
}

.site-footer__bottom a {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   13. Responsive et impression
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  html {
    font-size: 106.25%; /* 17px */
    scroll-padding-top: 8.5rem;
  }

  .hero {
    padding: 2rem 0 1.8rem;
  }

  .page-head {
    padding: 1.8rem 0 1.3rem;
  }

  .page__body {
    padding-block: 1.6rem 3.2rem;
  }

  .brand__tagline {
    display: none;
  }

  .cat {
    scroll-margin-top: 8.5rem;
  }

  .cat__head {
    flex-wrap: wrap;
  }

  .cat__count {
    flex-basis: 100%;
    margin-left: 0;
    width: fit-content;
  }

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

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .radar {
    padding: 0.55rem;
  }
}

@media (max-width: 400px) {
  .brand__mark {
    width: 36px;
    height: 36px;
  }

  .theme-btn {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .theme-btn,
  .radar,
  .contact-card .btn {
    display: none !important;
  }

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

  .page__body {
    padding: 0;
  }

  a {
    color: #000;
  }
}
