/* MiruFlow — site public (accueil, pages d'information, pages légales). Même identité que l'appli : papier, pierre, encre. */
@font-face { font-family: "Unbounded"; src: url("/static/fonts/unbounded.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/static/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #f6f6f4; --white: #ffffff; --stone: #e8e7e3; --pebble: #cbc9c3; --ash: #75726c; --ink: #000000; --ink-hover: #2b2b2b;
  --night: #0b0b0a; --night-ink: #f3f2ee; --night-ash: #9d9991;
  --display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
  --text: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --g: clamp(16px, 4vw, 56px);
  --arch: 50% 50% 6px 6px / 37.5% 37.5% 6px 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #0f0f0e; --white: #191917; --stone: #242422; --pebble: #45433f; --ash: #9d9991; --ink: #f3f2ee; --ink-hover: #d9d7d1;
    --night: #191917; color-scheme: dark; }
}
:root[data-theme="dark"] { --paper: #0f0f0e; --white: #191917; --stone: #242422; --pebble: #45433f; --ash: #9d9991; --ink: #f3f2ee; --ink-hover: #d9d7d1;
  --night: #191917; color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--text); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--ink); color: var(--paper); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 10px 16px; background: var(--ink); color: var(--paper); border-radius: 999px; }
.skip:focus { left: 12px; }

/* ---------- l'œil ---------- */
.eye { display: block; width: 100%; height: auto; overflow: visible; stroke-width: 2; }
.eye .pupil circle { fill: currentColor; stroke: none; }
.eye .pupil { transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.eye .lid { transform-origin: 32px 21px; }
.eye.live path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(.6,0,.2,1) forwards; }
.eye.blink .lid { animation: blink .32s ease-in-out; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes blink { 50% { transform: scaleY(.08); } }

/* ---------- en-tête ---------- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 16px var(--g);
  transition: background .3s, box-shadow .3s, padding .3s; }
.top.solid { background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--stone); padding-block: 11px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 17px var(--display); letter-spacing: -.02em; }
.brand .eye { width: 34px; stroke-width: 2.4; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 14px; color: var(--ash); transition: color .15s; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.top-act { display: flex; align-items: center; gap: 10px; }
.icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: inherit; cursor: pointer; }
.icon:hover { background: var(--stone); }
.icon svg { width: 20px; height: 20px; }
.theme-btn .moon, :root[data-dark] .theme-btn .sun { display: none; }
:root[data-dark] .theme-btn .moon { display: block; }
.pill { padding: 9px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.pill:hover { background: var(--ink-hover); }
.burger { display: none; }
.burger i { display: block; width: 18px; height: 1.5px; background: currentColor; margin: 3px 0; transition: transform .25s; }
.burger[aria-expanded="true"] i:first-child { transform: translateY(2.3px) rotate(45deg); }
.burger[aria-expanded="true"] i:last-child { transform: translateY(-2.3px) rotate(-45deg); }

/* ---------- boutons, liens ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 16px 28px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); font: 500 15px var(--text); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.btn:hover { background: var(--ink-hover); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.light { background: var(--night-ink); color: #0b0b0a; border-color: var(--night-ink); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.link { font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.kicker { display: inline-block; font: 400 11px var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--ash); margin-bottom: 18px; }

/* ---------- apparition au défilement ---------- */
.d-card img:not([src]) { visibility: hidden; }
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- accueil : hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px 0 36px; overflow: hidden; }
.hero-in { text-align: center; padding: 0 var(--g); }
.hero-eye { width: clamp(84px, 10vw, 128px); margin: 0 auto 22px; }
.hero-eye .eye { stroke-width: 1.8; }
.mega { font: 600 clamp(64px, 14.5vw, 220px)/.84 var(--display); letter-spacing: -.06em; margin: 0; display: flex; justify-content: center; flex-wrap: wrap; }
.mega span { display: inline-block; opacity: 0; transform: translateY(.25em); animation: rise 1.1s cubic-bezier(.2,.7,.2,1) forwards; }
.mega span:last-child { animation-delay: .12s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero-sub { max-width: 32ch; margin: 28px auto 34px; color: var(--ash); font-size: clamp(17px, 1.6vw, 20px); opacity: 0; animation: rise 1s .45s forwards; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; opacity: 0; animation: rise 1s .6s forwards; }
.hero-note { margin: 22px 0 0; font: 400 11px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ash); opacity: 0; animation: rise 1s .75s forwards; }
.rail { margin-top: clamp(48px, 7vh, 84px); overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.rail-track { display: flex; gap: clamp(14px, 1.6vw, 24px); width: max-content; animation: slide 80s linear infinite; padding: 4px 0; }
.rail:hover .rail-track { animation-play-state: paused; }
.rail .arch { width: clamp(120px, 12vw, 176px); flex: 0 0 auto; }
.arch { position: relative; aspect-ratio: 3 / 4; border-radius: var(--arch); overflow: hidden; background: var(--stone); }
.arch img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.04); transition: filter .6s, transform .6s; }
.rail .arch:hover img { filter: none; transform: scale(1.04); }
.rail .arch.ph { background: linear-gradient(160deg, var(--stone), var(--pebble)); }
@keyframes slide { to { transform: translateX(-50%); } }
.rail-cap { text-align: center; color: var(--ash); font-size: 13px; margin: 18px var(--g) 0; }

/* ---------- sections ---------- */
section { position: relative; }
.how, .demo, .feats, .faq-mini, .final { padding: clamp(80px, 12vw, 150px) var(--g); max-width: 1240px; margin: 0 auto; }
.sec-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
h2 { font: 600 clamp(30px, 4.4vw, 58px)/1.02 var(--display); letter-spacing: -.035em; margin: 0; }
h3 { font: 600 19px/1.25 var(--display); letter-spacing: -.01em; margin: 0 0 10px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 48px); }
.steps li { border-top: 1px solid var(--ink); padding-top: 24px; }
.steps p { color: var(--ash); margin: 0; }
.num { display: block; font: 300 clamp(44px, 5vw, 72px)/1 var(--display); letter-spacing: -.04em; margin-bottom: 22px; }
.steps li:nth-child(2) { transition-delay: .1s; } .steps li:nth-child(3) { transition-delay: .2s; }

/* ---------- démo animée ---------- */
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.demo-copy p { color: var(--ash); font-size: 18px; max-width: 42ch; margin: 22px 0 28px; }
.demo-stage { position: relative; min-height: 470px; display: grid; place-items: center; }
.demo-stage::before { content: ""; position: absolute; inset: 6% 8%; border-radius: var(--arch); background: var(--stone); opacity: .55; }
.d-card { position: relative; width: 236px; background: var(--paper); border-radius: 160px 160px 18px 18px / 120px 120px 18px 18px; padding: 12px 12px 16px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.25); transform: rotate(-3deg); }
.d-card .arch img { filter: none; }
.d-badge { position: absolute; left: 50%; top: 9%; transform: translateX(-50%) scale(0); padding: 7px 11px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font: 600 12px/1 var(--display); transition: transform .45s cubic-bezier(.3,1.6,.4,1); }
.d-badge.on { transform: translateX(-50%) scale(1); }
.d-cap { padding: 14px 4px 0; display: grid; gap: 9px; }
.d-ref { display: flex; justify-content: space-between; font: 400 10px var(--display); letter-spacing: .08em; color: var(--ash); }
.d-air::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); margin-right: 6px; vertical-align: 1px; }
.d-cap > b { font: 600 15px/1.2 var(--display); }
.d-track { position: relative; height: 4px; border-radius: 4px; background: var(--stone); overflow: hidden; }
.d-track i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; transition: width 1s cubic-bezier(.2,.7,.2,1); }
.d-track .aired { background: var(--pebble); } .d-track .seen { background: var(--ink); }
.d-step { display: flex; align-items: center; justify-content: space-between; }
.d-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--ink); font-size: 16px; }
.d-btn.plus { background: var(--ink); color: var(--paper); transition: transform .2s; }
.d-btn.press { transform: scale(.86); }
.d-ep { font-size: 13px; color: var(--ash); } .d-ep b { font: 600 20px var(--display); color: var(--ink); }
.toast-stack { position: absolute; right: -2%; top: 12%; display: grid; gap: 12px; width: min(250px, 60%); }
.d-toast { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--white); border: 1px solid var(--stone);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.3); font-size: 13px; opacity: 0; transform: translateX(30px); transition: opacity .6s, transform .6s cubic-bezier(.2,.7,.2,1); }
.d-toast.on { opacity: 1; transform: none; }
.d-toast b { font: 600 13.5px var(--display); }
.d-from { font: 400 10px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ash); }
.d-toast.discord { border-left: 3px solid #5865f2; }

/* ---------- fonctionnalités ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--stone); border: 1px solid var(--stone); border-radius: 28px; overflow: hidden; }
.feat { background: var(--paper); padding: clamp(26px, 3vw, 40px); transition: background .3s; }
.feat:hover { background: var(--white); }
.feat p { color: var(--ash); margin: 0; font-size: 15px; }
.ico { width: 34px; height: 34px; margin-bottom: 22px; stroke-width: 1.4; }
.feat:nth-child(3n+2) { transition-delay: .08s; } .feat:nth-child(3n) { transition-delay: .16s; }

/* ---------- bandeau sombre Crunchyroll ---------- */
.band { background: var(--night); color: var(--night-ink); border-radius: clamp(28px, 4vw, 48px); margin: 0 var(--g); }
.band-in { max-width: 1240px; margin: 0 auto; padding: clamp(64px, 9vw, 120px) clamp(24px, 5vw, 72px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.band .kicker { color: var(--night-ash); }
.band p { color: var(--night-ash); font-size: 18px; max-width: 46ch; margin: 22px 0 30px; }
.sync { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; }
.sync-node { display: grid; justify-items: center; gap: 8px; font: 600 15px var(--display); text-align: center; }
.sync-node small { font: 400 12.5px var(--text); color: var(--night-ash); min-height: 1.4em; }
.sync-dot { width: 74px; height: 74px; border-radius: 50%; border: 1px solid #ffffff40; position: relative; }
.sync-dot::after { content: ""; position: absolute; inset: 24px; border-radius: 50%; background: var(--night-ink); }
.sync-dot.on { animation: glow 3s infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 #ffffff00; } 50% { box-shadow: 0 0 0 14px #ffffff12; } }
.sync-line { position: relative; height: 1px; background: #ffffff30; overflow: hidden; }
.sync-line i { position: absolute; top: -2px; left: -30%; width: 30%; height: 5px; border-radius: 4px; background: linear-gradient(90deg, transparent, var(--night-ink)); animation: flow 3s cubic-bezier(.5,0,.5,1) infinite; }
@keyframes flow { to { left: 100%; } }

/* ---------- FAQ ---------- */
.qa { border-top: 1px solid var(--ink); }
.qa details { border-bottom: 1px solid var(--stone); }
.qa summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font: 500 18px/1.35 var(--display); letter-spacing: -.01em; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: linear-gradient(currentColor, currentColor) center / 14px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 14px no-repeat; transition: transform .3s; }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa p { margin: -6px 0 24px; color: var(--ash); max-width: 70ch; }
.more { margin-top: 28px; }

/* ---------- appel final ---------- */
.final { text-align: center; }
.final-eye { width: 92px; margin: 0 auto 28px; }
.final h2 { font-size: clamp(36px, 6vw, 84px); max-width: 14ch; margin: 0 auto 40px; }

/* ---------- pages ---------- */
.page main { padding-top: 120px; }
.phead { max-width: 940px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--g) clamp(28px, 4vw, 48px); }
.phead h1 { font: 600 clamp(40px, 7vw, 96px)/.95 var(--display); letter-spacing: -.05em; margin: 0; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ash); max-width: 52ch; margin: 24px 0 0; }
.lead a { color: var(--ink); }
.prose { max-width: 940px; margin: 0 auto; padding: 0 var(--g) clamp(80px, 10vw, 140px); }
.prose.wide { max-width: 1100px; }
.frows { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.frow { display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding: 34px 0; border-bottom: 1px solid var(--stone); }
.frow .ico { width: 40px; height: 40px; margin: 4px 0 0; }
.frow h2 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 10px; }
.frow p { color: var(--ash); margin: 0; max-width: 64ch; font-size: 17px; }
.cta-line { margin-top: 48px; }
.faq-sec { margin-bottom: 56px; }
.faq-sec h2 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 16px; }
.rels { border-top: 1px solid var(--ink); }
.rel { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 30px 0; border-bottom: 1px solid var(--stone); }
.rel-v { font: 300 clamp(28px, 3vw, 40px)/1 var(--display); letter-spacing: -.03em; }
.rel h2 { font-size: 22px; margin-bottom: 10px; }
.rel ul { margin: 0; padding-left: 18px; color: var(--ash); }
.legal h2 { font-size: clamp(20px, 2.2vw, 26px); margin: 48px 0 14px; }
.legal p, .legal li { color: var(--ash); } .legal b { color: var(--ink); font-weight: 600; }
.legal a { color: var(--ink); }
.legal table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0 16px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--stone); }
.legal th { font: 500 11px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.legal td:first-child { color: var(--ink); }
.updated { margin-top: 56px; font-size: 13px; }

/* ---------- formulaire de contact ---------- */
.cform { display: grid; gap: 20px; max-width: 620px; }
.cform label { display: grid; gap: 8px; font-size: 13px; font-weight: 500; }
.cform input, .cform select, .cform textarea { width: 100%; padding: 15px 20px; border-radius: 22px; border: 1px solid transparent; background: var(--stone);
  color: var(--ink); font: 400 16px var(--text); outline: none; transition: border-color .15s, background .15s; }
.cform input, .cform select { border-radius: 999px; }
.cform select { appearance: none; -webkit-appearance: none; padding-right: 48px; cursor: pointer;
  background: var(--stone) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2375726c' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 22px center / 12px 8px; }
.cform input:focus, .cform select:focus, .cform textarea:focus { border-color: var(--ink); background-color: var(--white); }
.cform .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.fine { font-size: 13px; color: var(--ash); margin: 0; }
.cmsg { margin: 0; padding: 14px 18px; border-radius: 18px; border: 1px solid var(--ink); }
.cmsg.err { color: #a3261c; border-color: #a3261c; }

/* ---------- pied de page ---------- */
.foot { border-top: 1px solid var(--stone); margin-top: clamp(40px, 6vw, 80px); }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 56px var(--g) 40px; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.foot-brand p { color: var(--ash); max-width: 34ch; margin: 16px 0 0; font-size: 14px; }
.foot nav { display: grid; gap: 10px; align-content: start; }
.foot nav b { font: 500 11px var(--display); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.foot nav a { text-decoration: none; color: var(--ash); font-size: 14px; }
.foot nav a:hover, .foot nav a[aria-current] { color: var(--ink); }
.foot-base { max-width: 1240px; margin: 0 auto; padding: 22px var(--g) 36px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--stone); color: var(--ash); font-size: 12.5px; }

/* ---------- mobile ---------- */
@media (max-width: 900px) {
  .demo, .band-in { grid-template-columns: 1fr; }
  .demo-stage { min-height: 430px; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .foot-in { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .burger { display: inline-grid; }
  .nav { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: -1; flex-direction: column; justify-content: center; align-items: center; gap: 28px; margin: 0;
    background: var(--paper); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .nav a { font: 600 26px var(--display); color: var(--ink); }
  .top.open .nav { opacity: 1; pointer-events: auto; }
  .top { gap: 12px; }
  .top-act { margin-left: auto; }
  .steps, .feat-grid { grid-template-columns: 1fr; }
  .toast-stack { position: relative; right: auto; top: auto; width: 100%; margin-top: 18px; }
  .demo-stage { display: flex; flex-direction: column; min-height: 0; padding: 28px 0; }
  .sync { grid-template-columns: 1fr; justify-items: center; }
  .sync-line { width: 1px; height: 54px; } .sync-line i { left: -2px; top: -30%; width: 5px; height: 30%; animation-name: flowv; }
  .frow { grid-template-columns: 1fr; gap: 12px; }
  .rel { grid-template-columns: 1fr; gap: 8px; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal td { display: block; } .legal thead { display: none; }
  .legal tr { padding: 12px 0; border-bottom: 1px solid var(--stone); } .legal td { border: 0; padding: 2px 0; }
  .foot-in { grid-template-columns: 1fr; }
}
@keyframes flowv { to { top: 100%; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal], .mega span, .hero-sub, .hero-cta, .hero-note { opacity: 1; transform: none; }
}
