/* Coque commune : en-tête, menu, bannière « À régler de votre côté », « Signaler un bug », barre du bas du téléphone.
   Valeurs recopiées du prototype Claude Design, version 73 (Topbar.dc.html, Main.dc.html, *Mobile.dc.html).
   Chargé après app.css. Les couleurs de marque viennent des variables --app-* d'app.css (vert et jaune McDonald's par
   défaut, Burger King et Pitaya par data-brand) : la coque garde les couleurs de chaque enseigne.
   tokens.css reste la copie exacte des jetons Fraum (vérifiée par les tests) : les quelques valeurs du prototype qui
   n'ont pas d'équivalent sont ici, préfixe --shell-. Téléphone : moins de 768 px. */

:root {
  --shell-soft: #EEF2EA;                      /* entrée ouverte du menu, boutons « Annuler », « Fermer » */
  --shell-field: #B9C4B3;                     /* contour du champ du signalement */
  --shell-on-top-soft: rgb(255 255 255 / 0.16);   /* tuiles et boutons sur le bandeau de couleur */
  --shell-on-top-hover: rgb(255 255 255 / 0.26);
  --shell-pop-shadow: 0 14px 36px rgb(0 0 0 / 0.28);
  --shell-drawer-shadow: -8px 0 32px rgb(0 0 0 / 0.25);
  --shell-scrim: rgb(20 25 22 / 0.45);
  --shell-bar-h: 69px;                        /* barre du bas : 6 + 52 + 10 px, plus son trait du haut */
}
:root[data-brand="burgerking"] { --shell-soft: #F3E6D4; --shell-field: #CDB9A1; }
:root[data-brand="pitaya"] { --shell-soft: #EEE8DC; --shell-field: #C9C0B0; }
:root[data-brand="quick"] { --shell-soft: #F6E7E5; --shell-field: #D3BAB6; }
:root[data-brand="otacos"] { --shell-soft: #F1E9DF; --shell-field: #CDBFAE;
  --shell-on-top-soft: rgb(0 0 0 / 0.12); --shell-on-top-hover: rgb(0 0 0 / 0.2); }   /* boutons orange plus foncé : texte blanc lisible */
:root[data-brand="otacos"] .topbar .brand { background: transparent; }   /* logo Fraum blanc sans case, comme O'TACOS */
:root[data-brand="otacos"] .topbar .brand:hover { background: var(--shell-on-top-soft); }
:root[data-brand="kfc"] { --shell-soft: #F5EAE8; --shell-field: #D6BEBA;
  --shell-on-top-soft: rgb(0 0 0 / 0.14); --shell-on-top-hover: rgb(0 0 0 / 0.22); }   /* boutons rouge plus foncé, comme O'Tacos */
:root[data-brand="kfc"] .topbar .brand { background: transparent; }   /* logo Fraum blanc sans case, comme le logo KFC */
:root[data-brand="kfc"] .topbar .brand:hover { background: var(--shell-on-top-soft); }
:root[data-brand="generique"] { --shell-soft: #E8EEF0; --shell-field: #B5C4CB; }

/* ---------- En-tête (bureau) : logo Fraum, logo de l'enseigne, semaine, « Signaler un bug », « Réglages » ---------- */
.shell { display: block; min-height: 100vh; }
.content { min-width: 0; }
.topbar { position: relative; z-index: 20; background: var(--app-top); color: var(--app-on-top); font-size: 16px; line-height: 1.4; }
/* Une seule rangée (prototype v73) : quand la place manque (commutateur de société, fenêtre étroite), la semaine et le
   commutateur rétrécissent au lieu de pousser « Réglages » à la ligne. */
.topbar__row { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; padding: 14px 20px 0; box-sizing: border-box; }
.topbar__id { order: 1; flex: 0 1 auto; display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; margin-right: auto; min-width: 0; }
.topbar .brand { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 104px; height: 48px;
  padding: 0; border-radius: 10px; background: var(--shell-on-top-soft); color: var(--app-on-top); text-decoration: none; }
.topbar .brand:hover { background: var(--shell-on-top-hover); color: var(--app-on-top); }
.topbar .brand .fraum-logo { width: 72px; height: 16px; opacity: 1; }
.brandmark { display: inline-flex; align-items: center; justify-content: center; flex: none; color: inherit; border-radius: 6px; }
.brand-logo { display: block; height: 48px; width: auto; max-width: 112px; object-fit: contain; border-radius: 6px; }
/* Logo d'une enseigne en tuile (Burger King, Pitaya) : cerné pour se détacher du bandeau, comme avant. */
.brand-logo:not(.brand-logo--arches) { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.35); }
/* McDonald's : les arches jaunes officielles, sans fond, directement sur le vert. */
.brand-logo--arches { width: 40px; height: 35px; max-width: none; border-radius: 0; }
/* O'Tacos : le mot-logo blanc sans fond, directement sur le bandeau orange (pas de tuile ni de cerne). */
:root[data-brand="otacos"] .brand-logo { height: 22px; max-width: 132px; border-radius: 0; box-shadow: none; }
/* KFC : le logo officiel (seau blanc du Colonel, bandes rouges) directement sur le bandeau rouge, sans tuile ni cerne. */
:root[data-brand="kfc"] .brand-logo { height: 46px; max-width: 52px; border-radius: 0; box-shadow: none; }

/* Société (MAP, PIM…) : commutateur à côté du logo, seulement si le client en a au moins deux. Même hauteur que la
   pilule de la semaine ; trop long pour la rangée, il défile sur place. Téléphone : en tête du menu (#scope-menu). */
.scope { display: inline-flex; flex: 0 1 auto; flex-wrap: nowrap; min-width: 0; max-width: 100%; gap: 2px; padding: 3px; box-sizing: border-box;
  border-radius: 12px; background: var(--shell-on-top-soft); overflow-x: auto; scrollbar-width: none; }
.scope::-webkit-scrollbar { display: none; }
.scope__btn { flex: none; min-height: 42px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--app-on-top); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.scope__btn:hover { background: rgb(255 255 255 / 0.14); }
.scope__btn[aria-pressed="true"] { background: var(--app-accent); color: var(--app-on-accent); }
.scope__btn:focus-visible { outline-offset: -2px; }
.scope-menu { display: none; }

/* Choix de la semaine : ‹ [Semaine 43  du 19 au 25 oct. 2026 · en cours ⌄] › ; la liste s'ouvre dessous. */
.weekpick { order: 2; position: relative; flex: 0 12 auto; display: inline-flex;   /* rétrécit d'abord (dates en « … ») */ align-items: center; gap: 2px; padding: 3px;
  border-radius: 999px; background: var(--shell-on-top-soft); color: var(--app-on-top); max-width: 100%; box-sizing: border-box;
  min-width: 232px; }   /* jamais moins que « ‹ Semaine 41 ⌄ › » : au-delà, c'est le commutateur de société qui défile */
.weekpick__step { flex: none; min-width: 40px; min-height: 42px; padding: 0; border: 0; border-radius: 9px; background: transparent;
  color: inherit; font: inherit; font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer; }
.weekpick__step:hover:not(:disabled) { background: rgb(255 255 255 / 0.14); }
.weekpick__step:disabled { opacity: 0.35; cursor: default; }
.weekpick__box { display: inline-flex; flex: 0 1 auto; min-width: 0; }
.weekpick__trigger { flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; justify-content: flex-start; gap: 4px 10px;
  min-height: 46px; padding: 4px 14px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit;
  text-align: left; cursor: pointer; }
.weekpick__trigger:hover { background: rgb(255 255 255 / 0.14); }
.weekpick__num { font-size: 16px; font-weight: 800; white-space: nowrap; }
.weekpick__range { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 500; opacity: 0.9; white-space: nowrap; }
.weekpick__short { display: none; }
.weekpick__chev { flex: none; display: inline-block; width: 8px; height: 8px; margin: -3px 0 0 2px; box-sizing: border-box;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.weekpick__trigger[aria-expanded="true"] .weekpick__chev { transform: rotate(-135deg); margin-top: 3px; }
.weekpick__panel { position: fixed; z-index: 60; max-height: 380px; overflow-x: hidden; overflow-y: auto; padding: 6px; box-sizing: border-box;
  border: 1px solid var(--app-line); border-radius: 14px; background: var(--app-surface); color: var(--app-ink); box-shadow: var(--shell-pop-shadow); }
.weekpick__month { padding: 10px 12px 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--app-muted); }
.weekpick__opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 12px; border: 0; border-radius: 10px;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.weekpick__opt:hover, .weekpick__opt[aria-selected="true"] { background: var(--shell-soft); }
.weekpick__opt:focus-visible { outline: none; background: var(--shell-soft); box-shadow: inset 0 0 0 2px var(--app-primary); }
.weekpick__optmain { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.weekpick__optline { display: flex; align-items: center; gap: 8px; }
.weekpick__optnum { font-weight: 700; }
.weekpick__optrange { font-size: 14px; color: var(--app-muted); }
.weekpick__tag { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--app-accent); color: var(--app-on-accent); }
.weekpick__check { flex: none; width: 16px; text-align: center; font-weight: 800; color: var(--app-primary); }

/* « Signaler un bug » et « Réglages » : deux boutons clairs sur le bandeau, à droite. */
.topbar__btn { order: 3; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px;
  padding: 0 16px; border: 0; border-radius: 10px; background: var(--shell-on-top-soft); color: var(--app-on-top); font: inherit;
  font-size: 15px; font-weight: 700; cursor: pointer; }
.topbar__btn:hover { background: var(--shell-on-top-hover); }
.topbar__btn svg { flex: none; display: block; }
.topbar__bug { line-height: 1.2; }
.topbar__sm { display: none; }

/* Onglets du tableau de bord, sous la rangée du logo. */
.topbar .tabs { display: flex; flex-wrap: nowrap; gap: 0 4px; margin: 0; padding: 12px 20px 0; border: 0; overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; box-sizing: border-box; }
.topbar .tabs::-webkit-scrollbar { display: none; }
.topbar .tab { position: relative; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin: 0; padding: 0 16px; min-height: 48px;
  box-sizing: border-box; background: none; font-size: 15px; line-height: 18px; font-weight: 500; opacity: 0.88; white-space: nowrap;
  color: var(--app-on-top); text-decoration: none; border: 0; border-bottom: 4px solid transparent; cursor: pointer; }
.topbar .tab:hover { background: rgb(255 255 255 / 0.12); color: var(--app-on-top); opacity: 1; }
.topbar .tab[aria-current="page"] { font-weight: 800; opacity: 1; border-bottom-color: var(--app-accent); }
.tab__icon, .tab__short { display: none; }
/* Fenêtre étroite (tablette, demi-écran d'ordinateur ; audit EC-18) : app.js (`fitTabs`) mesure la rangée ; quand elle
   déborde, les noms courts (« Titres », « Journal des ventes »), puis P&L, Journal des ventes et Analyses passent en
   tête du menu, comme sur téléphone. Plus aucun onglet hors de l'écran. */
.shell--tabs-short .topbar .tab { padding: 0 12px; }
.shell--tabs-short .topbar .tab:has(> .tab__short) > .tab__label { display: none; }
.shell--tabs-short .topbar .tab > .tab__short { display: inline; }
.shell--tabs-few .topbar .tab--more { display: none; }
.shell--tabs-few .nav .nav__phone { display: block; }
.topbar .tab__count { min-width: 36px; box-sizing: border-box; padding: 1px 14px; border-radius: 11px; background: var(--app-accent);
  color: var(--app-on-accent); font-size: 12px; font-weight: 700; line-height: 14px; text-align: center; }

.topbar a:focus-visible, .topbar button:focus-visible { outline: 2px solid var(--app-on-top); outline-offset: 2px; }
.topbar .tab:focus-visible { outline-offset: -4px; border-radius: 8px; }

/* ---------- « Signaler un bug » : petit panneau sous l'en-tête, à droite ---------- */
.bugpanel { position: absolute; z-index: 45; top: calc(100% + 8px); right: 20px; width: 360px; max-width: calc(100% - 40px); padding: 16px;
  box-sizing: border-box; border: 1px solid var(--app-line); border-radius: 14px; background: var(--app-surface); color: var(--app-ink);
  box-shadow: var(--shell-pop-shadow); }
.bugpanel__title { margin: 0 0 12px; font-size: 18px; font-weight: 700; color: var(--app-top); }
.bugpanel__label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.bugpanel__text { display: block; width: 100%; min-height: 96px; padding: 10px 12px; box-sizing: border-box; border: 1px solid var(--shell-field);
  border-radius: 10px; background: var(--app-surface); color: var(--app-ink); font: inherit; font-size: 16px; resize: vertical; }
.bugpanel__text:focus-visible { outline: 2px solid var(--app-primary); outline-offset: 1px; }
.bugpanel__err { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--app-bad-ink); }
.bugpanel__done { margin: 0; font-size: 16px; }
.bugpanel__acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.bugpanel__btn { min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--shell-soft); color: var(--app-ink);
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.bugpanel__btn--send { background: var(--app-top); color: var(--app-on-top); }
.bugpanel__btn:disabled { opacity: 0.6; cursor: default; }
.bugpanel .bugpanel__btn:focus-visible { outline: 2px solid var(--app-primary); outline-offset: 2px; }

/* ---------- Menu « Réglages » (« Menu » sur téléphone) : tiroir à droite ---------- */
.sidebar { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: 320px; max-width: 88vw; height: 100%; overflow-y: auto;
  display: flex; flex-direction: column; padding: 20px 16px; box-sizing: border-box; background: var(--app-surface); color: var(--app-ink);
  box-shadow: var(--shell-drawer-shadow); transform: translateX(102%); visibility: hidden;
  transition: transform 0.18s ease-out, visibility 0s 0.18s; }
.sidebar.is-open { transform: none; visibility: visible; transition: transform 0.18s ease-out; }
.nav-scrim { position: fixed; inset: 0; z-index: 45; background: var(--shell-scrim); }
.sidebar__inner { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.sidebar__head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 12px; }
.sidebar__title { margin: 0; padding: 0; font-size: 18px; font-weight: 700; color: var(--app-top); }
.sidebar__close { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: var(--shell-soft); color: var(--app-ink);
  font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.nav { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: block; padding: 8px; min-height: 40px; box-sizing: border-box; border-radius: 8px; font-size: 16px; line-height: 24px;
  color: var(--app-ink); text-decoration: none; }
.nav a:hover { background: var(--shell-soft); color: var(--app-ink); }
.nav a[aria-current="page"] { background: var(--shell-soft); font-weight: 600; box-shadow: inset 3px 0 0 var(--app-accent); }
/* Le vert surligneur Fraum n'est jamais un trait sur fond clair (tokens.css) : sans enseigne, le trait prend le vert foncé. */
:root[data-brand="generique"] .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--app-primary); }
.nav__gap { height: 12px; }
.nav .nav__phone { display: none; }
.account { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--app-line); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.account__email { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.account__role { margin: 0 0 8px; font-size: 12px; color: var(--app-muted); }
.account__logout { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; margin-left: -12px; border: 0; border-radius: 10px;
  background: none; color: var(--fr-brand); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.account__logout:hover { background: var(--shell-soft); }
/* Contact Fraum, sous le compte : qui appeler quand quelque chose ne va pas (passe « casser l'appli » du 25/10/2026). */
.help { padding: 12px 8px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.help__title { margin: 0 0 2px; font-size: 12px; color: var(--app-muted); }
.help__link { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; font-weight: 700; color: var(--fr-brand);
  text-decoration: none; }
.help__link:hover { text-decoration: underline; }

/* ---------- Bannière « À régler de votre côté » (à la place de l'ancien bandeau Démonstration) ---------- */
.regler { width: calc(100% - 40px); max-width: 1140px; margin: 24px auto 0; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 14px; padding: 10px 14px; border-radius: 10px; background: var(--app-warn-bg); color: var(--app-warn-ink); font-size: 14px; }
.regler__body { display: contents; }
.regler__title { font-weight: 800; }
.regler__text { flex: 1 1 180px; min-width: 0; }
.regler__btn { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px; box-sizing: border-box;
  border: 1px solid var(--app-line); border-radius: 12px; background: var(--app-surface); color: var(--fr-ink); font-size: 14px; font-weight: 700;
  line-height: 1.2; text-decoration: none; }
.regler__btn:hover { color: var(--fr-ink); border-color: var(--app-line-strong); }
.regler__btn:focus-visible { outline: 2px solid var(--app-primary); outline-offset: 2px; }
/* Hors de l'Accueil, le bouton est plein (brun), comme le prototype v73 ; l'Accueil garde le bouton blanc (Main.dc.html). */
.regler--fort .regler__btn { border-color: transparent; border-radius: 10px; background: var(--app-warn-ink); color: var(--app-surface);
  font-size: 13px; }
.regler--fort .regler__btn:hover { border-color: transparent; color: var(--app-surface); }
.regler__sm { display: none; }
/* La démonstration se dit toujours, discrètement : jamais prise pour un vrai espace. */
.demo-note { width: calc(100% - 40px); max-width: 1140px; margin: 12px auto 0; padding: 0; box-sizing: border-box; border: 0; background: none;
  color: var(--app-muted); font-size: 12px; font-weight: 600; }
.regler:not([hidden]) ~ main .page, .demo-note:not([hidden]) ~ main .page { padding-top: 20px; }
/* « Échange 20 min » (démos des prospects, app.js `demoCta`), sur tous les écrans (13/11) mais jamais flottant : en bas
   à droite, il couvrait « Passer aux validations » au téléphone et une carte de restaurant au bureau (16/11). Au bureau,
   au bout de la ligne de la note (dans l'en-tête, il coupait les dates de la semaine) ; au téléphone, dans l'en-tête. */
.demo-note:has(> .demo-note__cta) { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; }
.demo-note__text { min-width: 0; }
.demo-note__cta { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 20px; border-radius: 999px;
  background: var(--app-primary, var(--fr-primary, #1a5c32)); color: var(--app-on-primary, var(--fr-on-primary, #fff));
  font-size: 15px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.demo-note__cta:hover { text-decoration: underline; }
.topbar__cta { display: none; }
/* « Visite guidée » au bout de la note (démos des prospects, 16/11) : un lien dans la phrase, pas une carte. */
.demo-note__visite { color: var(--app-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.demo-note__visite:hover { color: var(--app-primary); }

/* Pied « par fraum » (prototype v73), sous chaque page de l'espace ; décoratif (le mot n'est jamais écrit). */
/* La page garde 56 px en bas au bureau : le pied remonte de 32 px pour venir 24 px sous le contenu, comme le prototype. */
.signature { max-width: 1180px; margin: -32px auto 0; padding: 8px 20px 32px; box-sizing: border-box; display: flex; align-items: center;
  gap: 6px; font-size: 12px; color: var(--app-muted); }
.signature .fraum-logo { color: var(--fr-ink); }      /* le logo noir à 80 %, comme le prototype */
.shell--bare .signature { display: none; }             /* connexion, mot de passe : pas de pied (prototype) */

/* ---------- Téléphone (moins de 768 px) : en-tête d'une ligne de 68 px, barre de navigation du bas ---------- */
@media (max-width: 767px) {
  /* Jamais à la ligne (la société est dans le menu) : à 360 px, la semaine rétrécit au lieu de pousser le menu dessous. */
  .topbar__row { flex-wrap: nowrap; gap: 0 4px; min-height: 68px; padding: 0 16px; }
  .topbar__id { display: contents; }
  .topbar .brand { order: 1; position: relative; width: 56px; height: 40px; }
  .topbar .brand::before { content: ""; position: absolute; inset: -2px 0; }       /* doigt : 56 × 44, même dessin */
  .topbar .brand .fraum-logo { width: 45px; height: 10px; }
  .brandmark { order: 1; min-width: 44px; height: 44px; }
  .brand-logo { height: 36px; max-width: 72px; }
  .brand-logo--arches { width: 32px; height: 28px; }
  :root[data-brand="otacos"] .brand-logo { height: 17px; max-width: 100px; }
  :root[data-brand="kfc"] .brand-logo { height: 38px; max-width: 42px; }
  .topbar__id .scope { display: none; }                 /* l'en-tête d'une ligne n'a pas la place : il est dans le menu */
  .scope-menu { display: block; margin: 0 0 12px; padding: 0 8px 12px; border-bottom: 1px solid var(--app-line); }
  .scope-menu__label { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--app-muted); }
  .scope--menu { display: flex; flex-wrap: wrap; overflow: visible; background: var(--shell-soft); }
  .scope--menu .scope__btn { flex: 1 1 auto; min-height: 44px; color: var(--app-ink); white-space: normal; }
  .scope--menu .scope__btn:hover { background: rgb(0 0 0 / 0.05); }
  .scope--menu .scope__btn[aria-pressed="true"] { background: var(--app-accent); color: var(--app-on-accent); }
  .weekpick { order: 2; flex: 1 1 auto; min-width: 0; }
  .weekpick__step { min-width: 44px; min-height: 44px; }      /* flèches : 44 px au doigt (fos-slow-9) */
  .weekpick__box { flex: 1 1 auto; }
  .weekpick__trigger { flex: 1 1 auto; flex-direction: column; justify-content: center; gap: 0; padding: 4px 2px; line-height: 1.25; text-align: center; }
  .weekpick__short { display: block; order: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 800; white-space: nowrap; }
  .weekpick__num { order: 2; font-size: 11px; font-weight: 500; opacity: 0.9; }
  .weekpick__range, .weekpick__chev { display: none; }
  .topbar__btn { padding: 0 14px; }
  .topbar__bug { flex-direction: column; gap: 2px; padding: 0; font-size: 11px; }
  /* Sans semaine (Connexions, Validations…) : les boutons restent à droite, comme quand la semaine remplit la ligne. */
  .topbar__bug, .topbar__bug[hidden] + .topbar__menu { margin-left: auto; }
  .topbar__lg { display: none; }
  .topbar__sm { display: inline; }

  /* La barre du bas : Accueil, Livraison, Titres, Validations, Connexions ; P&L, Journal des ventes hebdomadaire et
     Analyses sont en tête du menu. */
  .topbar .tabs { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0; padding: 6px 4px calc(10px + env(safe-area-inset-bottom, 0px)); overflow: visible; background: var(--app-surface);
    border-top: 1px solid var(--app-line); box-shadow: 0 -4px 16px rgb(0 0 0 / 0.06); }
  .topbar .tab { flex-direction: column; justify-content: center; gap: 3px; min-height: 52px; padding: 0; border: 0; font-size: 11px; line-height: 1.4;
    font-weight: 600; color: var(--app-muted); opacity: 1; }
  .topbar .tab:hover { background: none; color: var(--app-ink); }
  .topbar .tab[aria-current="page"] { color: var(--app-primary); font-weight: 800; }
  .topbar .tab--more { display: none; }
  .topbar .tab:focus-visible { outline-color: var(--app-primary); }
  .tab__icon { display: block; flex: none; }
  .tab__label { display: none; }
  .tab__short { display: block; }
  .topbar .tab__count { position: absolute; top: 2px; right: calc(50% - 21px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    font-size: 11px; font-weight: 800; line-height: 18px; }
  .shell--bar .content { padding-bottom: calc(var(--shell-bar-h) + env(safe-area-inset-bottom, 0px)); }
  .shell--bar ~ .toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  /* Une notification ne cache aucun bouton fixe : elle monte au-dessus du message de Connexions (52 px, son bouton ×). */
  html:has(.cx-note) .shell--bar ~ .toasts { bottom: calc(84px + 52px + 8px + env(safe-area-inset-bottom, 0px)); }
  .toast { padding: 12px 16px; }
  .signature { margin: 0; padding: 8px 16px 24px; justify-content: center; }

  .bugpanel { right: 16px; max-width: calc(100% - 32px); }

  .regler { width: auto; margin: 12px 16px 0; flex-wrap: nowrap; gap: 12px; padding: 10px 12px; border-radius: 12px; }
  .regler__body { display: block; flex: 1 1 auto; min-width: 0; }
  .regler__title { display: block; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
  .regler__text { display: block; margin-top: 2px; font-weight: 600; }
  .regler__btn, .regler--fort .regler__btn { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .regler__lg { display: none; }
  .regler__sm { display: inline; }
  .demo-note { width: auto; margin: 8px 16px 0; }
  /* « Échange 20 min » (démo) : dans l'en-tête, en couleur d'accent pour se voir sur le bandeau, à droite contre le
     menu. Trop serré (téléphone étroit, logo large), son texte passe sur deux lignes au lieu de pousser le menu à la
     ligne (base min-content, jamais plus large que son texte). La semaine a sa propre ligne, comme sous 480 px : à côté
     du bouton, ses dates seraient coupées. */
  .demo-note:has(> .demo-note__cta) { display: block; }
  .demo-note__cta { display: none; }
  .topbar__cta { display: inline-flex; flex: 1 1 min-content; max-width: max-content; margin-left: auto; padding: 0 12px;
    background: var(--app-accent); color: var(--app-on-accent); font-size: 14px; font-weight: 800; line-height: 1.15;
    text-align: center; text-decoration: none; }
  .topbar__cta:hover { background: var(--app-accent); color: var(--app-on-accent); text-decoration: underline; }
  :root[data-demo="prospect"] .topbar__row { flex-wrap: wrap; row-gap: 8px; padding: 12px 16px; }
  :root[data-demo="prospect"] .weekpick { order: 4; flex: 1 0 100%; }
  .nav .nav__phone { display: block; }

  .page { padding: 16px 16px 24px; }
  .regler:not([hidden]) ~ main .page, .demo-note:not([hidden]) ~ main .page { padding-top: 16px; }
}

/* Téléphone étroit (moins de 480 px) : à côté du logo et des deux boutons, la semaine n'avait plus que 92 px à 320 px
   (fos-slow-5) : « 2 – 8 nov. » coupé, « Semaine 45 » sur les flèches. Elle passe sur sa propre ligne, sous le logo,
   toute la largeur, flèches de 44 px. Sans semaine (Validations, Connexions), l'en-tête garde sa ligne unique. */
@media (max-width: 479px) {
  .topbar__row { flex-wrap: wrap; row-gap: 8px; min-height: 68px; padding: 12px 16px; }
  .weekpick { order: 4; flex: 1 0 100%; }
}

/* Tablette (768 à 1 199 px, le doigt ; audit EC-13) : le logo de l'enseigne et le bouton du bandeau « À régler » à
   44 et 40 px. */
@media (min-width: 768px) and (max-width: 1199px) {
  .brandmark { min-width: 44px; min-height: 44px; }
  :root[data-brand="otacos"] .brand-logo { height: 17px; max-width: 100px; }   /* laisse la place aux sociétés */
  :root[data-brand="kfc"] .brand-logo { height: 38px; max-width: 42px; }
  .regler__btn { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .sidebar.is-open { transition: none; }
}
@media (forced-colors: active) {
  .topbar .tab[aria-current="page"] { border-bottom-color: CanvasText; }
}
