/* La grille du papier en fond de l'appli, comme la carte Fit Level et le site (19/11/2026, idée de Mario, pour tous).
   Classe « grille » sur <html>, posée par grille.js (?grille=0 l'éteint sur un téléphone pour comparer).
   La grille reste derrière : tout ce qui porte du texte et un contour est rendu plein (jamais de texte sur la grille,
   sauf les titres posés sur la page). Fichier à part, clair et sombre dedans (hors outils/mode-clair.js). */
html.grille, html.grille body {
  background-color: #0D0F0D !important;
  background-image: linear-gradient(rgba(244, 245, 241, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(244, 245, 241, .05) 1px, transparent 1px) !important;
  background-size: 24px 24px !important; background-attachment: fixed !important;
}
html.grille.clair, html.grille.clair body {
  background-color: #F7F7F4 !important;
  background-image: linear-gradient(rgba(10, 10, 10, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(10, 10, 10, .06) 1px, transparent 1px) !important;
}
html.grille .app { background: none !important; }
/* Les pilules, jours, bandes et boutons transparents deviennent pleins (jamais celui qui est choisi : .is-on, .is-sel… plein d'encre ; le jour choisi devenait un rond blanc, 19/11/2026) */
html.grille :is(.dpill, .wk-arrow, .install-pill, .guide-pill, .sxb, .seg-btn, .pg-ask-hero, .pg-ask-tile, .more-btn, .ghost-btn,
  .invite-btn, .code-input, .skc, .outline-btn, .chip, .pill):not(.is-on, .is-sel, .on, .active, [aria-pressed="true"], [aria-selected="true"]) { background-color: #0D0F0D; }
html.grille.clair :is(.dpill, .wk-arrow, .install-pill, .guide-pill, .sxb, .seg-btn, .pg-ask-hero, .pg-ask-tile, .more-btn, .ghost-btn,
  .invite-btn, .code-input, .skc, .outline-btn, .chip, .pill):not(.is-on, .is-sel, .on, .active, [aria-pressed="true"], [aria-selected="true"]) { background-color: #FFFFFF; }

/* Le sous-menu de Perfs (19/11/2026, Mario : « une bande blanche sur le quadrillage ») : une capsule qui flotte, comme la
   barre du bas (trait franc, ombre décalée, pilule choisie pleine d'encre), collée en haut quand on fait défiler. */
html.grille .perf-menu { top: calc(env(safe-area-inset-top) + 8px); margin: 0 0 4px; padding: 5px; gap: 2px; border-radius: 999px;
  background: #121412; border: 1.5px solid #F4F5F1; box-shadow: 3px 3px 0 #F4F5F1; }
html.grille.clair .perf-menu { background: #FFFFFF; border-color: #0A0A0A; box-shadow: 3px 3px 0 #0A0A0A; }
html.grille .perf-menu::after { width: 2px; }
html.grille .perf-menu .pm-pill { background: transparent; border-color: transparent; padding: 8px 13px; }
html.grille .perf-menu .pm-pill.is-on { background: #F4F5F1; color: #0A0A0A; border-color: #F4F5F1; }
html.grille.clair .perf-menu .pm-pill.is-on { background: #0A0A0A; color: #FFFFFF; border-color: #0A0A0A; }
