@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --unread: #2f5bff; /* le point d'une actu non lue, celui du canvas */
  --page: #f2f2f2;
  --bg: #ffffff;
  --surface: #f5f5f5;
  --line: #e0e0e0;
  --ink: #0a0a0a;
  --grey: #5e5e5e;
  --red: #ff3b30;
  --pill: #ffffff;
  --pill-line: #8a8a8a;
  --crumb: #404040;
  --dot-red: #d92d20;
  --mark: #262626;
  --move: .75s;
  --bounce: cubic-bezier(.34, 1.4, .64, 1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Une colonne de téléphone, centrée sur un grand écran. */
.app {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 520px) {
  .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

/* L'écran occupe toute la hauteur : les bulles absorbent le surplus et le pied reste en bas. */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: calc(22px + env(safe-area-inset-top)) 22px calc(32px + env(safe-area-inset-bottom));
}
.screen > * { flex: none; }
.screen.enter { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen.enter, .scrim, .sheet { animation: none !important; } }

/* Connexion */
.login { display: grid; gap: 14px; }
.login h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 40px 0 0; }
.login .lead { margin: 0 0 12px; color: var(--grey); }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--grey); }
.field input {
  font: inherit; font-size: 16px; font-weight: 400; color: var(--ink);
  padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg);
}
.field select {
  font: inherit; font-size: 16px; font-weight: 400; color: var(--ink);
  padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg);
}
.hint { margin: 0; font-size: 13px; color: var(--grey); }
.detail .hint { margin-top: 10px; font-size: 13px; }
.detail .login { margin-top: 18px; }
.detail .btn.light { margin-top: 18px; }
.error { margin: 0; min-height: 1.4em; font-size: 14px; font-weight: 600; color: var(--red); }

/* Haut d'écran */
.nav { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; min-height: 48px; font-size: 13px; color: var(--grey); font-weight: 500; }
.today, .crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumb b { color: var(--ink); font-weight: 600; }
.back {
  border: 0; background: var(--surface); height: 48px; max-width: 100%; padding: 0 18px 0 8px; border-radius: 999px;
  display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--crumb); font-size: 14px; text-align: left;
}
.back .arrow { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; color: var(--ink); flex: none; }
.back .arrow svg { width: 18px; height: 18px; }

/* Le verdict : sous la date, la phrase qui dit combien de cartes d'action attendent. */
.today { font-size: 14px; }
.verdict { margin: 2px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.page-title { margin: 18px 0 0; font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }

/* La barre du bas : trois onglets, celui de la page courante en gras. Fixée au bas de la colonne ; les écrans qui
   la portent gardent de quoi défiler jusqu'au-dessus d'elle. */
.tabs {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 3; width: 100%; max-width: 480px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  padding: 8px 12px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg);
}
.tab {
  min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 0; border: 0; background: transparent; color: var(--grey); font-size: 12px; font-weight: 500; cursor: pointer;
}
.tab.current { color: var(--ink); font-weight: 700; }
.tab-icon { width: 24px; height: 24px; display: block; }
.tab-icon svg { width: 24px; height: 24px; display: block; }
.tab.current .tab-icon svg { stroke-width: 2.2; }
.screen.has-tabs { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }

/* Bulles de l'accueil : la grappe du canvas (la plus grosse à gauche, les deux autres à sa droite), posée dans le
   creux entre le haut d'écran et le bloc des statuts ; le script place chaque bulle et pose son rayon dans `--r`. */
.screen > .bubbles { flex: 1 0 auto; }
.bubbles { display: grid; place-items: center; margin: 22px 0 8px; }
.cluster { position: relative; }
.bubble {
  position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer; line-height: 1;
}
.bubble .n { font-size: calc(var(--r) * 0.6px); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.bubble .name { font-size: clamp(11px, calc(11.4px + var(--r) * 0.0335px), 15px); font-weight: 600; white-space: nowrap; }
/* Veille : « sorties » dans la plus petite bulle (104 px) garde 12 px de marge de chaque côté. */
.bubbles.veille .bubble .name { font-size: clamp(11px, calc(11px + var(--r) * 0.0335px), 15px); }

/* Relief des bulles, celui du canvas : un reflet en haut à gauche, un bord assombri, une ombre portée douce.
   `--r` est le rayon en px, `--shade` l'opacité de l'ombre, plus marquée quand la teinte est foncée.
   Le flou de l'ombre portée est plafonné à 60 px : au-delà, Chromium la dessine avec un voile rectangulaire. */
.bubble, .status-bubble, .pill-dot {
  background-image:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, .30) 0%, rgba(255, 255, 255, 0) 58%),
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, .16) 100%);
  box-shadow:
    inset calc(var(--r) * -0.08px) calc(var(--r) * -0.12px) calc(var(--r) * 0.3px) rgba(0, 0, 0, .06),
    inset calc(var(--r) * 0.05px) calc(var(--r) * 0.07px) calc(var(--r) * 0.2px) rgba(255, 255, 255, .35),
    0 calc(var(--r) * 0.28px) min(calc(var(--r) * 0.6px), 60px) calc(var(--r) * -0.18px) rgba(0, 0, 0, var(--shade, .3));
}

/* Mouvement des bulles et des pastilles : trois quarts de seconde avec un léger rebond, quasi instantané si l'appareil demande de réduire les animations. */
.bubble, .status-bubble, .pill, .pill-dot {
  transition: transform var(--move) var(--bounce), background-color var(--move) ease, color var(--move) ease;
}
@media (prefers-reduced-motion: reduce) { :root { --move: .01s; } }
/* Une pastille apparaît en fondu derrière la bulle qui rétrécit jusqu'à elle : son fond, son liseré et son nom
   fondent, jamais son opacité, pour que la petite bulle reste visible pendant tout le trajet. */
.pill.arriving { animation: pillin .4s ease .3s both; }
@keyframes pillin {
  from { background-color: transparent; border-color: transparent; color: transparent; }
  to { background-color: var(--pill); border-color: var(--pill-line); color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) { .pill.arriving { animation: none; } }

/* Écran d'un statut : la bulle touchée, pleine et grande, déborde du coin haut droit (canvas : centre à 335 × 25 pour
   390 px de large) ; le titre à gauche ; les deux autres statuts en pastilles ; les domaines dans un bloc posé en bas. */
.status-title { position: relative; margin: 18px 0 0; min-width: 0; font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.status-bubble {
  position: absolute; z-index: 0; top: calc(25px - var(--r) * 1px); right: calc(55px - var(--r) * 1px);
  width: calc(var(--r) * 2px); height: calc(var(--r) * 2px); border-radius: 50%;
}
.status-count {
  position: absolute; left: 0; right: 0; top: calc(var(--r) * 1.265px); text-align: center;
  font-size: 76px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums;
}
/* À trois chiffres, le nombre ne tient plus centré sur la bulle : il s'aligne sur la marge droite de l'écran. */
.status-count.wide { text-align: right; padding-right: calc(var(--r) * 1px - 33px); }
/* Le sous-titre s'arrête avant la grande bulle (son bord gauche est à 170 px du bord droit de la colonne) et passe à la ligne. */
.status-sub { position: relative; max-width: calc(100% - 170px); margin: 6px 0 0; min-width: 0; font-size: 14px; font-weight: 500; color: var(--grey); }
.pills { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
.status-sub + .pills { margin-top: 22px; }
.pill {
  height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 5px; cursor: pointer;
  border: 1px solid var(--pill-line); border-radius: 999px; background: var(--pill); color: var(--ink); font-size: 14px;
}
.pill-dot {
  width: calc(var(--r) * 2px); height: calc(var(--r) * 2px); flex: none; border-radius: 50%; display: grid; place-items: center;
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.pill .name { font-weight: 500; white-space: nowrap; }
/* La liste directe des cartes d'un statut : un bloc qui prend la place restante, entre les pastilles et le pied, et
   défile au doigt sans barre visible. Chaque carte a le visage de celles de « Le plus urgent » ; touchée, elle déplie
   sur place ses deux gestes, une seule à la fois. */
.cards, .reads {
  position: relative; z-index: 1; display: grid; align-content: start; gap: 6px; margin-top: 24px;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none;
}
.cards::-webkit-scrollbar, .reads::-webkit-scrollbar { display: none; }
.card { border-radius: 16px; background: var(--surface); }
.card-head {
  width: 100%; min-height: 44px; display: flex; align-items: flex-start; gap: 14px; padding: 12px 16px;
  border: 0; border-radius: 16px; background: transparent; text-align: left; cursor: pointer;
}
.card-head:active { background: #ececec; }
.card-head:focus-visible { outline-offset: -2px; }
.card-body { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .25s ease, visibility 0s .25s; }
.card.open .card-body { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .25s ease, visibility 0s; }
.card-inner { min-height: 0; overflow: hidden; }
.card-gestures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 16px 12px; }
.gesture {
  height: 44px; padding: 0 8px; border: 1px solid var(--pill-line); border-radius: 12px; background: var(--bg); color: var(--ink);
  font-weight: 600; text-align: center; cursor: pointer;
}
.gesture.primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.gesture:active { transform: scale(.98); }
a.gesture { display: flex; align-items: center; justify-content: center; text-decoration: none; }
/* La carte « N mails à répondre » dépliée : chaque mail sous un filet, avec ses deux gestes. */
.mails { display: grid; padding: 0 16px 6px; }
.mail { display: grid; gap: 3px; padding: 14px 0; border-top: 1px solid var(--line); }
.mail-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--grey); }
.mail-from { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.mail-title { font-size: 16px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.mail-lines { font-size: 14px; color: var(--grey); white-space: pre-line; overflow-wrap: anywhere; }
.mail .card-gestures { padding: 9px 0 0; }
@media (prefers-reduced-motion: reduce) { .card-body { transition: none !important; } }

/* Sélection : un appui long coche la carte, la coche remplace la pastille, la barre de sélection remplace celle du bas.
   Le menu contextuel et la sélection de texte du navigateur sont coupés sur le visage d'une carte. */
.card-head, .urgent-card, .read-open { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.check { display: none; width: 24px; height: 24px; flex: none; border: 2px solid var(--ink); border-radius: 50%; background: var(--bg); color: #fff; place-items: center; }
.check svg { width: 14px; height: 14px; }
.screen.selecting .dot:not(.keep), .screen.selecting .read-dot { display: none; }
.screen.selecting .check { display: grid; }
.selected .check { background: var(--ink); }
.card.selected, .urgent-card.selected { background: #e8e8e8; box-shadow: inset 0 0 0 2px var(--ink); }
.card.selected .card-head:active { background: transparent; }
.selbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 4; width: 100%; max-width: 480px;
  display: grid; gap: 10px; padding: 14px 20px calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg);
}
.selcount { font-weight: 600; }
.selgestures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.selgestures .gesture { height: 52px; border-radius: 14px; font-size: 16px; }
.screen.selecting { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
/* Le bandeau « Annuler » d'une action récente reste au-dessus de la barre de sélection. */
body:has(.selbar) .bar { bottom: calc(150px + env(safe-area-inset-bottom)); }

/* « Le plus urgent » : trois cartes au plus, sous les bulles. */
.urgent { margin-top: 18px; }
.urgent h2 { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--grey); }
.urgent-list { display: grid; gap: 6px; }
.urgent-card {
  width: 100%; min-height: 44px; display: flex; align-items: flex-start; gap: 14px; padding: 12px 16px;
  border: 0; border-radius: 16px; background: var(--surface); text-align: left; cursor: pointer;
}
.urgent-card:active { background: #ececec; }
.urgent-card .dot, .card-head .dot { width: 10px; height: 10px; flex: none; margin-top: 6px; border-radius: 5px; background: var(--ink); }
.urgent-card .dot.breakdown, .card-head .dot.breakdown { background: var(--dot-red); }
.urgent-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.urgent-text .kind { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--grey); }
.urgent-text .title { font-size: 17px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.urgent-text .meta { font-size: 14px; color: var(--grey); }

/* La page Veille : le titre et le crayon des sources en haut, les bulles des catégories, « À lire en premier ». */
.veille-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 30px; }
.veille-head .page-title { margin: 0; font-size: 34px; letter-spacing: -.03em; line-height: 1.1; }
.veille-edit {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid var(--pill-line); border-radius: 50%; background: transparent; color: var(--ink);
}
.veille-edit svg { width: 20px; height: 20px; }
.first { margin-top: 18px; }
.first h2, .reads-label { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--grey); }

/* Une actu : un point, un titre, la source, la catégorie et l'ancienneté, l'étiquette de la note. Non lue : titre en gras
   et point plein ; lue : titre en gris et point en anneau. */
.read-list { list-style: none; margin: 0; padding: 0; }
.read { border-top: 1px solid var(--line); }
.read-open {
  width: 100%; min-height: 44px; display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border: 0;
  background: transparent; text-align: left; cursor: pointer;
}
.read-open:focus-visible { outline-offset: -2px; }
.read-dot { width: 10px; height: 10px; flex: none; margin-top: 6px; border-radius: 5px; }
.read.unread .read-dot { background: var(--unread); }
.read.seen .read-dot { border: 1.5px solid var(--pill-line); }
.read-text { flex: 1; min-width: 0; display: grid; gap: 4px; }
.read-title { font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.read.unread .read-title { font-weight: 700; }
.read.seen .read-title { font-weight: 500; color: var(--grey); }
.read-meta { font-size: 14px; color: var(--grey); }
.read-interest {
  justify-self: start; display: inline-flex; align-items: center; height: 26px; margin-top: 2px; padding: 0 10px;
  border-radius: 13px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600;
}
.reads-empty { margin: 0; padding: 14px 0; border-top: 1px solid var(--line); color: var(--grey); }
/* La ligne repliée « Plus ancien » : le nombre d'actus et la flèche à droite ; elle se retourne quand la ligne est ouverte. */
.older {
  width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0;
  border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; font-weight: 600;
}
.older-count { display: flex; align-items: center; gap: 8px; color: var(--grey); font-weight: 400; }
.chevron { width: 18px; height: 18px; display: block; transition: transform .2s ease; }
.chevron svg { width: 18px; height: 18px; display: block; }
.older[aria-expanded="true"] .chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .chevron { transition: none; } }

/* Lignes */
.rows { display: grid; margin-top: 14px; }
.row {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 15px 0;
  border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer;
}
.row:last-child { border-bottom: 0; }
.settled-today .row { min-height: 64px; padding: 0; }
.row .txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.row .txt b { font-weight: 600; font-size: 15.5px; line-height: 1.25; }
.row .txt small { color: var(--grey); font-size: 13px; }
.empty { margin-top: 40px; text-align: center; color: var(--grey); }
.empty b { display: block; color: var(--ink); font-size: 22px; font-weight: 700; margin-bottom: 6px; }

/* Détail */
.detail h2 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 16px 0 6px; text-wrap: balance; }
.detail .meta { font-size: 13px; color: var(--grey); font-variant-numeric: tabular-nums; }
.detail h3 { font-size: 12px; font-weight: 600; color: var(--grey); text-transform: uppercase; letter-spacing: .06em; margin: 22px 0 6px; }
.detail p { margin: 0; font-size: 15.5px; line-height: 1.5; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface); color: var(--grey); }
.tag.red { background: #ffe9e7; color: #b42318; }
.tag.green { background: #e6f9ee; color: #15803d; }
.btn {
  display: block; width: 100%; border: 0; border-radius: 14px; padding: 16px; font-size: 16px; font-weight: 600;
  text-align: center; text-decoration: none; background: var(--ink); color: #fff; margin-top: 26px;
}
.btn:active { transform: scale(.98); }

.foot { margin-top: auto; padding-top: 26px; font-size: 12px; color: var(--grey); }
/* Sur l'accueil et la Veille, le pied suit le contenu, au-dessus de la barre du bas. */
/* L'écran d'un statut tient dans l'écran : la liste des cartes prend la place restante et défile, le pied reste en
   bas, et le bas de la liste est à 72 px du bord. */
.screen.status, .screen.category { flex: none; height: 100vh; height: 100dvh; }
.screen.status > .cards, .screen.category > .reads { flex: 1 1 0; min-height: 0; }
.screen.status > .foot, .screen.category > .foot { height: 40px; padding-top: 0; display: flex; align-items: flex-end; }
.cards + .foot, .reads + .foot { margin-top: 0; }
.foot.problem { color: var(--ink); font-weight: 600; }
.linkbtn { min-width: 44px; min-height: 44px; border: 0; background: transparent; padding: 0; color: var(--ink); cursor: pointer; font-weight: 600; text-decoration: underline; }

/* Tableau muet : bandeau rouge en tête de chaque écran */
.stale { margin: 0 0 18px; padding: 14px 16px; border-radius: 14px; background: var(--red); color: #fff; font-size: 14.5px; font-weight: 600; }

/* Actions : collées en bas de l'écran du détail, sous le pouce */
.screen:has(> .detail-card) { flex: none; display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow-y: auto; }
.screen:has(> .detail-card) > * { flex: none; }
.screen:has(> .detail-card) > .detail-card { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.detail-text { flex: 1; min-height: 96px; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 12px; }
/* Le bandeau « Annuler » occupe le pied de l'écran : les gestes montent au-dessus de lui. */
.has-bar .screen:has(> .detail-card) { padding-bottom: calc(var(--bar-room, 80px) + env(safe-area-inset-bottom)); }
.card-actions { flex: none; padding-top: 12px; }
.card-actions .btn { margin-top: 10px; min-height: 48px; }
.card-actions .btn:first-child { margin-top: 0; }
.btn.light { background: var(--surface); color: var(--ink); }
.card-actions h3 { font-size: 12px; font-weight: 600; color: var(--grey); text-transform: uppercase; letter-spacing: .06em; margin: 16px 0 8px; }
.postpone { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.choice { border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 14px 8px; min-height: 48px; font-weight: 600; cursor: pointer; }
.choice:active { background: var(--surface); }
.settled-today { margin-top: 26px; }
.settled-today h3 { font-size: 12px; font-weight: 600; color: var(--grey); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.settled-today .rows { margin-top: 4px; }

/* Ticket GitHub : ce que le tableau lit sur GitHub et la réponse à y écrire */
.screen:has(> .detail-card.has-ticket) { height: auto; min-height: 100vh; min-height: 100dvh; overflow-y: visible; }
.screen:has(> .detail-card.has-ticket) > .detail-card { flex: 1 0 auto; }
.screen:has(> .detail-card.has-ticket) > .detail-card > .detail-text { flex: none; overflow: visible; }
.screen:has(> .detail-card.has-ticket) > .detail-card > .card-actions { margin-top: auto; }
.ticket { margin-top: 22px; padding-top: 6px; border-top: 1px solid var(--line); }
.ticket h3 { font-size: 12px; font-weight: 600; color: var(--grey); text-transform: uppercase; letter-spacing: .06em; margin: 16px 0 8px; }
.ticket-title { margin: 0 0 6px; font-weight: 700; }
.ticketlink { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; text-decoration: underline; }
.ticket-labels { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.ticket-question { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-note { margin: 8px 0 0; font-size: 14px; color: var(--grey); }
.ticket-error { margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--red); }
.ticket-error a { color: inherit; }
.ticket-error .linkbtn { color: var(--ink); font-size: 14px; }
.answer { display: grid; gap: 10px; margin-top: 14px; }
.field textarea {
  font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); resize: vertical; min-height: 120px;
  padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg);
}
.answer .btn:disabled, .triage .btn:disabled { opacity: .45; cursor: default; }
.triage { display: grid; gap: 10px; }
.triage h3 { margin-bottom: 0; }
.triage-choices { display: grid; gap: 10px; }
.triage-choices .btn { margin-top: 0; }
.github-status { margin-top: 14px; }

/* Bandeau d'action */
.bar {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 9; width: calc(100% - 32px); max-width: 448px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14.5px; font-weight: 500;
  animation: up .2s ease-out;
}
.bar button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: #fff; font-weight: 700; padding: 4px 6px; cursor: pointer; text-decoration: underline; }
.bar:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .bar { animation: none; } }

/* Réglages */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); z-index: 8; display: flex; align-items: flex-end; justify-content: center; animation: fadein .15s ease-out; }
.sheet { width: 100%; max-width: 480px; background: var(--bg); border-radius: 24px 24px 0 0; padding: 10px 22px calc(26px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
.sheet .grab { position: relative; height: 29px; margin: -10px -22px 0; touch-action: none; cursor: grab; }
.sheet .grab::before { content: ''; position: absolute; top: 10px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--line); }
.sheet.dragging { transition: none; }
.sheet.settling { transition: transform .18s ease-out; }
@media (prefers-reduced-motion: reduce) { .sheet.settling { transition: none; } }
.sheet h2 { font-size: 20px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; }
.opt {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 13px 12px; border: 1px solid var(--line);
  border-radius: 14px; background: transparent; cursor: pointer; margin-top: 8px; text-align: left;
}
.opt[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt .grad { display: flex; gap: 3px; flex: none; }
.opt .grad i { width: 18px; height: 18px; border-radius: 5px; display: block; }
.opt b { flex: 1; font-weight: 600; font-size: 15px; }
.opt .ck { font-weight: 700; opacity: 0; }
.opt[aria-checked="true"] .ck { opacity: 1; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes up { from { transform: translateY(40px); } to { transform: none; } }

/* La lecture d'une actu : la source, le titre, le bouton vers la source, le résumé en trois parties ; en bas,
   « Intéressant » et « Pas intéressant », ou la note de 1 à 5 avec « Annuler » et « Envoyer ». */
.actu-detail { margin-top: 6px; }
.actu-meta { margin-top: 14px; font-size: 14px; color: var(--grey); }
.actu-title { margin: 8px 0 14px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere; }
.actu-detail .read-interest { margin: 0 0 14px; }
.btn.actu-source { min-height: 52px; margin-top: 4px; }
.actu-part { margin-top: 18px; }
.actu-part h3 { margin: 0 0 6px; }
.actu-part p, .actu-points { font-size: 16px; line-height: 1.5; }
.actu-points { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.actu-foryou { padding: 14px 16px; border-radius: 14px; background: var(--surface); }
.actu-foryou p { font-size: 15px; line-height: 1.45; }
.actu-missing { margin-top: 22px; color: var(--grey); }
.actu-actions { flex: none; display: grid; gap: 10px; padding: 14px 0 12px; border-top: 1px solid var(--line); }
.actu-actions .error { min-height: 0; }
.actu-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.actu-actions .gesture { height: 52px; border-radius: 14px; font-size: 16px; }
.actu-actions .gesture:disabled { border-color: var(--line); background: var(--surface); color: var(--grey); cursor: not-allowed; transform: none; }
.actu-ask { display: grid; gap: 2px; }
.actu-ask b { font-size: 16px; font-weight: 600; }
.actu-ask span { font-size: 14px; color: var(--grey); }
.actu-notes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.note {
  height: 48px; border: 1px solid var(--pill-line); border-radius: 24px; background: var(--bg); color: var(--ink);
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.note[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.actu-detail .detail-text { padding-bottom: 16px; }

/* Sélection d'actus : la coche prend la place du point, l'actu cochée se pose sur un fond gris ; en tête de la liste, le
   nombre de cochées, « Annuler » et la case qui coche la semaine. */
.read-open .check { margin-top: 0; }
.read-open.selected { width: calc(100% + 24px); margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 12px; background: var(--surface); }
.selhead { position: sticky; top: 0; z-index: 2; padding-bottom: 6px; background: var(--bg); }
.selhead-top { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.selhead .selcount { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.selcancel { height: 44px; padding: 0 16px; border: 1px solid var(--pill-line); border-radius: 22px; background: transparent; font-weight: 600; cursor: pointer; }
.selall { min-height: 44px; display: flex; align-items: center; gap: 14px; font-weight: 600; cursor: pointer; }
.selall input, .reject-choice input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--ink); }

/* La fenêtre « Pas intéressant » : sur le fond gris du canvas, l'actu visée reste lisible au-dessus de la fenêtre. */
.scrim.reject { flex-direction: column; justify-content: flex-end; align-items: center; background: #767676; }
.reject-above { flex: none; width: 100%; max-width: 480px; display: grid; gap: 8px; padding: 48px 20px 24px; color: #fff; }
.reject-meta { font-size: 14px; }
.reject-title { font-size: 26px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.scrim.reject .sheet { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.reject-choices { display: grid; margin-top: 4px; border-bottom: 1px solid var(--line); }
.reject-choice { min-height: 56px; display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line); font-size: 16px; font-weight: 500; cursor: pointer; }
.reject-choice.solo { min-height: 44px; margin-top: 8px; border-top: 0; }
.reject-note { display: grid; gap: 6px; margin-top: 16px; font-size: 14px; color: var(--grey); }
.reject-note input { height: 48px; padding: 0 14px; border: 1px solid var(--pill-line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; }
.scrim.reject .error { min-height: 0; margin-top: 8px; }
.scrim.reject .actu-pair { margin-top: 14px; }
.scrim.reject .gesture { height: 52px; border-radius: 14px; font-size: 16px; }
.scrim.reject .gesture:disabled { border-color: var(--line); background: var(--surface); color: var(--grey); cursor: not-allowed; }

/* L'écran des sources de veille : le titre, le nombre de sources suivies, une ligne par source (le nom, ses catégories
   à droite), puis « Ajouter une source ». Leurs fenêtres du bas reprennent celle de « Pas intéressant ». */
.screen.veille-sources .page-title { margin-top: 8px; font-size: 34px; letter-spacing: -.03em; line-height: 1.1; }
.sources-sub { margin: 4px 0 0; font-size: 15px; color: var(--grey); }
.screen.veille-sources .rows { margin: 16px 0; border-top: 1px solid var(--line); }
.screen.veille-sources .row { min-height: 56px; padding: 0; justify-content: space-between; border-bottom: 1px solid var(--line); }
.screen.veille-sources .row b { font-weight: 600; font-size: 15.5px; }
.row-cats { flex: none; max-width: 55%; font-size: 14px; color: var(--grey); text-align: right; }
.add-source { width: 100%; height: 52px; border-radius: 14px; font-size: 16px; }
.screen.veille-sources .empty { margin: 32px 0; }
.scrim.sources .sheet { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.scrim.sources .reject-choices { margin-top: 10px; }
.scrim.sources .error { min-height: 0; margin-top: 8px; }
.scrim.sources .gesture { width: 100%; height: 52px; border-radius: 14px; font-size: 16px; }
.scrim.sources .actu-pair { margin-top: 14px; }
.scrim.sources .reject-choices + .error + .gesture { margin-top: 12px; }
.scrim.sources .gesture:disabled { border-color: var(--line); background: var(--surface); color: var(--grey); cursor: not-allowed; }

/* Connexion par code : le pavé de la planche « Connexion - code à 4 chiffres » du canvas. */
.code-screen { align-items: center; padding: calc(min(120px, 14.2vh) + env(safe-area-inset-top)) 32px calc(48px + env(safe-area-inset-bottom)); }
.code-head { display: grid; justify-items: center; gap: 8px; }
.code-title { margin: 0; min-height: 32px; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.code-sub { margin: 0; min-height: 21px; color: var(--grey); }
.code-dots { display: flex; gap: 20px; margin-top: 40px; }
.code-dots span { width: 18px; height: 18px; border-radius: 9px; border: 2px solid var(--pill-line); }
.code-dots span.on { background: var(--ink); border-color: var(--ink); }
.code-message { margin: 20px 0 0; min-height: 40px; text-align: center; font-size: 14px; font-weight: 600; color: var(--red); }
.code-message.plain { font-weight: 400; color: var(--grey); }
.code-screen .linkbtn { margin-top: 8px; }
.code-pad { margin-top: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; width: 288px; }
.code-key {
  height: 80px; border-radius: 40px; border: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--ink); font-size: 30px; font-weight: 500; cursor: pointer;
}
.code-key.erase { background: var(--bg); }
.code-key:active:not(:disabled) { background: var(--line); }
.code-key:disabled { opacity: .4; cursor: default; }

/* La page Réglages, planche « Réglages » du canvas : le titre, une section « Le tableau » de trois lignes de 50 px. */
.screen.settings .page-title, .screen.color .page-title { margin: 30px 0 0; font-size: 34px; letter-spacing: -.03em; line-height: 1.1; }
.screen.settings .page-title { margin-bottom: 16px; }
.setting-group { display: grid; }
.setting-label { padding-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--grey); }
.setting-row {
  width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0;
  border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 15px; font-weight: 600;
  text-align: left; cursor: pointer;
}
.setting-row:last-child { border-bottom: 1px solid var(--line); }
.setting-row .chev { color: var(--grey); }
.setting-row .chev, .setting-row .chev svg { width: 18px; height: 18px; display: block; }
.setting-row .swatch { width: 22px; height: 22px; flex: none; border-radius: 50%; display: block; }
.screen.settings .github-status { margin: 18px 0 0; }
.screen .sub { font-size: 13px; color: var(--grey); margin: 6px 0 14px; }
.logout { margin-top: 22px; min-height: 50px; border: 0; border-radius: 14px; background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; }

/* Changer mon code : le pavé de la connexion sous le fil d'Ariane. */
.screen.change-code .code-body { flex: 1; display: flex; flex-direction: column; align-items: center; padding: min(56px, 6vh) 10px 16px; }

/* « Tout archiver » : au-dessus de la liste Fait, sans la pousser (la liste garde la place restante et défile). */
.btn.archive-all { flex: none; min-height: 48px; margin: 16px 0 4px; padding: 12px; font-size: 15px; }
