/* ════════════════════════════════════════════════════════════════════════════
   LE TÉLÉPHONE ET LA TABLETTE (2/12/2026) · navigation-mobile.js. Planche validée : _bancs/mobile-nav-2dec.
   Noir neutre du Studio, filets fins, aucun bleu, aucun dégradé. Tout vit sous des media queries : jusqu'à 860 px (téléphone),
   de 861 à 1180 px (iPad). Au-delà, l'ordinateur ne change pas (seuls des éléments masqués par défaut sont déclarés hors requête).
   ════════════════════════════════════════════════════════════════════════════ */
.mn-feuille[hidden],.mn-retour[hidden],.mn-plier,.mn-tout,.mn-pil,.mn-calme{display:none}
/* 2/12 au soir · le retour du téléphone n'a de dessin que sous 860 px : au-dessus il sortait brut (boîte grise, flèche noire) par-dessus le menu de gauche */
.mn-retour{display:none}

/* ── TÉLÉPHONE ── */
@media (max-width:860px){
  /* la barre du bas : collée au bas, cinq entrées, libellé lisible, « Créer » au centre */
  html body.s3 .s3-tabs{left:0;right:0;bottom:0;height:auto;min-height:0;padding:6px max(6px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));border-radius:0;border:0;border-top:1px solid rgba(255,255,255,.08);background:rgba(10,10,12,.94);box-shadow:none;-webkit-backdrop-filter:blur(20px) saturate(1.2);backdrop-filter:blur(20px) saturate(1.2);grid-template-columns:repeat(5,minmax(0,1fr));align-items:stretch}
  html body.s3 .s3-tabs button{min-height:56px;padding:4px 0 2px;gap:4px;font:600 12px/1.1 var(--a3-f,-apple-system,BlinkMacSystemFont,system-ui,sans-serif);letter-spacing:0;color:rgba(243,243,246,.6);border-radius:14px;user-select:none;-webkit-user-select:none;touch-action:manipulation}
  html body.s3 .s3-tabs button span{white-space:nowrap}
  html body.s3 .s3-tabs svg{width:24px;height:24px;stroke-width:1.7;flex:none}
  html body.s3 .s3-tabs button.on,html body.s3 .s3-tabs button.ouvert{color:#f5f5f7}
  html body.s3 .s3-tabs button.on::before{top:3px;width:52px;height:32px;margin-left:-26px;border-radius:16px;background:rgba(255,255,255,.1)}
  html body.s3 .s3-tabs button[data-tab="creer"]{color:#f5f5f7}
  html body.s3 .s3-tabs button[data-tab="creer"] svg{box-sizing:content-box;width:22px;height:22px;padding:5px 15px;border-radius:14px;background:#f5f5f7;color:#0b0b0d;stroke:#0b0b0d;stroke-width:2.2;margin-top:-2px}
  html body.s3 .s3-tabs button[data-tab="creer"]:active svg{background:#d9d9de}
  html body.s3 .s3-tabs button:active{transform:none}
  html body.s3 .s3-tabs button:active>svg{transform:scale(.92)}
  html body.s3 main,html body.s3 #view{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}
  /* les boutons flottants (assistant, invitation à installer) passent au-dessus de la barre */
  html body.s3 .copilot-fab,html body.s3 #r2Pill,html body.s3 #verBadge,html body.s3 .sa-fab,html body.s3 .flf-assist-fab{bottom:calc(84px + env(safe-area-inset-bottom))!important}
  html body.mn-feuille-on .s3-tabs{z-index:250}

  /* le retour en haut à gauche : il dit où il ramène */
  html body.s3 .s3-tete:not([hidden]){gap:2px;padding:0 10px 0 0;color:#f5f5f7;font:500 17px/1 var(--a3-f,system-ui);min-height:44px;max-width:100%}
  html body.s3 .s3-tete span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
  html body.s3 .s3-tete svg{width:22px;height:22px;margin-left:-4px}

  /* le même retour dans l'espace d'un client (vu par lui, ou par le studio qui l'ouvre) */
  html body.ecx-on.mn-retour-on #app .topbar-inner{display:flex!important;align-items:center;gap:8px}
  html body.ecx-on.mn-retour-on #app .topbar-inner .logo{display:none}
  html body.ecx-on.mn-retour-on #app .topbar-inner>.mn-retour{margin-right:auto}
  .mn-retour:not([hidden]){display:inline-flex;align-items:center;gap:2px;min-width:0;max-width:62%;min-height:44px;padding:0 10px 0 0;border:0;background:none;color:inherit;font:500 17px/1 -apple-system,BlinkMacSystemFont,system-ui,sans-serif;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .mn-retour span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
  .mn-retour svg{width:22px;height:22px;flex:none;margin-left:-4px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

  /* « Menu » : une feuille plein écran, la recherche d'abord, toutes les pages en grandes lignes rangées par groupes */
  .mn-feuille{position:fixed;inset:0;z-index:4200;color:#f5f5f7;font-family:var(--a3-f,-apple-system,BlinkMacSystemFont,"SF Pro Text",system-ui,sans-serif);-webkit-font-smoothing:antialiased}
  .mn-menu{display:flex;flex-direction:column;background:#0b0b0d;padding:env(safe-area-inset-top) max(0px,env(safe-area-inset-right)) 0 max(0px,env(safe-area-inset-left));opacity:0;transform:translateY(14px);transition:opacity .22s ease,transform .3s cubic-bezier(.2,.8,.2,1)}
  .mn-menu.on{opacity:1;transform:none}
  .mn-tete{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px 10px;flex:none}
  .mn-tete h2{margin:0;font-size:30px;font-weight:700;letter-spacing:-.03em;line-height:1.1}
  .mn-x{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.08);color:#f5f5f7;cursor:pointer;flex:none;-webkit-tap-highlight-color:transparent}
  .mn-x svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
  .mn-cherche{display:flex;align-items:center;gap:10px;margin:4px 20px 8px;padding:0 14px;height:48px;border-radius:14px;background:rgba(255,255,255,.07);flex:none}
  .mn-cherche svg{width:19px;height:19px;flex:none;fill:none;stroke:rgba(245,245,247,.55);stroke-width:2;stroke-linecap:round}
  .mn-cherche input{flex:1;min-width:0;height:100%;border:0;background:none;outline:0;color:#f5f5f7;font:400 16px/1.2 inherit;-webkit-appearance:none;appearance:none}
  .mn-cherche input::placeholder{color:rgba(245,245,247,.45)}
  .mn-cherche input::-webkit-search-cancel-button{-webkit-appearance:none}
  .mn-cherche:focus-within{box-shadow:0 0 0 1.5px rgba(245,245,247,.35)}
  .mn-corps{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:4px 20px calc(28px + env(safe-area-inset-bottom))}
  .mn-groupe{margin:0 0 8px}
  .mn-groupe h3{margin:18px 0 6px;padding:0 2px;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:rgba(245,245,247,.5)}
  .mn-ligne{display:flex;align-items:center;gap:14px;width:100%;min-height:52px;padding:6px 4px;border:0;border-radius:14px;background:none;color:#f5f5f7;font:500 17px/1.2 inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
  .mn-ligne:active{background:rgba(255,255,255,.07)}
  .mn-ligne.on{background:rgba(255,255,255,.08)}
  .mn-ic{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:rgba(255,255,255,.07);flex:none}
  .mn-ic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  .mn-nom{flex:1;min-width:0;overflow-wrap:anywhere}
  .mn-nom small{display:block;margin-top:3px;font-size:13px;font-weight:400;color:rgba(245,245,247,.55)}
  .mn-nb{margin-left:auto;padding-left:8px;font:500 15px/1 inherit;font-style:normal;color:rgba(245,245,247,.55)}
  .mn-nb-fort{min-width:24px;height:24px;padding:0 7px;border-radius:12px;background:#ff6b52;color:#fff;display:grid;place-items:center;font-weight:700;font-size:13px}
  .mn-doux{color:rgba(245,245,247,.7)}
  .mn-partout{margin-top:14px}

  /* « Créer » : une feuille par le bas, les quatre gestes du quotidien en tête */
  .mn-creer{display:flex;flex-direction:column;justify-content:flex-end}
  .mn-voile{position:absolute;inset:0;background:rgba(0,0,0,.55);opacity:0;transition:opacity .2s ease}
  .mn-creer.on .mn-voile{opacity:1}
  .mn-panneau{position:relative;max-height:calc(100% - 48px - env(safe-area-inset-top));display:flex;flex-direction:column;border-radius:24px 24px 0 0;background:#141416;border-top:1px solid rgba(255,255,255,.08);padding:0 max(0px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(0px,env(safe-area-inset-left));transform:translateY(24px);opacity:0;transition:transform .3s cubic-bezier(.2,.8,.2,1),opacity .2s ease}
  .mn-creer.on .mn-panneau{transform:none;opacity:1}
  .mn-poignee{display:block;width:40px;height:5px;margin:8px auto 0;border-radius:3px;background:rgba(255,255,255,.22)}
  .mn-creer .mn-tete{padding:8px 20px 4px}
  .mn-creer .mn-tete h2{font-size:24px}
  .mn-creer .mn-corps{padding:4px 16px 20px}
  .mn-creer .mn-fort .mn-ic{background:#f5f5f7;color:#0b0b0d}
  .mn-sep{margin:14px 4px 4px;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:rgba(245,245,247,.5)}

  /* l'accueil court : le prochain geste, le prochain tournage, ce qui est en retard ; « Tout voir » déplie le reste */
  html body.s3:not(.mn-tout-on) #view #a4G>:not(#a3Geste):not(#a2K4):not(#mnPilote):not(#mnCalme),html body.s3:not(.mn-tout-on) #view #a2K4>:not(#a2Tour),html body.s3:not(.mn-tout-on) #view #stuCap{display:none!important}
  html body.s3:not(.mn-tout-on) #view #a4G{display:flex!important;flex-direction:column;gap:12px}
  html body.s3:not(.mn-tout-on) #view #a4G>*{align-self:stretch;min-width:0}
  html body.s3:not(.mn-tout-on) #view #a2K4{grid-template-columns:minmax(0,1fr)!important}
  html body.s3:not(.mn-tout-on) #view #a4G>#a3Geste{order:-1;margin:0!important}
  html body.s3:not(.mn-tout-on) #view #a4G>#a2K4{margin:0!important}
  /* 2/12 midi : le pilotage en tête (quatre tuiles d'argent), puis le geste, le tournage, et le retard dit calmement ; rien de tout ça quand « Tout voir » est ouvert */
  html body.s3.mn-tout-on #view #mnPilote,html body.s3.mn-tout-on #view #mnCalme{display:none!important}
  html body.s3 #view #a4G>#mnPilote{order:-2}
  html body.s3 #view #a4G>#mnCalme{order:1}
  html body.s3 #view .mn-pil{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0}
  html body.s3 #view .mn-pil-t{all:unset;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;gap:8px;min-width:0;min-height:84px;padding:14px;border-radius:18px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.045);color:#f5f5f7;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
  html body.s3 #view .mn-pil-t:active{background:rgba(255,255,255,.08)}
  html body.s3 #view .mn-pil-t:focus-visible{outline:2px solid rgba(245,245,247,.7);outline-offset:2px}
  html body.s3 #view .mn-pil-v{display:flex;align-items:baseline;gap:4px;min-width:0;font:600 22px/1.1 var(--a3-f,system-ui);letter-spacing:-.02em;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html body.s3 #view .mn-pil-v small{font:500 12px/1 var(--a3-f,system-ui);letter-spacing:0;color:rgba(235,235,245,.5)}
  html body.s3 #view .mn-pil-l{font:500 13px/1.25 var(--a3-f,system-ui);color:rgba(235,235,245,.62)}
  html body.s3 #view .mn-calme{display:flex;flex-direction:column;margin:0;border-radius:18px;border:1px solid rgba(255,255,255,.08);overflow:hidden}
  html body.s3 #view .mn-calme-l{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;min-height:48px;padding:0 14px 0 16px;color:rgba(245,245,247,.82);font:500 15px/1.25 var(--a3-f,system-ui);cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
  html body.s3 #view .mn-calme-l+.mn-calme-l{border-top:1px solid rgba(255,255,255,.07)}
  html body.s3 #view .mn-calme-l:active{background:rgba(255,255,255,.05)}
  html body.s3 #view .mn-calme-l:focus-visible{outline:2px solid rgba(245,245,247,.7);outline-offset:-2px}
  html body.s3 #view .mn-calme-l span{flex:1;min-width:0}
  html body.s3 #view .mn-calme-l i{width:7px;height:7px;flex:none;border-radius:50%;background:#ff6b5a}
  html body.s3 #view .mn-calme-l.vif{color:#f5f5f7}
  html body.s3 #view .mn-calme-l svg{width:16px;height:16px;flex:none;fill:none;stroke:rgba(235,235,245,.4);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  html body.s3 #view .mn-tout{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;min-height:52px;margin:16px 0 8px;padding:0 18px;border:1px solid rgba(255,255,255,.1);border-radius:16px;background:none;color:rgba(245,245,247,.75);font:500 15px/1.2 var(--a3-f,system-ui);cursor:pointer;-webkit-tap-highlight-color:transparent}
  html body.s3 #view .mn-tout svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

  /* la ligne de l'objectif (accueil) passe à la ligne jusqu'à 860 px, pas seulement sous 760 : elle débordait de 111 px sur l'iPad Air en portrait */
  html body .stu-cap{flex-wrap:wrap;gap:8px 14px;max-width:100%;box-sizing:border-box}
  html body .stu-cap>.stu-x-mono{flex:1 1 100%}
  html body .stu-cap-o{margin-left:auto;white-space:normal}

  /* l'espace d'un client au téléphone : barre du bas plus lisible, rien de rikiki (les couleurs du client restent les siennes) */
  html body.ecx-on.ecx-tab-on:not(.ecx-verre) .ecx-tab{height:auto;min-height:68px;padding:6px}
  html body.ecx-on .ecx-tab button{min-height:56px;font-size:12px;gap:4px;letter-spacing:0}
  html body.ecx-on .ecx-tab .ecx-i{width:22px;height:22px}
}
@media (max-width:380px){
  html body.s3 .s3-tabs button{font-size:11px}
  html body.ecx-on .ecx-tab button{font-size:11px}
}
@media (prefers-reduced-motion:reduce){
  .mn-menu,.mn-panneau,.mn-voile{transition:none}
}

/* ── IPAD (861 à 1180 px) : les noms à côté des icônes, sauf si on replie la barre ── */
@media (min-width:861px) and (max-width:1180px){
  html body.s3 .mn-plier{display:grid;place-items:center;width:36px;height:36px;margin-left:auto;border:1px solid rgba(255,255,255,.1);border-radius:11px;background:none;color:rgba(243,243,246,.75);cursor:pointer;flex:none;position:relative}
  html body.s3 .mn-plier::after{content:"";position:absolute;inset:-4px}
  html body.s3 .mn-plier svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  html body.s3:not(.mn-noms) .s3-marque{flex-wrap:wrap;justify-content:center}
  html body.s3:not(.mn-noms) .mn-plier{margin:4px auto 0}

  html body.mn-noms.stu-on.lin.verre.stu2.s3{--ecx-side:252px}
  html body.mn-noms.stu-on.lin.verre.stu2.s3 .stu-side{width:224px!important;padding:14px 10px 10px!important}
  html body.mn-noms.s3 .s3-marque{flex-direction:row;justify-content:flex-start;align-items:center;gap:9px;padding:2px 4px 10px}
  html body.mn-noms.s3 .s3-marque b{display:inline;font-size:16px}
  html body.mn-noms.s3 .s3-marque .s3-ent{display:inline-flex;padding:4px 7px;font-size:10px}
  html body.mn-noms.s3 .s3-cherche,html body.mn-noms.s3 .s3-oui{justify-content:flex-start;padding:0 10px;gap:10px}
  html body.mn-noms.s3 .s3-cherche{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.08)}
  html body.mn-noms.s3 .s3-cherche span,html body.mn-noms.s3 .s3-oui span{display:inline}
  html body.mn-noms.s3 .s3-oui em{position:static;margin-left:auto}
  html body.mn-noms.s3 #s3Menu{height:auto;margin:0;padding:14px 10px 6px;background:none;font-size:10.5px;letter-spacing:.09em;color:rgba(243,243,246,.5)}
  html body.mn-noms.s3 .s3-sec{display:block}
  html body.mn-noms.stu-on.lin.verre.stu2.s3 .stu-side .ecx-nav>button[data-stu]{justify-content:flex-start;gap:11px;height:42px;min-height:42px;padding:0 10px;font-size:14px}
  html body.mn-noms.stu-on.lin.verre.stu2.s3 .stu-side .ecx-nav>button[data-stu] .stu-long{display:inline;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html body.mn-noms.stu-on.lin.verre.stu2.s3 .stu-side .ecx-nav>button[data-stu] .stu-court{display:none}
  html body.mn-noms.stu-on.lin.verre.stu2.s3 .stu-side .ecx-nav>button[data-stu] .ecx-nb:not([hidden]){display:grid;margin-left:auto}
  html body.mn-noms.s3 .s3-pl{justify-content:flex-start;padding:0 10px;gap:11px}
  html body.mn-noms.s3 .s3-pl span{display:inline}
  html body.mn-noms.s3 .s3-pl .s3-ch{display:block;margin-left:auto}
  html body.mn-noms.s3 .s3-esp{justify-content:flex-start;padding:6px 8px;gap:10px}
  html body.mn-noms.s3 .s3-esp>span:not(.ecx-logo){display:block;min-width:0}
  html body.mn-noms.s3 .s3-esp b,html body.mn-noms.s3 .s3-esp small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html body.mn-noms.s3 .s3-pied button{justify-content:flex-start;padding:0 10px;gap:11px}
  html body.mn-noms.s3 .s3-pied span{display:inline}
  html body.mn-noms.s3 .s3-bas{justify-content:flex-start;padding:12px 6px 4px}
  html body.mn-noms.s3 .s3-bt{display:block}
  html body.mn-noms.s3 .s3-bas .s3-ch{display:block;margin-left:auto}
  /* le menu d'une appli (Projets, Mails…) : une ligne par entrée, icône et nom, comme sur l'ordinateur */
  html body.mn-noms.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button[data-mo]:not(.lin-retour),
  html body.mn-noms.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button.s3-mpl,
  html body.mn-noms.s3[data-page="mails"] #stuSide.stu-side[data-mode="projet"] .ecx-nav>button[data-mo].mq-dos:not(.lin-retour){flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;gap:11px!important;min-height:42px!important;height:42px!important;padding:0 10px!important;font-size:14px!important;text-align:left!important}
  html body.mn-noms.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button[data-mo]:not(.lin-retour)>span.stu-long,
  html body.mn-noms.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button.s3-mpl>span.stu-long{display:block!important;max-width:none!important;font-size:14px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html body.mn-noms.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button[data-mo]:not(.lin-retour)>span.s3-mc,
  html body.mn-noms.s3[data-page="mails"] #stuSide.stu-side[data-mode="projet"] .ecx-nav>button[data-mo].mq-dos:not(.lin-retour)>span.s3-mc{display:none!important}
  html body.mn-noms.s3[data-page="mails"] #stuSide.stu-side[data-mode="projet"] .ecx-nav>button[data-mo].mq-dos:not(.lin-retour)>span:not(.s3-mc):not(.ecx-nb){display:block!important}
  html body.mn-noms.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button[data-mo]:not(.lin-retour)>.ecx-nb{position:static!important;margin-left:auto}
  html body.mn-noms.stu-on.lin.rail-on .stu-side[data-mode="projet"] .ecx-nav>button.lin-retour span{display:inline}
  html body.mn-noms.stu-on.lin.rail-on .stu-side[data-mode="projet"] .lin-ctx{display:block}
}
