/* DirtyMinds — search (Step 2: the in-thread bar + match highlights)
   _plans/conversations-search.md. Every colour and radius comes from a base.css
   token (architecture rule #6); the fallbacks after each var() are the token's
   own value, present so the file still reads correctly if loaded standalone.

   Two highlight mechanisms are styled here and they must look IDENTICAL:
     ::highlight(conv-search)      — CSS Custom Highlight API (no DOM change)
     mark.conversation-search      — the <mark> fallback for older iOS Safari
   A device takes exactly one path, never both, so any visual drift between them
   would be invisible in testing and obvious to whichever user is on the other
   branch. Keep the two blocks edited together. */

/* ── the bar ───────────────────────────────────────────────────── */

.convsearch {
  flex: 0 0 auto;
  position: relative;                 /* the one-time hint anchors to it */
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 10px;
  background: var(--color-surface, #141418);
  border-bottom: 1px solid var(--color-border, #2a2a33);
}

.convsearch__row { display: flex; align-items: center; gap: 6px; }

.convsearch__field {
  flex: 1 1 auto;
  min-width: 0;                       /* a flex item must be allowed to shrink */
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--color-surface3, #28282f);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 10px;
}
.convsearch__field:focus-within { border-color: var(--color-primary, #f97316); }
.convsearch__field > svg {
  flex: 0 0 auto;
  width: 15px; height: 15px;
  color: var(--color-text-faint, #44444a);
}

.convsearch__input {
  flex: 1 1 auto;
  min-width: 0;
  background: none;
  border: 0;
  padding: 0;
  color: var(--color-text, #e8e6e0);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}
.convsearch__input::placeholder { color: var(--color-text-faint, #44444a); }
/* the browser's own clear affordance duplicates our ✕ and crowds the row */
.convsearch__input::-webkit-search-cancel-button { display: none; }

/* ── the scope toggle — ONE button, two shapes, zero words ───────── */
/* Plan §2.3. Both states share ONE GRID CELL: that is what centres them. An
   absolutely-positioned svg inside a collapsed span lands its top-left at the
   button's centre and spills out the bottom-right corner — the bug hit while
   drawing the mockup, and the reason this is spelled out rather than left to
   whoever restyles it next. Do not replace the grid with position:absolute. */
.convsearch__scope {
  flex: 0 0 auto;
  width: 40px; height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--color-border, #2a2a33);
  border-radius: 10px;
  background: var(--color-surface-raised, #1c1c22);
  color: var(--color-text-muted, #888);
  cursor: pointer;
  /* the front bubble is filled with the BUTTON's own colour, so the occlusion
     that makes the stack read as a stack stays invisible in both states */
  --convsearch-glyph-fill: #1c1c22;
  transition: color .22s ease, background .22s ease,
              border-color .22s ease, box-shadow .22s ease;
}
.convsearch__scope-one,
.convsearch__scope-all {
  grid-area: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .2s ease, transform .28s cubic-bezier(.34, 1.4, .55, 1);
}
.convsearch__scope svg { width: 30px; height: 30px; display: block; }
.convsearch__scope-one { opacity: 1; transform: scale(1); }
.convsearch__scope-all { opacity: 0; transform: scale(.55) rotate(-12deg); }

/* Lit = "all threads". The COLOUR doubles the SHAPE, so the state reads even if
   the glyph is misread — and the shape shown is always the CURRENT state. */
.convsearch__scope.is-all {
  color: #ffd9bd;
  background: var(--color-primary-dim, rgba(249, 115, 22, 0.13));
  border-color: rgba(249, 115, 22, 0.55);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.25), 0 0 14px var(--color-primary-glow, rgba(249,115,22,.3));
  --convsearch-glyph-fill: #3d2920;   /* raised blended with primary-dim */
}
.convsearch__scope.is-all .convsearch__scope-one { opacity: 0; transform: scale(.55) rotate(12deg); }
.convsearch__scope.is-all .convsearch__scope-all { opacity: 1; transform: scale(1) rotate(0); }

.convsearch__adv {
  flex: 0 0 auto;
  width: 40px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border, #2a2a33);
  border-radius: 10px;
  background: var(--color-surface-raised, #1c1c22);
  color: var(--color-text-muted, #888);
  cursor: pointer;
  --convsearch-knob-fill: #1c1c22;
}
.convsearch__adv svg { width: 20px; height: 20px; display: block; }

/* ── the one-time hint (plan §2.3) ──────────────────────────────── */
.convsearch__hint {
  position: absolute;
  top: 46px; right: 54px;
  z-index: 4;
  max-width: 212px;
  padding: 6px 10px;
  border: 1px solid #3d3d47;
  border-radius: 9px;
  background: var(--color-surface3, #28282f);
  color: #cfcdc6;
  font-size: 0.66rem;
  line-height: 1.45;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.convsearch__hint::before {
  content: '';
  position: absolute;
  top: -5px; right: 22px;
  width: 9px; height: 9px;
  background: var(--color-surface3, #28282f);
  border-left: 1px solid #3d3d47;
  border-top: 1px solid #3d3d47;
  transform: rotate(45deg);
}
.convsearch__hint b { color: #ffd9bd; }

/* ── the verdict row ────────────────────────────────────────────── */

.convsearch__hits { display: flex; align-items: center; gap: 8px; }
.convsearch__nav-group { display: flex; gap: 2px; margin-left: auto; }

.convsearch__count {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.76rem;
  color: var(--color-text-muted, #888);
  font-variant-numeric: tabular-nums;   /* the count must not jitter while typing */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.convsearch__count.is-empty { color: var(--color-text-faint, #44444a); }

.convsearch__nav {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 8px;
  color: var(--color-text-muted, #888);
  font-size: 1.15rem; line-height: 1;
  cursor: pointer;
}
.convsearch__nav:hover:not(:disabled) { background: var(--color-surface3, #28282f); }
.convsearch__nav:disabled { opacity: 0.35; cursor: default; }
.convsearch__nav.is-hidden { display: none; }
.convsearch__close { font-size: 0.95rem; margin-left: auto; }

/* ── the standalone view's own head ─────────────────────────────── */

.convsearch__head { display: flex; align-items: center; gap: 6px; padding: 2px 0 4px; }
.convsearch__back {
  background: none; border: 0; cursor: pointer;
  color: var(--color-text-muted, #888);
  font-size: 1.5rem; line-height: 1; padding: 0 4px 0 0;
}
.convsearch__title { font-weight: 700; font-size: 0.95rem; }

/* ── the État chips ─────────────────────────────────────────────── */

.convsearch__chips {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
.convsearch__chips::-webkit-scrollbar { display: none; }
.convsearch__chips.is-hidden { display: none; }

.convsearch-chip {
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid var(--color-border, #2a2a33);
  background: var(--color-surface-raised, #1c1c22);
  color: var(--color-text-muted, #888);
  cursor: pointer;
}
.convsearch-chip.is-on {
  border-color: var(--color-primary, #f97316);
  background: var(--color-primary-dim, rgba(249, 115, 22, 0.13));
  color: #ffd9bd;
}

/* ── the header entry point ────────────────────────────────────── */
/* Sized to match .conversation-header__bookmark / __tree exactly — it sits in
   the same icon group and any difference reads as a misalignment. */
.conversation-header__search {
  flex: 0 0 auto;
  background: none; border: none; cursor: pointer;
  width: 30px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted, #888);
}
.conversation-header__search svg { width: 19px; height: 19px; display: block; }
.conversation-header__search:hover { background: var(--color-surface3, #28282f); }
/* lit while the bar is open, so the icon states what is on screen */
.conversation-header__search.is-active { color: var(--color-primary, #f97316); }

/* ── the match highlights ──────────────────────────────────────── */
/* Amber wash for every match; the CURRENT one inverts to solid so the eye finds
   it without reading the count. Deliberately NOT the orange primary: an active
   match must not read as a status or a call to action. */

::highlight(conv-search) {
  background-color: var(--color-warning-dim, rgba(245, 166, 35, 0.14));
  color: var(--color-text, #e8e6e0);
}
::highlight(conv-search-current) {
  background-color: var(--color-warning, #f5a623);
  color: #16160f;
}

mark.conversation-search {
  background-color: var(--color-warning-dim, rgba(245, 166, 35, 0.14));
  color: var(--color-text, #e8e6e0);
  border-radius: 2px;
  padding: 0;                          /* padding here would reflow the bubble */
}
mark.conversation-search--current {
  background-color: var(--color-warning, #f5a623);
  color: #16160f;
}

@media (prefers-reduced-motion: no-preference) {
  mark.conversation-search--current { transition: background-color 120ms ease; }
}

/* ── the results panel ─────────────────────────────────────────── */
/* A scrolling list is ALWAYS a child of a flex column and must declare its own
   flex + min-height:0 + overflow-y:auto. Padding alone looks correct until the
   content exceeds one screen, and then the whole list collapses — the exact trap
   that produced the r150.01 Corbeille bug and the r152.00 feed bug. */

.convsearch-results {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 8px calc(24px + env(safe-area-inset-bottom, 0px));
}

/* In a thread, the results REPLACE the timeline — and the composer with them:
   you cannot write into "all threads". Hidden by class rather than by detaching
   nodes, so closing the search restores the conversation untouched. */
.has-convsearch-results .conversation-timeline,
.has-convsearch-results .conversation-composer,
.has-convsearch-results .conversation-typing-slot { display: none; }

.convsearch-rhead {
  display: flex; align-items: center; gap: 7px;
  margin: 2px 3px 8px;
  font-size: 0.66rem;
  color: var(--color-text-faint, #44444a);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.convsearch-rhead__line { flex: 1 1 auto; height: 1px; background: var(--color-border, #2a2a33); }

.convsearch-loading {
  text-align: center;
  color: var(--color-text-faint, #44444a);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  padding: 14px 10px;
}

/* ── one fil = one group (plan §2.4, variante A) ────────────────── */

.convsearch-group {
  background: var(--color-surface, #141418);
  border: 1px solid var(--color-border, #2a2a33);
  border-radius: 13px;
  margin: 0 2px 9px;
  overflow: hidden;
}
.convsearch-group__head {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--color-border, #2a2a33);
  background: rgba(255, 255, 255, 0.018);
}
.convsearch-group__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.79rem;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.convsearch-group__title.is-discussion { font-style: italic; font-weight: 500; }
.convsearch-group__state {
  flex: 0 0 auto;
  font-size: 0.6rem;
  color: var(--color-text-faint, #44444a);
  border: 1px solid var(--color-border, #2a2a33);
  border-radius: 5px;
  padding: 1px 5px;
}
.convsearch-group__count {
  flex: 0 0 auto;
  font-size: 0.63rem; font-weight: 700;
  color: #ffd9bd;
  background: var(--color-primary-dim, rgba(249, 115, 22, 0.13));
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: 11px;
  padding: 2px 7px;
}

/* Cyan = sujet, violet = discussion — the Fil d'activité's own grammar, so a
   reader has nothing new to learn (plan §2.4). */
.convsearch-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.convsearch-dot--topic {
  background: var(--prov-topic, #4cc9f0);
  box-shadow: 0 0 7px rgba(76, 201, 240, 0.55);
}
.convsearch-dot--discussion {
  background: var(--prov-discussion, #b574ff);
  box-shadow: 0 0 7px rgba(181, 116, 255, 0.55);
}
.convsearch-dot--mini { width: 6px; height: 6px; box-shadow: none; }

.convsearch-row {
  display: flex; gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 11px;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(42, 42, 51, 0.6);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.convsearch-row:last-child { border-bottom: 0; }
.convsearch-row:hover { background: rgba(255, 255, 255, 0.03); }
.convsearch-row__avatar {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-surface3, #28282f);
  color: var(--color-text, #e8e6e0);
  font-size: 0.6rem; font-weight: 700;
}
.convsearch-row__body { flex: 1 1 auto; min-width: 0; }
.convsearch-row__line1 { display: flex; align-items: baseline; gap: 6px; }
.convsearch-row__name { font-size: 0.7rem; font-weight: 700; color: #cfcdc6; }
.convsearch-row__date {
  margin-left: auto; flex: 0 0 auto;
  font-size: 0.6rem;
  color: var(--color-text-faint, #44444a);
}
.convsearch-row__snippet {
  margin-top: 1px;
  font-size: 0.79rem;
  line-height: 1.45;
  color: #bdbbb5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.convsearch-row__ctx {
  display: flex; align-items: center; gap: 4px;
  margin-top: 3px;
  font-size: 0.6rem;
  color: var(--color-text-faint, #44444a);
}

/* ── empty · notice · widen (plan §2.11) ────────────────────────── */

.convsearch-empty {
  text-align: center;
  padding: 44px 24px;
  color: var(--color-text-muted, #888);
  font-size: 0.79rem;
  line-height: 1.6;
}
.convsearch-empty > svg { width: 30px; height: 30px; opacity: 0.45; margin-bottom: 10px; }
.convsearch-empty__line { margin-bottom: 14px; }
.convsearch-empty b { color: #cfcdc6; }

/* The ONE place the "all threads" glyph may carry a word, because it is an
   explicit ACTION rather than a state (plan §2.11). */
.convsearch-widen {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px;
  border-radius: 20px;
  border: 1px solid rgba(249, 115, 22, 0.45);
  background: var(--color-primary-dim, rgba(249, 115, 22, 0.13));
  color: #ffd9bd;
  font: inherit;
  font-size: 0.72rem; font-weight: 600;
  cursor: pointer;
  --convsearch-glyph-fill: #3d2920;
}
.convsearch-widen__glyph { display: flex; }
.convsearch-widen__glyph svg { width: 17px; height: 17px; display: block; }

.convsearch-notice {
  text-align: center;
  padding: 34px 24px;
  color: var(--color-text-muted, #888);
  font-size: 0.76rem;
  line-height: 1.6;
}
.convsearch-notice__icon { font-size: 1.4rem; margin-bottom: 8px; }
.convsearch-notice__title { color: #cfcdc6; }
.convsearch-notice__sub { font-size: 0.7rem; color: var(--color-text-faint, #44444a); margin-top: 4px; }
/* A partial corpus is stated in place, not as a full-screen error: the results
   below it are real, they are just not all of them. */
.convsearch-warn {
  text-align: left;
  padding: 8px 11px;
  margin: 0 2px 9px;
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: 10px;
  background: var(--color-warning-dim, rgba(245, 166, 35, 0.14));
}
.convsearch-warn .convsearch-notice__icon { font-size: 0.9rem; margin: 0 0 2px; }

/* ── the Avancé sheet + the fils picker ─────────────────────────── */

.convsheet {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.55);
}
.convsheet__sheet {
  width: 100%;
  max-height: 88%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-surface, #141418);
  border-top: 1px solid var(--color-border, #2a2a33);
  border-radius: 20px 20px 0 0;
}
.convsheet__grip {
  flex: 0 0 auto;
  width: 34px; height: 4px;
  border-radius: 3px;
  background: var(--color-surface3, #28282f);
  margin: 7px auto 0;
}
.convsheet__head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 15px 9px;
  border-bottom: 1px solid var(--color-border, #2a2a33);
}
.convsheet__head h3 { flex: 1 1 auto; margin: 0; font-size: 0.88rem; font-weight: 700; }
.convsheet__close {
  background: none; border: 0; cursor: pointer;
  color: var(--color-text-muted, #888);
  font-size: 1.2rem; line-height: 1;
}
/* The sheet body is the second scrolling list in this file — same rule. */
.convsheet__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 15px 16px;
}
.convsheet__foot {
  flex: 0 0 auto;
  display: flex; gap: 8px;
  padding: 10px 15px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--color-border, #2a2a33);
}
.convsheet__foot button {
  flex: 1 1 0;
  border-radius: 11px;
  padding: 11px;
  font: inherit;
  font-size: 0.79rem; font-weight: 600;
  cursor: pointer;
}
.convsheet__reset {
  background: var(--color-surface-raised, #1c1c22);
  border: 1px solid var(--color-border, #2a2a33);
  color: var(--color-text-muted, #888);
}
.convsheet__go {
  background: var(--color-primary, #f97316);
  border: 1px solid var(--color-primary, #f97316);
  color: #1a0d02;
}

.convsheet__sec { margin-bottom: 16px; }
.convsheet__sec-title {
  margin-bottom: 7px;
  font-size: 0.63rem;
  color: var(--color-text-faint, #44444a);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.convsheet__note {
  margin-top: 5px;
  font-size: 0.66rem;
  line-height: 1.5;
  color: var(--color-text-faint, #44444a);
}

/* single choice → full-width segmented control (plan §2.6) */
.convsheet__seg {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--color-border, #2a2a33);
  border-radius: 10px;
  background: var(--color-surface-raised, #1c1c22);
}
.convsheet__seg-btn {
  flex: 1 1 0;
  min-width: 0;
  background: none; border: 0;
  border-radius: 7px;
  padding: 7px 4px;
  color: var(--color-text-muted, #888);
  font: inherit;
  font-size: 0.7rem; font-weight: 600;
  cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.convsheet__seg-btn.is-on { background: var(--color-primary-mid, rgba(249, 115, 22, 0.22)); color: #ffd9bd; }
.convsheet__seg.is-locked { opacity: 0.42; }
.convsheet__seg-btn:disabled { cursor: default; }

/* multi choice → check pills (plan §2.6) */
.convsheet__pills { display: flex; flex-wrap: wrap; gap: 6px; }
.convsheet__pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 11px 6px 8px;
  border-radius: 9px;
  border: 1px solid var(--color-border, #2a2a33);
  background: var(--color-surface-raised, #1c1c22);
  color: var(--color-text-muted, #888);
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}
.convsheet__pill.is-on {
  border-color: rgba(249, 115, 22, 0.5);
  background: var(--color-primary-dim, rgba(249, 115, 22, 0.13));
  color: #ffd9bd;
}
.convsheet__box {
  flex: 0 0 auto;
  width: 14px; height: 14px;
  border-radius: 4px;
  border: 1.5px solid var(--color-text-faint, #44444a);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.55rem;
  color: transparent;
}
.convsheet__box.is-on {
  background: var(--color-primary, #f97316);
  border-color: var(--color-primary, #f97316);
  color: #1a0d02;
}

/* booleans → switches, each with its own sub-line (plan §2.6) */
.convsheet__switch {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 0;
  background: none; border: 0;
  border-bottom: 1px solid rgba(42, 42, 51, 0.55);
  color: inherit; font: inherit;
  text-align: left;
  cursor: pointer;
}
.convsheet__switch:last-child { border-bottom: 0; }
.convsheet__switch-text { flex: 1 1 auto; min-width: 0; }
.convsheet__switch-label { display: block; font-size: 0.79rem; color: #cfcdc6; }
.convsheet__switch-sub {
  display: block;
  margin-top: 1px;
  font-size: 0.63rem;
  font-style: normal;
  color: var(--color-text-faint, #44444a);
}
.convsheet__switch-knob {
  position: relative;
  flex: 0 0 auto;
  width: 38px; height: 22px;
  border-radius: 12px;
  border: 1px solid var(--color-border, #2a2a33);
  background: var(--color-surface3, #28282f);
  transition: background .2s ease;
}
.convsheet__switch-knob::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--color-text-faint, #44444a);
  transition: transform .2s ease, background .2s ease;
}
.convsheet__switch.is-on .convsheet__switch-knob {
  background: var(--color-primary-dim, rgba(249, 115, 22, 0.13));
  border-color: rgba(249, 115, 22, 0.5);
}
.convsheet__switch.is-on .convsheet__switch-knob::after {
  transform: translateX(16px);
  background: var(--color-primary, #f97316);
}

/* modules — a DRAWN padlock, never the word « bientôt » (plan §2.9) */
.convsheet__modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.convsheet__module {
  position: relative;
  padding: 9px 6px;
  border: 1px solid var(--color-border, #2a2a33);
  border-radius: 10px;
  background: var(--color-surface-raised, #1c1c22);
  color: var(--color-text-muted, #888);
  font-size: 0.7rem;
  text-align: center;
}
.convsheet__module.is-on {
  border-color: rgba(249, 115, 22, 0.5);
  background: var(--color-primary-dim, rgba(249, 115, 22, 0.13));
  color: #ffd9bd;
}
.convsheet__module.is-locked { opacity: 0.4; }
.convsheet__lock {
  position: absolute;
  top: 4px; right: 5px;
  width: 11px; height: 11px;
}

/* entity lists — the ONE second level, plus the short inline authors list */
.convsheet__list {
  border: 1px solid var(--color-border, #2a2a33);
  border-radius: 10px;
  background: var(--color-surface-raised, #1c1c22);
  overflow: hidden;
}
.convsheet__li {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 9px 11px;
  background: none; border: 0;
  border-bottom: 1px solid rgba(42, 42, 51, 0.7);
  color: inherit; font: inherit;
  text-align: left;
  cursor: pointer;
}
.convsheet__li:last-child { border-bottom: 0; }
.convsheet__li:hover { background: rgba(255, 255, 255, 0.03); }
.convsheet__li-name {
  flex: 1 1 auto; min-width: 0;
  font-size: 0.79rem;
  color: #cfcdc6;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.convsheet__li-name.is-discussion { font-style: italic; font-weight: 500; }
.convsheet__li-sub { flex: 0 0 auto; font-size: 0.6rem; color: var(--color-text-faint, #44444a); }

/* the drill-in row — the only tap the flat panel asks for */
.convsheet__drill {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  margin-top: 7px;
  padding: 10px 11px;
  border: 1px solid var(--color-border, #2a2a33);
  border-radius: 10px;
  background: var(--color-surface-raised, #1c1c22);
  color: #cfcdc6;
  font: inherit;
  font-size: 0.76rem;
  text-align: left;
  cursor: pointer;
}
.convsheet__drill.is-disabled { opacity: 0.4; cursor: default; }
.convsheet__drill-count {
  font-size: 0.6rem; font-weight: 700;
  color: #1a0d02;
  background: var(--color-primary, #f97316);
  border-radius: 9px;
  padding: 1px 6px;
}
.convsheet__drill-arrow { margin-left: auto; color: var(--color-text-faint, #44444a); }

.convsheet__ptools { display: flex; gap: 7px; align-items: center; padding: 0 0 10px; }
.convsheet__ptools .convsearch__field { padding: 5px 9px; }
.convsheet__mini {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid var(--color-border, #2a2a33);
  background: var(--color-surface-raised, #1c1c22);
  color: var(--color-text-muted, #888);
  font: inherit;
  font-size: 0.66rem; font-weight: 600;
  cursor: pointer;
}

/* ── the standalone search view ─────────────────────────────────── */
/* `.view` is already a flex column that does not scroll (its children do), but it
   is NOT positioned — and the Avancé sheet is `position:absolute; inset:0`
   against its host. In a thread that host is `.conversation` (already relative);
   here it has to be said. */
#search-view { position: relative; background: var(--color-bg, #0d0d0f); }

/* ── the two other entry points ─────────────────────────────────── */
/* Sujets header: sized like its sibling ⋯ / clock so the cluster stays even.
   Deliberately no `display` here — `.view-header-actions .btn-icon.hidden`
   (css/app.css) must stay able to hide it. */
.btn-icon.header-search svg { width: 21px; height: 21px; display: block; }

/* Fil d'activité: top-left, immediately after the back chevron. */
.activity-header__search {
  flex: 0 0 auto;
  width: 30px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 8px;
  color: var(--color-text-muted, #888);
  cursor: pointer;
}
.activity-header__search svg { width: 19px; height: 19px; display: block; }
.activity-header__search:hover { background: var(--color-surface3, #28282f); }
