/* Atelia · console sur téléphone (10/11/2026, demande de Saleh) : la coque (menu, barre du haut, fenêtres, tiroirs, briques
   communes, bouton « Retour », bulle « Suivi des collectes »). Chargée après toutes les autres feuilles de index.html.
   Toutes les règles sont limitées à la console (html[data-espace="console"]) et à l'écran étroit (@media (max-width: 760px)),
   pour que l'ordinateur, le Réseau et l'app du restaurateur restent tels quels.
   Noms (français = anglais) : barre du haut = Top app bar, bouton Menu = Hamburger button, tiroir du menu = Navigation drawer,
   recherche repliée = Search icon button, puce = Chip, choix segmenté = Segmented control, fenêtre = Modal (ici en feuille plein
   écran = Full-screen sheet), tiroir = Drawer, tableau qui défile = Scrollable table, bulle = Floating action button. */

@media (max-width: 760px) {

  /* ---------------------------------------------------------------- barre du haut (Top app bar) : deux rangées
     Rangée 1 : bouton Menu, logo ATELIA (ou, quand il y a deux plateformes, le choix « Toutes | Uber Eats | Deliveroo »), puis
     tout à droite la loupe, « Retour » et la cloche. Rangée 2 : la puce des dates et « Tout le parc ». Les contrôles de la barre
     (.tb-controls) se rangent dans la barre elle-même (display: contents) ; l'élément de fin (::after, 100 % de large, sans
     hauteur) force le passage à la rangée 2. La barre défile avec la page (elle ne reste pas collée en haut). */
  html[data-espace="console"] .topbar {
    position: relative; top: auto; z-index: 5; display: flex; flex-wrap: wrap; align-items: center;
    height: auto; min-height: 0; gap: 0 5px; padding: 8px 12px 10px;
  }
  html[data-espace="console"] .topbar::after { content: ""; order: 9; flex: 0 0 100%; height: 0; }
  html[data-espace="console"] .topbar .tb-controls,
  html[data-espace="console"] .topbar .tb-groupe { display: contents; }
  html[data-espace="console"] .topbar .tb-controls .spacer { display: none; }
  /* Rangée 1 */
  html[data-espace="console"] .topbar .menu-btn {
    order: 0; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px;
    border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--navy); cursor: pointer;
  }
  html[data-espace="console"] .topbar .menu-btn svg { width: 22px; height: 22px; }
  /* Le logo porte l'attribut hidden (caché partout ailleurs, base.css le cache avec !important) : seule cette règle le montre. */
  html[data-espace="console"] .topbar .tb-logo[hidden] { display: inline-flex !important; }
  html[data-espace="console"] .topbar .tb-logo {
    order: 1; align-items: baseline; margin-left: 4px; font-family: 'Atelia Wordmark', var(--font); font-size: 22px; line-height: 1;
    letter-spacing: -.4px; white-space: nowrap; flex: 0 0 auto;
  }
  html[data-espace="console"] .topbar .tb-logo .w-ate { color: var(--navy); }
  html[data-espace="console"] .topbar .tb-logo .w-lia { color: var(--brand-green, var(--vert)); }
  /* Deux plateformes : leur choix prend la place du logo (rangée 1) ; sous 375 px il passe à la rangée 2. */
  html[data-espace="console"] .topbar:has(> .tb-pf:not([hidden])) .tb-logo[hidden] { display: none !important; }
  html[data-espace="console"] .topbar > .tb-pf { order: 2; flex: 0 1 auto !important; margin-left: 0 !important; min-width: 0; }
  html[data-espace="console"] .topbar .pf-filtre { flex-wrap: nowrap; gap: 4px; }
  html[data-espace="console"] .topbar .pf-filtre .pf-puce {
    min-height: 44px; min-width: 44px; padding: 0 10px; justify-content: center; font-size: 13px; position: relative; flex: none;
  }
  /* Uber Eats et Deliveroo : le logo de la plateforme à la place du nom écrit (le nom reste lu par les lecteurs d'écran) ;
     « Toutes » garde son mot. */
  html[data-espace="console"] .topbar .pf-filtre .pf-puce .pf-nom {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  html[data-espace="console"] .topbar .pf-filtre .pf-puce[data-pf-valeur="uber"],
  html[data-espace="console"] .topbar .pf-filtre .pf-puce[data-pf-valeur="deliveroo"] {
    width: 44px; padding: 0; background-repeat: no-repeat; background-position: center; background-size: 24px 24px;
  }
  html[data-espace="console"] .topbar .pf-filtre .pf-puce[data-pf-valeur="uber"] { background-image: url("../assets/logos/uber-eats.png"); }
  html[data-espace="console"] .topbar .pf-filtre .pf-puce[data-pf-valeur="deliveroo"] { background-image: url("../assets/logos/deliveroo.png"); }
  html[data-espace="console"] .topbar .pf-filtre .pf-puce[data-pf-valeur="uber"] .pf-point,
  html[data-espace="console"] .topbar .pf-filtre .pf-puce[data-pf-valeur="deliveroo"] .pf-point { display: none; }
  html[data-espace="console"] .topbar .pf-filtre .pf-puce.on[data-pf-valeur="uber"],
  html[data-espace="console"] .topbar .pf-filtre .pf-puce.on[data-pf-valeur="deliveroo"] { box-shadow: inset 0 0 0 3px var(--accent); background-color: var(--accent-soft, #E7F5EE); border-color: var(--accent); }
  /* Loupe (Search icon button) : un carré de 44 px ; au toucher, le champ s'ouvre sur toute la largeur de la rangée 1, par-dessus
     les boutons, et se replie quand on touche ailleurs (rien n'est perdu : le texte tapé reste dans le champ). */
  html[data-espace="console"] .topbar .tb-controls .search {
    order: 5; position: relative; flex: 0 0 44px; width: 44px; min-width: 44px; max-width: none; height: 44px; margin: 0 0 0 auto;
    border: 0; border-radius: 12px; background: none;
  }
  html[data-espace="console"] .topbar .tb-controls .search svg { left: 50%; transform: translate(-50%, -50%); width: 20px; height: 20px; color: var(--navy); pointer-events: none; z-index: 1; }
  html[data-espace="console"] .topbar .tb-controls .search input {
    position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
    font-size: 16px; color: transparent; caret-color: transparent; cursor: pointer; -webkit-appearance: none; appearance: none;
  }
  html[data-espace="console"] .topbar .tb-controls .search input::placeholder { color: transparent; }
  html[data-espace="console"] .topbar .tb-controls .search input::-webkit-search-cancel-button { display: none; }
  /* Texte déjà tapé, champ replié : un point vert sur la loupe le dit. */
  html[data-espace="console"] .topbar .tb-controls .search:has(input:not(:placeholder-shown)):not(:focus-within)::after {
    content: ""; position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--vert); z-index: 2;
  }
  html[data-espace="console"] .topbar .tb-controls .search:focus-within {
    position: absolute; left: 12px; right: 12px; top: 8px; width: auto; z-index: 8;
  }
  html[data-espace="console"] .topbar .tb-controls .search:focus-within input { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft, #E7F5EE); }
  html[data-espace="console"] .topbar .tb-controls .search:focus-within input:focus-visible { outline: none; }
  html[data-espace="console"] .topbar .tb-controls .search:focus-within svg { left: 14px; transform: translateY(-50%); color: var(--muted); }
  html[data-espace="console"] .topbar .tb-controls .search:focus-within input {
    padding: 0 12px 0 42px; color: var(--ink); caret-color: auto; cursor: text;
  }
  html[data-espace="console"] .topbar .tb-controls .search:focus-within input::placeholder { color: var(--muted); }
  html[data-espace="console"] .topbar .tb-controls .search:focus-within input::-webkit-search-cancel-button { display: initial; }
  html[data-espace="console"] .topbar .tb-retour-equipe {
    order: 6; margin-left: 0 !important; min-width: 44px; height: 44px; min-height: 44px; flex: 0 0 auto;
    justify-content: center; padding: 0 12px; border-radius: 12px;
  }
  html[data-espace="console"] .topbar .tb-retour-equipe svg { width: 20px; height: 20px; }
  html[data-espace="console"] .topbar [data-action="notifs"] {
    order: 7; margin-left: 0; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; position: relative;
  }
  html[data-espace="console"] .topbar [data-action="notifs"] svg { width: 20px; height: 20px; }
  html[data-espace="console"] .topbar [data-action="notifs"] .ibadge { font-size: 12px; min-width: 18px; height: 18px; line-height: 18px; }
  /* Rangée 2 : les dates, « Tout le parc » (et sa croix), à la ligne si la place manque. */
  html[data-espace="console"] .topbar [data-action="period"],
  html[data-espace="console"] .topbar [data-action="pickPdv"],
  html[data-espace="console"] .topbar [data-action="clearScope"],
  html[data-espace="console"] .topbar .segment,
  html[data-espace="console"] .topbar [data-action="softphone"] { order: 10; margin-top: 8px; }
  html[data-espace="console"] .topbar .selctl {
    min-height: 44px; padding: 0 12px; gap: 6px; font-size: 13px; max-width: 100%; white-space: normal; text-align: left; line-height: 1.25;
  }
  html[data-espace="console"] .topbar [data-action="clearScope"] { min-width: 44px !important; min-height: 44px !important; }
  html[data-espace="console"] .topbar .crumb { order: 3; flex: 1 1 auto; }
  /* Page d'un restaurant (14/11, carte 687a0b91 : les données d'abord) : la rangée 2 (les dates, « Tout le parc » et sa croix) est
     repliée ; la feuille « ⋯ » de la page (bouton [data-rc-plus], posé par screens/restaurants-cartes.js au téléphone seulement) les
     porte, avec le même geste. */
  html[data-espace="console"]:has([data-rc-plus]) .topbar [data-action="period"],
  html[data-espace="console"]:has([data-rc-plus]) .topbar [data-action="pickPdv"],
  html[data-espace="console"]:has([data-rc-plus]) .topbar [data-action="clearScope"] { display: none; }
}
/* Jusqu'à 599 px : la loupe, « Retour » (icône seule, comme le veut css/retour-equipe.css) et la cloche en 40 × 40 px (le minimum au
   doigt), les plateformes aussi ; le bouton Menu garde ses 44 px. La rangée 1 garde ainsi ses éléments jusqu'à 360 px. */
@media (max-width: 599px) {
  html[data-espace="console"] .topbar .tb-controls .search,
  html[data-espace="console"] .topbar .tb-retour-equipe,
  html[data-espace="console"] .topbar [data-action="notifs"] { width: 40px; min-width: 40px; height: 40px; min-height: 40px; flex: 0 0 40px; padding: 0; }
  html[data-espace="console"] .topbar .tb-controls .search:focus-within { width: auto; height: 44px; }
  html[data-espace="console"] .topbar .tb-retour-equipe .tb-retour-equipe-txt {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  html[data-espace="console"] .topbar .pf-filtre .pf-puce { min-height: 40px; min-width: 40px; padding: 0 9px; }
  html[data-espace="console"] .topbar .pf-filtre .pf-puce[data-pf-valeur="uber"],
  html[data-espace="console"] .topbar .pf-filtre .pf-puce[data-pf-valeur="deliveroo"] { width: 40px; padding: 0; background-size: 22px 22px; }
  html[data-espace="console"] .topbar .selctl { min-height: 40px; }
  html[data-espace="console"] .topbar [data-action="clearScope"] { min-width: 40px !important; min-height: 40px !important; }
}
/* Sous 390 px : un peu moins d'espace entre les éléments, des puces plus serrées. */
@media (max-width: 389px) {
  html[data-espace="console"] .topbar { column-gap: 4px; }
  html[data-espace="console"] .topbar .pf-filtre .pf-puce { padding: 0 8px; }
  html[data-espace="console"] .topbar .selctl { padding: 0 10px; font-size: 12.5px; }
  html[data-espace="console"] .topbar .tb-logo { font-size: 20px; }
}
/* Sous 360 px : le choix des plateformes passe à la rangée 2, après « Tout le parc » ; la puce des dates perd son icône. */
@media (max-width: 359px) {
  html[data-espace="console"] .topbar > .tb-pf { order: 11; margin-top: 8px !important; }
  html[data-espace="console"] .topbar [data-action="period"] > svg { display: none; }
  html[data-espace="console"] .topbar .selctl { padding: 0 8px; gap: 5px; font-size: 12px; }
  /* Le choix des plateformes parti en rangée 2, le logo reprend sa place en rangée 1. */
  html[data-espace="console"] .topbar:has(> .tb-pf:not([hidden])) .tb-logo[hidden] { display: inline-flex !important; }
}

@media (max-width: 760px) {

  /* ---------------------------------------------------------------- menu de gauche (Navigation drawer)
     Caché ; le bouton Menu l'ouvre sur presque tout l'écran (une bande de la page reste visible à droite : la toucher ferme le
     menu, comme Échap, la croix ou le choix d'une page). Grandes cibles, rubrique active en vert. */
  html[data-espace="console"] .app { grid-template-columns: 1fr; }
  html[data-espace="console"] .side {
    position: fixed; top: 0; left: 0; z-index: 70; width: calc(100% - 52px); max-width: 420px; height: 100svh;
    transform: translateX(-100%); transition: transform .24s ease; overflow-y: auto; overscroll-behavior: contain;
    border-right: 1px solid var(--line); border-bottom: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  }
  @supports (height: 100dvh) { html[data-espace="console"] .side { height: 100dvh; } }
  html[data-espace="console"] .app.menu-open .side { transform: none; box-shadow: var(--shadow-drawer); }
  html[data-espace="console"] .side-scrim {
    display: block; position: fixed; inset: 0; background: rgba(22, 36, 63, .42); z-index: 65; opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  html[data-espace="console"] .app.menu-open .side-scrim { opacity: 1; pointer-events: auto; }
  html[data-espace="console"] .app.menu-open .side-x {
    display: inline-flex !important; align-items: center; justify-content: center; position: absolute; top: calc(env(safe-area-inset-top, 0px) + 12px); right: 12px;
    width: 44px !important; height: 44px !important; border-radius: 12px !important; z-index: 1;
  }
  html[data-espace="console"] .side .side-replier { display: none; }
  html[data-espace="console"] .side .brand { padding: 4px 8px 12px; }
  html[data-espace="console"] .side .brand .by { font-size: 12px; }
  html[data-espace="console"] .side .nav { flex-direction: column; flex-wrap: nowrap; gap: 2px; }
  html[data-espace="console"] .side .nav-label { width: auto; font-size: 12px; padding: 14px 12px 6px; }
  html[data-espace="console"] .side .nav a {
    flex: 0 0 auto; min-height: 52px; padding: 10px 12px; gap: 14px; font-size: 16px; border-radius: 12px;
  }
  html[data-espace="console"] .side .nav a svg { width: 22px; height: 22px; }
  html[data-espace="console"] .side .nav a.on { box-shadow: inset 4px 0 0 var(--accent); }
  html[data-espace="console"] .side .nav a .badge { font-size: 12px; min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px; }
  html[data-espace="console"] .side .side-foot { gap: 12px; padding: 14px 8px 0; flex-wrap: wrap; }
  html[data-espace="console"] .side .side-foot .who span { font-size: 12px; }
  html[data-espace="console"] .side .side-foot .deconnexion { min-height: 44px; font-size: 14px; }

  /* ---------------------------------------------------------------- contenu : pleine largeur, marges de 12 à 16 px */
  html[data-espace="console"] .content { padding: 14px 12px calc(env(safe-area-inset-bottom, 0px) + 40px); min-width: 0; }

  /* ---------------------------------------------------------------- briques communes (nc-kit et composants d'avant)
     Toute cible touchable fait au moins 40 × 40 px ; un libellé long passe à la ligne au lieu de sortir de l'écran. */
  html[data-espace="console"] .nc-btn,
  html[data-espace="console"] .nc-btn.nc-s { min-height: 40px; font-size: 13px; padding-top: 6px; padding-bottom: 6px; white-space: normal; text-align: left; line-height: 1.25; }
  html[data-espace="console"] .nc-btn.nc-s { padding-left: 12px; padding-right: 12px; }
  html[data-espace="console"] button.nc-chip { min-height: 40px; font-size: 13px; white-space: normal; text-align: left; }
  html[data-espace="console"] .nc-seg { flex-wrap: wrap; max-width: 100%; }
  html[data-espace="console"] .nc-seg > button { min-height: 40px; font-size: 13px; padding: 6px 12px; white-space: normal; }
  html[data-espace="console"] .nc-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
  html[data-espace="console"] .nc-tabs > button { min-height: 44px; font-size: 13px; padding: 8px 12px; }
  html[data-espace="console"] .nc-pages { flex-wrap: wrap; justify-content: space-between; font-size: 13px; }
  html[data-espace="console"] .nc-pages .nc-btn { min-width: 44px; }
  html[data-espace="console"] .rc-segment { min-height: 40px; font-size: 13px; }
  html[data-espace="console"] .pf-filtre .pf-puce { min-height: 40px; font-size: 13px; }
  html[data-espace="console"] .btn, html[data-espace="console"] .btn.sm { min-height: 40px; white-space: normal; }
  html[data-espace="console"] .chip, html[data-espace="console"] .segment button { min-height: 40px; }
  html[data-espace="console"] .nc-card { min-width: 0; max-width: 100%; }
  /* Messages (Toast, Alert) : lisibles en 13 px au moins. */
  html[data-espace="console"] .toast { font-size: 13.5px; }
  html[data-espace="console"] .nc-vide, html[data-espace="console"] .nc-attente, html[data-espace="console"] .nc-erreur { font-size: 13.5px; overflow-wrap: anywhere; }
  /* Champs : 16 px (le téléphone ne zoome pas la page au toucher), 40 px de haut au moins. */
  html[data-espace="console"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea) { font-size: 16px; }
  html[data-espace="console"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select) { min-height: 40px; }

  /* Tableau large (Scrollable table) : il défile dans sa carte, jamais la page ; une ombre au bord dit qu'il en reste à voir
     (elle disparaît au bout du tableau). */
  html[data-espace="console"] :is(.nc-card, .card, .nc-onglet, .nc-pb, .db, .mbox) :is(table.nc-tb, table.nc-cmp) {
    display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  }
  html[data-espace="console"] :is(.nc-card, .card, .nc-onglet, .nc-pb, .db, .mbox) :is(table.nc-tb, table.nc-cmp),
  html[data-espace="console"] .tbl-wrap,
  html[data-espace="console"] .nc-ve-tz {
    background:
      linear-gradient(to right, var(--surface, #fff) 40%, rgba(255, 255, 255, 0)) left center / 36px 100% no-repeat local,
      linear-gradient(to left, var(--surface, #fff) 40%, rgba(255, 255, 255, 0)) right center / 36px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(22, 36, 63, .26), rgba(22, 36, 63, 0)) left center / 14px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(22, 36, 63, .26), rgba(22, 36, 63, 0)) right center / 14px 100% no-repeat scroll;
    background-color: var(--surface, #fff);
  }
  html[data-espace="console"] :is(table.nc-tb, table.nc-cmp) th { font-size: 12px; }
  html[data-espace="console"] :is(table.nc-tb, table.nc-cmp) td { font-size: 13px; }

  /* ---------------------------------------------------------------- fenêtres (Modal) : une feuille plein écran
     Titre en haut et boutons en bas toujours visibles ; seul le milieu défile. */
  html[data-espace="console"] .modal { padding: 0; align-items: stretch; justify-items: stretch; place-items: stretch; }
  html[data-espace="console"] .modal > .mbox,
  html[data-espace="console"] .modal > .mbox.wide,
  html[data-espace="console"] .modal .mbox.wide.rc-fen-param {
    display: flex; flex-direction: column; width: 100%; max-width: 100%; height: 100svh; max-height: 100svh; margin: 0; border-radius: 0;
    padding: 0 16px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; box-sizing: border-box;
  }
  @supports (height: 100dvh) {
    html[data-espace="console"] .modal > .mbox,
    html[data-espace="console"] .modal > .mbox.wide,
    html[data-espace="console"] .modal .mbox.wide.rc-fen-param { height: 100dvh; max-height: 100dvh; }
  }
  html[data-espace="console"] .modal > .mbox > * { flex: 0 0 auto; min-width: 0; }
  html[data-espace="console"] .modal > .mbox > h3:first-child,
  html[data-espace="console"] .modal > .mbox > h2:first-child,
  html[data-espace="console"] .modal > .mbox .rc-fen-tete {
    position: sticky; top: 0; z-index: 3; margin: 0 -16px 10px; padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 12px;
    background: var(--surface); border-bottom: 1px solid var(--line-2, var(--line)); font-size: 18px; line-height: 1.3; overflow-wrap: anywhere;
  }
  html[data-espace="console"] .modal > .mbox .rc-fen-tete h3 { font-size: 18px; overflow-wrap: anywhere; min-width: 0; }
  html[data-espace="console"] .modal > .mbox .rc-fen-tete :is(button, .btn, .x) { min-width: 44px; min-height: 44px; flex: none; }
  html[data-espace="console"] .modal .m-actions {
    position: sticky; bottom: 0; z-index: 3; margin: auto -16px 0; padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
    background: var(--surface); border-top: 1px solid var(--line-2, var(--line)); display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end;
  }
  html[data-espace="console"] .modal > .mbox > .m-actions:last-child { margin-top: auto; }
  /* Pieds des fenêtres d'un restaurant (« Paramètres du restaurant », « Comptes ») : « Enregistrer » reste en bas de l'écran. */
  html[data-espace="console"] .modal :is(.rp-pied, .rcc-pied) {
    position: sticky; bottom: 0; z-index: 3; margin-top: 12px; padding: 10px 0 calc(env(safe-area-inset-bottom, 0px) + 10px);
    background: var(--surface); border-top: 1px solid var(--line-2, var(--line)); box-shadow: 0 -8px 16px -12px rgba(22, 36, 63, .25);
  }
  html[data-espace="console"] .modal :is(.rp-pied, .rcc-pied) > :is(button, .btn) { flex: 1 1 auto; min-height: 44px; justify-content: center; }
  html[data-espace="console"] .modal .rp-pied > .rp-compte { flex: 1 1 100%; font-size: 13px; }
  html[data-espace="console"] .modal .m-actions > * { flex: 1 1 auto; min-height: 44px; justify-content: center; }
  /* Une fenêtre sans barre de boutons garde un peu d'air en bas. */
  html[data-espace="console"] .modal > .mbox::after { content: ""; flex: 0 0 16px; }
  html[data-espace="console"] .modal > .mbox:has(> .m-actions:last-child)::after { content: none; }

  /* ---------------------------------------------------------------- tiroirs (Drawer) : toute la largeur
     Le tiroir d'avant (#drawer) et celui des briques nc (App.NC.tiroir) ; titre et pied restent en vue, le corps défile. */
  html[data-espace="console"] .drawer { width: 100%; max-width: 100%; height: 100svh; }
  @supports (height: 100dvh) { html[data-espace="console"] .drawer { height: 100dvh; } }
  html[data-espace="console"] .drawer .dh { padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px 16px; gap: 10px; }
  html[data-espace="console"] .drawer .dh h3 { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; min-width: 0; }
  html[data-espace="console"] .drawer .dh .x { width: 44px; height: 44px; flex: none; }
  html[data-espace="console"] .drawer .db { padding: 14px 16px calc(env(safe-area-inset-bottom, 0px) + 84px); }
  html[data-espace="console"] .drawer .db .drawer-actions { padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 10px); }
  html[data-espace="console"] .drawer .db .drawer-actions > * { flex: 1 1 auto; min-height: 44px; justify-content: center; }
  html[data-espace="console"] .nc-tiroir-d { width: 100%; max-width: 100%; left: 0; height: 100svh; bottom: auto; }
  @supports (height: 100dvh) { html[data-espace="console"] .nc-tiroir-d { height: 100dvh; } }
  html[data-espace="console"] .nc-tiroir-d .nc-ph { padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px 16px; flex-wrap: nowrap; }
  html[data-espace="console"] .nc-tiroir-d .nc-ph .nc-titre { font-size: 17px; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
  html[data-espace="console"] .nc-tiroir-d .nc-ph [data-nc-fermer] { min-height: 44px; min-width: 44px; flex: none; }
  html[data-espace="console"] .nc-tiroir-d .nc-pb { padding: 14px 16px; overscroll-behavior: contain; }
  html[data-espace="console"] .nc-tiroir-d .nc-pfoot { padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 10px); }
  html[data-espace="console"] .nc-tiroir-d .nc-pfoot > .nc-btn { flex: 1 1 auto; min-height: 44px; justify-content: center; text-align: center; }
  /* Calendrier de la puce des dates (tiroir « Période ») : des jours de 40 px au moins. */
  html[data-espace="console"] .drawer .cal-j { min-height: 40px; }
  html[data-espace="console"] .drawer .cal-sj { font-size: 12px; }
  html[data-espace="console"] .drawer .cal-fl { min-width: 44px; min-height: 44px; }

  /* ---------------------------------------------------------------- « Retour » de l'équipe : tiroir et outil d'annotation au doigt */
  html[data-espace="console"] .re-tiroir .re-lbl { font-size: 12px; }
  html[data-espace="console"] .re-tiroir .re-compteur, html[data-espace="console"] .re-tiroir .re-ctx-detail,
  html[data-espace="console"] .re-tiroir .re-note, html[data-espace="console"] .re-tiroir .re-capture-info { font-size: 12.5px; }
  html[data-espace="console"] .re-tiroir .re-champ { font-size: 16px; min-height: 44px; }
  html[data-espace="console"] .re-tiroir .re-texte { min-height: 140px; }
  html[data-espace="console"] .re-tiroir .re-boutons > .nc-btn { flex: 1 1 auto; min-height: 44px; justify-content: center; text-align: center; }
  html[data-espace="console"] .re-tiroir .re-capture-actions > .nc-btn { flex: 1 1 auto; min-height: 44px; justify-content: center; }
  html[data-espace="console"] .re-selection .re-sel-barre {
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 10px 8px; gap: 6px; max-height: 50vh; overflow-y: auto;
  }
  html[data-espace="console"] .re-selection .re-sel-aide { flex: 1 1 100%; font-size: 14px; }
  html[data-espace="console"] .re-selection .re-sel-barre .nc-sp { display: none; }
  html[data-espace="console"] .re-selection .re-sel-barre > .nc-btn { flex: 1 1 auto; min-height: 44px; justify-content: center; text-align: center; font-size: 14px; }
  html[data-espace="console"] .re-selection canvas { max-width: calc(100vw - 16px); max-height: calc(100svh - 200px); }
  html[data-espace="console"] .re-selection .re-sel-scene { padding: 8px; }
  html[data-espace="console"] .re-selection.re-annotation canvas { max-width: none; max-height: none; }
  html[data-espace="console"] .re-annotation .re-ann-barre { gap: 6px; }
  html[data-espace="console"] .re-annotation .re-ann-groupe { flex: 1 1 100%; gap: 6px; }
  html[data-espace="console"] .re-annotation .re-ann-outil { flex: 1 1 0; min-width: 0; min-height: 44px; justify-content: center; text-align: center; font-size: 14px; padding-left: 6px; padding-right: 6px; }
  html[data-espace="console"] .re-annotation .re-ann-couleur { width: 44px; height: 44px; flex: none; }
  html[data-espace="console"] .re-annotation .re-ann-barre > .nc-btn { flex: 1 1 40%; }
  html[data-espace="console"] .re-tiroir .re-confirm-actions > .nc-btn { flex: 1 1 auto; min-height: 44px; justify-content: center; }

  /* ---------------------------------------------------------------- bulle « Suivi des collectes » (fermée) : une petite bulle
     en bas à droite, la roue et le nombre « (N) » (le nom entier reste lu par les lecteurs d'écran) ; la page
     garde en bas la place qu'elle prend, si bien que rien ne reste caché dessous. Ouverte, la fenêtre de suivi prend au plus 40 % de la
     hauteur, et la page gagne la même place en bas. */
  html[data-espace="console"] #sc-racine { left: auto; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); max-width: calc(100vw - 24px); }
  html[data-espace="console"] #sc-racine .sc-rouvrir {
    margin: 0; min-height: 44px; min-width: 44px; padding: 0 12px; gap: 6px; justify-content: center; font-size: 13px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .2);
  }
  html[data-espace="console"] #sc-racine .sc-rouvrir-txt { font-size: 0; }
  html[data-espace="console"] #sc-racine .sc-rouvrir-nb { font-size: 13px; font-weight: 700; }
  html[data-espace="console"]:has(#sc-racine .sc-rouvrir) .content { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 76px); }
  html[data-espace="console"] #sc-racine:has(.sc-panneau) { left: 0; right: 0; bottom: 0; max-width: none; }
  html[data-espace="console"] #sc-racine .sc-panneau { width: 100%; max-height: 40vh; border-radius: 14px 14px 0 0; border-left: 0; border-right: 0; border-bottom: 0; }
  html[data-espace="console"].sc-ouvert body { padding-bottom: 41vh; }
  html[data-espace="console"] #sc-racine .sc-fermer { width: 44px; height: 44px; }
  html[data-espace="console"] #sc-racine .sc-retirer { width: 40px; height: 40px; }
  html[data-espace="console"] #sc-racine .sc-deplier { min-height: 40px; }

  /* ---------------------------------------------------------------- puce « Aperçu de la nouvelle console » (/apercu/ seulement) :
     au bas de la page, dans le flux, et non plus posée sur le contenu. */
  html[data-espace="console"] .nc-apercu {
    position: static; transform: none; margin: 0 12px calc(env(safe-area-inset-bottom, 0px) + 12px); max-width: none; border-radius: 12px;
    font-size: 12.5px; padding: 10px 14px;
  }
  html[data-espace="console"] .nc-apercu a { display: inline-flex; align-items: center; min-height: 40px; }

  /* ---------------------------------------------------------------- le contenu ne défile plus de côté
     La page ne défilait pas, mais le contenu (.content) glissait de côté sous la barre du haut sur deux pages :
     « Vue d'ensemble » (une puce d'état longue au bout d'une ligne de carte statistique = Stat card) et « Avancement »
     (quatre colonnes de 65 px, dont le nombre et les dates sortaient). La ligne passe à la ligne ; les colonnes s'empilent. */
  html[data-espace="console"] .nc-ve-stats .nc-ln { flex-wrap: wrap; row-gap: 4px; }
  html[data-espace="console"] .avt-tableau { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* ---------------------------------------------------------------- liste de résultats de la recherche (barre du haut)
     Styles posés par js/app.js (#tbRechRes) : des entrées de 44 px de haut, des titres de groupe en 12 px. */
  html[data-espace="console"] #tbRechRes .rr-i { min-height: 44px; justify-content: center; }
  html[data-espace="console"] #tbRechRes .rr-g { font-size: 12px; }

  /* ---------------------------------------------------------------- briques communes : cibles et textes
     Bouton à une seule icône (« … ») : 40 px de large au moins. Interrupteur (Switch) : une zone de toucher de 40 px de haut,
     le dessin reste de 26 px (fond limité au contenu, rond recalé). Bouton-lien (Text button) : 40 px de haut. */
  html[data-espace="console"] .btn { min-width: 40px; justify-content: center; }
  html[data-espace="console"] :is(.nc-sw, button.nc-sw) { height: 40px; padding: 7px 0; background-clip: content-box; }
  html[data-espace="console"] .nc-sw i { top: 10px; }
  html[data-espace="console"] .nc-lien { display: inline-flex; align-items: center; min-height: 40px; text-align: left; }
  /* Puce d'état (Status chip), badge de plateforme, puce de date, libellé et compteur (Badge) : 12 px ; la puce d'état passe
     à la ligne si son libellé est long. */
  html[data-espace="console"] :is(.nc-st, .nc-pf, .nc-dc, .nc-lab, .nc-nb) { font-size: 12px; }
  html[data-espace="console"] .nc-st { white-space: normal; }
}
/* Avancement, jusqu'à 599 px : une colonne par rangée. */
@media (max-width: 599px) {
  html[data-espace="console"] .avt-tableau { grid-template-columns: minmax(0, 1fr); }
}
