/* Synko — système de design byteTuto (clair + sombre automatique)
   Charte byteTuto : vert « byte » pour l'action principale (texte foncé dessus), « byte-ink » quand le vert est du texte,
   aplats sombres « tile » avec trame de points, orange « spark » une seule fois par écran (nouveautés, en direct).
   Space Grotesk 700 / IBM Plex Sans / JetBrains Mono ; rayons 6 / 12 / 24 px ; ni ombre ni dégradé.
   Toutes les couleurs passent par les variables ci-dessous : ne pas écrire de #fff en dur pour un fond. */
:root {
  color-scheme: light dark;
  /* marque byteTuto (les noms --blue… sont historiques : --blue = action principale = byte) */
  --byte: #B8F03C; --byte-ink: #3B6B00; --byte-tint: #E9F9C8; --on-byte: #0E1116;
  --spark: #FF5A1F; --tile: #0E1116; --tile-ink: #F2F1EC; --tile-muted: #A3A8B3; --tile-dots: #2A2F38;
  --blue: var(--byte); --blue-dark: #A6DE2A; --on-blue: var(--on-byte);
  --ic-bg: var(--byte-tint); --ic-ink: var(--byte-ink);
  --avatar-bg: #0E1116; --avatar-ink: #F2F1EC;
  /* surfaces (clair) */
  --bg: #F6F5F0; --surface: #FFFFFF; --surface-2: #EFEEE7; --elev: #FFFFFF; --tint-base: #FFFFFF;
  --ink: #0E1116; --ink-2: #2F333B; --muted: #565B66; --placeholder: #6B707A;
  --line: #DDDBD2; --line-2: #C6C4BA; --line-3: #E8E6DE; --sep: #E8E6DE;
  --chip: #ECEAE2; --seg: #ECEAE2; --seg-on: #FFFFFF;
  --link: var(--byte-ink); --blue-tint: var(--byte-tint); --blue-soft: #F2FBDF; --blue-row: #F7FCEC; --blue-line: #B8F03C;
  --green: var(--byte-ink); --green-tint: var(--byte-tint); --green-ink: #2E5400; --green-soft: #F4FCE6;
  --red: #C4320A; --red-tint: #FCE9E3; --amber: #9A4A00;
  --overlay: rgba(14, 17, 22, .55);
  --nav-bg: var(--tile); --nav-line: transparent;
  --action-bg: var(--surface); --action-ink: var(--ink);
  --shadow: 0 0 0 1px var(--line);          /* pas d'ombre : un filet */
  --shadow-pop: 0 0 0 1px var(--line);
  /* typo, rayons */
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --r-s: 6px; --r-m: 12px; --r-l: 12px; --r-xl: 24px;
  /* mise en page */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: calc(64px + 14px + var(--safe-b));
  --col: 560px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --byte-ink: #B8F03C; --byte-tint: #24300F; --spark: #FF6B33; --tile: #1E232C;
    --blue-dark: #C8F56A;
    --avatar-bg: #2A2F38; --avatar-ink: #F2F1EC;
    --bg: #0E1116; --surface: #171B22; --surface-2: #1E232C; --elev: #171B22; --tint-base: #171B22;
    --ink: #F2F1EC; --ink-2: #D4D3CE; --muted: #A3A8B3; --placeholder: #858A95;
    --line: #2A2F38; --line-2: #3A404B; --line-3: #222731; --sep: #222731;
    --chip: #1E232C; --seg: #1E232C; --seg-on: #2A2F38;
    --blue-soft: #1C250D; --blue-row: rgba(184, 240, 60, .06); --blue-line: #4A6A12;
    --green-ink: #B8F03C; --green-soft: #1A220C;
    --red: #FF7A5C; --red-tint: rgba(255, 122, 92, .14); --amber: #FBBF24;
    --overlay: rgba(0, 0, 0, .65);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.4; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link); opacity: .85; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

/* ---------- colonne de l'appli ---------- */
.app { min-height: 100dvh; }
.screen { position: relative; max-width: var(--col); margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.screen.with-nav { padding-bottom: calc(var(--nav-h) + 20px); }
.screen.white { background: var(--surface); }
@media (min-width: 700px) {
  body { background: color-mix(in srgb, var(--bg) 88%, var(--ink)); }
  .screen { box-shadow: 0 0 0 1px var(--line), 0 0 60px rgba(0, 0, 0, .08); }
}
.boot { align-items: center; justify-content: center; gap: 16px; }
.boot-logo { animation: boot 1.2s ease-in-out infinite alternate; }
.boot-msg { color: var(--muted); }
@keyframes boot { from { opacity: .5; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

/* ---------- éléments communs ---------- */
.logo-row { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -.3px; color: var(--ink); }
.title-xl { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -.6px; line-height: 1.12; }
.title-l { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -.6px; line-height: 1.15; }
.title-m { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.4px; line-height: 1.2; }
.title-s { font-family: var(--display); font-size: 20px; font-weight: 600; line-height: 1.2; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-size: 15px; line-height: 1.45; color: var(--muted); }
.label { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-14 { gap: 14px; } .gap-16 { gap: 16px; } .gap-22 { gap: 22px; } .gap-28 { gap: 28px; }
.pad { padding: 0 20px; }
.spacer { flex: 1; }

/* boutons : pilules pleines, rondes pour les icônes */
.btn { min-height: 48px; padding: 0 20px; border-radius: 12px; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 15px; text-align: center; transition: transform .12s ease, filter .12s ease; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--blue); color: var(--on-blue); }
.btn-primary:hover { background: var(--blue-dark); color: var(--on-blue); opacity: 1; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { color: var(--bg); opacity: .9; }
.btn-light { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-light:hover { color: var(--ink); }
.btn-soft { background: var(--chip); color: var(--ink); }
.btn-soft:hover { color: var(--ink); }
.btn-ghost { background: transparent; color: var(--link); }
.btn-danger { background: var(--red-tint); color: var(--red); }
.btn-danger:hover { color: var(--red); }
.btn-big { height: 56px; font-size: 16px; width: 100%; }
.btn-54 { height: 54px; font-size: 16px; width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--chip); color: var(--muted); box-shadow: none; transform: none; }
.icon-btn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; border: 0; background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { color: var(--ink); }
.icon-btn.soft { background: var(--chip); }
.icon-btn.card { background: var(--surface); box-shadow: var(--shadow); }
.icon-btn.glass { width: 44px; height: 44px; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.pill { height: 44px; padding: 0 16px; flex-shrink: 0; border-radius: 12px; background: var(--ink); color: var(--bg); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; border: 0; }
.pill:hover { color: var(--bg); }

.input { height: 52px; width: 100%; padding: 0 16px; border-radius: var(--r-m); border: 1.5px solid transparent; font-size: 16px; background: var(--surface-2); color: var(--ink); outline: none; transition: border-color .12s ease, background .12s ease; }
.input:focus { border-color: var(--ink); background: var(--surface); }
.screen.white .input, .sheet .input { background: var(--surface-2); }
.input.big { height: 56px; font-size: 17px; padding: 0 18px; }
.input.valid { border-color: var(--ink); }
.input.mid { height: 48px; font-size: 15px; }
.err { color: var(--red); font-size: 14px; font-weight: 500; }
.ok-msg { color: var(--green); font-size: 14px; font-weight: 600; }

.avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: var(--avatar-bg); color: var(--avatar-ink); font-size: 11px; font-weight: 700; letter-spacing: -.2px; display: inline-flex; align-items: center; justify-content: center; }
.avatar.s28 { width: 28px; height: 28px; font-size: 10.5px; }
.avatar.s32 { width: 32px; height: 32px; font-size: 12px; }
.avatar.s40 { width: 40px; height: 40px; font-size: 15px; }
.avatar.s44 { width: 44px; height: 44px; font-size: 16px; }
.avatar.s72 { width: 72px; height: 72px; font-size: 26px; font-family: var(--display); font-weight: 600; }
.avatars { display: flex; padding-left: 8px; }
.avatars .avatar { margin-left: -8px; border: 2px solid var(--ring, var(--bg)); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ic-ink); flex-shrink: 0; display: inline-block; }
.dot.s8 { width: 8px; height: 8px; }
.count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 6px; background: var(--blue); color: var(--on-blue); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--chip); color: var(--ink-2); font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge.blue { background: var(--blue-tint); color: var(--link); font-size: 12px; }

/* puces de filtre */
.chips { display: flex; gap: 8px; padding: 18px 20px 4px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 14px; background: var(--surface); color: var(--ink); border: 0; box-shadow: var(--shadow); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.space-ic { width: var(--s, 28px); height: var(--s, 28px); flex-shrink: 0; border-radius: calc(var(--s, 28px) * .3); background: var(--ic-bg); color: var(--ic-ink); display: inline-flex; align-items: center; justify-content: center; }
.chip-ic { display: inline-flex; color: var(--ic-ink); }
.chip[aria-pressed="true"] .chip-ic { color: var(--bg); }
.chip .dot { border: 2px solid var(--ic-ink); }
.chip[aria-pressed="true"] .dot { border-color: var(--bg); }

/* contrôle segmenté */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--seg); }
.seg button { min-height: 46px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.seg.tight { gap: 2px; padding: 3px; }
.seg.tight button { min-height: 44px; padding: 0 11px; font-size: 13px; }
.seg.three { gap: 2px; padding: 3px; }
.seg.three button { min-height: 44px; font-size: 14px; }

/* ---------- motif maison : trame de points sur aplat sombre ---------- */
.dots-tile { background-color: var(--tile); background-image: radial-gradient(var(--tile-dots) 1.5px, transparent 1.6px); background-size: 24px 24px; color: var(--tile-ink); }
.halo { position: relative; }

/* ---------- accueil ---------- */
.topbar { display: flex; align-items: center; gap: 10px; padding: 16px 16px 0; }
.topbar .me { border-radius: 50%; flex-shrink: 0; }
.search { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; }
.search svg { position: absolute; z-index: 1; left: 16px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 48px; padding: 0 16px 0 46px; border-radius: 12px; border: 0; background: var(--surface); color: var(--ink); font-size: 16px; outline: none; box-shadow: inset 0 0 0 1.5px var(--line); height: 44px; }
.search input:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.search input::-webkit-search-cancel-button { display: none; }
.bell { position: relative; }
.bell .count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; font-size: 11px; background: var(--spark); color: var(--on-byte); border: 0; }
.hero { position: relative; overflow: hidden; isolation: isolate; margin: 16px 16px 0; padding: 20px; border-radius: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background-color: var(--tile); background-image: radial-gradient(var(--tile-dots) 1.5px, transparent 1.6px); background-size: 24px 24px; color: var(--tile-ink); }
.hero::after { content: ""; position: absolute; z-index: -1; right: -28px; bottom: -28px; width: 96px; height: 96px; border-radius: 24px; background: var(--byte); }
.hero .kicker { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--tile-muted); }
.hero .big { margin-top: 6px; font-family: var(--display); font-size: 72px; font-weight: 700; letter-spacing: -3px; line-height: .95; color: var(--byte); display: flex; align-items: baseline; gap: 8px; }
.hero .big small { font-size: 22px; letter-spacing: -.3px; font-weight: 700; color: var(--tile-ink); }
.hero .sub { font-size: 14px; color: var(--tile-muted); }
.hero-pill { margin-top: 14px; min-height: 44px; display: inline-flex; align-items: center; gap: 10px; padding: 4px 16px 4px 6px; border-radius: 12px; background: rgba(255, 255, 255, .08); color: var(--tile-ink); font-size: 15px; font-weight: 600; }
.hero-pill.solo { padding: 4px 16px; }
.hero-pill:hover { color: var(--tile-ink); background: rgba(255, 255, 255, .14); opacity: 1; }
.hero-pill .avatars { --ring: var(--tile); }
.hero-pill .avatars .avatar { background: #2A2F38; color: #F2F1EC; }
.actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 26px 12px 6px; }
.action { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 600; text-align: center; line-height: 1.2; }
.action:hover { color: var(--ink); opacity: 1; }
.action .ring { width: 56px; height: 56px; border-radius: 12px; background: var(--surface); color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1.5px var(--line); transition: transform .12s ease; }
.action:active .ring { transform: scale(.92); }
.action.primary .ring { background: var(--byte); color: var(--on-byte); box-shadow: none; }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-l); background: var(--tile); color: var(--tile-ink); margin: 4px 20px 0; }
.banner:hover { color: var(--bg); }
.banner .avatars { --ring: var(--ink); }
.banner .sub { font-size: 13px; opacity: .75; }
.sections { display: flex; flex-direction: column; gap: 22px; padding: 16px 16px 20px; }
.section-head { display: flex; align-items: center; gap: 10px; min-height: 28px; padding: 0 4px; }
.section-head h2 { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.section-head .more { margin-left: auto; font-size: 14px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; }
/* carte de groupe : lignes façon relevé de compte */
.group-card { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; }
.res-card { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 18px; color: var(--ink); background: transparent; }
.res-card:hover { color: var(--ink); background: var(--blue-row); opacity: 1; }
.res-card + .res-card { position: relative; }
.res-card + .res-card::before { content: ""; position: absolute; top: 0; left: 68px; right: 10px; height: 1px; background: var(--sep); }
.res-card:hover::before, .res-card:hover + .res-card::before { opacity: 0; }
.res-icon { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; background: var(--ic-bg); color: var(--ic-ink); display: flex; align-items: center; justify-content: center; }
.res-icon.s32 { width: 32px; height: 32px; }
.res-name { font-size: 16px; font-weight: 600; }
.res-sub { font-size: 13px; color: var(--muted); }
.res-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.todo { font-family: var(--display); font-size: 18px; font-weight: 700; white-space: nowrap; }
.todo small { font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.todo.zero { color: var(--ic-ink); }
.empty-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 22px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.empty-card h2 { font-size: 17px; font-weight: 600; }
.empty-card p { font-size: 14px; line-height: 1.45; color: var(--muted); }
.empty-icon { width: 56px; height: 56px; border-radius: 12px; background: var(--ic-bg); color: var(--ic-ink); display: flex; align-items: center; justify-content: center; }
.btn-space { background: var(--blue); color: var(--on-blue); padding: 0 20px; }
.btn-space:hover { color: var(--on-blue); filter: brightness(.92); opacity: 1; }
.hint-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-l); background: var(--blue-soft); }
.no-result { padding: 28px 20px; text-align: center; color: var(--muted); }

.fab { position: fixed; z-index: 20; right: max(20px, calc(50vw - var(--col) / 2 + 20px)); bottom: calc(var(--nav-h) + 16px); height: 56px; padding: 0 22px 0 18px; border-radius: 28px; background: var(--blue); color: var(--on-blue); display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; border: 0; }
.fab:hover { color: var(--on-blue); background: var(--blue-dark); }
.request-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--blue-line), var(--shadow); border-radius: var(--r-l); }
.req-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: -4px; }
.req-actions .btn { padding: 0 8px; gap: 6px; }
.hint-card > svg, .hint-card .link-icon { flex-shrink: 0; }
.req-banner { margin: 6px 16px 0; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 16px; border-radius: 12px; background: var(--blue-soft); color: var(--link); font-size: 14px; }
.req-banner:hover { color: var(--link); }
.qr-box { align-self: center; width: min(300px, 78vw); padding: 16px; background: #fff; border-radius: var(--r-l); box-shadow: var(--shadow-pop); }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-code { font-family: var(--mono); font-size: 26px; font-weight: 600; letter-spacing: .08em; padding: 8px 18px; border-radius: 12px; background: var(--tile); color: var(--byte); }
.code-field { font-family: var(--mono); font-size: 20px; letter-spacing: 2px; text-transform: uppercase; }
.scan-box { position: relative; border-radius: var(--r-l); overflow: hidden; background: #000; aspect-ratio: 1; max-height: 50dvh; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18%; border: 4px solid rgba(255, 255, 255, .9); border-radius: 18px; }

/* barre de navigation flottante */
.nav { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); width: calc(100% - 28px); max-width: calc(var(--col) - 28px); height: 64px; padding: 6px; border-radius: 16px; background: var(--tile); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 12px; color: var(--tile-muted); font-size: 11px; font-weight: 600; }
.nav a:hover { color: var(--tile-ink); opacity: 1; }
.nav a[aria-current="page"] { color: var(--on-byte); background: var(--byte); }
.nav .ic { position: relative; display: flex; }
.nav .ic .unread { position: absolute; top: -1px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--spark); border: 2px solid var(--tile); }

/* ---------- onboarding ---------- */
.welcome { position: relative; overflow: hidden; isolation: isolate; padding: 72px 28px calc(32px + var(--safe-b)); gap: 36px;
  background-color: #0E1116; background-image: radial-gradient(#2A2F38 1.5px, transparent 1.6px); background-size: 32px 32px; color: #F2F1EC; }
.welcome::before { content: ""; position: absolute; z-index: -1; right: -40px; top: -30px; width: 140px; height: 140px; border-radius: 24px; background: #B8F03C; }
.welcome::after { content: ""; position: absolute; z-index: -1; right: -24px; bottom: 150px; width: 52px; height: 52px; border-radius: 12px; background: #FF5A1F; }
.welcome a { color: #F2F1EC; }
.welcome h1 { font-family: var(--display); font-size: 52px; font-weight: 700; letter-spacing: -1.5px; line-height: 1; }
.welcome .tagline { font-family: var(--display); font-size: 24px; font-weight: 500; line-height: 1.25; letter-spacing: -.3px; }
.welcome ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.welcome li { display: flex; align-items: center; gap: 14px; font-size: 16px; line-height: 1.4; }
.welcome .feat { width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; background: #1E232C; color: #B8F03C; display: flex; align-items: center; justify-content: center; }
.welcome .btn-white { background: #B8F03C; color: #0E1116; height: 56px; font-size: 17px; }
.welcome .btn-white:hover { color: #0E1116; background: #C8F56A; }
.welcome .link { min-height: 44px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.welcome .legal { font-family: var(--mono); font-size: 12px; text-align: center; color: #A3A8B3; }
.welcome .legal a { text-decoration: underline; }
.auth { background: var(--surface); padding: 20px 24px calc(32px + var(--safe-b)); gap: 28px; }
.auth .back { margin-left: -12px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.legal-note { font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }
.legal-note a { text-decoration: underline; }
.mail-icon { width: 56px; height: 56px; border-radius: 12px; background: var(--blue-tint); color: var(--link); display: flex; align-items: center; justify-content: center; }
.code-boxes { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.code-box { height: 60px; border-radius: var(--r-m); border: 2px solid transparent; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 26px; font-weight: 600; }
.code-box.filled { border-color: var(--line-2); }
.code-box.active { border-color: var(--ink); background: var(--surface); }
.code-boxes.done .code-box { border-color: var(--green); background: var(--green-soft); }
.code-boxes.bad .code-box { border-color: var(--red); }
.code-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; font-size: 16px; cursor: text; caret-color: transparent; }
.steps { display: flex; gap: 6px; }
.steps span { width: 28px; height: 6px; border-radius: 3px; background: var(--ink); }
.invite-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-l); background: var(--blue-soft); }
.invite-card .t { font-size: 14px; font-weight: 600; }
.invite-card .s { font-size: 13px; color: var(--ink-2); }

/* ---------- liste / note ---------- */
.res-head { display: flex; align-items: center; gap: 8px; padding: 18px 16px 6px 10px; }
.res-head h1 { font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -.3px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.res-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.presence { display: flex; align-items: center; gap: 10px; padding: 6px 20px 4px; min-height: 40px; }
.presence .avatars { padding-left: 6px; }
.presence .avatars .avatar { margin-left: -6px; width: 28px; height: 28px; }
.presence .txt { flex: 1; font-size: 13px; color: var(--ink-2); }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; background: var(--spark); color: var(--on-byte); font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.live .dot { background: var(--on-byte); width: 8px; height: 8px; animation: live-pulse 1.8s infinite; }
.live.off { background: var(--chip); color: var(--muted); }
.live.off .dot { background: var(--muted); animation: none; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, .5); } 70% { box-shadow: 0 0 0 7px rgba(34, 211, 238, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); } }
.add-row { display: flex; gap: 8px; padding: 12px 16px 6px; }
.add-row .input { height: 52px; padding: 0 18px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.add-btn { width: 52px; height: 52px; flex-shrink: 0; border-radius: 12px; border: 0; background: var(--blue); color: var(--on-blue); display: flex; align-items: center; justify-content: center; }
.add-btn:disabled { background: var(--chip); color: var(--muted); }
.ro-bar { margin: 10px 16px 0; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-m); background: var(--chip); color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.list-body { display: flex; flex-direction: column; gap: 10px; padding: 10px 16px 120px; }
.list-body h2 { padding: 0 6px; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rows { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden; padding: 4px 0; }
.item { position: relative; display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 8px 6px 8px 16px; background: transparent; }
.item + .item::before { content: ""; position: absolute; top: 0; left: 54px; right: 12px; height: 1px; background: var(--sep); }
.item.is-new { background: var(--blue-row); }
.item label { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; cursor: pointer; min-height: 44px; }
.item input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 0; flex-shrink: 0; border-radius: 6px; border: 2px solid var(--ink); background: transparent; cursor: pointer; display: grid; place-items: center; transition: background .12s ease, border-color .12s ease; }
.item input[type="checkbox"]::after { content: ""; width: 10px; height: 6px; border: solid var(--on-byte); border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); opacity: 0; }
.item input[type="checkbox"]:checked { background: var(--blue); border-color: var(--blue); }
.item input[type="checkbox"]:checked::after { opacity: 1; }
.item input[type="checkbox"]:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.item input[type="checkbox"]:disabled { cursor: default; opacity: .6; }
.item .name { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.item .meta { font-size: 13px; color: var(--muted); }
.item.done .name { color: var(--muted); text-decoration: line-through; }
.item .new-tag { display: flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; background: var(--byte-tint); color: var(--byte-ink); font-family: var(--mono); font-size: 11px; font-weight: 600; text-transform: uppercase; white-space: nowrap; }
.item .del { width: 40px; height: 44px; color: var(--muted); }
.item .del:hover { color: var(--red); }
.list-empty { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 14px; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); }
.note-wrap { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 40px; }
.note-area { flex: 1; min-height: 50dvh; width: 100%; padding: 18px; border-radius: var(--r-l); border: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-size: 16px; line-height: 1.55; resize: none; outline: none; }
.note-area:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.note-read { min-height: 40dvh; padding: 18px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); font-size: 16px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-status { font-size: 13px; color: var(--muted); padding: 0 6px; min-height: 18px; }
.note-status.warn { color: var(--amber); }

/* ---------- fenêtres (feuilles) ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: var(--overlay); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease-out; }
.sheet { width: 100%; max-width: var(--col); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; background: var(--elev); color: var(--ink); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 10px 20px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 18px; animation: up .22s ease-out; }
.sheet .grab { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); flex-shrink: 0; }
.sheet-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: var(--r-xl); max-height: calc(100dvh - 64px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.type-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border-radius: var(--r-l); text-align: left; background: var(--surface-2); border: 2px solid transparent; color: var(--ink); }
.type-card[aria-pressed="true"] { background: var(--byte-tint); border-color: var(--byte-ink); }
.type-card .type-ic { color: var(--ic-ink); }
.type-card .t { font-size: 16px; font-weight: 600; }
.type-card .s { font-size: 13px; color: var(--muted); }
.space-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.space-chips .chip { min-height: 44px; padding: 0 16px 0 12px; background: var(--surface-2); box-shadow: none; }
.space-chips .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.link-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: var(--r-l); background: var(--surface-2); }
.link-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--blue-tint); color: var(--link); display: flex; align-items: center; justify-content: center; }
.member { display: flex; align-items: center; gap: 12px; min-height: 54px; }
.member .n { font-size: 15px; font-weight: 600; }
.member .s { font-size: 12px; color: var(--muted); }
.member-rights { margin: -4px 0 10px 52px; }
.member-rights .seg.tight { grid-auto-columns: minmax(0, 1fr); }
.owner-tag { padding: 6px 12px; border-radius: 12px; background: var(--chip); color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.legend { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.legend span { display: flex; gap: 8px; align-items: flex-start; }
.legend svg { flex-shrink: 0; margin-top: 1px; }
.danger-zone { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line-3); padding-top: 16px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- activité ---------- */
.act-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 28px 12px 4px 20px; }
.act-list { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 24px; }
.act-card { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 6px 16px 8px; }
.act-card-head { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.act-lines { display: flex; flex-direction: column; border-top: 1px solid var(--line-3); }
.act-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.act-line .txt { flex: 1; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.act-line .when { color: var(--muted); }
.unread-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--blue); }
.diff { margin: 0 0 6px 38px; padding: 8px 12px; border-radius: var(--r-s); background: var(--surface-2); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.diff del { color: var(--muted); }
.diff ins { text-decoration: none; padding: 1px 6px; border-radius: 6px; font-family: var(--mono); font-size: 13px; background: var(--green-tint); color: var(--green-ink); font-weight: 600; }

/* ---------- profil ---------- */
.profile-card { display: flex; align-items: center; gap: 16px; padding: 18px; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); }
.list-card { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden; padding: 4px 0; }
.list-card > a, .list-card > button, .list-card > div { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 16px; background: transparent; border: 0; color: var(--ink); text-align: left; font-size: 15px; }
.list-card > * + *::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: var(--sep); }
.list-card > a:hover, .list-card > button:hover { background: var(--blue-row); color: var(--ink); opacity: 1; }
.chev { color: var(--muted); flex-shrink: 0; }
.h2s { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 6px; }

/* ---------- notifications en bas d'écran ---------- */
.toast-root { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(24px + var(--safe-b)); width: calc(100% - 32px); max-width: calc(var(--col) - 32px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast-root.above-nav { bottom: calc(var(--nav-h) + 12px); }
.toast-root.on-sheet { bottom: auto; top: calc(12px + env(safe-area-inset-top, 0px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--tile); color: var(--tile-ink); box-shadow: var(--shadow-pop); animation: up .2s ease-out; }
.toast .t { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.toast .s { font-size: 12px; opacity: .75; }
.toast.err { background: #C4320A; color: #fff; }
.toast .btn-ghost { color: var(--byte); }
.offline-pill { position: fixed; z-index: 50; top: calc(8px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); padding: 6px 12px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; }

.page-404 { align-items: center; justify-content: center; text-align: center; gap: 16px; padding: 40px 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 380px) { .pill { padding: 0 12px; } .pill .pill-label { display: none; } .hero .big { font-size: 58px; } .action { font-size: 12px; } }
@media (max-width: 360px) {
  .welcome { padding-top: 56px; gap: 28px; }
  .welcome h1 { font-size: 44px; }
  .welcome .tagline { font-size: 21px; }
  .title-l { font-size: 26px; }
  .code-boxes { gap: 6px; }
  .code-box { height: 54px; font-size: 22px; }
  .seg.tight button { padding: 0 8px; }
  .action .ring { width: 52px; height: 52px; }
}
