/* ==========================================================================
   Barre du haut de Roger sur le Mac au style d'Apple (carte systeme 583, etape 7) : barre-mac.jsx. Choix de Tito
   (29/11, "version 2") : le segmente aux 4 onglets de l'iPhone au centre. Cachee derriere ?barre jusqu'aux ecrans de
   Roger refaits pour le Mac. Jetons --a-* seulement (apple.css). Roger ne pose pas html.a-app : la base des briques est
   posee ici sur .bm (comme .na-roger pour Mon espace) ; 1rem = 13, le corps de macOS, par html.bm-mac tant que la barre
   est la. Barre d'outils du Mac : 52 de haut, marges 16, elements de 32 (Rond, Paire, capsules de verre). Fond plein :
   rien ne defile dessous (le contenu defile dans .app-scroll) et le fond d'app-shell est encore l'ancien sombre.
   ========================================================================== */
html.bm-mac{font-size:13px}
.bm{position:relative;z-index:40;flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;
  column-gap:16px;height:52px;padding:0 16px;background:var(--a-fond-plat);border-bottom:1px solid var(--a-filet);
  color:var(--a-t1);font-family:var(--a-police);font-size:1rem;line-height:1.294;letter-spacing:0;font-feature-settings:"kern";
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;user-select:none}
:where(.bm) *,:where(.bm) *::before,:where(.bm) *::after{box-sizing:border-box}
:where(.bm) :where(button){font-family:inherit;color:inherit;letter-spacing:inherit;cursor:default}
.bm :focus{outline:none}
.bm :focus-visible{outline:3px solid color-mix(in srgb,var(--a-bleu) 55%,transparent);outline-offset:1px}
.bm-g,.bm-d{display:flex;align-items:center;gap:8px;min-width:0}
.bm-d{justify-content:flex-end}
.bm-c{display:flex;align-items:center;justify-content:center;min-width:0}

/* Roger : logo et point de la connexion ; un clic = l'Accueil */
.bm-roger{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 6px 0 0;border:0;margin:0 4px 0 0;background:none;
  border-radius:8px;color:var(--a-t1)}
.bm-roger img{display:block;width:26px;height:26px;border-radius:7px;box-shadow:0 0 0 1px var(--a-filet)}
.bm-roger:active{opacity:.6}

/* fleches et rafraichir : ronds de 32 en verre */
.bm .a-rond{color:var(--a-t1)}
.bm-chev.sf{font-size:.62rem;color:var(--a-t3)}

/* le segmente aux 4 onglets de l'iPhone (brique Segmente, a la hauteur d'une barre d'outils) */
/* largeur fixe : le segmente ne change pas de taille quand l'ecran ouvert y change de nom ("CRM", "Boites d'envoi") */
.bm .bm-seg.a-seg{width:600px;height:32px;padding:2px;border-radius:16px}
.bm .bm-seg .a-seg-pastille{border-radius:14px}
.bm .bm-seg .a-seg-b{gap:6px;padding:0 14px;min-width:0;border-radius:14px;font-size:1rem;white-space:nowrap}
.bm .bm-seg .a-seg-b .sf{font-size:1.08rem}
.bm .bm-seg .a-seg-b .bm-chev.sf{font-size:.62rem}
@media (max-width:1240px){
  .bm .bm-seg.a-seg{width:500px}
  .bm .bm-seg .a-seg-b{padding:0 8px;min-width:0}
  .bm .bm-seg .a-seg-b > .sf:first-child{display:none}
}

/* le projet ouvert, apres les fleches ; le nom du projet ramene a sa page depuis un sous-projet */
.bm-lieu{display:inline-flex;align-items:center;gap:7px;min-width:0;margin-left:4px;font-weight:600;white-space:nowrap}
.bm-lieu-pj{border:0;margin:0;padding:0 4px;border-radius:6px;background:none;font:inherit;color:var(--a-t2)}
.bm-lieu-pj:active{opacity:.6}
.bm-lieu-txt{display:flex;flex-direction:column;align-items:flex-start;min-width:0;line-height:1.15}
.bm-lieu--deux .bm-lieu-pj{padding:0;font-size:.846rem;font-weight:500}
.bm-lieu-sp{white-space:nowrap}

/* logo d'un projet (charte de Roger) */
.bm-pj-logo{flex:none;display:inline-grid;place-items:center;width:18px;height:18px;border-radius:5px;object-fit:cover}
.bm-pj-mono{background:var(--c);color:#fff;font-size:.77rem;font-weight:700}

/* les boutons vivants (Veille, Codex, Automatisations) : une capsule de verre, un point d'etat, le badge des arrivees */
.bm-vifs{display:inline-flex;align-items:center;height:36px;padding:0 2px;border-radius:18px}
.bm-vif{position:relative;display:grid;place-items:center;width:32px;height:32px;border:0;margin:0;padding:0;border-radius:50%;
  background:none;color:var(--a-t1);font-size:1.08rem;transition:background-color var(--a-duree-courte)}
.bm-vif.a-on,.bm-vif.bm-vif--ici{background:var(--a-remplir3)}
.bm-vif:active{opacity:.6}
.bm-vif > .a-pv{position:absolute;right:5px;bottom:6px;box-shadow:0 0 0 1.5px var(--a-fond-plat)}
.bm-vif > .a-badge{position:absolute;top:-3px;right:-4px}

/* Mon espace : capsule de verre, symbole + mot */
.bm-esp{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border:0;margin:0;border-radius:16px;
  font-size:1rem;font-weight:500;white-space:nowrap}
.bm-esp .sf{font-size:1.08rem;color:var(--a-t2)}
.bm-esp.a-on{background:var(--a-remplir3);box-shadow:none;font-weight:600}
.bm-esp:active{opacity:.6}

@media (hover:hover) and (pointer:fine){
  .bm-vif:not(.a-on):hover,.bm-roger:hover,.bm-lieu-pj:hover,
  .bm .a-paire > .a-rond:hover{background:var(--a-remplir2)}
  .bm-esp:not(.a-on):hover{filter:brightness(.97)}
}

/* ---------- fenetres des boutons vivants (Tito 30/11 : "pourquoi les bulle des bouton vivants sont encore
   dans l'ancien design ?!") : la brique Popover (a-pop, apple.css) au Papier ; memes contenus que les
   fenetres de l'ancien header (hub-view.jsx, BmMenuVeille / BmMenuCodex / BmMenuAuto). ---------- */
.a-pop.bm-fen{width:400px;max-width:min(400px,calc(100vw - 16px));font-family:var(--a-police);font-size:1rem;
  color:var(--a-t1);text-align:left;-webkit-font-smoothing:antialiased}
.bm-fen-h{display:flex;align-items:center;gap:8px;margin:2px 0 8px}
.bm-fen-sym{flex:none;font-size:1.15rem;color:var(--a-t2)}
.bm-fen-t{font-weight:600;color:var(--a-t1)}
.bm-fen-pill{margin-left:auto;display:inline-flex;align-items:baseline;gap:4px;padding:2px 9px;border-radius:999px;
  background:color-mix(in srgb,var(--c,var(--a-bleu)) 12%,transparent);color:var(--a-t2);font-size:.846rem;white-space:nowrap}
.bm-fen-pill b{font-size:1rem;font-weight:700;color:var(--c,var(--a-bleu))}
.bm-fen-pill--zero{background:var(--a-remplir2)}
.bm-fen-pill--zero b{color:var(--a-t2)}
.bm-fen-big{margin-left:auto;color:var(--a-t2);font-size:.846rem;white-space:nowrap}
.bm-fen-big b{font-size:1.15rem;font-weight:700;color:var(--a-t1)}
.bm-fen-etat{margin:-4px 0 6px;color:var(--a-t2);font-size:.846rem}
.bm-fen-ko{color:var(--a-rouge);font-weight:600}
.bm-fen-bl{color:var(--a-vif);font-weight:600}
.bm-fen-lg{display:flex;flex-wrap:wrap;gap:4px 14px;margin:0 0 6px;color:var(--a-t2);font-size:.846rem}
.bm-fen-lg i{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:5px}
.bm-fen-lg b{color:var(--a-t1);font-weight:600}
.bm-fen-b{max-height:min(440px,58vh);overflow:auto;overscroll-behavior:contain;margin:0 -8px;padding:0 8px}
.bm-fen-vide{margin:14px 0;text-align:center;color:var(--a-t3)}
.bm-fen-jj{display:flex;align-items:baseline;gap:6px;margin:10px 0 2px;font-size:.846rem;font-weight:600;color:var(--a-t2)}
.bm-fen-j:first-child .bm-fen-jj{margin-top:2px}
.bm-fen-jj small{font-size:inherit;font-weight:400;color:var(--a-t3)}
.bm-fen ul{list-style:none;margin:0;padding:0}
.bm-fen-it{display:flex;align-items:flex-start;gap:9px;padding:7px 0;border-top:1px solid var(--a-filet)}
.bm-fen-it:first-child{border-top:0}
.bm-fen-pt{flex:none;width:8px;height:8px;border-radius:50%;margin-top:5px}
.bm-fen-it > .a-pv{flex:none;margin-top:5px}
.bm-fen-corps{min-width:0;display:flex;flex-direction:column;gap:1px}
.bm-fen-corps > span{color:var(--a-t1);line-height:1.3;overflow-wrap:anywhere}
.bm-fen-corps small{color:var(--a-t2);font-size:.846rem;line-height:1.35;overflow-wrap:anywhere}
.bm-fen-corps small a{color:var(--a-bleu);text-decoration:none}
.bm-fen-corps small a:active{opacity:.6}
.bm-fen-s{color:var(--a-t3)}
.bm-fen-fh{border:0;margin:0;padding:0;background:none;font:inherit;text-align:left;color:var(--a-t1);line-height:1.3;
  overflow-wrap:anywhere;cursor:default}
.bm-fen-fh:active{opacity:.6}
.bm-fen-md{margin-top:6px;padding:8px 10px;border-radius:10px;background:var(--a-carte2);color:var(--a-t2);
  font-size:.846rem;line-height:1.4;overflow-wrap:anywhere}
.bm-fen-md--roue{display:grid;place-items:center;padding:12px;background:none}
.bm-fen-md h5{margin:8px 0 3px;font-size:.92rem;color:var(--a-t1)}
.bm-fen-md h5:first-child{margin-top:0}
.bm-fen-md p,.bm-fen-md ul{margin:4px 0}
.bm-fen-md ul{padding-left:16px;list-style:disc}
.bm-fen-md li{margin:2px 0}
.bm-fen-md a{color:var(--a-bleu);text-decoration:none}
.bm-fen-md code{font-family:ui-monospace,SFMono-Regular,monospace;font-size:.9em;background:var(--a-remplir2);padding:0 3px;border-radius:4px}
.bm-fen-md blockquote{margin:4px 0;padding-left:10px;border-left:2px solid var(--a-filet-fort)}
.bm-fen-sec{margin-top:10px}
.bm-fen-sec:first-child{margin-top:0}
.bm-fen-lb{display:block;margin-bottom:2px;font-size:.78rem;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--a-t3)}
.bm-fen-plus.a-btn{margin-top:10px}
@media (hover:hover) and (pointer:fine){
  .bm-fen-corps small a:hover,.bm-fen-md a:hover{text-decoration:underline}
  .bm-fen-fh:hover{opacity:.75}
}

/* Lignes de la fenetre Automatisations (En ce moment, derniers passages, agents ; carte 583, Tito 04/12) */
.bm-tl ul{list-style:none;margin:0;padding:0}
.bm-tl-l{display:flex;align-items:center;gap:10px;width:100%;padding:8px 0;border:0;border-top:1px solid var(--a-filet);margin:0;
  background:none;text-align:left;font:inherit;color:inherit}
.bm-tl li:first-child .bm-tl-l{border-top:0}
.bm-tl-sym{flex:none;display:grid;place-items:center;width:30px;height:30px;color:var(--a-vif);font-size:1rem}
.bm-tl-l .bm-fen-corps{flex:1}
.bm-tl-chev.sf{flex:none;font-size:.7rem;color:var(--a-t3)}
.bm-tl-l:active{opacity:.6}
/* une ligne qui ne s'ouvre pas (Cuisine, appli a part) : meme dessin, sans chevron ni appui */
.bm-tl-l--fixe:active{opacity:1}
@media (hover:hover) and (pointer:fine){
  .bm-tl-l:not(.bm-tl-l--fixe):hover .bm-fen-corps > span{color:var(--a-bleu)}
}
/* Automatisations (Tito 04/12) : le point d'etat d'un agent pose sur son symbole, comme dans la barre */
.bm-tl-sym{position:relative}
.bm-tl-sym > .a-pv{position:absolute;right:1px;bottom:2px;box-shadow:0 0 0 1.5px var(--a-fond-plat)}

/* ---------- Les boutons vivants sur l'iPhone (Tito 04/12 : "Le probleme c'est que ca je ne l'ai pas sur mon iphone", puis
   "Option A mais je veux que ce soit place sous le titre", puis la disposition retenue plus bas) : sous le titre de l'Accueil
   (cibles de 44) ; la fenetre s'ouvre en feuille (bm-fen--tel), sans sa hauteur bornee de popover. */
.bm-vifs-ligne{margin:0 0 20px}
.bm-fen--tel .bm-fen-h > .bm-fen-sym,.bm-fen--tel .bm-fen-h > .bm-fen-t{display:none}
.bm-fen--tel .bm-fen-h{margin-top:0}
.bm-fen--tel .bm-fen-b{max-height:none;overflow:visible;margin:0;padding:0}
/* au doigt : liens des sources et titres des fiches, zone de 44 sans changer le dessin (comme .ac-src de l'Accueil) */
.bm-fen--tel .bm-fen-corps small a,.bm-fen--tel .bm-fen-fh{position:relative}
.bm-fen--tel .bm-fen-corps small a::before,.bm-fen--tel .bm-fen-fh::before{content:"";position:absolute;left:50%;top:50%;
  width:max(44px,calc(100% + 8px));height:44px;transform:translate(-50%,-50%)}
.bm-fen--tel .a-feuille-corps{padding-left:20px;padding-right:20px}
.bm-fen--tel .bm-fen-big{white-space:normal;text-align:right}
/* le nombre vivant de chaque bouton (Mac et iPhone) : la couleur de sa section, il saute quand il monte */
.bm-vif > .bm-n{position:absolute;top:-3px;right:-4px;display:flex}
.bm-n .a-badge{background:var(--c,var(--a-rouge));color:var(--a-sur-rouge)}
/* trois pastilles sur toute la largeur (Tito 04/12 : "garder les trois pastilles de l'option A sans les chiffres", "les
   chiffres dans une petite bulle de l'option B"), sur l'Accueil seulement */
.bm-vt{display:flex;gap:8px;margin:0 var(--a-marge)}
.bm-vt-b{position:relative;display:flex;align-items:center;justify-content:center;flex:1 1 0;min-width:0;height:44px;border:0;margin:0;
  padding:0;border-radius:22px;background:var(--a-carte);color:var(--a-t1);font:inherit;font-size:1.12rem;
  -webkit-tap-highlight-color:transparent;transition:background-color var(--a-duree-courte)}
.bm-vt-b:active,.bm-vt-b.a-on{background:var(--a-appui)}
.bm-vt-s{position:relative;display:inline-grid;place-items:center;flex:none}
.bm-vt-s > .a-pv{position:absolute;right:-4px;bottom:-2px;box-shadow:0 0 0 1.5px var(--a-carte)}
/* la bulle dans le coin de la pastille, comme dans la tuile de l'option B */
.bm-vt-b > .bm-n{position:absolute;top:6px;right:10px;display:flex}

/* ---------- Vivant 3 (Tito 04/12 : pannes et alertes dans Roger « et » sur Telegram, version « C ») : ce qui demande Tito,
   en tete de la fenetre Automatisations. Le rouge = ce qui attend un geste de lui. */
.bm-al-sym{color:var(--a-rouge)}
.bm-al-t{color:var(--a-rouge)}
.bm-al-l{list-style:none;margin:0;padding:0}
.bm-al-l li + li .bm-tl-l{border-top:1px solid var(--a-filet)}
.bm-al-l .bm-fen-corps > span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bm-al-d{display:flex;flex-direction:column;gap:8px;padding:4px 20px 24px}
.bm-al-d h3{margin:0 0 6px;font-size:1.06rem;font-weight:600;line-height:1.3}
.bm-al-d p{margin:0 0 10px;color:var(--a-t1);line-height:1.45}
.bm-al-lb{font-size:.78rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--a-t2)}
