/* Retenu web (app.retenu.app) — jetons de brand/tokens.json, polices locales (pas de Google Fonts). */
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-latin-ext-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-ext-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-ext-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-ext-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; src: url("fonts/geist-cyrillic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist"; src: url("fonts/geist-cyrillic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist"; src: url("fonts/geist-cyrillic-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-ext-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin-ext-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-cyrillic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-cyrillic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
:root {
  color-scheme: light;
  --paper: #ffffff; --ink: #0d0d0d; --ink-2: #4d4d4d; --ink-3: #666666;
  --line: #ececec; --line-soft: #f2f2f2; --fill: #fafafa; --thumb: #e6e6e6;
  --lilac: #a98be8; --lilac-ink: #5b3fc4; --lilac-soft: #f1ebff; --lilac-line: #c9b8f5;
  --peche-1: #fff1e8; --peche-2: #ffd9e2; --peche-3: #ead6ff;
  --pervenche-1: #e9f3ff; --pervenche-2: #ddd8ff; --pervenche-3: #f3d6ff;
  --menthe-1: #e7fbf6; --menthe-2: #d6f0ff; --menthe-3: #e3e0ff;
  --abricot-1: #fff6e2; --abricot-2: #ffe1d8; --abricot-3: #ffd3e7;
  --citron-vert-1: #f5ffe6; --citron-vert-2: #e2f7f0; --citron-vert-3: #d7ecff;
  --lilas-1: #f6ebff; --lilas-2: #e6e5ff; --lilas-3: #d9f1ff;
  --rose-1: #ffe9f3; --rose-2: #eadcff; --rose-3: #d6e4ff;
  --creme-1: #fff3de; --creme-2: #ffe4d4; --creme-3: #f9d9e9;
  --hero: radial-gradient(120% 110% at 0% 0%, rgba(255,255,255,.75) 0%, rgba(255,255,255,0) 55%), linear-gradient(150deg, #fff1e8 0%, #ffd9e2 35%, #e6dcff 70%, #d6ecff 100%);
  --progress: linear-gradient(90deg, #ffc9b5, #d9c7ff, #b9dcff);
  --display: "Instrument Serif", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-s: 10px; --r-m: 14px; --r-l: 16px; --r-xl: 18px; --r-2xl: 24px; --r-hero: 32px;
  --shadow-fab: 0 4px 14px rgba(0,0,0,.18); --shadow-float: 0 8px 24px rgba(80,60,120,.08); --shadow-tile: 0 1px 3px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 400 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lilac-ink); outline-offset: 2px; }
.wordmark { font: 400 36px/1 var(--display); letter-spacing: -0.015em; text-decoration: none; }

/* Boutons et pastilles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; font: 500 16px/20px var(--sans); white-space: nowrap; text-decoration: none; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #262626; }
.btn-line { border: 1px solid var(--line); background: var(--paper); }
.btn-line:hover { background: var(--fill); }
.btn-sm { min-height: 36px; padding: 0 14px; font: 500 14px/20px var(--sans); }
.btn-danger { color: #b3261e; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font: 500 13px/1 var(--sans); color: var(--ink); white-space: nowrap; }
.pill-soft { background: var(--lilac-soft); color: var(--lilac-ink); }
.pill-done { background: var(--line-soft); color: var(--ink-2); }
.pill-tag { border: 1px solid var(--line); color: var(--ink-2); font-weight: 400; }

/* ---------- Connexion ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; padding: 28px 40px 40px; }
.login-grid { flex: 1; display: grid; grid-template-columns: minmax(300px, 520px) 360px; gap: 72px; align-items: center; justify-content: center; width: 100%; padding-top: 24px; }
.login h1 { font: 400 48px/1.06 var(--display); letter-spacing: -0.01em; margin: 0 0 28px; }
.steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 16px; }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.steps .n { width: 28px; height: 28px; border-radius: 50%; background: var(--lilac-soft); color: var(--lilac-ink); font: 500 13px/28px var(--mono); text-align: center; }
.steps b { font-weight: 600; }
.reassure { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-3); font: 400 13px/18px var(--sans); max-width: 46ch; }
.reassure svg { width: 18px; height: 18px; margin-top: 1px; }
.no-app { margin-top: 22px; font: 400 13px/18px var(--sans); color: var(--ink-3); }
.no-app a { color: var(--lilac-ink); }

.qr-card { width: 360px; padding: 28px; border-radius: var(--r-hero); background: var(--hero); }
.qr-box { background: var(--paper); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-float); position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.qr-box #qr { width: 100%; }
.qr-box #qr svg { display: block; width: 100%; height: auto; transition: opacity .3s, filter .3s; }
.qr-box.dim #qr svg { opacity: .12; filter: blur(1px); }
.qr-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; font: 500 15px/20px var(--sans); }
.qr-state .ok { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.qr-state .ok svg.i { width: 26px; height: 26px; stroke-width: 2; }
.qr-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font: 400 13px/18px var(--sans); color: var(--ink-2); }
.qr-meta .count { font: 400 12px/16px var(--mono); }
.waiting { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lilac); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.8); } }
.manual { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(13,13,13,.08); font: 400 13px/18px var(--sans); color: var(--ink-2); }
.manual .code { display: block; margin-top: 6px; font: 500 24px/30px var(--mono); letter-spacing: .08em; color: var(--ink); user-select: all; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Carnet ---------- */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); padding: 22px 14px 18px; display: flex; flex-direction: column; gap: 22px; }
.side .wordmark { padding: 0 8px; }
.nav { display: grid; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 12px; font: 500 14px/20px var(--sans); color: var(--ink-2); text-align: left; width: 100%; }
.nav button:hover { background: var(--fill); }
.nav button.on { background: var(--line-soft); color: var(--ink); }
.nav .n { margin-left: auto; font: 400 12px/16px var(--mono); color: var(--ink-3); }
.nav .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side h4 { margin: 0 0 6px; padding: 0 10px; font: 500 13px/18px var(--sans); color: var(--ink-3); }
.swatch { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.swatch svg.i { width: 14px; height: 14px; stroke-width: 1.8; color: var(--ink); }
.nav .child { padding-left: 26px; }
.more { padding: 4px 10px; font: 400 13px/18px var(--sans); color: var(--ink-3); text-align: left; }
.more:hover { color: var(--ink); }
.account { margin-top: auto; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 14px; display: grid; gap: 10px; }
.account .who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--hero); display: grid; place-items: center; font: 400 20px/1 var(--display); flex: none; }
.account .plan { font: 600 14px/18px var(--sans); }
.account .sub { font: 400 12px/16px var(--sans); color: var(--ink-3); }
.bar { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--progress); border-radius: 3px; }
.account .usage { display: flex; justify-content: space-between; font: 400 12px/16px var(--mono); color: var(--ink-2); }
.account .device { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); font: 400 12px/16px var(--sans); color: var(--ink-3); }
.account .device svg { width: 16px; height: 16px; }
.account .device button { margin-left: auto; color: var(--ink); font-weight: 500; white-space: nowrap; }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; gap: 12px; align-items: center; padding: 14px 32px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.field { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; background: var(--fill); border: 1px solid var(--line); border-radius: var(--r-m); color: var(--ink-3); }
.field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: 400 15px/20px var(--sans); color: var(--ink); }
.field input::placeholder { color: var(--ink-3); }
.field input::-webkit-search-cancel-button { cursor: pointer; }
.field:focus-within { border-color: #cfcfcf; background: var(--paper); }
.field kbd { font: 400 11px/16px var(--mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: var(--paper); }
.search { flex: 1 1 280px; max-width: 420px; }
.add { flex: 1 1 380px; display: flex; gap: 8px; }
.add .field { flex: 1; }
.content { padding: 28px 32px 64px; max-width: 1180px; }
.screen-title { margin: 0; font: 600 28px/34px var(--sans); letter-spacing: -0.02em; }
.lead { margin: 4px 0 0; font: 400 12px/16px var(--mono); color: var(--ink-3); }
section.block { margin-top: 30px; }
.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { margin: 0; font: 500 20px/26px var(--sans); letter-spacing: -0.01em; }
.sec-head .lead { margin: 0; }
.sec-head button { margin-left: auto; font: 500 14px/20px var(--sans); color: var(--ink-2); }
.sec-head button:hover { color: var(--ink); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 10px; }
.tile { height: 112px; border-radius: var(--r-l); padding: 14px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; transition: transform .15s; }
.tile:hover { transform: translateY(-2px); }
.tile svg.i { width: 22px; height: 22px; stroke-width: 1.6; }
.tile .name { font: 500 15px/20px var(--sans); }
.tile .cnt { font: 400 13px/18px var(--sans); color: var(--ink-2); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; }
.card { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-xl); text-align: left; background: var(--paper); transition: border-color .15s, box-shadow .15s; min-width: 0; }
.card:hover { border-color: #dcdcdc; box-shadow: var(--shadow-tile); }
.thumb { width: 72px; height: 128px; border-radius: var(--r-s); background: var(--thumb) center/cover no-repeat; position: relative; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .dur { position: absolute; right: 5px; bottom: 5px; padding: 1px 5px; border-radius: 5px; background: rgba(13,13,13,.6); color: #fff; font: 400 10.5px/15px var(--mono); }
.card .body { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 2px 4px 2px 0; }
.card .top { display: flex; gap: 6px; flex-wrap: wrap; }
.card h3 { margin: 0; font: 600 15px/20px var(--sans); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card .sum { margin: 0; font: 400 13px/18px var(--sans); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; font: 400 13px/18px var(--sans); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.processing .thumb { background: var(--hero); }
.card.processing .bar i { width: 40%; animation: slidebar 1.6s ease-in-out infinite alternate; }
@keyframes slidebar { from { margin-left: 0; } to { margin-left: 60%; } }
.card.failed { border-style: dashed; }

.errors { border: 1px solid var(--line); border-radius: var(--r-xl); }
.errors > button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 16px; font: 500 14px/20px var(--sans); text-align: left; }
.errors > button .n { font: 400 12px/16px var(--mono); color: var(--ink-3); }
.errors > button .chev { margin-left: auto; transition: transform .2s; }
.errors.open > button .chev { transform: rotate(180deg); }
.errors ul { list-style: none; margin: 0; padding: 0 16px 8px; }
.errors li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font: 400 13px/18px var(--sans); }
.errors li .u { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.errors li .e { grid-column: 1 / -1; color: var(--ink-3); }
.errors li .d { color: var(--ink-3); font-family: var(--mono); font-size: 12px; }

.banner { border-radius: var(--r-2xl); padding: 26px 28px; min-height: 168px; }
.banner .ico { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.7); display: grid; place-items: center; margin-bottom: 18px; }
.banner h1 { margin: 0; font: 400 46px/1.05 var(--display); letter-spacing: -0.01em; }
.banner .lead { color: var(--ink-2); margin-top: 8px; }
.subchips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.subchips button { background: rgba(255,255,255,.75); }
.empty { padding: 40px 0; color: var(--ink-3); font: 400 15px/22px var(--sans); }
.loading { display: grid; place-items: center; min-height: 50vh; }

/* Compte */
.intro { margin: 6px 0 0; font: 400 14px/20px var(--sans); color: var(--ink-3); }
.account .who { cursor: pointer; }
.plan-card { border-radius: var(--r-2xl); padding: 22px 24px; background: var(--hero); display: grid; gap: 10px; max-width: 640px; }
.plan-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.plan-name { font: 400 38px/1 var(--display); letter-spacing: -0.01em; }
.usage-row { display: flex; justify-content: space-between; font: 400 13px/18px var(--sans); color: var(--ink-2); }
.usage-row .mono { font-size: 12px; }
.plan-card .bar { background: rgba(255,255,255,.6); }
.fine { margin: 0; font: 400 12px/17px var(--sans); color: var(--ink-2); }
.body2 { margin: 0 0 12px; color: var(--ink-2); }
.urlbox { padding: 12px 14px; background: var(--fill); border: 1px solid var(--line); border-radius: var(--r-m); font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; user-select: all; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.howto { margin-top: 14px; display: grid; gap: 6px; font: 400 14px/20px var(--sans); color: var(--ink-2); }
.howto p { margin: 0; }
.howto b { color: var(--ink); font-weight: 600; }
.warn { margin: 0; font: 400 13px/18px var(--sans); color: var(--lilac-ink); }
.blk .body2 + .warn { margin-top: 4px; }
.sessions { border: 1px solid var(--line); border-radius: var(--r-xl); max-width: 640px; }
.session { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; }
.session + .session { border-top: 1px solid var(--line-soft); }
.session .t { font: 500 15px/20px var(--sans); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.session .t .pill { height: 22px; font-size: 12px; }
.session .m { font: 400 13px/18px var(--sans); color: var(--ink-3); }
section.block .blk { max-width: 640px; }

/* Fiche */
.drawer { position: fixed; inset: 0; z-index: 20; }
.drawer .back { position: absolute; inset: 0; background: rgba(13,13,13,.18); animation: fade .2s; }
.drawer .panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--paper); box-shadow: -10px 0 40px rgba(80,60,120,.12); overflow-y: auto; animation: slide .28s cubic-bezier(.2,.8,.2,1); }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.panel .head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 14px 20px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-soft); }
.panel .head .x { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.panel .head .x:hover { background: var(--fill); }
.fiche { padding: 22px 24px 40px; display: grid; gap: 18px; }
.fiche .hero { display: grid; grid-template-columns: 104px 1fr; gap: 18px; align-items: start; }
.fiche .hero .thumb { width: 104px; height: 185px; border-radius: var(--r-m); }
.fiche h2 { margin: 0 0 6px; font: 600 22px/28px var(--sans); letter-spacing: -0.015em; overflow-wrap: anywhere; }
.fiche .meta { font: 400 13px/18px var(--sans); color: var(--ink-3); }
.fiche .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.fiche .summary { margin: 0; font: 400 15px/1.5 var(--sans); }
.fiche .status { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-xl); background: var(--lilac-soft); color: var(--lilac-ink); font: 500 14px/20px var(--sans); }
.blk { border: 1px solid var(--line); border-radius: var(--r-xl); padding: 14px 16px; }
.blk.unsure { border: 1.5px dashed var(--lilac-line); }
.blk .lbl { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font: 500 13px/18px var(--sans); color: var(--ink-3); }
.blk .lbl .pill { height: 22px; font-size: 12px; }
.blk p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.blk ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.blk li { position: relative; padding-left: 16px; overflow-wrap: anywhere; }
.blk li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }
.blk.prompt p { font: 400 13.5px/1.55 var(--mono); background: var(--fill); border-radius: var(--r-s); padding: 10px 12px; }
.blk details summary { cursor: pointer; font: 500 13px/18px var(--sans); color: var(--ink-3); }
.blk details p { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 12px; }
.stat .k { font: 400 12px/16px var(--sans); color: var(--ink-3); }
.stat .v { font: 500 17px/22px var(--mono); overflow-wrap: anywhere; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.links { display: grid; gap: 8px; }
.links a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-m); text-decoration: none; font: 500 14px/20px var(--sans); min-width: 0; }
.links a .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links a .h { color: var(--ink-3); font-weight: 400; margin-left: auto; font-size: 12px; white-space: nowrap; }
.note textarea { width: 100%; min-height: 76px; resize: vertical; border: 0; outline: none; background: none; font: 400 15px/1.45 var(--sans); color: var(--ink); padding: 0; }

.toast { position: fixed; z-index: 40; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font: 500 14px/20px var(--sans); box-shadow: var(--shadow-fab); animation: up .25s; max-width: calc(100% - 32px); text-align: center; }
@keyframes up { from { transform: translate(-50%, 10px); opacity: 0; } }

/* Page du QR ouverte sur l'iPhone (/c/<code>) */
.open-app { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 32px 24px; max-width: 460px; margin: 0 auto; }
.open-app h1 { margin: 0; font: 400 38px/1.08 var(--display); }
.open-app p { margin: 0; color: var(--ink-2); }
.open-app .code { font: 500 26px/32px var(--mono); letter-spacing: .08em; }

@media (max-width: 960px) {
  .login { padding: 20px 16px 32px; }
  .login-grid { grid-template-columns: 1fr; gap: 32px; justify-items: center; }
  .login h1 { font-size: 38px; }
  .qr-card { width: 100%; max-width: 360px; padding: 20px; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; gap: 14px; }
  .side .themes, .account { display: none; }
  .nav { grid-auto-flow: column; overflow-x: auto; }
  .nav button { white-space: nowrap; }
  .field kbd { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { flex-wrap: wrap; padding: 12px 16px; position: static; }
  .search, .add { flex-basis: 100%; max-width: none; }
  .content { padding: 20px 16px 48px; }
  .cards { grid-template-columns: 1fr; }
  .banner h1 { font-size: 36px; }
  .fiche { padding: 18px 16px 32px; }
  .fiche .hero { grid-template-columns: 80px 1fr; }
  .fiche .hero .thumb { width: 80px; height: 142px; }
}
