/* Todo-me : système éditorial d'Offchain Media (journal papier), fond sombre.
   Pas d'ombres, pas de coins arrondis. L'orange Bitcoin ne sert que de signal. */

@font-face { font-family: Oswald; font-weight: 500; font-display: swap; src: url(/fonts/oswald-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Oswald; font-weight: 600; font-display: swap; src: url(/fonts/oswald-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Oswald; font-weight: 700; font-display: swap; src: url(/fonts/oswald-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: Spectral; font-weight: 400; font-display: swap; src: url(/fonts/spectral-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Spectral; font-weight: 400; font-style: italic; font-display: swap; src: url(/fonts/spectral-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: Spectral; font-weight: 500; font-display: swap; src: url(/fonts/spectral-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Spectral; font-weight: 600; font-display: swap; src: url(/fonts/spectral-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url(/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --paper: #1A1A1A;
  --ink: #FFFFFF;
  --dim: #A8A8A8;
  --rule: #474747;
  --strong: #DCDCDC;
  --btc: #F7931A;
  --osw: Oswald, "Arial Narrow", sans-serif;
  --spe: Spectral, Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: var(--spe); font-size: 17px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--btc); outline-offset: 2px; }

.shell { min-height: 100dvh; }
.main { padding: calc(env(safe-area-inset-top) + 24px) 20px calc(env(safe-area-inset-bottom) + 110px); max-width: 1100px; }

/* ---------- en-têtes */
.mast { padding-bottom: 14px; border-bottom: 3px solid var(--strong); margin-bottom: 22px; }
.over { display: block; padding-bottom: 8px; border-bottom: 1px solid var(--rule); font: 500 11px/1.2 var(--osw); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.mast h1 { margin: 12px 0 0; font: 700 46px/.95 var(--osw); text-transform: uppercase; }
.sechead { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 600 12px/1 var(--osw); letter-spacing: .2em; text-transform: uppercase; }
.sechead::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.view { display: none; }
.view.active { display: block; }
.soon { font-style: italic; color: var(--dim); max-width: 34em; }

/* ---------- réglages */
.group { margin-bottom: 30px; }
.status { margin: 0 0 10px; }
.status b { font-family: var(--mono); font-weight: 500; font-size: 14px; }
.hint { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--strong); font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { min-height: 48px; padding: 0 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 600 13px/1 var(--osw); letter-spacing: .16em; text-transform: uppercase; }
.btn-line { background: none; color: var(--ink); }
.btn:disabled { opacity: .4; cursor: default; }
.result { min-height: 1.4em; margin: 10px 0 0; font-family: var(--mono); font-size: 13px; color: var(--dim); }
.devices { list-style: none; margin: 0; padding: 0; }
.devices li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.devices li:first-child { border-top: 0; }
.devices .meta { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.note { font-size: 14px; font-style: italic; color: var(--dim); }

/* ---------- navigation : barre d'onglets (mobile) */
.side { display: none; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; padding: 0 6px env(safe-area-inset-bottom); background: var(--paper); border-top: 1px solid var(--strong); }
.tab { position: relative; flex: 1 1 0; min-height: 58px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding-top: 9px; background: none; border: 0; color: var(--dim); text-decoration: none; font: 500 10px/1 var(--osw); letter-spacing: .16em; text-transform: uppercase; }
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 14px; right: 14px; height: 3px; background: var(--btc); }

/* ---------- PC : barre latérale */
@media (min-width: 1024px) {
  .shell { display: flex; }
  .tabs { display: none; }
  .side { display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; width: 248px; height: 100dvh; flex-shrink: 0; padding: 30px 24px; border-right: 1px solid var(--rule); }
  .brand { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 3px solid var(--strong); }
  .brand-icon { width: 40px; height: 40px; border-radius: 9px; }
  .brand-name { font: 700 28px/1 var(--osw); letter-spacing: .04em; text-transform: uppercase; }
  .nav { display: flex; flex-direction: column; gap: 2px; }
  .nav .tab { flex-direction: row; gap: 12px; min-height: 42px; padding: 0; font-size: 13px; }
  .nav .tab[aria-current="page"]::before { top: 8px; bottom: 8px; left: -24px; right: auto; width: 3px; height: auto; }
  .main { flex: 1; padding: 30px 36px 40px; }
  .mast h1 { font-size: 64px; }
}

/* ---------- étape 2a : tâches */
.sync { margin: -8px 0 18px; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.linkbtn { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.sechead .mark, .mark { display: inline-block; width: 9px; height: 9px; background: var(--btc); margin-right: 6px; }
.sechead em, .grouphead em { font: 400 12px/1 var(--mono); color: var(--dim); font-style: normal; }
.zone { margin-bottom: 24px; }
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--rule); }
.tasks .task:first-child { border-top: 0; }
.check { padding-top: 3px; flex-shrink: 0; }
.box { position: relative; display: block; width: 18px; height: 18px; border: 1.5px solid var(--dim); overflow: hidden; }
.box-doing::after { content: ""; position: absolute; inset: 0 50% 0 0; background: var(--btc); }
.task-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.task-text { font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font: 500 11px/1.2 var(--osw); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.task-meta .sep { color: var(--rule); }
.flag { padding: 1px 6px; background: var(--btc); color: #1A1A1A; font-weight: 600; font-size: 10px; }
.empty { font-style: italic; color: var(--dim); margin: 6px 0; }

.views { display: flex; gap: 20px; margin-bottom: 10px; }
.textchip { min-height: 40px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--dim); font: 500 13px/1 var(--osw); letter-spacing: .14em; text-transform: uppercase; }
.textchip[aria-pressed="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--btc); }
.chips { display: flex; gap: 0; overflow-x: auto; border: 1px solid var(--strong); margin: 0 -20px 12px 0; scrollbar-width: none; }
.chip { flex-shrink: 0; min-height: 40px; padding: 0 12px; border: 0; border-left: 1px solid var(--strong); background: none; color: var(--ink); font: 500 11px/1 var(--osw); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.chip:first-child { border-left: 0; }
.chip span { font-family: var(--mono); letter-spacing: 0; color: var(--dim); margin-left: 4px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] span { color: var(--paper); }
.detail { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 14px; color: var(--dim); }
.detail input { width: 18px; height: 18px; accent-color: var(--btc); }

.group-block { margin-bottom: 22px; break-inside: avoid; }
.grouphead { display: flex; align-items: baseline; justify-content: space-between; margin: 0; padding: 4px 0; border-bottom: 1px solid var(--strong); font: 700 22px/1.1 var(--osw); letter-spacing: .02em; text-transform: uppercase; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; gap: 6px; min-height: 110px; padding: 12px 14px 12px 0; border-top: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.card:nth-child(2n) { padding-left: 14px; border-left: 1px solid var(--rule); }
.card:nth-child(-n+2) { border-top: 0; }
.card-num { font: 400 11px/1 var(--mono); color: var(--dim); }
.card-name { font: 700 21px/1 var(--osw); text-transform: uppercase; }
.card-stats { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; font: 400 11px/1.3 var(--mono); }

@media (min-width: 1024px) {
  .zones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .zones .zone:first-child { grid-row: span 2; }
  .groups { column-count: 2; column-gap: 32px; column-rule: 1px solid var(--rule); }
  .chips { margin-right: 0; display: inline-flex; max-width: 100%; }
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card:nth-child(2n) { padding-left: 0; border-left: 0; }
  .card:not(:nth-child(4n+1)) { padding-left: 14px; border-left: 1px solid var(--rule); }
  .card:nth-child(-n+4) { border-top: 0; }
}
@media (min-width: 1440px) { .groups { column-count: 3; } }

/* ---------- étape 2b : écriture */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button.check { width: 44px; height: 44px; margin: -11px -10px -11px -12px; padding: 0; display: flex; align-items: center; justify-content: center; background: none; border: 0; }
button.check:hover .box { border-color: var(--btc); }
button.task-body { flex: 1; padding: 0; background: none; border: 0; text-align: left; color: inherit; font: inherit; }
.task.is-done .task-text { text-decoration: line-through; color: var(--dim); }
.task.is-done .box { background: var(--btc); border-color: var(--btc); }

.capture { display: flex; margin: 0 0 20px; border: 1px solid var(--strong); }
.capture[hidden] { display: none; }
.capture input { flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border: 0; background: transparent; color: var(--ink); font: italic 16px var(--spe); outline: none; }
.capture select { max-width: 34%; border: 0; border-left: 1px solid var(--rule); background: var(--paper); color: var(--ink); font: 500 11px var(--osw); letter-spacing: .1em; text-transform: uppercase; padding: 0 8px; }
.cap-add { width: 48px; border: 0; background: var(--ink); color: var(--paper); font: 600 24px/1 var(--osw); }

.sheet { width: 100%; max-width: 520px; margin: auto auto 0; padding: 0; border: 0; border-top: 3px solid var(--strong); background: var(--paper); color: var(--ink); }
.sheet::backdrop { background: rgba(0, 0, 0, .6); }
.sheet-inner { display: flex; flex-direction: column; gap: 16px; padding: 20px 20px calc(env(safe-area-inset-bottom) + 20px); }
.sheet-title { margin: 0; font: 500 19px/1.3 var(--spe); }
.sheet-group { display: flex; flex-direction: column; gap: 8px; }
.sheet-label { font: 600 11px/1 var(--osw); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.seg { display: flex; border: 1px solid var(--strong); }
.seg button { flex: 1; min-height: 44px; border: 0; border-left: 1px solid var(--strong); background: none; color: var(--ink); font: 500 12px/1 var(--osw); letter-spacing: .1em; text-transform: uppercase; }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--ink); color: var(--paper); }
.sheet-date { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--dim); }
.sheet-date input { min-height: 40px; padding: 0 8px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font: 14px var(--mono); color-scheme: dark; }
.sheet-close { align-self: flex-start; }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 76px); z-index: 10; padding: 12px 16px; background: var(--ink); color: var(--paper); font: 500 15px/1.3 var(--spe); }
.toast .linkbtn { color: var(--paper); margin-left: 8px; font-family: var(--osw); letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }

@media (min-width: 1024px) {
  .sheet { margin: auto; border: 1px solid var(--strong); border-top-width: 3px; }
  .toast { left: auto; right: 32px; bottom: 32px; max-width: 420px; }
  .capture { max-width: 720px; }
}

/* ---------- étape 5 : rappels */
.reminder { align-items: center; }
.rem-time { flex-shrink: 0; min-width: 52px; font: 500 15px/1.2 var(--mono); }
.rem-cancel { flex-shrink: 0; width: 44px; height: 44px; margin: -10px -12px -10px 0; border: 0; background: none; color: var(--dim); font: 400 22px/1 var(--spe); }
.rem-cancel:hover { color: var(--btc); }
.sheet-reminders { margin: 0; font-size: 14px; color: var(--dim); }
.sheet-reminders:empty { display: none; }
input[type="datetime-local"] { min-height: 40px; padding: 0 8px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font: 14px var(--mono); color-scheme: dark; }
.sheet-date { flex-wrap: wrap; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 12px; }

/* ---------- étape 4 : chat avec Hermès, épuré */
.chat-top { display: flex; justify-content: flex-end; gap: 8px; padding-bottom: 8px; }
.icon-btn { width: 40px; height: 40px; flex-shrink: 0; padding: 0; border: 1px solid var(--strong); background: none; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.icon-btn[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.icon-btn:disabled { opacity: .35; }

.chat { display: flex; flex-direction: column; }
.history { display: none; flex-direction: column; }
.chat.hist-open .history { display: flex; }
.chat.hist-open .conv { display: none; }
.hist { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid var(--rule); background: none; color: var(--ink); text-align: left; }
.hist:first-child { border-top: 0; }
.hist-top { display: flex; justify-content: space-between; font: 400 11px var(--mono); color: var(--dim); }
.hist-title { font: 600 17px/1.25 var(--spe); }
.hist-last { font-size: 14px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist[aria-current="true"] .hist-title { color: var(--btc); }

.conv { display: flex; flex-direction: column; }
.msgs { display: flex; flex-direction: column; gap: 18px; padding: 8px 0 16px; overflow-y: auto; }
.msg { display: flex; flex-direction: column; gap: 5px; max-width: 94%; }
.msg-user { align-self: flex-end; text-align: right; }
.msg-who { display: flex; align-items: center; gap: 8px; font: 600 11px/1 var(--osw); letter-spacing: .2em; text-transform: uppercase; }
.msg-user .msg-who { justify-content: flex-end; color: var(--dim); }
.msg-who span { font: 400 11px var(--mono); letter-spacing: 0; color: var(--dim); }
.msg-body { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.msg-user .msg-body { font-weight: 600; }
.msg-body p { margin: 0 0 8px; }
.msg-body ul, .msg-body ol { margin: 0 0 8px; padding-left: 22px; text-align: left; }
.msg-body code { font: 14px var(--mono); background: #242424; padding: 0 4px; }
.typing { color: var(--dim); font-style: italic; }
.msg-error { color: var(--btc); font: 13px var(--mono); }
.msg-system { align-self: stretch; max-width: 100%; padding-left: 10px; border-left: 2px solid var(--btc); }
.msg-system .msg-error { margin: 0 0 4px; }
.msg-pending .actions { margin-top: 8px; }
.queue { color: var(--btc); font: 13px var(--mono); }
.msg-error-note { margin: 0; font-size: 14px; line-height: 1.4; color: var(--dim); }

/* Verrou : plein écran, au-dessus de tout, tant que l'appareil n'a pas donné le code d'accès. */
.lock { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--paper); }
.lock[hidden] { display: none; }
.lock-box { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 360px; }
.lock-title { margin: 0; font: 700 28px/1 var(--osw); letter-spacing: .08em; text-transform: uppercase; }
.lock-text { margin: 0; font-size: 15px; line-height: 1.45; color: var(--dim); }
.subhead { margin: 14px 0 6px; font: 600 11px/1 var(--osw); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.devices li .btn-small { margin-left: auto; }
.lock-box input { min-height: 48px; padding: 0 12px; border: 1px solid var(--rule); background: #242424; color: var(--ink); font: 16px var(--mono); }

/* Zone d'écriture : champ à gauche, dictée puis envoi à droite, sans cadre. */
.composer { flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px 0 10px; background: var(--paper); }
.composer-row { display: flex; align-items: flex-end; gap: 4px; padding: 4px 4px 4px 0; background: #242424; }
.composer-row textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 200px; padding: 9px 12px; border: 0; resize: none; background: transparent; color: var(--ink); font: 16px/1.4 var(--spe); outline: none; }
.composer-row .icon-btn { border: 0; }
.composer-row .send { background: var(--ink); color: var(--paper); }

/* ---------- notes vocales */
.mic[hidden] { display: none; }
.mic.is-rec { background: var(--btc); color: #1A1A1A; }
.rec-status { margin: 0; font: 13px/1.3 var(--mono); color: var(--dim); }
.rec-status[hidden] { display: none; }

/* ---------- mise en page fixe : seule la zone de contenu défile, la barre d'onglets ne bouge jamais */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.shell { height: 100dvh; display: flex; flex-direction: column; }
.main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: calc(env(safe-area-inset-top) + 24px) 20px 24px; max-width: none; }
.tabs { position: static; flex-shrink: 0; }
.toast { bottom: calc(env(safe-area-inset-bottom) + 76px); }

/* Chat : il occupe toute la hauteur, seuls les messages défilent, la zone d'écriture reste en bas. */
.main.is-chat { display: flex; flex-direction: column; overflow: hidden; padding-top: calc(env(safe-area-inset-top) + 10px); padding-bottom: 0; }
.main.is-chat #chat.active { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.main.is-chat .chat { flex: 1; min-height: 0; }
.main.is-chat .conv { flex: 1; min-height: 0; }
.main.is-chat .msgs { flex: 1; min-height: 0; }
.main.is-chat .history { flex: 1; min-height: 0; overflow-y: auto; }

@media (min-width: 1024px) {
  .shell { flex-direction: row; }
  .side { position: static; height: 100%; }
  .main { padding: 30px 36px 30px; }
  .main > .view { max-width: 1100px; }
  .main.is-chat { padding: 20px 36px 0; }
  .main.is-chat #chat.active { max-width: 900px; width: 100%; margin: 0 auto; }
  .chat { flex-direction: row; gap: 28px; }
  .chat.hist-open .history { width: 280px; flex-shrink: 0; padding-right: 20px; border-right: 1px solid var(--rule); }
  .chat.hist-open .conv { display: flex; flex: 1; }
}
.msgs, .history { scrollbar-width: none; } .msgs::-webkit-scrollbar, .history::-webkit-scrollbar { display: none; }

/* Écran entier : la coque est fixée aux 4 bords de l'écran, la barre d'onglets touche le bas,
   avec seulement une petite marge pour la barre d'accueil de l'iPhone. */
.shell { position: fixed; inset: 0; height: auto; }
/* Le bas de l'écran est une bande réservée par l'iPhone : on s'arrête juste au-dessus, sans marge en plus. */
.tabs { padding: 0 6px 2px; }
.tab { min-height: 52px; padding-top: 8px; }
.main { padding-top: calc(env(safe-area-inset-top) + 14px); }
.sync:empty { display: none; }


/* ---------- synchronisation */
.sync-state { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.sync-state b { font: 600 13px/1 var(--osw); letter-spacing: .14em; text-transform: uppercase; }
.mark-ok { background: #5FCB94; }
.sync-detail { margin: 0 0 12px; font: 13px/1.4 var(--mono); color: var(--dim); }

/* ---------- Veille, lot 1 : sujets suivis (vue secondaire ouverte depuis Aujourd'hui) */
.veille-entry { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 12px 0; border-top: 1px solid var(--strong); border-bottom: 1px solid var(--strong); color: var(--ink); text-decoration: none; font: 600 12px/1 var(--osw); letter-spacing: .2em; text-transform: uppercase; }
.veille-entry span:first-child { flex: 1; }
.veille-entry em { font: 400 12px/1 var(--mono); letter-spacing: 0; color: var(--dim); font-style: normal; }
.back { display: inline-block; margin: 0 0 14px; color: var(--dim); text-decoration: none; font: 500 12px/1 var(--osw); letter-spacing: .16em; text-transform: uppercase; }
.back:hover { color: var(--ink); }
.veille-search { margin-bottom: 14px; }
.veille-new { display: flex; flex-direction: column; gap: 8px; margin: 0 0 22px; padding: 14px; border: 1px solid var(--strong); }
.veille-new-title { margin: 0; }
.field { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--rule); background: #242424; color: var(--ink); font: 16px/1.4 var(--spe); color-scheme: dark; border-radius: 0; }
textarea.field { resize: vertical; }
.field:focus { outline: none; border-color: var(--strong); }
.vlist { list-style: none; margin: 0 0 12px; padding: 0; }
.vlist > li { border-top: 1px solid var(--rule); }
.vlist > li:first-child { border-top: 0; }
.vrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: var(--ink); text-decoration: none; }
.vrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.vrow-go { color: var(--dim); font: 400 26px/1 var(--spe); }
.flag-line { background: none; color: var(--btc); border: 1px solid var(--btc); }
.vtitle { margin: 10px 0 6px; font: 700 30px/1.05 var(--osw); text-transform: uppercase; overflow-wrap: anywhere; }
.vdates { margin: 0 0 16px; }
.vchat { margin-bottom: 4px; }
.vgrid { display: grid; gap: 18px; margin: 18px 0 24px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.vexec { margin-top: 10px; font-size: 14px; }
.vsrc { display: flex; flex-direction: column; gap: 5px; padding: 12px 0; }
.vsrc-title { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
a.vsrc-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.vsrc-title em { font-weight: 400; color: var(--dim); }
.vsrc-actions { display: flex; gap: 16px; font-size: 14px; }
.vsrc-actions .linkbtn { color: var(--dim); }
.vform { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.vfield { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.vfield .result { margin: 0; align-self: center; }
.vother { padding: 10px 0; border-top: 1px solid var(--rule); }
.vother summary { cursor: pointer; font: 600 13px/1.2 var(--osw); letter-spacing: .1em; text-transform: uppercase; }
.vother .msg-body { margin-top: 10px; font-size: 15px; }
.chat-ctx { margin: 0 0 8px; padding: 8px 0; border-bottom: 1px solid var(--rule); font: 13px/1.4 var(--mono); color: var(--dim); }
.chat-ctx b { color: var(--ink); font-weight: 500; }
.chat-ctx[hidden] { display: none; }
@media (min-width: 1024px) {
  .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  #veille { max-width: 820px; }
}

/* ---------- Todo fusionné (bloc Aujourd'hui en haut) et onglet Veille à 3 sous-onglets */
.alltasks { margin-top: 8px; margin-bottom: 14px; }
.vtabs { flex-wrap: wrap; gap: 4px 20px; margin-bottom: 16px; }
a.textchip { display: inline-flex; align-items: center; text-decoration: none; }
.vstatus { margin: 0 0 22px; padding: 12px 14px; border: 1px solid var(--strong); font: 13px/1.5 var(--mono); color: var(--dim); }
.vstatus p { margin: 0; }
.vstatus b { color: var(--ink); font-weight: 500; }
.verr { color: var(--btc); }
.vnews { display: flex; flex-direction: column; gap: 10px; padding: 18px 0; border-top: 1px solid var(--strong); }
.vnews-title { margin: 0; font: 700 22px/1.1 var(--osw); text-transform: uppercase; overflow-wrap: anywhere; }
.vnews .over { border-bottom: 0; padding-bottom: 0; }
.vnovel { margin: 0; font-size: 15px; }
.vsources { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 15px; }
.vsources a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); overflow-wrap: anywhere; }
.vtweet { white-space: pre-wrap; padding: 12px 14px; background: #242424; font: 16px/1.5 var(--spe); overflow-wrap: anywhere; }
.vfb { list-style: none; margin: 0; padding: 0; font: 12px/1.5 var(--mono); color: var(--dim); }
.vfb b { color: var(--ink); font-weight: 500; }
.vplain { margin: 8px 0 0; padding-left: 20px; font-size: 15px; }
.vfilters { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; margin: 0 0 18px; }
.vfilters .field { min-height: 40px; padding: 0 8px; font: 13px var(--mono); }
.vseg-small button { min-height: 40px; font-size: 11px; }
@media (min-width: 1024px) { #veille { max-width: 860px; } .vfilters { grid-template-columns: auto 260px auto 260px; justify-content: start; } }

/* ---------- corrections après test : lecture, thèmes, réseaux, résultats */
.vcount { font: 400 11px/1 var(--mono); color: var(--btc); margin-left: 4px; }
.vsub { margin-top: -4px; }
.vtriage { margin: 0 0 16px; max-width: 360px; }
.vread { display: flex; justify-content: flex-end; }
.vresult { margin-left: 8px; }
.vfb li { padding: 3px 0; }
.vfb .verr { display: block; }
.vnet { display: flex; align-items: center; gap: 8px; font: 600 11px/1 var(--osw); letter-spacing: .14em; text-transform: uppercase; }
.vnet svg { flex-shrink: 0; outline: 1px solid var(--rule); }
.vnet-account { font: 400 12px var(--mono); letter-spacing: 0; text-transform: none; color: var(--dim); }
.vtheme-head { width: 100%; border: 0; background: none; text-align: left; }
.vtheme-body { display: flex; flex-direction: column; gap: 8px; padding: 0 0 14px; font-size: 15px; }
.vtheme-body p { margin: 0; }
.vkw b { font: 600 11px/1 var(--osw); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-right: 6px; }
.vkw a { color: var(--ink); }
.vst { padding: 1px 6px; border: 1px solid var(--rule); letter-spacing: .08em; }
.vst-ok { border-color: #5FCB94; color: #5FCB94; }
.vst-wait { border-color: var(--btc); color: var(--btc); }
.vst-err { background: var(--btc); color: #1A1A1A; border-color: var(--btc); }
.vst-pause { color: var(--dim); }

/* ---------- pilote The Rage */
.vcounts { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0 0 12px; font: 12px/1.5 var(--mono); color: var(--dim); }
.vcounts b { color: var(--ink); font-weight: 500; }
.vrage-filter { max-width: none; flex-wrap: wrap; }
.vrage-filter button { min-height: 40px; font-size: 11px; }
.vrage-line { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.vrage-line b { font: 600 11px/1 var(--osw); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-right: 6px; }
.vstatus .btn { margin-top: 6px; }
.vsrcpick { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; padding: 10px 12px; border: 1px solid var(--rule); font-size: 15px; }
.vsrcpick input { width: 18px; height: 18px; accent-color: var(--btc); vertical-align: -3px; margin-right: 6px; }
.vreader { max-height: 90dvh; }
.vreader-body { max-height: 65dvh; overflow-y: auto; }

/* ---------- écoute des textes (synthèse vocale de l'appareil) */
.vlisten { align-self: flex-start; }
.vlisten.is-playing { background: var(--btc); border-color: var(--btc); color: #1A1A1A; }
.tts-bar { flex-shrink: 0; display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-top: 1px solid var(--strong); background: #242424; }
.tts-bar[hidden] { display: none; }
.tts-bar .icon-btn { border: 0; font: 600 15px/1 var(--mono); }
.tts-bar .tts-rate { width: auto; padding: 0 8px; font-size: 12px; }
.tts-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 13px/1.3 var(--mono); color: var(--dim); }
.tts-title em { font-style: normal; color: var(--rule); }
.tts-inline { border: 1px solid var(--strong); }
.tts-settings { display: flex; flex-direction: column; gap: 10px; }
.tts-settings select { max-width: 420px; }
@media (min-width: 1024px) { .tts-bar:not(.tts-inline) { position: fixed; left: 248px; right: 0; bottom: 0; z-index: 5; } }

/* ---------- étape 3 : cartes enrichies, fiche projet, liste des projets dans la barre latérale (PC) */
.card-topic { font: italic 14px/1.35 var(--spe); color: var(--dim); overflow-wrap: anywhere; }
.card-focus { font: 14px/1.4 var(--spe); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-focus b { font: 600 10px/1 var(--osw); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-right: 6px; }
.card-stats { padding-top: 8px; }
.fiche[hidden], .cards[hidden] { display: none; }
.ptopic { margin: 0 0 8px; font: italic 16px/1.4 var(--spe); color: var(--dim); }
.ptabs { margin-top: 4px; }
.pmeta { margin: 0 0 14px; }
.pmeta .linkbtn { font: inherit; color: var(--ink); }
.pcapture { margin-bottom: 16px; }
.pfocus { margin: 0; font-size: 16px; line-height: 1.5; }
button.vsrc-title { text-align: left; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.pdetail { margin-top: 8px; }
.fiche .actions { margin-bottom: 18px; }
.pdetail .group-block { margin-top: 14px; }
.phist { display: flex; }
.nav-projects { display: none; }
@media (min-width: 1024px) {
  .nav-projects { display: flex; flex-direction: column; gap: 0; min-height: 0; overflow-y: auto; scrollbar-width: none; }
  .side-head { padding: 0 0 8px; border-bottom: 1px solid var(--rule); font: 600 11px/1 var(--osw); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
  .side-project { display: flex; justify-content: space-between; gap: 10px; min-height: 36px; align-items: center; color: var(--dim); text-decoration: none; font: 500 13px/1 var(--osw); letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--rule); }
  .side-project em { font: 400 12px/1 var(--mono); font-style: normal; }
  .side-project[aria-current="page"] { color: var(--ink); font-weight: 600; }
  .fiche { max-width: 860px; }
  .fiche .group-block { break-inside: avoid; }
}

/* ---------- Veille, lot 2 : index Cryptoast */
.carticle .vnews-title a { color: var(--ink); text-decoration: none; }
.carticle .vnews-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.crel .sheet-label { display: block; margin-bottom: 4px; }
.crel .vplain { margin-top: 0; }
.cindex { margin: 0 0 12px; }
.cregfb { margin: 0 0 14px; }

/* ---------- Veille, lot 3 : apprentissage éditorial */
.clesson-rule { margin: 0; font: 500 18px/1.4 var(--spe); }
.cdiff { margin: 8px 0 0; padding: 10px 12px; background: #242424; font: 12px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow-y: auto; }
.cmem em { color: var(--dim); }
.vstatus code { font: inherit; color: var(--ink); }
