*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.halo {
  position: fixed; left: 50%; top: -260px; z-index: 0;
  width: 560px; height: 440px; transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--halo), transparent 70%);
  pointer-events: none;
}
.ecran {
  position: relative; z-index: 1;
  max-width: 560px; margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) 18px calc(96px + env(safe-area-inset-bottom));
}

.lab { margin: 0; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--doux); }
.titre { overflow-wrap: anywhere; margin: 8px 0 0; font-family: var(--titre); font-size: 44px; line-height: .92; font-weight: 800; letter-spacing: .005em; text-transform: uppercase; }
.texte-doux { margin: 8px 0 0; font-family: var(--texte); font-size: 14px; color: var(--doux); }
.vide { margin: 24px 0 0; font-family: var(--texte); font-size: 15px; line-height: 1.5; color: var(--doux); }

/* Teinte d'un groupe musculaire : #app[data-teinte] (tout l'écran) ou [data-groupe] (un élément). */
[data-teinte="pectoraux"], [data-groupe="pectoraux"] { --teinte: var(--g-pectoraux); }
[data-teinte="dos"], [data-groupe="dos"] { --teinte: var(--g-dos); }
[data-teinte="epaules"], [data-groupe="epaules"] { --teinte: var(--g-epaules); }
[data-teinte="bras"], [data-groupe="bras"] { --teinte: var(--g-bras); }
[data-teinte="jambes"], [data-groupe="jambes"] { --teinte: var(--g-jambes); }
[data-teinte="abdos"], [data-groupe="abdos"] { --teinte: var(--g-abdos); }
#app[data-teinte]:not([data-teinte=""]) { --halo: color-mix(in srgb, var(--teinte) 16%, transparent); }

/* Record battu (étape 5a) : le halo flashe à la couleur du groupe */
.halo.flash { animation: halo-flash 1.4s ease-out; }
@keyframes halo-flash { 12% { filter: brightness(2.6); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
/* Onglets masqués (pendant une séance) : moins de marge en bas. */
#app[data-onglets="non"] .ecran { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
