/* ==================== Menus et titres de page : petites corrections (owner, 2026-12-01) ==================== */

/* Menu « Tous ▾ » des Utilisateurs (team.js, US_ROLE_ICONS) : une icône par ligne, le nombre à droite sur la même ligne,
   toutes les lignes de la même hauteur (avant : nombre dessous, lignes sans nombre plus basses). */
.tf-menu.us-role-menu { min-width: 240px !important; padding: 6px; }
.tf-menu.us-role-menu .tf-opt { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; font-size: 14.5px; }
.tf-menu.us-role-menu .tf-opt > span { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: start; }
.tf-menu.us-role-menu .tf-opt > span > small { margin: 0 0 0 auto; display: inline-block; min-width: 26px; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.4; text-align: center; }
html[dir="rtl"] .tf-menu.us-role-menu .tf-opt > span > small { margin: 0 auto 0 0; }
.tf-menu.us-role-menu .tf-opt.on > span > small { background: var(--gold-soft, rgba(201, 164, 92, .15)); color: var(--gold); }
.tf-menu.us-role-menu .tf-ic svg { width: 19px; height: 19px; }
@media (hover: hover) {
  .tf-menu.us-role-menu .tf-opt:not(.on):hover .tf-ic svg { stroke: var(--bg); }
  .tf-menu.us-role-menu .tf-opt:not(.on):hover > span > small { background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); }
}

/* Titre d'une page à vues (Planning, Liste, Carte, Chiffres…) : sur ordinateur, « html.ph-vside .ph-vt h1 svg { display: none } »
   (app.css, pour cacher la flèche ▾) cachait aussi l'icône du menu devant le titre. L'icône reste visible ; elle ne tourne
   pas non plus quand le menu s'ouvre sur téléphone (seule la flèche tourne). */
html.ph-vside .ph-vt h1 .ph-ic svg { display: block; }
.ph-vt h1 .ph-ic svg, .ph-vt[aria-expanded="true"] h1 .ph-ic svg { transform: none; }
/* Même taille que les autres titres (1,05 em, comme « Utilisateurs ») : la règle de la flèche (20 px, trait épais) ne s'applique pas à l'icône. */
html body .ph-vt h1 .ph-ic { width: 1.05em; height: 1.05em; }
html body .ph-vt h1 .ph-ic svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.7; }

/* Téléphone : plus de menu sous le titre (« Onglet ▾ ») ni de point rouge dessus ; les pages se choisissent depuis l'icône
   du bas, petite bulle au-dessus de l'icône (design 3, owner 2026-12-01 ; app.js phvOpen). */
@media (max-width: 999px) {
  html body .ph-vt { pointer-events: none; cursor: default; }
  html body .ph-vt h1 > svg { display: none; }
  html body .ph-vt.dot h1::after { display: none; }
}
.phv { position: fixed; inset: 0; z-index: 9000; }
.phv-dim { position: absolute; inset: 0; background: rgba(14, 27, 61, .38); opacity: 0; transition: opacity .2s ease-out; }
.phv.in .phv-dim { opacity: 1; }
.phv-pop { position: fixed; min-width: 200px; max-width: calc(100vw - 32px); background: var(--panel, #fff); color: var(--text); border-radius: 16px; padding: 6px; box-shadow: 0 12px 32px rgba(14, 27, 61, .22); opacity: 0; transform: translateY(8px) scale(.97); transform-origin: var(--phv-ax, 50%) 100%; transition: opacity .2s ease-out, transform .25s cubic-bezier(.2, .8, .2, 1); }
.phv.in .phv-pop { opacity: 1; transform: none; }
/* Pas de petite pointe sous la bulle (owner, 2026-12-04 : « Don't add a little triangle under the bubble menu popup ») */
html body .phv-it { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-align: start; cursor: pointer; transition: background .3s, color .3s; }
html body .phv-it.on { background: var(--gold-soft, rgba(205, 165, 91, .14)); font-weight: 800; }
.phv-ic { display: inline-grid; place-items: center; width: 18px; height: 18px; color: var(--gold); flex: none; }
.phv-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.phv-l { flex: 1; min-width: 0; }
.phv-it .ph-vdot { position: static; width: 8px; height: 8px; border-radius: 50%; background: #d64545; flex: none; }
@media (hover: hover) { html body .phv-it:hover { background: var(--text); color: var(--bg); } html body .phv-it:hover .phv-ic { color: var(--bg); } }
html body .tabs.mode-tabs > button.phv-lift { background: var(--gold-soft, rgba(205, 165, 91, .14)); border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .phv-dim, .phv-pop { transition: none; } }

/* Téléphone : page « Compte » en tiroir au-dessus de la barre du bas (owner, 2026-12-01 ; app.js acctSheetSync). La page
   d'avant reste derrière, figée, sans voile sombre (#acctBack, owner 2026-12-01) ; toucher le haut ou tirer la poignée referme. */
@media (max-width: 999px) {
  #acctBack { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); pointer-events: none; }
  html.acct-sheet body { background: transparent; }
  html.acct-sheet, html.acct-sheet body { overscroll-behavior-y: none; }   /* tirer le tiroir n'étire plus la page derrière (owner, 2026-12-04) */
  /* Tiroir en haut : le téléphone ne prend plus du tout le geste « doigt vers le bas » (seulement remonter et glisser de côté),
     c'est le tiroir qui le suit ; avant, l'app Android tirait aussi la liste derrière (owner, 2026-12-04 : « still does »). */
  html.acct-sheet.acct-top .settings.ac8 { touch-action: pan-x pan-down; }
  html.acct-sheet body > #app { position: relative; z-index: 1; background: transparent; }
  /* Le tiroir s'arrête au ras de la barre du bas : plus de 96 px de vide où la page d'avant se voyait à travers (owner, 2026-12-04) ;
     l'air sous « Se déconnecter » est dans le tiroir */
  html.acct-sheet body > #app:has(> .tabs.mode-tabs) { padding-bottom: var(--tabbar-h, 50px); }
  html.acct-sheet .settings.ac8 { padding-bottom: 24px; }
  html.acct-sheet body > #app > .wrap { background: transparent; }
  html.acct-sheet body > #app > .wrap > .top { display: none; }
  /* Page Compte en cours de chargement (« Mon compte » + « Chargement… ») : invisible, le tiroir monte dès qu'il est prêt (owner, 2026-12-02 : un texte clignotait en haut) */
  html.acct-sheet body > #app > .wrap > .settings:not(.ac8):has(> #sbody > .empty) { visibility: hidden; }
  html.acct-sheet .settings.ac8 { position: relative; margin: max(72px, 12vh) 0 0; border-radius: 22px 22px 0 0; overflow: clip; background: var(--bg); min-height: calc(100dvh - max(72px, 12vh)); box-shadow: 0 -8px 30px rgba(14, 27, 61, .18); }
  html.acct-sheet .settings.ac8 > .ac8-hero { padding-top: 28px; }
  html.acct-sheet .settings.ac8 > .ac8-hero::before { content: ''; position: absolute; top: 9px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgba(255, 255, 255, .35); }
  html.acct-in .settings.ac8 { animation: acctUp .34s cubic-bezier(.2, .8, .2, 1); }
  html.acct-out .settings.ac8 { transform: translateY(100vh); transition: transform .22s cubic-bezier(.4, 0, 1, 1); }
}
@keyframes acctUp { from { transform: translateY(100vh); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { html.acct-in .settings.ac8 { animation: none; } html.acct-out .settings.ac8 { transition: none; } }

/* Version : nouvelle adresse des fichiers (2026-12-02, Cloudflare avait gardé un app.js coupé pendant un envoi). */
