  :root {
    --bg: #f6f8fb;
    --bg-alt: #eef2f7;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --border: #dbe2ea;
    --accent: #0284c7;
    --accent-soft: #e0f2fe;
    --code-bg: #0b1220;
    --code-text: #e2e8f0;
    --code-muted: #64748b;
    --radius: 14px;
    --max: 1120px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #0a0f1a;
      --bg-alt: #0e1525;
      --surface: #111a2c;
      --text: #e6edf6;
      --muted: #9aa8bc;
      --border: #1f2b40;
      --accent: #38bdf8;
      --accent-soft: #0c2a3e;
      --code-bg: #060a12;
      --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    }
  }

  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  a { color: var(--accent); }
  code, pre, .mono { font-family: ui-monospace, "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace; }
  .wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

  /* En-tête */
  .nav {
    position: sticky; top: 0; z-index: 10;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }
  .nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: .02em; }
  .brand svg { width: 26px; height: 26px; }
  .nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
  .nav ul a { color: var(--muted); text-decoration: none; font-size: 15px; }
  .nav ul a:hover { color: var(--text); }
  @media (max-width: 720px) { .nav ul { display: none; } }

  /* Héros */
  .hero { position: relative; overflow: hidden; padding: 88px 0 72px; }
  .hero::before {
    content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
    pointer-events: none;
  }
  .hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
  @media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .compass { display: none; } }
  .badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 12px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent);
    font-size: 13px; font-weight: 600;
  }
  .badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
  h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.05; margin: 18px 0 16px; letter-spacing: -.02em; }
  h1 span { color: var(--accent); }
  .lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 560px; margin: 0 0 30px; }
  .actions { display: flex; flex-wrap: wrap; gap: 12px; }
  .btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 15px;
    text-decoration: none; border: 1px solid var(--border); color: var(--text); background: var(--surface);
    transition: transform .15s ease, border-color .15s ease;
  }
  .btn:hover { transform: translateY(-1px); border-color: var(--accent); }
  .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
  @media (prefers-color-scheme: dark) { .btn.primary { color: #04121c; } }
  .meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; color: var(--muted); font-size: 14px; }
  .compass { width: 100%; height: auto; max-width: 380px; justify-self: center; color: var(--muted); }
  .compass .needle { transform-origin: 200px 200px; animation: sway 6s ease-in-out infinite; }
  @keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
  @media (prefers-reduced-motion: reduce) { .compass .needle { animation: none; } html { scroll-behavior: auto; } }

  /* Sections */
  section { padding: 80px 0; }
  section.alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
  .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
  h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 0 0 14px; letter-spacing: -.01em; }
  .intro { color: var(--muted); max-width: 680px; margin: 0 0 40px; font-size: 17px; }

  .grid { display: grid; gap: 18px; }
  .g4 { grid-template-columns: repeat(4, 1fr); }
  .g3 { grid-template-columns: repeat(3, 1fr); }
  @media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 620px) { .g4, .g3 { grid-template-columns: 1fr; } }

  .card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow);
  }
  .card h3 { margin: 0 0 8px; font-size: 18px; }
  .card p { margin: 0; color: var(--muted); font-size: 15px; }
  .bearing { font-size: 12px; color: var(--accent); letter-spacing: .1em; margin-bottom: 12px; display: block; }

  /* Profils */
  .profile { display: flex; flex-direction: column; gap: 14px; position: relative; }
  .profile .tag { font-size: 12px; color: var(--muted); }
  .profile ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 14.5px; }
  .profile li { display: flex; gap: 8px; }
  .profile li::before { content: "›"; color: var(--accent); font-weight: 700; }
  .profile.featured { border-color: var(--accent); }
  .profile .ribbon {
    position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 700;
    padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  }
  .profile .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
  .profile .icon svg { width: 22px; height: 22px; }

  /* Installation */
  .steps { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
  @media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
  .steps > *, .hero .wrap > *, .grid > * { min-width: 0; }
  .steps ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 18px; }
  .steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
  .steps li::before {
    content: counter(s); width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 700;
    border: 1px solid var(--border); background: var(--surface); color: var(--accent);
  }
  .steps li strong { display: block; }
  .steps li span { color: var(--muted); font-size: 15px; }
  .term { border-radius: var(--radius); overflow: hidden; background: var(--code-bg); border: 1px solid #1e293b; box-shadow: var(--shadow); }
  .term-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #0f172a; border-bottom: 1px solid #1e293b; }
  .term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
  .term-bar .title { flex: 1; text-align: center; color: #94a3b8; font-size: 13px; }
  .term pre { margin: 0; padding: 20px; overflow-x: auto; color: var(--code-text); font-size: 14px; line-height: 1.75; }
  .term .c { color: var(--code-muted); }
  .term .p { color: #38bdf8; user-select: none; }
  .note { font-size: 14px; color: var(--muted); margin-top: 14px; }

  /* Questions posées */
  .flow { display: flex; flex-wrap: wrap; gap: 10px; }
  .flow span {
    padding: 8px 14px; border-radius: 999px; font-size: 14px;
    background: var(--surface); border: 1px solid var(--border);
  }
  .flow span b { color: var(--accent); margin-right: 6px; font-weight: 700; }

  /* Nouveautés */
  .changes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  @media (max-width: 760px) { .changes { grid-template-columns: 1fr; } }
  .changes ul { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 8px; }
  .changes li strong { color: var(--text); }
  .added h3 { color: #16a34a; }
  .removed h3 { color: #dc2626; }
  @media (prefers-color-scheme: dark) { .added h3 { color: #4ade80; } .removed h3 { color: #f87171; } }

  /* Liens */
  .link-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease; }
  .link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
  .link-card .url { font-size: 13px; color: var(--accent); word-break: break-all; }

  footer { padding: 36px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
  footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

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

  /* Remplacent les attributs fill="var(...)" (non pris en charge partout) */
  .fill-accent { fill: var(--accent); }
  .fill-surface { fill: var(--surface); }
  .mt-32 { margin-top: 32px; }

/* ─── Animations 100 % CSS (aucun JavaScript) ─────────────────────────────── */

/* Terminal : un clic sélectionne une commande entière */
.term-hint { color: #64748b; font-size: 12px; }
.term .cmd { user-select: all; -webkit-user-select: all; cursor: text; }
.term .cmd:hover { background: rgba(56, 189, 248, .08); }
.term .caret {
  display: inline-block; width: .6em; height: 1.1em; margin-left: 4px;
  vertical-align: -0.2em; background: #38bdf8;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Apparition du héros au chargement, en cascade */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.hero .badge, .hero h1, .hero .lead, .hero .actions, .hero .meta {
  animation: rise .7s cubic-bezier(.2, .7, .2, 1) both;
}
.hero h1 { animation-delay: .08s; }
.hero .lead { animation-delay: .16s; }
.hero .actions { animation-delay: .24s; }
.hero .meta { animation-delay: .32s; }
.hero .compass { animation: fade 1.2s ease .2s both; }

/* Point « disponible » qui pulse */
.badge .dot { animation: pulse 2s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  100% { box-shadow: 0 0 0 8px transparent; }
}

/* Boussole : cercle pointillé qui tourne lentement, halo qui respire */
.compass .ring { transform-origin: 200px 200px; animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero::before { animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; transform: scale(1.08); } }

/* Titre « cap au nord » : reflet qui passe */
.hero h1 span {
  background: linear-gradient(100deg, var(--accent) 40%, color-mix(in srgb, var(--accent) 45%, #fff) 50%, var(--accent) 60%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s ease-in-out 1s infinite;
}
@keyframes shine { from { background-position: 100% 0; } 40%, to { background-position: 0 0; } }

/* Cartes : légère élévation au survol */
.card { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.profile:hover, .grid > .card:hover { transform: translateY(-3px); border-color: var(--accent); }
.profile .icon { transition: transform .3s ease; }
.profile:hover .icon { transform: rotate(-8deg) scale(1.08); }

/* Étapes du parcours : apparition en cascade */
.flow span { animation: rise .5s ease both; }
.flow span:nth-child(2) { animation-delay: .05s; }
.flow span:nth-child(3) { animation-delay: .1s; }
.flow span:nth-child(4) { animation-delay: .15s; }
.flow span:nth-child(5) { animation-delay: .2s; }
.flow span:nth-child(6) { animation-delay: .25s; }
.flow span:nth-child(7) { animation-delay: .3s; }
.flow span:nth-child(8) { animation-delay: .35s; }
.flow span:nth-child(9) { animation-delay: .4s; }
.flow span:nth-child(10) { animation-delay: .45s; }

/* Apparition au défilement, seulement dans les navigateurs qui le gèrent
   (Chrome, Edge, Firefox récents) ; ailleurs, tout est visible directement */
@supports (animation-timeline: view()) {
  section h2, section .intro, section .eyebrow, .card, .steps li, .term, .flow span {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

/* Respect du réglage « réduire les animations » du système */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .hero h1 span { color: var(--accent); background: none; }
}
