/* ==========================================================================
   Kasyope · kasyope.com
   Design system: Kasyope (brand/ in the knowledge base). Square geometry,
   star-chart motifs, one amber point per screen.
   ========================================================================== */

@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/InstrumentSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --nuit: #0A1426;
  --marine: #111E38;
  --ambre: #E2A955;
  --ambre-fonce: #B8782A;
  --etoile: #F2F4F8;
  --papier: #F4F5F7;
  --sable: #FBF8F1;
  --brume: #DDE3EC;
  --acier: #8A97AD;
  --ardoise: #4A5874;
  --gris: #6A7892;
  --blanc: #FFFFFF;
  --line-dark: rgba(138, 151, 173, 0.22);
  --etoile-82: rgba(242, 244, 248, 0.82);
  --etoile-40: rgba(242, 244, 248, 0.4);

  --f-brand: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 4.4vw, 64px);
  --maxw: 1440px;
  --header-h: 80px;
  --radius: 4px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; background: var(--papier); color: var(--ardoise); font-family: var(--f-brand); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; color: var(--nuit); font-weight: 500; letter-spacing: -0.012em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--nuit); text-underline-offset: 4px; }
a:hover { color: var(--ambre-fonce); }
button { font: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ambre-fonce); outline-offset: 3px; }
.dark :focus-visible { outline-color: var(--ambre); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; background: var(--nuit); color: var(--etoile); padding: 12px 16px; }
.skip:focus { top: 12px; color: var(--etoile); }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.mono-plain { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.02em; }
.sq { display: inline-block; flex: none; width: 8px; height: 8px; background: currentColor; }
.sq-o { display: inline-block; flex: none; width: 8px; height: 8px; border: 1px solid currentColor; }
.sq-d { display: inline-block; flex: none; width: 8px; height: 8px; border: 1px dashed currentColor; }
.cross { width: 11px; height: 11px; color: var(--acier); }

/* --------------------------------------------------------------- type */
.display { font-size: clamp(40px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -0.018em; }
.t1 { font-size: clamp(32px, 3.6vw, 52px); line-height: 1.08; }
.t2 { font-size: clamp(30px, 3vw, 44px); }
.t3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.2; }
.lead { font-size: clamp(18px, 1.4vw, 20px); line-height: 1.55; }
.dark { background: var(--nuit); color: var(--etoile-82); }
.dark h1, .dark h2, .dark h3 { color: var(--etoile); }

/* --------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 24px; border-radius: var(--radius); border: 1px solid var(--nuit); background: var(--nuit); color: var(--etoile); font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.btn svg { width: 16px; height: 16px; transition: transform .2s ease; }
.btn:hover { color: var(--etoile); background: var(--marine); }
.btn:hover svg { transform: translateX(3px); }
.dark .btn, .site-header .btn { background: var(--etoile); border-color: var(--etoile); color: var(--nuit); }
.dark .btn:hover, .site-header .btn:hover { background: var(--blanc); color: var(--nuit); }
.link { font-weight: 500; font-size: 15px; color: inherit; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.dark .link { color: var(--etoile); }

/* --------------------------------------------------------------- header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--nuit); border-bottom: 1px solid var(--line-dark); }
.site-header .wrap { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; gap: 36px; }
.nav a { color: rgba(242, 244, 248, 0.78); font-size: 15px; font-weight: 500; text-decoration: none; position: relative; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--etoile); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 4px; height: 4px; margin-left: -2px; background: var(--ambre); }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line-dark); border-radius: var(--radius); background: transparent; color: var(--etoile); align-items: center; justify-content: center; }
.menu-btn svg { width: 20px; height: 20px; }
.mobile-nav { position: fixed; inset: 0; z-index: 60; background: var(--nuit); padding: 20px var(--gutter) 32px; display: flex; flex-direction: column; gap: 32px; }
.mobile-nav .top { display: flex; justify-content: space-between; align-items: center; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-dark); }
.mobile-nav li a { display: flex; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line-dark); color: var(--etoile); font-size: 24px; font-weight: 500; text-decoration: none; }
.mobile-nav li a .sq { width: 6px; height: 6px; color: var(--acier); }

/* --------------------------------------------------------------- hero */
.hero { padding-block: clamp(56px, 7vw, 104px) clamp(64px, 8vw, 120px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 668px); justify-content: space-between; align-items: center; gap: 64px; }
.hero-copy { display: flex; flex-direction: column; gap: 32px; }
.hero-copy .lead { max-width: 520px; }
.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 8px; }
.sky { background: var(--marine); border: 1px solid var(--line-dark); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.sky-plot { position: relative; aspect-ratio: 620 / 380; }
.sky-plot svg { width: 100%; height: 100%; overflow: visible; }
.sky-legend { display: flex; flex-wrap: wrap; gap: 8px 28px; color: var(--acier); }
.sky-legend span { display: inline-flex; align-items: center; gap: 8px; }
.sky-legend i { position: relative; width: 8px; height: 8px; border: 1px solid var(--acier); }
.sky-legend i b { position: absolute; inset: -1px; background: var(--ambre); opacity: 0; }
.sky-log { display: flex; flex-direction: column; gap: 6px; min-height: 76px; }
.sky-log div { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; color: var(--etoile); white-space: nowrap; overflow: hidden; }
.sky-log .who { color: var(--etoile); }
.sky-log .who.agent { color: var(--ambre); }

/* --------------------------------------------------------------- statement */
.statement { padding-block: clamp(88px, 10vw, 144px) clamp(56px, 7vw, 104px); }
.statement .wrap { display: flex; flex-direction: column; gap: 40px; padding-left: max(var(--gutter), min(14vw, 200px)); }
.statement h2 { max-width: 1040px; }
.statement p { max-width: 680px; margin-left: min(19vw, 280px); }

/* --------------------------------------------------------------- path (staircase) */
.path { padding-block: 32px clamp(96px, 10vw, 144px); }
.path h2 { max-width: 640px; margin-bottom: 72px; }
.stair { position: relative; height: 700px; margin-left: 72px; --step-x: 34%; --step-y: 240px; }
.stair .seg { position: absolute; background: var(--nuit); opacity: 0.3; }
.stair .step { position: absolute; left: calc(var(--i) * var(--step-x)); top: calc(var(--i) * var(--step-y)); display: grid; grid-template-columns: 28px minmax(0, 324px); gap: 24px; }
.node { width: 28px; height: 28px; border: 1px solid var(--nuit); background: var(--papier); display: flex; align-items: center; justify-content: center; color: var(--nuit); }
.node .sq { width: 10px; height: 10px; }
.step .node.last { color: var(--ambre-fonce); }
.step-body { display: flex; flex-direction: column; gap: 12px; margin-top: -4px; }
.stair-token { position: absolute; left: 10px; top: 10px; width: 9px; height: 9px; background: var(--ambre-fonce); }

/* --------------------------------------------------------------- use cases */
.cases { background: var(--blanc); padding-block: clamp(80px, 9vw, 128px); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 64px; margin-bottom: 56px; }
.section-head p { max-width: 380px; font-size: 18px; }
.cases-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 96px; align-items: start; }
.case-list { border-top: 1px solid var(--brume); }
.case { border-bottom: 1px solid var(--brume); }
.case-btn { width: 100%; display: flex; align-items: center; gap: 16px; padding: 24px 0; border: 0; background: transparent; text-align: left; font-size: clamp(22px, 2vw, 28px); line-height: 1.2; font-weight: 500; color: var(--gris); transition: color .2s ease; }
.case-btn .mark { width: 12px; height: 12px; border: 1px solid var(--nuit); flex: none; transition: background-color .2s ease, border-color .2s ease; }
.case-btn:hover { color: var(--nuit); }
.case-btn[aria-expanded="true"] { color: var(--nuit); padding-bottom: 14px; }
.case-btn[aria-expanded="true"] .mark { background: var(--ambre-fonce); border-color: var(--ambre-fonce); }
.case-panel { padding: 0 0 28px 28px; max-width: 520px; font-size: 17px; }
.case-visual { display: flex; flex-direction: column; gap: 20px; padding-top: 24px; position: sticky; top: calc(var(--header-h) + 32px); }
.ex-tabs { display: flex; gap: 20px; min-height: 26px; }
.ex-tabs button { padding: 4px 0; border: 0; border-bottom: 1px solid transparent; background: transparent; font-family: var(--f-mono); font-size: 12px; color: var(--gris); }
.ex-tabs button[aria-pressed="true"] { color: var(--nuit); border-bottom-color: var(--nuit); }
.ba { display: flex; flex-direction: column; gap: 10px; }
.ba-head, .ba-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr); align-items: center; }
.ba-head { color: var(--gris); }
.ba-head span:last-child { color: var(--nuit); }
.ba-from, .ba-to { min-height: 52px; padding: 10px 16px; display: flex; align-items: center; gap: 12px; font-size: 15px; }
.ba-from { border: 1px dashed var(--acier); color: var(--ardoise); }
.ba-from .sq-d { color: var(--ardoise); }
.ba-to { background: var(--nuit); color: var(--etoile); font-weight: 500; }
.ba-to .sq { color: var(--etoile); }
.ba-link { height: 52px; }
.ba-link svg { width: 100%; height: 100%; }
.ba-note { display: flex; align-items: center; gap: 10px; color: var(--nuit); margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--brume); }

/* --------------------------------------------------------------- deliverables */
.livs { padding-block: clamp(80px, 9vw, 128px) clamp(96px, 10vw, 144px); }
.livs-head { display: flex; flex-direction: column; gap: 20px; margin-bottom: 56px; }
.livs-head p { max-width: 560px; font-size: 18px; }
.stars { position: relative; }
.stars::before { content: ""; position: absolute; left: 14px; right: 14px; top: 13px; height: 1px; background: var(--nuit); opacity: 0.3; }
.stars [role="tablist"] { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.star { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 0; border: 0; background: transparent; text-align: left; font-size: 17px; font-weight: 500; color: var(--gris); }
.star .node { border-color: transparent; background: transparent; transition: border-color .2s ease, background-color .2s ease; }
.star .node .sq { width: 8px; height: 8px; color: var(--nuit); transition: all .2s ease; }
.star:hover { color: var(--nuit); }
.star[aria-selected="true"] { color: var(--nuit); font-weight: 600; }
.star[aria-selected="true"] .node { border-color: var(--nuit); background: var(--papier); }
.star[aria-selected="true"] .node .sq { width: 12px; height: 12px; color: var(--ambre-fonce); }
.mcp { display: flex; align-items: center; gap: 20px; margin: 40px 0 56px; padding: 16px 24px; background: var(--nuit); color: var(--etoile); }
.mcp .mono { color: var(--ambre); }
.mcp .rule { flex-grow: 1; height: 1px; background: rgba(242, 244, 248, 0.25); }
.mcp .blink { color: var(--ambre); }
.livs-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 864px); gap: 64px; align-items: start; }
.liv-caption { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; position: sticky; top: calc(var(--header-h) + 32px); }
.liv-caption p { font-size: 17px; }
.preview-scroll { overflow-x: auto; }
.preview { min-width: 720px; height: 460px; display: flex; flex-direction: column; border: 1px solid var(--brume); background: var(--blanc); }
.preview.is-dark { background: var(--marine); border-color: var(--nuit); color: var(--etoile); }
.preview.is-night { background: var(--nuit); border-color: var(--nuit); color: var(--etoile); }
.pv-bar { flex: none; height: 44px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--brume); color: var(--gris); }
.is-dark .pv-bar, .is-night .pv-bar { border-bottom-color: var(--line-dark); color: var(--acier); }
.pv-body { position: relative; flex-grow: 1; overflow: hidden; }

/* diag */
.diag { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; padding: 20px 28px; }
.diag-row { display: grid; grid-template-columns: 210px 1fr; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--brume); color: var(--nuit); font-size: 15px; }
.cells { display: flex; gap: 4px; }
.cells i { width: 14px; height: 14px; border: 1px solid var(--brume); }
.cells i.on { border-color: var(--nuit); }
.cells.accent i.on { border-color: var(--ambre-fonce); }
.cells i.on::after { content: ""; display: block; width: 100%; height: 100%; background: var(--nuit); }
.cells.accent i.on::after { background: var(--ambre-fonce); }
.finding { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--brume); font-size: 14px; }
.finding .sq-d { margin-top: 6px; color: var(--nuit); }
.diag-foot { flex: none; display: flex; gap: 16px; align-items: center; padding: 16px 28px; border-top: 1px solid var(--brume); background: var(--sable); color: var(--nuit); }
.diag-foot .mono { color: var(--ambre-fonce); font-weight: 500; }

/* carto */
.carto svg { width: 100%; height: 100%; }
.carto-legend { position: absolute; left: 20px; bottom: 16px; display: flex; gap: 24px; }
.carto-legend span { display: inline-flex; align-items: center; gap: 8px; color: var(--etoile); }
.carto-legend .amb { color: var(--ambre); }

/* tests */
.tests { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 28px; }
.gherkin div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-dark); font-family: var(--f-mono); font-size: 13px; color: var(--etoile); }
.gherkin div span:first-child { color: var(--acier); }
.gherkin div.then span:first-child { color: var(--ambre); }
.lane { padding: 18px 0; border-bottom: 1px solid var(--line-dark); display: flex; flex-direction: column; gap: 12px; }
.lane-top { display: flex; justify-content: space-between; align-items: center; font-weight: 500; color: var(--etoile); }
.lane-status { font-family: var(--f-mono); font-size: 12px; color: var(--acier); display: inline-flex; align-items: center; gap: 8px; }
.lane-status.ok { color: var(--etoile); }
.bar { display: flex; gap: 3px; }
.bar i { width: 12px; height: 12px; border: 1px solid rgba(242, 244, 248, 0.25); }
.bar i.on { background: var(--etoile); border-color: var(--etoile); }
.run-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; }
.run-btn { min-height: 44px; padding: 0 20px; border-radius: var(--radius); border: 1px solid var(--etoile); background: var(--etoile); color: var(--nuit); font-weight: 500; }
.run-btn:disabled { opacity: 0.5; cursor: default; }
.verdict { font-family: var(--f-mono); font-size: 12px; color: var(--ambre); }

/* parcours */
.trace { position: absolute; left: 0; right: 0; top: 0; height: 290px; }
.trace-line { position: absolute; left: 11.5%; right: 11.5%; top: 120px; height: 1px; background: rgba(242, 244, 248, 0.45); }
.trace-token { position: absolute; top: 116px; left: 11.5%; width: 9px; height: 9px; margin-left: -4px; background: var(--etoile); animation: token 7s linear infinite; }
@keyframes token { from { left: 11.5%; } to { left: 88.5%; } }
.trace-step { position: absolute; top: 104px; width: 150px; margin-left: -75px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.trace-step .node { width: 32px; height: 32px; border-color: rgba(242, 244, 248, 0.4); background: var(--marine); color: var(--etoile); }
.trace-step.finding-step .node { border: 1px dashed var(--ambre); color: var(--ambre); }
.trace-step .name { font-size: 14px; line-height: 19px; color: var(--etoile); }
.trace-step.finding-step .name { color: var(--ambre); }
.trace-step .who { font-family: var(--f-mono); font-size: 11px; color: var(--acier); }
.trace-note { position: absolute; left: 0; right: 0; top: 290px; display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 20px 24px; border-top: 1px solid var(--line-dark); font-size: 15px; color: var(--etoile-82); }
.trace-note .mono { color: var(--ambre); }

/* roadmap */
.roadmap { padding: 16px 28px; }
.rm-head, .rm-row { display: grid; grid-template-columns: 240px repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--brume); }
.rm-head div { padding: 10px 8px; color: var(--gris); }
.rm-head div + div, .rm-row .cell { border-left: 1px solid var(--brume); }
.rm-row .label { padding: 14px 0; font-size: 15px; color: var(--nuit); }
.rm-row.final .label { font-weight: 600; }
.rm-row .track { grid-column: 2 / -1; position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rm-row .track .cell { height: 52px; }
.rm-bar { position: absolute; top: 16px; height: 20px; background: var(--nuit); transform-origin: left center; }
.rm-row.final .rm-bar { background: var(--ambre-fonce); }
.rm-legend { display: flex; gap: 28px; padding-top: 16px; font-size: 12px; }
.rm-legend span { display: inline-flex; align-items: center; gap: 8px; }

/* agents */
.agents { padding: 16px 28px; display: flex; flex-direction: column; height: 100%; }
.ag-head, .ag-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, 112px); border-bottom: 1px solid var(--line-dark); }
.ag-head div { padding: 10px 12px; color: var(--acier); }
.ag-head div:first-child { padding-left: 0; }
.ag-head div + div, .ag-row .stage { border-left: 1px solid var(--line-dark); }
.ag-row .ticket { padding: 12px 0; display: flex; flex-direction: column; gap: 4px; justify-content: center; color: var(--etoile); font-size: 15px; }
.ag-row .ticket .mono { color: var(--acier); font-size: 11px; }
.ag-row .stage { height: 64px; display: flex; align-items: center; gap: 10px; padding: 0 12px; font-family: var(--f-mono); font-size: 11px; }
.ag-row .box { position: relative; width: 14px; height: 14px; border: 1px solid rgba(242, 244, 248, 0.45); }
.ag-row .box b { position: absolute; inset: -1px; background: var(--etoile); opacity: 0; }
.ag-row .stage:nth-child(2) .box b { background: var(--ambre); }
.ag-foot { margin-top: auto; display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--etoile-82); }
.ag-foot .sq { color: var(--ambre); }

/* preview entrance animations (replayed on each selection) */
.play .a-fill { animation: fill .25s ease-out both; animation-delay: var(--d, 0s); }
.play .a-row { animation: rowIn .45s ease-out both; animation-delay: var(--d, 0s); }
.play .a-fade { animation: fadeIn .6s ease-out both; animation-delay: var(--d, 0s); }
.play .a-grow { animation: grow 1s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
.play .a-pop { animation: pop .45s ease-out both; animation-delay: var(--d, 0s); }
.play .a-draw { stroke-dasharray: 1; animation: draw .7s ease-out both; animation-delay: var(--d, 0s); }
@keyframes fill { from { opacity: 0; } to { opacity: 1; } }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .25; } }
.blink { animation: blink 1s linear infinite; }

/* --------------------------------------------------------------- closing + footer */
.closing { position: relative; padding-block: clamp(96px, 10vw, 144px) clamp(88px, 9vw, 128px); overflow: hidden; }
.closing .wrap { display: flex; flex-direction: column; gap: 36px; }
.closing h2 { font-size: clamp(40px, 4.6vw, 64px); line-height: 1.05; letter-spacing: -0.015em; }
.closing p { max-width: 560px; }
.closing .cross { position: absolute; left: 24px; top: 24px; }
.site-footer { position: relative; overflow: hidden; background: var(--nuit); color: var(--acier); border-top: 1px solid var(--line-dark); padding-block: 64px 40px; }
.site-footer .watermark { position: absolute; right: 0; top: -40px; height: 320px; width: auto; opacity: 0.08; pointer-events: none; }
.footer-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; gap: 20px; }
.footer-brand img { height: 34px; width: auto; }
.footer-nav { display: flex; gap: 36px; flex-wrap: wrap; padding-top: 8px; }
.footer-nav a { color: var(--etoile); text-decoration: none; font-size: 15px; }
.footer-nav a:hover { color: var(--ambre); }
.footer-bottom { position: relative; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line-dark); }

/* --------------------------------------------------------------- inner pages (contact, legal) */
.page-hero { padding-block: clamp(56px, 7vw, 96px) clamp(64px, 8vw, 112px); }
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.contact-copy { display: flex; flex-direction: column; gap: 32px; }
.contact-steps { border-top: 1px solid var(--line-dark); padding-top: 32px; display: flex; flex-direction: column; gap: 28px; position: relative; }
.contact-steps .item { display: grid; grid-template-columns: 28px 1fr; gap: 20px; }
.contact-steps .node { border-color: var(--etoile-40); background: var(--nuit); color: var(--etoile); }
.contact-steps .node.first { color: var(--ambre); }
.contact-steps strong { display: block; color: var(--etoile); font-weight: 600; font-size: 17px; }
.contact-steps p { color: var(--acier); font-size: 15px; }
.contact-mail { border-top: 1px solid var(--line-dark); padding-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.contact-mail a { color: var(--etoile); font-size: 20px; }
.form-card { background: var(--blanc); color: var(--ardoise); border: 1px solid var(--brume); padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 28px; }
.form-card h2 { color: var(--nuit); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid #C9D1DD; border-radius: var(--radius); font-size: 14px; color: var(--nuit); }
.choice input:checked + span { background: var(--nuit); border-color: var(--nuit); color: var(--etoile); }
.choice input:focus-visible + span { outline: 2px solid var(--ambre-fonce); outline-offset: 2px; }
fieldset { margin: 0; padding: 0; border: 0; }
legend, .field label { font-size: 14px; font-weight: 500; color: var(--nuit); }
legend { padding: 0 0 12px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field .opt { font-weight: 400; color: var(--gris); }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #C9D1DD; border-radius: var(--radius); background: var(--blanc); font: inherit; font-size: 15px; color: var(--nuit); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--nuit); box-shadow: 0 0 0 1px var(--nuit); }
.field .err { font-size: 13px; color: #A3361F; }
.field.invalid input, .field.invalid textarea { border-color: #A3361F; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--brume); padding-top: 24px; }
.form-foot p { font-size: 13px; color: var(--gris); max-width: 380px; }
.form-done { display: flex; flex-direction: column; gap: 16px; }
.form-done pre { margin: 0; padding: 16px; background: var(--papier); border: 1px solid var(--brume); font-family: var(--f-mono); font-size: 13px; white-space: pre-wrap; color: var(--nuit); }
.form-done .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-ghost { background: transparent; color: var(--nuit); }
.btn-ghost:hover { background: var(--nuit); color: var(--etoile); }
.legal { padding-block: 72px 112px; }
.legal .wrap { max-width: 920px; display: flex; flex-direction: column; gap: 48px; }
.legal section { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--brume); padding-top: 24px; }
.legal h2 { font-size: 22px; }
.legal dl { display: grid; grid-template-columns: 240px 1fr; gap: 12px 24px; margin: 0; }
.legal dt { color: var(--gris); }
.legal dd { margin: 0; color: var(--nuit); }
.ph { background: var(--sable); border: 1px dashed var(--ambre-fonce); padding: 0 6px; color: var(--ambre-fonce); font-family: var(--f-mono); font-size: 13px; }

/* --------------------------------------------------------------- scroll reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1200px) {
  .livs-body { grid-template-columns: 1fr; gap: 24px; }
  .liv-caption { position: static; }
  .stair { --step-x: 30%; }
}
@media (max-width: 1080px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .sky { max-width: 668px; }
  .cases-grid { grid-template-columns: 1fr; gap: 40px; }
  .case-visual { position: static; }
}
@media (max-width: 960px) {
  .nav, .site-header .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .stair { height: auto; margin-left: 0; display: flex; flex-direction: column; gap: 40px; padding-left: 0; }
  .stair .seg, .stair-token { display: none; }
  .stair .step { position: relative; left: auto; top: auto; }
  .stair .step:not(:last-of-type)::after { content: ""; position: absolute; left: 14px; top: 28px; bottom: -40px; width: 1px; background: var(--nuit); opacity: 0.3; }
  .statement p { margin-left: 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .stars { overflow-x: auto; padding-bottom: 8px; }
  .stars [role="tablist"] { min-width: 760px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sky { padding: 16px; }
  .sky-log .mono-plain { font-size: 11px; }
  .mcp { flex-wrap: wrap; gap: 12px; }
  .mcp .rule { display: none; }
  .fields { grid-template-columns: 1fr; }
  .legal dl { grid-template-columns: 1fr; gap: 4px; }
  .legal dd { margin-bottom: 12px; }
  .ba-head, .ba-row { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); }
  .ba-from, .ba-to { font-size: 13px; padding: 8px 10px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .trace-token, .stair-token { display: none; }
}
