@import url("/assets/fonts/fonts.css");

/* Couleurs reprises de l'app (AppTheme.swift) : fond nuit, bleu Jellyfin, rose xfinn. */
:root {
  --night: #060b16;
  --night-2: #0d1424;
  --dusk: #170f1f;
  --panel: rgba(255, 255, 255, .055);
  --panel-strong: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .11);
  --ink: #edf2fb;
  --muted: #9aa6bd;
  --blue: #00a4dc;
  --sky: #66c7fa;
  --pink: #ff4585;
  --rose: #f552ab;
  --bar: linear-gradient(90deg, var(--blue), var(--pink));
  --display: "Unbounded", ui-rounded, system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--night) linear-gradient(180deg, var(--night) 0, var(--night-2) 55%, var(--dusk) 100%) no-repeat;
  background-size: 100% 100%;
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--night); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }

/* En-tête : la barre du bas est une barre de lecture, remplie au fil du défilement. */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(6, 11, 22, .72);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
}
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.15rem/1 var(--display); letter-spacing: -.03em; }
.brand img { border-radius: 7px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .97rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.langs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--panel); font-size: .8rem; font-weight: 600; }
.langs a, .langs span { padding: 4px 9px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.langs a:hover { color: var(--ink); }
.langs span { background: var(--panel-strong); color: var(--ink); }
.scrub { position: relative; height: 3px; background: rgba(255, 255, 255, .08); }
.scrub-fill { position: absolute; inset: 0 auto 0 0; width: 100%; background: var(--bar); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }
.scrub-mark { position: absolute; top: 0; width: 2px; height: 100%; background: var(--night); }

/* Accueil : le salon. L'écran éclaire le mur derrière lui (copie floutée de l'image). */
.hero { padding-top: clamp(48px, 8vw, 104px); overflow: clip; }
.hero h1 {
  font-size: clamp(2.15rem, 5.4vw, 4.6rem);
  line-height: 1.02;
  font-weight: 500;
  max-width: 16ch;
}
.lede { margin-top: 24px; max-width: 38em; font-size: clamp(1.08rem, 1.6vw, 1.28rem); color: var(--muted); line-height: 1.55; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 32px; }
.cta-note { margin: 0; color: var(--muted); font-size: .95rem; max-width: 30em; }

.store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 11px 22px 11px 18px; border-radius: 14px;
  background: #000; color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .28);
  transition: border-color .2s, transform .2s;
}
.store:hover { color: #fff; border-color: rgba(255, 255, 255, .6); }
.store:active { transform: scale(.98); }
.store svg { width: 26px; height: 32px; fill: currentColor; flex: none; }
.store span { display: flex; flex-direction: column; font: 600 1.35rem/1.05 var(--text); letter-spacing: -.01em; }
.store small { font-size: .72rem; font-weight: 500; letter-spacing: .01em; }

.stage { position: relative; margin-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(56px, 9vw, 120px); }
.tv { position: relative; margin: 0; width: 84%; isolation: isolate; }
.tv-glow {
  position: absolute; inset: -6% -10% -14%; width: 120%; height: 120%; max-width: none;
  object-fit: cover; z-index: -1; filter: blur(80px) saturate(1.8); opacity: .8; pointer-events: none;
}
.tv-screen {
  border-radius: 16px; overflow: hidden; background: #000;
  border: clamp(5px, .8vw, 10px) solid #03050a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 80px -20px rgba(0, 0, 0, .8);
}
.tv-screen img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
/* Le bouton « Passer l'intro » de l'app, posé sur l'écran : il mène au premier chapitre. */
.skip-intro {
  position: absolute; right: 27%; bottom: 9%;
  display: inline-flex; align-items: center; gap: 10px;
  padding: clamp(7px, 1vw, 12px) clamp(14px, 1.8vw, 22px);
  border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff;
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .3);
  font: 600 clamp(.8rem, 1.3vw, 1.05rem)/1 var(--text); text-decoration: none;
  transition: background .2s, transform .2s;
}
.skip-intro::after {
  content: ""; width: 15px; height: 11px; background: currentColor;
  clip-path: polygon(0 0, 50% 50%, 0 100%, 0 0, 50% 0, 100% 50%, 50% 100%, 50% 0);
}
.skip-intro:hover { color: var(--night); background: #fff; transform: scale(1.04); }

.phone { border-radius: 13% / 6%; border: 5px solid #03050a; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 30px 60px -12px rgba(0, 0, 0, .85); background: #000; }
.phone-hero { position: absolute; right: var(--gutter); bottom: 0; width: 22%; margin: 0; overflow: hidden; }

/* Chapitres de la page d'accueil (repérés sur la barre de lecture). */
.chapter { padding-block: clamp(72px, 11vw, 150px); border-top: 1px solid var(--line); }
.chapter h2 { font-size: clamp(1.75rem, 3.5vw, 2.85rem); line-height: 1.08; max-width: 17ch; margin-bottom: 22px; }
.copy > p { color: var(--muted); font-size: 1.12rem; max-width: 34em; }
.copy-wide { max-width: 760px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.split-flip > .copy { order: 2; }

.screens { margin: 36px 0 0; display: grid; gap: 0; }
.screens > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.screens dt { font: 500 .98rem/1.5 var(--display); letter-spacing: -.02em; }
.screens dd { margin: 0; color: var(--muted); }

.pair { position: relative; margin: 0; padding: 0 0 12% 18%; }
.pair-back { border-radius: 22px; border: 6px solid #03050a; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 80px -24px rgba(0, 0, 0, .8); }
.pair-front { position: absolute; left: 0; bottom: 0; width: 38%; }

.tv-small { width: 100%; margin-top: 48px; }
.tv-small .tv-screen { box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 120px -30px rgba(0, 164, 220, .35); }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); margin: 56px 0 0; }
.specs > div { position: relative; padding: 22px 0 26px; border-top: 1px solid var(--line); }
.specs > div::before { content: ""; position: absolute; top: -1px; left: 0; width: 44px; height: 2px; background: var(--bar); }
.specs dt { font: 500 1.02rem/1.35 var(--display); letter-spacing: -.02em; margin-bottom: 8px; }
.specs dd { margin: 0; color: var(--muted); }

.ticks { list-style: none; margin: 28px 0 0; padding: 0; }
.ticks li { position: relative; padding: 12px 0 12px 32px; border-top: 1px solid var(--line); color: var(--ink); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 14px; height: 8px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }

.code-card {
  margin: 0; padding: clamp(28px, 4vw, 48px); border-radius: 28px;
  background: radial-gradient(120% 90% at 0% 0%, rgba(0, 164, 220, .16), transparent 60%), var(--panel);
  border: 1px solid var(--line); text-align: center;
}
.code-title { font: 500 1.05rem/1 var(--display); color: var(--muted); margin-bottom: 26px; }
.code { display: flex; justify-content: center; gap: clamp(6px, 1.2vw, 12px); margin: 0 0 26px; }
.code span {
  display: grid; place-items: center; width: clamp(40px, 6vw, 64px); aspect-ratio: 4 / 5;
  border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  font: 600 clamp(1.4rem, 3vw, 2.3rem)/1 var(--display);
}
.code span:nth-child(3) { margin-right: clamp(6px, 1.5vw, 16px); }
.code-hint { color: var(--muted); max-width: 26em; margin: 0 auto; font-size: .98rem; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 32px); margin: 0; align-items: start; }
.duo img:last-child { margin-top: 18%; }

.promise { text-align: left; background: radial-gradient(60% 80% at 85% 50%, rgba(255, 69, 133, .12), transparent 70%); }
.promise h2 span { display: block; }
.promise h2 { font-size: clamp(2.1rem, 5.6vw, 4.6rem); line-height: 1.02; margin-bottom: 28px; }
.promise p { color: var(--muted); font-size: 1.15rem; max-width: 36em; }
.links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 28px; font-weight: 600; }

.end-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.end h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.needs { list-style: none; padding: 0; margin: 0; }
.needs li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--muted); }
.needs strong { color: var(--ink); font-weight: 600; }
.end-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 36px; border-radius: 28px; background: var(--panel); border: 1px solid var(--line); }
.end-cta img { border-radius: 22%; box-shadow: 0 18px 40px -12px rgba(139, 84, 245, .6); }

/* Pages de texte (confidentialité, support, mentions). */
.page { padding-block: clamp(48px, 8vw, 96px) clamp(72px, 10vw, 128px); }
.doc { max-width: 720px; }
.doc h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.08; margin-bottom: 16px; }
.doc h2 { font-size: 1.22rem; margin: 48px 0 12px; }
.doc p, .doc li { color: #c9d2e3; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .4em; }
.meta { color: var(--muted); font-size: .95rem; }
.tldr { margin: 32px 0 8px; padding: 22px 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--blue); }
.tldr p { margin: 0; color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 16px 0; }
.datatable { border-collapse: collapse; width: 100%; font-size: .97rem; }
.datatable th, .datatable td { text-align: left; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.datatable th { font-weight: 600; color: var(--ink); }
.datatable td { color: #c9d2e3; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .94em; color: var(--ink); }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; background: var(--panel-strong); padding: 1px 6px; border-radius: 6px; color: var(--ink); }

.contact { margin: 32px 0 40px; padding: 26px; border-radius: 22px; background: radial-gradient(120% 120% at 100% 0%, rgba(255, 69, 133, .12), transparent 60%), var(--panel); border: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.contact .addr { font: 500 clamp(1.1rem, 2.6vw, 1.5rem)/1.2 var(--display); letter-spacing: -.02em; color: var(--ink); word-break: break-all; }
.contact .hint { flex-basis: 100%; margin: 0; color: var(--muted); font-size: .95rem; }
.btn { font: 600 .95rem/1 var(--text); padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: var(--ink); cursor: pointer; }
.btn:hover { background: #fff; color: var(--night); }

details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font-weight: 600; font-size: 1.06rem; color: var(--ink); }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
details > div { padding: 0 0 18px; }
details > div p:last-child { margin-bottom: 0; }

.notfound { text-align: left; }
.notfound .code-lost { font: 600 clamp(4rem, 14vw, 9rem)/1 var(--display); letter-spacing: -.05em; background: var(--bar); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 12px; }

/* Pied de page */
.foot { border-top: 1px solid var(--line); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.foot-brand { display: inline-flex; align-items: center; gap: 9px; font: 600 1rem/1 var(--display); letter-spacing: -.03em; }
.foot-brand img { border-radius: 6px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.foot nav a:hover { color: var(--ink); }
.fine { flex-basis: 100%; margin: 6px 0 0; color: #6f7b93; font-size: .85rem; }

@media (max-width: 900px) {
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .end-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .top .wrap { flex-wrap: wrap; height: auto; padding-block: 12px 0; gap: 10px 16px; }
  .langs { margin-left: auto; }
  .nav { order: 3; width: 100%; margin: 0; gap: 20px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .split { grid-template-columns: 1fr; }
  .split-flip > .copy { order: 0; }
  .tv { width: 100%; }
  .stage { padding-bottom: 0; }
  .skip-intro { right: 5%; }
  .phone-hero { position: relative; right: auto; width: 46%; margin: -18% 0 0 auto; }
  .screens > div { grid-template-columns: 1fr; gap: 2px; }
  .pair { padding-left: 14%; }
  .specs { grid-template-columns: 1fr; }
  .phone { border-width: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
