/* ═══════════════════════════════════════════════════════════════════════════
 *  bureau_etude_mobile.css — LA FAMILLE BUREAU D'ÉTUDE SUR TÉLÉPHONE (lot 5a, 10/10/2026)
 *  R-BE-MOBILE · maquette « Bureau d'étude mobile ». Pièces .mx- communes + .bem-*.
 *  Téléphone seulement (tout est dans le @media). Couleurs : variables de base.css.
 * ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .bem-page { padding: 14px var(--m-cote) 16px; font-family: 'DM Sans', sans-serif; min-width: 0; }
  .bem-titre { margin: 0; font-size: 22px; line-height: 28px; font-weight: 800; color: var(--wood-dark); }
  .bem-resume b.ko { color: var(--red); }
  .bem-resume b.att { color: var(--orange-text); }
  .bem-pied { text-align: center; margin-top: 16px; }

  /* ── Réponses client (R-MAIL-REPONSE-VUE) : un bouton par carte ── */
  .bem-mails { margin-top: 10px; border-radius: 12px; border: 1.5px solid var(--red-line); background: var(--red-soft); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
  .bem-mails-t { font-size: 14px; line-height: 18px; font-weight: 700; color: var(--red); padding: 2px 4px; }
  .bem-mail { appearance: none; font: inherit; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 10px; border-radius: 10px;
    border: 1px solid var(--red-line); background: var(--white); color: var(--text); text-align: left; cursor: pointer; }
  .bem-mail svg { width: 18px; height: 18px; fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
  .bem-mail-l { flex: 1; min-width: 0; font-size: 13px; line-height: 17px; overflow-wrap: anywhere; }
  .bem-mail-l b { color: var(--wood-dark); }
  .bem-mail-n { font-family: 'DM Mono', monospace; font-size: 13px; font-weight: 500; color: var(--white); background: var(--red); border-radius: 999px; padding: 0 7px; flex-shrink: 0; }
  .bem-mails-autres { appearance: none; font: inherit; display: block; width: 100%; margin-top: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px;
    border: 1.5px solid var(--orange-line); background: var(--orange-soft); color: var(--orange-text); font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }

  /* ── La carte ── */
  .mx-carte.bem { cursor: pointer; }
  .mx-carte.bem:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .mx-carte.bem.be-row-mail { border-color: var(--red-line); }
  .mx-carte.bem.ouverte { border: 1.5px solid var(--wood-dark); box-shadow: 0 0 0 3px var(--accent-soft); }   /* après : la carte ouverte l'emporte */
  .mx-carte.bem.be-row-cible { outline: 3px solid var(--red); outline-offset: 2px; }
  .bem-num { font-family: 'DM Mono', monospace; font-size: 12.5px; color: var(--text-muted); flex-shrink: 0; }
  .bem-repere { font-size: 12.5px; font-weight: 700; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
  .bem-repere.ko { color: var(--red); }
  .bem-repere.att { color: var(--orange-text); }
  .bem-repere.ok { color: var(--green); }
  .bem-montant { font-family: 'DM Mono', monospace; font-size: 14px; color: var(--wood-dark); white-space: nowrap; flex-shrink: 0; }
  .mx-carte.bem .mx-etat { margin-top: 4px; overflow-wrap: anywhere; }
  .mx-carte.bem .mx-etat.neutre { color: var(--text-muted); font-weight: 600; }
  .bem-pastilles { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin-top: 6px; }
  .bem-pastille { font-size: 12px; line-height: 18px; font-weight: 700; border-radius: 999px; padding: 1px 9px; color: var(--wood-mid); background: var(--wood-pale); }
  .bem-pastille.plein  { color: var(--white); background: var(--red); }
  .bem-pastille.rouge  { color: var(--red); background: var(--red-soft); }
  .bem-pastille.orange { color: var(--orange-text); background: var(--orange-soft); }
  .bem-pastille.bleu   { color: var(--wood-dark); background: var(--accent-soft); }
  .bem-pastille.violet { color: var(--violet); background: var(--violet-soft); }
  .bem-pastille.gris   { color: var(--wood-mid); background: var(--wood-pale); }
  /* .be-pill-note / .be-dot gardés pour marquerNoteLueBE() : on neutralise leur dessin de bureau (kanban.css). */
  .bem-pastille.be-pill-note { border: 0; display: inline; font-size: 12px; }
  .bem-pastille .be-dot { width: auto; height: auto; border-radius: 0; background: none; display: inline; }
  /* Bouton principal + Fiche */
  .bem-gestes { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; margin-top: 10px; align-items: center; }
  .bem-gestes .mx-outil, .bem-fiche { width: 44px; padding: 0; }
  .mx-actions .bem-fiche { width: 100%; padding: 0 12px; }
  .bem-mention { font-size: 12.5px; line-height: 17px; font-weight: 700; color: var(--text-muted); }
  .mx-principal.bem-rouge { color: var(--red); border-color: var(--red-line); background: var(--white); }
  .mx-principal.bem-violet { background: var(--violet); border-color: var(--violet); }
  .mx-carte.bem .mx-principal.neutre:not(.bem-rouge) { color: var(--wood-dark); }

  /* ── Déplié ── */
  .bem-deplie { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; cursor: default; }
  .bem-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .bem-case { background: var(--wood-bg); border-radius: 10px; padding: 8px 10px; min-width: 0; }
  .bem-k { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
  .bem-deplie > .bem-k { margin: 14px 4px 6px; }
  .bem-v { font-family: 'DM Mono', monospace; font-size: 14px; color: var(--wood-dark); margin-top: 2px; overflow-wrap: anywhere; }
  .bem-v.vide { font-family: 'DM Sans', sans-serif; color: var(--text-muted); }
  .bem-histo { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 4px 12px; }
  .bem-histo-l { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 18px; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
  .bem-histo-l:last-child { border-bottom: 0; }
  .bem-histo-q { font-size: 12px; color: var(--text-muted); white-space: normal; }
  .bem-dossier { margin-top: 12px; }
  .bem-notes { background: var(--white); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
  .bem-note + .bem-note { border-top: 1px solid var(--border); }
  .bem-note-b { appearance: none; font: inherit; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px;
    width: 100%; min-height: 52px; padding: 8px 12px; border: 0; background: var(--white); text-align: left; cursor: pointer; align-items: center; }
  .bem-note-t { font-size: 14px; font-weight: 700; color: var(--wood-dark); }
  .bem-note-s { grid-column: 1; font-size: 12.5px; line-height: 17px; color: var(--text-muted); overflow-wrap: anywhere; }
  .bem-note-s.vide { font-style: italic; }
  .bem-note-g { grid-column: 2; grid-row: 1 / span 2; font-size: 13px; font-weight: 700; color: var(--accent); }
  .bem-note-corps { padding: 0 12px 10px; font-size: 13px; }
  .mx-carte.bem .mx-actions { margin-top: 14px; }
}

/* R-NOTE-EXPORT (16/10/2026) : « Lire les commentaires » et envoi grisé, au gabarit du téléphone. */
@media (max-width: 768px) {
  .mx-principal.be-prod-lire { background: var(--white); color: var(--orange-text); border: 1.5px solid var(--orange-text); }
  /* Une rangée à elle seule : le bouton d'envoi et la Fiche restent côte à côte en dessous (sinon l'envoi tombe dans la colonne de 44 px). */
  .bem-gestes .be-prod-lire { grid-column: 1 / -1; }
  .mx-principal.be-prod-grise { background: var(--wood-pale); color: var(--text-muted); border-color: var(--border); }
  .mx-carte.bem.be-prod-export { background: var(--orange-soft); border-color: var(--orange-text); }
  .mx-carte.bem.be-prod-export .bem-pastille.orange { background: var(--orange-text); color: var(--white); }   /* « à lire » : plein, comme au bureau */
}
