/* ══ LE TÉLÉPHONE, PENSÉ COMME UNE APPLICATION ═══════════════════════════════
   Maquette validée par Tevini le 2 octobre 2026 (« Aujourd'hui », une campagne,
   la fiche d'une personne, Contacts). Carnet : `docs/notes/NOTES-mobile.md`.

   ⚠️ **UN SEUL DOMICILE POUR LA FORME TÉLÉPHONE DE CETTE REFONTE** : tout est
   sous `max-width: 900px`, chargé APRÈS `reachcircles.css`. L'ordinateur ne
   lit rien d'ici — « la version PC est nickel ».
   ⚠️ Les éléments propres au téléphone portent `.rc-m-seul` (cachés à
   l'ordinateur) ; ceux qu'il cache, `.rc-m-cache`. */

/* ⚠️ `.rc-m-seul` ne se cache qu'À L'ORDINATEUR : au téléphone, chaque élément
   garde son propre `display` (un `revert` l'écrasait, le bouton flottant
   passait sur deux lignes). */
@media (min-width: 901px) { .rc-m-seul { display: none !important; } }

@media (max-width: 900px) {
  .rc-m-cache { display: none !important; }

  /* ── La barre du bas : cinq entrées, le « + » au centre ─────────────────── */
  /* ⚠️ Pas de `backdrop-filter` ici : il ferait de la barre le cadre de ses
     enfants FIXES, et le voile des feuilles ne couvrirait plus que la barre. */
  .rc-nav-basse { grid-auto-columns: minmax(0, 1fr); align-items: start; background: var(--card); }
  .rc-nav-basse > a, .rc-nav-basse > details > summary {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-height: 58px; padding: 8px 2px 6px; font-size: 11px; color: var(--muted-foreground);
    text-decoration: none; cursor: pointer; list-style: none; }
  .rc-nav-basse > details > summary::-webkit-details-marker { display: none; }
  .rc-nav-basse a[aria-current], .rc-nav-basse details[open] > summary { color: var(--accent); }
  .rc-nav-basse a span, .rc-nav-basse summary span { font-size: 11px; }
  .rc-nav-plus > summary .rc-nav-rond { width: 46px; height: 46px; border-radius: 16px; background: var(--primary);
    color: var(--on-primary); display: grid; place-items: center; margin-top: -2px;
    box-shadow: 0 8px 22px rgba(139, 127, 224, .35); }
  .rc-nav-plus > summary { padding-top: 6px; }
  /* La feuille qui monte du bas : « + » et « Plus ». */
  .rc-nav-feuille { position: fixed; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom));
    z-index: 43; background: var(--card); border-top: 1px solid var(--border-strong);
    border-radius: 22px 22px 0 0; padding: 10px 14px 14px; box-shadow: 0 -24px 60px rgba(0, 0, 0, .55);
    display: grid; gap: 4px; }
  .rc-nav-feuille::before { content: ""; width: 38px; height: 4px; border-radius: 2px;
    background: var(--border-strong); margin: 0 auto 8px; }
  .rc-nav-basse .rc-nav-feuille a { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: 12px; min-height: 52px; padding: 0 12px;
    border-radius: 14px; color: var(--foreground); text-decoration: none; font-size: var(--text-md); }
  .rc-nav-basse .rc-nav-feuille a:active, .rc-nav-basse .rc-nav-feuille a:hover { background: var(--muted); }
  .rc-nav-feuille a svg { color: var(--accent); }
  /* Note, tâche, relance, rendez-vous : « Créer » de l'ordinateur, en tuiles (27 octobre 2026). */
  .rc-nav-vite { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
  .rc-nav-basse .rc-nav-vite button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    min-height: 68px; padding: 8px 2px; border: 0; border-radius: 14px; background: var(--muted); color: var(--foreground);
    font: inherit; font-size: 13px; }
  .rc-nav-basse .rc-nav-vite button span { font-size: 13px; }
  .rc-nav-vite button svg { color: var(--accent); }
  .rc-nav-vite button:active { filter: brightness(1.15); }
  /* Le « + » du haut ne faisait qu'un contact : il est dans la feuille. */
  html .rc-haut .rc-haut-plus--tel { display: none !important; }
  /* L’événement où l’on est (13 octobre 2026) : en tête, mis en avant. */
  .rc-nav-basse .rc-nav-feuille a.rc-nav-mise { background: rgba(139,127,224,.14); border: 1px solid var(--accent-ring-strong); min-height: 60px; }
  .rc-nav-basse .rc-nav-mise span { font-size: var(--text-md); text-align: left; }
  .rc-nav-basse .rc-nav-mise small { display: block; color: var(--muted-foreground); font-size: var(--text-xs); }
  /* Un voile derrière la feuille ouverte ; un toucher dessus la referme (`_mobile.js`). */
  .rc-nav-basse details[open]::before { content: ""; position: fixed; inset: 0; z-index: -1;
    background: rgba(5, 6, 10, .55); }

  /* ── Les titres : en haut à gauche, comme une application ──────────────── */
  .rc-titre-page { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
  .rc-content { padding: 12px 16px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); gap: 16px; }

  /* ── Les pastilles qui défilent sur place (filtres) ─────────────────────── */
  .rc-m-puces { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .rc-m-puces::-webkit-scrollbar { display: none; }
  .rc-m-puce { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px;
    border-radius: 999px; background: var(--card); border: 1px solid var(--border); color: var(--muted-foreground);
    font-size: var(--text-sm); text-decoration: none; white-space: nowrap; }
  .rc-m-puce b { color: var(--foreground); font-weight: 600; }
  .rc-m-puce[aria-current] { background: rgba(139, 127, 224, .18); border-color: rgba(180, 168, 255, .35); color: var(--foreground); }

  /* ── Le bouton flottant (« Ajouter une personne ») ──────────────────────── */
  .rc-m-flottant { position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 40;
    display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px; border-radius: 17px;
    background: var(--primary); color: var(--on-primary); font-weight: 600; border: 0; font: inherit; font-weight: 600;
    box-shadow: 0 12px 30px rgba(139, 127, 224, .35); text-decoration: none; cursor: pointer; }
  body.rc-masse-active .rc-m-flottant { display: none !important; }
}

/* ── 1 · Aujourd'hui : le canal à portée de pouce sur chaque tâche ──────────── */
@media (max-width: 900px) {
  .rc-j-rangee { grid-template-columns: 40px minmax(0,1fr) auto; column-gap: 12px; padding: 12px; }
  .rc-j-rangee .rc-pastille { width: 40px; height: 40px; font-size: 13px; }
  .rc-j-rangee-titre { font-weight: 600; }
  /* Au-dessus du lien qui couvre la rangée : on ouvre le canal, pas la tâche. */
  .rc-j-go { grid-area: g; align-self: center; position: relative; z-index: 2;
    width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
    background: rgba(180, 168, 255, .14); color: var(--accent); }
  .rc-j-go--whatsapp, .rc-j-go--sms { background: rgba(74, 222, 128, .14); color: var(--success); }
  .rc-j-go--appel { background: rgba(125, 211, 252, .14); color: var(--info); }
  .rc-j-rangee:has(.rc-j-go) .rc-j-chevron { display: none; }
}

/* ── 2 · Une campagne : une liste, le menu ⋯, le bouton flottant ────────────── */
@media (max-width: 900px) {
  .rc-m-lignes { display: flex; flex-direction: column; }
  .rc-m-ligne { display: grid; grid-template-columns: 40px minmax(0,1fr) auto 14px; align-items: center; gap: 12px;
    min-height: 64px; padding: 10px 2px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
  .rc-m-ligne:active { background: var(--muted); }
  .rc-m-ligne[hidden] { display: none; }
  [data-m-filtres] { margin-bottom: 4px; }
  button.rc-m-puce { font: inherit; font-size: var(--text-sm); cursor: pointer; }
  .rc-m-ligne .rc-pastille { width: 40px; height: 40px; font-size: 13px; }
  .rc-m-ligne-corps { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .rc-m-ligne-nom { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rc-m-ligne small { color: var(--muted-foreground); font-size: var(--text-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rc-m-retard { color: var(--error); font-weight: 500; }
  .rc-m-statut { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border-strong);
    color: var(--muted-foreground); white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
  .rc-m-statut--abouti { color: var(--success); border-color: rgba(74, 222, 128, .3); }
  .rc-m-statut--en_cours { color: var(--accent); border-color: rgba(180, 168, 255, .35); }
  .rc-m-statut--clos, .rc-m-statut--perdu { color: var(--disabled-foreground); }
  .rc-m-chevron { color: var(--disabled-foreground); display: flex; }

  /* Le menu ⋯ : un `<details>`, ouvert vers le bas à droite. */
  .rc-m-menu { position: relative; margin-left: auto; }
  .rc-m-menu-bouton { list-style: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
    background: var(--card); border: 1px solid var(--border); color: var(--muted-foreground); cursor: pointer; }
  .rc-m-menu-bouton::-webkit-details-marker { display: none; }
  .rc-m-menu-corps { position: absolute; right: 0; top: 50px; z-index: 30; min-width: 200px; padding: 6px;
    background: var(--card); border: 1px solid var(--border-strong); border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .55); display: grid; }
  .rc-m-menu-corps form { margin: 0; }
  .rc-m-menu-corps a, .rc-m-menu-corps button { display: flex; align-items: center; width: 100%; min-height: 46px; padding: 0 14px;
    border: 0; background: none; border-radius: 11px; color: var(--foreground); font: inherit; text-align: left;
    text-decoration: none; cursor: pointer; }
  .rc-m-menu-corps a:active, .rc-m-menu-corps button:active { background: var(--muted); }
  .rc-m-menu-corps .rc-m-menu-danger { color: var(--error); }
}

/* La recherche d'une campagne sur une ligne : le champ, puis le filtre. */
@media (max-width: 900px) {
  .rc-outillage { flex-direction: row !important; align-items: center; gap: 8px; padding: 0 !important;
    background: none !important; border: 0 !important; box-shadow: none !important; }
  .rc-outillage .rc-cherche { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 46px;
    padding: 0 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); color: var(--muted-foreground); }
  .rc-outillage .rc-cherche input { flex: 1; min-width: 0; background: none; border: 0; color: var(--foreground); font-size: 16px; outline: none; }
  .rc-outillage .rc-cherche-echap, .rc-outillage .rc-outils a[aria-label="Chercher"],
  .rc-outillage .rc-outils-trait { display: none !important; }
  .rc-outillage .rc-outils { flex: none; }
}

/* ── 3 · La fiche d'une personne ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .rc-fiche-identite { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
  .rc-fiche-identite > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
  .rc-fiche-identite .rc-pastille--xl { width: 84px; height: 84px; font-size: 28px; }
  .rc-fiche-nom { justify-content: center; font-size: 23px; font-weight: 700; }
  .rc-m-fiche-tel { display: grid; gap: 12px; margin-top: 4px; }
  /* Quatre canaux et le rendez-vous sur une rangée : « Mail » restait seul dessous (27 octobre 2026). */
  .rc-m-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
  .rc-m-action { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0 10px;
    border-radius: 15px; background: var(--card); border: 1px solid var(--border); color: var(--muted-foreground);
    font-size: 12px; text-decoration: none; min-width: 0; }
  .rc-m-action span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rc-m-action svg { color: var(--accent); }
  .rc-m-action--appel svg { color: var(--info); }
  .rc-m-action--whatsapp svg, .rc-m-action--sms svg { color: var(--success); }
  .rc-m-action:active { background: var(--muted); }
  .rc-m-autres-canaux { margin-top: -2px; }
  .rc-m-vues { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 13px;
    background: var(--card); border: 1px solid var(--border); }
  .rc-m-vues button { min-height: 40px; border: 0; background: none; border-radius: 10px; font: inherit;
    font-size: var(--text-sm); color: var(--muted-foreground); cursor: pointer; }
  .rc-m-vues button[aria-selected="true"] { background: var(--muted); color: var(--foreground); font-weight: 600; }

  /* Chaque vue montre ce qui lui revient. */
  .rc-fiche[data-m-vue-active="activite"] .rc-fiche-onglets,
  .rc-fiche[data-m-vue-active="activite"] .rc-fiche-panneau,
  .rc-fiche[data-m-vue-active="campagnes"] .rc-fiche-onglets,
  .rc-fiche[data-m-vue-active="campagnes"] .rc-fiche-panneau,
  .rc-fiche[data-m-vue-active="activite"] .rc-fiche-campagnes,
  .rc-fiche[data-m-vue-active="infos"] .rc-fiche-vie { display: none !important; }
  .rc-fiche[data-m-vue-active="campagnes"] .rc-fiche-vie > *:not(.rc-fiche-campagnes) { display: none !important; }
}

/* ── 4 · Contacts ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .rc-repertoire .rc-facettes { display: none; }
  .rc-m-facettes { margin-top: 12px; }
  .rc-repertoire { display: block; }
}
@media (max-width: 900px) {
  .rc-repertoire-liste .rc-actions { gap: 0; }
  .rc-repertoire-liste .rc-action { background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0;
    padding: 10px 2px; min-height: 62px; box-shadow: none; }
  .rc-repertoire-liste .rc-action .rc-pastille { width: 40px; height: 40px; font-size: 13px; }
  .rc-repertoire-liste .rc-groupe-titre { color: var(--accent); }
}

/* La sélection : une feuille posée sur la barre du bas, des gestes égaux. */
@media (max-width: 900px) {
  .rc-masse-barre { left: 0; right: 0; width: auto; max-width: none; transform: none;
    bottom: calc(66px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0;
    border-width: 1px 0 0; padding: 14px 14px 12px; gap: 8px; box-shadow: 0 -20px 50px rgba(0, 0, 0, .5); }
  .rc-masse-barre .btn { flex: 1 1 0; min-width: 0; min-height: 52px; padding: 0 6px; font-size: var(--text-sm);
    white-space: normal; line-height: 1.2; border-radius: 14px; }
  .rc-masse-barre .rc-masse-compte { font-size: var(--text-md); }
  .rc-masse-vider { top: 8px; right: 8px; }
}

/* ── Les cibles au pouce : 44 points (audit d'interface du 2 octobre 2026) ── */
@media (max-width: 900px) {
  .rc-m-puce, .rc-m-vues button { min-height: 44px; }
  .rc-fiche-poubelle { min-width: 44px; min-height: 44px; justify-content: center; align-items: center; opacity: .7; }
  .rc-fiche-nom-geste { min-height: 44px; }
  .rc-fiche-photo-retirer { min-height: 44px; margin-top: 0; }
  .rc-j-traiter { min-height: 44px; }
  .rc-fiche-vie .btn { min-height: 44px; }
}

/* ── Le fil d'Ariane : un retour, sur une ligne ──────────────────────────────
   Au téléphone, seul le dernier lien reste, précédé de « ‹ » : c'est le geste
   « retour » d'une application. Le nom de la page est déjà le grand titre. */
@media (max-width: 900px) {
  .rc-fil { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow: hidden; }
  .rc-fil > * { display: none !important; }
  .rc-fil > a:last-of-type { display: inline-flex !important; align-items: center; gap: 6px; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted-foreground); }
  .rc-fil > a:last-of-type::before { content: "‹"; font-size: 22px; line-height: 1; color: var(--accent); }
  .rc-fiche-rang { display: none; }
}

/* « Reprendre : … » (une tâche laissée ouverte) : posé au-dessus de la barre du
   bas ; le bouton flottant monte au-dessus de lui ; la sélection le masque. */
@media (max-width: 900px) {
  /* Une fenêtre d'écriture ouverte (mail, message, appel) a son propre pied :
     la barre du bas le cachait, « Envoyer » compris (17 octobre 2026). */
  html:has(dialog.rc-echange[open]) .rc-nav-basse { display: none; }
}

/* ── Contacts en tableau, au téléphone (4 octobre 2026) ────────────────────
   Huit colonnes ne tiennent pas sous le doigt : chaque rangée devient un bloc,
   le nom en tête, puis chaque valeur précédée de son libellé. */
@media (max-width: 900px) {
  .rc-vc-cadre { background: none; border: 0; border-radius: 0; overflow: visible; }
  .rc-vc-tableau, .rc-vc-tableau tbody, .rc-vc-tableau tr, .rc-vc-tableau td { display: block; }
  .rc-vc-tableau thead { display: none; }
  .rc-vc-tableau tr { position: relative; padding: 12px 0 12px 34px; border-bottom: 1px solid var(--border); }
  .rc-vc-tableau td { height: auto; border: 0; padding: 2px 0; max-width: none; white-space: normal; }
  /* ⚠️ La pile de cartes de `.rc-tableau` pose un libellé EN CAPITALES sur sa
     propre ligne : sept valeurs par personne prenaient un écran entier. Ici,
     le libellé précède la valeur, sur la même ligne. */
  .rc-vc-tableau td::before { content: none; }
  .rc-vc-tableau td[data-libelle]::before { content: attr(data-libelle) " · "; display: inline;
    font-size: inherit; letter-spacing: normal; text-transform: none; margin: 0;
    color: var(--muted-foreground); }
  .rc-vc-tableau .rc-vc-case { position: absolute; left: 0; top: 14px; width: auto; }
  .rc-vc-tableau .rc-vc-nom { font-size: var(--text-base); padding-bottom: 4px; }
  .rc-pagination-par { margin-left: 0; }
}

/* ══ FAÇON IPHONE (maquette validée par Tevini le 16 octobre 2026) ═══════════
   « Je vais beaucoup travailler sur téléphone : qu'elles s'affichent comme si
   c'était une application Apple. » Carnet : `docs/notes/NOTES-mobile.md`.
   Le vocabulaire est celui d'iOS : un GRAND TITRE en haut à gauche, une barre
   du haut transparente qui ne garde que des ronds, des LISTES GROUPÉES (blocs
   arrondis, séparateurs fins décalés après l'icône), une barre d'onglets
   translucide. Toujours sous `max-width: 900px` : l'ordinateur n'en lit rien. */

/* ── Les listes groupées, façon Réglages (`.rc-ios-*`) ───────────────────────
   Hors de la requête média : la page « Plus » s'ouvre aussi à l'ordinateur. */
.rc-ios-groupe { background: var(--card); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.rc-ios-groupe > form { margin: 0; display: contents; }
.rc-ios-rang { position: relative; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 8px 14px;
  color: var(--foreground); text-decoration: none; font: inherit; font-size: 17px; background: none; border: 0;
  width: 100%; text-align: left; cursor: pointer; }
.rc-ios-rang[hidden] { display: none; }
.rc-ios-rang:active { background: var(--muted); }
.rc-ios-rang + .rc-ios-rang::before, .rc-ios-groupe > form + form .rc-ios-rang::before,
.rc-ios-groupe > .rc-ios-rang + form .rc-ios-rang::before { content: ""; position: absolute; top: 0; right: 0; left: 56px;
  border-top: .5px solid rgba(255,255,255,.1); }
.rc-ios-ico { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--t, var(--primary)); color: #fff; }
.rc-ios-ico b { font-size: 14px; }
.rc-ios-lib { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rc-ios-lib small { font-size: 13.5px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-ios-val { color: var(--muted-foreground); font-size: 16px; }
.rc-ios-chev { color: rgba(255,255,255,.28); display: flex; }
.rc-ios-chev svg { width: 14px; height: 14px; }
.rc-ios-rang--moi { min-height: 76px; }
.rc-ios-rang--moi .rc-pastille { width: 54px; height: 54px; font-size: 19px; }
.rc-ios-rang--moi b { font-size: 19px; font-weight: 600; }
.rc-ios-rang--bouton { color: var(--accent); }
.rc-ios-rang--bouton svg { flex: none; width: 30px; }
.rc-ios-rang--danger { color: var(--error); }

@media (max-width: 900px) {
  /* ── La barre du haut : transparente, floutée, des ronds à droite ───────
     ⚠️ Le flou est sur un `::before`, PAS sur la barre : un `backdrop-filter`
     ferait d'elle le cadre de ses enfants FIXES, et le panneau de la cloche
     (`position: fixed`) s'y retrouverait enfermé. */
  .rc-haut { height: 52px; background: none; border-bottom: 0; box-shadow: none; }
  .rc-haut::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: rgba(10, 11, 16, .78); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); }
  :root:has(.rc-haut) { --haut: 52px; }
  .rc-haut-in { padding: 0 16px; gap: 10px; }
  .rc-haut-marque { display: none; }
  /* `html .rc-haut` : `activites.css` (chargée après) rallonge le champ quand la barre d'action est montée. */
  html .rc-haut .rc-haut-chercher { flex: none; margin-left: auto; width: 38px; height: 38px; padding: 0; border-radius: 50%;
    justify-content: center; background: var(--muted); border: 0; color: var(--accent); }
  .rc-haut-chercher svg { color: var(--accent); }
  html .rc-haut .rc-haut-chercher-t { display: none; }
  /* `.rc-ba-en-haut` est posée sur `<html>` (`_barre_action.js`) : d'où la classe doublée pour passer devant `activites.css`. */
  .rc-haut-btn, .rc-haut .rc-eclair.rc-eclair { width: 38px; height: 38px; border-radius: 50%; border: 0;
    background: var(--muted); color: var(--accent); }
  .rc-ba-mobile-ouverte .rc-haut .rc-eclair.rc-eclair { background: var(--primary); color: var(--on-primary); }
  .rc-haut-droite { gap: 10px; }
  .rc-haut-cpt { background: var(--error) !important; color: #fff !important; }

  /* ── Les titres : le grand titre d'iOS ─────────────────────────────────── */
  .rc-content h1:not(.rc-fiche-nom) { font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.12; }
  .rc-content { padding-top: 6px; }

  /* ── La barre d'onglets : translucide, des icônes fines, rien qui dépasse ──
     Même raison que plus haut : le flou sur un `::before`, sinon la feuille
     du « + » (fixe) ne couvrirait plus que la barre. */
  .rc-nav-basse { background: none; border-top: 0; }
  .rc-nav-basse::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: rgba(20, 22, 31, .82); border-top: .5px solid rgba(255,255,255,.12);
    -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); }
  .rc-nav-basse > a, .rc-nav-basse > details > summary { min-height: 54px; padding: 7px 2px 4px; font-size: 10.5px; font-weight: 500;
    color: rgba(245, 244, 240, .5); position: relative; }
  .rc-nav-basse a span, .rc-nav-basse summary span { font-size: 10.5px; }
  .rc-nav-basse > a svg, .rc-nav-basse > details > summary > svg { width: 25px; height: 25px; }
  .rc-nav-plus > summary .rc-nav-rond { width: 48px; height: 34px; border-radius: 12px; margin-top: 4px; box-shadow: none; }
  .rc-nav-basse .rc-nav-pastille { top: 4px; left: 50%; margin: 0 0 0 6px; background: var(--error); color: #fff; }

  /* ── La page « Plus » ───────────────────────────────────────────────────── */
  .rc-ios-groupe { margin: 0; }
  .rc-content:has(> .rc-ios-groupe) { gap: 22px; }
}

/* ── Aujourd'hui, façon iPhone (lot 2, 16 octobre 2026) ─────────────────────
   La date au-dessus du grand titre, les sessions et les chiffres en
   pastilles, la liste en bloc arrondi, le canal en rond à droite de chaque
   ligne. Fait, Reporter, Annuler passent DERRIÈRE la ligne : on la glisse vers
   la gauche (`_mobile.js`, 6), comme dans Mail ou Rappels. */
@media (max-width: 900px) {
  .rc-m-surtitre { margin: 0 0 2px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: var(--muted-foreground); }
  .mj-tete .rc-sous-titre { font-size: 15px; }

  /* Les sessions et « Filtres » : des pastilles, sans carte autour. */
  .mj-outils { background: none; border: 0; margin: 4px 0 0; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
  .mj-sessions-ligne { padding: 0; border: 0; flex: 1 1 auto; min-width: 0; }
  .mj-sessions { gap: 8px; }
  .mj-sessions .rc-vue, .mj-session-pop > summary { min-height: 34px; padding: 0 13px; border-radius: 17px; background: var(--muted);
    border: 0; font-size: 14px; color: var(--muted-foreground); }
  .mj-sessions .rc-vue[aria-current] { background: var(--primary); color: var(--on-primary); }
  .mj-sessions .rc-vue[aria-current] .rc-vue-n { background: rgba(10, 11, 16, .18); color: var(--on-primary); }
  .mj-filtres-tel { margin: 0; min-height: 34px; padding: 0 12px; border: 0; border-radius: 17px; background: var(--muted);
    font-size: 14px; color: var(--accent); flex: none; max-width: 100%; }
  .mj-filtres-tel svg { transform: rotate(90deg); }
  .mj-outils .mj-filtres.mj-filtres--ouverts { flex: 1 1 100%; padding: 12px; background: var(--card); border-radius: 14px; }

  /* Les chiffres : une rangée de pastilles qui défile. */
  .mj-kpis { gap: 8px; margin: 10px -16px 2px; padding: 0 16px; scrollbar-width: none; }
  .mj-kpis::-webkit-scrollbar { display: none; }
  .mj-kpi { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 13px; box-shadow: none;
    border: 0; border-radius: 17px; background: var(--muted); }
  .mj-kpi span { order: -1; margin: 0; font-size: 14px; gap: 6px; color: var(--muted-foreground); }
  .mj-kpi b { display: inline; font-size: 14px; font-weight: 600; }
  .mj-kpi[aria-current] { background: color-mix(in srgb, var(--teinte) 22%, var(--muted)); }
  .mj-kpi[aria-current] span { color: var(--foreground); }
  .mj-kpi--tout[aria-current] { background: var(--primary); }
  .mj-kpi--tout[aria-current] span, .mj-kpi--tout[aria-current] b { color: var(--on-primary); }
  .mj-kpi--tout i { display: none; }

  /* La liste : un bloc arrondi, des intertitres hors du bloc. */
  .mj-liste.rc-j-carte { border: 0; background: none; }
  /* Chaque section est son propre bloc arrondi, comme une liste groupée. */
  .mj-liste .rc-j-sous-titre-liste + .mj-ligne { border-radius: 14px 14px 0 0; }
  .mj-liste .mj-ligne:has(+ .rc-j-sous-titre-liste), .mj-liste .mj-ligne:last-child { border-radius: 0 0 14px 14px; margin-bottom: 4px; }
  .mj-liste .rc-j-sous-titre-liste + .mj-ligne:has(+ .rc-j-sous-titre-liste),
  .mj-liste .rc-j-sous-titre-liste + .mj-ligne:last-child { border-radius: 14px; }
  .mj-liste .rc-j-sous-titre-liste { font-size: 13px; letter-spacing: .03em; padding: 14px 14px 6px; background: var(--background); }
  .mj-liste .rc-j-sous-titre-liste:first-child { padding-top: 0; }
  .mj-ligne.rc-j-rangee { grid-template-columns: 40px minmax(0, 1fr) auto; min-height: 64px; padding: 10px 14px;
    border-bottom: 0; background: var(--card); }
  .mj-ligne + .mj-ligne::after { content: ""; position: absolute; top: 0; right: 0; left: 66px; z-index: 3;
    border-top: .5px solid rgba(255,255,255,.1); }
  .mj-ligne .rc-j-rangee-titre { font-size: 15px; }
  .mj-ligne .rc-j-rangee-detail { font-size: 14px; }
  .mj-ligne .rc-j-canal { display: none; }
  .mj-ligne .rc-j-go { z-index: 4 !important; grid-area: auto; width: 44px; height: 44px; border-radius: 50%; }
  .mj-ligne .rc-j-rangee-geste { display: none; }
  .mj-ligne:has(.rc-j-go) .mj-gestes:not(:has(.mj-rep)) { display: none; }

  /* Le glissement : la ligne glisse d'un bloc, les gestes attendent dessous. */
  .mj-ligne[data-m-glisse] { overflow: hidden; }
  .mj-ligne[data-m-glisse]::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--card);
    transform: translateX(var(--m-g, 0)); }
  .mj-ligne[data-m-glisse] > :not(.mj-gestes):not(input):not(.rc-j-rangee-couvre) { position: relative; z-index: 2; transform: translateX(var(--m-g, 0)); }
  .mj-ligne[data-m-glisse] > .rc-j-rangee-couvre { z-index: 3; transform: translateX(var(--m-g, 0)); }
  .mj-ligne.rc-m-anime::before, .mj-ligne.rc-m-anime > * { transition: transform .22s cubic-bezier(.25, .8, .3, 1); }
  .mj-ligne[data-m-glisse] .mj-gestes { position: absolute; top: 0; right: 0; bottom: 0; width: 216px; z-index: 0; gap: 0;
    display: flex; align-items: stretch; }
  .mj-ligne[data-m-glisse].rc-m-glissee .mj-gestes, .mj-ligne[data-m-glisse] .mj-gestes:has(.mj-rep[open]) { z-index: 1; }
  .mj-ligne[data-m-glisse].rc-m-glissee::before { z-index: 0; }
  .mj-ligne[data-m-glisse] .mj-gestes > .mj-rep { flex: 1 1 0; display: flex; }
  .mj-ligne[data-m-glisse] .mj-gestes > .mj-rep > .mj-rep-bouton { width: 100%; height: auto; flex: 1; border: 0; border-radius: 0;
    flex-direction: column; gap: 4px; color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
  .mj-ligne[data-m-glisse] .mj-vite--fait > .mj-rep-bouton { background: #2f9e5b; }
  .mj-ligne[data-m-glisse] .mj-gestes > .mj-rep:not(.mj-vite) > .mj-rep-bouton { background: #d99a1e; color: #fff; }
  .mj-ligne[data-m-glisse] .mj-vite--annule > .mj-rep-bouton { background: #d64545; }
  .mj-ligne[data-m-glisse] .mj-vite--fait > .mj-rep-bouton::after { content: "Fait"; }
  .mj-ligne[data-m-glisse] .mj-gestes > .mj-rep:not(.mj-vite) > .mj-rep-bouton::after { content: "Reporter"; }
  .mj-ligne[data-m-glisse] .mj-vite--annule > .mj-rep-bouton::after { content: "Annuler"; }

  /* Le planning du jour, sous la liste : un bloc arrondi, sans cadre. */
  .mj-plan.rc-j-carte { border: 0; border-radius: 14px; max-height: 460px; }
}

/* ── L'agenda de la semaine : un jour à la fois (lot 2, 16 octobre 2026) ────
   Les sept jours en ronds, un seul jour dessous — le Calendrier de l'iPhone.
   `.rc-m-un-jour` n'est posée que par le script de `user_semaine.html` : sans
   lui, la semaine reste entière. */
@media (max-width: 900px) {
  .sem.rc-j-carte { height: auto; min-height: 0; background: none; border: 0; }
  .sem-tete { flex-wrap: wrap; padding: 0 0 10px; border: 0; gap: 8px; }
  .sem-tete h1 { order: 1; flex: 1 1 100%; margin: 0; font-size: 28px !important; }
  .sem-tete .ed-sem-astuce { display: none; }
  .sem-tete .mj-plan-fl { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--muted); color: var(--accent); }
  .sem-fermer { order: -2; flex: 1 1 auto; justify-content: flex-start; padding: 0; min-height: 36px; color: var(--accent);
    background: none !important; border: 0; font-size: 17px; }
  .sem-fermer svg { display: none; }
  .sem-fermer::before { content: "‹"; font-size: 26px; line-height: 1; margin-right: 2px; }
  .rc-m-un-jour .sem-jours { grid-template-columns: repeat(7, minmax(0, 1fr)); border: 0; padding: 0 0 10px; }
  .rc-m-un-jour .sem-jours > span:first-child, .rc-m-un-jour .sem-journee > span:first-child { display: none; }
  .rc-m-un-jour .sem-jour { border: 0; flex-direction: column; align-items: center; gap: 4px; padding: 0; min-height: 60px; background: none !important; }
  .rc-m-un-jour .sem-jour small { font-size: 11px; text-transform: uppercase; color: var(--muted-foreground); }
  .rc-m-un-jour .sem-jour b { width: 38px; height: 38px; min-width: 0; display: grid; place-items: center; border-radius: 50%;
    font-size: 19px; font-weight: 500; background: none; color: var(--foreground); }
  .rc-m-un-jour .sem-jour--auj b { color: var(--accent); font-weight: 700; background: none; }
  .rc-m-un-jour .sem-jour[aria-current] b { background: var(--primary); color: var(--on-primary); font-weight: 700; }
  .rc-m-un-jour .sem-journee { grid-template-columns: minmax(0, 1fr); }
  .rc-m-un-jour .sem-case:not(.rc-m-choisi), .rc-m-un-jour .sem-col:not(.rc-m-choisi) { display: none; }
  .rc-m-un-jour .sem-grille { grid-template-columns: 44px minmax(0, 1fr); }
  .rc-m-un-jour .sem-corps { background: var(--card); border: 0; border-radius: 14px; max-height: calc(100dvh - 300px); }
  .rc-m-un-jour .sem-col { border-left: 0; }
  .rc-m-un-jour .sem-col .mj-plan-bloc b { font-size: 14px; }
}

/* ── Le retour « ‹ Campagnes » monte dans la barre du haut (lot 3) ──────────
   Comme le bouton retour d'iOS : en haut à gauche, en violet, et il y reste
   pendant qu'on fait défiler. Le fil est FIXE, posé sur la barre (qui est
   collante) ; l'en-tête qui le portait ne garde que ses gestes. */
@media (max-width: 900px) {
  .rc-entete .rc-fil { position: fixed; top: 0; left: 0; z-index: 81; height: 52px; padding-left: 8px;
    max-width: calc(100vw - 150px); display: flex; align-items: center; }
  .rc-fil > a:last-of-type { color: var(--accent) !important; font-size: 17px; min-height: 44px; }
  .rc-fil > a:last-of-type::before { font-size: 34px; font-weight: 300; margin-top: -3px; }
  .rc-entete:not(:has(.rc-entete-gestes)) { margin: 0; padding: 0; min-height: 0; height: 0; }
  .rc-entete:has(.rc-fil) { margin-top: -6px; }
  .rc-entete-gestes .btn, .rc-entete-gestes a { border-radius: 50%; }
}

/* ── Mes campagnes : un bilan en une carte, des campagnes qu'on touche ───── */
@media (max-width: 900px) {
  .rc-cp-tete { align-items: flex-start; gap: 6px; }
  .rc-cp-tete .btn.btn-primary { width: auto; min-height: 36px; padding: 0; background: none; border: 0; box-shadow: none;
    color: var(--accent); font-size: 17px; }
  .rc-cp-chiffres { gap: 0; margin: 14px 0 20px; background: var(--card); border-radius: 14px; }
  .rc-cp-chiffre { background: none; border: 0; border-radius: 0; padding: 12px 14px; }
  .rc-cp-chiffre + .rc-cp-chiffre { border-left: .5px solid rgba(255,255,255,.1); }
  .rc-cp-chiffre small { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rc-cp-chiffre strong { font-size: 24px; }
  .rc-cp-section { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .03em;
    color: var(--muted-foreground); margin: 0 0 6px 14px; }
  .rc-cp-liste { gap: 12px; }
  .rc-cp { position: relative; border: 0; border-radius: 14px; padding: 14px 16px; gap: 10px; }
  /* La carte entière ouvre la campagne : le nom s'étend dessous. */
  .rc-cp-nom { font-size: 18px; }
  .rc-cp-nom::after { content: ""; position: absolute; inset: 0; z-index: 1; }
  .rc-cp-agir { flex-direction: row; align-items: center; justify-content: space-between; min-width: 0; }
  .rc-cp-agir a.btn { display: none; }
  .rc-cp-agir form { position: relative; z-index: 2; }
}

/* ── Contacts : une liste groupée par lettre, la sélection à l'appui long ── */
@media (max-width: 900px) {
  .rc-vues-contacts .rc-vue { min-height: 34px; padding: 0 13px; border-radius: 17px; background: var(--muted); border: 0; font-size: 14px; }
  .rc-vues-contacts .rc-vue[aria-current] { background: var(--primary); color: var(--on-primary); }
  .rc-vues-contacts .rc-vue[aria-current] .rc-vue-n { background: rgba(10,11,16,.18); color: var(--on-primary); }
  .rc-outillage .rc-cherche { min-height: 38px; border-radius: 11px; border: 0; background: var(--muted); }
  .rc-m-puce { min-height: 34px !important; border: 0; background: var(--muted); }
  .rc-repertoire-liste > .rc-sous-titre { display: none; }
  /* Les cases ne paraissent qu'en sélection (un appui long en ouvre une). */
  body:not(.rc-masse-active) .rc-repertoire-liste .rc-masse-case { display: none; }
  .rc-repertoire-liste .rc-groupe { margin-bottom: 18px; }
  .rc-repertoire-liste .rc-groupe-titre { font-size: 13px; font-weight: 600; color: var(--muted-foreground); margin: 0 0 6px 14px; }
  .rc-repertoire-liste .rc-actions { background: var(--card); border-radius: 14px; overflow: hidden; }
  .rc-repertoire-liste .rc-action { position: relative; border-bottom: 0; padding: 9px 14px; min-height: 60px; }
  .rc-repertoire-liste .rc-action + .rc-action::before { content: ""; position: absolute; top: 0; right: 0; left: 66px;
    border-top: .5px solid rgba(255,255,255,.1); }
  .rc-repertoire-liste .rc-action-titre { font-size: 17px; font-weight: 500; }
  .rc-repertoire-liste .rc-action-detail { font-size: 14px; }
}

/* ── Une campagne : des étapes en pastilles, des personnes en liste groupée ─
   `suivi.css` est chargée APRÈS cette feuille : d'où le `html` en tête. */
@media (max-width: 900px) {
  html .sv-tete { align-items: flex-start; }
  html .sv-tete [data-ouvre="sv-reglages"] { order: -1; margin-left: auto; position: fixed; top: 4px; right: 166px; z-index: 81;
    width: 38px; height: 38px; padding: 0; border-radius: 50%; background: var(--muted); border: 0; font-size: 0; justify-content: center; color: var(--accent); }
  html .sv-tete [data-ouvre="sv-reglages"] svg { width: 18px; height: 18px; }
  html .sv-titre { font-size: 30px !important; }
  html .sv-pipe { gap: 8px; }
  html .sv-etape, html .sv-etape--tous { display: inline-flex !important; min-width: 0; min-height: 34px; padding: 0 13px; border-radius: 17px; border: 0;
    background: var(--muted); flex-direction: row; align-items: center; gap: 6px; box-shadow: none; }
  html .sv-etape--on { background: var(--primary); color: var(--on-primary); }
  html .sv-etape--on * { color: var(--on-primary) !important; }
  html .sv-ajout-champ, html .sv-cherche label { min-height: 38px; border-radius: 11px; border: 0; background: var(--muted); }
  html .sv-liste { background: none; border: 0; }
  html .sv-groupe { background: var(--card); border-radius: 14px; overflow: hidden; margin-bottom: 14px; border: 0; }
  html .sv-groupe > summary { background: var(--background); padding: 0 14px 6px; font-size: 13px; }
  body:not(.rc-masse-active) .sv-case { display: none; }
  html .sv-ligne { grid-template-columns: 1fr auto; grid-template-areas: "qui etape" "action action"; padding: 10px 14px;
    border: 0; position: relative; }
  body.rc-masse-active .sv-ligne { grid-template-columns: 22px 1fr auto; grid-template-areas: "case qui etape" ". action action"; }
  html .sv-ligne + .sv-ligne::before { content: ""; position: absolute; top: 0; right: 0; left: 62px; border-top: .5px solid rgba(255,255,255,.1); }
  html .sv-qui b { font-size: 17px; }
  html .sv-pil { border: 0; font-size: 12.5px; }
}

/* ── La fiche d'une personne : les gestes en tuiles d'iOS ───────────────── */
@media (max-width: 900px) {
  .rc-m-action { border: 0; border-radius: 12px; padding: 11px 0 9px; color: var(--foreground); }
  .rc-m-vues { border: 0; background: var(--muted); border-radius: 10px; padding: 2px; }
  .rc-m-vues button { min-height: 34px !important; border-radius: 8px; }
  .rc-m-vues button[aria-selected="true"] { background: #2b2f3d; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
  .rc-fiche-nom { font-size: 26px; }
}
@media (max-width: 900px) {
  html .sv-etape small, html .sv-etape b { display: inline; margin: 0; font-size: 14px; color: inherit; white-space: nowrap; }
  html .sv-etape b { font-weight: 700; }
  html .sv-etape::after { display: none; }
  html .sv-etape--on { box-shadow: none; }
  /* Les flèches d'une fiche (personne d'avant, d'après) : de part et d'autre de
     la photo. Dans la barre du haut, elles couvraient la loupe (27 octobre 2026). */
  .rc-entete .rc-fiche-nav { position: absolute; top: calc(var(--haut, 52px) + 30px); left: 12px; right: 12px; z-index: 5;
    display: flex; justify-content: space-between; pointer-events: none; }
  .rc-entete .rc-fiche-nav .rc-fleche { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; border: 0;
    background: var(--muted); color: var(--accent); font-size: 22px; display: grid; place-items: center; }
  .rc-entete .rc-fiche-nav .rc-fleche[aria-disabled] { visibility: hidden; }
  .rc-entete:has(.rc-fiche-nav) .rc-fil { max-width: calc(100vw - 230px); }
  .rc-entete:has(.rc-fiche-nav) { height: 0; margin: 0; padding: 0; min-height: 0; }
  .rc-repertoire-liste .rc-groupe { margin-bottom: 14px; }
}

/* ── Les fenêtres : des feuilles qui montent du bas (lot 4, 16 octobre 2026) ─
   Une fenêtre (nouveau contact, nouvelle campagne…) devient la feuille d'iOS :
   collée en bas, coins arrondis en haut, une poignée, le fond assombri.
   Les volets (une activité, écrire à quelqu'un, un mail) prennent tout l'écran
   sauf une bande en haut, comme une feuille plein écran d'iPhone. */
@keyframes rc-m-monte { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
@media (max-width: 900px) {
  dialog.rc-fenetre:not(.rc-echange--panneau):not(.rc-volet)[open] { position: fixed; inset: auto 0 0 0; margin: 0;
    width: 100vw; max-width: 100vw; max-height: 92dvh; border: 0; border-radius: 16px 16px 0 0;
    padding: 26px 16px calc(16px + env(safe-area-inset-bottom)); background: #171923;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, .6); animation: rc-m-monte .28s cubic-bezier(.2, .8, .3, 1); }
  dialog.rc-fenetre:not(.rc-echange--panneau):not(.rc-volet)[open]::after { content: ""; position: absolute; top: 8px; left: 50%;
    width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: rgba(255,255,255,.25); }
  dialog.rc-fenetre::backdrop { background: rgba(0, 0, 0, .55); }
  dialog.rc-fenetre .rc-gestes--fin { position: sticky; bottom: -16px; margin: 18px -16px -16px !important; padding: 12px 16px 16px;
    background: #171923; border-top: .5px solid rgba(255,255,255,.1); }
  dialog.rc-fenetre .rc-gestes--fin .btn { flex: 1; min-height: 48px; border-radius: 12px; }
  dialog.rc-fenetre .rc-saisie { border-radius: 10px; }

  /* Les volets plein écran : une bande de la page reste visible au-dessus. */
  /* Seul le volet principal : l'échange et le mail s'ouvrent SOUS ses onglets. */
  dialog.rc-volet[open] { inset: 10px 0 0 0 !important; height: auto;
    border-radius: 14px 14px 0 0; overflow: hidden;
    /* ⚠️ Le voile est une OMBRE, pas un `filter` sur la page : un filtre sur un
       ancêtre fait de lui le cadre des éléments fixes, et le volet s'y enfermait. */
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55);
    animation: rc-m-monte .28s cubic-bezier(.2, .8, .3, 1); }
  .rc-v-barre { height: 52px; padding: 0 8px 0 14px; }
  .rc-v-barre > b, #rc-v-titre { font-size: 17px; }
  .rc-v-x { width: 38px; height: 38px; border-radius: 50%; background: var(--muted); color: var(--accent); display: grid; place-items: center; }

  /* ── Mails : des pastilles sans cadre, « Écrire » en rond flottant ────── */
  html .bm-dos { border: 0 !important; background: var(--muted); }
  html .bm-dos.on { background: var(--primary); color: var(--on-primary); }
  html .bm-ecrire { position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 41;
    width: 56px; height: 56px !important; padding: 0 !important; border-radius: 50%; font-size: 0; justify-content: center;
    box-shadow: 0 10px 28px rgba(139, 127, 224, .45); }
  html .bm-ecrire svg { width: 22px; height: 22px; }
  html .bm-app--lit .bm-ecrire { display: none; }
  html .bm-cherche { border: 0; background: var(--muted); border-radius: 11px; }
  html .bm-puce { height: 32px; border: 0; background: var(--muted); padding: 0 13px; font-size: 14px; }
  html .bm-puce.on { background: var(--primary); color: var(--on-primary); }
}
@media (max-width: 900px) {
  /* `mails.css` et `.btn` reprenaient la main : la classe doublée passe devant. */
  html .bm-ecrire.bm-ecrire { width: 56px !important; font-size: 0 !important; border-radius: 50% !important; border: 0;
    background: var(--primary) !important; color: var(--on-primary) !important; }
}

/* ── Les autres pages : le même vocabulaire (lot 5, 16 octobre 2026) ──────── */
@media (max-width: 900px) {
  /* « ‹ Plus » dans la barre du haut, comme le fil des autres écrans. */
  /* ⚠️ Au-dessus de la barre du haut (z-index 80 depuis le 23 octobre, `activites.css`) :
     à 51, le retour passait dessous et ne se lisait plus (27 octobre 2026). */
  .rc-m-retour { position: fixed; top: 0; left: 8px; z-index: 81; height: 52px; display: flex; align-items: center; gap: 4px;
    color: var(--accent); font-size: 17px; text-decoration: none; }
  .rc-m-retour::before { content: "‹"; font-size: 34px; font-weight: 300; line-height: 1; margin-top: -3px; }
  /* Des boutons aux coins d'iOS, des cartes sans cadre. */
  .rc-content .btn { border-radius: 12px; }
  .rc-content .rc-j-carte, .rc-content .rc-cp-chiffre { border-color: transparent; border-radius: 14px; }
  /* Les deux temps de « Mes activités » : un contrôle segmenté. */
  .ma-temps { display: flex; width: 100%; white-space: nowrap; background: var(--muted); border-radius: 10px; padding: 2px; margin-top: 6px; }
  .ma-temps a { flex: 1; text-align: center; padding: 7px 4px; border-radius: 8px; font-size: 14px; color: var(--muted-foreground);
    text-decoration: none; background: none; border: 0; }
  .ma-temps a.on { background: #2b2f3d; color: var(--foreground); box-shadow: 0 2px 6px rgba(0,0,0,.35); }
  .mdl-nouveau { min-height: 36px; padding: 0 !important; background: none !important; border: 0 !important; color: var(--accent) !important;
    font-size: 17px !important; box-shadow: none !important; }
}

/* ── 44 points sous le doigt, la silhouette d'iOS à l'œil ───────────────────
   La règle d'`audit-ui.py` (et d'Apple) : toute cible fait 44 points. Les
   pastilles et les ronds d'iOS paraissent plus petits : une BORDURE
   TRANSPARENTE agrandit la cible sans grossir ce qu'on voit
   (`background-clip: padding-box`). */
@media (max-width: 900px) {
  .mj-kpi, .mj-sessions .rc-vue, .mj-session-pop > summary, .mj-filtres-tel, .rc-vues-contacts .rc-vue, html .sv-etape,
  html .sv-etape--tous, html .bm-puce, html .bm-dos, .rc-m-puce {
    min-height: 44px !important; border: 5px solid transparent !important; border-left-width: 0 !important;
    border-right-width: 0 !important; background-clip: padding-box !important; }
  .rc-haut-btn, .rc-haut .rc-eclair.rc-eclair, html .rc-haut .rc-haut-chercher, .rc-v-x, .sem-tete .mj-plan-fl,
  .rc-entete .rc-fiche-nav .rc-fleche, html .sv-tete [data-ouvre="sv-reglages"] {
    width: 44px !important; height: 44px !important; border: 3px solid transparent !important; background-clip: padding-box !important; }
  .rc-haut-droite { gap: 4px; }
  .rc-haut-in { gap: 4px; }
  .rc-cp-tete .btn.btn-primary, .mdl-nouveau { min-height: 44px !important; }
  .rc-cp-agir .btn { min-height: 44px; }
}

/* ── Relecture du téléphone (27 octobre 2026) ───────────────────────────────
   Ce que `audit-ui.py` relevait encore aux largeurs de poche.
   · Les champs à 16 px : en dessous, l'iPhone zoome au toucher et l'écran
     saute au moment où l'on tape.
   · Les boutons à 44 points ; les pastilles grandissent par une bordure
     transparente, qui agrandit la cible sans grossir ce qu'on voit. */
@media (max-width: 900px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
  select, textarea { font-size: 16px !important; }
  .rc-content .btn, dialog .btn, .rc-fp-onglets button, .rc-m-vues button, [role="tab"] { min-height: 44px; }
  .mj-mails-trier, .mj-plan-semaine { display: inline-flex; align-items: center; min-height: 44px; }
  .rc-content details > summary:not([class]) { display: flex; align-items: center; min-height: 44px; }
  .mj-plan-fl { width: 44px !important; height: 44px !important; border: 8px solid transparent !important; background-clip: padding-box !important; }
  .rc-ot-o, .rc-fiche-vie [data-filtre], .rc-fiche-vie .rc-filtre {
    min-height: 44px; border-top: 7px solid transparent !important; border-bottom: 7px solid transparent !important;
    background-clip: padding-box !important; }
  .rc-rl-bande-o { min-height: 44px; }
}
@media (max-width: 900px) {
  /* La recherche d'une campagne prend la rangée : l'espace d'ordinateur lui en
     volait la moitié (« Chercher dar… »). */
  .sv-barre .sv-espace { display: none; }
  /* Le crayon flotte au-dessus de la liste : le dernier mail remonte au-dessus de lui. */
  html .bm-liste, html [data-bm-liste] { padding-bottom: 88px; }
}
@media (max-width: 900px) {
  /* Le chrono d'une tâche sans personne (« Démarrer », le cadran qui tourne)
     restait caché avec les autres gestes : c'est le seul geste de la ligne. */
  html .mj-ligne .rc-j-rangee-geste.rc-pj-chrono-mj { display: inline-flex; align-items: center; gap: 5px; min-height: 36px;
    padding: 0 12px; border-radius: 18px; font-size: 13px; position: relative; z-index: 4;
    border: 4px solid transparent; background-clip: padding-box; box-sizing: content-box; }
  html .mj-ligne .mj-gestes:has(.rc-pj-chrono-mj) { display: flex !important; }
  html .mj-ligne .mj-gestes:has(.rc-pj-chrono-mj) > :not(.rc-pj-chrono-f) { display: none !important; }
  /* « Prévoir une relance » d’une campagne : la cible grandit sous le pointillé, sans le déformer. */
  .sv-prevoir { position: relative; }
  .sv-prevoir::after { content: ""; position: absolute; inset: -9px -4px; }
}
@media (max-width: 900px) {
  html .sv-cherche label, html .sv-bascule a, .sv-reg-ajouter { min-height: 44px; }
  .sv-reg-retirer { min-width: 44px; min-height: 44px; }
}
