/* Veille Grand Oral — charte minimalist-ui adaptée (SFD §8) : monochrome chaud, typographie
   éditoriale, pastels réservés aux codes sémantiques, densité d'application de lecture. */

@font-face {
  font-family: "Newsreader";
  src: url("/static/fonts/newsreader-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/static/fonts/newsreader-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/static/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/static/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-2: #f7f6f3;
  --fg: #2f3437;
  --fg-strong: #111111;
  --muted: #787774;
  --border: #eaeaea;
  --focus: #1f6c9f;

  /* Codes sémantiques (SFD §8) */
  --officiel-bg: #e1f3fe;
  --officiel-fg: #1f6c9f;
  --presse-juridique-bg: #edf3ec;
  --presse-juridique-fg: #346538;
  --presse-bg: #fbf3db;
  --presse-fg: #956400;
  --p3-bg: #fdebec;
  --p3-fg: #9f2f2d;

  --serif: "Newsreader", "Lyon Text", Georgia, serif;
  --sans: "Geist", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", "SF Mono", "JetBrains Mono", ui-monospace, monospace;

  --radius: 8px;
  --gap-section: 2.5rem; /* 40 px : entre 32 et 48 px (SFD §8) */
  --reading: 44rem;
  --tabbar-h: 4rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191919;
    --surface: #202020;
    --surface-2: #252525;
    --fg: #e6e4df;
    --fg-strong: #f4f3ef;
    --muted: #9b9a97;
    --border: rgba(255, 255, 255, 0.1);
    --focus: #7cc0ec;
    --officiel-bg: #1d3341;
    --officiel-fg: #9fd3f5;
    --presse-juridique-bg: #24342a;
    --presse-juridique-fg: #a9d1ae;
    --presse-bg: #3a3120;
    --presse-fg: #e8c77a;
    --p3-bg: #3f2324;
    --p3-fg: #f2a9a6;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  color: var(--fg-strong);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-weight: 500;
  margin: 0;
}

h1 {
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.4rem);
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.mono,
time,
code {
  font-family: var(--mono);
  font-size: 0.875em;
  letter-spacing: 0;
}

.muted,
.meta {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 20;
  background: var(--fg-strong);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.skip-link:focus {
  top: 1rem;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  vertical-align: -0.25em;
}

/* --- Mise en page ----------------------------------------------------------------------- */

.layout {
  min-height: 100vh;
}

.content {
  max-width: var(--reading);
  margin: 0 auto;
  padding: 1.5rem 1rem calc(var(--tabbar-h) + 2rem);
}

.sidebar {
  display: none;
}

.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
}

.tabbar > a,
.tabbar summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 44px;
  height: 100%;
  font-size: 0.6875rem;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  list-style: none;
}

.tabbar summary::-webkit-details-marker {
  display: none;
}

.tabbar [aria-current="page"] {
  color: var(--fg-strong);
  font-weight: 600;
}

.more {
  position: relative;
}

.more-menu {
  position: absolute;
  right: 0.5rem;
  bottom: calc(var(--tabbar-h) + 0.5rem);
  min-width: 14rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.more-menu a,
.more-menu .link-button {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  width: 100%;
}

.more-menu a:hover,
.more-menu .link-button:hover {
  background: var(--surface-2);
}

@media (min-width: 1024px) {
  .tabbar {
    display: none;
  }

  .layout {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100vh;
    padding: 1.5rem 1rem;
    border-right: 1px solid var(--border);
  }

  .sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .sidebar .secondary {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
  }

  .sidebar a:not(.brand),
  .sidebar .link-button {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 44px;
    padding: 0 0.75rem;
    border-radius: 6px;
    color: var(--muted);
    text-decoration: none;
  }

  .sidebar a:hover,
  .sidebar .link-button:hover {
    background: var(--surface-2);
    color: var(--fg);
  }

  .sidebar [aria-current="page"] {
    background: var(--surface-2);
    color: var(--fg-strong);
    font-weight: 600;
  }

  .sidebar .logout {
    margin-top: auto;
  }

  .content {
    padding: 2.5rem 2rem 4rem;
  }
}

.brand {
  font-family: var(--serif);
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--fg-strong);
  padding: 0 0.75rem;
}

.brand span {
  color: var(--muted);
}

/* --- En-têtes et sections --------------------------------------------------------------- */

.page-head {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.page-head .meta {
  margin: 0;
}

.eyebrow,
.section-label {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow a {
  text-decoration: none;
}

.section-title {
  font-size: 1.375rem;
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.block {
  margin-top: var(--gap-section);
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.block > .section-label {
  margin-bottom: 0.75rem;
}

.empty {
  color: var(--muted);
}

.day-nav {
  display: flex;
  gap: 0.25rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
}

.icon-button:hover {
  background: var(--surface-2);
}

/* --- Bandeaux -------------------------------------------------------------------------- */

.banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0 0 1.5rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--presse-bg);
  color: var(--presse-fg);
}

.banner p {
  margin: 0;
}

.banner-alert {
  background: var(--p3-bg);
  color: var(--p3-fg);
}

.banner-muted {
  background: var(--surface-2);
  color: var(--muted);
}

/* --- Étiquettes ------------------------------------------------------------------------ */

.tag {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.6;
  background: var(--surface-2);
  color: var(--muted);
}

.tag-officiel {
  background: var(--officiel-bg);
  color: var(--officiel-fg);
}

.tag-presse_juridique {
  background: var(--presse-juridique-bg);
  color: var(--presse-juridique-fg);
}

.tag-presse {
  background: var(--presse-bg);
  color: var(--presse-fg);
}

.tag-p3 {
  background: var(--p3-bg);
  color: var(--p3-fg);
}

.fiches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.fiche {
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.fiche.is-primary {
  color: var(--fg);
  background: var(--surface);
}

.fiche .mono {
  color: var(--fg-strong);
  font-weight: 600;
}

/* --- Listes de documents --------------------------------------------------------------- */

.doc-list,
.must-read,
.events,
.plain-list,
.references {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.doc:last-child {
  border-bottom: 0;
}

.doc-head {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.doc-title {
  font-weight: 600;
  color: var(--fg-strong);
  text-decoration: none;
}

.doc-title:hover {
  text-decoration: underline;
}

.cite-num {
  color: var(--muted);
  font-weight: 400;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.read-state {
  color: var(--muted);
  line-height: 1;
  padding-top: 0.15rem;
}

.doc.is-read .doc-title {
  font-weight: 500;
}

.see-also {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.must-read > li {
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--p3-fg);
  border-radius: var(--radius);
  background: var(--surface);
}

.lede {
  margin: 0.5rem 0 0;
}

.events li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.events li:last-child {
  border-bottom: 0;
}

.plain-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.plain-list li:last-child {
  border-bottom: 0;
}

.plain-list .doc-meta {
  margin-top: 0.25rem;
}

.references li {
  padding: 0.375rem 0.625rem;
  margin-bottom: 0.375rem;
  background: var(--surface-2);
  border-radius: 4px;
}

/* --- Texte des briefs ------------------------------------------------------------------ */

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 0.75rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.375rem;
}

.cite {
  font-family: var(--mono);
  font-size: 0.8125em;
  text-decoration: none;
  color: var(--officiel-fg);
  white-space: nowrap;
}

.cite:hover {
  text-decoration: underline;
}

.retenir {
  margin: 1rem 0;
  padding: 0.875rem 1rem;
  background: var(--surface-2);
  border-radius: var(--radius);
}

.retenir p {
  margin: 0;
}

.retenir .retenir-label {
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.reading {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
}

.source-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 0;
}

/* --- Boutons et formulaires ------------------------------------------------------------ */

.button,
.button-secondary,
.link-button {
  font: inherit;
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.125rem;
  border: 0;
  border-radius: 6px;
  background: var(--fg-strong);
  color: var(--bg);
  text-decoration: none;
  font-weight: 500;
  transition: background-color 150ms ease, transform 150ms ease;
}

.button:hover {
  background: color-mix(in srgb, var(--fg-strong) 82%, var(--bg));
}

.button:active {
  transform: scale(0.98);
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.875rem;
}

.button-secondary:hover {
  background: var(--surface-2);
}

.link-button {
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
}

input,
select {
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-height: 44px;
  padding: 0 0.75rem;
  width: 100%;
  max-width: 100%;
}

input[type="checkbox"] {
  width: 1.25rem;
  min-height: 1.25rem;
  height: 1.25rem;
  accent-color: var(--fg-strong);
}

.stack {
  display: grid;
  gap: 0.75rem;
}

.form-error {
  margin: 0;
  color: var(--p3-fg);
}

/* --- Connexion ------------------------------------------------------------------------- */

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1rem;
}

.login {
  width: 100%;
  max-width: 22rem;
  padding: 2rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.login h1 {
  font-size: 1.75rem;
}

.login .muted {
  margin: 0.25rem 0 1.5rem;
}

/* --- Recherche ------------------------------------------------------------------------- */

.search-form {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box > .icon {
  position: absolute;
  left: 0.75rem;
  color: var(--muted);
}

.search-box input {
  padding-left: 2.5rem;
  font-size: 1.0625rem;
}

.busy {
  position: absolute;
  right: 0.75rem;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border);
  border-top-color: var(--muted);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 150ms ease;
}

.htmx-request .busy,
.busy.htmx-request {
  opacity: 1;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.filters summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.875rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.filter-grid label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.filter-grid .checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: var(--fg);
}

.snippet {
  margin: 0.375rem 0 0;
  font-size: 0.9375rem;
  color: var(--fg);
}

mark {
  background: var(--presse-bg);
  color: inherit;
  padding: 0 0.1em;
  border-radius: 2px;
}

/* --- Historique ------------------------------------------------------------------------ */

.calendar {
  width: 100%;
  max-width: 24rem;
  margin-top: 0.75rem;
  border-collapse: collapse;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.875rem;
}

.calendar th {
  font-weight: 500;
  color: var(--muted);
  padding-bottom: 0.25rem;
}

.calendar td {
  padding: 2px;
}

.calendar td a,
.calendar td span {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 6px;
}

.calendar td span {
  color: var(--muted);
  opacity: 0.6;
}

.calendar td a {
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 600;
  color: var(--fg-strong);
}

.calendar td a:hover {
  background: var(--officiel-bg);
  color: var(--officiel-fg);
}

@media (max-width: 380px) {
  .calendar td a,
  .calendar td span {
    min-width: 40px;
  }
}

/* --- État du système ------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}

.card {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-value {
  margin: 0.5rem 0;
  font-family: var(--serif);
  font-size: 1.75rem;
  color: var(--fg-strong);
  letter-spacing: -0.02em;
}

.stat-value.mono {
  font-family: var(--mono);
  font-size: 1.5rem;
}

.pairs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  margin: 0;
  font-size: 0.9375rem;
}

.pairs dt {
  color: var(--muted);
}

.pairs dd {
  margin: 0;
  text-align: right;
}

/* --- Aujourd'hui (refonte, docs/plan-ux-aujourdhui.md) --------------------------------- */

.today-head {
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}

.today-head h1 {
  font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem);
}

.progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.progress-bar {
  flex: 0 0 6rem;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--fg-strong);
}

.progress-10 { width: 10%; }
.progress-20 { width: 20%; }
.progress-30 { width: 30%; }
.progress-40 { width: 40%; }
.progress-50 { width: 50%; }
.progress-60 { width: 60%; }
.progress-70 { width: 70%; }
.progress-80 { width: 80%; }
.progress-90 { width: 90%; }
.progress-100 { width: 100%; }

.progress-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.banner-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--presse-fg);
}

.today-grid > section,
.today-grid > aside {
  margin-top: 1.5rem;
}

.today-grid > :first-child {
  margin-top: 0;
}

.today-grid .section-label {
  margin-bottom: 0.5rem;
}

.queue {
  list-style: none;
  margin: 0;
  padding: 0;
}

.queue-item {
  border-bottom: 1px solid var(--border);
}

.queue-link {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  min-height: 44px;
  padding: 0.625rem 0;
  text-decoration: none;
  color: var(--fg);
}

.queue-text {
  display: grid;
  gap: 0.125rem;
  flex: 1;
  min-width: 0;
}

.queue-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
  color: var(--fg-strong);
  line-height: 1.35;
}

.queue-link:hover .queue-title {
  text-decoration: underline;
}

.queue-accroche {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.queue-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.queue-meta .fiche {
  padding: 0 0.375rem;
  font-size: 0.75rem;
}

.queue-item.is-read .queue-title {
  font-weight: 500;
  color: var(--muted);
}

.dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--muted);
}

.dot-officiel { background: var(--officiel-fg); }
.dot-presse_juridique { background: var(--presse-juridique-fg); }
.dot-presse { background: var(--presse-fg); }

.queue-more > summary,
.theme > summary {
  cursor: pointer;
  list-style: none;
}

.queue-more > summary::-webkit-details-marker,
.theme > summary::-webkit-details-marker {
  display: none;
}

.queue-more > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.875rem;
  color: var(--muted);
}

.button-block {
  width: 100%;
  justify-content: center;
  margin-top: 0.75rem;
}

.done {
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius);
  background: var(--presse-juridique-bg);
  color: var(--presse-juridique-fg);
}

.done p {
  margin: 0;
}

.done .muted {
  color: inherit;
}

.done-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.events.compact li {
  grid-template-columns: 4.5rem 1fr;
  padding: 0.375rem 0;
  font-size: 0.9375rem;
}

.events.compact a,
.events.compact span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.theme {
  border-bottom: 1px solid var(--border);
}

.theme > summary {
  display: grid;
  gap: 0.125rem;
  min-height: 44px;
  padding: 0.625rem 0;
}

.theme-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.theme-label {
  font-weight: 600;
  color: var(--fg-strong);
}

.theme-label::before {
  content: "+";
  display: inline-block;
  width: 1rem;
  font-family: var(--mono);
  color: var(--muted);
}

.theme[open] .theme-label::before {
  content: "−";
}

.theme-count {
  flex: none;
  color: var(--muted);
}

.theme-lead {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-left: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.theme[open] .theme-lead {
  display: none;
}

.theme-body {
  padding: 0 0 1rem 1rem;
}

@media (min-width: 1024px) {
  .content-wide {
    max-width: 62rem;
  }

  .today-grid {
    display: grid;
    grid-template-columns: minmax(0, 40rem) 17.5rem;
    column-gap: 3rem;
    align-items: start;
  }

  .today-queue {
    grid-column: 1;
    grid-row: 1;
  }

  .today-themes {
    grid-column: 1;
    grid-row: 2;
  }

  .today-grid > .today-side {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: 2rem;
    margin-top: 0;
  }

  .today-grid > .today-themes {
    margin-top: 2rem;
  }
}

/* --- Mode lecture -------------------------------------------------------------------- */

.reading-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: -0.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.reading-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 44px;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.reading-count {
  color: var(--muted);
}

.reading-steps {
  display: flex;
  gap: 0.25rem;
}

.reading-next {
  margin: 2rem 0 0;
}

.review-toggle {
  margin: 0.5rem 0 0;
}

.review-toggle .button-secondary {
  gap: 0.5rem;
}

.review-toggle .is-active {
  background: var(--presse-bg);
  color: var(--presse-fg);
  border-color: transparent;
}

/* --- Mouvement (discret, SFD §8) ------------------------------------------------------- */

.doc-list > li,
.must-read > li,
.card {
  animation: appear 400ms var(--ease) both;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
