/* =============================================================================
   ROLOX - CHARTE SOBRE (v0.70, refonte etape 1)
   -----------------------------------------------------------------------------
   Chargee EN DERNIER : elle harmonise ce que les feuilles historiques
   ecrivaient chacune a sa facon. Les couleurs viennent toutes des tokens de
   styles.css (:root et body.theme-dark).
     - plus d'ombres colorees ni de "soulevement" au survol : aplats
     - chiffres a chasse fixe (Geist Mono) partout ou on lit des valeurs
     - bordures fines plutot qu'ombres pour separer les surfaces
   ============================================================================= */

body { font-variant-numeric: tabular-nums; letter-spacing: -0.003em; }
h1, h2, h3, .modal__title, .subpage__title { letter-spacing: -0.015em; }

/* Valeurs chiffrees : chasse fixe (Geist Mono) pour ce qu'on saisit ou
   chronometre ; les grands totaux restent en Geist, chiffres tabulaires. */
.timer__display, .auto-target__value, #autoRestTime, .set-row__input,
.coach-sess-exo__sets span {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.stat-card__value, .modal__stat-value, .prog-head__value, .coach-stats strong, .prot-today strong {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text-primary);
}

/* Decor retire */
.profile-card::before, .profile-card::after { display: none; }

/* Boutons d'action : aplat, sans ombre coloree ni deplacement */
.primary-btn, .modal__btn, .ns-cta, .auto-action, .login__btn, .comment-send {
  box-shadow: none !important;
}
.primary-btn { border-radius: var(--radius-md); font-weight: 600; color: var(--text-on-flame); }
.primary-btn:hover, .modal__btn:hover { transform: none; filter: brightness(0.96); }
.modal__btn { background: var(--flame); color: var(--text-on-flame); font-weight: 600; border-radius: var(--radius-md); }
.ns-cta { border-radius: var(--radius-lg); }
.ns-cta--voice { background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border); }
.ns-cta--voice i { color: var(--flame); }

/* Boutons secondaires : neutres */
.ghost-btn { color: var(--text-primary); border-color: var(--border); background: var(--bg-surface); }
.ghost-btn:hover { background: var(--bg-surface-2); }

/* Surfaces */
.chart-card, .info-card, .pref-card, .profile-menu, .history-card, .levels-card,
.calendar, .admin-ads__card {
  border: 1px solid var(--border);
  box-shadow: none;
  border-radius: var(--radius-lg);
}

/* Barre de navigation : surface unie, actif = couleur d'action */
.nav { background: color-mix(in srgb, var(--bg-surface) 94%, transparent); border-top: 1px solid var(--border); }
body.theme-dark .nav { background: color-mix(in srgb, var(--bg-surface) 94%, transparent); }
.nav__item--active, .nav__item--active i { color: var(--flame); }

/* Champs */
.field-input { background: var(--bg-surface); border-color: var(--border); color: var(--text-primary); border-radius: var(--radius-md); }
.field-input:focus { border-color: var(--flame); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--flame) 18%, transparent); }

/* Pastilles de selection (zones, periodes, metriques) */
.body-zone--active { background: var(--flame); border-color: var(--flame); color: var(--text-on-flame); }

/* Focus clavier visible */
button:focus-visible, a:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--flame);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =============================================================================
   v0.71 - Refonte etape 2 : Accueil, barre "Séance en cours", Planning / Mes séances
   ============================================================================= */
.home-head { margin: 4px 0 16px; }
.home-head h1 { font-size: var(--fs-xl); font-weight: 700; }
.home-head p { color: var(--text-tertiary); font-size: var(--fs-sm); margin-top: 2px; }
.home-card {
  display: flex; flex-direction: column; gap: 8px; width: 100%;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; margin-bottom: 12px; color: var(--text-primary); text-align: left; font: inherit;
}
.home-label { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-tertiary); }
.home-title { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.015em; }
.home-sub { color: var(--text-tertiary); font-size: var(--fs-sm); }
.home-sub--ok { color: var(--success); font-weight: 600; }
.home-card--main .primary-btn { margin-top: 6px; justify-content: center; }
.home-row { display: flex; gap: 8px; margin-top: 6px; }
.home-row > * { flex: 1; justify-content: center; }
.home-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.home-stat {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 12px; font: inherit; color: var(--text-primary); cursor: pointer;
}
.home-stat strong { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.home-stat strong small { font-size: var(--fs-sm); font-weight: 600; color: var(--text-tertiary); }
.home-stat span { font-size: 11px; color: var(--text-tertiary); }
.home-coach { flex-direction: row; align-items: center; gap: 12px; cursor: pointer; }
.home-coach__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.home-coach__go { color: var(--flame); font-weight: 600; font-size: var(--fs-sm); }
.home-section { margin-top: 20px; }
.home-section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.home-section__head h2 { font-size: var(--fs-md); font-weight: 700; }
.home-link { border: none; background: none; color: var(--flame); font: inherit; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; }
.home-list { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.home-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px;
  border: none; border-bottom: 1px solid var(--border-light); background: none; color: var(--text-primary);
  font: inherit; font-size: var(--fs-md); text-align: left; cursor: pointer;
}
.home-item:last-child { border-bottom: none; }
.home-item > span { flex: 1; min-width: 0; font-weight: 500; }
.home-item > i:first-child { width: 18px; text-align: center; color: var(--text-tertiary); }
.home-item > i.fa-chevron-right { color: var(--text-tertiary); font-size: 12px; }
.home-item small { color: var(--flame); font-weight: 600; font-size: var(--fs-xs); }
/* v0.86 : proteines du jour sur l'Accueil */
.home-prot__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.home-prot__head strong { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.home-prot__head small { font-size: var(--fs-sm); font-weight: 600; color: var(--text-tertiary); }
.home-prot__bar { height: 6px; border-radius: 3px; background: var(--border-light); overflow: hidden; }
.home-prot__bar i { display: block; height: 100%; background: var(--flame); border-radius: 3px; }
.home-prot__add { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.home-prot__add .body-zone { flex: 0 0 auto; padding: 6px 10px; }
.home-prot__add .field-input { flex: 1; min-width: 0; padding: 8px 10px; }
.home-prot__add .primary-btn { flex: 0 0 auto; padding: 8px 12px; }
.home-item__dot { width: 10px !important; height: 10px; border-radius: 50%; flex: 0 0 auto; }

/* Barre "Séance en cours" : au-dessus de la barre d'onglets */
.livebar {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(var(--nav-height-mobile) + 10px);
  z-index: 900; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border: none; border-radius: var(--radius-md);
  background: var(--text-primary); color: var(--bg-page); font: inherit; text-align: left; cursor: pointer;
  box-shadow: var(--shadow-lg);
}
.livebar[hidden] { display: none; }
.livebar__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--flame); flex: 0 0 auto; }
.livebar__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.livebar__txt small { font-size: 11px; opacity: .7; }
.livebar__txt strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.livebar__time { font-family: var(--font-mono); font-size: var(--fs-sm); opacity: .8; }
.livebar__go { font-weight: 700; color: var(--flame); }
body.has-livebar .main { padding-bottom: calc(var(--nav-height-mobile) + 80px); }
body.auto-mode-open .livebar { display: none; }
@media (min-width: 900px) { .livebar { left: calc(var(--nav-width-desktop) + 24px); right: 24px; bottom: 24px; } }

/* Bascule Planning / Mes séances */
.seg { display: flex; background: var(--bg-surface-2); border-radius: var(--radius-md); padding: 3px; margin-bottom: 14px; }
.seg__btn {
  flex: 1; border: none; background: none; padding: 8px; border-radius: 9px;
  font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--text-tertiary); cursor: pointer;
}
.seg__btn--on { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-sm); }
/* Les messages ephemeres passent au-dessus de la barre "Séance en cours". */
body.has-livebar .toast { bottom: calc(var(--nav-height-mobile) + 84px); }
.toast { color: var(--bg-page); }

/* v0.72 - En-tete d'ecran (titre + bouton rond) */
.screen-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.screen-head h1 { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-surface); color: var(--text-primary); display: grid; place-items: center;
  font-size: 15px; cursor: pointer; flex: 0 0 auto;
}
.icon-btn:active { background: var(--bg-surface-2); }
.cal-up__date { color: var(--text-tertiary) !important; font-weight: 500 !important; }

/* =============================================================================
   v0.73 - Refonte etape 4 : seance en liste, serie cochee, pastille de repos
   ============================================================================= */
.set-row { grid-template-columns: 32px 1fr 1fr 44px 28px; }
.set-row--iso { grid-template-columns: 32px 1fr 44px 28px; }
.set-row__check {
  width: 40px; height: 36px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--bg-surface); color: transparent; display: grid; place-items: center; cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.set-row__check i { font-size: 14px; }
.set-row__check.is-done { background: var(--flame); border-color: var(--flame); color: var(--text-on-flame); }
.set-row:has(.set-row__check.is-done) .set-row__input { color: var(--text-tertiary); background: var(--bg-elevated); }

.restpill {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-height-mobile) + 12px);
  z-index: 950; display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 16px; border-radius: var(--radius-full);
  background: var(--text-primary); color: var(--bg-page); box-shadow: var(--shadow-lg);
}
.restpill[hidden] { display: none; }
.restpill__lbl { font-size: var(--fs-xs); opacity: .7; font-weight: 600; }
.restpill__time { font-family: var(--font-mono); font-size: var(--fs-lg); font-weight: 500; min-width: 3.2em; }
.restpill__btn {
  border: none; border-radius: var(--radius-full); padding: 8px 12px; cursor: pointer;
  font: inherit; font-size: var(--fs-sm); font-weight: 600;
  background: color-mix(in srgb, var(--bg-page) 16%, transparent); color: var(--bg-page);
}
.restpill__btn--go { background: var(--flame); color: var(--text-on-flame); }
@media (min-width: 900px) { .restpill { left: calc(50% + var(--nav-width-desktop) / 2); bottom: 24px; } }

/* Bandeau de seance : surface neutre, la couleur de la seance en liseré */
.session-banner, .session-banner--custom, .session-banner--push, .session-banner--pull, .session-banner--legs {
  background: var(--bg-surface) !important; color: var(--text-primary) !important;
  border: 1px solid var(--border); border-left: 4px solid var(--banner-solid, var(--flame));
  box-shadow: none; padding: 16px 18px;
}
.session-banner__flame { display: none; }
.session-banner__date { color: var(--text-tertiary); opacity: 1; }
.session-banner__desc { color: var(--text-secondary); opacity: 1; }
.session-banner__badge { background: var(--bg-surface-2); color: var(--text-secondary); backdrop-filter: none; }
.session-banner__cancel { background: var(--bg-surface-2); color: var(--text-secondary); }
.session-banner__cancel:hover { background: var(--border); }
/* Bouton Liste / Mode guide : secondaire */
.mode-switch { background: var(--bg-surface) !important; color: var(--text-primary) !important; border: 1px solid var(--border) !important; box-shadow: none !important; }
.mode-switch i { color: var(--flame); }
/* Chrono : chiffres en couleur de texte */
.timer__display { color: var(--text-primary); background: none; -webkit-text-fill-color: currentColor; }
.restpill__btn { white-space: nowrap; }

/* =============================================================================
   v0.74 - Refonte etape 5 : onglet Moi regroupe, boite de messages unique
   ============================================================================= */
.me-group-label { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-tertiary); margin: 18px 4px 8px; }
#profileHome .profile-menu { margin-bottom: 0; }
#profileHome .logout-btn { margin-top: 22px; }
.home-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.home-head__icons { display: flex; gap: 8px; }
.home-head__icons .icon-btn { position: relative; }
.home-head__icons .nav__dot, .home-head__icons .ic-dot { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--flame); }
.dm-thread--coach .dm-thread__name::after {
  content: 'Coach'; margin-left: 6px; padding: 1px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 700; background: var(--bg-flame-soft); color: var(--flame); vertical-align: 1px;
}
.ic-dot[hidden] { display: none; }
/* Fenetres : en-tete neutre, titre en couleur de texte */
.modal__head, .modal__header { background: var(--bg-surface) !important; border-bottom: 1px solid var(--border-light); }
.modal__title { color: var(--text-primary) !important; background: none; -webkit-text-fill-color: currentColor; }
.modal__content::before { display: none; }   /* halo orange decoratif retire */

/* =============================================================================
   v0.76 - PLEINE LARGEUR SUR TELEPHONE (demande de Lou)
   Plus de "cartes flottantes" : les blocs de contenu vont d'un bord a l'autre
   de l'ecran, sans coins arrondis ni bordures laterales ; ils restent separes
   par un filet. Les boutons, champs et fenetres gardent leurs coins arrondis.
   Sur ordinateur (colonne centree), on garde les cartes.
   ============================================================================= */
@media (max-width: 899px) {
  .screen { padding-left: 16px; padding-right: 16px; }
  .screen .home-card, .screen .home-list, .screen .calendar, .screen .tpl-card,
  .screen .social-card, .screen .chart-card, .screen .profile-card, .screen .profile-menu,
  .screen .history-card, .screen .info-card, .screen .pref-card, .screen .levels-card,
  .screen .admin-ads__card, .screen .exercise-card, .screen .timer, .screen .session-banner,
  .screen .account-card, .screen .coach-graph-row {
    margin-left: -16px !important;
    margin-right: -16px !important;
    /* v0.86 FIX : les blocs qui fixent `width: 100%` (.home-card, et les
       <button> qui sinon se retrecissent) s'arretaient 32 px avant le bord
       droit. La largeur suit maintenant les marges negatives. */
    width: calc(100% + 32px) !important;
    max-width: none !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
  }
  /* Le liseré de couleur du bandeau de seance devient un filet en haut */
  .screen .session-banner { border-top: 3px solid var(--banner-solid, var(--flame)) !important; }
  /* Blocs empiles : un seul filet entre deux, pas de grand vide */
  .screen .tpl-card, .screen .social-card, .screen .exercise-card { margin-bottom: 8px; }
  .screen .exercise-card--open { border-top-color: var(--flame); border-bottom-color: var(--flame); }
  /* Les titres de section gardent la marge de lecture */
  .screen .section-title, .screen .me-group-label { padding-left: 0; }
}
.plan-save { width: 100%; justify-content: center; margin-top: 12px; padding: 12px; }
.voice-review__session .body-row span { text-align: left; }

/* =============================================================================
   v0.79 - Bouton « Ne pas cliquer » et fenetres de pub
   ============================================================================= */
.home-dontclick {
  display: block; margin: 28px auto 8px; padding: 10px 18px; border-radius: var(--radius-full);
  border: 1px dashed var(--danger); background: transparent; color: var(--danger);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
body.prank-on { overflow: hidden; }
.prank-layer { position: fixed; inset: 0; z-index: 5000; background: rgba(0, 0, 0, .25); }
.prank-ad {
  position: absolute; background: #fff; color: #111; border: 2px solid #111; border-radius: 6px;
  box-shadow: 6px 8px 0 rgba(0, 0, 0, .35); overflow: hidden;
  animation: prankIn .22s cubic-bezier(.2, 1.4, .4, 1);
}
.prank-ad--out { animation: prankOut .16s ease forwards; }
@keyframes prankIn { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }
@keyframes prankOut { to { opacity: 0; scale: .7; } }
.prank-ad__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 4px 4px 4px 10px; background: #e4572e; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .06em;
}
.prank-ad__bar--left { flex-direction: row-reverse; padding: 4px 10px 4px 4px; }
.prank-ad__x {
  width: 30px; height: 30px; border: 2px solid #fff; border-radius: 4px; background: #111; color: #fff;
  display: grid; place-items: center; cursor: pointer; flex: 0 0 auto;
}
.prank-ad__body img, .prank-ad__body video { display: block; width: 100%; max-height: 50vh; object-fit: cover; }
.prank-ad__txt { padding: 18px 14px; font-size: 16px; font-weight: 800; line-height: 1.25; text-align: center; }

/* =============================================================================
   v0.81 - Photos d'evolution
   ============================================================================= */
.photo-compare-btn { width: 100%; justify-content: center; margin-top: 14px; padding: 10px; }
.photo-day { margin-top: 16px; }
.photo-day__date { font-size: var(--fs-xs); font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.photo-thumb { position: relative; padding: 0; border: none; background: var(--bg-surface-2); aspect-ratio: 3 / 4; overflow: hidden; cursor: pointer; border-radius: 4px; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb span { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); padding: 1px 6px; border-radius: 4px; }
body.photo-open { overflow: hidden; }
.photo-overlay { position: fixed; inset: 0; z-index: 4000; background: #000; color: #fff; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.photo-overlay__bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; gap: 8px; }
.photo-overlay__lbl { font-size: var(--fs-sm); font-weight: 600; text-align: center; flex: 1; }
.photo-overlay__btn { width: 40px; height: 40px; border: none; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.photo-overlay__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.photo-overlay__stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.photo-overlay__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 56px; border: none; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; z-index: 1; }
.photo-overlay__nav[data-prev] { left: 6px; border-radius: 0 10px 10px 0; }
.photo-overlay__nav[data-next] { right: 6px; border-radius: 10px 0 0 10px; }
.photo-overlay__nav:disabled { opacity: .2; }
.photo-compare { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px 16px; }
.photo-compare__pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-compare__pick .field-input { background: #18181b; color: #fff; border-color: #333; }
.photo-compare__row { margin-top: 14px; }
.photo-compare__pose { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .7; margin-bottom: 6px; }
.photo-compare__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.photo-compare__pair img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; display: block; }
.photo-compare__none { aspect-ratio: 3 / 4; display: grid; place-items: center; background: #18181b; border-radius: 6px; opacity: .6; }
.photo-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.photo-ba__cell { position: relative; padding: 0; border: none; background: var(--bg-surface-2); border-radius: 6px; overflow: hidden; aspect-ratio: 3 / 4; cursor: pointer; }
.photo-ba__cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-ba__cell span { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); padding: 2px 7px; border-radius: 4px; }

/* v0.83 : publier sans seance (en tete du fil) */
.social-compose {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg, 16px); padding: 12px 16px; margin-bottom: 8px;
  font: inherit; color: var(--text-muted); text-align: left; cursor: pointer;
}
/* v0.86 : classe dediee. `> span` visait aussi le `.pframe` (un span) de
   l'avatar a bordure : il s'etirait (flex: 1) et l'anneau se retrouvait a
   cote de la photo au lieu d'etre autour. */
.social-compose__txt { flex: 1; font-size: 15px; }
.social-compose > i { color: var(--flame); font-size: 18px; }
@media (max-width: 899px) {
  .screen .social-compose {
    margin-left: -16px; margin-right: -16px; width: calc(100% + 32px);
    border-radius: 0; border-left: none; border-right: none;
  }
}

/* =============================================================================
   v0.88 - SOCIAL SOBRE (demande de Lou)
   Plus de cartes flottantes ni de bulles : les publications vont d'un bord a
   l'autre, separees par un simple filet ; les photos touchent les bords de
   l'ecran. Plus de pouces : double tap = j'aime, appui long = menu. Il ne
   reste qu'une ligne discrete (coeur, "N j'aime", "N commentaires").
   ============================================================================= */
.social-card, .comment { touch-action: manipulation; }   /* pas de zoom au double tap */
.social-card { position: relative; padding: 14px 16px 12px; }
.social-card:hover { border-color: var(--border); box-shadow: none; }
.social-card__head { margin-bottom: 8px; }
.social-card__profile-link:hover, .social-card__profile-link:active { background: none; }
.social-card__avatar { width: 36px; height: 36px; font-size: 14px; }
.social-card__avatar--me { background: var(--neutral-strong); }
.social-card__pseudo { align-items: baseline; gap: 0; font-size: 14px; font-weight: 700; }
.social-card__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.social-card__when { flex: 0 0 auto; font-size: 13px; font-weight: 500; color: var(--text-tertiary); }
.social-card__when::before { content: '\00a0·\00a0'; }
.social-card__mood { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.social-card__title { margin: 2px 0 2px; font-size: 16px; font-weight: 700; }
.social-card__stats { display: block; padding: 0; margin: 0 0 8px; background: none; border-radius: 0; font-size: 13px; color: var(--text-tertiary); }
.social-card__caption { margin: 2px 0 10px; font-size: 15px; color: var(--text-primary); }
.social-card__media { position: relative; margin: 0 0 4px; }
.social-card__media .social-card__photo, .social-card__media .social-card__video { margin: 0; }

.social-card__meta { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.social-card__heart {
  width: 32px; height: 32px; margin-left: -6px; padding: 0; border: none; background: none;
  color: var(--text-primary); font-size: 20px; cursor: pointer; display: grid; place-items: center;
}
.social-card__heart.is-on { color: var(--flame); }
.social-card__heart:active i { transform: scale(.85); }
.social-card__likes { padding: 0; border: none; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--text-primary); cursor: pointer; }
.social-card__likes:empty { display: none; }
.social-card__comments-meta { font-size: 13px; color: var(--text-tertiary); }
.social-card__comments-meta[hidden] { display: none; }

/* Coeur du double tap */
.social-burst {
  position: absolute; left: 50%; top: 50%; z-index: 3; pointer-events: none;
  font-size: 84px; color: #fff; filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .35));
  animation: socialBurst .8s ease forwards;
}
.comment .social-burst { font-size: 28px; color: var(--flame); filter: none; }
@keyframes socialBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  30% { transform: translate(-50%, -50%) scale(.95); }
  75% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1); }
}

/* Commentaires a plat */
.social-card__comments .comments { margin-top: 2px; padding-top: 0; border-top: none; }
.comments__list { gap: 10px; margin-bottom: 4px; }
.comments__list:empty { display: none; }
.comment { position: relative; display: flex; align-items: flex-start; gap: 10px; }
.comment__avatar { flex: 0 0 28px; width: 28px; height: 28px; font-size: 12px; }
.pframe--text .comment__avatar { width: 28px; height: 28px; flex-basis: 28px; }
.comment__body { flex: 1; min-width: 0; }
.comment__line { font-size: 14px; line-height: 1.4; color: var(--text-primary); word-break: break-word; }
.comment__pseudo { font-size: 14px; font-weight: 700; margin-right: 2px; }
.comment__line .comment__text { display: inline; font-size: 14px; color: var(--text-primary); white-space: pre-wrap; }
.comment__when { margin-top: 2px; font-size: 12px; color: var(--text-tertiary); }
.comment__body .comment__photo, .comment__body .comment__video { width: 70%; max-width: 260px; margin-top: 6px; border-radius: 8px; }
.comment__react { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 0; padding-top: 2px; min-width: 24px; }
.comment__like { padding: 2px; border: none; background: none; color: var(--text-tertiary); font-size: 13px; cursor: pointer; }
.comment__like.is-on { color: var(--flame); }
.comment__likes-count { padding: 0; border: none; background: none; font: inherit; font-size: 11px; color: var(--text-tertiary); cursor: pointer; }
.comments__more { padding: 0; margin: 0 0 2px; border: none; background: none; font-size: 13px; color: var(--text-tertiary); text-decoration: none; }
.comments__more i { display: none; }
.comments__open-composer {
  display: block; width: auto; padding: 6px 0 2px; margin: 0; border: none; background: none; border-radius: 0;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--text-tertiary); text-align: left; cursor: text;
}
.comments__open-composer:hover { background: none; }
.social-card .comment-composer { margin-top: 6px; padding: 0; border: none; background: none; }

@media (max-width: 899px) {
  /* Bord a bord, un filet entre deux publications, aucun espace "flottant". */
  .screen .social-card {
    margin-bottom: 0 !important; background: transparent;
    border-top: none !important; border-bottom: 1px solid var(--border-light) !important;
  }
  .screen .social-compose { margin-bottom: 0; background: transparent; border-top: none; border-bottom: 1px solid var(--border-light); }
  .screen .social-card__media { margin-left: -16px; margin-right: -16px; }
  .screen .social-card__media .social-card__photo,
  .screen .social-card__media .social-card__video { border-radius: 0; }
}
/* Avatar a bordure : meme taille que les autres, l'anneau deborde dans une
   marge reservee au lieu de mordre sur le pseudo. */
.pframe--text .social-card__avatar { width: 36px; height: 36px; }
.social-card__head .pframe { margin: 8px 6px 8px 8px; }
.comment > .pframe { margin: 6px 4px 6px 6px; }
.comments, .comment { text-align: left; }
/* Publication sans photo : coeur orange (un coeur blanc serait invisible). */
.social-card > .social-burst { font-size: 64px; color: var(--flame); filter: none; }

/* =============================================================================
   v0.89 - UNE SEULE FAMILLE DE BOUTONS (demande de Lou)
   -----------------------------------------------------------------------------
   Quatre sortes de boutons dans toute l'app, plus de variantes au cas par cas :
     1. principal  (.primary-btn)  aplat orange, 44 px, coins --radius-md
     2. secondaire (.ghost-btn)    aplat gris neutre, meme forme que le principal
     3. icone      (.icon-btn...)  pictogramme seul, sans rond ni bordure,
                                   cible tactile de 40 px
     4. onglets    (.seg, .social-tabs)  texte souligne d'orange, sur une
                                   ligne qui va d'un bord a l'autre
   Les petites pastilles de choix (+10 g, zones...) suivent le secondaire.
   Plus de grands titres d'ecran : la barre du bas dit deja ou l'on est.
   ============================================================================= */
:root { --btn-h: 44px; --btn-h-sm: 40px; }

/* 1. Principal */
.primary-btn {
  min-height: var(--btn-h); padding: 0 18px; justify-content: center;
  border-radius: var(--radius-md); font-size: 15px; font-weight: 600;
}
/* 2. Secondaire */
.ghost-btn, body.theme-dark .ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--btn-h-sm); padding: 0 16px;
  border: none; border-radius: var(--radius-md);
  background: var(--bg-surface-2); color: var(--text-primary);
  font-family: inherit; font-size: 15px; font-weight: 600;
}
.ghost-btn:hover, body.theme-dark .ghost-btn:hover { background: var(--bg-surface-2); filter: brightness(1.08); border: none; }
.ghost-btn i { color: var(--flame); }
.home-row .primary-btn, .home-row .ghost-btn, .home-card--main .primary-btn { min-height: var(--btn-h); margin-top: 0; }
.home-row { margin-top: 4px; }

/* 3. Icone seule */
.icon-btn, .calendar-nav__btn, .social-topbar__btn {
  position: relative; width: 40px; height: 40px; padding: 0;
  border: none; border-radius: var(--radius-full); box-shadow: none;
  background: transparent; color: var(--text-primary);
  display: grid; place-items: center; font-size: 18px; cursor: pointer; flex: 0 0 auto;
}
.icon-btn:active, .calendar-nav__btn:active, .social-topbar__btn:active { background: var(--bg-surface-2); }
.calendar-nav__btn:hover, .social-topbar__btn:hover { border: none; color: var(--flame); }
.calendar-nav__btn { font-size: 15px; color: var(--text-secondary); }
.social-topbar__dot { top: 8px; right: 7px; width: 8px; height: 8px; border: none; background: var(--flame); }

/* 4. Onglets : ligne pleine largeur, texte souligne */
.tabbar, .social-tabs {
  display: flex; align-items: center; gap: 4px;
  margin: 0 0 14px; padding: 0;
  border-bottom: 1px solid var(--border-light);
  border-radius: 0; background: none;
}
@media (max-width: 899px) {
  .tabbar, .social-tabs { margin-left: -16px; margin-right: -16px; padding: 0 8px 0 16px; }
}
.tabbar .seg { margin: 0; }
.seg, .seg--screen {
  display: flex; gap: 20px; flex: 1; min-width: 0;
  padding: 0; margin: 0 0 14px; background: none; border-radius: 0;
}
.seg__btn, .social-tab {
  position: relative; flex: 0 0 auto; padding: 14px 0 12px;
  border: none; border-radius: 0; background: none; box-shadow: none;
  font-family: inherit; font-size: 15px; font-weight: 600; color: var(--text-tertiary); cursor: pointer;
}
.seg__btn--on, .social-tab--active { background: none; box-shadow: none; color: var(--text-primary); }
.seg__btn--on::after, .social-tab--active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  border-radius: 2px; background: var(--flame);
}
.social-tabs { gap: 20px; }
.social-tab__dot { top: 12px; right: -9px; }
.social-tabs__icons { margin-left: auto; display: flex; gap: 2px; }
/* L'escamotage au defilement reste, sans laisser de filet derriere lui. */
.social-tabs--hidden { border-bottom-color: transparent; }

/* Retour : simple lien, sans pastille */
.subpage__back {
  padding: 8px 4px 8px 0; background: none; box-shadow: none; border-radius: 0;
  color: var(--text-secondary); font-size: 15px;
}
.subpage__back i { color: var(--flame); }

/* Pastilles de choix (+10 g, zones, periodes) : secondaire en petit */
.body-zone {
  border: none; background: var(--bg-surface-2); color: var(--text-primary);
  border-radius: var(--radius-md); font-weight: 600;
}
.body-zone--active { background: var(--flame); color: var(--text-on-flame); }
.home-prot__add { gap: 6px; }
.home-prot__add .body-zone, .home-prot__add .field-input, .home-prot__add .primary-btn {
  height: var(--btn-h-sm); min-height: 0; padding-top: 0; padding-bottom: 0; font-size: 14px;
}
.home-prot__add .body-zone { padding: 0 10px; }
.home-prot__add .primary-btn { width: var(--btn-h-sm); padding: 0; }

/* Accueil : plus d'en-tete, le contenu commence en haut */
#homeRoot > .home-card:first-child { margin-top: 0; }

/* Moi : nom, niveau et humeur sans pastilles */
.profile-card__level { background: none; padding: 0; color: var(--text-tertiary); }
.profile-card__mood { position: relative; max-width: 300px; }
.profile-mood__input {
  height: var(--btn-h-sm); padding: 0 40px; border: none; border-radius: var(--radius-md);
  background: var(--bg-surface-2);
}
.profile-mood__input:focus { box-shadow: 0 0 0 2px var(--flame); }
.profile-mood__save {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; background: none; color: var(--flame); font-size: 15px;
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.profile-card__mood.is-dirty .profile-mood__save { opacity: 1; pointer-events: auto; }

/* Fiche client du coach : bouton Message secondaire */
.coach-msg-btn { flex: 0 0 auto; width: auto; }
/* Les autres boutons a icone seule suivent la meme regle. */
.tpl-card__btn, body.theme-dark .tpl-card__btn, .coach-client__chat {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: transparent; color: var(--text-secondary); font-size: 17px;
}
.tpl-card__btn:hover, body.theme-dark .tpl-card__btn:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.tpl-card__btn--play, .tpl-card__btn--launch { color: var(--flame); }
.coach-client__chat { color: var(--flame); }
/* Mes séances : le "+" de la ligne d'onglets fait deja "Nouvelle séance". */
#createTplBtn { display: none; }
.home-prot__add .field-input { border-color: transparent; background: var(--bg-surface-2); }
/* Fiche client : les trois chiffres sur une ligne, sans cases flottantes. */
.coach-stats > div { background: none; border: none; box-shadow: none; padding: 8px 0; }

/* =============================================================================
   v0.89.1 - MESSAGES EN PLEIN ECRAN (demande de Lou)
   Meme presentation que le chat coach / client : la fenetre recouvre tout
   l'ecran (barre du bas comprise), en-tete fixe en haut, liste ou
   conversation qui defile, barre de saisie collee en bas.
   ============================================================================= */
#dmModal { padding: 0; background: var(--bg-page); backdrop-filter: none; align-items: stretch; }
#dmModal.show { animation: none; }
body:has(#dmModal.show) { overflow: hidden; }
#dmModal .modal__content {
  width: 100%; max-width: none; height: 100%; max-height: none;
  border-radius: 0; box-shadow: none; animation: none;
  background: var(--bg-page); text-align: left;
  padding: env(safe-area-inset-top) 0 0;
}
#dmModal .modal__head {
  padding: 10px 12px; gap: 8px; min-height: 56px;
  background: var(--bg-surface) !important; border-bottom: 1px solid var(--border-light);
}
#dmModal .modal__title { font-size: var(--fs-md); font-weight: 700; margin-right: auto; }
#dmModal .dm-back + .modal__title { margin-left: 0; }
#dmModal .modal__close {
  position: static; width: 40px; height: 40px; border: none; border-radius: 50%;
  background: transparent; color: var(--text-primary); font-size: 18px;
  display: grid; place-items: center; flex: 0 0 auto;
}
#dmModal .modal__body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
#dmListView {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
}
#dmListView .dm-threads { margin-left: -16px; margin-right: -16px; }
#dmListView .dm-thread { border-radius: 0; padding: 12px 16px; border-bottom: 1px solid var(--border-light); }
#dmSearch { border: none; background: var(--bg-surface-2); height: var(--btn-h-sm); }
#dmChatView { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#dmChatView .dm-messages { flex: 1; min-height: 0; max-height: none; padding: 14px 12px; }
#dmChatView .dm-media { margin: 0 12px 6px; }
#dmChatView .dm-composer {
  margin: 0; padding: 8px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-light); background: var(--bg-surface);
}
#dmModal .modal__close[hidden] { display: none; }
#dmModal .modal__title { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Dans une conversation, la fleche retour suffit (comme le chat coach). */
#dmModal .dm-back:not([hidden]) ~ .modal__close { display: none; }
#dmListView .dm-thread .pframe { margin: 6px 4px 6px 6px; flex: 0 0 auto; }

/* =============================================================================
   v0.89.2 - NOTIFICATIONS EN PLEIN ECRAN (demande de Lou)
   Meme cadre que les messages ; une ligne = avatar + une phrase + heure,
   point orange tant que c'est nouveau, titres de periode discrets.
   ============================================================================= */
#notifModal { padding: 0; background: var(--bg-page); backdrop-filter: none; align-items: stretch; }
#notifModal.show { animation: none; }
body:has(#notifModal.show) { overflow: hidden; }
#notifModal .modal__content {
  width: 100%; max-width: none; height: 100%; max-height: none;
  display: flex; flex-direction: column;
  border-radius: 0; box-shadow: none; animation: none;
  background: var(--bg-page); text-align: left;
  padding: env(safe-area-inset-top) 0 0;
}
#notifModal .modal__head {
  display: flex; align-items: center; padding: 10px 12px 10px 16px; gap: 4px; min-height: 56px;
  background: var(--bg-surface) !important; border-bottom: 1px solid var(--border-light);
}
#notifModal .modal__title { flex: 1; min-width: 0; text-align: left; font-size: var(--fs-md); font-weight: 700; margin: 0; }
#notifModal .modal__close {
  position: static; width: 40px; height: 40px; border: none; border-radius: 50%;
  background: transparent; color: var(--text-primary); font-size: 18px;
  display: grid; place-items: center; flex: 0 0 auto;
}
#notifModal .modal__close[hidden] { display: none; }
#notifModal .notif-clear { color: var(--text-secondary); font-size: 16px; }
#notifModal .modal__body {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 0 0 calc(16px + env(safe-area-inset-bottom));
}
.notif-sec {
  padding: 18px 16px 6px; font-size: 11px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-tertiary);
}
#notifList .notif-swipe { border-radius: 0; max-height: 160px; }
#notifList .notif-swipe__del { padding-right: 24px; font-size: 16px; background: var(--danger); }
#notifList .notif {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-bottom: none; background: var(--bg-page); text-align: left;
}
#notifList .notif:hover { background: var(--bg-page); }
#notifList .notif:active { background: var(--bg-surface); }
#notifList .notif > .comment__avatar, #notifList .notif > .pframe { flex: 0 0 auto; }
#notifList .notif > .pframe { margin: 4px 2px 4px 4px; }
.notif__ico { display: grid; place-items: center; background: var(--bg-surface-2); color: var(--flame); font-size: 14px; }
#notifList .notif__body { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; color: var(--text-primary); }
.notif__txt {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
.notif__txt strong { font-weight: 700; }
#notifList .notif__when { display: block; margin-top: 2px; font-size: 12px; color: var(--text-tertiary); }
#notifList .notif--new .notif__when { color: var(--flame); font-weight: 600; }
.notif__dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--flame); }
.notif-empty { padding: 80px 24px; text-align: center; color: var(--text-tertiary); }
.notif-empty i { font-size: 28px; margin-bottom: 12px; opacity: .5; }

/* =============================================================================
   v0.89.3 - SEANCE OU POST LIBRE : LA DIFFERENCE SE VOIT SANS SE LIRE
   Un post libre n'a que du texte et/ou une photo. Une seance porte un
   bandeau de trois chiffres (duree, series, volume) et ses premiers
   exercices : la forme d'une "fiche d'entrainement", reconnaissable d'un
   coup d'oeil, sans etiquette "Séance".
   ============================================================================= */
.social-card__session { margin: 2px 0 10px; }
.social-card__session .social-card__title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; }
.social-card__figs { display: flex; gap: 28px; margin-top: 10px; }
.sfig { display: flex; flex-direction: column; min-width: 0; }
.sfig strong {
  font-size: 22px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: var(--text-primary);
}
.sfig strong small { margin-left: 2px; font-size: 13px; font-weight: 600; color: var(--text-tertiary); letter-spacing: 0; }
.sfig span {
  margin-top: 3px; font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-tertiary);
}

/* =============================================================================
   v0.89.5 - MUSCLES EN PASTILLES + DETAIL DE SEANCE EN PLEINE PAGE (Lou)
   ============================================================================= */
.social-card__muscles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.social-card__muscles span {
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--bg-surface-2); color: var(--text-secondary);
}

#socialDetailModal { padding: 0; background: var(--bg-page); backdrop-filter: none; align-items: stretch; }
#socialDetailModal.show { animation: none; }
body:has(#socialDetailModal.show) { overflow: hidden; }
#socialDetailModal .modal__content {
  width: 100%; max-width: none; height: 100%; max-height: none;
  display: flex; flex-direction: column;
  border-radius: 0; box-shadow: none; animation: none;
  background: var(--bg-page); text-align: left;
  padding: env(safe-area-inset-top) 0 0;
}
.sd-head {
  display: flex; align-items: center; min-height: 56px; padding: 8px 12px 8px 4px; flex: 0 0 auto;
  background: var(--bg-surface); border-bottom: 1px solid var(--border-light);
}
.sd-back {
  width: 40px; height: 40px; border: none; border-radius: 50%; background: transparent;
  color: var(--text-primary); font-size: 18px; display: grid; place-items: center; cursor: pointer;
}
#socialDetailModal .modal__body {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 0 calc(24px + env(safe-area-inset-bottom));
}
.sd-exo { padding: 20px 16px 4px; }
.sd-exo__name { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--text-primary); }
.sd-exo__note { margin-top: 4px; font-size: 14px; line-height: 1.35; color: var(--text-secondary); white-space: pre-line; }
.sd-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-variant-numeric: tabular-nums; }
.sd-table th {
  padding: 0 0 6px; text-align: left; font-size: 11px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--text-tertiary);
}
.sd-table td { padding: 9px 0; font-size: 15px; border-top: 1px solid var(--border-light); color: var(--text-primary); }
.sd-table th:first-child, .sd-table td:first-child { width: 56px; color: var(--text-tertiary); }
.sd-table td:nth-child(2) { font-weight: 600; }
.sd-table th:last-child, .sd-table td:last-child { text-align: right; }
.sd-table--time td:nth-child(2) { font-weight: 400; }
.sd-comments { padding: 8px 16px 0; }
.sd-save { padding: 28px 16px 8px; display: flex; flex-direction: column; gap: 12px; }
.sd-save__name {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: 16px; font-weight: 600; outline: none;
}
.sd-save__name:focus { border-color: var(--flame); }

/* =============================================================================
   v0.90 - CREATION DE SEANCE, AJOUT D'EXERCICES, SEANCE EN COURS
   (maquettes validees par Lou) : tout en pleine page, rangees bord a bord,
   gris discret, orange reserve a l'action principale.
   ============================================================================= */

/* --- Pages pleines (editeur, ajout d'exercices, fiche d'exercice) --- */
.modal.fullpage { padding: 0; background: var(--bg-page); backdrop-filter: none; align-items: stretch; z-index: 2100; }
.modal.fullpage.show { animation: none; }
body:has(.modal.fullpage.show) { overflow: hidden; }
.modal.fullpage > .modal__content {
  width: 100%; max-width: none; height: 100%; max-height: none;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 0; box-shadow: none; animation: none; border: none;
  background: var(--bg-page); text-align: left;
  padding: env(safe-area-inset-top) 0 0;
}
#catalogPickerModal, #exoInfoModal { z-index: 2200; }   /* au-dessus de l'editeur et du mode guide */
.fp-head {
  display: flex; align-items: center; gap: 4px; min-height: 56px; flex: 0 0 auto;
  padding: 8px 8px 8px 4px; background: var(--bg-surface); border-bottom: 1px solid var(--border-light);
}
.fp-icon {
  width: 40px; height: 40px; flex: 0 0 auto; border: none; border-radius: 50%;
  background: transparent; color: var(--text-primary); font-size: 18px;
  display: grid; place-items: center; cursor: pointer;
}
.fp-title { flex: 1; min-width: 0; font-size: var(--fs-md); font-weight: 700; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-title--left { text-align: left; }
.fp-txt { border: none; background: none; color: var(--flame); font: inherit; font-size: 15px; font-weight: 700; padding: 8px 10px; cursor: pointer; }
.fp-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 24px; }
.fp-foot {
  flex: 0 0 auto; display: flex; gap: 10px; align-items: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg-surface); border-top: 1px solid var(--border-light);
}
.fp-foot .primary-btn { flex: 1; justify-content: center; }
.fp-foot .primary-btn:disabled { opacity: .45; }
.fp-trash {
  width: 52px; height: var(--btn-h, 44px); flex: 0 0 auto; border: none; border-radius: 12px;
  background: var(--bg-surface-2); color: var(--danger); font-size: 16px; cursor: pointer;
}
.fp-lbl {
  padding: 20px 16px 8px; font-size: 11px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-tertiary);
}
.fp-lbl--inline { padding: 0; margin-right: auto; }
.fp-pad { padding: 0 16px; }
.fp-addrow {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 16px;
  border: none; border-bottom: 1px solid var(--border-light); background: transparent;
  color: var(--flame); font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer;
}
.fp-addrow i { width: 16px; text-align: center; }

/* Selecteur segmente (objectif, recuperation) */
.seg2 { display: flex; padding: 3px; border-radius: 10px; background: var(--bg-surface-2); }
.seg2 > button {
  flex: 1; min-width: 0; padding: 8px 4px; border: none; border-radius: 8px; background: transparent;
  color: var(--text-secondary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  box-shadow: none; margin: 0;
}
.seg2 > button.objective-choice__btn--active,
.seg2 > button.tpl-rest-btn--active,
.seg2 > button.is-on { background: var(--bg-page); color: var(--text-primary); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg2--sm { margin-top: 8px; }
.seg2--sm > button { font-size: 13px; padding: 6px 4px; }

/* --- Mes seances --- */
#templatesList.tpl-list { display: block; margin: 0 -16px; }
.tpl-row {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px;
  border: none; border-bottom: 1px solid var(--border-light); background: transparent;
  color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
}
.tpl-row:active { background: var(--bg-surface); }
.tpl-row__sq { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; }
.tpl-row__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tpl-row__name { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-row__meta { font-size: 13px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-row__go { color: var(--text-tertiary); font-size: 13px; }
@media (min-width: 900px) { #templatesList.tpl-list { margin: 0; } }

/* --- Editeur de seance --- */
.tpled-name, .tpled-desc {
  display: block; width: 100%; border: none; background: transparent; color: var(--text-primary);
  font-family: inherit; padding: 0 16px; outline: none;
}
.tpled-name { margin-top: 18px; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.tpled-desc { margin-top: 6px; font-size: 14px; color: var(--text-secondary); }
.tpled-name::placeholder { color: var(--text-tertiary); }
.tpled-desc::placeholder { color: var(--text-tertiary); }
#tplEditorExos.editor-exos { display: block; border-top: 1px solid var(--border-light); }
.tex { border-bottom: 1px solid var(--border-light); background: var(--bg-page); position: relative; }
.tex--grouped { box-shadow: inset 3px 0 0 var(--flame); }
.tex-group { padding: 10px 16px 6px; font-size: 12px; font-weight: 600; color: var(--flame); border-bottom: 1px solid var(--border-light); }
.tex__row { display: flex; align-items: center; gap: 8px; padding: 0 16px 0 4px; min-height: 60px; }
.tex__grip {
  width: 36px; height: 48px; flex: 0 0 auto; display: grid; place-items: center;
  color: var(--text-tertiary); opacity: .6; touch-action: none; cursor: grab;
}
.tex__txt { flex: 1; min-width: 0; padding: 10px 0; cursor: pointer; }
.tex__name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tex__meta { margin-top: 2px; font-size: 13px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.tex__chev { color: var(--text-tertiary); font-size: 12px; padding: 10px 0 10px 8px; cursor: pointer; }
.tex.is-dragging { z-index: 5; background: var(--bg-surface); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.tex.is-target { box-shadow: inset 0 2px 0 var(--flame); }
.tex__body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.tex-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tex-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tex-f > span:first-child, .tex-opt > span {
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-tertiary);
}
.tex-f input, .tex-opt select, .tex-notes {
  width: 100%; min-width: 0; height: 44px; border: none; border-radius: 10px; background: var(--bg-surface-2);
  color: var(--text-primary); font: inherit; font-size: 16px; font-weight: 600; text-align: center; padding: 0 8px;
}
.tex-f__pdc { height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--bg-surface-2); color: var(--text-secondary); font-weight: 600; }
.tex-step { display: flex; align-items: center; height: 44px; border-radius: 10px; background: var(--bg-surface-2); }
.tex-step button { width: 36px; height: 44px; border: none; background: none; color: var(--text-primary); font-size: 18px; cursor: pointer; }
.tex-step strong { flex: 1; text-align: center; font-size: 16px; font-variant-numeric: tabular-nums; }
.tex-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); }
.tex-check input { width: 18px; height: 18px; accent-color: var(--flame); }
.tex-opt { display: flex; align-items: center; gap: 12px; }
.tex-opt > span { flex: 0 0 110px; }
.tex-opt select { text-align: left; font-weight: 500; font-size: 15px; padding: 0 12px; }
.tex-hint { font-size: 13px; color: var(--text-tertiary); line-height: 1.4; }
.tex-notes { height: auto; min-height: 64px; padding: 10px 12px; text-align: left; font-weight: 400; font-size: 15px; resize: vertical; }
.tex-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tex-link, .tex-remove { border: none; background: none; font: inherit; font-size: 14px; font-weight: 600; padding: 6px 0; cursor: pointer; }
.tex-link { color: var(--text-secondary); }
.tex-link.is-on { color: var(--flame); }
.tex-remove { color: var(--danger); }
.tpled-color { display: flex; align-items: center; gap: 12px; padding: 22px 16px 8px; }
.tpled-color .tpl-color-presets { display: flex; gap: 12px; }
.tpled-color .tpl-color-preset {
  width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%; cursor: pointer; transform: none;
}
.tpled-color .tpl-color-preset--active { box-shadow: 0 0 0 2px var(--bg-page), 0 0 0 4px var(--text-primary); }
.tpled-color .tpl-color-trigger {
  width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%; cursor: pointer;
  background: conic-gradient(#ff5722, #ffb800, #2ecc71, #3498db, #9b59b6, #ff5722);
}
.tpled-color .tpl-color-trigger__current { display: none; }
#tplEditorModal .tpl-color-popover { margin: 8px 16px 0; }

/* --- Ajouter des exercices --- */
.cat-tools { flex: 0 0 auto; padding: 12px 0 12px; border-bottom: 1px solid var(--border-light); background: var(--bg-page); }
.cat-search {
  display: flex; align-items: center; gap: 10px; height: 44px; margin: 0 16px; padding: 0 14px;
  border-radius: 12px; background: var(--bg-surface-2); color: var(--text-tertiary);
}
.cat-search input { flex: 1; min-width: 0; height: 100%; border: none; background: none; color: var(--text-primary); font: inherit; font-size: 16px; outline: none; }
.cat-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.cat-chips { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px 0; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips--sub { padding-top: 8px; }
.cat-chip {
  flex: 0 0 auto; padding: 7px 13px; border: none; border-radius: 999px;
  background: var(--bg-surface-2); color: var(--text-secondary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.cat-chip.is-on { background: var(--text-primary); color: var(--bg-page); }
.cat-select {
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text-secondary); font-size: 13px; font-weight: 600;
}
.cat-select.is-on { color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--text-primary); }
.cat-select i { font-size: 10px; }
.cat-select select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
#catalogList .catalog-flat-list { display: block; }
#catalogList .catalog-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; margin: 0; padding: 10px 16px;
  border: none; border-bottom: 1px solid var(--border-light); border-radius: 0; box-shadow: none;
  background: transparent; color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
}
#catalogList .catalog-row:active { background: var(--bg-surface); }
#catalogList .catalog-row__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#catalogList .catalog-row__name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
#catalogList .catalog-row__meta { font-size: 13px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#catalogList .catalog-row__add {
  width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%;
  border: 2px solid var(--border); background: transparent; color: transparent; font-size: 12px;
}
#catalogList .catalog-row--selected { background: transparent; }
#catalogList .catalog-row--selected .catalog-row__add { background: var(--flame); border-color: var(--flame); color: #fff; }
#catalogList .fp-lbl { padding-top: 18px; }
#catalogList .empty-state { padding: 32px 16px; }

/* --- Seance en cours : vue liste --- */
#screenSession .sx-head {
  display: flex; align-items: center; gap: 4px; margin: 0 -16px 4px; padding: 8px 8px 8px 4px; min-height: 60px;
  border: none !important; border-bottom: 1px solid var(--border-light) !important; border-radius: 0;
  background: var(--bg-surface) !important; box-shadow: none;
}
.sx-head__btn {
  width: 40px; height: 40px; flex: 0 0 auto; border: none; border-radius: 50%; background: transparent;
  color: var(--text-primary); font-size: 18px; display: grid; place-items: center; cursor: pointer;
}
.sx-head__txt { flex: 1; min-width: 0; }
.sx-head__name { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-head__sub { margin-top: 1px; font-size: 12px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
/* v0.109.1 : compteur de tonnes de la seance (liste et plein ecran). */
.sx-tons {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px;
  border-radius: 999px; background: var(--bg-surface-2); color: var(--text-primary);
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sx-tons i { font-size: 11px; color: var(--flame); }
.sx-head__date { position: relative; display: inline-flex; align-items: center; gap: 4px; color: var(--text-secondary); font-weight: 600; }
.sx-head__date i { font-size: 9px; }
.sx-head__date input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; }
#screenSession .exercises { margin: 0 -16px; }
#screenSession .exercises__list { display: block; }
.sx { padding: 18px 16px 4px; border-bottom: 1px solid var(--border-light); }
.sx__head { display: flex; align-items: center; gap: 8px; }
.sx__name {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 2px 0; border: none; background: none;
  color: var(--text-primary); font: inherit; font-size: 16px; font-weight: 700; text-align: left; cursor: pointer;
}
.sx__name i { font-size: 11px; color: var(--text-tertiary); }
.sx__more { width: 36px; height: 32px; border: none; background: none; color: var(--text-tertiary); font-size: 16px; cursor: pointer; }
.sx__meta { margin-top: 2px; font-size: 13px; color: var(--text-tertiary); }
.sx__meta--hint { color: var(--text-secondary); }
.sx__unit {
  display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 6px;
  background: var(--bg-surface-2); color: var(--text-secondary); font-size: 12px; font-weight: 600;
}
.sx__lest {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 12px; border: 1px solid var(--border);
  border-radius: 999px; background: none; color: var(--text-secondary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.sx__lest i { font-size: 11px; }
.sx__lest.is-on { border-color: var(--flame); color: var(--flame); }
.sx-table .sx-pdc { color: var(--text-tertiary); font-size: 13px; font-weight: 600; text-align: center; }
.sx .xinfo { margin: 8px 0 0; }
.sx-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sx-table th {
  padding: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-tertiary); text-align: center;
}
.sx-table td { padding: 4px 0; text-align: center; vertical-align: middle; }
.sx-table th:first-child, .sx-table td:first-child { width: 42px; text-align: left; }
.sx-table th:nth-child(2), .sx-table td:nth-child(2) { width: 72px; }
.sx-table th:last-child, .sx-table td:last-child { width: 44px; text-align: right; }
.sx-n { color: var(--text-tertiary); font-size: 15px; }
/* v0.110 : rallonges de serie (idee #5). Ligne discrete sous la serie ;
   glisser la serie vers la gauche en ajoute une. */
.sx-table tr[data-set] { touch-action: pan-y; }
.sx-table tr.sx-swipe-ok .sx-n { color: var(--flame); }
.sx-table tr.sx-extra td { padding: 0 0 4px; width: auto; text-align: left; }
.sx-extra__btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border: none; border-radius: 999px;
  background: var(--bg-surface-2); color: var(--text-secondary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.sx-extra__btn i { font-size: 11px; color: var(--flame); }
#extraSheet .xs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; padding: 8px 0 14px; }
#extraSheet .xs-field .auto-target__value { width: 64px; min-width: 0; text-align: center; }
/* `hidden` doit gagner sur le display des boutons. */
#extraSheet [hidden], #autoExtraBtn[hidden], #autoExtraBtn2[hidden] { display: none !important; }
#extraSheet .xs-field { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#extraSheet .xs-secs {
  grid-column: 1 / -1; justify-self: center; display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-secondary); font-size: 14px; font-weight: 600;
}
#extraSheet .xs-secs input {
  width: 72px; height: 38px; border: none; border-radius: 9px; background: var(--bg-surface-2);
  color: var(--text-primary); font: inherit; font-size: 16px; text-align: center;
}
#extraSheet .primary-btn { margin-bottom: 4px; }
.sx-prev { color: var(--text-tertiary); font-size: 13px; white-space: nowrap; }
.sx-in {
  width: 100%; max-width: 76px; height: 38px; border: none; border-radius: 9px; background: var(--bg-surface-2);
  color: var(--text-primary); font: inherit; font-size: 16px; font-weight: 600; text-align: center; padding: 0 4px;
  -moz-appearance: textfield;
}
.sx-in::-webkit-outer-spin-button, .sx-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sx-in::placeholder { color: var(--text-tertiary); opacity: .6; font-weight: 500; }
.sx-table tr.is-done .sx-in { background: transparent; }
.sx-check {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); background: transparent;
  color: transparent; display: inline-grid; place-items: center; font-size: 13px; cursor: pointer;
}
.sx-check.is-done { background: var(--flame); border-color: var(--flame); color: #fff; }
.sx__addset {
  display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 10px; padding: 6px 0; border: none; background: none;
  color: var(--text-tertiary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.sx__addset i { font-size: 11px; }
.sx__notes {
  display: block; width: 100%; margin: 0 0 14px; padding: 10px 12px; border: none; border-radius: 10px;
  background: var(--bg-surface-2); color: var(--text-primary); font: inherit; font-size: 15px; resize: vertical;
}
#screenSession #addExoToSessionBtn { border-bottom: none; }
#screenSession .finish-container { margin-top: 16px; padding: 0; }
#screenSession .finish-container .primary-btn { width: 100%; justify-content: center; }

/* Barre de repos : fine, bord a bord (marges 16), au-dessus de la barre du bas */
.restpill {
  left: 16px; right: 16px; transform: none; overflow: hidden;
  gap: 10px; padding: 0 6px 0 14px; height: 48px; border-radius: 14px;
  background: var(--bg-surface-2); color: var(--text-primary); box-shadow: 0 6px 20px rgba(0,0,0,.18);
}
.restpill__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: color-mix(in srgb, var(--flame) 16%, transparent); transition: width .25s linear; }
.restpill > *:not(.restpill__fill) { position: relative; }
.restpill__ico { color: var(--flame); }
.restpill__time { font-family: inherit; font-size: 17px; font-weight: 700; min-width: 0; font-variant-numeric: tabular-nums; }
.restpill__lbl { margin-right: auto; font-size: 13px; font-weight: 500; opacity: 1; color: var(--text-tertiary); }
.restpill__btn { padding: 8px 8px; background: none; color: var(--text-secondary); font-size: 14px; font-weight: 700; }
.restpill__btn--go { background: none; color: var(--flame); }
@media (min-width: 900px) { .restpill { left: calc(var(--nav-width-desktop) + 24px); right: 24px; max-width: 640px; margin: 0 auto; } }

/* --- Mode guide --- */
#autoScreen { padding: env(safe-area-inset-top) 0 0; background: var(--bg-page); gap: 0; }
#autoScreen > * { max-width: none; }
#autoScreen .ag-hidden { display: none !important; }
#autoScreen .ag-head {
  display: flex; align-items: center; gap: 2px; min-height: 60px; padding: 8px 6px 8px 4px;
  background: var(--bg-surface); border-bottom: 1px solid var(--border-light);
}
.ag-head__txt { flex: 1; min-width: 0; }
.ag-head__name { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-head__sub { margin-top: 1px; font-size: 12px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
#autoScreen .auto-screen__progress-bar { height: 3px; margin: 0; border-radius: 0; background: var(--bg-surface-2); }
#autoScreen .auto-screen__progress-fill { background: var(--flame); border-radius: 0; }
#autoScreen #autoRestSlot { padding: 0 16px; }
#autoScreen .restpill--auto { position: relative; left: auto; right: auto; bottom: auto; margin-top: 12px; box-shadow: none; z-index: 1; }
#autoScreen .auto-screen__body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px; background: var(--bg-page); display: block; }
#autoScreen .auto-card {
  background: transparent; box-shadow: none; border: none; border-radius: 0; padding: 18px 0 8px;
  display: flex; flex-direction: column; align-items: center; gap: 0; min-height: 0; text-align: center;
}
#autoScreen .ag-muscles { font-size: 13px; color: var(--text-tertiary); min-height: 18px; }
#autoScreen .auto-card__coach { width: 100%; margin-top: 8px; text-align: left; }
#autoScreen .auto-card__coach:empty { display: none; }
.ag-sets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.ag-pill {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--border); background: transparent;
  color: var(--text-secondary); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.ag-pill.is-done { background: var(--flame); border-color: var(--flame); color: #fff; }
.ag-pill.is-cur { border-color: var(--text-primary); color: var(--text-primary); }
.ag-pill.is-done.is-cur { box-shadow: 0 0 0 2px var(--bg-page), 0 0 0 4px var(--flame); }
.ag-pill--add { border-style: dashed; color: var(--text-tertiary); font-size: 12px; }
#autoScreen .auto-card__target {
  display: flex; flex-direction: column; align-items: center; gap: 22px; width: 100%;
  margin-top: 30px; padding: 0; background: none;
}
#autoScreen .auto-target { background: none !important; padding: 0; border: none; box-shadow: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
#autoScreen .auto-target__stepper { display: flex; align-items: center; gap: 14px; }
#autoScreen .auto-step-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--bg-surface-2);
  color: var(--text-primary); font-size: 15px; display: grid; place-items: center; cursor: pointer; box-shadow: none;
}
#autoScreen .auto-target__value {
  width: 150px; border: none; background: transparent; color: var(--text-primary); text-align: center;
  font: inherit; font-size: 52px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; padding: 0;
}
#autoScreen .auto-target__value::-webkit-outer-spin-button,
#autoScreen .auto-target__value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#autoScreen .auto-target__label {
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-tertiary);
}
#autoScreen .auto-screen__actions, #autoScreen .auto-screen__done {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 6px; background: var(--bg-page); margin: 0;
}
#autoScreen .auto-screen__actions .primary-btn, #autoScreen .auto-screen__done .primary-btn,
#autoScreen .auto-screen__done .ghost-btn { width: 100%; justify-content: center; height: 50px; font-size: 16px; }
.ag-textbtn { border: none; background: none; color: var(--text-secondary); font: inherit; font-size: 14px; font-weight: 600; padding: 6px; cursor: pointer; }
#autoScreen .ag-nav {
  flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border-light); background: var(--bg-surface);
}
.ag-nav__btn {
  border: none; background: none; font: inherit; font-size: 14px; color: var(--text-tertiary); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; min-width: 0;
}
.ag-nav__btn--next { color: var(--text-primary); font-weight: 600; }
.ag-nav__btn--next span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
#autoScreen.ag-empty .ag-nav, #autoScreen.ag-empty .ag-sets { display: none; }
#autoScreen .auto-card__empty-add { width: 100%; margin-top: 40px; }

/* --- Fiche d'exercice --- */
.xi-media { margin: 0; background: #fff; display: grid; place-items: center; }
.xi-media img { display: block; width: 100%; max-height: 300px; object-fit: contain; }
.xi-muscles { padding: 14px 16px 0; font-size: 14px; color: var(--text-secondary); }
.xi-figs { display: flex; gap: 32px; padding: 18px 16px 4px; }
.xi-fig { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.xi-fig > span { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--text-tertiary); }
.xi-fig strong { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.xi-fig strong small { font-size: 14px; font-weight: 600; color: var(--text-tertiary); margin-left: 2px; }
.xi-fig em { font-style: normal; font-size: 13px; color: var(--text-tertiary); }
.xi-chart { padding: 0 8px; }
#exoInfoBody .prog-empty { padding: 20px 16px; }
#autoScreen .auto-target__stepper { display: flex; width: auto; grid-template-columns: none; }
#autoScreen .auto-target__value { flex: 0 0 150px; width: 150px; min-width: 150px; }
#autoScreen .auto-target { width: auto; flex: 0 0 auto; }
/* Plein ecran : la barre d'onglets ne recouvre plus le mode guide (la fleche
   retour ramene a la liste, d'ou l'on navigue). */
body.auto-mode-open .nav, body.auto-mode-open .bottom-nav { visibility: hidden !important; }
#autoScreen.auto-screen { padding-bottom: 0; }
@media (min-width: 900px) { body.auto-mode-open #autoScreen.auto-screen { left: 0; } }
#screenSession .timer { display: none !important; }

/* v0.90.1 : total des proteines corrigeable depuis l'Accueil */
.home-prot__total { display: inline-flex; align-items: baseline; gap: 8px; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.home-prot__total i { font-size: 12px; color: var(--text-tertiary); }
.home-prot__add--edit .home-prot__lbl { flex: 0 0 auto; font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); }

/* =============================================================================
   v0.91 - SEANCE IA EN PLEINE PAGE (demande de Lou)
   -----------------------------------------------------------------------------
   Meme grammaire que l'editeur de seance : pas de titre, un grand champ de
   texte sans cadre, les pieces jointes en lignes simples, et en bas deux
   icones (photo, micro) a cote du bouton principal. Pendant un enregistrement,
   la barre du bas devient : poubelle, point rouge + chrono, Terminer.
   ============================================================================= */
#voiceModal .fp-body { display: flex; flex-direction: column; }
#voiceModal .fp-title:empty { visibility: hidden; }
.vx-text {
  display: block; width: 100%; min-height: 120px; padding: 18px 16px 12px; overflow: hidden;
  border: none; background: transparent; color: var(--text-primary); resize: none;
  font-family: inherit; font-size: 18px; line-height: 1.45; outline: none;
}
.vx-text::placeholder { color: var(--text-tertiary); }
.vx-atts { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }

.vx-photo { position: relative; align-self: flex-start; }
.vx-photo img {
  display: block; max-width: 100%; max-height: 220px; object-fit: contain;
  border-radius: var(--radius-md); background: var(--bg-surface-2);
}
.vx-photo__rm {
  position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: none; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 14px; display: grid; place-items: center; cursor: pointer;
}

.vx-audio {
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 4px 0 8px;
  border-radius: var(--radius-md); background: var(--bg-surface-2);
}
.vx-audio[hidden] { display: none; }
.vx-audio__play {
  width: 40px; height: 40px; flex: 0 0 auto; border: none; border-radius: 50%;
  background: var(--flame); color: var(--text-on-flame); font-size: 14px; display: grid; place-items: center; cursor: pointer;
}
.vx-audio__bar { flex: 1; min-width: 0; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.vx-audio__bar span { display: block; height: 100%; width: 0; background: var(--flame); }
.vx-audio__time { font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.vx-audio__rm { color: var(--text-tertiary); font-size: 15px; }

#voiceModal .voice-unmatched { margin: 12px 16px 0; }
#voiceModal .voice-rec__status { margin-top: auto; padding: 14px 16px 0; text-align: left; color: var(--text-secondary); font-size: 14px; }

/* Barre du bas */
.vx-tool { color: var(--text-secondary); font-size: 20px; width: 44px; height: 44px; }
.vx-tool:disabled { opacity: .35; }
#voiceFoot .primary-btn { gap: 8px; }
.vx-rec[hidden], #voiceFoot[hidden], #voiceReviewFoot[hidden] { display: none; }
.vx-rec__dot {
  width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--danger);
  animation: vxBlink 1s ease-in-out infinite;
}
@keyframes vxBlink { 50% { opacity: .25; } }
.vx-rec__time { flex: 1; font-family: var(--font-mono); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vx-rec .primary-btn { flex: 0 0 auto; gap: 8px; }
#voiceReviewFoot .ghost-btn { flex: 0 0 52px; width: 52px; padding: 0; min-height: var(--btn-h); }
#voiceReviewFoot .primary-btn { flex: 1; }

/* Apercu / verification : lignes pleine largeur comme Mes seances */
#voiceModal .voice-review { margin: 0; }
.vx-rv-name {
  display: block; width: 100%; margin-top: 18px; padding: 0 16px; border: none; background: transparent;
  color: var(--text-primary); font-family: inherit; font-size: 24px; font-weight: 700; letter-spacing: -.01em; outline: none;
}
.vx-rv-list { border-top: 1px solid var(--border-light); }
.vx-rv-row {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--border-light);
}
.vx-rv-row__txt { flex: 1; min-width: 0; }
.vx-rv-row__name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-rv-row__meta { margin-top: 2px; font-size: 13px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.vx-rv-row .fp-icon { color: var(--text-tertiary); font-size: 15px; }
.vx-rv-sess { display: flex; align-items: center; gap: 8px; padding: 20px 8px 8px 16px; }
.vx-rv-sess strong { flex: 1; min-width: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-rv-sess input[type="date"] {
  height: 36px; padding: 0 10px; border: none; border-radius: 10px; background: var(--bg-surface-2);
  color: var(--text-primary); font: inherit; font-size: 14px;
}
.vx-rv-sess .fp-icon { color: var(--danger); font-size: 15px; }
.vx-rv-hint { padding: 12px 16px 0; font-size: 13px; color: var(--text-tertiary); line-height: 1.4; }

/* =============================================================================
   v0.91 - Demandes de Remy et Lucas
   ============================================================================= */
/* Objectif de proteines : Accueil (mode correction) et Moi > Corps */
#homeProtGoal[hidden] { display: none; }
.home-prot__add--edit .home-prot__lbl { flex: 0 0 112px; }
.home-prot__unit { flex: 0 0 auto; padding-right: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-tertiary); }
#homeProtGoal { margin-top: 6px; }
.prot-goal { align-items: center; }
.prot-goal__lbl { flex: 0 0 auto; font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); }
.prot-goal .ghost-btn { flex: 0 0 auto; width: auto; height: 44px; padding: 0 18px; }   /* v0.97.1 : ghost-btn est en width 100 % par defaut, le champ etait ecrase */

/* Lien video d'un exercice : champ dans l'editeur, bouton pour le pratiquant */
.tex-video {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px;
  border-radius: 10px; background: var(--bg-surface-2); color: var(--text-tertiary);
}
.tex-video input {
  flex: 1; min-width: 0; height: 100%; border: none; background: none; outline: none;
  color: var(--text-primary); font: inherit; font-size: 15px;
}
.xinfo__video {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  min-height: var(--btn-h-sm); padding: 0 14px; border-radius: var(--radius-md);
  background: var(--bg-surface-2); color: var(--text-primary); text-decoration: none;
  font-size: 14px; font-weight: 600;
}
.xinfo__video i { color: var(--flame); margin-right: 0 !important; }
.coach-sess-exo .xinfo__video { margin-top: 6px; }

/* Menu Moi : sous-titre (Corps) */
.profile-menu__item--sub > span { display: flex; flex-direction: column; }
.profile-menu__item--sub small { font-size: var(--fs-xs); font-weight: 500; color: var(--text-tertiary); margin-top: 2px; }

/* Galerie photos : l'avant / apres en tete */
#photoGallery .photo-ba, #ccPhotos .photo-ba { margin-top: 12px; }
#ccPhotos > .photo-ba:first-child { margin-top: 0; }

/* --- Recap de fin de seance (page pleine, sobre) --- */
.fin-head { padding: 20px 16px 4px; }
.fin-head__name { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.fin-head__date { margin-top: 4px; font-size: var(--fs-sm); color: var(--text-tertiary); }
.fin-head__date::first-letter { text-transform: uppercase; }
.fin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 16px 16px 0; }
.fin-stat {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 10px;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
}
.fin-stat strong { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-stat span { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-list { margin: 0 16px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.fin-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--border-light); }
.fin-row:last-child { border-bottom: none; }
.fin-row--exo { flex-direction: column; align-items: stretch; gap: 3px; }
.fin-row__name { min-width: 0; font-size: var(--fs-md); font-weight: 600; }
.fin-row__val { flex: 0 0 auto; font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-row__val--rec { color: var(--flame); }
.fin-row__detail { font-size: var(--fs-sm); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.fin-tag {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px; vertical-align: 2px;
  border: 1px solid var(--flame); color: var(--flame); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
#finishModal .save-tpl, #finishModal .coach-report {
  margin-top: 20px; padding: 14px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: left;
}
#finishModal .fp-foot .ghost-btn { flex: 0 0 auto; width: auto; min-height: var(--btn-h); padding: 0 18px; }
#finishModal .fp-foot .primary-btn { flex: 1 1 auto; width: auto; }
@media (max-width: 360px) { .fin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- Sondages du fil (v0.92) --- */
.poll { margin: 2px 0 10px; }
.poll__q { font-size: var(--fs-md); font-weight: 700; line-height: 1.3; }
.poll__hint { margin: 2px 0 10px; font-size: 12px; color: var(--text-tertiary); }
.poll__opt {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 0; border: none; background: none;
  color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
}
.poll__check {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border);
  display: grid; place-items: center; color: transparent; font-size: 11px;
}
.poll__check--sq { border-radius: 6px; }
.poll__opt.is-mine .poll__check { background: var(--flame); border-color: var(--flame); color: #fff; }
.poll__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.poll__line { display: flex; justify-content: space-between; gap: 10px; }
.poll__label { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.poll__count { flex: 0 0 auto; font-size: 14px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.poll__bar { display: block; height: 5px; border-radius: 3px; background: var(--bg-surface-2); overflow: hidden; }
.poll__bar > span { display: block; height: 100%; border-radius: 3px; background: var(--text-tertiary); transition: width .25s ease; }
.poll__opt.is-mine .poll__bar > span { background: var(--flame); }
.poll__see {
  display: block; width: 100%; margin-top: 6px; padding: 10px 0 2px; border: none; border-top: 1px solid var(--border-light);
  background: none; color: var(--flame); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.poll__see:disabled { color: var(--text-tertiary); cursor: default; }
.poll-toggle {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border: 1px solid var(--border);
  border-radius: 999px; background: none; color: var(--text-secondary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.poll-toggle[hidden], .poll-edit[hidden], .poll-edit__add[hidden] { display: none; }
.poll-edit { margin-top: 14px; }
.poll-edit__opts { display: flex; flex-direction: column; gap: 8px; }
.poll-edit__row { display: flex; gap: 6px; align-items: center; }
.poll-edit__row .field-input { flex: 1; margin: 0; }
.poll-edit__media { width: 40px; height: 40px; flex: 0 0 auto; padding: 0; border: 1px dashed var(--border); border-radius: 10px; overflow: hidden;
  background: none; color: var(--text-tertiary); display: grid; place-items: center; cursor: pointer; }
.poll-edit__media.has-media { border-style: solid; border-color: var(--flame); }
.poll-edit__media img, .poll-edit__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.poll__media { display: block; border-radius: 10px; overflow: hidden; background: var(--bg-surface-2); }
.poll__media img, .poll__media video { display: block; width: 100%; height: 150px; object-fit: cover; }
.poll-edit__rm { width: 36px; height: 36px; flex: 0 0 auto; border: none; border-radius: 50%; background: none; color: var(--text-tertiary); cursor: pointer; }
.poll-edit__add {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 0; border: none; background: none;
  color: var(--flame); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.poll-edit__multi { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--text-secondary); }
.poll-edit__multi input { width: 18px; height: 18px; accent-color: var(--flame); }
.poll-votes__q { margin-bottom: 14px; font-weight: 700; }
.poll-votes__opt { margin-bottom: 16px; }
.poll-votes__head {
  display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border-light); font-size: 14px; font-weight: 600;
}
.poll-votes__head span:last-child { color: var(--text-tertiary); font-weight: 500; }
.poll-votes__none { font-size: 13px; color: var(--text-tertiary); padding: 6px 0; }

/* v0.93.2 : confirmation avant de quitter (bouton retour Android) */
#quitSheet .sheet__title { font-size: 16px; color: var(--text-primary); border-bottom: 0; margin-bottom: 0; padding-bottom: 4px; }
.quit-sheet__hint { margin: 0 0 10px; text-align: center; font-size: 14px; color: var(--text-secondary); }

/* v0.94 : pages pleines du social (post, j'aime, defi, nouveau defi) */
.fp-body--pad { padding: 16px max(16px, calc((100% - 640px) / 2)) 24px; }
.fp-body--pad > .field-label:first-child { margin-top: 0; }
/* v0.94 : export CSV par la feuille de partage */
.file-sheet__name { margin: 4px 0 14px; text-align: center; font-size: 14px; color: var(--text-secondary); word-break: break-all; }
#fileSheet .primary-btn { justify-content: center; }

/* v0.95 : selecteur de recuperation a roues (minutes / secondes), facon iPhone */
.rp__title { font-size: 16px; color: var(--text-primary); border-bottom: 0; margin-bottom: 0; }
.rp__wheels { position: relative; display: flex; align-items: center; justify-content: center; gap: 2px; height: 200px; margin: 4px 0 14px; }
.rp__band { position: absolute; left: 12px; right: 12px; top: 80px; height: 40px; border-radius: 10px; background: var(--bg-surface-2); }
.rp__col {
  position: relative; width: 64px; height: 200px; padding: 80px 0; box-sizing: border-box;
  overflow-y: scroll; scroll-snap-type: y mandatory; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; outline: none;
  -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
  mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
}
.rp__col::-webkit-scrollbar { display: none; }
.rp__item {
  height: 40px; line-height: 40px; text-align: center; scroll-snap-align: center;
  font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-secondary); cursor: pointer;
}
.rp__item--on { color: var(--text-primary); font-weight: 700; }
.rp__unit { position: relative; width: 40px; font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.rp__actions { display: flex; gap: 10px; }
.rp__actions > button { flex: 1; justify-content: center; min-height: var(--btn-h); margin: 0; }
.rp__actions .primary-btn:disabled { opacity: .45; }
/* bouton de recuperation d'un exercice (editeur de seance) */
.tex-rest { width: 100%; min-width: 0; height: 44px; border: none; border-radius: 10px; background: var(--bg-surface-2);
  color: var(--text-primary); font: inherit; font-size: 15px; font-weight: 500; text-align: left; padding: 0 12px;
  display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.tex-rest i { color: var(--text-tertiary); font-size: 13px; }

/* v0.96 : profil d'un athlete en page pleine */
#socialProfileModal .social-profile { padding-top: 4px; }
#socialProfileModal .social-profile__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
#socialProfileModal .social-profile__stat { padding: 12px 4px; border-radius: 12px; background: var(--bg-surface); }
#socialProfileModal .social-profile__stat-val { font-size: 18px; }
#socialProfileModal .social-profile__stat-lbl { font-size: 11px; line-height: 1.2; }
#socialProfileModal .social-profile__section { margin-top: 24px; }
#socialProfileModal .social-profile__section-title { font-size: 16px; }
.social-tpl--open { cursor: pointer; }
.social-tpl--open:active { background: var(--bg-surface-2); }
.social-tpl__chev { color: var(--text-tertiary); font-size: 12px; flex: 0 0 auto; }
.social-tpl .social-tpl__copy { width: 36px; height: 36px; padding: 0; justify-content: center; background: var(--bg-surface-2); color: var(--flame); }
.social-tpl .social-tpl__copy--done { background: var(--success, #2ecc71); color: #fff; }
.seg2 > button.peer-seg--on { background: var(--bg-page); color: var(--text-primary); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.peer-seg { margin-bottom: 10px; }
.peer-panel .chart-card { margin-bottom: 10px; }
.peer-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 6px; font-size: 13px; color: var(--text-secondary); }
.peer-key { display: inline-flex; align-items: center; gap: 6px; }
.peer-key i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.peer-key strong { color: var(--text-primary); margin-left: 2px; font-variant-numeric: tabular-nums; }

/* v0.96 : detail d'une seance d'un athlete */
#tplDetailModal { z-index: 2200; }
.tpld-head { display: flex; gap: 12px; align-items: stretch; margin-bottom: 14px; }
.tpld-head__bar { flex: 0 0 6px; border-radius: 4px; }
.tpld-head__sub { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--flame); margin-bottom: 2px; }
.tpld-head__meta { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.tpld-head__by { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }
.tpld-desc { margin: 0 0 14px; color: var(--text-secondary); font-size: 14px; white-space: pre-line; }
.tpld-list { list-style: none; margin: 0; padding: 0; border-radius: 14px; background: var(--bg-surface); overflow: hidden; }
.tpld-exo { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-bottom: 1px solid var(--border-light); }
.tpld-exo:last-child { border-bottom: 0; }
.tpld-exo__n { flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--bg-surface-2); color: var(--text-secondary); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.tpld-exo__main { flex: 1; min-width: 0; }
.tpld-exo__name { font-weight: 700; font-size: 15px; color: var(--text-primary); }
.tpld-exo__muscle { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.tpld-exo__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tpld-exo__tags span { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg-surface-2); color: var(--text-secondary); }
.tpld-exo__notes { font-size: 13px; color: var(--text-secondary); margin-top: 6px; white-space: pre-line; }
.tpld-exo__work { flex: 0 0 auto; text-align: right; display: flex; flex-direction: column; gap: 2px; }
.tpld-exo__work strong { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.tpld-exo__work span { font-size: 12px; color: var(--text-tertiary); }

/* v0.97 : profil d'un athlete aligne sur Moi (demande de Lou) :
   humeur en texte simple (pas de pastille orange), titres de section
   comme "SUIVI / RÉGLAGES", cartes de stats sans bordure. */
#socialProfileModal .social-profile__mood-row .mood-pill {
  background: none; padding: 0; color: var(--text-secondary); font-weight: 500; font-size: 15px;
}
#socialProfileModal .social-profile__mood-row .mood-pill--empty { color: var(--text-tertiary); font-style: normal; }
#socialProfileModal .social-profile__section-title {
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-tertiary); margin: 0 4px 8px;
}
#socialProfileModal .social-profile__section-title i { display: none; }
#socialProfileModal .social-profile__stat { border: none; }
#socialProfileModal .social-tpl, #socialProfileModal .social-cal { border: none; background: var(--bg-surface); }
.peer-legend__note { flex-basis: 100%; font-size: 12px; color: var(--text-tertiary); }

/* v0.97.3 - Seance : exercices repliables (demande de Lou). L'en-tete se
   touche pour deplier ; la pastille compte les series faites ; un exo termine
   prend la couleur de l'app. */
.sx__head { cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.sx__head:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; border-radius: 8px; }
.sx__name { cursor: inherit; }
.sx__prog {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  background: var(--bg-surface-2); color: var(--text-tertiary); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.sx__prog i { font-size: 10px; }
.sx__prog.is-part { color: var(--flame); }
.sx__chev { flex: 0 0 auto; font-size: 12px; color: var(--text-tertiary); transition: transform .2s ease; }
.sx--open .sx__chev { transform: rotate(180deg); }
.sx__head .sx__more { width: 32px; }
.sx__head [data-guided] { font-size: 14px; }
.sx:not(.sx--open) .sx__body { display: none; }
.sx:not(.sx--open) { padding-bottom: 14px; }
.sx--done { background: color-mix(in srgb, var(--flame) 8%, transparent); box-shadow: inset 3px 0 0 var(--flame); }
.sx--done .sx__prog { background: var(--flame); color: #fff; }

/* v0.97.6 — APPUI LONG : PLUS AUCUNE SÉLECTION DE TEXTE
   Demande de Lou : un appui maintenu sur une série, un bouton ou un post
   sélectionnait du texte (bulle Copier / Chercher / Traduire d'iOS) au lieu
   d'agir. On coupe la sélection et le menu système dans toute l'app ; seuls
   les champs de saisie restent sélectionnables, pour corriger ce qu'on tape. */
html, body, body * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable], [contenteditable] * {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}

/* v0.97.8 — Écran de fin : encart "Publier ta séance". L'éditeur de
   publication s'ouvre par-dessus l'écran de fin (déclaré plus bas dans la page). */
#finishModal .fin-post {
  margin-top: 20px; padding: 14px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: left;
}
#finishModal .fin-post__btn { margin-top: 12px; width: 100%; min-height: var(--btn-h); }
#socialPostModal.modal.fullpage { z-index: 2150; }

/* =============================================================================
   v0.97.9 - Demandes de Lucas et Remy
   ============================================================================= */
/* Programmation coach : toucher une seance l'ouvre en lecture seule */
.cc-tpl__body, .cc-line__open {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start;
  padding: 0; border: none; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.cc-tpl__body strong, .cc-line__open strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-line__open small { color: var(--text-tertiary); font-size: var(--fs-xs); }
.cc-read__head { display: flex; align-items: center; gap: 10px; }
.cc-read__head .subpage__title { flex: 1; min-width: 0; margin: 0; }
.cc-read__head .cc-mark { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; }
.cc-read__sub { margin: 4px 0 12px; }
.cc-read__sub i { font-size: 11px; margin-right: 2px; }
.cc-read__desc { white-space: pre-line; color: var(--text-secondary); font-size: var(--fs-sm); }
.cc-read__video { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.cc-read__video .xinfo__video { margin-top: 0; }
.cc-read__video .ghost-btn { width: auto; flex: 0 0 auto; }

/* Editeur : reprendre la video d'une autre seance */
.tex-vidpick {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  margin-top: 8px; padding: 6px 2px; border: none; background: none;
  color: var(--flame); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.vidpick__list { max-height: 60vh; overflow-y: auto; }
.vidpick__head { padding: 10px 14px 4px; font-size: 12px; font-weight: 700; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .04em; }
.vidpick__item span { display: flex; flex-direction: column; min-width: 0; }
.vidpick__item strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vidpick__item small { font-size: 12px; font-weight: 500; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vidpick__item i { color: var(--flame); }

/* Calendrier : seance terminee grisee avec une coche (Remy) */
.calendar__day.calendar__day--done {
  background: color-mix(in srgb, var(--text-tertiary) 22%, var(--bg-elevated)); color: var(--text-secondary);
}
.calendar__day--done .calendar__day-label { color: var(--text-tertiary); }
.calendar__day-check {
  position: absolute; top: 3px; right: 3px;
  width: 14px; height: 14px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--success); color: #fff; font-size: 8px;
}

/* =============================================================================
   v0.98 - Seances du client (coach) : muscles en pastilles, Modifier / Supprimer
   au glissement vers la gauche ou a l'appui long (Lou)
   ============================================================================= */
.cc-swipe {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border-light);
  touch-action: pan-y;
}
.cc-swipe:last-of-type { border-bottom: none; }
.cc-swipe .cc-tpl {
  position: relative; z-index: 1;
  padding: 12px 0; border-bottom: none;
  background: var(--bg-surface);
  will-change: transform;
  -webkit-user-select: none; user-select: none;
}
.cc-swipe .cc-tpl .cc-mark { align-self: flex-start; margin-top: 7px; }
.cc-swipe__acts {
  position: absolute; top: 0; right: 0; bottom: 0;
  display: flex;
}
.cc-swipe__act {
  width: 80px; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  font: inherit; font-size: 12px; font-weight: 700;
  background: var(--bg-surface-2); color: var(--text-primary);
}
.cc-swipe__act i { font-size: 15px; }
.cc-swipe__act--danger { background: var(--danger); color: #fff; }
.cc-tpl__top { display: flex; align-items: baseline; gap: 8px; width: 100%; }
.cc-tpl__top strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-tpl__top small { flex: 0 0 auto; color: var(--text-tertiary); font-size: var(--fs-xs); }
.cc-tpl__muscles { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.cc-tpl__muscles span {
  padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--bg-surface-2); color: var(--text-secondary);
}
/* Souris : pas de glissement, un bouton ... ouvre le meme menu que l'appui long. */
.cc-tpl__more {
  display: none; flex: 0 0 auto; width: 34px; height: 34px;
  border: none; border-radius: var(--radius-sm); background: none;
  color: var(--text-tertiary); cursor: pointer;
}
.cc-tpl__more:hover { background: var(--bg-surface-2); color: var(--text-primary); }
@media (hover: hover) and (pointer: fine) { .cc-tpl__more { display: block; } }

/* =============================================================================
   v0.98.1 - Profil : vrai calendrier mensuel, on glisse pour changer de mois (Lou)
   ============================================================================= */
.pcal__label { margin: 0 0 12px; text-align: center; }
.pcal__cal { overflow: hidden; touch-action: pan-y; margin-bottom: 8px; }
.pcal__days { will-change: transform; }
.pcal__days .calendar__day:not(.calendar__day--clickable) { cursor: default; }
.pcal__empty { grid-column: 1 / -1; padding: 24px 0; text-align: center; color: var(--text-tertiary); font-size: var(--fs-sm); }
/* Mon calendrier : plus de fleches, le mois est centre et on glisse */
.calendar-nav--swipe { justify-content: center; }
#calendarSwipe { overflow: hidden; touch-action: pan-y; }
#calendarDays { will-change: transform; }

/* =============================================================================
   v0.99 - Bugs et idees (Lou) : boutons de l'Accueil, panneau d'envoi, canal admin
   ============================================================================= */
/* v0.107 : seances de l'Accueil en tuiles ; appui long = edition. */
.home-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.home-tile {
  position: relative; min-height: 84px; padding: 14px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--text-primary); font: inherit; text-align: left; display: flex; align-items: flex-end; cursor: pointer;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.home-tile:not(.home-tile--add)::before { content: ''; position: absolute; top: 14px; left: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--tile); }
.home-tile:active { transform: scale(.97); }
.home-tile__name { font-weight: 600; font-size: var(--fs-md); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-tile--add { border: 1.5px dashed var(--border); background: none; align-items: center; justify-content: center; color: var(--text-tertiary); font-size: 20px; }
.home-tiles.is-edit .home-tile:not(.home-tile--add) { animation: tileWiggle .3s ease-in-out infinite alternate; }
.home-tiles.is-edit .home-tile:nth-child(2n) { animation-delay: -.15s; }
@keyframes tileWiggle { from { transform: rotate(-1deg); } to { transform: rotate(1deg); } }
.home-tile__rm { position: absolute; top: -8px; left: -8px; width: 26px; height: 26px; border-radius: 50%; background: var(--danger); color: #fff; display: grid; place-items: center; font-size: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.home-tiles__done { display: block; margin: 10px 0 0 auto; border: 0; background: none; color: var(--flame); font: inherit; font-weight: 700; padding: 6px 2px; cursor: pointer; }
.home-pick__title { margin: 0 0 10px; font-weight: 700; font-size: var(--fs-md); text-align: left; }
.home-pick { display: flex; flex-direction: column; text-align: left; }
.home-pick__item { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border: 0; border-bottom: 1px solid var(--border-light); background: none; color: var(--text-primary); font: inherit; cursor: pointer; }
.home-pick__item:last-child { border-bottom: 0; }
.home-pick__item span { flex: 1; }
.home-pick__item .fa-plus { color: var(--flame); }
/* Bouton insecte : en bas a droite, au-dessus de la barre d'onglets (et de la barre « Séance en cours »). */
.home-bug {
  position: fixed; right: 16px; bottom: calc(var(--nav-height-mobile) + 16px); z-index: 800;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-surface); color: var(--text-secondary); font-size: 17px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
body.has-livebar .home-bug { bottom: calc(var(--nav-height-mobile) + 86px); }
@media (min-width: 900px) { .home-bug, body.has-livebar .home-bug { right: 24px; bottom: 24px; } body.has-livebar .home-bug { bottom: 96px; } }
.fb-modal { align-items: flex-end; padding: 0; z-index: 2200; }
.fb-sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.fb-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 14px; background: var(--bg-surface-2); margin: 6px 0 12px; }
.fb-kinds button { border: 0; background: none; padding: 10px 6px; border-radius: 10px; font: inherit; font-weight: 700; font-size: var(--fs-sm); color: var(--text-secondary); }
.fb-kinds button.on { background: var(--bg-surface); color: var(--text-primary); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.fb-text { width: 100%; min-height: 96px; resize: vertical; }
.fb-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fb-thumb { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: #000; }
.fb-thumb img, .fb-thumb video { width: 100%; height: 100%; object-fit: cover; }
.fb-thumb button, .fb-voice button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; }
.fb-voice { position: relative; display: flex; align-items: center; gap: 6px; width: 100%; }
.fb-voice audio { flex: 1; height: 40px; }
.fb-voice button { position: static; background: var(--bg-surface-2); color: var(--text-secondary); }
.fb-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.fb-tool { justify-content: center; font-size: var(--fs-sm); cursor: pointer; }
.fb-tool.rec { color: var(--danger); border-color: var(--danger); }
.fb-hint { margin: 12px 0; font-size: var(--fs-xs); color: var(--text-tertiary); text-align: center; }
/* v0.107 : feuille Bugs et idees facon messagerie (poignee, barre de saisie). */
.fb-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: -6px auto 12px; }
.fb-sheet .fb-kinds { margin-top: 0; }
.fb-sheet .fb-files:empty { display: none; }
.fb-sheet .fb-files { margin: 0 0 10px; }
.fb-bar { display: flex; align-items: flex-end; gap: 8px; text-align: left; }
.fb-field { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; border: 1px solid var(--border); border-radius: 22px; background: var(--bg-surface-2); padding: 0 14px; }
.fb-field .fb-text { width: 100%; min-height: 0; border: 0; outline: none; background: none; resize: none; padding: 11px 0; font: inherit; font-size: 16px; line-height: 1.35; color: var(--text-primary); }
.fb-recline { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-secondary); }
.fb-recline[hidden] { display: none; }
.fb-recline i { color: var(--danger); font-size: 10px; animation: fbBlink 1s infinite; }
.fb-recline b { font-variant-numeric: tabular-nums; color: var(--text-primary); }
@keyframes fbBlink { 50% { opacity: .25; } }
.fb-round { width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; cursor: pointer; }
.fb-round--soft { background: var(--bg-surface-2); color: var(--text-primary); }
.fb-round--go { background: var(--flame); color: #fff; }
.fb-round--go.rec { background: var(--danger); }
.fb-round:disabled { opacity: .4; }
.skip-rest__q { margin: 4px 0 16px; font-size: var(--fs-lg, 18px); font-weight: 700; text-align: center; }
.skip-rest__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.skip-rest__btns button { justify-content: center; }
.fb-row__ic { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-surface-2); color: var(--flame); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
/* Le corps du modal Messages coupe ce qui depasse : le canal doit defiler lui-meme. */
#fbView {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
}
.fb-filter { display: flex; gap: 6px; margin-bottom: 8px; }
.fb-filter button { border: 1px solid var(--border); background: none; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: var(--fs-xs); font-weight: 700; color: var(--text-secondary); }
.fb-filter button.on { background: var(--text-primary); color: var(--bg-surface); border-color: var(--text-primary); }
.fb-note { font-size: var(--fs-xs); color: var(--text-tertiary); margin: 0 0 10px; }
.fb-item { border: 1px solid var(--border-light); border-radius: 16px; padding: 12px; margin-bottom: 10px; background: var(--bg-surface); }
.fb-item.done { opacity: .65; }
.fb-item__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-sm); }
.fb-when { margin-left: auto; color: var(--text-tertiary); font-size: var(--fs-xs); }
.fb-tag { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.fb-tag--bug { background: rgba(209, 67, 58, .14); color: var(--danger); }
.fb-tag--idea { background: rgba(52, 120, 246, .14); color: #3478f6; }
.fb-item__body { margin-top: 8px; white-space: pre-wrap; word-break: break-word; }
.fb-item__media { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-top: 8px; }
.fb-item__media img, .fb-item__media video { width: 100%; border-radius: 10px; display: block; background: #000; }
.fb-item__media audio { grid-column: 1 / -1; width: 100%; }
/* v0.103 : commentaire discret pour Claude, puis Lancer / Non */
.fb-comment { display: block; width: 100%; margin-top: 8px; padding: 4px 0; border: 0; background: none; resize: none; overflow: hidden;
  font: inherit; font-size: var(--fs-sm); line-height: 1.4; color: var(--text-primary); outline: none; }
.fb-comment::placeholder { color: var(--text-tertiary); }
.fb-comment:focus { border-bottom: 1px solid var(--border); }
.fb-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.fb-go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 7px 14px;
  background: var(--text-primary); color: var(--bg-surface); font: inherit; font-size: var(--fs-sm); font-weight: 700; }
.fb-go.again { background: none; color: var(--text-secondary); border: 1px solid var(--border); }
.fb-go i { font-size: 10px; }
.fb-no { border: 0; background: none; padding: 7px 4px; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--text-tertiary); }
.fb-status { margin: 8px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--text-secondary); }
.fb-actions .fb-status { margin: 0; }
.fb-status.ok { color: var(--success, #1f8a5b); }
.fb-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--text-primary); text-decoration: underline; }
.fb-done { margin-top: 10px; border: 0; background: none; padding: 4px 0; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.fb-done[aria-pressed="true"] { color: var(--success, #1f8a5b); }
.fb-audio { grid-column: 1 / -1; }
.fb-transcript { margin: 6px 2px 0; font-size: var(--fs-sm); font-style: italic; color: var(--text-secondary); white-space: pre-wrap; }

/* v0.102 - A faire du coach (Accueil du client + fiche client) */
.home-tasks { display: block; }
.home-tasks__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.task { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 2px; border: 0; border-top: 1px solid var(--border-light);
  background: none; font: inherit; color: var(--text-primary); text-align: left; cursor: pointer; }
.home-tasks .task:first-of-type { border-top: 0; }
.task__check { font-size: 20px; color: var(--text-tertiary); margin-top: 1px; flex-shrink: 0; }
.task.is-done .task__check { color: var(--success, #1f8a5b); }
.task__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.task__title { white-space: pre-wrap; word-break: break-word; }
.task.is-done .task__title { text-decoration: line-through; color: var(--text-tertiary); }
.task__due { font-size: var(--fs-xs); color: var(--text-tertiary); }
.task__due--late { color: var(--danger); font-weight: 700; }
.task--coach { cursor: default; background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: 14px; padding: 12px; margin-bottom: 8px; }
.task__del { border: 0; background: none; color: var(--text-tertiary); padding: 4px 6px; font-size: 15px; cursor: pointer; }
.task-form textarea { width: 100%; resize: vertical; }
.task-form__row { display: flex; align-items: flex-end; gap: 10px; margin-top: 10px; }
.task-form__date { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); color: var(--text-tertiary); }
.task-form__row .primary-btn { margin: 0; white-space: nowrap; }
.task-form .fb-note { margin: 10px 0 0; }
.task-sec { font-size: var(--fs-sm); color: var(--text-secondary); margin: 18px 2px 8px; }

/* v0.102 - Charges disponibles dans la salle du client */
.load-intro { margin: 4px 2px 12px; }
.load-card { margin-bottom: 10px; }
.load-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.load-src { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-surface-2); color: var(--text-secondary); }
.load-src--voice { background: rgba(52, 120, 246, .14); color: #3478f6; }
.load-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.load-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--bg-surface-2);
  border-radius: 999px; padding: 5px 10px; font: inherit; font-size: var(--fs-sm); font-weight: 700; color: var(--text-primary);
  font-variant-numeric: tabular-nums; cursor: pointer; }
.load-chip i { font-size: 10px; color: var(--text-tertiary); }
.load-card__tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.load-card__tools > button { justify-content: center; margin: 0; }
.load-card__tools .rec { color: var(--danger); border-color: var(--danger); }
.load-dict { margin-top: 10px; }
.lp__added { min-height: 18px; margin: -6px 0 10px; text-align: center; font-size: var(--fs-sm); color: var(--text-secondary); }
.lp__search { width: 100%; margin: 6px 0 8px; }
.lp__list { max-height: 50vh; overflow-y: auto; overscroll-behavior: contain; }
.lp__list .sheet__item > span { display: flex; flex-direction: column; }
.lp__list .sheet__item small { font-size: var(--fs-xs); font-weight: 500; color: var(--text-tertiary); margin-top: 2px; }
.rp__actions .primary-btn:disabled { opacity: .45; }
/* bouton « charge » de l'editeur de seance (mode coach) */
.tex-kg { font-variant-numeric: tabular-nums; }
/* v0.102.1 : pendant qu'une feuille (roue de charges, recuperation...) est ouverte,
   la page derriere ne defile plus. Sur iPhone, si la page etait encore lancee
   (defilement inertiel) a l'ouverture, le doigt continuait de la faire defiler
   au lieu de tourner la roue. */
body:has(.sheet--open) .main { overflow-y: hidden; }
.sheet__backdrop { touch-action: none; }
.sheet__panel { overscroll-behavior: contain; }
.rp__col { touch-action: pan-y; }

/* v0.105 - CARDIO (Bugs et idees #11) : blocs vitesse / pente / duree */
.sx-table--cardio th:nth-child(2), .sx-table--cardio td:nth-child(2) { width: auto; }
.sx-table--cardio .sx-in { max-width: 70px; }
.cardio-recup { font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.sx-table tr.cardio-row--recup .sx-in { background: transparent; border: 1px dashed var(--border); }
.cardio-total { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.cardio-total:empty { display: none; }
.cardio-actions { display: flex; gap: 18px; }
.cardio-int__block { margin-top: 14px; }
.cardio-int__title { margin-bottom: 6px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-tertiary); }
.cardio-int__row { display: flex; gap: 8px; }
.cardio-int__row label, .cardio-int__reps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.cardio-int__row .field-input, .cardio-int__reps .field-input { width: 100%; margin: 0; font-size: 16px; text-align: center; }
.cardio-int__reps { max-width: 140px; }
.setline--cardio { display: block; color: var(--text-secondary); }
.sd-exo__total, .setline--total { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--text-secondary); }

/* v0.106 : appui long sur le chrono de repos -> pas de selection ni de loupe iOS */
.restpill { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }

/* v0.106 - MODE GUIDE : le bouton Valider devient le chrono de repos (vert,
   rempli au fil du repos) ; l'heure de la derniere serie validee au-dessus.
   La barre de repos du haut fait doublon : masquee en plein ecran. */
#autoScreen #autoRestBar { display: none !important; }
.ag-lastdone { text-align: center; font-size: 13px; font-weight: 600; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
#autoOkBtn { position: relative; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
#autoOkBtn.ag-ok--rest { background: color-mix(in srgb, var(--success, #1f8a5b) 78%, #000); border-color: transparent; color: #fff; }
.ag-ok__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--success, #1f8a5b); transition: width .25s linear; }
.ag-ok__txt { position: relative; display: inline-flex; align-items: baseline; gap: 8px; }
.ag-ok__txt strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.ag-ok__txt small { font-size: 12px; font-weight: 600; opacity: .85; }

/* v0.106 : bouton insecte du mode guide (Bugs et idees), en bas a droite au-dessus de Valider */
#autoScreen .ag-bug {
  position: absolute; right: 16px; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--text-secondary); font-size: 17px; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
#autoScreen.ag-donepanel .ag-bug { bottom: calc(232px + env(safe-area-inset-bottom)); }

/* =============================================================================
   v0.108 - Accueil personnalisable (comme l'ecran d'accueil de l'iPhone)
   v0.108.2 : grille de 4 colonnes et de lignes de 36 px ; chaque element a une
   taille fixe en cases (home.js, ITEMS) et se pose sur n'importe quelle case.
   ============================================================================= */
.hl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; position: relative; }
.hl-item { position: relative; display: flex; min-width: 0; min-height: 0; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.hl-item > * { flex: 1; min-width: 0; min-height: 0; }
.hl-item > .hl-rm { flex: none; }
/* La forme ne depend jamais du contenu : les cartes remplissent leurs cases et defilent dedans si besoin. */
.hl-slot { display: flex; overflow: hidden; }
/* Cartes de toute la largeur : bord a bord sur telephone (marges negatives), donc pas rognees. */
.hl-w4 > .hl-slot { overflow: visible; }
.hl-slot > * { flex: 1; margin: 0; }
.hl .home-card { margin: 0; height: 100%; overflow-y: auto; }
.hl-main { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.hl-main__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hl-main .home-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-main > .primary-btn { flex: none; width: auto; margin: 0; padding: 0 18px; }
.hl-main > .home-row { flex: 1; margin: 0; }
.hl .home-tile { width: 100%; height: 100%; min-height: 0; }
.hl-item:has(> .home-dontclick) { justify-content: center; }
.hl .home-dontclick { flex: none; margin: 0; height: 100%; }
.hl-icon {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; margin-left: auto;
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-secondary); font-size: 17px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.hl-item:empty, .hl-item:has(> .hl-slot:empty) { visibility: hidden; }
.hl-item--ghost { visibility: hidden; }
/* En edition, les elements momentanement vides restent visibles en pointille, pour pouvoir les placer. */
.hl.is-edit .hl-item--ghost, .hl.is-edit .hl-item:has(> .hl-slot:empty) {
  visibility: visible; align-items: center; justify-content: center; padding: 8px;
  border: 1.5px dashed var(--border); border-radius: var(--radius-lg); color: var(--text-tertiary); font-size: var(--fs-sm); text-align: center;
}
.hl.is-edit .hl-item--ghost::before, .hl.is-edit .hl-item:has(> .hl-slot:empty)::before { content: attr(data-label); }
.hl.is-edit .hl-item:has(> .hl-slot:empty) > .hl-slot { display: none; }
.hl.is-edit .hl-item { touch-action: none; animation: tileWiggle .3s ease-in-out infinite alternate; cursor: grab; }
.hl.is-edit .hl-item:not(.hl-h1):not(.hl-h2) { animation-name: hlWiggleWide; }
.hl.is-edit .hl-item:nth-child(2n) { animation-delay: -.15s; }
@keyframes hlWiggleWide { from { transform: rotate(-.35deg); } to { transform: rotate(.35deg); } }
.hl.is-edit .hl-item > :not(.hl-rm) { pointer-events: none; }
.hl-item.is-moving { opacity: .25; animation: none !important; }
.hl-drop { border: 2px dashed var(--success); border-radius: var(--radius-lg); background: rgba(46, 160, 67, .08); pointer-events: none; z-index: 1; }
.hl-drop.is-bad { border-color: var(--danger); background: rgba(209, 67, 58, .08); }
.hl-drag { position: fixed; z-index: 3000; pointer-events: none; transform: scale(1.04); opacity: .95; filter: drop-shadow(0 10px 24px rgba(0,0,0,.25)); display: flex; }
.hl-drag .hl-rm { display: none; }
.hl-rm {
  position: absolute; top: -8px; left: -8px; z-index: 2; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%;
  background: var(--danger); color: #fff; display: grid; place-items: center; font-size: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.25); cursor: pointer;
}
/* v0.108.4 : « + » et « ✓ » discrets, en haut a droite, par-dessus : la grille ne bouge pas. */
.hl-bar { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 16px; z-index: 900; display: flex; gap: 8px; }
.hl-bar__btn {
  width: 36px; height: 36px; padding: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-primary); font-size: 15px; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.home-pick__reset { display: block; width: 100%; margin-top: 12px; padding: 12px; border: 0; background: none; color: var(--text-tertiary); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
/* Le « − » colle au bouton, pas au coin de sa case (insecte a droite, « Ne pas cliquer » centre). */
.hl-item:has(> .hl-icon) > .hl-rm { left: auto; right: 24px; }
.hl-item:has(> .home-dontclick) > .hl-rm { left: calc(50% - 76px); }

/* v0.108.3 - Widgets de l'Accueil */
.hw { gap: 6px; overflow: hidden; }
.hw.hl-main { cursor: pointer; text-align: left; color: var(--text-primary); }
.hw.hl-main > .fa-chevron-right, .hw.hl-main > .fa-paper-plane { color: var(--text-tertiary); }
.hw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hw-stats div { display: flex; flex-direction: column; }
.hw-stats b, .hw-big b { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.02em; }
.hw-stats span, .hw-big span { font-size: var(--fs-sm); color: var(--text-tertiary); }
.hw-chips { display: flex; flex-wrap: wrap; gap: 4px; overflow: hidden; max-height: 26px; }
.hw-chips span { padding: 2px 8px; border-radius: var(--radius-full); background: var(--bg-flame-soft); color: var(--flame); font-size: 12px; font-weight: 600; }
.hw-chips em { font-size: var(--fs-sm); color: var(--text-tertiary); }
.hw-big { display: flex; flex-direction: column; justify-content: center; flex: 1; }
.hw-big--row { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 0 6px; position: relative; padding-right: 34px; }
.hw-plus { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--flame); color: #fff; display: grid; place-items: center; cursor: pointer; }
.hw-days { display: flex; justify-content: space-between; gap: 4px; }
.hw-day { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--text-tertiary); background: var(--bg-elevated); }
.hw-day.is-done { background: var(--flame); color: #fff; }
.hw-day.is-planned { background: none; border: 2px solid var(--flame); color: var(--flame); }
.hw-day.is-today { box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--text-primary); }
.hw-chart { flex: 1; min-height: 0; overflow: hidden; }
.hw-podcard { gap: 4px; }
.hw-podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; flex: 1; }
.hw-pod { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.hw-pod .comment__avatar { width: 34px; height: 34px; }
.hw-pod__name { font-size: 12px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-pod__kg { font-size: 11px; color: var(--text-tertiary); }
.hw-pod__step { width: 100%; display: grid; place-items: center; border-radius: 8px 8px 0 0; background: var(--bg-elevated); font-weight: 800; color: var(--text-secondary); }
.hw-pod--1 .hw-pod__step { height: 44px; background: var(--flame); color: #fff; }
.hw-pod--2 .hw-pod__step { height: 30px; }
.hw-pod--3 .hw-pod__step { height: 20px; }
.hw-pod--empty { opacity: .4; }
.hw-pod__me { text-align: center; }
.hw-app {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-surface); color: var(--text-primary); font: inherit; cursor: pointer; padding: 4px;
}
.hw-app i { font-size: 20px; color: var(--flame); }
.hw-app span { font-size: 11px; font-weight: 600; line-height: 1.15; text-align: center; }
.hw-adgrid { margin: 10px 0; }
.hw-admsg { width: 100%; margin-bottom: 10px; }
/* Seance logique (panneau Seance IA) */
.vx-logical {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-flame-soft); color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
}
.vx-logical > i:first-child { font-size: 20px; color: var(--flame); }
.vx-logical span { flex: 1; display: flex; flex-direction: column; }
.vx-logical small { color: var(--text-tertiary); font-size: var(--fs-sm); }
.vx-logical[hidden] { display: none; }
.vx-rv-reason { margin: 8px 0 4px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--bg-flame-soft); font-size: var(--fs-sm); }
.vx-rv-reason i { color: var(--flame); margin-right: 4px; }
/* Sur telephone, les cartes prennent toute la largeur de l'ecran (voir plus haut) :
   dans la grille, seulement celles de 4 colonnes ; les plus petites restent des tuiles arrondies. */
@media (max-width: 899px) {
  .screen .hl .hl-item:not(.hl-w4) .home-card {
    margin-left: 0 !important; margin-right: 0 !important; width: 100% !important;
    border-radius: var(--radius-lg) !important; border: 1px solid var(--border) !important;
  }
}
.hl .hl-item:not(.hl-w4) .home-card { padding: 12px; }
/* v0.108.4 : feuille « Envoyer une pub » : les 3 x 3 vignettes tiennent a l'ecran avec le bouton Envoyer. */
.hw-adpages .adbank-page { gap: 6px; }
.hw-adpages .adsend-tile { aspect-ratio: auto; height: min(14vh, 112px); }

/* v0.108.7 (demande de Lou) : bouton retour = la fleche seule, partout (le nom de la page
   d'avant reste dans le bouton pour les lecteurs d'ecran, mais n'est plus affiche). */
.subpage__back { font-size: 0 !important; gap: 0; min-width: 40px; min-height: 40px; padding: 8px 12px 8px 0; }
.subpage__back i { font-size: 20px; }
#subAdmin.is-inpage > .subpage__back { display: none; }
#protHint:empty { display: none; }

/* v0.111 - PHOTO DU COMPTE EN HAUT A DROITE (demande de Lou)
   Remplace l'onglet "Moi" : on voit qui est connecte, et la toucher ouvre le
   profil. Fixe, a la hauteur de la ligne d'onglets ; chaque en-tete lui laisse
   la place a droite. Masquee sur le profil, en seance et sur l'Accueil en
   edition (les boutons + / ✓ y prennent ce coin). */
.me-btn {
  position: fixed; z-index: 90;
  top: calc(env(safe-area-inset-top, 0px) + 25px); right: 14px;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: none; cursor: pointer;
  box-shadow: 0 0 0 2px var(--bg-page), 0 2px 8px rgba(0, 0, 0, .25);
}
.me-btn:empty { display: none; }
.me-btn__img {
  width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--flame); color: #fff; font-weight: 800; font-size: 14px;
}
.me-btn__img .avatar-img, .me-btn__img .avatar-video { width: 100%; height: 100%; object-fit: cover; display: block; }
body[data-screen="profile"] .me-btn,
body[data-screen="session"] .me-btn,
body.auto-mode-open .me-btn,
body:has(.hl-bar) .me-btn { display: none; }
.tabbar, .social-tabs { padding-right: 56px !important; }
#homeRoot { padding-top: 48px; }
#coachHome > :first-child { padding-right: 48px; }

/* v0.112 - ENCART « SEANCE » DE L'ACCUEIL : Personnalisée / Auto */
.hl-main__btns { flex: none; display: flex; gap: 8px; }
.hl-main__btns > button { width: auto; margin: 0; padding: 0 16px; min-height: var(--btn-h); justify-content: center; gap: 8px; }
.hl-main__btns [data-home="ai"] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* v0.113 - onglet Chat : la pastille suit l'attribut hidden (cf. UI_DM.refreshBadges) */
.nav__item--chat .nav__dot[hidden] { display: none; }

/* v0.114 - la barre d'onglets reste visible dans le chat (demande de Lou).
   Le chat s'arrete au-dessus d'elle ; clavier ouvert, elle laisse la place
   a la saisie. L'onglet Chat est l'onglet actif tant que le chat est ouvert. */
body:has(#dmModal.show) .nav { z-index: 1600; }
body:has(#dmModal.show) .nav__item--active,
body:has(#dmModal.show) .nav__item--active i { color: var(--text-tertiary); transform: none; filter: none; }
body:has(#dmModal.show) #navChat, body:has(#dmModal.show) #navChat i { color: var(--flame); }
@media (max-width: 899px) {
  #dmModal.show { bottom: var(--nav-height-mobile); }
  #dmModal .modal__content { height: 100%; }
  #dmListView { padding-bottom: 16px; }
  #dmChatView .dm-composer { padding-bottom: 10px; }
  body:has(#dmInput:focus) .nav { display: none; }
  body:has(#dmInput:focus) #dmModal.show { bottom: 0; }
  body:has(#dmInput:focus) #dmChatView .dm-composer { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}
@media (min-width: 900px) {
  #dmModal.show { left: var(--nav-width-desktop); }
}
body.auto-mode-open #dmModal.show { bottom: 0; }
/* v0.114 : trois boutons en bas de l'ecran de fin (Rapport, Reprendre, Continuer). */
#finishModal .fp-foot { gap: 8px; }
#finishModal .fp-foot .ghost-btn { padding: 0 12px; }
#finishModal .fp-foot .primary-btn { min-width: 0; padding: 0 12px; }

/* v0.120 (#30) - Seance repetee : Répéter / À l'infini / Fin (Calendrier Apple) */
.day-repeat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; text-align: left; }
.day-repeat .seg2 > button { white-space: nowrap; }
.day-repeat__lbl { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.day-repeat__lbl i { color: var(--flame); margin-right: 6px; }
.day-repeat__row {
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 0 2px; font-size: 15px; font-weight: 600; color: var(--text-primary);
}
.day-repeat--on #dayRepeatForeverRow, .day-repeat--end #dayRepeatEndRow { display: flex; }
.day-repeat__date {
  height: 40px; padding: 0 10px; border: none; border-radius: var(--radius-md);
  background: var(--bg-surface-2); color: var(--text-primary); font: inherit; font-size: 15px;
}
.calendar__day-rep {
  position: absolute; top: 4px; left: 4px; font-size: 8px; opacity: .8;
}

/* v0.120.3 (#32) - Compte rendu pour le coach dans la seance, avant « Terminer » */
.live-report { margin: 16px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.live-report[hidden] { display: none; }
