/* ════════════════════════════════════════════════════════════════════════
   LA BOÎTE DE RÉCEPTION DE L'ESPACE ÉQUIPE (28/10/2026) — reprise de la page
   « Mails » de Rich Circles (dépôt `reachcircles-app`, branche `main` au
   28/10/2026, `static/css/mails.css`), AU PIXEL : les mesures et les couleurs
   sont relevées, pas imitées. Les noms de variables sont ceux de la charte de
   TVNI (Rich Circles en est parti). Retirés : « écrire en pleine page » et
   « À faire », que TVNI n'a pas. Ajoutés en bas : ce qui est propre à TVNI (le
   fil d'activité en grand, le chat).
   Carnet : docs/notes/NOTES-boite-de-reception.md.
   ════════════════════════════════════════════════════════════════════════ */
.bm-page, .bm-app { --haut: 56px; }
.bm-page { padding: 0 !important; gap: 0 !important; max-width: none !important; }
.bm-app { display: grid; grid-template-columns: 216px minmax(340px, 440px) minmax(0, 1fr);
  height: calc(var(--fenetre) - var(--haut)); min-height: 480px; overflow: hidden; }
.bm-app kbd, .bm-aide kbd, .bm-menu kbd { font-family: var(--font-sans); font-size: calc(10.5px * var(--echelle-texte)); line-height: 16px; padding: 0 5px; border-radius: 4px;
  background: var(--muted); border: 1px solid var(--border-strong); color: var(--muted-foreground); }
.bm-navigue { opacity: .6; transition: opacity .1s .15s; pointer-events: none; }

/* ── Colonne 1 : les dossiers ── */
.bm-dossiers { display: flex; flex-direction: column; gap: 2px; padding: 16px 10px 12px; border-right: 1px solid var(--border);
  overflow-y: auto; scrollbar-width: thin; }
/* ⚠️ `flex: none` : la colonne défile, et sans lui un carnet chargé de libellés
   ÉCRASAIT le bouton jusqu'à un trait violet (Tevini, 25 octobre 2026). */
.bm-ecrire { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; height: 38px; margin: 0 2px 14px; }
.bm-ecrire kbd { background: rgba(10,11,16,.18); border-color: transparent; color: inherit; }
.bm-dos-liste { display: flex; flex-direction: column; gap: 1px; }
.bm-dos { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 10px; border-radius: 8px; font-size: calc(13.5px * var(--echelle-texte));
  color: var(--muted-foreground); text-decoration: none; }
.bm-dos > span:not(.bm-n) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-dos svg { flex: none; opacity: .85; }
.bm-dos:hover { background: var(--muted); color: var(--foreground); }
.bm-dos.on { background: var(--accent-ring); color: var(--foreground); }
.bm-n { margin-left: auto; font-size: calc(12px * var(--echelle-texte)); color: var(--muted-foreground); }
.bm-n--fort { color: var(--accent); font-weight: 600; }
.bm-sep { padding: 18px 10px 6px; font-size: var(--text-2xs); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--disabled-foreground); }
.bm-pt { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.bm-pt--toutes { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted-foreground); }
.bm-dos .bm-pt { margin: 0 4px; }
.bm-clavier { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 10px 0;
  background: none; border: 0; color: var(--disabled-foreground); font: inherit; font-size: calc(12px * var(--echelle-texte)); cursor: pointer; text-align: left; }
.bm-clavier:hover { color: var(--muted-foreground); }

/* ── Colonne 2 : la liste ── */
.bm-colonne { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--border); }
.bm-col-tete { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 10px; border-bottom: 1px solid var(--border); }
.bm-col-titre { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.bm-col-titre h1 { margin: 0; font-size: var(--text-lg); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-col-titre span { font-size: calc(12.5px * var(--echelle-texte)); color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-cherche { display: flex; align-items: center; gap: 8px; height: 36px; margin: 0; padding: 0 10px; border-radius: 9px;
  background: var(--muted); border: 1px solid var(--border); color: var(--muted-foreground); }
.bm-cherche:focus-within { border-color: var(--ring); }
.bm-cherche input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--foreground); font: inherit; font-size: calc(13.5px * var(--echelle-texte)); }
.bm-cherche:focus-within kbd { display: none; }
.bm-puces { display: flex; gap: 6px; flex-wrap: wrap; }
.bm-puce { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--border-strong);
  color: var(--muted-foreground); font-size: calc(12.5px * var(--echelle-texte)); text-decoration: none; white-space: nowrap; }
.bm-puce:hover { color: var(--foreground); }
.bm-puce.on { background: var(--accent-ring-strong); border-color: transparent; color: var(--foreground); }
.bm-avis { margin: 10px 12px 0; }
.bm-recherche { margin: 0; padding: 10px 16px; font-size: calc(12.5px * var(--echelle-texte)); color: var(--muted-foreground); border-bottom: 1px solid var(--border); }
.bm-recherche a { color: var(--accent); }

.bm-masse { display: flex; align-items: center; gap: 2px; padding: 5px 8px; border-bottom: 1px solid var(--border); background: var(--accent-wash); }
.bm-masse[hidden] { display: none; }
.bm-masse b { margin: 0 auto 0 4px; font-size: calc(12.5px * var(--echelle-texte)); font-weight: 600; white-space: nowrap; }
.bm-masse-x { font-size: calc(18px * var(--echelle-texte)); }
.bm-masse .bm-menu { top: calc(100% + 6px); }

.bm-lignes { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.bm-groupe { padding: 14px 16px 6px; font-size: var(--text-2xs); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--disabled-foreground); }
.bm-l { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; column-gap: 8px; row-gap: 1px;
  padding: 9px 14px 10px 8px; border-bottom: 1px solid var(--border); font-size: calc(13.5px * var(--echelle-texte)); color: var(--muted-foreground); }
.bm-l--attente { grid-template-columns: 0 minmax(0, 1fr) auto; padding-left: 14px; }
.bm-l:hover { background: var(--card); }
.bm-l-couvre { position: absolute; inset: 0; z-index: 0; }
.bm-l > *:not(.bm-l-couvre) { position: relative; z-index: 1; pointer-events: none; }
.bm-l .bm-fiche, .bm-l .bm-case, .bm-l .bm-survol, .bm-l .bm-survol * { pointer-events: auto; }
.bm-case { grid-row: 1 / span 3; align-self: start; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
  margin: 2px 0 0 2px; padding: 0; border-radius: 4px; border: 1.5px solid var(--border-strong); background: none; color: transparent; cursor: pointer; opacity: 0; }
.bm-l:hover .bm-case, .bm-app--choix .bm-case, .bm-case:focus-visible { opacity: 1; }
.bm-l--cochee { background: var(--accent-ring) !important; }
.bm-l--cochee .bm-case { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
/* Non lu : le point d'accent, à la place de la case (qui revient au survol). */
.bm-l--nonlu::before { content: ""; position: absolute; left: 13px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); z-index: 1; }
.bm-l--nonlu:hover::before, .bm-app--choix .bm-l--nonlu::before { display: none; }
.bm-qui { grid-column: 2; display: flex; align-items: center; gap: 6px; min-width: 0; }
.bm-qui b { font-weight: 400; color: var(--foreground); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-a, .bm-nb { flex: none; font-size: calc(11px * var(--echelle-texte)); color: var(--disabled-foreground); }
.bm-quand { grid-column: 3; display: inline-flex; align-items: center; gap: 5px; justify-self: end; font-size: calc(12px * var(--echelle-texte)); white-space: nowrap; }
.bm-pj { display: inline-flex; color: var(--muted-foreground); }
.bm-adr-pt { display: inline-flex; align-items: center; gap: 4px; margin-right: 4px; font-size: calc(11px * var(--echelle-texte)); color: var(--disabled-foreground); }
.bm-adr-pt i { width: 6px; height: 6px; border-radius: 50%; }
.bm-objet { grid-column: 2 / 4; display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--foreground);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-objet { display: block; }
.bm-extrait { grid-column: 2 / 4; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: calc(13px * var(--echelle-texte));
  color: var(--disabled-foreground); }
.bm-l--nonlu .bm-qui b, .bm-l--nonlu .bm-objet { font-weight: 600; }
.bm-l--nonlu .bm-quand { color: var(--accent); font-weight: 600; }
.bm-l--choisie, .bm-l--choisie:hover { background: var(--accent-wash); box-shadow: inset 3px 0 0 var(--accent); }
.bm-etoile { display: none; flex: none; color: var(--warning); }
.bm-etoile svg { fill: currentColor; }
.bm-l--suivi .bm-etoile { display: inline-flex; }
.bm-revient { color: var(--warning-text); }
.bm-rouge { color: var(--error); white-space: normal; }
.bm-survol { position: absolute !important; right: 10px; top: 7px; display: none; gap: 2px; padding: 2px; border-radius: 8px; background: var(--card);
  box-shadow: 0 0 0 1px var(--border-strong), 0 6px 18px rgba(0,0,0,.35); }
.bm-survol form { margin: 0; }
.bm-l:hover .bm-survol, .bm-l:focus-within .bm-survol { display: flex; }
.bm-ib { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; padding: 0; border: 0; border-radius: 6px;
  background: none; color: var(--muted-foreground); cursor: pointer; }
.bm-ib:hover { background: var(--muted); color: var(--foreground); }
.bm-l--suivi .bm-ib--etoile { color: var(--warning); }
.bm-l--suivi .bm-ib--etoile svg { fill: currentColor; }
.bm-fiche { display: inline-flex; align-items: center; flex: none; height: 17px; padding: 0 6px; border-radius: 99px; font-size: calc(10.5px * var(--echelle-texte)); font-weight: 500;
  color: var(--info); background: rgba(125,211,252,.12); text-decoration: none; }
.bm-fiche:hover { background: rgba(125,211,252,.2); }
.bm-tag { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 18px; margin-right: 6px; padding: 0 7px; border-radius: 99px; font-size: calc(10.5px * var(--echelle-texte));
  vertical-align: 1px; background: var(--muted); color: var(--muted-foreground); }
.bm-tag--rappel { color: var(--warning-text); background: rgba(251,191,36,.10); }
.bm-tag--brouillon { margin: 0; }
/* La place d'un résultat de recherche qui n'est pas dans la boîte (17 octobre
   2026) : une recherche cherche partout. Ses gestes suivent sa place. */
.bm-tag--place[hidden] { display: none; }
.bm-tag--spam, .bm-tag--corbeille { color: var(--error); background: rgba(248,113,113,.10); }
.bm-l[data-bm-place="boite"] [data-bm-pour]:not([data-bm-pour~="boite"]),
.bm-l[data-bm-place="archive"] [data-bm-pour]:not([data-bm-pour~="archive"]),
.bm-l[data-bm-place="envoye"] [data-bm-pour]:not([data-bm-pour~="envoye"]),
.bm-l[data-bm-place="brouillon"] [data-bm-pour]:not([data-bm-pour~="brouillon"]),
.bm-l[data-bm-place="spam"] [data-bm-pour]:not([data-bm-pour~="spam"]),
.bm-l[data-bm-place="corbeille"] [data-bm-pour]:not([data-bm-pour~="corbeille"]) { display: none; }
/* Un dossier pas encore lu : des lignes grises à la forme des vraies, tout
   de suite (17 octobre 2026) ; rien ne saute quand elles arrivent. */
.bm-l--sq { pointer-events: none; }
.bm-l--sq .bm-sq { height: 12px; margin: 4px 0; }
.bm-l--sq .bm-qui .bm-sq { width: 38%; }
.bm-l--sq .bm-quand .bm-sq { width: 44px; }
.bm-l--sq .bm-objet .bm-sq { width: 72%; }
.bm-l--sq .bm-extrait .bm-sq { width: 90%; }
.bm-l--sq:nth-child(3n) .bm-objet .bm-sq { width: 58%; }
.bm-l--sq:nth-child(3n+1) .bm-qui .bm-sq { width: 30%; }
.bm-inconnu { font-size: calc(11.5px * var(--echelle-texte)); font-weight: 400; color: var(--muted-foreground); border: 1px dashed var(--border-strong); border-radius: 99px; padding: 1px 8px; }
.bm-fin { margin: 0; padding: 14px 16px; font-size: calc(12.5px * var(--echelle-texte)); color: var(--disabled-foreground); text-align: center; }
.bm-fin--vide { padding: 40px 20px; color: var(--muted-foreground); }

/* ── Colonne 3 : le mail ouvert ── */
.bm-lecture-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.bm-lecture-col.bm-charge > * { opacity: .45; transition: opacity .12s .12s; }
.bm-rien { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px;
  color: var(--disabled-foreground); text-align: center; font-size: calc(13.5px * var(--echelle-texte)); }
.bm-lu { display: flex; flex-direction: column; min-height: 100%; }
.bm-outils { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 2px; padding: 8px 14px;
  border-bottom: 1px solid var(--border); background: var(--background); }
.bm-outils form { margin: 0; }
.bm-ob { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 9px; border: 0; border-radius: 8px; background: none;
  color: var(--muted-foreground); font: inherit; font-size: calc(13px * var(--echelle-texte)); white-space: nowrap; cursor: pointer; text-decoration: none; list-style: none; }
.bm-ob::-webkit-details-marker { display: none; }
.bm-app svg { flex: none; max-width: none; }
.bm-ob:hover, details[open] > .bm-ob { background: var(--muted); color: var(--foreground); }
.bm-ob kbd { font-size: calc(10px * var(--echelle-texte)); padding: 0 4px; line-height: 15px; }
.bm-ob--rappel { color: var(--warning); }
.bm-ob--etoile.on { color: var(--warning); }
.bm-ob--etoile.on svg { fill: currentColor; }
.bm-ob--bas svg { transform: rotate(180deg); }
.bm-retour-liste, .bm-fermer-volet { display: none; }
.bm-position { margin-left: auto; padding: 0 6px; font-size: calc(12px * var(--echelle-texte)); color: var(--disabled-foreground); white-space: nowrap; }
.bm-pop { position: relative; }
.bm-pop > summary { list-style: none; cursor: pointer; }
.bm-pop > summary::-webkit-details-marker { display: none; }
.bm-plus .rc-v-menu-pop { left: 0; right: auto; }
.bm-plus .rc-v-menu-pop form { margin: 0; }
.bm-plus .rc-v-menu-pop a { display: block; text-decoration: none; }
.bm-menu { left: 0; right: auto; width: 290px; z-index: 50; }
.bm-menu form { margin: 0; }
.bm-menu form > button:not(.btn), .bm-menu > button { width: 100%; }
.mj-rep-menu .bm-choisir .btn { display: inline-flex; justify-content: center; height: 32px; padding: 0 14px; font-weight: 500;
  color: var(--on-primary); background: var(--primary, var(--accent)); border: 1px solid var(--accent-ring); }
.mj-rep-menu .bm-choisir .btn:hover { filter: brightness(1.08); background: var(--primary, var(--accent)); }
.bm-menu--haut { left: auto; right: 0; top: auto; bottom: calc(100% + 8px); }
.bm-choisir { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding: 10px 10px 6px; border-top: 1px solid var(--border); font-size: calc(13px * var(--echelle-texte)); color: var(--foreground); }
.bm-choisir-champs { display: flex; gap: 6px; }
.bm-choisir-champs .rc-saisie { height: 34px; font-size: calc(13px * var(--echelle-texte)); flex: 1 1 auto; width: auto; min-width: 0; padding: 0 8px; }
.bm-choisir-champs .bm-heure { flex: 0 0 92px; width: 92px; }
.bm-choisir .btn { justify-content: center; }
.bm-menu-aide { margin: 6px 0 0; padding: 8px 10px 4px; border-top: 1px solid var(--border); font-size: calc(12px * var(--echelle-texte)); line-height: 1.45; color: var(--muted-foreground); }

.bm-lu-corps { display: flex; flex-direction: column; gap: 14px; padding: 22px 28px 28px; max-width: 980px; width: 100%; }
.bm-lu-objet { margin: 0; font-size: var(--text-lg); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.bm-lu-qui { display: flex; align-items: center; gap: 12px; }
.bm-lu-qui .rc-pastille { width: 38px; height: 38px; flex: none; }
.bm-lu-qui form { margin: 0 0 0 auto; }
.bm-lu-qui-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bm-lu-nom { display: flex; align-items: center; gap: 8px; font-weight: 600; flex-wrap: wrap; }
.bm-lu-nom a:not(.bm-fiche) { color: var(--foreground); text-decoration: none; }
.bm-lu-sous { font-size: calc(12.5px * var(--echelle-texte)); color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-ajouter { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.bm-ancien { border: 1px solid var(--border); border-radius: 10px; }
.bm-ancien > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 8px 12px; cursor: pointer; list-style: none; font-size: calc(12.5px * var(--echelle-texte)); color: var(--muted-foreground); }
.bm-ancien > summary::-webkit-details-marker { display: none; }
.bm-ancien > summary b { color: var(--foreground); font-weight: 500; }
.bm-ancien > summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-ancien .bm-corps { margin: 0 12px 12px; width: calc(100% - 24px); }
.bm-lecture { display: flex; flex-direction: column; gap: 12px; }
.bm-lecture-tete { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: calc(12.5px * var(--echelle-texte)); color: var(--muted-foreground); }
.bm-lecture-tete b { font-weight: 500; color: var(--foreground); }
.bm-lecture-date { margin-left: auto; }
.bm-adr { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12px * var(--echelle-texte)); color: var(--muted-foreground); white-space: nowrap; }
.bm-adr i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.bm-corps { display: block; width: 100%; height: 160px; border: 0; background: transparent; }
.bm-corps--papier { background: #fff; border-radius: 12px; }
.bm-pjs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bm-pjs a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--border-strong); border-radius: 9px;
  font-size: calc(12.5px * var(--echelle-texte)); color: var(--foreground); text-decoration: none; }
.bm-pjs a:hover { background: var(--muted); }
.bm-pjs small { color: var(--muted-foreground); }
.bm-repondre { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.bm-repondre-vite { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--card); color: var(--muted-foreground); text-decoration: none; font-size: calc(13.5px * var(--echelle-texte)); }
.bm-repondre-vite:hover { border-color: var(--ring); color: var(--foreground); }
.bm-repondre-vite kbd { margin-left: auto; }
.bm-repondre .btn { display: inline-flex; align-items: center; gap: 6px; }

/* La réponse s'écrit SOUS le mail : la fenêtre de mail de l'application, posée
   dans la colonne au lieu de flotter à droite. */
.bm-redaction { padding: 0 28px 28px; max-width: 980px; width: 100%; scroll-margin-top: 60px; }
.bm-redaction dialog.rc-mail[open] { position: relative; inset: auto; width: 100%; max-width: none; height: auto; max-height: none; z-index: auto;
  border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: none; overflow: visible; }
.bm-redaction dialog.rc-echange[open] .rc-echange-grille { height: auto; overflow: visible; }

/* ── Le squelette d'un mail qui arrive (17 octobre 2026) : sa forme tout de
   suite — l'objet, l'expéditeur, des lignes grises —, rien ne saute ensuite. */
.bm-sq { display: block; height: 12px; border-radius: 6px; background: var(--muted); animation: bm-pouls 1.2s ease-in-out infinite; }
.bm-sq--court { width: 40%; }
.bm-sq--outil { display: inline-block; width: 74px; height: 22px; margin-right: 6px; }
.bm-lu--squelette .bm-outils { min-height: 49px; }
.bm-lu--squelette .bm-lecture { gap: 12px; padding-top: 22px; }
.bm-lu--squelette .bm-lecture .bm-sq:nth-child(2) { width: 92%; }
.bm-lu--squelette .bm-lecture .bm-sq:nth-child(3) { width: 84%; }
.bm-lu--squelette .bm-lu-sous .bm-sq { display: inline-block; width: 180px; height: 10px; }
@keyframes bm-pouls { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bm-sq { animation: none; } }
.bm-redaction--attente .bm-sq-fenetre { display: flex; flex-direction: column; gap: 12px; min-height: 320px; padding: 18px;
  border: 1px solid var(--border-strong); border-radius: 12px; }

/* ── « Tâche » : le menu posé près de la ligne survolée ── */
.bm-ob--tache { color: var(--info); }
.bm-tache-flottant { position: fixed; z-index: 96; }
.bm-tache-flottant[hidden] { display: none; }
.bm-tache-flottant .bm-menu { position: static; }
.bm-menu-tache form { display: flex; flex-direction: column; margin: 0; }

/* ── Le petit mot (« Annuler ») et l'aide du clavier ── */
.bm-toast { position: fixed; left: 50%; bottom: 28px; z-index: 95; transform: translateX(-50%); display: flex; align-items: center; gap: 14px;
  max-width: calc(100vw - 32px); padding: 10px 12px 10px 16px; border-radius: 10px; background: var(--foreground); color: var(--background);
  font-size: calc(13.5px * var(--echelle-texte)); box-shadow: 0 10px 30px rgba(0,0,0,.45); animation: bm-monte .16s ease-out; }
.bm-toast[hidden] { display: none; }
.bm-toast--erreur { background: #3B1517; color: #FECACA; box-shadow: 0 0 0 1px rgba(248,113,113,.4), 0 10px 30px rgba(0,0,0,.45); }
.bm-toast button { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px; border: 0; border-radius: 6px; background: none;
  color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; }
.bm-toast button:hover { background: rgba(139,127,224,.12); }
.bm-toast kbd { font-size: calc(10px * var(--echelle-texte)); padding: 0 4px; border-radius: 4px; background: rgba(10,11,16,.08); color: inherit; }
@keyframes bm-monte { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
dialog.bm-aide { width: min(720px, calc(100vw - 32px)); padding: 20px 24px 24px; border: 1px solid var(--border-strong); border-radius: 14px;
  background: var(--card); color: var(--foreground); }
dialog.bm-aide::backdrop { background: rgba(0,0,0,.55); }
.bm-aide header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bm-aide h2 { margin: 0; font-size: var(--text-md); }
.bm-aide dl { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 10px 14px; margin: 0; font-size: calc(13.5px * var(--echelle-texte)); }
@media (max-width: 640px) { .bm-aide dl { grid-template-columns: auto 1fr; } }
.bm-aide dt { white-space: nowrap; }
.bm-aide dd { margin: 0; color: var(--muted-foreground); }

/* ── Ce qui reste du volet : la fiche d'une personne ── */
.bm-vide { margin: 24px; padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.bm-vide h2 { margin: 0; font-size: calc(18px * var(--echelle-texte)); }
.bm-fiche-coord { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: calc(13.5px * var(--echelle-texte)); }
.bm-fiche-coord dt { color: var(--muted-foreground); }
.bm-fiche-coord dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* « Envoyer plus tard », dans le pied de la fenêtre de rédaction */
.bm-plus-tard { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--foreground); }
.rc-v-pied-d .bm-pop { display: inline-block; }
.bm-pop > summary svg:last-child { transition: transform .1s; }
.bm-plus-tard svg:last-child { transform: rotate(90deg); }

/* ── Écran moyen : la liste plus étroite, les mots des boutons se taisent ── */
@media (max-width: 1599px) { .bm-outils .bm-ob kbd, .bm-outils .bm-ob--etoile span, .bm-outils .bm-long { display: none; } }
@media (max-width: 1280px) {
  .bm-app { grid-template-columns: 196px minmax(300px, 380px) minmax(0, 1fr); }
  .bm-outils .bm-ob span { display: none; }
}

/* ── Au téléphone : une colonne à la fois — la liste, puis le mail ── */
@media (max-width: 899px) {
  .bm-app { display: flex; flex-direction: column; height: auto; min-height: 0; overflow: visible; }
  .bm-app kbd, .bm-clavier, .bm-position { display: none !important; }
  .bm-dossiers { flex-direction: row; align-items: center; gap: 6px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border);
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .bm-dossiers::-webkit-scrollbar { display: none; }
  .bm-dos-liste { flex-direction: row; gap: 6px; }
  .bm-sep { display: none; }
  .bm-ecrire { flex: none; margin: 0; height: 36px; padding: 0 14px; }
  .bm-dos { flex: none; min-height: 36px; border: 1px solid var(--border-strong); border-radius: 99px; padding: 0 12px; gap: 6px; }
  .bm-dos.on { border-color: transparent; }
  .bm-colonne { border-right: 0; }
  .bm-lignes { overflow: visible; }
  .bm-cherche { height: 44px; }
  .bm-cherche input { font-size: calc(16px * var(--echelle-texte)); }
  .bm-l { padding: 12px 14px 12px 8px; }
  .bm-case { opacity: 1; width: 20px; height: 20px; }
  .bm-l--nonlu::before { display: none; }
  .bm-l--nonlu .bm-qui b::before { content: "● "; color: var(--accent); }
  .bm-survol { display: none !important; }
  .bm-lecture-col { display: none; overflow: visible; }
  .bm-app--lit .bm-dossiers, .bm-app--lit .bm-colonne { display: none; }
  .bm-app--lit .bm-lecture-col { display: flex; }
  .bm-retour-liste { display: inline-flex; }
  .bm-outils { top: var(--haut); overflow-x: auto; scrollbar-width: none; padding: 6px 8px; }
  .bm-outils .bm-ob { min-width: 40px; height: 40px; justify-content: center; }
  .bm-outils .bm-ob span, .bm-outils .bm-ob kbd { display: none; }
  .bm-lu-corps { padding: 16px; }
  .bm-redaction { padding: 0 0 16px; }
  .bm-menu { position: fixed; left: 12px !important; right: 12px !important; width: auto; }
  .bm-toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .bm-plus-tard .bm-long { display: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   LA BOÎTE QUI TRIE — Tevini, 24 octobre 2026 (maquette `mails-v3-options.html`,
   A) : la réception en trois tiroirs — votre carnet, les nouvelles personnes,
   les lettres et notifications (repliées) —, les initiales de chacun, ce qu'il
   faut faire avec lui sous l'objet du mail, et la réponse toujours à portée.
   ════════════════════════════════════════════════════════════════════════ */
.bm-dos-trait { display: block; height: 1px; margin: 8px 10px; background: var(--border); }

/* Les tiroirs : un titre net, son compte, et les lettres repliées d'office. */
.bm-tiroir { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 12px 16px 7px;
  background: var(--background); border-bottom: 1px solid var(--border); font-size: calc(11.5px * var(--echelle-texte)); font-weight: 600;
  letter-spacing: .02em; text-transform: none; color: var(--muted-foreground); }
.bm-tiroir i { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--accent); }
.bm-tiroir--nouvelles i { background: var(--info); }
.bm-tiroir--lettres i { background: var(--disabled-foreground); }
.bm-tiroir b { font-weight: 500; font-size: calc(11px * var(--echelle-texte)); color: var(--disabled-foreground); }
.bm-tiroir + .bm-l, .bm-l + .bm-tiroir { border-top: 0; }
.bm-l + .bm-tiroir { margin-top: 6px; }
.bm-tiroir-bascule { display: flex; align-items: center; gap: 8px; width: 100%; margin: -4px -6px; padding: 4px 6px; border: 0; border-radius: 6px;
  background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.bm-tiroir-bascule:hover { background: var(--muted); color: var(--foreground); }
.bm-tiroir-bascule svg { margin-left: auto; transition: transform .15s; }
.bm-tiroir-bascule[aria-expanded="true"] svg { transform: rotate(90deg); }
.bm-lignes:not(.bm-lettres-ouvertes) .bm-l[data-bm-tiroir="lettres"] { display: none; }
/* Les lettres, d'un ton plus bas : ce n'est pas quelqu'un qui attend. */
.bm-l[data-bm-tiroir="lettres"] { opacity: .82; }
.bm-l[data-bm-tiroir="lettres"]:hover { opacity: 1; }

/* La ligne : les initiales à gauche, la case à leur place au survol. */
.bm-l--av { grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 11px; padding: 10px 14px 11px 16px; }
.bm-av { grid-column: 1; grid-row: 1 / span 3; align-self: start; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin-top: 1px; border-radius: 50%; font-size: calc(11.5px * var(--echelle-texte)); font-weight: 600; letter-spacing: .02em;
  color: var(--muted-foreground); background: var(--muted); box-shadow: inset 0 0 0 1px var(--border-strong); }
.bm-av--carnet { color: var(--accent); background: var(--accent-ring); box-shadow: none; }
.bm-l[data-bm-tiroir="nouvelles"] .bm-av { color: var(--info); background: rgba(125,211,252,.10); box-shadow: none; }
.bm-l--av .bm-case { grid-column: 1; grid-row: 1 / span 3; justify-self: center; width: 18px; height: 18px; margin: 8px 0 0; }
.bm-l--av:hover .bm-av, .bm-app--choix .bm-l--av .bm-av, .bm-l--av.bm-l--cochee .bm-av,
.bm-l--av:has(.bm-case:focus-visible) .bm-av { visibility: hidden; }
.bm-l--av.bm-l--nonlu::before { left: 5px; top: 22px; width: 6px; height: 6px; }
.bm-l--av .bm-qui, .bm-l--av .bm-objet, .bm-l--av .bm-extrait { grid-column-start: 2; }
.bm-l--av .bm-quand { grid-column: 3; }
.bm-tag--relance { color: var(--warning-text); background: rgba(251,191,36,.10); margin: 0; }
.bm-tag--relance-retard { color: var(--error); background: rgba(248,113,113,.12); margin: 0; }

/* Sous l'objet : où vous en êtes avec cette personne. */
.bm-ctx { display: flex; flex-direction: column; gap: 6px; margin-top: -4px; padding: 9px 10px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border); font-size: calc(12.5px * var(--echelle-texte)); color: var(--muted-foreground); }
.bm-ctx-l { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.bm-ctx-camp, .bm-ctx-pa, .bm-ctx-der, .bm-ctx-plus { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px;
  border-radius: 99px; white-space: nowrap; max-width: 100%; }
.bm-ctx-camp { color: var(--foreground); background: var(--muted); text-decoration: none; }
.bm-ctx-camp span { min-width: 0; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.bm-ctx-camp b { font-weight: 500; color: var(--accent); }
.bm-ctx-camp--abouti b { color: var(--success); }
.bm-ctx-camp:hover { background: var(--accent-ring); }
.bm-ctx-camp svg { color: var(--muted-foreground); }
.bm-ctx-plus { padding: 0 8px; color: var(--disabled-foreground); }
.bm-ctx-pa { border: 1px solid var(--border-strong); color: var(--foreground); }
.bm-ctx-pa span { min-width: 0; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.bm-ctx-pa svg { color: var(--accent); }
.bm-ctx-pa--r { border-color: rgba(248,113,113,.4); color: var(--error); }
.bm-ctx-pa--r svg { color: var(--error); }
.bm-ctx-pa--vide { border-style: dashed; color: var(--disabled-foreground); }
.bm-ctx-der { padding: 0 4px; color: var(--muted-foreground); }
.bm-ctx-bulle { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; min-height: 28px; padding: 0 12px; border-radius: 99px;
  color: var(--accent); background: var(--accent-ring); text-decoration: none; font-weight: 500; white-space: nowrap; }
.bm-ctx-bulle:hover { filter: brightness(1.15); }
.bm-ctx-fiche-l { display: none; }

/* La réponse, toujours à portée : collée en bas tant qu'on lit le mail. */
.bm-lu-corps { flex: 1 0 auto; }
.bm-repondre { position: sticky; bottom: 0; z-index: 4; flex-wrap: nowrap; margin: auto -28px -28px; padding: 12px 28px 16px;
  background: linear-gradient(to bottom, transparent, var(--background) 14px); }
.bm-lecture-col:has([data-bm-redaction]) .bm-repondre { display: none; }
/* La réponse ouverte suit le mail de près, sans grand vide entre les deux. */
.bm-lecture-col:has([data-bm-redaction]) .bm-lu { min-height: 0; flex-shrink: 0; }
.bm-lecture-col > .bm-redaction { flex-shrink: 0; }
.bm-repondre-vite { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-repondre .btn { flex: none; white-space: nowrap; }
/* Le rond de la bulle flotte en bas à droite : la barre lui laisse sa place. */
@media (min-width: 900px) { .bm-repondre { padding-right: 104px; } .bm-redaction { padding-bottom: 96px; } }
@media (max-width: 1600px) { .bm-repondre .btn span { display: none; } }

@media (max-width: 899px) {
  .bm-tiroir { top: var(--haut); }
  .bm-l--av { padding: 12px 14px 12px 14px; }
  /* Au doigt, comme Gmail : toucher les initiales choisit le mail. */
  .bm-l--av .bm-av { visibility: visible !important; }
  .bm-l--av .bm-case { width: 32px; height: 32px; margin: 1px 0 0; border-radius: 50%; opacity: 0; }
  .bm-app--choix .bm-l--av .bm-case { opacity: 1; width: 24px; height: 24px; margin-top: 5px; }
  .bm-app--choix .bm-l--av .bm-av { visibility: hidden !important; }
  /* Au-dessus de la barre d'onglets du bas, toujours sous le pouce. */
  .bm-repondre { bottom: calc(66px + env(safe-area-inset-bottom)); margin: auto -16px 0; padding: 10px 16px 12px; }
  .bm-l--av.bm-l--nonlu .bm-qui b::before { content: none; }
  .bm-l--av.bm-l--nonlu::before { display: block; left: 4px; top: 26px; }
  .bm-ctx-bulle-l { display: none; }
  .bm-ctx-fiche-l { display: inline; }
  .bm-ctx-bulle { margin-left: 0; }
  .bm-ctx-pa span { max-width: 200px; }
}
.bm-tiroir[hidden] { display: none; }

/* ════════════════════════════════════════════════════════════════════════
   « À RÉPONDRE » (Tevini, 25 octobre 2026, maquette `a-repondre-options.html`) :
   le tri du matin. L'orange le distingue du violet des non-lus.
   ════════════════════════════════════════════════════════════════════════ */
:root { --arep: #F0A86B; --arep-fond: rgba(240,168,107,.14); --arep-bord: rgba(240,168,107,.45); }
.bm-tag--arep { display: none; margin: 0; color: var(--arep); background: var(--arep-fond); font-weight: 500; }
.bm-l--arep .bm-tag--arep { display: inline-flex; }
.bm-colonne[data-bm-dossier="a-traiter"] .bm-tag--arep { display: none; }
.bm-ib--arep:hover, .bm-l--arep .bm-ib--arep { color: var(--arep); background: var(--arep-fond); }
.bm-ob--arep { color: var(--arep); }
.bm-ob--arep:hover { background: var(--arep-fond); color: var(--arep); }
.bm-ob--arep.on { background: var(--arep-fond); color: var(--arep); box-shadow: inset 0 0 0 1px var(--arep-bord); }
.bm-masse .bm-ob--arep { background: var(--arep-fond); box-shadow: inset 0 0 0 1px var(--arep-bord); font-weight: 600; }
.bm-masse .bm-ob--arep kbd { color: var(--arep); border-color: var(--arep-bord); background: transparent; }
.bm-n--arep { color: var(--arep); font-weight: 600; }

/* La barre des mails choisis tient dans sa colonne : « À répondre » en toutes
   lettres, les autres gestes en icônes (leur nom au survol). */
.bm-masse { flex-wrap: nowrap; overflow: hidden; }
.bm-masse .bm-ob:not(.bm-ob--arep) > span { display: none; }
.bm-masse .bm-ob--arep { flex: none; }
.bm-masse .bm-ob--arep kbd { display: none; }
/* Pas de barre de défilement visible dans la liste (Tevini, 25 octobre 2026) : la molette et le doigt suffisent. */
.bm-lignes { scrollbar-width: none; }
.bm-lignes::-webkit-scrollbar { display: none; }


/* ════ LES CATÉGORIES DE LA RÉCEPTION (Tevini, 25 octobre 2026) : Tout ·
   Votre carnet · Nouvelles personnes · Lettres, en onglets fins. ════ */
.bm-voir { display: flex; gap: 2px; padding: 3px; margin: 0 0 8px; border-radius: 11px; background: var(--muted); border: 1px solid var(--border); }
.bm-voir-b { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 8px;
  border: 0; border-radius: 8px; background: none; color: var(--muted-foreground); font: inherit; font-size: calc(12.5px * var(--echelle-texte)); white-space: nowrap; cursor: pointer; }
.bm-voir-b:hover { color: var(--foreground); }
.bm-voir-b[aria-pressed="true"] { background: var(--card); color: var(--foreground); box-shadow: 0 1px 3px rgba(0,0,0,.35), inset 0 0 0 1px var(--border-strong); }
.bm-voir-b i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.bm-voir-b--nouvelles i { background: var(--info); }
.bm-voir-b--lettres i { background: var(--disabled-foreground); }
.bm-lignes[data-bm-voir] .bm-l[data-bm-tiroir], .bm-lignes[data-bm-voir] [data-bm-tiroir-tete] { display: none !important; }
.bm-lignes[data-bm-voir="carnet"] .bm-l[data-bm-tiroir="carnet"],
.bm-lignes[data-bm-voir="nouvelles"] .bm-l[data-bm-tiroir="nouvelles"],
.bm-lignes[data-bm-voir="lettres"] .bm-l[data-bm-tiroir="lettres"] { display: grid !important; }
.bm-voir-b:disabled { opacity: .35; cursor: default; }

/* ════ LE MAIL OUVERT : LA RELANCE ET LES CAMPAGNES COMME DANS LA BULLE
   (Tevini, 25 octobre 2026). ════ */
.bm-ctx { gap: 8px; padding: 8px; }
.bm-rl { position: relative; z-index: 6; border-radius: 10px; padding: 4px 6px 4px 8px; }
.bm-rl.rc-rl-bande--vide { background: rgba(255,255,255,.02); box-shadow: inset 0 0 0 1px var(--border); }
.bm-rl-pop { flex: 1; min-width: 0; position: relative; }
.bm-rl-pop > summary { list-style: none; cursor: pointer; border-radius: 8px; }
.bm-rl-pop > summary::-webkit-details-marker { display: none; }
.bm-rl-pop > summary:hover .rc-rl-bande-t b, .bm-rl-pop > summary:hover .rc-rl-bande-prevoir { text-decoration: underline; text-underline-offset: 3px; }
.bm-rl-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: 260px; display: flex; flex-direction: column; gap: 1px; padding: 6px; }
.bm-rl-menu > b { padding: 4px 8px 6px; font-size: calc(12px * var(--echelle-texte)); font-weight: 500; color: var(--muted-foreground); }
.bm-rl-menu form { margin: 0; }
.bm-rl-menu button { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; padding: 7px 9px; border: 0;
  border-radius: 7px; background: none; color: var(--foreground); font: inherit; font-size: var(--text-sm); text-align: left; cursor: pointer; }
.bm-rl-menu button:hover { background: var(--muted); }
.bm-rl-menu button small { color: var(--muted-foreground); font-size: calc(11.5px * var(--echelle-texte)); }
.bm-rl-date { margin-top: 4px !important; padding: 8px 8px 4px; border-top: 1px solid var(--border); }
.bm-rl-date label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: calc(12.5px * var(--echelle-texte)); color: var(--muted-foreground); }
.bm-rl-date input { width: 150px; height: 32px; font-size: calc(13px * var(--echelle-texte)); }
.bm-ctx-l { gap: 6px; }
.bm-ctx-der--fin { margin-left: auto; padding-right: 2px; }
.bm-cp { display: contents; }
.bm-rl-der { flex: none; font-size: calc(12px * var(--echelle-texte)); color: var(--muted-foreground); white-space: nowrap; padding: 0 6px; }
.bm-rl-date label { display: block; }
.bm-rl-date label > * { width: 100% !important; }
@media (max-width: 1250px) { .bm-rl-der { display: none; } }
.bm-ctx { align-items: stretch; }
.bm-ctx > .bm-ctx-l { width: 100%; align-self: stretch; }
.bm-ctx .rc-cp-n { max-width: 118px; }

/* La réponse sous le mail : UNE feuille arrondie, pas une carte dans un cadre
   (Tevini, 25 octobre 2026) — le fond de la feuille court jusqu'au pied. */
.bm-redaction:not(.bm-redaction--plein) dialog.rc-mail[open] .rc-echange-grille,
.bm-redaction:not(.bm-redaction--plein) dialog.rc-mail[open] .rc-echange-corps { background: none; }
.bm-redaction:not(.bm-redaction--plein) .rc-mail-carte { background: none; border: 0; border-radius: 0; box-shadow: none; }
.bm-redaction:not(.bm-redaction--plein) .rc-echange-pied { border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; }
/* Le rond de la bulle flotte en bas à droite : « Envoyer » s'arrête avant lui. */
@media (min-width: 900px) { .bm-redaction:not(.bm-redaction--plein) .rc-echange-pied { padding-right: 76px; } }

/* ── Le menu du clic droit sur un mail (Tevini, 25 octobre 2026) ──
   Tous les gestes du mail, avec leur touche : on apprend le clavier en
   s'en servant. Posé par `_mails.js` sous la souris. */
.bm-menu { position: fixed; z-index: 90; min-width: 232px; max-width: 300px; padding: 6px; display: flex; flex-direction: column; gap: 1px;
  background: var(--card); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.bm-menu hr { width: 100%; margin: 5px 0; border: 0; border-top: 1px solid var(--border); }
.bm-menu-titre { margin: 4px 10px 6px; font-size: var(--text-xs); color: var(--muted-foreground); }
.bm-menu-l { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none;
  color: var(--foreground); font: inherit; font-size: calc(13.5px * var(--echelle-texte)); text-align: left; cursor: pointer; }
.bm-menu-l svg { flex: none; color: var(--muted-foreground); }
.bm-menu-l span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-menu-l kbd { flex: none; }
.bm-menu-l:hover, .bm-menu-l:focus-visible { background: var(--muted); outline: none; }
.bm-menu-l--danger, .bm-menu-l--danger svg { color: var(--error); }
.bm-aide-note { margin: -4px 0 14px; font-size: var(--text-sm); color: var(--muted-foreground); }

.bm-puce { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--border-strong);
  font-size: calc(12.5px * var(--echelle-texte)); color: var(--muted-foreground); cursor: pointer; white-space: nowrap; user-select: none; }
.bm-puce small { font-size: calc(11px * var(--echelle-texte)); color: var(--disabled-foreground); }
.bm-puce input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.bm-puce:hover { color: var(--foreground); }
.bm-puce:has(input:checked), .bm-puce--on { background: rgba(125,211,252,.14); border-color: rgba(125,211,252,.5); color: var(--foreground); }
.bm-puce:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 1px; }
/* Au doigt : pas de touche à dire, et les libellés plus serrés. */
@media (max-width: 767px) {
  .bm-afaire-pied kbd { display: none; }
  .bm-afaire-lib { flex-basis: 44px; }
}

/* ── Aucune barre de défilement sur la page Mails (25 octobre 2026) ───────
   Demande de Tevini : les colonnes défilent à la molette, sans barre. */
.bm-app, .bm-app * { scrollbar-width: none; }
.bm-app::-webkit-scrollbar, .bm-app *::-webkit-scrollbar { display: none; }

/* ════════════════════════════════════════════════════════════════════════
   LA BOÎTE DANS UNE CARTE, LE MAIL EN VOLET (Tevini, 26 octobre 2026,
   maquette `maquettes/mails-volet/`). « J'aime l'affichage de Spark ; quand on
   clique sur un mail, juste ouvrir le volet du mail, dans un format agréable.
   Je n'aime pas le fond noir » — la même couleur que les autres pages : la
   boîte est posée dans une CARTE, la liste prend toute sa largeur, une ligne
   par mail (qui · objet + début du texte · heure), et le mail ouvert glisse
   dans un VOLET à droite, comme une tâche ou une note. Échap ou × le referme.
   Au téléphone (moins de 900 px), rien ne change : la liste, puis le mail.
   ════════════════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  .bm-page { padding: 22px 26px 24px !important; }
  .bm-app { grid-template-columns: 216px minmax(0, 1fr); height: calc(var(--fenetre) - var(--haut) - 46px);
    background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
  .bm-colonne { border-right: 0; }
  .bm-dossiers { padding-top: 14px; }
  .bm-col-tete { padding: 16px 22px 12px; }
  .bm-col-tete .bm-cherche { max-width: 560px; }
  .bm-tiroir { background: var(--card); padding-left: 22px; }
  .bm-groupe { padding-left: 22px; }

  /* Une ligne par mail, comme Spark : qui · objet + début du texte · heure. */
  .bm-l--av { grid-template-columns: 32px minmax(120px, 210px) fit-content(46%) minmax(0, 1fr) auto; column-gap: 14px;
    align-items: center; min-height: 50px; padding: 0 18px 0 22px; border-bottom: 0; border-radius: 10px; margin: 0 8px; }
  .bm-l--av:hover { background: var(--muted); }
  .bm-l--av .bm-av { grid-row: 1; align-self: center; margin-top: 0; }
  .bm-l--av .bm-case { grid-row: 1; align-self: center; margin: 0; }
  .bm-l--av .bm-qui { grid-column: 2; grid-row: 1; }
  .bm-l--av .bm-objet { grid-column: 3; grid-row: 1; min-width: 0; }
  .bm-l--av .bm-extrait { grid-column: 4; grid-row: 1; font-size: inherit; }
  .bm-l--av .bm-quand { grid-column: 5; grid-row: 1; }
  .bm-l--av.bm-l--nonlu::before { left: 9px; top: 50%; margin-top: -3px; }
  .bm-l--av .bm-survol { top: 50%; transform: translateY(-50%); }
  .bm-l--choisie, .bm-l--choisie:hover { background: var(--accent-ring); }

  /* Le volet : posé sur la page, à droite, sur le gris des cartes. */
  .bm-lecture-col { position: fixed; z-index: 58; top: var(--haut); right: 0; bottom: 0; width: min(780px, 62vw);
    background: var(--card); border-left: 1px solid var(--border-strong); box-shadow: -24px 0 48px rgba(0,0,0,.45);
    transform: translateX(105%); visibility: hidden; transition: transform .18s ease, visibility 0s .18s; }
  .bm-app--lit .bm-lecture-col { transform: none; visibility: visible; transition: transform .18s ease; }
  .bm-rien { display: none; }
  .bm-outils { background: var(--card); padding: 10px 16px; }
  .bm-fermer-volet { display: inline-flex; margin-left: 4px; }
  .bm-lu-corps { padding: 26px 36px 30px; max-width: none; }
  .bm-lu-objet { font-size: var(--text-xl); }
  .bm-repondre { margin: auto -36px -30px; padding: 12px 104px 16px 36px; background: linear-gradient(to bottom, transparent, var(--card) 14px); }
  .bm-redaction { padding: 0 36px 30px; max-width: none; }
  .bm-ctx { background: var(--muted); border-color: transparent; }
}
@media (min-width: 900px) and (prefers-reduced-motion: reduce) { .bm-lecture-col { transition: none !important; } }

/* Le mail seul, dans la fenêtre au centre de Ma journée (Tevini, 27 octobre 2026). */
.bm-app--seul { display: block !important; height: 100vh; }
.bm-app--seul > :not(.bm-lecture-col) { display: none !important; }
.bm-app--seul > .bm-lecture-col { display: flex !important; flex-direction: column; position: fixed !important; inset: 0 !important;
  width: auto !important; max-width: none !important; transform: none !important; visibility: visible !important;
  border: 0 !important; border-radius: 0 !important; margin: 0 !important; box-shadow: none !important; }
.bm-app--seul .bm-rien { display: flex !important; }
.bm-app--seul .bm-fermer-volet { display: none !important; }
html[data-cadre]:has(.bm-app--seul) body { background: var(--card); }
/* Précédent / suivant n'ont pas de sens dans la fenêtre : la croix de Ma journée prend leur place. */
.bm-app--seul [data-bm-aller] { display: none !important; }


/* ════════════════════════════════════════════════════════════════════════
   PROPRE À TVNI (28/10/2026)
   ════════════════════════════════════════════════════════════════════════ */
/* La page : les marges de Rich Circles au lieu de celles des autres écrans. */
.main:has(> .bm-page) { padding: 22px 26px 24px; }
.main:has(> .bm-page)::before { display: none; }
@media (max-width: 899px) { .main:has(> .bm-page) { padding: 0; } }
.bm-page { padding: 0 !important; }
.bm-pastille { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; border-radius: 50%;
  font-size: calc(13px * var(--echelle-texte)); font-weight: 600; color: var(--muted-foreground); background: var(--muted);
  box-shadow: inset 0 0 0 1px var(--border-strong); }
.bm-pastille--carnet { color: var(--accent); background: var(--accent-ring); box-shadow: none; }
.bm-pastille--nouvelles { color: var(--info); background: rgba(125,211,252,.10); box-shadow: none; }

/* Une conversation du chat, dans la liste : sa marque, discrète. */
.bm-tag--chat { margin: 0; color: var(--accent); background: var(--accent-wash); }
/* La boîte d'origine d'un mail, quand le membre en a plusieurs (29/10/2026). */
.bm-tag--boite { margin: 0 0 0 6px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-foreground); background: var(--muted); }
.bm-puces--boites { padding: 0 16px 8px; flex-wrap: wrap; }

/* L'avis « rebranchez votre boîte » (l'autorisation de ranger). */
.bm-avis { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; font-size: calc(13px * var(--echelle-texte));
  background: var(--accent-wash); color: var(--foreground); border: 1px solid var(--accent-ring); }
.bm-avis p { margin: 0; flex: 1; }
.bm-avis--erreur { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.35); }

/* Le volet d'une PERSONNE : la barre de la boîte en haut, son fil d'activité en
   grand dessous (la bulle, mode `large`), dans un cadre de la même origine. */
.bm-lu--fil { height: 100%; min-height: 0; }
.bm-volet-cadre { flex: 1; min-height: 0; width: 100%; border: 0; background: var(--card); display: block; }
.bm-lu--fil .bm-outils { flex: none; }
.bm-outils-qui { display: inline-flex; align-items: center; gap: 8px; min-width: 0; margin-right: 6px; font-weight: 600; color: var(--foreground);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.bm-outils-qui .bm-av { width: 26px; height: 26px; font-size: calc(10px * var(--echelle-texte)); }
@media (min-width: 900px) {
  .bm-lecture-col:has(.bm-lu--fil) { overflow: hidden; }
}

/* La bulle EN GRAND (dans son cadre) : plus d'air, le fil au centre. */
.bp--large .bp-tete { padding: 18px 28px 12px; }
.bp--large .bp-av { width: 44px; height: 44px; font-size: calc(15px * var(--echelle-texte)); }
.bp--large .bp-nom { font-size: var(--text-lg); }
.bp--large .bp-relance, .bp--large .bp-bas { padding-left: 28px; padding-right: 28px; }
.bp--large .bp-fil .av-histo { padding: 14px 28px 0; }
.bp--large .bp-fil .av-histo-liste > * { max-width: 860px; }
/* Le texte d'un e-mail ou d'un message, dans le fil EN GRAND. */
.bp--large .av-ev-texte { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--muted); color: var(--foreground);
  font-size: calc(13.5px * var(--echelle-texte)); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 760px; }
.bp--large .av-ev[data-histo-sorte="message"] .av-ev-t > b { font-weight: 600; }
/* La réponse sous le mail (une nouvelle personne) : une feuille simple. */
.bm-reponse { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 0; padding: 14px 16px !important; border: 1px solid var(--border-strong);
  border-radius: 12px; background: var(--card); }
.bm-reponse[hidden] { display: none; }
.bm-reponse-tete { display: flex; align-items: center; gap: 8px; font-size: calc(12.5px * var(--echelle-texte)); color: var(--muted-foreground); }
.bm-reponse-tete b { font-weight: 500; color: var(--foreground); }
.bm-reponse-texte { width: 100%; min-height: 140px; resize: vertical; font-size: calc(14px * var(--echelle-texte)); line-height: 1.6; }
.bm-reponse-erreur { margin: 0; color: var(--error); font-size: calc(13px * var(--echelle-texte)); }
.bm-reponse-pied { display: flex; justify-content: flex-end; gap: 8px; }
.bm-reponse-pied .btn { display: inline-flex; align-items: center; gap: 6px; }
button.bm-repondre-vite { font: inherit; cursor: text; text-align: left; }
.bm-lecture-col:has(.bm-reponse:not([hidden])) .bm-repondre { display: none; }
/* Au téléphone, le fil de la personne prend tout l'écran sous la barre. */
@media (max-width: 899px) {
  .bm-lu--fil { min-height: 0; }
  .bm-lu--fil .bm-volet-cadre { flex: none; height: calc(var(--fenetre) - var(--haut) - 54px); }
}
@media (max-width: 899px) {
  .bp--large .bp-tete, .bp--large .bp-relance, .bp--large .bp-bas { padding-left: 14px; padding-right: 14px; }
  .bp--large .bp-fil .av-histo { padding: 10px 14px 0; }
  .bp--large .av-ev-texte { max-width: none; }
}

/* ── Le fil EN GRAND, retouches du fondateur (28/10/2026) : « la barre de
   recherche prend beaucoup de place » ; « la zone d'activité noire, pas ouf ».
   La recherche se range au bout des filtres, discrète, et s'ouvre en la
   touchant ; la zone du bas prend la couleur des cartes, comme une feuille. */
.bp--large .bp-fil .av-histo { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  align-items: center; column-gap: 12px; padding-top: 6px; }
.bp--large .av-histo-filtres { grid-column: 1; margin: 0 0 10px; }
.bp--large .av-histo-filtres button { flex: none; padding: 5px 14px; }
.bp--large .av-histo-q { grid-column: 2; justify-self: end; width: 34px; height: 32px; margin: 0 0 10px; padding: 0 10px 0 30px;
  border-radius: 8px; border-color: transparent; background: var(--muted)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A3A1B5' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E")
  no-repeat 10px 50%; cursor: pointer; transition: width .18s ease; font-size: calc(13px * var(--echelle-texte)); }
.bp--large .av-histo-q::placeholder { color: transparent; }
.bp--large .av-histo-q:focus, .bp--large .av-histo-q:not(:placeholder-shown) { width: min(320px, 100%); cursor: text; border-color: var(--border-strong); }
.bp--large .av-histo-q:focus::placeholder { color: var(--disabled-foreground); }
.bp--large .av-histo-liste { grid-column: 1 / -1; align-self: stretch; }
.bp--large .bp-bas { margin: 8px 28px 18px; border-color: var(--border); background: var(--muted); border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset; }
.bp--large .bp-canaux { padding: 8px 8px 0; }
.bp--large .bp-note .editeur-note, .bp--large .bp-note textarea { background: none; }
/* Le rond de la bulle flotte en bas à droite : « Ajouter la note » s'arrête avant lui. */
@media (min-width: 900px) { .bp--large .bp-note-pied { padding-right: 56px; } }
@media (max-width: 899px) { .bp--large .bp-bas { margin: 8px 12px 12px; } }
/* La note s'écrit dans la feuille elle-même, sans second cadre noir. */
.bp--large .bp-note .edn { background: transparent; border-color: transparent; box-shadow: none; }
.bp--large .bp-note .edn:focus-within { background: rgba(255,255,255,.03); border-color: var(--border); }

/* ════════════════════════════════════════════════════════════════════════
   TRIER TOUTE LA JOURNÉE (fondateur, 28/10/2026 : « mets-toi à la place de
   l'utilisateur final qui va passer sa journée sur sa boîte »).
   1. Un mail ouvert ne CACHE plus la liste : sur un écran d'ordinateur, la
      liste et la lecture se tiennent côte à côte (comme Spark et Gmail) ; les
      dossiers se réduisent à leurs icônes, la liste passe sur deux lignes.
   2. L'en-tête de la liste tient en deux lignes : le titre et la recherche,
      puis les tiroirs et les filtres.
   ════════════════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  .bm-col-tete { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 14px; row-gap: 10px; }
  .bm-col-titre { flex: 0 1 auto; }
  .bm-col-tete .bm-cherche { flex: 1 1 260px; max-width: 460px; margin-left: auto; }
  .bm-voir { flex: 1 1 auto; margin: 0; max-width: 620px; }
  .bm-puces { flex: none; margin-left: auto; }
}

@media (min-width: 1100px) {
  .bm-app.bm-app--lit { grid-template-columns: 60px minmax(360px, 420px) minmax(0, 1fr); }
  /* La lecture, posée dans la carte, à droite de la liste. */
  .bm-app--lit .bm-lecture-col { position: relative; top: auto; right: auto; bottom: auto; z-index: auto; width: auto;
    transform: none; visibility: visible; transition: none; box-shadow: none; border-left: 1px solid var(--border);
    border-radius: 0 16px 16px 0; overflow: hidden; }
  .bm-app--lit .bm-lu:not(.bm-lu--fil) { overflow-y: auto; height: 100%; }
  .bm-app--lit .bm-lu--fil { height: 100%; }
  .bm-app--lit .bm-outils { border-radius: 0 16px 0 0; }
  /* Les dossiers en icônes, leur nombre en pastille. */
  .bm-app--lit .bm-dossiers { padding: 14px 8px 12px; align-items: stretch; }
  .bm-app--lit .bm-ecrire { padding: 0; font-size: 0; gap: 0; margin: 0 0 14px; }
  .bm-app--lit .bm-ecrire kbd, .bm-app--lit .bm-clavier { display: none; }
  .bm-app--lit .bm-dos { position: relative; justify-content: center; padding: 0; min-height: 38px; }
  .bm-app--lit .bm-dos > span:not(.bm-n) { display: none; }
  .bm-app--lit .bm-dos .bm-n { position: absolute; top: 2px; right: 2px; margin: 0; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 99px; background: var(--card); font-size: calc(10px * var(--echelle-texte)); line-height: 16px; text-align: center; }
  .bm-app--lit .bm-dos-trait { margin: 6px 4px; }
  /* La liste sur deux lignes : qui et l'heure, puis l'objet et le début du texte. */
  .bm-app--lit .bm-col-tete { padding: 14px 14px 10px; }
  .bm-app--lit .bm-col-tete .bm-cherche { flex-basis: 100%; max-width: none; margin: 0; }
  .bm-app--lit .bm-voir { flex-basis: 100%; max-width: none; }
  .bm-app--lit .bm-voir-b { padding: 0 4px; font-size: calc(11.5px * var(--echelle-texte)); }
  .bm-app--lit .bm-voir-b i { display: none; }
  .bm-app--lit .bm-puces { margin-left: 0; }
  .bm-app--lit .bm-tiroir, .bm-app--lit .bm-groupe { padding-left: 16px; }
  .bm-app--lit .bm-l--av { grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px;
    align-items: center; min-height: 0; padding: 10px 12px 10px 14px; margin: 0 6px; }
  .bm-app--lit .bm-l--av .bm-av, .bm-app--lit .bm-l--av .bm-case { grid-row: 1 / span 2; align-self: center; }
  .bm-app--lit .bm-l--av .bm-qui { grid-column: 2; grid-row: 1; }
  .bm-app--lit .bm-l--av .bm-quand { grid-column: 3; grid-row: 1; }
  .bm-app--lit .bm-l--av .bm-objet { grid-column: 2 / 4; grid-row: 2; font-size: calc(13px * var(--echelle-texte)); }
  .bm-app--lit .bm-l--av .bm-extrait { display: none; }
  .bm-app--lit .bm-l--av.bm-l--nonlu::before { left: 4px; top: 50%; }
  .bm-app--lit .bm-survol { top: 8px; transform: none; }
  .bm-app--lit .bm-fermer-volet { display: inline-flex; }
}
/* Dans le fil en grand, ce que l'équipe a envoyé se teinte de violet : on voit
   d'un coup d'œil qui a écrit le dernier. */
.bp--large .av-ev--nous .av-ev-texte { background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent-ring); }
/* Un mail se lit sur une largeur confortable, même sur un grand écran. */
@media (min-width: 1100px) {
  .bm-app--lit .bm-lu-corps { max-width: 860px; }
}
