/* Kosmy — page de présentation d'une application.
   Les couleurs, polices et arrondis viennent du thème de l'appli (apps/<id>/app.json → look). */
:root {
  --bg: #0d0c0a; --surface: #17150f; --text: #f1ede4; --muted: #9a9486;
  --accent: #c5f04a; --accent2: var(--accent); --on-accent: #0d0c0a; --radius: 18px;
  --font-fallback: "Instrument Serif", Georgia, serif;
  --font-d: var(--font-fallback); --font-b: "Inter Tight", system-ui, sans-serif;
  --line: color-mix(in srgb, var(--text) 12%, transparent);
  --soft: color-mix(in srgb, var(--text) 6%, transparent);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: max(clamp(20px, 6vw, 96px), calc((100vw - 1440px) / 2));
  --bar-h: 68px;
  color-scheme: dark;
}
:root[data-mode="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font-b);
  overflow-x: hidden; -webkit-font-smoothing: antialiased; transition: background .6s;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: .05em; text-transform: uppercase; }
.ico { width: 1.2em; height: 1.2em; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }
@keyframes up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-8%, 10%) scale(1.15); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) scale(1.1); } 50% { transform: translate(10%, -8%) scale(.9); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes shine { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(220%) skewX(-20deg); } }

.up { animation: up .9s var(--ease) both; animation-delay: var(--d, 0s); }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Barre du haut ---------- */
.pbar {
  position: sticky; top: 0; z-index: 30; height: var(--bar-h);
  display: flex; align-items: center; gap: 16px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.back { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; color: var(--muted); transition: color .25s; }
.back:hover { color: var(--text); }
.back .k { width: 30px; height: 30px; border-radius: 8px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line); }
.back .k img { width: 100%; height: 100%; transform: scale(1.3); transition: transform .6s var(--ease); }
.back:hover .k img { transform: scale(1.3) rotate(-12deg); }
.back .chev { transition: transform .3s var(--ease); }
.back:hover .chev { transform: translateX(-4px); }
.who { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; padding-left: 16px; border-left: 1px solid var(--line); }
.who .logo { width: 28px; height: 28px; border-radius: 8px; }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.lang { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang-btn { font-size: 11px; letter-spacing: .06em; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 5px 10px; border-radius: 999px; transition: color .25s, background .25s; }
.lang-btn:hover { color: var(--text); }
.lang-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.gh-btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.gh-btn::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: shine 3.6s ease-in-out 1.5s infinite; }
.gh-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--accent); }

/* ---------- Tuiles de logo ---------- */
.logo { --c: #fff; display: inline-grid; place-items: center; overflow: hidden; flex: none; background: #16140f; box-shadow: 0 0 0 1px var(--line); }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo.tiled img { width: 72%; height: 72%; object-fit: contain; }

/* ---------- Hero ---------- */
.phero {
  --gx: 30%; --gy: 40%;
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100svh - var(--bar-h)); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: clamp(32px, 5vw, 80px);
  padding: clamp(40px, 7vh, 88px) var(--gutter);
}
.phero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(600px circle at var(--gx) var(--gy), color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
  transition: background .2s;
}
.motif {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none;
  --m: radial-gradient(ellipse 75% 85% at 72% 42%, #000 25%, rgba(0,0,0,.3) 65%, transparent 100%);
  mask-image: var(--m); -webkit-mask-image: var(--m);
}
.blob { position: absolute; z-index: -3; border-radius: 50%; filter: blur(80px); opacity: .35; pointer-events: none; }
:root[data-mode="light"] .blob { opacity: .28; }
.b1 { width: 46vw; height: 46vw; right: -12vw; top: -14vw; background: var(--glow1, var(--accent)); animation: drift1 18s ease-in-out infinite; }
.b2 { width: 34vw; height: 34vw; left: -10vw; bottom: -16vw; background: var(--glow2, var(--accent2)); animation: drift2 22s ease-in-out infinite; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 28px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s ease-out infinite; }
.app-id { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); }
.logo-wrap { position: relative; display: inline-grid; animation: float 6s ease-in-out infinite; }
.logo.big { width: clamp(72px, 8vw, 104px); height: clamp(72px, 8vw, 104px); border-radius: 28%; box-shadow: 0 20px 50px -18px var(--accent), 0 0 0 1px var(--line); }
.ring { position: absolute; inset: -12px; border-radius: 34%; border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent); animation: spin 26s linear infinite; }
.phero-copy { min-width: 0; }
.name { white-space: nowrap; font-family: var(--font-d); font-weight: 600; font-size: clamp(64px, 9vw, 136px); line-height: .9; letter-spacing: -.03em; }
.tagline { margin-top: 28px; font-family: var(--font-d); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.2; font-weight: 500; max-width: 22ch; }
.tagline .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.tagline .w > span { display: inline-block; animation: rise .8s var(--ease) both; }
.intro { margin-top: 20px; font-size: 17px; color: var(--muted); max-width: 52ch; }
.cta { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.btn-accent {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; padding: 16px 24px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 16px; white-space: nowrap;
  box-shadow: 0 18px 40px -18px var(--accent); transition: transform .35s var(--ease), box-shadow .35s;
}
.btn-accent .arr { transition: transform .35s var(--ease); }
.btn-accent:hover .arr { transform: translate(3px, -3px); }
.btn-accent::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); animation: shine 4s ease-in-out 2s infinite; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 22px; border-radius: 999px; font-weight: 500; white-space: nowrap;
  border: 1px solid var(--line); transition: background .3s, border-color .3s;
}
.btn-ghost:hover { background: var(--soft); border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.chips { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 12px; font-weight: 500; padding: 5px 12px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.chips .lic { color: var(--muted); }

.phero-shot { --rx: 0deg; --ry: 0deg; perspective: 1400px; }
.phero-shot .frame { transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s var(--ease); cursor: zoom-in; box-shadow: 0 50px 100px -40px rgba(0,0,0,.55), 0 0 0 1px var(--line); }
.phero-shot .phone-f { margin: 0 auto; max-width: min(320px, calc((100svh - 200px) / 2.2)); }
.logo-stage { display: grid; place-items: center; min-height: 380px; }
.logo.huge { width: min(280px, 60%); aspect-ratio: 1; height: auto; border-radius: 26%; box-shadow: 0 40px 90px -30px var(--accent); animation: float 6s ease-in-out infinite; }

/* ---------- Cadres de capture ---------- */
.frame { display: block; position: relative; overflow: hidden; background: var(--surface); }
.browser-f { border-radius: 14px; border: 1px solid var(--line); }
.bbar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: color-mix(in srgb, var(--surface) 80%, var(--text) 6%); border-bottom: 1px solid var(--line); }
.bbar i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--text) 22%, transparent); }
.bbar i:first-child { background: #ff5f57; } .bbar i:nth-child(2) { background: #febc2e; } .bbar i:nth-child(3) { background: #28c840; }
.bbar .url { margin: 0 auto; transform: translateX(-20px); font-size: 10px; color: var(--muted); padding: 3px 14px; border-radius: 999px; background: var(--soft); text-transform: none; }
.browser-f img { width: 100%; height: auto; }
.phone-f { border-radius: 38px; padding: 10px; background: #0b0b0c; border: 1px solid rgba(255,255,255,.14); }
.phone-f img { border-radius: 29px; width: 100%; height: auto; }
.phone-f .notch { position: absolute; left: 50%; top: 18px; translate: -50% 0; width: 70px; height: 18px; border-radius: 999px; background: #0b0b0c; z-index: 2; }

/* ---------- Bandeau défilant ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); padding: 18px 0; }
.marquee .track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee span { display: inline-flex; align-items: center; gap: 12px; padding: 0 28px; font-family: var(--font-d); font-size: 22px; font-weight: 500; white-space: nowrap; }
.marquee span .ico { color: var(--accent); }
.marquee span::after { content: "✦"; margin-left: 44px; color: var(--accent); font-size: 14px; }

/* ---------- Sections ---------- */
.sec { padding: clamp(80px, 12vh, 140px) var(--gutter) 0; }
.sec-head { position: relative; display: grid; gap: 14px; margin-bottom: 48px; max-width: 760px; }
.kicker { font-size: 12px; color: var(--accent); display: inline-flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 24px; height: 1.5px; background: currentColor; }
.sec h2 { font-family: var(--font-d); font-size: clamp(40px, 5vw, 72px); line-height: 1; font-weight: 600; letter-spacing: -.02em; }
.sec h2 em { font-style: italic; color: var(--accent); font-weight: 500; }
.sec-text { color: var(--muted); font-size: 17px; max-width: 56ch; }

/* Fonctionnalités */
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feat {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden; isolation: isolate; padding: 32px 28px 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); min-height: 230px;
  transition: transform .5s var(--ease), border-color .4s, opacity .9s var(--ease);
}
.feat::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; background: radial-gradient(320px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 18%, transparent), transparent 65%); }
.feat:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.feat:hover::before { opacity: 1; }
.feat-ico { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: calc(var(--radius) * .7); background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 22px; transition: transform .6s var(--ease), background .4s, color .4s; }
.feat:hover .feat-ico { transform: rotate(-8deg) scale(1.08); background: var(--accent); color: var(--on-accent); }
.feat h3 { margin-top: 24px; font-size: 20px; font-weight: 600; line-height: 1.25; }
.feat p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.feat-n { position: absolute; top: 24px; right: 24px; font-size: 11px; color: var(--muted); opacity: .6; }

/* Galerie */
.shots .sec-head { max-width: none; grid-template-columns: 1fr auto; align-items: end; }
.shots .sec-head .kicker, .shots .sec-head h2 { grid-column: 1; }
.shot-nav { grid-column: 2; grid-row: 1 / 3; display: flex; gap: 10px; }
.nav-btn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; transition: background .3s, color .3s, transform .3s var(--ease); }
.nav-btn:hover { background: var(--accent); color: var(--on-accent); transform: scale(1.06); }
.shot-track {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  margin-inline: calc(var(--gutter) * -1); padding: 10px var(--gutter) 30px; scrollbar-width: thin; scrollbar-color: var(--accent) transparent;
}
.shot { flex: none; scroll-snap-align: start; }
.shot.is-desktop { width: min(720px, 82vw); }
.shot.is-mobile { width: min(250px, 62vw); }
.shot-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 16px; }
.shot-open .frame { transition: transform .6s var(--ease), box-shadow .6s; box-shadow: 0 30px 60px -36px rgba(0,0,0,.5); }
.shot-open:hover .frame { transform: translateY(-8px) scale(1.01); box-shadow: 0 40px 80px -30px color-mix(in srgb, var(--accent) 55%, transparent); }
.shot figcaption { margin-top: 16px; display: flex; gap: 12px; align-items: baseline; font-weight: 500; }
.shot figcaption .mono { font-size: 11px; color: var(--accent); }

/* Dépendances */
.dep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.dep { --mx: 50%; --my: 50%; position: relative; overflow: hidden; isolation: isolate; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .5s var(--ease), border-color .4s, opacity .9s var(--ease); }
.dep::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; background: radial-gradient(300px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent2) 18%, transparent), transparent 65%); }
.dep:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent2) 50%, transparent); }
.dep:hover::before { opacity: 1; }
.dep-top { display: flex; align-items: center; gap: 14px; }
.dep-mono { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent2); color: var(--on-accent); font-weight: 700; text-transform: uppercase; font-size: 15px; }
.dep h3 { font-size: 20px; font-weight: 600; }
.dep > p { margin-top: 14px; color: var(--muted); font-size: 15px; }
.dep-links { margin-top: 20px; display: grid; gap: 8px; }
.dep-links:empty { display: none; }
.dep-grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.dep.has-items { grid-column: 1 / -1; }
.dep.has-items .dep-links { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dep-items { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.dep-items li { font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); transition: background .3s, color .3s, transform .3s var(--ease); }
.dep-items li:hover { background: var(--accent2); color: var(--on-accent); transform: translateY(-2px); }
.dep-items li.with-logo { display: inline-flex; align-items: center; gap: 8px; padding-left: 5px; }
.chip-logo { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; overflow: hidden; background: #16140f; flex: none; transition: transform .4s var(--ease); }
.chip-logo img { width: 100%; height: 100%; object-fit: cover; }
.chip-logo.tiled img { width: 72%; height: 72%; object-fit: contain; }
.dep-items li.with-logo:hover .chip-logo { transform: rotate(-10deg) scale(1.1); }
.dep-links a { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--soft); transition: background .3s, transform .3s var(--ease); }
.dep-links a .ico { grid-row: span 2; color: var(--accent2); }
.dep-links a span { font-weight: 600; font-size: 14px; }
.dep-links a small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep-links a:hover { background: color-mix(in srgb, var(--accent2) 18%, transparent); transform: translateX(4px); }

/* Versions */
.timeline { --p: 0; position: relative; display: grid; gap: 4px; max-width: 900px; padding-left: 34px; }
.timeline::before, .timeline::after { content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; }
.timeline::before { background: var(--line); }
.timeline::after { background: linear-gradient(var(--accent), var(--accent2)); transform-origin: top; transform: scaleY(var(--p)); }
.tl { position: relative; display: grid; grid-template-columns: 170px 120px 1fr; align-items: baseline; gap: 16px; padding: 18px 20px; border-radius: 14px; transition: background .3s, opacity .9s var(--ease), transform .9s var(--ease); }
.tl:hover { background: var(--soft); }
.tl-dot { position: absolute; left: -32px; top: 24px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tl:first-child .tl-dot { background: var(--accent); animation: pulse 1.8s ease-out infinite; }
.tl-v { font-size: 15px; font-weight: 500; color: var(--text); display: inline-flex; align-items: center; gap: 10px; }
.tl-v em { font-style: normal; font-size: 10px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.tl-upd { font-size: 12px; color: var(--muted); }
.tl-date { font-size: 12px; color: var(--muted); text-transform: none; }
.tl-note { font-size: 16px; }
.more-link { display: inline-block; margin: 24px 0 0 34px; font-weight: 500; color: var(--accent); background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat; padding-bottom: 3px; transition: background-size .4s; }
.more-link:hover { background-size: 0 1px; background-position: right bottom; }

/* Installation */
.install { padding-bottom: 0; }
.install-card {
  --mx: 70%; --my: 30%;
  position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: center;
  padding: clamp(32px, 5vw, 64px); border-radius: calc(var(--radius) * 1.6); background: var(--surface); border: 1px solid var(--line);
}
.install-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%); }
.install-copy .sec-text { margin-top: 16px; }
.term { border-radius: 16px; overflow: hidden; background: #0c0c0e; color: #e8e6e1; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 70px -30px rgba(0,0,0,.6); }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #17171a; border-bottom: 1px solid rgba(255,255,255,.08); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font-size: 11px; color: #8d8a84; text-transform: none; }
.copy { margin-left: auto; font-size: 11px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: none; color: #e8e6e1; cursor: pointer; transition: background .25s, color .25s; }
.copy:hover { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.term pre { margin: 0; padding: 22px 20px 26px; font: 14px/1.9 "JetBrains Mono", ui-monospace, monospace; white-space: pre-wrap; word-break: break-word; }
.term .mute { color: #7d7a74; }
.term .prompt { color: var(--accent); }
.term .cmd { color: #fff; }
.caret { display: inline-block; width: 9px; height: 1.1em; margin-left: 4px; vertical-align: -3px; background: var(--accent); animation: blink 1s steps(1) infinite; }

/* Suivante / précédente */
.pnext { margin: clamp(80px, 12vh, 140px) var(--gutter) 0; display: grid; grid-template-columns: 1fr auto 1fr; border-block: 1px solid var(--line); }
.pn { position: relative; isolation: isolate; display: grid; gap: 14px; padding: 36px 28px; overflow: hidden; transition: color .35s; }
.pn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--c, var(--accent)); transform: scaleY(0); transform-origin: bottom; transition: transform .55s cubic-bezier(.7, 0, .2, 1); }
.pn:hover { color: var(--ink, var(--on-accent)); }
.pn:hover::before { transform: scaleY(1); }
.pn .mono { font-size: 11px; opacity: .7; }
.pn-row { display: flex; align-items: center; gap: 16px; }
.pn .logo { width: 52px; height: 52px; border-radius: 14px; transition: transform .6s var(--ease); }
.pn:hover .logo { transform: rotate(-10deg) scale(1.1); }
.pn-name { font-family: var(--font-d); font-size: clamp(32px, 4vw, 52px); font-weight: 600; line-height: 1; }
.pn.next { justify-items: end; text-align: right; }
.pn.all { align-content: center; justify-items: center; border-inline: 1px solid var(--line); }
.pn-dots { display: flex; gap: 6px; }
.pn-dots i { width: 9px; height: 9px; border-radius: 50%; opacity: .45; transition: transform .3s var(--ease), opacity .3s; }
.pn-dots i.on { opacity: 1; transform: scale(1.5); }
.pn.all:hover .pn-dots i { opacity: 1; }
.pn.all::before { background: var(--accent); }
.pn.all:hover { color: var(--on-accent); }

/* Pied de page */
.pfoot { padding: 40px var(--gutter) 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--muted); }
.pfoot a:hover { color: var(--accent); }

/* Visionneuse */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; color: #fff; }
.lightbox::backdrop { background: rgba(5, 5, 6, .88); backdrop-filter: blur(6px); }
.lightbox figure { position: absolute; inset: 56px 90px 70px; display: grid; place-items: center; grid-template-rows: 1fr auto; gap: 14px; animation: up .4s var(--ease) both; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; border-radius: 12px; box-shadow: 0 40px 100px rgba(0,0,0,.6); }
.lightbox figure.is-mobile img { border-radius: 26px; }
.lightbox figcaption { font-weight: 500; }
.lightbox figcaption .mono { font-size: 11px; color: var(--accent); margin-right: 8px; }
.lb-btn { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; font-size: 18px; transition: background .25s, color .25s; }
.lb-btn:hover { background: var(--accent); color: var(--on-accent); }
.lb-prev { left: 22px; top: 50%; translate: 0 -50%; } .lb-next { right: 22px; top: 50%; translate: 0 -50%; } .lb-close { right: 22px; top: 22px; }
.load-error { padding: 120px var(--gutter); font-size: 18px; }
.load-error a { color: var(--accent); }

/* ---------- Applis en plusieurs versions (Kosmy Board : web + Android) ---------- */
/* Haut de page : le navigateur, et le téléphone posé devant */
.duo { position: relative; padding: 0 0 clamp(40px, 6vw, 80px); }
.duo-web { display: block; width: 86%; }
.duo-mob { position: absolute; right: 0; bottom: 0; width: 27%; min-width: 118px; animation: float 7s ease-in-out infinite; }
.duo .phone-f { max-width: none; margin: 0; border-radius: 26px; padding: 6px; box-shadow: 0 40px 80px -24px rgba(0,0,0,.7), 0 0 0 1px var(--line); }
.duo .phone-f img { border-radius: 20px; }
.duo .phone-f .notch { top: 11px; width: 40px; height: 10px; }
.duo [data-open] .frame { cursor: zoom-in; }

/* Une carte par version */
.ed-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ed-card {
  --mx: 50%; --my: 50%;
  position: relative; overflow: hidden; isolation: isolate; display: grid; align-content: start; justify-items: start; gap: 10px; text-align: left;
  padding: clamp(26px, 3vw, 40px); border-radius: calc(var(--radius) * 1.3); background: var(--surface); border: 1px solid var(--line); cursor: pointer;
  transition: transform .5s var(--ease), border-color .4s, background .4s, opacity .9s var(--ease);
}
.ed-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; background: radial-gradient(380px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%); }
.ed-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.ed-card:hover::before { opacity: 1; }
.ed-card[aria-selected="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.ed-ico { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; font-size: 26px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); transition: background .4s, color .4s, transform .6s var(--ease); }
.ed-card:hover .ed-ico { transform: rotate(-8deg) scale(1.06); }
.ed-card[aria-selected="true"] .ed-ico { background: var(--accent); color: var(--on-accent); }
.ed-label { margin-top: 14px; font-size: 11px; color: var(--muted); }
.ed-name { font-family: var(--font-d); font-size: clamp(34px, 3.6vw, 52px); line-height: 1; letter-spacing: -.01em; }
.ed-sub { color: var(--muted); font-size: 16px; max-width: 46ch; }
.ed-plat { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ed-plat i { font-style: normal; font-size: 12px; font-weight: 500; padding: 4px 11px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.ed-go { margin-top: 14px; font-size: 11px; color: var(--muted); }
.ed-go .shown, .ed-card[aria-selected="true"] .ed-go .see { display: none; }
.ed-card[aria-selected="true"] .ed-go .shown { display: inline; color: var(--accent); }
.ed-sync { margin-top: 18px; display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: var(--radius); border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); color: var(--muted); }
.ed-sync .ico { color: var(--accent); font-size: 22px; animation: spin 9s linear infinite; }

/* Sélecteur qui reste en haut pendant la lecture */
.ed-switch {
  position: sticky; top: calc(var(--bar-h) + 14px); z-index: 20; display: flex; width: max-content; max-width: calc(100% - 32px); margin: 56px auto 0; padding: 5px;
  border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: 0 18px 40px -20px rgba(0,0,0,.6);
}
.ed-switch button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 999px; background: none; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; transition: color .35s; }
.ed-switch button:hover { color: var(--text); }
.ed-switch button[aria-selected="true"] { color: var(--on-accent); }
.ed-switch .pill { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: var(--px, 5px); width: var(--pw, 0); border-radius: 999px; background: var(--accent); box-shadow: 0 8px 24px -8px var(--accent); transition: left .45s var(--ease), width .45s var(--ease); }
.ed-body { transition: opacity .22s, transform .22s var(--ease); }
.ed-body.swap-out { opacity: 0; transform: translateY(14px); }
.ed-pick + .ed-switch + .ed-body > .sec:first-child { padding-top: clamp(48px, 8vh, 90px); }

/* Installation d'un APK : les étapes */
.steps { padding: 22px 22px 26px; display: grid; gap: 16px; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: baseline; font-size: 15px; line-height: 1.5; }
.steps li .mono { color: var(--accent); font-size: 12px; }

/* ---------- Saveurs propres à certaines applis ---------- */
/* Soundy : neumorphisme, ombres douces en relief */
:root[data-flavor="neu"] { --neu-hi: rgba(255,255,255,.85); --neu-lo: rgba(140,152,190,.45); }
[data-flavor="neu"] .feat, [data-flavor="neu"] .dep, [data-flavor="neu"] .install-card, [data-flavor="neu"] .nav-btn, [data-flavor="neu"] .chips li, [data-flavor="neu"] .marquee {
  border-color: transparent; background: var(--bg); box-shadow: 8px 8px 18px var(--neu-lo), -8px -8px 18px var(--neu-hi);
}
[data-flavor="neu"] .feat:hover { box-shadow: inset 6px 6px 14px var(--neu-lo), inset -6px -6px 14px var(--neu-hi); }
[data-flavor="neu"] .feat-ico { background: var(--bg); box-shadow: 4px 4px 10px var(--neu-lo), -4px -4px 10px var(--neu-hi); }
[data-flavor="neu"] .btn-ghost { border-color: transparent; box-shadow: 6px 6px 14px var(--neu-lo), -6px -6px 14px var(--neu-hi); }
[data-flavor="neu"] .logo.big { box-shadow: 10px 10px 24px var(--neu-lo), -10px -10px 24px var(--neu-hi); }
/* Sprixy : pixel art, ombres dures et angles nets */
[data-flavor="pixel"] .feat, [data-flavor="pixel"] .dep, [data-flavor="pixel"] .install-card, [data-flavor="pixel"] .btn-accent, [data-flavor="pixel"] .btn-ghost, [data-flavor="pixel"] .gh-btn, [data-flavor="pixel"] .nav-btn, [data-flavor="pixel"] .chips li {
  border-radius: 4px; border: 2px solid var(--text); box-shadow: 5px 5px 0 var(--text);
}
[data-flavor="pixel"] .feat:hover, [data-flavor="pixel"] .btn-accent:hover, [data-flavor="pixel"] .btn-ghost:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--accent2); }
[data-flavor="pixel"] .feat-ico, [data-flavor="pixel"] .dep-mono { border-radius: 2px; }
[data-flavor="pixel"] .ring { border-radius: 0; border-style: dotted; border-width: 3px; }
[data-flavor="pixel"] .sec h2 em, [data-flavor="pixel"] .kicker { font-family: "JetBrains Mono", monospace; }
/* Crafty : cartes en verre sur une aurore */
[data-flavor="glass"] .feat, [data-flavor="glass"] .dep, [data-flavor="glass"] .install-card { background: color-mix(in srgb, var(--surface) 55%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
[data-flavor="glass"] body { background: radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), radial-gradient(900px 500px at 0% 60%, color-mix(in srgb, var(--accent2) 14%, transparent), transparent 60%), var(--bg); background-attachment: fixed; }

/* Kosmy Board : l'identité du site Kosmy (Instrument Serif fin, grain, vert signal) */
[data-flavor="kosmy"] .name, [data-flavor="kosmy"] .tagline, [data-flavor="kosmy"] .sec h2, [data-flavor="kosmy"] .ed-name, [data-flavor="kosmy"] .pn-name, [data-flavor="kosmy"] .marquee span { font-weight: 400; }
[data-flavor="kosmy"] .sec h2 em { font-weight: 400; }
[data-flavor="kosmy"] .blob { opacity: .22; }
[data-flavor="kosmy"] .tagline { font-size: clamp(26px, 2.6vw, 38px); }
[data-flavor="kosmy"] body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .phero { grid-template-columns: 1fr; min-height: 0; }
  .phero-shot { max-width: 760px; }
  .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install-card { grid-template-columns: 1fr; }
  .tl { grid-template-columns: 150px 1fr; }
  .tl-note { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .who { display: none; }
  .gh-btn .t { display: none; }
  .gh-btn { padding: 10px 12px; }
  .back .t { display: none; }
  .feats { grid-template-columns: 1fr; }
  .feat { min-height: 0; }
  .shots .sec-head { grid-template-columns: 1fr; }
  .shot-nav { display: none; }
  .pnext { grid-template-columns: 1fr 1fr; }
  .pn.all { display: none; }
  .pn { padding: 28px 16px; }
  .lightbox figure { inset: 70px 12px 80px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; translate: none; }
  .tl { grid-template-columns: 1fr; gap: 4px; padding: 14px 12px; }
  .ed-cards { grid-template-columns: 1fr; }
  .ed-switch button { padding: 9px 14px; font-size: 13px; }
  .duo-mob { width: 30%; min-width: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
