/* Palette : celle d'Encore. Nuit violette, violet signal, teal vivant, corail crash. */
:root {
  --bg: #0d0919;
  --bg-2: #160f2a;
  --line: #2c2347;
  --ink: #ece8f7;
  --muted: #a29abb;
  --violet: #9a6bff;
  --violet-soft: #c4a8ff;
  --live: #40d9bf;
  --crash: #ff6b57;
  --halo-2: #4f5bff;
  --on-violet: #0d0919;
  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --stroke-w: 1.5px;
  --warn: #f0c36b;
  color-scheme: dark;
}
/* Thème : auto (système) par défaut ; data-theme="light" | "dark" sur <html> force le choix du visiteur. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f3fd;
    --bg-2: #ebe5fa;
    --line: #d6cdef;
    --ink: #1b1233;
    --muted: #5d5379;
    --violet: #6a3ee0;
    --violet-soft: #6a3ee0;
    --live: #0b8a74;
    --crash: #c8372d;
    --on-violet: #fff;
    --stroke-w: 2px;
    --warn: #9a6a00;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f6f3fd;
  --bg-2: #ebe5fa;
  --line: #d6cdef;
  --ink: #1b1233;
  --muted: #5d5379;
  --violet: #6a3ee0;
  --violet-soft: #6a3ee0;
  --live: #0b8a74;
  --crash: #c8372d;
  --on-violet: #fff;
  --stroke-w: 2px;
  --warn: #9a6a00;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-x: hidden;
}
a { color: inherit; text-decoration-color: var(--violet); text-underline-offset: .2em; }
a:hover { color: var(--violet-soft); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 10; background: var(--violet); color: #fff; padding: 8px 12px; }

/* --- en-tête ----------------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.mark { font-weight: 800; text-decoration: none; letter-spacing: -.01em; }
.mark span { color: var(--muted); font-weight: 500; }
.top nav { display: flex; gap: clamp(12px, 2.5vw, 28px); font-size: .95rem; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }

/* --- hero -------------------------------------------------------------------- */
.hero {
  position: relative;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 8vh, 96px) var(--gutter) clamp(48px, 8vh, 96px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  isolation: isolate;
}
/* deux halos qui dérivent, comme les fonds d'Encore */
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%;
  filter: blur(80px); opacity: .28; pointer-events: none;
}
.hero::before { width: 520px; height: 520px; background: var(--violet); top: -120px; right: 8%; animation: drift 22s ease-in-out infinite alternate; }
.hero::after { width: 380px; height: 380px; background: var(--halo-2); bottom: -80px; right: 34%; opacity: .14; animation: drift 28s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-60px, 40px) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .hero::before, .hero::after { animation: none; } }

.name {
  font-size: clamp(2.8rem, 5.1vw, 5.4rem);
  line-height: .9; letter-spacing: -.045em; font-weight: 900;
  display: flex; flex-direction: column;
}
.name span { white-space: nowrap; }
.name span:last-child { color: transparent; -webkit-text-stroke: var(--stroke-w) var(--violet); }
.role { margin-top: 28px; font-size: 1.25rem; font-weight: 600; }
.pitch { margin-top: 12px; color: var(--muted); max-width: 38ch; }
.cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: border-color .2s, background .2s;
}
.btn:hover { border-color: var(--violet); color: var(--ink); }
.btn.primary { background: var(--violet); border-color: var(--violet); color: var(--on-violet); }
.btn.primary:hover { background: color-mix(in srgb, var(--violet) 85%, #fff); color: var(--on-violet); }

/* --- arbre de supervision ---------------------------------------------------- */
.sup {
  margin: 0; padding: 18px 18px 14px;
  background: color-mix(in srgb, var(--bg-2) 75%, transparent);
  border: 1px solid var(--line); border-radius: 14px;
  font-family: var(--mono); font-size: .8rem;
}
.sup-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sup figcaption { font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.strategy { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.strategy select {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 5px 8px; min-height: 32px;
}
#tree { display: block; width: 100%; height: auto; margin: 10px 0 4px; overflow: visible; user-select: none; }
.edge { fill: none; stroke: var(--line); stroke-width: 1.4; transition: stroke .3s, opacity .3s; }
.edge[data-status="up"] { stroke: color-mix(in srgb, var(--violet) 55%, var(--line)); }
.edge[data-status="down"] { stroke: var(--crash); opacity: .35; stroke-dasharray: 3 4; }
.pulse { fill: var(--live); }
.node { cursor: crosshair; outline: none; }
.node .dot { fill: var(--bg); stroke: var(--live); stroke-width: 2; transition: fill .25s, stroke .25s; transform-box: fill-box; transform-origin: center; }
.node.sup .dot { stroke: var(--violet); }
.node .halo { fill: var(--live); opacity: 0; transition: opacity .25s; }
.node .label { fill: var(--ink); font: 500 12.5px var(--mono); transition: fill .25s, opacity .25s; }
.node .pid { fill: var(--muted); font: 400 10.5px var(--mono); }
.node:hover .halo, .node:focus-visible .halo { opacity: .18; }
.node:focus-visible .label { fill: var(--violet-soft); text-decoration: underline; }
.node[data-status="starting"] .dot { animation: spawn .35s ease-out; }
.node[data-status="up"] .dot { fill: color-mix(in srgb, var(--live) 22%, var(--bg)); }
.node.sup[data-status="up"] .dot { fill: color-mix(in srgb, var(--violet) 30%, var(--bg)); }
.node[data-status="down"] .dot { stroke: var(--crash); fill: var(--bg); animation: die .4s ease-out; }
.node[data-status="down"] .halo { fill: var(--crash); opacity: .2; }
.node[data-status="down"] .label { fill: var(--crash); opacity: .7; text-decoration: line-through; }
.node[data-status="down"] .pid { fill: var(--crash); }
.node.private { cursor: not-allowed; }
.node.private .dot { stroke: var(--muted); stroke-dasharray: 2 2; }
.node.private[data-status="up"] .dot { fill: var(--bg); }
.node.private .label { fill: var(--muted); opacity: .55; letter-spacing: -.5px; }
.node.private .halo { fill: var(--muted); }
.node.denied { animation: denied .38s ease-in-out; }
@keyframes denied { 20%, 60% { translate: -3px 0; } 40%, 80% { translate: 3px 0; } }
@keyframes spawn { from { transform: scale(0); } 70% { transform: scale(1.35); } to { transform: scale(1); } }
@keyframes die { 30% { transform: scale(1.6); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .node .dot, .node.denied { animation: none !important; } }

.inspect { min-height: 2.6em; color: var(--violet-soft); line-height: 1.3; border-top: 1px solid var(--line); padding-top: 10px; }
.stats { display: flex; gap: 22px; margin: 10px 0 8px; }
.stats div { display: flex; gap: 6px; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; font-variant-numeric: tabular-nums; }
.log { list-style: none; margin: 0; padding: 0; min-height: 6.6em; color: var(--muted); font-size: .74rem; line-height: 1.3; }
.log li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: in .3s ease-out; }
.log li:first-child { color: var(--ink); }
.log li.error { color: var(--crash); }
.log li.warn { color: var(--warn); }
@keyframes in { from { opacity: 0; transform: translateY(-4px); } }

/* --- sections ---------------------------------------------------------------- */
.block { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 10vh, 112px) var(--gutter) 0; }
.block h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: -.035em; line-height: 1; font-weight: 800; }
.block-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 20px; margin-bottom: 28px; }

.about-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); margin-top: 28px; }
.bio p { max-width: 64ch; }
.bio p + p { margin-top: 1em; }
.bio p:first-child { font-size: 1.2rem; line-height: 1.5; }
.facts { margin: 0; display: grid; gap: 18px; align-content: start; }
.facts div { border-left: 2px solid var(--violet); padding-left: 16px; }
.facts dt { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.facts dd { margin: 2px 0 0; color: var(--muted); }
.stack { margin-top: 48px; display: grid; gap: 10px; }
.stack-row { display: grid; grid-template-columns: 9rem 1fr; gap: 16px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.stack h3 { font-size: .95rem; color: var(--muted); font-weight: 500; }
.stack ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* --- projets ----------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button {
  font: inherit; font-size: .9rem; color: var(--muted); background: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; min-height: 36px;
}
.filters button[aria-pressed="true"] { color: var(--ink); border-color: var(--violet); background: color-mix(in srgb, var(--violet) 16%, transparent); }
.projects { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.project { border-top: 1px solid var(--line); }
.row {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%;
  display: grid; grid-template-columns: minmax(10rem, 3fr) minmax(0, 7fr) 8rem; gap: 20px; align-items: baseline;
  padding: 18px 4px; transition: padding .25s, background .25s;
}
.row:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.row:hover { padding-left: 14px; }
.p-name { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; }
.p-sum { color: var(--muted); }
.p-kind { justify-self: end; font-size: .85rem; color: var(--muted); }
.project[data-kind="pro"] .p-kind { color: var(--violet-soft); }
.project.open .p-name { color: var(--violet-soft); }
.p-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.project.open .p-detail { grid-template-rows: 1fr; }
.p-inner { overflow: hidden; padding: 0 4px; display: grid; grid-template-columns: minmax(10rem, 3fr) minmax(0, 7fr) 8rem; column-gap: 20px; }
.p-inner > * { grid-column: 2; }
.p-inner p { max-width: 66ch; }
.p-inner > :last-child { margin-bottom: 22px; }
.tags { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font: .78rem var(--mono); }
.tags li { border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; color: var(--muted); }
.p-link { margin-top: 14px; justify-self: start; font-weight: 600; }
.more { margin-top: 20px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .p-detail, .row { transition: none; } }

/* --- parcours ---------------------------------------------------------------- */
.cv-links { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: calc(9rem + 9px); top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.timeline > li { display: grid; grid-template-columns: 9rem 1fr; gap: 40px; padding: 0 0 36px; position: relative; }
.timeline > li::before {
  content: ""; position: absolute; left: calc(9rem + 4px); top: 8px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--violet);
}
.timeline > li:first-child::before { background: var(--live); border-color: var(--live); box-shadow: 0 0 0 5px color-mix(in srgb, var(--live) 22%, transparent); }
.t-when { font: 500 .85rem/1.9 var(--mono); color: var(--muted); }
.timeline h3 { font-size: 1.3rem; letter-spacing: -.02em; }
.t-org { font-weight: 500; color: var(--muted); }
.t-where { color: var(--muted); font-size: .92rem; }
.timeline ul { margin: 10px 0 0; padding-left: 1.1em; max-width: 70ch; }
.timeline ul li + li { margin-top: 4px; }
.timeline ul li::marker { color: var(--violet); }

/* --- contact ----------------------------------------------------------------- */
.contact { padding-bottom: clamp(56px, 10vh, 112px); }
.contact-line { margin-top: 20px; color: var(--muted); max-width: 52ch; font-size: 1.15rem; }
.contact-mail { margin-top: 24px; font-size: clamp(1.8rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; overflow-wrap: anywhere; }
.contact-mail a { text-decoration-thickness: 3px; text-underline-offset: .12em; }
.contact-links { list-style: none; padding: 0; margin: 24px 0 0; display: flex; gap: 24px; font-weight: 600; }

.foot { border-top: 1px solid var(--line); padding: 28px var(--gutter); color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* --- responsive -------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .name { font-size: min(15.5vw, 5.4rem); }
  .about-body { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .top nav a:first-child { display: none; }
  .sup { padding: 14px 12px 10px; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .p-kind { justify-self: start; }
  .p-inner { grid-template-columns: 1fr; }
  .p-inner > * { grid-column: 1; }
  .stack-row { grid-template-columns: 1fr; gap: 6px; }
  .timeline::before { left: 5px; }
  .timeline > li { grid-template-columns: 1fr; gap: 4px; padding-left: 28px; }
  .timeline > li::before { left: 0; }
  .stats { gap: 14px; }
  .log li { white-space: normal; }
}

/* --- langues ----------------------------------------------------------------- */
.top-right { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 28px); }
.langs { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.langs button {
  font: 500 .78rem var(--mono); color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: 4px 8px; border-radius: 999px; min-height: 28px;
}
.langs button[aria-pressed="true"] { background: var(--violet); color: var(--on-violet); }
.langs button:hover:not([aria-pressed="true"]) { color: var(--ink); }

/* --- hobbies ----------------------------------------------------------------- */
.hobbies-intro { margin-top: 14px; color: var(--muted); font-size: 1.15rem; }
.hobby-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.hobby h3 { font-size: 1.3rem; letter-spacing: -.02em; margin-top: 14px; }
.hobby p { margin-top: 6px; color: var(--muted); max-width: 42ch; }
.hobby-glyph { display: block; width: 44px; height: 44px; background: var(--violet); -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; }
.hobby-archery { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44' fill='none' stroke='black' stroke-width='2.5'%3E%3Ccircle cx='22' cy='22' r='19'/%3E%3Ccircle cx='22' cy='22' r='12'/%3E%3Ccircle cx='22' cy='22' r='5' fill='black'/%3E%3C/svg%3E"); }
.hobby-moto { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='31' r='6.5'/%3E%3Ccircle cx='35' cy='31' r='6.5'/%3E%3Cpath d='M9 31l6-8h12l8 8'/%3E%3Cpath d='M14 23l4-6h9l3 6z' fill='black'/%3E%3Crect x='17' y='25' width='8' height='6' fill='black'/%3E%3Cpath d='M30 22l-2-8h5'/%3E%3C/svg%3E"); }
.hobby-games { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cpath fill-rule='evenodd' d='M12 11h20c6 0 10 6 10 14 0 6-3 9-6 9-3 0-5-3-7-6H15c-2 3-4 6-7 6-3 0-6-3-6-9 0-8 4-14 10-14Zm-1 6v3H8v3h3v3h3v-3h3v-3h-3v-3Zm19 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm5 3a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z'/%3E%3C/svg%3E"); }
@media (max-width: 760px) { .hobby-list { grid-template-columns: 1fr; } }

/* --- easter eggs ------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 20; translate: -50% 20px; opacity: 0; pointer-events: none;
  font: 500 .85rem var(--mono); background: var(--violet); color: var(--on-violet);
  padding: 8px 14px; border-radius: 8px; transition: opacity .2s, translate .2s;
}
.toast.show { opacity: 1; translate: -50% 0; }
.arrow { position: fixed; left: 0; top: 0; z-index: 15; width: 56px; height: 2px; background: var(--ink); pointer-events: none; }
.arrow::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 9px solid var(--ink); border-right: 0; }
.arrow::before { content: ""; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; background: var(--violet); clip-path: polygon(0 0, 100% 40%, 100% 60%, 0 100%, 30% 50%); }
#tree.god .node:not(.private) .dot { stroke: #f0c36b; }
#tree.god .node:not(.private) .halo { fill: #f0c36b; opacity: .16; }
#tree.redline .pulse { fill: var(--crash); }
#tree.redline .edge[data-status="up"] { stroke: color-mix(in srgb, var(--crash) 50%, var(--violet)); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
@media (max-width: 640px) {
  .top nav a:not(:first-child):not(:nth-child(2)) { display: none; }
}

/* --- ouvert à un nouveau poste ------------------------------------------------ */
.open-to-work {
  display: inline-flex; flex-direction: column; gap: 10px; margin-bottom: 30px; max-width: 100%;
  padding: 12px 16px 14px; border: 1px solid color-mix(in srgb, var(--live) 45%, var(--line)); border-radius: 14px;
  background: color-mix(in srgb, var(--live) 9%, transparent); text-decoration: none;
  transition: border-color .2s, background .2s;
}
.otw-status { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1rem; }
.otw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 500 .8rem var(--mono); padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink); background: color-mix(in srgb, var(--bg) 60%, transparent); }
.chip-remote { border-color: var(--live); color: var(--live); font-weight: 600; }
.open-to-work:hover { border-color: var(--live); color: var(--ink); background: color-mix(in srgb, var(--live) 14%, transparent); }
.live { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--live); flex: none; }
.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--live); animation: ping 1.8s ease-out infinite; }
@keyframes ping { to { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live::after { animation: none; } }
.p-private { margin-left: 10px; vertical-align: middle; font: 500 .7rem var(--mono); color: var(--muted); border: 1px dashed var(--line); border-radius: 4px; padding: 1px 6px; letter-spacing: 0; }
body.sword, body.sword * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M1 1l5 1.2L21.5 17.7l-3.8 3.8L2.2 6z' fill='%23eef3ff' stroke='%230d0919' stroke-width='.9' stroke-linejoin='round'/%3E%3Cpath d='M2.2 2.2L19.6 19.6' stroke='%239fb3d9' stroke-width='.9'/%3E%3Cpath d='M12.5 23.5c3-1 5.5-3.2 7.2-6.2l2.3-4.3 1.6 1.6-1.9 4.6 4.6-1.9 1.6 1.6-4.3 2.3c-3 1.7-5.2 4.2-6.2 7.2z' fill='%236a3ee0' stroke='%230d0919' stroke-width='.9' stroke-linejoin='round'/%3E%3Ccircle cx='20.2' cy='20.2' r='1.5' fill='%23f0c36b' stroke='%230d0919' stroke-width='.6'/%3E%3Cpath d='M21.6 23.1l1.5-1.5 5 5-1.5 1.5z' fill='%233b2a7a' stroke='%230d0919' stroke-width='.8'/%3E%3Ccircle cx='28.4' cy='28.4' r='2.1' fill='%23f0c36b' stroke='%230d0919' stroke-width='.8'/%3E%3C/svg%3E") 1 1, crosshair !important; }
.open-to-work.listen { animation: listen .5s ease-in-out 3; }
@keyframes listen { 50% { translate: 0 -4px; } }
@media (prefers-reduced-motion: reduce) { .open-to-work.listen { animation: none; } }

/* --- parcours : la suite ------------------------------------------------------ */
.timeline > li.next::before { background: var(--bg); border: 2px dashed var(--violet); width: 13px; height: 13px; left: calc(9rem + 3px); top: 7px; animation: breathe 2.4s ease-in-out infinite; }
.timeline > li.next .t-when { color: var(--violet-soft); font-weight: 600; }
.timeline > li.next h3 { color: var(--violet-soft); }
.next-lead { margin-top: 10px; font-size: 1.15rem; font-weight: 600; max-width: 60ch; }
.timeline > li.next .btn { margin-top: 16px; }
.timeline > li.next + li::before { background: var(--live); border-color: var(--live); box-shadow: 0 0 0 5px color-mix(in srgb, var(--live) 22%, transparent); }
.timeline > li:first-child:not(.next)::before { background: var(--bg); }
@keyframes breathe { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--violet) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .timeline > li.next::before { animation: none; } }
@media (max-width: 640px) { .timeline > li.next::before { left: -1px; } }

.foot-code code { font: .82rem var(--mono); color: var(--violet-soft); overflow-wrap: anywhere; }

/* --- iex ----------------------------------------------------------------------- */
.iex {
  position: fixed; left: 50%; bottom: 16px; z-index: 30; width: min(720px, calc(100vw - 32px));
  translate: -50% 12px; opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s;
  background: #0a0714; color: #ece8f7; border: 1px solid #2c2347; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5); font: .85rem/1.5 var(--mono); overflow: hidden;
}
.iex.open { opacity: 1; translate: -50% 0; pointer-events: auto; }
.iex pre { margin: 0; padding: 14px 16px 4px; max-height: 40vh; overflow: auto; white-space: pre-wrap; font: inherit; }
.iex pre .cmd { color: #c4a8ff; }
.iex pre .err { color: #ff6b57; }
.iex-row { display: flex; align-items: center; padding: 4px 16px 14px; }
.iex-prompt { color: #40d9bf; white-space: pre; }
.iex input { flex: 1; min-width: 0; background: none; border: 0; color: inherit; font: inherit; outline: none; caret-color: #9a6bff; }
.iex:focus-within { border-color: #9a6bff; }

/* --- rm -rf / ------------------------------------------------------------------ */
body.rmrf main > *, body.rmrf .top, body.rmrf .foot {
  transition: transform 1.1s cubic-bezier(.55,0,1,.45), opacity 1.1s;
  transform: translateY(110vh) rotate(var(--fall, 6deg)); opacity: .2;
}
body.rmrf main > :nth-child(2n) { --fall: -8deg; }
body.rmrf main > :nth-child(3n) { --fall: 14deg; transition-delay: .12s; }
main > *, .top, .foot { transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .6s; }

/* --- cible ------------------------------------------------------------------- */
.hobby-archery .hobby-glyph { cursor: crosshair; }
.hobby-glyph.hit { animation: hit .35s ease-out; }
@keyframes hit { 30% { transform: scale(.82) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .iex, main > *, .top, .foot { transition: none; } .hobby-glyph.hit { animation: none; } }
.p-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; }
.p-links .p-link { margin-top: 0; }
.hobby-cooking { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h20v12a4 4 0 0 1-4 4H16a4 4 0 0 1-4-4z' fill='black'/%3E%3Cpath d='M8 20h28M32 24h5M16 14c0-3 3-3 3-6M22 14c0-3 3-3 3-6M28 14c0-3 3-3 3-6'/%3E%3C/svg%3E"); }
.hobby-games .hobby-glyph { cursor: pointer; }

/* --- jeu ---------------------------------------------------------------------- */
.game { position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; gap: 10px; padding: 16px; background: rgba(5, 3, 12, .78); backdrop-filter: blur(4px); }
.game canvas { width: min(720px, calc(100vw - 32px)); aspect-ratio: 3 / 2; border: 1px solid #2c2347; border-radius: 12px; touch-action: none; cursor: none; }
.game-hint { margin: 0; text-align: center; font: .78rem var(--mono); color: #a29abb; }

/* --- wheelie, waka, triforce ------------------------------------------------------ */
.sup.wheelie { transform-origin: 85% 100%; animation: wheelie 1.6s cubic-bezier(.3,.7,.3,1); }
@keyframes wheelie { 25%, 70% { transform: rotate(-7deg); } 85% { transform: rotate(1deg); } }
.log li.eaten { opacity: 0; transform: translateX(-30px); transition: opacity .2s, transform .2s; }
#tree .node.triforce .label { fill: #f0c36b; opacity: 1; letter-spacing: 0; }
#tree .node.triforce .dot { stroke: #f0c36b; }
@media (prefers-reduced-motion: reduce) { .sup.wheelie { animation: none; } }

/* --- bouton de thème ------------------------------------------------------------ */
.theme-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px;
  font: 500 .78rem var(--mono); color: var(--muted); background: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px;
}
.theme-btn:hover { color: var(--ink); border-color: var(--violet); }
.theme-btn svg { width: 15px; height: 15px; }
@media (max-width: 640px) { .theme-btn .theme-name { display: none; } }
.hobby-list { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: clamp(20px, 2.5vw, 32px); }
.hobby-diy { --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cpath fill-rule='evenodd' d='M30 4a10 10 0 0 0-9.4 13.4L5.3 32.7a4 4 0 0 0 5.7 5.7l15.3-15.3A10 10 0 0 0 39.6 13l-6.1 6.1-6.4-1.7-1.7-6.4L31.5 4.9A10 10 0 0 0 30 4ZM9 34a1.6 1.6 0 1 0 0 .1Z'/%3E%3C/svg%3E"); }
.hobby-diy .hobby-glyph { cursor: pointer; }
