/* Verso au téléphone (Corentin, 24/09/2026 : « une version mobile de Verso,
   bien optimisée quand on y va avec le téléphone »).

   Chargé après les styles du portail, ce fichier ne touche que les petits
   écrans et les écrans tactiles. Deux paliers :
   - jusqu'à 720 px, le téléphone : la maquette N du 06/11/2026 (bloc en fin
     de fichier). Plus de colonne ni de page rétrécie ; une barre d'onglets en
     bas, Aurore au milieu en or, un panneau « Plus » pour le reste, le texte à
     sa taille, les gestes sous le pouce. Corentin : « verso sur téléphone c'est
     vraiment naze, c'est pas du tout optimisé […] juste recopier le codage sur
     ordinateur » ;
   - de 721 à 880 px, la tablette : le rail d'icônes du 06/10/2026 (maquette C,
     écran 3) et les pages rendues 22 % plus petites. */

@media (max-width: 880px) {
  /* Rien ne déborde de l'écran : dans une grille, un bloc trop large (un
     tableau, une rangée d'onglets) rétrécit, et c'est son contenu qui défile. */
  .crm-grille > *, .nc-bureau > *, .nl-editeur { min-width: 0; }
  .hist-bar > .seg { min-width: 0; max-width: 100%; }

  /* Calendrier : la vue jour tient dans l'écran ; la semaine et le mois
     gardent leur largeur et défilent. */
  .cal-grid.jour { min-width: 0; }

  /* Un incident : pas de carte dans le rail ni au téléphone (la colonne n'y a pas la place) ;
     le message de l'arrivée suffit, et la pastille reste dans « Plus ». */
  #appView .etat-carte { display: none; }
}

@media (max-width: 880px) and (min-width: 721px) {
  /* Le rail (Corentin, 06/10/2026 : « la C pour le téléphone », le rail à
     gauche) : la colonne reste affichée, 66 px, une icône et un nom court par
     entrée ; mêmes familles qu'à l'ordinateur. Il remplace le tiroir et la barre
     du bas. Il défile seul s'il ne tient pas. Depuis le 06/11/2026, il ne
     concerne plus que la tablette : le téléphone a sa barre du bas. */
  #appView.app.show { display: grid; grid-template-columns: 66px minmax(0, 1fr); }
  #appView .sidebar {
    position: sticky; top: 0; inset: auto; width: 66px; height: 100vh; height: 100dvh; z-index: 20;
    display: flex; flex-direction: column; gap: 0; padding: 10px 5px calc(8px + env(safe-area-inset-bottom));
    overflow-x: hidden; overflow-y: auto; scrollbar-width: none; transform: none; visibility: visible; transition: none;
    -webkit-mask-image: none; mask-image: none; border-right: 0;
  }
  #appView .sidebar::-webkit-scrollbar { display: none; }
  #appView .sidebar .brand, #appView .sidebar .nav-label, #appView .sidebar .nav-sep { display: none; }
  #appView .sidebar .nav { flex: 1 0 auto; flex-direction: column; gap: 2px; }
  /* Menu B (17/11/2026) : Abonnement, Réglages et « Plus » sont dans un second bloc (#navBas). Sur le rail,
     il prend la place libre : Réglages reste sous les autres entrées, « Offre » et « Plus » en bas, comme avant. */
  #appView .sidebar .nav:not(.nav-bas) { flex: 0 0 auto; }
  #appView .sidebar .nav.nav-bas { flex: 1 0 auto; margin-top: 2px; }
  #appView .sidebar .nav-item {
    position: relative; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    width: 100%; min-height: 0; margin: 0; padding: 8px 1px 7px; border: 0; border-radius: 10px; box-shadow: none;
    background: none; color: #d9d1c3; font-size: 0; line-height: 1; white-space: nowrap; text-align: center;
  }
  #appView .sidebar .nav-item .icon { width: 18px; height: 18px; opacity: 1; flex: none; }
  /* Le nom long reste le nom accessible ; le nom court s'affiche seul (« / "" » : rien à lire en plus). */
  #appView .sidebar .nav-item::after, #appView .sidebar .nav-item .fam-nom {
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 9.5px; font-weight: 600; line-height: 1.2;
  }
  #appView .sidebar .nav-item.active { background: var(--cream, #fffcf6); color: var(--ink, #20252b); }
  #appView .sidebar .nav-item.active::after, #appView .sidebar .nav-item.active .fam-nom { font-weight: 750; }
  #appView .sidebar .nav-item[data-view="overview"]::after { content: "Accueil"; content: "Accueil" / ""; }
  #appView .sidebar .nav-item[data-view="approvals"]::after { content: "À valider"; content: "À valider" / ""; }
  #appView .sidebar .nav-item[data-view="agents"]::after { content: "Agents"; content: "Agents" / ""; }
  #appView .sidebar .nav-item[data-view="connecteurs"]::after { content: "Connecteurs"; content: "Connecteurs" / ""; }
  /* Rangement B (15/11/2026) : Clients, Messages, Agenda, Simulateurs, Questions, Veille, Newsletter et
     Mémoire tiennent sous leur nom de famille ; Aurore est dans la barre du haut, réduite à son portrait. */
  #appView .haut-aurore { width: auto; padding: 3px 7px; cursor: pointer; }
  #appView .haut-aurore input, #appView .haut-aurore-envoyer { display: none; }
  #appView .sidebar #navReseaux .fam-nom { display: none; }
  #appView .sidebar #navReseaux::after { content: "Réseaux"; content: "Réseaux" / ""; }
  #appView .sidebar .nav-badge {
    position: absolute; top: 2px; right: 7px; margin: 0; min-width: 16px; padding: 0 4px; border-radius: 999px;
    background: var(--gold, #e5b95b); color: var(--ink, #20252b); font-size: 9px; font-weight: 800; line-height: 15px;
  }
  /* Vénus au travail (15/11/2026) : sur le rail, la pastille garde le petit stylo, sans le temps. */
  #appView .sidebar .nav-travail { position: absolute; top: 1px; right: 5px; margin: 0; padding: 1px; border-radius: 999px; }
  #appView .sidebar .nav-travail b { display: none; }
  #appView .sidebar .nav-travail svg { width: 13px; height: 13px; }
  /* En bas : « Offre » (l'abonnement, en doré) puis « Plus ». */
  #appView .sidebar .nav-item.nav-plan { order: 98; margin: auto 0 0; padding: 8px 1px 7px; gap: 4px; border: 0; border-radius: 10px; background: none; color: var(--gold, #e5b95b); }
  #appView .sidebar .nav-item.nav-plan[data-ton="alerte"] { color: #e0685c; }
  #appView .sidebar .nav-item.nav-plan.active { background: var(--cream, #fffcf6); color: var(--ink, #20252b); }
  #appView .sidebar .nav-plan .plan-txt { display: none; }
  #appView .sidebar .nav-plan .plan-ic { width: auto; height: auto; border: 0; background: none; color: inherit; }
  #appView .sidebar .nav-plan::after { content: "Offre"; content: "Offre" / ""; }
  #appView .sidebar .nav-item.rail-plus { display: flex; order: 99; }
  #appView .sidebar .rail-plus::after { content: "Plus"; content: "Plus" / ""; }
  #appView .sidebar .rail-plus[aria-expanded="true"] { background: rgba(255, 250, 240, .1); }
  /* « Plus » : le pied de colonne en petit panneau, à droite du rail. */
  #appView .sidebar .side-foot {
    display: none; position: fixed; left: 72px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60;
    width: min(250px, calc(100vw - 84px)); margin: 0; padding: 14px 14px 12px; gap: 12px; border: 0; border-radius: 12px;
    background: var(--ink, #20252b); box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  }
  body.rail-plus-ouvert #appView .sidebar .side-foot { display: grid; }
  #appView .sidebar .pied-etat { padding: 0; }
  #appView .sidebar .pied-liens { flex-wrap: wrap; gap: 8px; padding: 0; font-size: 12.5px; }
  #appView .sidebar #logoutBtn.pied-sortie {
    position: static; display: inline-flex; gap: 7px; width: auto; height: auto; margin-left: auto; padding: 7px 10px;
    border: 1px solid rgba(255, 250, 240, .18); border-radius: 9px; font-size: 12.5px;
  }
  #appView .sidebar .pied-sortie-txt { display: inline; }

  /* Les pages 22 % plus petites (Corentin, 06/10/2026, maquette de taille,
     écran 3) : le contenu (barre du haut et pages, pas le rail) est rendu à
     78 %, champs compris, pour voir plus de choses à la fois. Sur iPhone,
     le script en tête du portail empêche le zoom au toucher d'un champ. */
  #appView .main > * { zoom: .78; }
  /* Et un bouton principal garde au moins 32 px réels sous le doigt : les
     boutons, les onglets de famille, la recherche, la cloche et le compte. */
  #appView .main .btn:not(.sm),
  #appView .main .rs-onglets button { min-height: calc(32px / .78); }
  #appView .topbar :is(.workspace-search, .notif-btn, .user-chip) { min-width: calc(32px / .78); min-height: calc(32px / .78); justify-content: center; }
  /* Les notifications passent à la même échelle, à droite du rail. */
  .toasts { zoom: .78; left: calc(74px / .78); right: calc(8px / .78); width: auto; }
}

/* Densité au téléphone (Corentin, 24/09 : « il faut pas que les éléments
   soient trop gros sinon il n'y a pas assez d'information »). La taille du
   texte ne bouge pas : on reprend la place perdue dans l'habillage (en-tête,
   marges de page, marge intérieure des cartes, titres d'accueil). */
@media (max-width: 600px) {
  #appView .topbar { min-height: 52px; padding: 6px 10px; }
  #appView .content { padding-top: 12px; padding-left: 10px; padding-right: 10px; }
  /* Cartes : 12 px au lieu de 17 à 20. Celles déjà compactes (barres
     d'outils, bandeaux, cartes d'agents ou de connecteurs) ou volontairement
     sans marge (la page du calendrier) gardent la leur. */
  #appView .view .card:not(.cal-page):not(.crm-salut):not(.crm-toolbar):not(.nl-toolbar):not(.sim-toolbar):not(.ir-bandeau):not(.cnx-card):not(.nl-fiche):not(.nl-replie):not(.agent-card):not(.ov-agenda) { padding: 13px 12px; }
  #appView [data-view-panel="overview"] .fc-stat { padding: 11px 12px; }
  #appView .acc-action { padding: 9px 12px; }
}

/* Page Agents au téléphone : trois vignettes par ligne (Corentin, 24/09 :
   « les agents sont trop gros […] 3 par ligne »). La vignette garde le
   personnage, le nom, la fonction, le prix et « Lancer » ; la description et
   la catégorie restent sur la fiche, qui s'ouvre en touchant la carte. */
@media (max-width: 600px) {
  #appView [data-view-panel="agents"] .grid-3:has(> .agent-card) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  #appView [data-view-panel="agents"] .agent-card { padding: 8px 5px 7px; align-items: center; text-align: center; border-radius: 10px; }
  #appView [data-view-panel="agents"] .agent-card:hover { transform: none; }
  #appView [data-view-panel="agents"] .agent-entete, #appView [data-view-panel="agents"] .agent-card > p.muted { display: none; }
  #appView [data-view-panel="agents"] .agent-epingle { top: 1px; right: 1px; width: 26px; height: 26px; }
  #appView [data-view-panel="agents"] .agent-epingle svg { width: 13px; height: 13px; }
  #appView [data-view-panel="agents"] .agent-portrait { width: 36px; height: 42px; margin: 2px 0 4px; }
  #appView [data-view-panel="agents"] .agent-card h3 { font-size: 13px; margin-bottom: 1px; }
  #appView [data-view-panel="agents"] .agent-fonction { font-size: 8.5px; letter-spacing: .06em; line-height: 1.25; min-height: 2.5em; margin-bottom: 5px; overflow-wrap: anywhere; }
  #appView [data-view-panel="agents"] .agent-fonction::after { display: none; }
  /* Prix poussé en bas : les « Lancer » d’une même ligne restent alignés. */
  #appView [data-view-panel="agents"] .agent-prix { display: block; margin: auto 0 0; padding: 2px 5px; font-size: 9px; line-height: 1.3; }
  #appView [data-view-panel="agents"] .agent-prix b { font-size: 10px; }
  #appView [data-view-panel="agents"] .agent-card .actions { width: 100%; padding-top: 6px; }
  #appView [data-view-panel="agents"] .agent-card .actions .btn { width: 100%; min-width: 0; min-height: 30px; padding: 4px 6px; font-size: 11px; }
  #appView [data-view-panel="agents"] .agent-card > div.muted { font-size: 10px; padding-top: 4px; }
}

@media (max-width: 600px) {
  /* Fiches du CRM : au téléphone, la fiche seule (nom, société, email) plutôt
     qu'un tableau tronqué à droite ; le reste est sur la fiche. */
  /* Au téléphone : la case à cocher et la fiche. */
  .rep-table th:nth-child(n+3), .rep-table td:nth-child(n+3) { display: none; }
  .rep-selection { left: 8px; right: 8px; bottom: calc(12px + env(safe-area-inset-bottom)); transform: none; width: auto; max-width: none; max-height: 45vh; overflow: auto; }
  #crmTri { min-width: 0; max-width: 100%; }
  .rep-selection select.input { max-width: none; flex: 1 1 140px; }
  .rep-table .fiche .nom, .rep-table .fiche .sous { max-width: none; }
}

/* Écrans tactiles : des cibles à la taille d'un doigt. 34 px et non 40 :
   Corentin (24/09) veut de la densité, « sinon il n'y a pas assez
   d'information » ; l'espacement entre pastilles complète la cible. Les liens dans le texte gardent leur place : leur
   zone de toucher déborde autour d'eux, sans rien déplacer. */
@media (pointer: coarse) {
  /* Préfixés par #appView comme la couche de style du portail, sans quoi ses
     hauteurs compactes l'emporteraient. */
  #appView [data-view-panel] .seg > button, #appView .crm-puce, #appView .sim-exemple, #appView .sim-puce,
  #appView .vr-onglets button, #appView .vj-rubriques button, #appView .fc-chip { min-height: 34px; height: auto; }
  #appView .coche { width: 26px; height: 26px; }
  #appView .coche.petite { width: 24px; height: 24px; }
  #appView [data-view-panel] input[type="checkbox"], #appView [data-view-panel] input[type="radio"] { width: 22px; height: 22px; }
  #appView .agent-nom, #appView .sim-lien, #appView [data-view-panel] button:not([class]) { position: relative; }
  #appView .agent-nom::after, #appView .sim-lien::after, #appView [data-view-panel] button:not([class])::after {
    content: ""; position: absolute; inset: -9px -6px;
  }
}

/* Sans clavier ni souris, les raccourcis clavier n'ont rien à faire à l'écran. */
@media (hover: none) and (pointer: coarse) {
  kbd, .nl-aide-liste { display: none; }
  .rep-pied > span:first-child:not(:has(button)) { display: none; }
}

/* ---------- finitions au téléphone (nuit du 24/09/2026) ----------
   Relevé au harnais de rendu en 400 px, vue par vue. */
@media (max-width: 600px) {
  /* Barres d'outils du CRM : la recherche prend la ligne, les segments se
     partagent la largeur, les listes déroulantes s'étirent. */
  #appView [data-view-panel="crm"] .crm-toolbar.card .crm-recherche { flex: 1 1 100%; max-width: none; min-width: 0; }
  #appView [data-view-panel="crm"] .crm-toolbar.card > .seg { flex: 1 1 auto; display: flex; }
  #appView [data-view-panel="crm"] .crm-toolbar.card > .seg > button { flex: 1 1 auto; justify-content: center; }
  #appView [data-view-panel="crm"] .crm-toolbar.card > select.input { flex: 1 1 140px; width: auto; }

  /* Historique : les cinq statuts sur une ligne, sans « Échecs » orphelin. */
  #appView .hist-bar .seg { display: grid; grid-template-columns: repeat(5, auto); flex: 1 1 100%; }
  #appView .hist-bar .seg > button { padding: 0 4px; letter-spacing: .03em; justify-content: center; }
  #appView .hist-suite { flex-wrap: wrap; gap: 8px; }

  /* Brouillon ouvert : l'envoi prend la ligne, les autres gestes se rangent
     deux par deux, à la même taille. */
  #appView .br-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #appView .br-actions > .btn { width: 100%; justify-content: center; min-width: 0; }
  #appView .br-actions > .btn.primary { grid-column: 1 / -1; }
  #appView .br-actions > :not(.btn) { grid-column: 1 / -1; }

  /* Rapports du CRM : les tableaux tiennent dans l'écran. */
  #appView .rap-table { font-size: 12px; }
  #appView .rap-table th { font-size: 9.5px; letter-spacing: .05em; white-space: normal; }
  #appView .rap-table th, #appView .rap-table td { padding-left: 4px; padding-right: 4px; }
  #appView .rap-table .qui { white-space: nowrap; }
  /* L'avatar et l'icône passaient au-dessus du nom et élargissaient le tableau
     au-delà de l'écran : au téléphone, le nom seul. */
  #appView .rap-table .qui :is(.cl-avatar, .act-ico) { display: none; }
}
@media (max-width: 600px) {
  /* Vue d'ensemble : les semaines du graphique se lisent en entier. */
  #appView .semaine .lbl { font-family: var(--font, system-ui, sans-serif); font-size: 9px; letter-spacing: 0; text-overflow: clip; }
  /* Agents : le prix occupe la largeur de la vignette, centré, comme « Lancer ». */
  #appView [data-view-panel="agents"] .agent-prix { width: 100%; text-align: center; border-radius: 8px; }
  #appView [data-view-panel="visios"] .fichier { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  #appView [data-view-panel="visios"] .fichier-nom { font-size: 12.5px; }
}

/* Doigt : les petits boutons et les boutons-icônes passent de 32 à 34 px,
   comme les segments (la densité voulue par Corentin reste). */
@media (pointer: coarse) and (max-width: 880px) {
  #appView .view .btn.sm, #appView .view .icon-btn { min-height: 34px; }
  #appView .view .icon-btn { min-width: 34px; }
  /* Le bas de page passe au-dessus de la bulle de l'assistant, pas dessous. */
  #appView.app.show .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* Demandes au téléphone : les étapes s'empilent, chacune à la hauteur de ses
   cartes. Côte à côte, cinq colonnes de 62 % d'écran laissaient de grands
   vides et cachaient les étapes suivantes. Le glisser-déposer ne marche pas
   au doigt : on change d'étape en ouvrant la carte. */
@media (max-width: 600px) {
  #appView [data-view-panel="crm"] .kb-defilement { overflow-x: visible; margin: 0; padding: 0; }
  #appView [data-view-panel="crm"] .kb { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 10px; }
  #appView [data-view-panel="crm"] .kb-col { min-height: 0; grid-template-rows: auto auto auto; }
  #appView [data-view-panel="crm"] .kb-cartes { min-height: 0; }
  #appView [data-view-panel="crm"] .kb-vide { display: none; }
  #appView [data-view-panel="crm"] .kb-col .kb-ajout { margin-top: 6px; }
}

/* Menu de la tablette : la carte Abonnement dit aussi l'état (essai, crédits,
   paiement en retard) — le panneau a la place, et c'est là qu'on le cherche. */
@media (max-width: 880px) {
  #appView .plan-txt small { display: flex; }
}

/* Deux façons de dire la même aide : à la souris on glisse, au doigt on touche. */
.aide-doigt { display: none; }
@media (hover: none) and (pointer: coarse) {
  .aide-souris { display: none; }
  .aide-doigt { display: inline; }
}

/* Tableaux larges au téléphone : mobile.js passe en « en-cartes » ceux qui
   ne tiennent pas dans leur carte. Chaque ligne devient une tuile (rayon
   10 px, comme les lignes), la première cellule en titre, les autres en
   « libellé : valeur » avec le libellé en capitales de la gamme. Plus de
   défilement de côté ; au bureau, les colonnes restent. */
@media (max-width: 600px) {
  #appView .view table.en-cartes, #appView .view table.en-cartes tbody { display: block; width: 100%; min-width: 0; }
  #appView .view table.en-cartes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #appView .view table.en-cartes tr { display: block; margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--line, #d8cdbb); border-radius: 10px; background: var(--card, #fffdf8); }
  #appView .view table.en-cartes tr:last-child { margin-bottom: 0; }
  /* Le libellé flotte à gauche : la valeur, même faite de plusieurs morceaux
     (une pastille et un mot, « 5 / 7 »), reste d'un bloc à droite. */
  #appView .view table.en-cartes td {
    display: flow-root;
    width: auto; min-width: 0; max-width: none; padding: 3px 0; border: 0;
    white-space: normal; overflow-wrap: anywhere; text-align: right; background: none;
  }
  #appView .view table.en-cartes td::before {
    content: attr(data-l); float: left; max-width: 48%; margin-right: 12px; text-align: left; overflow-wrap: normal;
    font: 900 10.5px/1.5 var(--font, system-ui, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #67645c);
  }
  #appView .view table.en-cartes td:not([data-l])::before { content: none; }
  #appView .view table.en-cartes td:empty { display: none; }
  /* La première cellule nomme la ligne : en titre, sur toute la largeur. */
  #appView .view table.en-cartes td:first-child {
    display: block; padding: 0 0 7px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2, #e9e1d2);
    text-align: left; font-weight: 800; font-size: 14px;
  }
  #appView .view table.en-cartes td:first-child::before { content: none; }
  /* La jauge des Rapports n'a plus de colonne à remplir : le nombre suffit. */
  #appView .view table.en-cartes td.jaugee i { display: none; }
  #appView .view table.en-cartes td.jaugee span { padding: 0; }
  /* Rapports : l'avatar revient à côté du nom, il y a la place. */
  #appView .view table.rap-table.en-cartes .qui :is(.cl-avatar, .act-ico) { display: inline-grid; }
  #appView .view table.en-cartes .qui { white-space: normal; }
  /* Iris : le nom de la ligne peut revenir à la ligne, un tableau de quatre
     colonnes (« Par source ») tient alors sans passer en cartes. */
  #appView .view .ir-table:not(.en-cartes) td:first-child { white-space: normal; }
}

/* ---------- le téléphone (≤ 720 px) : maquette N du 06/11/2026 ----------
   Corentin : « verso sur téléphone c'est vraiment naze, c'est pas du tout
   optimisé […] juste recopier le codage sur ordinateur ». La N, qu'il a
   choisie sur image, avec le micro en or de la O : une barre d'onglets en bas
   (Accueil, À valider, Aurore, Clients, Plus), la colonne masquée, la page à
   sa taille (plus de 78 %), le bandeau jaune bord à bord sans le texte
   d'explication, les gestes en bas sous le pouce. « Plus » (#telPlusPanneau)
   range le reste de Verso en groupes. Ce bloc vient en dernier : il passe
   devant tout ce qui précède. */
.tel-barre, .tel-plus, .tel-marque, .tel-br-tete, .tel-seul, .ov-envoyer-fleche { display: none; }
@media (max-width: 720px) {
  :root { --tel-barre: calc(58px + env(safe-area-inset-bottom)); --tel-haut: calc(50px + env(safe-area-inset-top)); }
  /* Plus de colonne : la page prend toute la largeur, la barre du bas navigue. */
  #appView.app.show { grid-template-columns: minmax(0, 1fr); }
  #appView .sidebar { display: none; }
  #appView .main > * { zoom: 1; }
  #appView .main .btn:not(.sm), #appView .main .rs-onglets button { min-height: 44px; }
  #appView.app.show .content { padding: 10px 12px calc(var(--tel-barre) + 92px); }
  /* body.vc-present .toasts (assistant-site.css) les posait à 78 px, pile sur le rond « créer ». */
  .toasts, body.vc-present .toasts { zoom: 1; left: 10px; right: 10px; bottom: calc(var(--tel-barre) + 84px); width: auto; }
  /* Ce qui flottait en bas à droite passe au-dessus de la barre ; « Pour bien démarrer » à gauche, le rond « créer » à droite. */
  #appView .gd-pilule {  bottom: calc(var(--tel-barre) + 12px); }
  /* Aurore est au milieu de la barre du bas : ni champ en haut, ni bonhomme en bas à droite. */
  #appView .haut-aurore, #appView .aurore-bouton { display: none; }
  /* L'assistance de Verso (menu du compte, ou « Plus ») se pose par-dessus la barre du bas : son champ reste visible. */
  #appView.show ~ .vc-panneau { z-index: 47; }
  /* Le message d'un incident monte au-dessus de « Pour bien démarrer » et du rond « créer ». */
  #appView .etat-message { left: 10px; right: 10px; bottom: calc(var(--tel-barre) + 72px); width: auto; }
  #appView .gd-pilule { right: auto; left: 12px; }
  /* « Pour bien démarrer » monte de la barre, bord à bord, comme une feuille posée dessus (root-00, 9c0d1f0). */
  #appView .gd-panneau { left: 0; right: 0; bottom: var(--tel-barre); max-height: calc(100dvh - var(--tel-barre) - 24px); }
  /* Le geste « créer » de la page (une fiche, un rendez-vous, un message, un numéro, une note) quitte le haut de
     la page pour un rond en bas à droite, à portée du pouce — comme les applications de CRM au téléphone. */
  #appView :is(#crmQuickCreate, #calAjouterBtn, #msgNouveau, #nlNouveauBtn, #meNouvelle) {
    position: fixed; right: 14px; bottom: calc(var(--tel-barre) + 14px); z-index: 42; display: grid; place-items: center;
    width: 58px; height: 58px; min-height: 0; padding: 0; border: 2px solid var(--ink, #20252b); border-radius: 50%;
    background: var(--ink, #20252b); color: var(--gold, #e5b95b); font-size: 0; line-height: 0; box-shadow: 0 10px 22px -8px rgba(32, 37, 43, .6);
  }
  #appView :is(#crmQuickCreate, #calAjouterBtn, #msgNouveau, #nlNouveauBtn, #meNouvelle) .icon { width: 26px; height: 26px; margin: 0; }
  /* Dans le CRM, le rond « + » n'existe que dans le Répertoire (Corentin, 09/11 : visible dans Signatures, ça ne va pas). */
  #appView [data-view-panel="crm"]:not([data-crm-current="clients"]) #crmQuickCreate { display: none; }
  /* Une fiche ouverte a ses propres gestes (Appeler, Email, Rendez-vous…) : le rond « nouvelle fiche » cachait la fin d'une ligne (audit du 16/11). */
  #appView [data-view-panel="crm"]:has(.cl-layout.mode-fiche) #crmQuickCreate { display: none; }
  #appView :is(#crmQuickCreate, #calAjouterBtn, #msgNouveau, #nlNouveauBtn, #meNouvelle) > span { display: none; }
  #appView :is(#calAjouterBtn, #meNouvelle)::before { content: "+"; font-size: 34px; line-height: 1; font-weight: 500; }
  #appView :is(#crmQuickCreate, #calAjouterBtn, #msgNouveau, #nlNouveauBtn, #meNouvelle):focus-visible { outline: 3px solid var(--blue, #466b82); outline-offset: 3px; }
  .rep-selection { left: 8px; right: 8px; bottom: calc(var(--tel-barre) + 8px); }
  /* Ce qui n'a de sens qu'à l'ordinateur (une phrase d'aide, un bouton de copie) s'efface. */
  .tel-cache { display: none !important; }
  /* Aucun texte sous 11 px (Apple : Caption 2 = 11 pt, le minimum lisible). Les petits libellés en
     capitales, les pastilles, les compteurs et les dates des listes remontent ; les initiales des
     avatars et les étiquettes de type de fiche à 10 px. Relevé de l'inventaire des feuilles de style
     (8 à 10,5 px) et de l'audit audit-tel-scenario.js. */
  #appView :is([data-view-panel], .modal, .gd-panneau) :is(.lbl, .l, .tag, .pill, .chip, .src, .act-type, .cnx-state, .fc-badge, .tm-role, .agent-categorie, .agent-fonction,
    .table th, .rep-table th, .rap-table th, .cal-hour, .cal-evt, .cal-evt span, .cal-pill, .cal-mday .more, .ech .quand, .flux .quand, .kb-carte .ech, .kb-carte .lm,
    .kb-carte .age, .kb-carte .qui, .kb-carte .suivi, .kb-head .total, .act-row .qui, .act-jour .j, .act-jour .n, .act-groupe > h3, .fc-droite > h3, .kb-head > h3,
    .jan-rub h4, .jan-etat, .jan-src span, .jan-reperes .l, .rap-mois .lbl, .rap-mois .pile b, .graph .lbl, .graph .val, .kpi .l, .kpi .delta, .fc-stat .l, .fc-next .lbl,
    .fc-note .lbl, .repere .l, .semaine .lbl, .dem-resume .r .l, .imp-resultat span, .parcours .nom, .parcours .etape .nom, .parcours .etape .m, .pal-groupe,
    .pal-ligne .quoi, .cl-row .reste, .cl-row .sub .contact, .tl-corps .quand, .vj-sur, .vr-case .vr-src, .aurore-sur,
    .aurore-journal li.jour, .aurore-pause, .aurore-bulle small, .run-bloc .lbl, .crm-nav .n, .fc-tabs .n, .tabs .n, .rep-rapides button .n, .crm-dir-outils .btn .n,
    .acc-mini .n, .ab-poche .l, .ab-equiv-l, .ab-pack em, .ab-periode em, .ex-tuile .l, .profile-item strong, .evt-detail-row strong, .tm-depuis, .sit-declarant legend,
    .dbl-groupe .raison, .kb-carte .txt, .fl-etat, .ir-badge, .di-eyebrow, .di-pq, .di-etat, .fl-rep-q, .ec-etat, .bc-prio, .legend-item, .cnx-state, .sim-exemples > span, .nl-brief b, .nl-etat .etat, .etat.ok, .seg button.on, .seg button, .fm-q, .fm-eb, .fm-etat, .ig-eb, .ou-etiquette, .abn-tag, .ab-mode, .ab-statut, .sim-eyebrow, .sim-exemple, .sim-kpi .s, .sim-kpi .l, .fc-stat .s, .kpi .s, .sim-lien, #simEtat, #simEtatDroit, #simCalculEtat, .thm-k, .msg-pastille, .lm, .bc-statut, .j, .age, .ech, .imp, .me-arbre .titre, .jan-etat, #veilleArchivesCompte, th, small:not(.ov-heure small):not(.ov-h small), .cnx-fiche-grid b, .agent-fiche-cles b, .ves-liens b, .rep-table .etq, .imp-col .badge-ia, .ov-jour, .eyebrow, .ab-eyebrow, .nav-badge) { font-size: 11px; }
  #appView :is([data-view-panel], .modal) :is(.cl-avatar.cl-avatar, .kind.kind, .cl-avatar.cl-avatar.cl-avatar) { font-size: 11px; }
  #appView [data-view-panel="agents"] .agent-fonction { font-size: 10px; min-height: 2.6em; }
  /* Les champs : 16 px (la taille à laquelle iOS ne zoome pas) et 40 px de haut ; les boutons de filtre
     rapide, les petits boutons-icônes et les pastilles cliquables à la taille du doigt. */
  #appView [data-view-panel] :is(input.input, textarea.input, select.input, input[type="search"], input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], textarea) { font-size: 16px; }
  #appView [data-view-panel] :is(input.input, select.input, input[type="search"], input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"]) { min-height: 40px; }
  #appView :is([data-view-panel], .modal) :is(.rep-rapides button, .cal-resume button, .tl-filtres button, .vj-rubriques button, .crm-puce, .fc-chip, .seg > button, .cal-modes button, .tabs button) { min-height: 36px; }
  #appView :is(.modal, #fmVoile, #flVoile) :is(input[type="checkbox"], input[type="radio"]) { width: 22px; height: 22px; }
  #appView .modal :is(.duo, .trio) { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  /* Le formulaire d'activité : une colonne qui tient dans la fenêtre (ses enfants faisaient 645 px). */
  #appView .modal .crm-form { grid-template-columns: minmax(0, 1fr); }
  #appView .modal .crm-form > * { min-width: 0; max-width: 100%; }
  #appView .modal #actTypes.seg { flex-wrap: wrap; }
  /* Les signatures : la liste ne défile plus dans sa carte, elle prend sa hauteur dans la page. */
  #appView [data-view-panel="crm"] .sg-liste { max-height: none; overflow: visible; }
  #appView .modal :is(.duo, .trio) > *, #appView .modal .field > :is(input, select) { min-width: 0; max-width: 100%; }
  #appView .modal input[type="date"], #appView .modal input[type="time"], #appView .modal input[type="datetime-local"] { width: 100%; }
  #appView :is([data-view-panel], .modal) :is(.coche, .bc-info, .info-bulle, .agent-epingle, .di-x, .ec-lire, .ig-x, .fm-x) { min-width: 34px; min-height: 34px; }
  #appView [data-view-panel] :is(.bc-onglets button, .sg-tete button, .sg-filtres button, .bc-actions button:not(.btn), .nl-modes button, .di-filtres button, .ec-onglets button, .ec-filtres button, .ir-onglets button, .ir-filtres button) { min-height: 36px; }
  :is(#fmVoile, #flVoile, #appView [data-view-panel="fama"], #appView [data-view-panel="instagram"]) button:not(.btn):not([class*="lien"]):not(.li-plus) { min-height: 36px; }
  :is(#fmVoile, #flVoile) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) { font-size: 16px !important; }
  :is(#fmVoile, #flVoile) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select) { min-height: 40px; }
  :is(#fmVoile, #flVoile) :is(input[type="checkbox"], input[type="radio"]) { width: 22px; height: 22px; }
  :is(#fmVoile, #flVoile, #appView [data-view-panel="fama"], #appView [data-view-panel="instagram"]) :is(.fm-q, .fm-eb, .fm-etat, .fl-etat, .ig-eb, .fl-rep-q, .fm-esp) { font-size: 11px; }
  #appView [data-view-panel="instagram"] .ig-item .ig-prets { white-space: normal; }
  #appView [data-view-panel="agents"] .agent-card .actions .btn { min-height: 36px; }
  #appView [data-view-panel="agents"] .agent-prix, #appView [data-view-panel="agents"] .agent-prix b, #appView [data-view-panel="agents"] .agent-card > div.muted { font-size: 11px; }
  #appView [data-view-panel="aurore"] label.aurore-bascule { min-height: 36px; align-items: center; }
  #appView :is([data-view-panel], .modal, #fmVoile, #flVoile) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]), select, textarea) { font-size: 16px !important; }
  #appView :is([data-view-panel], .modal, #fmVoile, #flVoile) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]), select) { min-height: 40px; }
  #appView :is([data-view-panel], .modal) :is(.btn.sm, .icon-btn) { min-width: 36px; min-height: 36px; }
  #appView [data-view-panel] :is(input:not([type]), input[type="search"]) { min-height: 40px; font-size: 16px; }
  /* Les listes repliées (« Comment ça marche ? », « Sources consultées », « Transcription intégrale ») : un titre sous le doigt. */
  #appView :is([data-view-panel], .modal) summary:not([style*="inline"]) { min-height: 36px; padding-top: 6px; padding-bottom: 6px; box-sizing: border-box; }
  /* Les pastilles et petits boutons des pages : filtres des connecteurs et des outils, règles apprises, mémoire, fiche. */
  #appView [data-view-panel] :is(.cnx-filtre, .ou-filtres button, .ap-portee button, .me-tag, .va-pastille, .chip, .fc-chip, .sim-exemple, .sim-puce, .crm-puce, .etq, .rep-rapides button, .tl-filtres button, .vr-onglets button, .vj-rubriques button) { min-height: 36px; }
  #appView [data-view-panel] :is(.ap-actions button, .me-ajout, .coche.petite, .icon-btn, [data-bc="memo-suppr"], .cnx-fermer) { min-width: 36px; min-height: 36px; }
  #appView [data-view-panel] .me-case { width: 28px; height: 28px; }
  #appView :is([data-view-panel], .modal) .bc-pastilles button { width: 34px; height: 34px; }
  #bcModal [role="radio"] { width: 30px; height: 30px; }
  .modal :is(.bc-lien, .ab-lien, .lien) { position: relative; }
  .modal :is(.bc-lien, .ab-lien, .lien)::after { content: ""; position: absolute; inset: -10px -8px; }
  #appView [data-view-panel="memoire"] .me-notes { grid-template-columns: minmax(0, 1fr); }
  #appView [data-view-panel="memoire"] .me-notes > * { min-width: 0; max-width: 100%; }
  #appView [data-view-panel] #diAuto { min-height: 36px; }
  #appView [data-view-panel="iris"] .ir-compteur span { font-size: 11px; }
  #appView [data-view-panel="memoire"] .me > *, #appView [data-view-panel="memoire"] #meVue { min-width: 0; max-width: 100%; }
  #appView [data-view-panel="crm"] .bc-em-envoi, #appView [data-view-panel="crm"] .bc-em-envoi * { white-space: normal; }
  /* La bulle des crédits (ouverte par « Consommation ») : une feuille posée au-dessus de la barre, sous le pouce. */
  #appView .conso-bulle { position: fixed; top: auto; right: 8px; left: 8px; bottom: calc(var(--tel-barre) + 8px); width: auto; z-index: 46; }
  #appView [data-view-panel] #signatureCabinetActiver { width: 22px; height: 22px; }
  #appView [data-view-panel] .bc-em-envoi { overflow-wrap: anywhere; }
  #appView [data-view-panel="connecteurs"] .cnx-top .cnx-state { white-space: normal; text-align: center; line-height: 1.25; }
  #appView [data-view-panel="newsletter"] .nc-sous-feuille > span { white-space: normal; }
  #appView [data-view-panel="history"] .acc-mini .n { white-space: normal; overflow-wrap: anywhere; letter-spacing: .04em; }
  /* Mémoire : l'arborescence prend sa hauteur dans la page (plus de boîte qui défile dans la page qui défile). */
  #appView [data-view-panel="memoire"] .me-arbre { position: static; max-height: none; overflow: visible; }
  #appView [data-view-panel] :is(.me-n, .me-arbre .titre, .fc-afaire button.t, .tl-ligne button.t) { min-height: 40px; }
  #appView [data-view-panel] .me-arbre .titre { font-size: 11.5px; }
  /* Les liens-boutons écrits comme du texte (Gérer le paiement, Détacher, Relire…) : la zone de toucher s'élargit autour. */
  #appView :is(.ab-lien, .aurore-lien, .aurore-ecouter, .tl-lien, .sim-lien, .cp-lien, .tm-mail, .me-fil button, .nl-lien, .bc-lien, .ou-lien, .vr-lien, .ig-lien, .fm-lien, .ir-lien, .di-lien, .li-plus, #simTiroir a, .fm-article a, .ig-article a, .ec-creer, [data-view-panel="fama"] a:not(.btn), [data-view-panel="instagram"] a:not(.btn)) { position: relative; }
  #appView :is(.ab-lien, .aurore-lien, .aurore-ecouter, .tl-lien, .sim-lien, .cp-lien, .tm-mail, .me-fil button, .nl-lien, .bc-lien, .ou-lien, .vr-lien, .ig-lien, .fm-lien, .ir-lien, .di-lien, .li-plus, #simTiroir a, .fm-article a, .ig-article a, .ec-creer, [data-view-panel="fama"] a:not(.btn), [data-view-panel="instagram"] a:not(.btn))::after { content: ""; position: absolute; inset: -10px -8px; }
  /* Un lien écrit dans une phrase, un « Détail » : la zone de toucher s'élargit autour, sans rien déplacer. */
  #appView .lien, #appView summary[style*="inline"], #appView [data-view-panel] button:not([class]) { position: relative; }
  #appView .lien::after, #appView summary[style*="inline"]::after, #appView [data-view-panel] button:not([class])::after { content: ""; position: absolute; inset: -10px -8px; }

  /* La barre du haut se fond dans le bandeau de la page : la marque à gauche, la recherche, la
     cloche et le compte à droite. Plus de titre ici — le bandeau porte le seul titre de la page
     (Corentin, 06/11/2026 : des titres en double ou qui se contredisaient d'un endroit à l'autre). */
  #appView .topbar {
    position: relative; z-index: 2; box-sizing: border-box; height: var(--tel-haut); min-height: 0;
    padding: env(safe-area-inset-top) 8px 0 14px; gap: 8px; background: transparent; border-bottom: 0;
  }
  #appView .topbar-heading { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1 1 auto; }
  #appView .topbar-heading > div { display: none; }
  #appView .topbar .tel-marque { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--ink, #20252b); color: var(--gold, #e5b95b); }
  #appView .topbar .tel-marque svg { width: 58%; height: auto; display: block; }
  #appView .topbar-actions { flex: none; gap: 2px; }
  #appView .topbar :is(.workspace-search, .notif-btn, .user-chip) { min-width: 40px; min-height: 40px; max-width: none; justify-content: center; padding: 0 6px; border: 0; background: none; color: var(--ink, #20252b); }
  #appView .topbar .workspace-search span, #appView .topbar #guidePageBtn, #appView .user-chip .who, #appView .topbar .conso-chip { display: none; }
  #appView .topbar .user-chip .avatar { background: var(--ink, #20252b); color: var(--gold, #e5b95b); }

  /* La barre du bas. */
  .tel-barre {
    display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 253, 248, .96);
    border-top: 1px solid var(--line, #d8cdbb); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .tel-onglet {
    position: relative; display: grid; justify-items: center; gap: 3px; min-height: 46px; padding: 4px 2px 0;
    border: 0; border-radius: 10px; background: none; color: #8b847a; font: inherit; font-size: 10.5px; font-weight: 700; line-height: 1.1;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .tel-onglet .icon { width: 24px; height: 24px; }
  .tel-onglet.active { color: var(--ink, #20252b); }
  .tel-onglet:focus-visible { outline: 3px solid var(--blue, #466b82); outline-offset: -3px; }
  .tel-badge {
    position: absolute; top: 0; left: calc(50% + 6px); box-sizing: content-box; min-width: 8px; height: 18px; padding: 0 5px;
    border: 2px solid #fffdf8; border-radius: 11px; background: var(--red-2, #c85c43); color: #fff;
    font-size: 11px; font-style: normal; font-weight: 800; line-height: 18px; text-align: center;
  }
  /* Aurore, au milieu : le micro en or, qui déborde de la barre. */
  .tel-aurore { margin-top: -26px; }
  .tel-micro {
    display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
    background: var(--gold, #e5b95b); border: 4px solid #fffdf8; box-shadow: 0 8px 18px -6px rgba(185, 138, 51, .8);
  }
  .tel-micro .icon { width: 28px; height: 28px; color: var(--ink, #20252b); }
  .tel-aurore.active .tel-micro { background: var(--ink, #20252b); }
  .tel-aurore.active .tel-micro .icon { color: var(--gold, #e5b95b); }

  /* « Plus » : un panneau par-dessus la page, jusqu'à la barre. Au-dessus de la fiche client et du
     brouillon ouverts, qui sont eux aussi des écrans posés par-dessus la page. */
  .tel-plus:not([hidden]) {
    display: block; position: fixed; left: 0; right: 0; top: 0; bottom: var(--tel-barre); z-index: 45;
    overflow-y: auto; -webkit-overflow-scrolling: touch; padding: calc(14px + env(safe-area-inset-top)) 16px 24px; background: var(--paper, #f3eee3);
  }
  .tel-plus h2 { margin: 2px 0 12px; font-size: 24px; font-weight: 900; letter-spacing: -.02em; }
  .tel-plus-recherche {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px;
    border: 1px solid var(--line, #d8cdbb); border-radius: 14px; background: #fffdf8; color: var(--muted, #67645c);
    font: inherit; font-size: 15px; text-align: left; cursor: pointer;
  }
  .tel-plus-recherche .icon { margin-left: auto; width: 20px; height: 20px; flex: none; }
  .tel-plus-groupe { margin: 18px 4px 7px; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #67645c); }
  .tel-plus-liste { overflow: hidden; border: 1px solid var(--line, #d8cdbb); border-radius: 16px; background: #fffdf8; }
  .tel-plus-entree {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 54px;
    padding: 8px 14px; border: 0; background: none; color: var(--ink, #20252b); font: inherit; font-size: 15.5px; font-weight: 750; text-align: left; cursor: pointer;
  }
  .tel-plus-entree + .tel-plus-entree { border-top: 1px solid var(--line-2, #e9e1d2); }
  .tel-plus-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--ink, #20252b); color: var(--gold, #e5b95b); }
  .tel-plus-ic .icon { width: 18px; height: 18px; }
  .tel-plus-entree.active .tel-plus-ic { background: var(--gold, #e5b95b); color: var(--ink, #20252b); }
  .tel-plus-nom { min-width: 0; }
  .tel-plus-nom small { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted, #67645c); }
  .tel-plus-fin { display: flex; align-items: center; gap: 6px; }
  .tel-plus-fin .n { min-width: 20px; padding: 1px 6px; border-radius: 10px; background: var(--red-2, #c85c43); color: #fff; font-size: 12px; font-weight: 800; text-align: center; }
  .tel-plus-fin .chev { width: 16px; height: 16px; color: #b8afa1; transform: rotate(180deg); }
  /* Le pied de colonne, rangé en bas du panneau. */
  .tel-plus .side-foot { display: grid; gap: 12px; margin-top: 20px; padding: 14px; border: 0; border-radius: 14px; background: var(--ink, #20252b); color: #e9e2d4; font-size: 13px; }
  .tel-plus .side-foot a, .tel-plus .side-foot button { color: inherit; }
  .tel-plus .pied-etat { padding: 0; }
  .tel-plus .pied-liens { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; padding: 0; font-size: 13.5px; }
  .tel-plus .pied-liens > a, .tel-plus .pied-liens > button.gd-visite, .tel-plus .etat-lien { display: inline-flex; align-items: center; min-height: 40px; padding: 0 8px; margin: 0 -2px; border-radius: 8px; }
  .tel-plus .pied-etat .etat-lien { margin: 0; padding: 0 8px 0 0; }
  .tel-plus #logoutBtn.pied-sortie {
    position: static; display: inline-flex; align-items: center; gap: 7px; width: auto; height: auto; min-height: 40px; margin-left: auto; padding: 7px 12px;
    border: 1px solid rgba(255, 250, 240, .18); border-radius: 10px; background: none; font: inherit; font-size: 13px; font-weight: 700;
  }
  .tel-plus .pied-sortie-txt { display: inline; }

  /* Le bandeau de page : il monte sous la barre du haut et va d'un bord à l'autre ; le titre seul,
     sans le fil d'Ariane ni le texte d'explication (il se lit à l'ordinateur). Les boutons de
     module deviennent des pastilles qui défilent. */
  .va-bandeau { margin: calc(-10px - var(--tel-haut)) -12px 0; border-radius: 0 0 22px 22px; padding: calc(var(--tel-haut) + 6px) 16px calc(var(--va-recouvrement) + 14px); }
  .va-bandeau::after { width: 40%; }
  .va-bandeau .va-fil:not(#accueilDate) { display: none; }
  .va-bandeau-in { align-items: flex-start; gap: 10px 16px; }
  /* Le rond « créer » vit dans le bandeau : sans cela le bandeau (z-index 1) l'enferme et le contenu de la page passe par-dessus (Corentin, 09/11 : « il est caché »). */
  #appView .va-bandeau-in { z-index: auto; }
  .va-bandeau-in > div > p:not(.va-fil):not(.crm-perso-note) { display: none; }
  .va-titre { font-size: 22px; margin: 0 0 2px; }
  .va-modules { gap: 6px; margin: 2px -16px 0; padding: 0 16px 4px; width: auto; }
  .va-mod { min-height: 38px; padding: 6px 12px; border-radius: 999px; font-size: 13px; }
  .va-sur-bandeau { padding: 0; }
  .va-carte, .va-page { padding: 14px; }
  .ag-chiffres { width: 100%; }

  /* Accueil (maquette N, écran 1) : Aurore, puis le prochain rendez-vous, puis ce qui est à relire.
     Les cinq boutons « ce qui attend une décision » et la phrase sur le coût s'effacent : la barre
     du bas compte déjà ce qui attend, et « Prêts à relire » suit le rendez-vous. */
  .ov-haut .va-modules { display: none; }
  .ov-haut { gap: 8px; }
  .ov-demande { min-height: 50px; }
  .ov-envoyer-fleche { display: inline; font-size: 16px; line-height: 1; }
  .ov-demande .ov-envoyer > span:first-child { display: none; }
  #appView .ov-demande .btn.ov-envoyer { min-width: 44px; padding: 0 12px; }
  .ov-idees { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 0; padding: 0 36px 4px 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
  .ov-idees::-webkit-scrollbar { display: none; }
  .ov-idee { flex: none; min-height: 36px; font-size: 13.5px; }
  .va-bandeau p.ov-cout, #accueilActions { display: none; }
  .ov-col > .workspace-review { order: 2; }
  #ovMentions { order: 3; } #incidentBanner { order: 4; }
  #accEcheancesCarte { order: 6; } #accVeilleCarte { order: 7; }
  #appView .workspace-review .approval { position: relative; padding: 11px 26px 11px 0; border-left: 0; }
  #appView .workspace-review .approval strong { font-size: 15px; font-weight: 750; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #appView .workspace-review .approval .muted { font-size: 13px; margin-top: 2px; }
  #appView .workspace-review .approval::after { content: "›"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 24px; line-height: 1; color: #b8afa1; }

  /* À valider (écran 2) : les brouillons d'abord, puis les rendez-vous et les réponses Instagram
     proposés, sans les phrases d'explication ; la case « Aucun brouillon ouvert » n'existe qu'à
     l'ordinateur. */
  [data-view-panel="approvals"] .va-page { display: flex; flex-direction: column; gap: 14px; }
  [data-view-panel="approvals"] .va-page > .card, [data-view-panel="approvals"] .br-layout { margin: 0; }
  [data-view-panel="approvals"] .br-layout { order: -1; }
  [data-view-panel="approvals"] .va-page > .card > p.muted, [data-view-panel="approvals"] .va-page > .card > .card-head .tag, #brRafraichir { display: none; }
  .br-layout:not(.br-ouvert) #brFiche { display: none; }

  /* Un brouillon ouvert prend tout l'écran : en tête le retour, la position et le suivant ; la
     réponse se lit d'abord, telle qu'elle partira ; « Modifier » ouvre les champs ; l'analyse de
     Solon, repliée, vient après ; les gestes sont fixés en bas. */
  #appView .view .br-layout.br-ouvert #brFiche.card {
    position: fixed; inset: 0; z-index: 36; overflow: hidden auto; -webkit-overflow-scrolling: touch;
    margin: 0; padding: 0 12px 190px; border: 0; border-radius: 0; box-shadow: none; background: var(--paper, #f3eee3);
  }
  .br-layout.br-ouvert .br-sources summary { display: flex; align-items: center; min-height: 40px; }
  /* La carte posée sur le bandeau (z-index 1) enfermait le brouillon sous les deux barres. */
  [data-view-panel="approvals"] .va-sur-bandeau:has(.br-layout.br-ouvert) { z-index: 40; }
  .br-layout.br-ouvert .tel-br-tete {
    display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 2; margin: 0 -12px 12px;
    padding: calc(6px + env(safe-area-inset-top)) 6px 6px; background: rgba(243, 238, 227, .96); border-bottom: 1px solid var(--line, #d8cdbb);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .tel-br-tete .pos { margin: 0 auto; font-size: 15px; font-weight: 800; }
  .tel-br-retour, .tel-br-suivant {
    display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 8px; border: 0; background: none;
    color: var(--blue, #466b82); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  }
  .tel-br-retour .icon, .tel-br-suivant .icon { width: 22px; height: 22px; }
  .tel-br-suivant .icon { transform: rotate(180deg); }
  .tel-br-suivant:disabled { color: #b8afa1; }
  .br-layout.br-ouvert #brDetail { display: flex; flex-direction: column; }
  .br-layout.br-ouvert #brDetail > .fc-head, .br-layout.br-ouvert #brDetail > .alerte { order: 1; }
  .br-layout.br-ouvert #brDetail > .br-origine { order: 2; }
  .br-layout.br-ouvert #brDetail > .br-reponse { order: 3; }
  .br-layout.br-ouvert #brDetail > .br-analyse { order: 4; }
  .br-layout.br-ouvert #brDetail > .br-confiance { order: 5; }
  .br-layout.br-ouvert .fc-head { gap: 10px; }
  .br-layout.br-ouvert .fc-ident { gap: 10px; }
  .br-layout.br-ouvert .fc-head .fc-avatar { width: 44px; height: 44px; font-size: 16px; }
  .br-layout.br-ouvert .fc-head h2 { font-size: 18px; line-height: 1.25; }
  .br-layout.br-ouvert .fc-line { gap: 6px; margin-top: 6px; }
  .br-layout.br-ouvert .fc-keys { display: none; }
  .br-layout.br-ouvert .br-analyse summary.lbl { display: flex; align-items: center; gap: 6px; min-height: 36px; cursor: pointer; }
  .br-layout.br-ouvert .br-analyse summary.lbl::after { content: "▾"; font-size: 13px; color: var(--muted, #67645c); }
  .br-layout.br-ouvert .br-analyse[open] summary.lbl::after { content: "▴"; }
  .br-layout.br-ouvert .br-lecture { display: block; }
  .br-lecture-a { margin: 0 0 10px; font-size: 13px; color: var(--muted, #67645c); overflow-wrap: anywhere; }
  .br-lecture-texte { padding: 14px; border: 1px solid var(--line, #d8cdbb); border-radius: 14px; background: #fff; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
  .br-lecture .hint { margin-top: 8px; }
  .br-layout.br-ouvert #brDetail:not(.br-edition) .br-reponse > .duo,
  .br-layout.br-ouvert #brDetail:not(.br-edition) .br-reponse > .field:has(#brTexte) { display: none; }
  .br-layout.br-ouvert #brDetail.br-edition .br-lecture { display: none; }
  .br-layout.br-ouvert #brTexte.br-corps { min-height: 220px; height: auto; overflow: hidden; resize: none; font-size: 16px; line-height: 1.55; }
  .br-layout.br-ouvert #brDetail .br-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 8px;
    margin: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--paper, #f3eee3); border-top: 1px solid var(--line, #d8cdbb);
  }
  .br-layout.br-ouvert #brDetail .br-actions > .btn { width: 100%; min-height: 48px; padding: 4px 8px; font-size: 15px; line-height: 1.15; white-space: normal; justify-content: center; }
  .br-layout.br-ouvert #brDetail .br-actions > [data-br="modifier"] { display: inline-flex; grid-row: 1; grid-column: 1; }
  .br-layout.br-ouvert #brDetail .br-actions > [type="submit"] { display: none; grid-row: 1; grid-column: 1; }
  .br-layout.br-ouvert #brDetail.br-edition .br-actions > [data-br="modifier"] { display: none; }
  .br-layout.br-ouvert #brDetail.br-edition .br-actions > [type="submit"] { display: inline-flex; }
  .br-layout.br-ouvert #brDetail .br-actions > .btn.primary { grid-row: 1; grid-column: 2; }
  .br-layout.br-ouvert #brDetail .br-actions > .btn.ghost.sm { grid-row: 2; min-height: 36px; font-size: 13px; }
  .br-layout.br-ouvert #brDetail .br-actions > [data-br="copier"] { display: none; }

  /* Clients (écran 3). Le répertoire : la base, la recherche, puis la liste — sans cases à cocher,
     sans import, export, doublons ni tri (des gestes d'ordinateur). */
  #appView #crmRechercheBtn { display: none; }
  [data-view-panel="crm"] .cl-dir-head, [data-view-panel="crm"] .crm-dir-outils, [data-view-panel="crm"] .crm-liens,
  [data-view-panel="crm"] .rep-entete h2, [data-view-panel="crm"] .rep-table thead, [data-view-panel="crm"] .rep-table .rep-coche,
  [data-view-panel="crm"] .crm-porte-desc, [data-view-panel="crm"] .crm-porte-etat { display: none; }
  [data-view-panel="crm"] .card.cl-dir { gap: 10px; padding: 12px; }
  .crm-portes { gap: 8px; margin: 0 0 10px; }
  .crm-porte { gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; box-shadow: none; }
  .crm-porte-pastille { width: 36px; height: 36px; border-radius: 10px; }
  .crm-porte-pastille .icon { width: 18px; height: 18px; }
  .crm-porte-corps > b { font-size: 14px; }
  .crm-porte-chiffres { gap: 2px 10px; min-height: 0; font-size: 12px; }
  .crm-porte-chiffres b { font-size: 13px; margin-right: 2px; }
  [data-view-panel="crm"] .rep-entete { margin-bottom: 8px; }
  [data-view-panel="crm"] .rep-table td { padding: 10px 4px; }

  /* La fenêtre des leads : les quatre étoiles et « Présent / Absent » au bout du doigt. */
  #bcModal button[data-note] { min-width: 36px; min-height: 36px; }
  #bcModal button.oui, #bcModal button.non { min-height: 34px; padding-left: 12px; padding-right: 12px; }

  /* La fiche : un écran à part, posé par-dessus la page, qui défile seul ; en haut « ‹ Répertoire »
     et « Modifier » ; le nom au centre ; les gestes en tuiles, « Appeler » en premier ; les
     onglets défilent sur une ligne. Archiver et supprimer attendent sous « Plus ». */
  [data-view-panel="crm"] .va-sur-bandeau:has(.cl-layout.mode-fiche) { z-index: 40; }
  #appView .view .cl-layout.mode-fiche #clientFiche.card {
    position: fixed; top: 0; left: 0; right: 0; bottom: var(--tel-barre); z-index: 30; overflow: hidden auto; -webkit-overflow-scrolling: touch;
    margin: 0; padding: 0 12px 100px; border: 0; border-radius: 0; box-shadow: none; background: var(--paper, #f3eee3);
  }
  #appView #clientDetail .fc-nav {
    position: sticky; top: 0; z-index: 3; flex-wrap: nowrap; gap: 4px; margin: 0 -12px 8px;
    padding: calc(6px + env(safe-area-inset-top)) 8px 6px; background: rgba(243, 238, 227, .96); border-bottom: 1px solid var(--line, #d8cdbb);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  #appView #clientDetail .fc-nav > .icon-btn, #appView #clientDetail .fc-nav .pos { display: none; }
  #appView #clientDetail .fc-nav > .btn.ghost { min-height: 40px; padding: 0 6px; border: 0; background: none; color: var(--blue, #466b82); font-size: 16px; font-weight: 600; }
  #appView #clientDetail .fc-nav .fiche-actions .btn { min-height: 40px; }
  #appView #clientDetail .fc-tete { padding: 4px 0 0; }
  .fc-tete-haut { flex-direction: column; align-items: center; gap: 6px; padding-bottom: 10px; text-align: center; }
  .fc-tete .fc-avatar { width: 64px; height: 64px; font-size: 24px; border-radius: 50%; }
  .fc-tete .fc-qui { flex: none; width: 100%; justify-items: center; }
  .fc-tete h2 { justify-content: center; font-size: 22px; }
  .fc-tete .fc-identite, .fc-tete .fc-contact { justify-content: center; }
  /* Qui c'est : le nom, le type, la société ; l'email et le téléphone sont les gestes d'en dessous. Reste, en gris, l'adresse,
     le site et qui suit la fiche. */
  #appView #clientDetail .fc-tete { background: none; border: 0; box-shadow: none; }
  #appView #clientDetail .fc-tete::after { display: none; }
  #appView [data-view-panel="crm"] #clientDetail .fc-tete .fc-avatar { border-radius: 50%; }
  #appView #clientDetail .fc-tete .fc-identite { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--muted, #6f6657); }
  #appView #clientDetail .fc-tete .fc-identite :is(span, b) { font-size: 13px; font-weight: 600; color: inherit; }
  #appView #clientDetail .fc-tete .fc-contact .fc-chip.qui .cl-avatar { width: 20px; height: 20px; font-size: 11px; }
  .fc-tete .fc-contact { flex-direction: column; align-items: center; gap: 2px; margin-top: 2px; }
  .fc-tete .fc-contact :is(.ligne, .vide, a[href^="tel:"]) { display: none; }
  #appView #clientDetail .fc-tete .fc-contact .fc-chip { min-height: 0; padding: 2px 6px; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--muted, #6f6657); }
  #appView #clientDetail .fc-tete .fc-contact a.fc-chip { min-height: 34px; }
  .fc-actions-plus .menu .tel-seul { display: flex; }
  .fc-gestes { display: block; width: 100%; margin: 6px 0 0; }
  /* Quatre gestes ronds, le nom dessous, puis « Plus » : Appeler (sombre, le premier), Email, Rendez-vous, Aurore sur ce client.
     Note, Message et Tâche passent sous « Plus ». */
  #appView #clientDetail .fc-gestes .fc-actions { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; justify-content: stretch; align-items: start; }
  #appView #clientDetail .fc-gestes .fc-actions > .btn, #appView #clientDetail .fc-gestes .fc-actions > a.btn, #appView #clientDetail .fc-gestes .fc-actions > details > summary.btn {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; width: 100%; min-height: 0; padding: 0;
    border: 0; border-radius: 0; background: none; box-shadow: none; font-size: 11.5px; font-weight: 700; line-height: 1.15; white-space: normal; color: var(--ink, #20252b);
  }
  #appView #clientDetail .fc-gestes .fc-actions > .btn .icon, .fc-gestes .fc-actions > a.btn .icon { box-sizing: content-box; width: 22px; height: 22px; padding: 14px; border-radius: 50%; border: 1px solid var(--line, #d8cdbb); background: #fffdf6; }
  #appView #clientDetail .fc-gestes .fc-actions > .tel-seul:not([data-act]) .icon { background: var(--ink, #20252b); border-color: var(--ink, #20252b); color: var(--gold, #e9b949); }
  #appView #clientDetail .fc-gestes .fc-actions > :is([data-type="note"], [data-act="msg-fiche-ecrire"], [data-type="tache"]) { display: none; }
  #appView #clientDetail .fc-gestes .fc-actions > .tel-seul:not([data-act]) { order: 1; }
  #appView #clientDetail .fc-gestes .fc-actions > a[href^="mailto:"] { order: 2; }
  #appView #clientDetail .fc-gestes .fc-actions > [data-act="crm-rendez-vous"] { order: 3; }
  #appView #clientDetail .fc-gestes .fc-actions > [data-act="crm-aurore"] { order: 4; }
  #appView #clientDetail .fc-gestes .fc-actions > details { order: 5; position: static; }
  #appView #clientDetail .fc-gestes .fc-actions > details > summary.btn { color: var(--ink, #20252b); }
  #appView #clientDetail .fc-gestes .fc-actions > details > summary.btn::before { content: "···"; box-sizing: content-box; display: grid; place-items: center; width: 22px; height: 22px; padding: 14px; border-radius: 50%; border: 1px solid var(--line, #d8cdbb); background: #fffdf6; font-size: 18px; letter-spacing: 1px; line-height: 1; }
  #appView #clientDetail .fc-gestes .fc-actions > details > summary.btn::after { content: ""; }
  .fc-gestes { position: relative; z-index: 6; }
  .fc-actions-plus .menu { left: 0; right: 0; top: calc(100% + 6px); min-width: 0; z-index: 50; }
  /* Dans la fiche : les petits choix (« Une entreprise / Une personne ») et les coordonnées des interlocuteurs sous le doigt. */
  #appView #clientDetail button:not(.btn):not([class*="lien"]):not(.fc-tabs button) { min-height: 34px; }
  #appView #clientDetail a:not(.btn):not(.fc-chip) { position: relative; }
  #appView #clientDetail a:not(.btn):not(.fc-chip)::after { content: ""; position: absolute; inset: -10px -8px; }
  .fc-actions-plus .menu .danger { color: var(--red, #b8432e); }
  .fc-gestes .fc-dates, .fc-gestes .fc-perso-bt { display: none; }
  /* Le formulaire de « Modifier » : ses rangées de trois champs sont écrites en dur dans la page, une colonne au téléphone. */
  #appView #clientDetail :is(.duo, .trio) { grid-template-columns: minmax(0, 1fr) !important; }
  /* La synthèse : d'abord ce qui vient et ce qui s'est passé, puis les chiffres, puis le reste. */
  #appView #clientDetail .fc-principal:has(> .fc-grille:not(.perso)) { display: flex; flex-direction: column; gap: 12px; }
  #appView #clientDetail .fc-principal > .fc-grille:not(.perso), #appView #clientDetail .fc-principal > .fc-grille:not(.perso) > .fc-col { display: contents; }
  #appView #clientDetail .fc-principal > .fc-grille:not(.perso) > .fc-col > * { order: 5; margin: 0; }
  #appView #clientDetail .fc-principal > .fc-grille:not(.perso) > .fc-col > .fc-avenir { order: 1; }
  #appView #clientDetail .fc-principal > .fc-grille:not(.perso) > .fc-col > .fc-passe { order: 2; }
  #appView #clientDetail .fc-principal > .fc-paves { order: 3; }
  /* Trois lignes à suivre, trois derniers échanges ; le reste est dans la chronologie. */
  #appView #clientDetail .fc-avenir .fc-afaires > :nth-child(n + 4), #appView #clientDetail .fc-passe .fc-fil > :nth-child(n + 4) { display: none; }
  #appView #clientDetail .fc-avenir button.fc-reste { display: block; margin: 8px 0 0; }
  #appView #clientDetail .fc-principal > .fc-masquees-note { order: 9; }
  #appView #clientDetail .fc-tete .fc-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 28px 0 10px; border-radius: 0;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); }
  #appView #clientDetail .fc-tete .fc-tabs::-webkit-scrollbar { display: none; }
  #appView #clientDetail details.fc-tabs-plus, #appView #clientDetail .fc-tabs-plus .menu { display: contents; }
  #appView #clientDetail .fc-tabs-plus summary { display: none; }
  #appView #clientDetail .fc-tabs .fc-tabs-plus .menu > button {
    display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 0; width: auto; margin: 0 0 -1px; padding: 11px 10px;
    border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; font-size: 13.5px; font-weight: 800; color: #4a4238; white-space: nowrap;
  }
  #appView #clientDetail .fc-tabs .fc-tabs-plus .menu > button.on { color: var(--ink, #20252b); background: none; border-bottom-color: var(--red, #b8432e); }

  /* Aurore : la conversation prend la hauteur de l'écran, l'écriture juste dessous ; « Parler »
     est déjà le micro en or de la barre. La zone de saisie élargissait la page à 420 px. */
  #appView [data-view-panel="veille"] .vj-bat .vj-relue { max-width: 100%; white-space: normal; overflow-wrap: anywhere; height: auto; line-height: 1.3; }
  /* Les grands chiffres et les grands titres : plus petits au téléphone (Corentin, 06/11 : « des fois la
     police elle est grosse quand même »). Le texte courant ne bouge pas. */
  #appView .ov-heure { font-size: 30px; }
  #appView .ov-solde b { font-size: 28px; }
  #appView .ov-mois b, #appView .ov-repos b { font-size: 20px; }
  #appView .bc-kpi .v { font-size: 22px; }
  #appView .abn-tete h2 { font-size: 21px; }
  #appView .ag-chiffre b { font-size: 21px; }
  #appView .fm-tuile .n.mot { font-size: 22px; }
  #appView :is(.fm-h2, .ig-h2), #appView :is(.fm-h2, .ig-h2) em { font-size: 19px; }
  #appView .thm-q { font-size: 18px; }
  #appView [data-view-panel="simulateur"] .sim-kpis .sim-kpi .k { font-size: 20px; }
  #appView [data-view-panel="simulateur"] .sim-kpis .sim-kpi.grand .k { font-size: 26px; }
  /* Calendrier : Jour / Semaine / Mois à la taille du doigt, « + Ajouter » est le rond du bas. */
  #appView .cal-modes button { min-height: 40px; padding: 6px 12px; font-size: 13px; }

  .aurore-page { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .aurore-gauche, .aurore-cote { min-width: 0; }
  .aurore-fil-web { min-height: 240px; max-height: calc(100dvh - var(--tel-barre) - 250px); }
  .aurore-saisie-web { gap: 2px; padding: 5px; }
  .aurore-saisie-web textarea { min-width: 0; width: 100%; font-size: 16px; }
}
