/*
 * Site de Syrinx (syrinx.li). Mêmes couleurs et polices que l'app (tools/webapp/src/app.css) :
 * fond noir chaud, texte ivoire, un accent ; titres en Bricolage Grotesque, texte en Instrument Sans.
 * En haut, l'ouverture (terminal + pièce vue de dessus, intro.js) ; ensuite la page.
 */
@font-face { font-family: 'Bricolage'; src: url('/fonts/bricolage.ttf') format('truetype'); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: 'Instrument'; src: url('/fonts/instrument_sans.ttf') format('truetype'); font-weight: 400 700; font-display: swap; }

:root {
  --ink: #0d0c0b; --night: #050505; --surface: #1a1816; --deep: #141210; --raised: #26231f; --line: #2a2723;
  --text: #f3eee6; --soft: #c9c2b7; --muted: #a39c91; --faint: #938c81;
  --accent: #ff6a3d; --accent-rgb: 255, 106, 61;
  --display: 'Bricolage', system-ui, sans-serif;
  --body: 'Instrument', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--text); }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .92em; }

/* ---------------------------------------------------------------- boutons */
.btn { display: inline-flex; align-items: center; height: 48px; padding: 0 22px; border-radius: 24px; border: 0; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.big { height: 52px; padding: 0 26px; border-radius: 26px; }
.btn.small { height: 44px; padding: 0 20px; }
.btn.accent { background: var(--accent); color: var(--ink); font-weight: 700; }
.btn.accent:hover { color: var(--ink); filter: brightness(1.08); }
.btn.light { background: var(--text); color: var(--ink); }
.btn.light:hover { color: var(--ink); }
.btn.soft { background: var(--raised); color: var(--text); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ================================================================ ouverture */
/* Le terminal occupe tout l'écran ; après l'installation, fondu au noir (.to-room) puis la pièce 3D (.room). */
.intro { position: relative; height: 100vh; height: 100svh; min-height: 520px; background: var(--night); overflow: hidden; }
.terminal { position: absolute; inset: 0; z-index: 2; overflow-y: auto; padding: max(72px, 9vh) max(24px, 7vw) 120px;
  font-family: var(--mono); font-size: clamp(15px, 1.35vw, 19px); line-height: 1.75; color: var(--muted); transition: opacity .9s ease; }
.terminal p, #lines > div { margin: 0; min-height: 1.75em; white-space: pre-wrap; word-break: break-word; }
.t-dim { color: var(--muted); }
.t-faint { color: #6f685f; }
.t-accent { color: var(--accent); }
.t-gap { margin-bottom: 1.2em !important; }
.t-strong { color: var(--text); font-weight: 600; }
.t-cmd { color: var(--text); }
.t-prompt { color: #7fbf6a; }
.t-space { margin-top: 1.2em; }
.t-out { color: #b9b2a7; }
.t-ok { color: var(--accent); font-weight: 600; }
.t-choice { display: block; min-height: 44px; padding: 0 8px; margin: 0 -8px; border: 0; border-radius: 6px; background: transparent;
  font-family: var(--mono); font-size: inherit; text-align: left; cursor: pointer; }
.t-choice:hover, .t-choice:focus-visible { background: #1f1c18; outline: none; }
.caret { animation: caret 1s steps(1) infinite; color: var(--accent); }
@keyframes caret { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }

.room { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity 1.6s ease; }
.room canvas { display: block; width: 100%; height: 100%; touch-action: manipulation; }
.black { position: absolute; inset: 0; z-index: 3; background: #000; opacity: 0; pointer-events: none; transition: opacity .9s ease; }
.intro.to-room .terminal { opacity: 0; pointer-events: none; }
.intro.to-room .black { opacity: 1; }
.intro.in-room .black { opacity: 0; transition-duration: 2.2s; }
.intro.in-room .room { opacity: 1; }
.intro.instant .room, .intro.instant .black, .intro.instant .terminal { transition: none; }
.intro.no3d { height: auto; min-height: 0; }
.intro.no3d > *:not(.bar) { display: none; }
.intro.no3d .bar { position: static; }

.dev-label { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; padding: 5px 10px; border-radius: 12px;
  background: rgba(13, 12, 11, .78); color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap;
  opacity: 0; transition: opacity .5s ease, background .3s; }
.dev-label.show { opacity: 1; }
.dev-label.on { background: var(--accent); color: var(--ink); }

.bar { position: absolute; left: 0; right: 0; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px max(16px, 3vw); pointer-events: none; }
.bar .logo { font-size: 24px; opacity: 0; transition: opacity 1s ease; }
.intro.in-room .bar .logo { opacity: 1; }
.bar-actions { display: flex; gap: 4px; pointer-events: auto; }
.bar-actions button { height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: transparent; color: #8b8378; font-size: 14px; cursor: pointer; }
.bar-actions button:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
#replay { display: none; }
.intro.in-room #replay { display: inline-block; }
.intro.in-room #skip { display: none; }

.hint { position: absolute; left: 50%; bottom: 28px; z-index: 4; transform: translateX(-50%); margin: 0; padding: 10px 18px; border-radius: 22px;
  background: rgba(13, 12, 11, .8); color: var(--soft); font-size: 15px; text-align: center; opacity: 0; transition: opacity .8s ease; pointer-events: none; width: max-content; max-width: calc(100% - 32px); }
.hint.show { opacity: 1; }
.card { position: absolute; left: max(16px, 3vw); bottom: 24px; z-index: 4; width: min(380px, calc(100% - 32px)); padding: 20px 22px; border-radius: 20px;
  background: rgba(20, 18, 16, .92); box-shadow: 0 0 0 1px var(--line), 0 20px 60px -20px rgba(0, 0, 0, .8); display: flex; flex-direction: column; gap: 8px; }
.card[hidden] { display: none; }
.card-title { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -.01em; }
.card-text { color: var(--soft); }
.card .row { margin-top: 6px; }
.next { position: absolute; right: max(16px, 3vw); bottom: 24px; z-index: 4; opacity: 0; pointer-events: none; transition: opacity 1s ease; }
.intro.in-room .next { opacity: 1; pointer-events: auto; }

/* ================================================================ la page */
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 860px; }
.top { max-width: 1200px; margin: 0 auto; padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 28px; letter-spacing: -.02em; text-decoration: none; color: var(--text); }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-size: 15px; }
.top nav a:not(.btn) { color: var(--muted); text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--text); }
.kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.lead { font-size: 20px; color: var(--soft); max-width: 560px; }
.dim { color: var(--muted); }
.fine { font-size: 14px; color: var(--faint); }
.fine code { color: var(--soft); }
.h-l { font-stretch: 80%; font-weight: 800; font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -.03em; }
.h-m { font-stretch: 80%; font-weight: 800; font-size: clamp(34px, 4.2vw, 54px); line-height: 1; letter-spacing: -.03em; }
.h-s { font-weight: 700; font-size: 22px; }
.section { padding-top: 112px; padding-bottom: 112px; display: flex; flex-direction: column; gap: 20px; }
.section-tight { padding-top: 0; padding-bottom: 112px; }

.hero { padding-top: 72px; padding-bottom: 96px; display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.hero-text { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-stretch: 78%; font-weight: 800; font-size: clamp(56px, 8vw, 104px); line-height: .92; letter-spacing: -.035em; }
.phone-shot { flex: 1 1 300px; display: flex; justify-content: center; }
.ph-frame { width: 300px; height: 620px; border-radius: 46px; background: #050505; padding: 12px; box-shadow: 0 40px 120px -30px rgba(var(--accent-rgb), .55), 0 0 0 1px var(--line); }
.ph-screen { width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--deep); display: flex; flex-direction: column; }
.ph-cover { height: 300px; position: relative; display: flex; align-items: flex-end; padding: 22px;
  background: radial-gradient(50% 40% at 70% 65%, rgba(var(--accent-rgb), .45) 0%, transparent 70%), radial-gradient(120% 90% at 30% 20%, #3b2a5c 0%, #1b1530 45%, #0f0d18 100%); }
.ph-cover p { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(243, 238, 230, .85); font-weight: 600; }
.ph-meta { padding: 22px 22px 0; display: flex; flex-direction: column; gap: 4px; }
.ph-title { font-family: var(--display); font-weight: 800; font-size: 24px; font-stretch: 85%; letter-spacing: -.02em; }
.ph-sub { font-size: 14px; color: var(--muted); }
.ph-bar { padding: 22px 22px 0; }
.ph-track { height: 4px; border-radius: 2px; background: rgba(243, 238, 230, .18); position: relative; }
.ph-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 58%; border-radius: 2px; background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), .55); }
.ph-head { position: absolute; left: 58%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(var(--accent-rgb), .55); }
.ph-times { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 8px; }
.ph-ctrl { display: flex; justify-content: center; align-items: center; gap: 30px; padding-top: 18px; fill: var(--text); }
.ph-play { width: 64px; height: 64px; border-radius: 50%; background: var(--text); display: flex; align-items: center; justify-content: center; fill: var(--ink); }

.promises { border-top: 1px solid var(--raised); border-bottom: 1px solid var(--raised); }
.grid3 { padding-top: 40px; padding-bottom: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.grid3 p { color: var(--muted); font-size: 15px; margin-top: 6px; }

.cards { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.cards article { background: var(--surface); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 10px; min-height: 180px; }
.cards h3 { font-weight: 700; font-size: 26px; letter-spacing: -.01em; line-height: 1.15; }
.cards article > p:last-child { color: var(--muted); font-size: 16px; }

.band { border-radius: 32px; background: linear-gradient(135deg, var(--surface) 0%, var(--deep) 100%); box-shadow: inset 0 0 0 1px var(--raised);
  padding: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 48px); display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.band-text { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.band-text > p:not(.kicker) { color: var(--soft); font-size: 18px; max-width: 540px; }
.shot-slot { flex: 1 1 280px; height: 220px; border-radius: 20px; background: var(--ink); box-shadow: inset 0 0 0 1px var(--line); display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 14px; }
.pills { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { padding: 8px 14px; border-radius: 18px; background: var(--raised); font-size: 14px; }

.steps-bg, .faq-bg { background: var(--deep); border-top: 1px solid var(--raised); border-bottom: 1px solid var(--raised); }
.steps { margin: 36px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.steps li { display: flex; flex-direction: column; gap: 12px; }
.steps span { font-family: var(--display); font-weight: 800; font-size: 64px; line-height: 1; color: var(--accent); }
.steps h3 { font-weight: 700; font-size: 24px; }
.steps p { color: var(--muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tabs button { height: 44px; padding: 0 20px; border-radius: 22px; border: 0; background: var(--raised); font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--ink); }
.pane { background: var(--surface); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: inset 0 0 0 1px var(--raised); }
.pane[hidden] { display: none; }
.cmd { display: flex; align-items: stretch; gap: 8px; background: var(--ink); border-radius: 14px; padding: 6px 6px 6px 20px; }
.cmd pre { margin: 0; flex: 1; min-width: 0; overflow-x: auto; padding: 14px 0; font-size: 15px; }
.copy { flex: none; height: 44px; align-self: center; padding: 0 16px; border: 0; border-radius: 10px; background: var(--raised); font-size: 14px; font-weight: 600; cursor: pointer; }
.copy:hover { background: #332f2a; }

.not { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; border-top: 1px solid var(--raised); padding-top: 56px; }
.not ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 18px; }
.not li { display: flex; flex-direction: column; gap: 2px; }
.not li span { color: var(--muted); }

details { border-bottom: 1px solid var(--raised); padding: 14px 0; }
summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 21px; min-height: 44px; display: flex; align-items: center; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; margin-left: auto; color: var(--faint); font-family: var(--body); font-weight: 400; }
details[open] summary::after { content: '–'; }
details p { margin: 6px 0 4px; color: var(--muted); }

.foot { padding-top: 48px; padding-bottom: 64px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; color: var(--faint); font-size: 14px; }
.foot .logo { font-size: 22px; }
.foot .credits { flex-basis: 100%; margin: 0; font-size: 12px; }
.foot .credits a { color: inherit; }
.row-links { display: flex; gap: 20px; }
.row-links a { color: var(--muted); }

/* ---------------------------------------------------------------- téléphone */
@media (max-width: 900px) {
  .terminal { padding: 76px 18px 120px; font-size: 14px; }
  .card { bottom: 84px; }
  .hint { bottom: 84px; }
  .next { left: 16px; right: 16px; justify-content: center; }
  .wrap, .top { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 80px; padding-bottom: 80px; }
  .section-tight { padding-bottom: 80px; }
  .hero { padding-top: 32px; gap: 48px; }
  .top nav { gap: 16px; }
  .top nav a:not(.btn) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
