/* ============================================================
   PG PROTOCOL — Component Styles
   ============================================================ */

/* --- Page Spinner --- */
.page-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
}
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Page Header --- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    padding-top: var(--space-sm);
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
}

.page-header__actions {
    display: flex;
    gap: var(--space-sm);
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: background var(--theme-transition), border-color var(--theme-transition);
}

.card--glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.card--gradient {
    background: var(--gradient-main);
    border: none;
    color: #fff;
}

.card--gradient .text-secondary,
.card--gradient .text-muted {
    color: rgba(255, 255, 255, 0.7);
}

.card + .card {
    margin-top: var(--space-md);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
}

.btn-primary:hover {
    background: var(--red-dim);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px var(--red-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    border-color: var(--red);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-out);
}

.btn-icon:hover {
    color: var(--red);
    border-color: var(--red);
}

/* --- Tags / Badges --- */
.tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-xl);
    background: var(--red-subtle);
    color: var(--red);
    border: 1px solid var(--border-accent);
    display: inline-block;
}

.tag--blue {
    background: rgba(95, 224, 132, 0.08);
    color: var(--blue);
    border-color: rgba(95, 224, 132, 0.3);
}

.tag--cyan {
    background: rgba(95, 224, 132, 0.08);
    color: var(--cyan);
    border-color: rgba(95, 224, 132, 0.3);
}

.tag--green {
    background: rgba(16, 185, 129, 0.08);
    color: var(--green);
    border-color: rgba(16, 185, 129, 0.3);
}

/* --- Forms --- */
.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-glow);
}

.form-input--lg {
    font-size: 2rem;
    font-family: var(--font-mono);
    font-weight: 700;
    text-align: center;
    padding: 1rem;
}

textarea.form-input {
    min-height: 80px;
    resize: vertical;
}

/* --- Inline Input Row --- */
.input-row {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.input-row .form-input {
    flex: 1;
}

.input-row__separator {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.2rem;
}

/* --- Checkbox / Toggle --- */
.check-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.check-item:last-child {
    border-bottom: none;
}

.check-item__checkbox {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s var(--ease-spring);
}

.check-item.checked .check-item__checkbox {
    background: var(--green);
    border-color: var(--green);
    animation: checkPop 0.3s var(--ease-spring);
}

@keyframes checkPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.check-item.checked .check-item__checkbox::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.check-item.checked .check-item__info {
    opacity: 0.5;
}

.check-item__info {
    flex: 1;
    transition: opacity 0.2s;
}

.check-item__name {
    font-weight: 500;
    font-size: 0.95rem;
}

.check-item__dose {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.check-item__time {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* --- Progress Bar --- */
.progress-bar {
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    border-radius: 3px;
    background: var(--gradient-main);
    transition: width 0.5s var(--ease-out);
}

.progress-bar__fill--red { background: var(--red); }
.progress-bar__fill--blue { background: var(--blue); }
.progress-bar__fill--cyan { background: var(--cyan); }
.progress-bar__fill--green { background: var(--green); }

/* --- Circular Progress --- */
.circle-progress {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.circle-progress svg {
    transform: rotate(-90deg);
}

.circle-progress__track {
    fill: none;
    stroke: var(--bg-elevated);
}

.circle-progress__fill {
    fill: none;
    stroke: var(--red);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s var(--ease-out);
}

.circle-progress__text {
    position: absolute;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
}

/* --- Score Scale (1-10) --- */
.score-scale {
    display: flex;
    gap: clamp(2px, 0.6vw, 4px);
    flex: 1;
    min-width: 0;
}

.score-scale__dot {
    width: 28px;
    min-width: 0;
    flex-shrink: 1;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s var(--ease-spring);
    -webkit-tap-highlight-color: transparent;
    color: var(--text-muted);
    position: relative;
}

/* Extend touch target to 44x44px without changing visual */
.score-scale__dot::before {
    content: '';
    position: absolute;
    inset: -8px;
}

.score-scale__dot:hover {
    border-color: var(--red);
    color: var(--red);
}

.score-scale__dot.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    transform: scale(1.1);
}

.score-scale__dot.active.score-high {
    background: var(--green);
    border-color: var(--green);
}

.score-scale__dot.active.score-mid {
    background: var(--yellow);
    border-color: var(--yellow);
}

.score-scale__dot.active.score-low {
    background: var(--red);
    border-color: var(--red);
}

/* --- NSP (Ne sais pas) --- */
.score-scale__dot--nsp {
    font-size: 0.65rem;
    font-weight: 700;
}

.score-scale__dot--nsp.active {
    background: var(--text-muted);
    border-color: var(--text-muted);
    color: var(--bg-card);
}

.nsp-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-medium);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.nsp-toggle:hover {
    border-color: var(--text-secondary);
}

.nsp-toggle.active {
    background: var(--text-muted);
    border-color: var(--text-muted);
    color: var(--bg-card);
}

.nsp-disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* --- Validation Status --- */
.validation-status__row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.85rem;
}

.validation-status__row + .validation-status__row {
    border-top: 1px solid var(--border-subtle);
}

.validation-status__row.done .validation-status__icon {
    color: var(--green);
    font-weight: 700;
}

.validation-status__row.missing .validation-status__icon {
    color: var(--red);
}

.validation-status__action {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--red);
    font-weight: 600;
    cursor: pointer;
}

.validation-status__skip {
    margin-left: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
}

.validation-status__skip:hover {
    color: var(--text-secondary);
}

/* --- Day Pills --- */
.day-pills {
    display: flex;
    gap: var(--space-xs);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.day-pills::-webkit-scrollbar { display: none; }

.day-pill {
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    min-width: 52px;
    transition: all 0.2s var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}

.day-pill__day {
    font-weight: 700;
    display: block;
}

.day-pill__type {
    font-size: 0.6rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.day-pill.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.day-pill.active .day-pill__type {
    color: rgba(255, 255, 255, 0.7);
}

.day-pill.rest {
    opacity: 0.5;
}

/* --- Metric Card --- */
.metric-card {
    text-align: center;
    padding: var(--space-md);
}

.metric-card__value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
}

.metric-card__label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: var(--space-xs);
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

/* --- Section Title --- */
.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    margin-top: var(--space-xl);
}

.section-title:first-child {
    margin-top: 0;
}

/* --- Exercise Card --- */
.exercise-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: background var(--theme-transition);
}

.exercise-card + .exercise-card {
    margin-top: var(--space-sm);
}

.exercise-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.exercise-card__number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--red-subtle);
    color: var(--red);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.exercise-card__info {
    flex: 1;
    min-width: 0;
}

.exercise-card__name {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Un nom d'exercice ne doit jamais etre tronque : il passe a la ligne.
   `break-word` et non `anywhere` — on ne coupe un mot que s'il deborde a lui
   seul, au lieu de casser au milieu des que la place manque un peu
   (« Developpe couche » -> « Develop-pe cou-che »).
   `text-overflow: clip` + `white-space: normal` neutralisent toute troncature
   qui serait heritee d'un conteneur. */
.exercise-card__name,
.fiche-exercise__name,
.set-row__label,
.today-card__workout {
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: break-word;
    hyphens: auto;
}

.exercise-card__target {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.exercise-card__status {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-medium);
    flex-shrink: 0;
    transition: all 0.2s;
}

.exercise-card.completed .exercise-card__status {
    background: var(--green);
    border-color: var(--green);
}

.exercise-card__chevron {
    color: var(--text-muted);
    transition: transform 0.2s var(--ease-out);
    flex-shrink: 0;
}

.exercise-card.expanded .exercise-card__chevron {
    transform: rotate(180deg);
}

.exercise-card__body {
    max-height: 0;
    overflow: hidden;
    padding: 0 var(--space-lg);
    border-top: 1px solid transparent;
    transition: max-height 0.35s var(--ease-out), padding 0.35s var(--ease-out), border-color 0.2s;
}

.exercise-card.expanded .exercise-card__body {
    max-height: 800px;
    padding: 0 var(--space-lg) var(--space-lg);
    border-top-color: var(--border-subtle);
}

/* --- Set Row --- */
.set-row {
    display: grid;
    grid-template-columns: 36px 1fr 1fr 40px;
    gap: var(--space-sm);
    align-items: center;
    padding: var(--space-sm) 0;
}

.set-row__label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.set-row input {
    width: 100%;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-align: center;
    -webkit-appearance: none;
}

.set-row input:focus {
    outline: none;
    border-color: var(--red);
}

.set-row input::placeholder {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.set-row__check {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-medium);
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-spring);
    -webkit-tap-highlight-color: transparent;
}

.set-row__check.checked {
    background: var(--green);
    border-color: var(--green);
    animation: checkPop 0.3s var(--ease-spring);
}

.set-row__check.checked::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.set-row__prev {
    grid-column: 2 / -1;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
}

.set-header {
    display: grid;
    grid-template-columns: 36px 1fr 1fr 40px;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: var(--space-xs);
}

.set-header span {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-align: center;
}

/* --- Bottom Navigation --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    transition: background var(--theme-transition);
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 12px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s;
    position: relative;
    text-transform: uppercase;
}

.nav-tab svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.5;
}

.nav-tab.active {
    color: var(--red);
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--red);
    border-radius: 2px;
}

/* --- More Menu Overlay --- */
.more-menu {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--safe-bottom));
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-lg);
    transform: translateY(100%);
    transition: transform 0.3s var(--ease-out);
    z-index: 999;
}

.more-menu.open {
    transform: translateY(0);
}

.more-menu__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.more-menu__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s;
}

.more-menu__item:hover {
    border-color: var(--red);
}

.more-menu__item svg {
    width: 24px;
    height: 24px;
    color: var(--red);
}

/* --- Backdrop --- */
.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* --- Info Box --- */
.info-box {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--red);
    background: var(--red-subtle);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.info-box--warning {
    border-left-color: var(--yellow);
    background: rgba(245, 158, 11, 0.08);
}

.info-box--success {
    border-left-color: var(--green);
    background: rgba(16, 185, 129, 0.08);
}

/* --- Meal Card --- */
.meal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.meal-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.meal-card__title {
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meal-card__kcal {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.food-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    gap: var(--space-sm);
}

.food-item > *:first-child {
    min-width: 0;
    flex: 1;
}

.food-item:last-child {
    border-bottom: none;
}

.food-item__macros {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.food-item__delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.2rem;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.food-item__delete:hover {
    color: var(--red);
    background: var(--red-subtle);
}

/* --- Preset Pills --- */
.preset-pills {
    display: flex;
    gap: var(--space-xs);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.preset-pills::-webkit-scrollbar { display: none; }

.preset-pill {
    flex-shrink: 0;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.preset-pill:hover {
    border-color: var(--red);
    color: var(--red);
}

/* --- Rest Timer Overlay --- */
.rest-timer {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.92);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.rest-timer.active {
    opacity: 1;
    pointer-events: auto;
}

.rest-timer__time {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
}

.rest-timer__label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.rest-timer__presets {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.rest-timer__preset {
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-medium);
    background: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.rest-timer__preset.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

/* --- Nutrition Progress Sticky --- */
.nutrition-sticky {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-primary);
    padding: var(--space-md) 0;
    margin-bottom: var(--space-md);
}

.macro-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
}

.macro-bar {
    text-align: center;
}

.macro-bar__value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
}

.macro-bar__target {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.macro-bar__bar {
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.macro-bar__fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s var(--ease-out);
}

/* --- Theme Toggle --- */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.theme-toggle:hover {
    border-color: var(--red);
    color: var(--red);
}

/* --- Chart Container --- */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.chart-container canvas {
    width: 100% !important;
    height: 200px !important;
}

.chart-container h3 {
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-md);
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.9rem;
}

/* --- Toast --- */
.toast {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s var(--ease-out);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    max-width: 90vw;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast--success {
    border-color: var(--green);
    color: var(--green);
}

.toast--error {
    border-color: var(--red);
    color: var(--red);
}

.toast__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.toast__msg {
    flex: 1;
}

.toast__close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0 0 var(--space-sm);
    opacity: 0.5;
    transition: opacity 0.2s;
    line-height: 1;
}

.toast__close:hover {
    opacity: 1;
}

/* --- Confirm Dialog --- */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    transition: opacity 0.25s var(--ease-out);
}

.confirm-overlay.show {
    opacity: 1;
}

.confirm-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 340px;
    width: 100%;
    transform: scale(0.95);
    transition: transform 0.25s var(--ease-spring);
}

.confirm-overlay.show .confirm-dialog {
    transform: scale(1);
}

.confirm-dialog h3 {
    margin-bottom: var(--space-sm);
}

.confirm-dialog p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}

.confirm-dialog__actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
}

/* --- Calendar Picker --- */
.calendar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    opacity: 0;
    transition: opacity 0.25s var(--ease-out);
}

.calendar-overlay.show {
    opacity: 1;
}

.calendar {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    width: 100%;
    max-width: 340px;
    transform: scale(0.95);
    transition: transform 0.25s var(--ease-spring);
}

.calendar-overlay.show .calendar {
    transform: scale(1);
}

.calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.calendar__title {
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: capitalize;
}

.calendar__nav {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: color 0.2s;
}

.calendar__nav:hover:not(:disabled) {
    color: var(--red);
}

.calendar__nav:disabled {
    opacity: 0.2;
    cursor: default;
}

.calendar__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar__day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-primary);
    position: relative;
    transition: background 0.15s;
    font-family: var(--font-body);
}

.calendar__day:hover:not(:disabled):not(.calendar__day--outside) {
    background: var(--border-subtle);
}

.calendar__day--today {
    font-weight: 700;
}

.calendar__day--today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--red);
}

.calendar__day--selected {
    background: var(--red);
    color: #fff;
}

.calendar__day--selected::after {
    background: #fff;
}

.calendar__day--selected:hover {
    background: var(--red-dim);
}

.calendar__day:disabled {
    color: var(--text-muted);
    opacity: 0.25;
    cursor: default;
}

.calendar__day--outside {
    visibility: hidden;
}

/* Calendar pill variant for period-pills */
.period-pill--calendar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 0.75rem;
}

.period-pill--calendar svg {
    flex-shrink: 0;
}

/* Calendar pill variant for day-pills */
.day-pill--calendar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.day-pill--calendar svg {
    width: 18px;
    height: 18px;
}

/* --- Offline Banner --- */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--yellow);
    color: #1a1a2e;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    padding: 6px var(--space-md);
    z-index: 5000;
    transform: translateY(-100%);
    transition: transform 0.3s var(--ease-out);
}

.offline-banner.show {
    transform: translateY(0);
}

/* --- Timer Ring --- */
.rest-timer__ring {
    position: relative;
    width: 200px;
    height: 200px;
}

.rest-timer__ring svg {
    transform: rotate(-90deg);
}

.rest-timer__ring-track {
    fill: none;
    stroke: var(--bg-elevated);
}

.rest-timer__ring-fill {
    fill: none;
    stroke: var(--red);
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke 0.5s;
}

.rest-timer__ring .rest-timer__time {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Empty State Enhanced --- */
.empty-state__hint {
    font-size: 0.75rem;
    margin-top: var(--space-sm);
    opacity: 0.5;
}

/* ============================================================
   Onboarding Overlay
   ============================================================ */

.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.85);
    z-index: 6000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 calc(var(--bottom-nav-height) + var(--safe-bottom) + var(--space-md));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.onboarding-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.onboarding-card {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl) var(--radius-xl) var(--radius-lg) var(--radius-lg);
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
    width: 100%;
    max-width: 480px;
    transform: translateY(40px);
    transition: transform 0.4s var(--ease-spring);
    position: relative;
    max-height: 80dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.onboarding-overlay.show .onboarding-card {
    transform: translateY(0);
}

.onboarding-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: var(--space-lg);
}

.onboarding-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-medium);
    transition: all 0.3s var(--ease-spring);
}

.onboarding-dot.active {
    width: 20px;
    border-radius: 3px;
    background: var(--red);
}

.onboarding-step {
    display: none;
    animation: onboardingStepIn 0.3s var(--ease-out) both;
}

.onboarding-step.active {
    display: block;
}

@keyframes onboardingStepIn {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.onboarding-step__icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: var(--space-md);
    display: block;
}

.onboarding-step__title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.onboarding-step__body {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: var(--space-md);
}

.onboarding-step__list {
    list-style: none;
    margin: var(--space-sm) 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.onboarding-step__list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.onboarding-step__list li::before {
    content: '\2192';
    color: var(--red);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.onboarding-nav {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.onboarding-nav .btn {
    flex: 1;
}

.onboarding-nav .btn-secondary {
    flex: 0 0 auto;
    min-width: 90px;
}

.onboarding-skip-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.onboarding-skip-row__box {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s var(--ease-spring);
}

.onboarding-skip-row__box.checked {
    background: var(--green);
    border-color: var(--green);
}

.onboarding-skip-row__box.checked::after {
    content: '';
    width: 5px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.onboarding-skip-row__label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Onboarding Questionnaire Page --- */
.ob-progress {
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
}

.ob-progress-bar {
    height: 100%;
    background: var(--red);
    border-radius: 2px;
    transition: width 0.3s var(--ease-out);
}

.ob-progress-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0 20px;
}

.ob-label {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    white-space: nowrap;
}

.ob-label.active {
    background: var(--red-subtle, rgba(239,68,68,0.1));
    color: var(--red);
}

.ob-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.ob-field { display: flex; flex-direction: column; gap: 6px; }
.ob-field-full { width: 100%; }
.ob-field-half { width: calc(50% - 8px); }
.ob-field-third { width: calc(33.33% - 11px); }

@media (max-width: 600px) {
    .ob-field-half, .ob-field-third { width: 100%; }
}

.ob-field label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.ob-field input,
.ob-field select,
.ob-field textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.ob-field input:focus,
.ob-field select:focus,
.ob-field textarea:focus {
    outline: none;
    border-color: var(--red);
}

.ob-field textarea {
    resize: vertical;
    min-height: 70px;
}

.scale-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.scale-opt {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--border-medium);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-secondary);
}

.scale-opt input { display: none; }

.scale-opt:hover {
    border-color: var(--red);
    color: var(--red);
}

.scale-opt.selected {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.cb-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cb-opt {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: border-color 0.15s;
}

.cb-opt:has(input:checked) {
    border-color: var(--red);
    background: var(--red-subtle, rgba(239,68,68,0.08));
}

.ob-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    background: var(--red);
    color: #fff;
    transition: all 0.2s var(--ease-out);
}

.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--red-glow);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    background: transparent;
    color: var(--text-primary);
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--red);
    color: var(--red);
}

.msg { font-size: 0.85rem; padding: 8px 0; }
.msg.ok { color: var(--green); }
.msg.err { color: var(--red); }

/* ===== Heatmap d'assiduité (Progression) ===== */
.pghm-h { display:flex; align-items:baseline; gap:.6rem; flex-wrap:wrap; margin-bottom:.6rem; }
.pghm-h h3 { margin:0; font-size:1rem; }
.pghm-sub { font-size:.72rem; color:var(--text-muted); }
.pghm-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:4px; }
.pghm { display:inline-block; min-width:100%; }
.pghm-months { display:flex; gap:3px; margin-left:0; margin-bottom:3px; }
.pghm-mlabel { width:13px; font-size:.6rem; color:var(--text-muted); white-space:nowrap; }
.pghm-grid { display:flex; gap:3px; }
.pghm-col { display:flex; flex-direction:column; gap:3px; }
.pghm-cell { width:13px; height:13px; border-radius:3px; background:var(--bg-elevated); }
.pghm-future { visibility:hidden; }
.pghm-l0 { background:rgba(240,237,230,0.06); }
.pghm-l1 { background:rgba(95,224,132,0.28); }
.pghm-l2 { background:rgba(95,224,132,0.50); }
.pghm-l3 { background:rgba(95,224,132,0.74); }
.pghm-l4 { background:var(--green); }
.pghm-today { box-shadow:0 0 0 1.5px var(--text-primary); }
.pghm-legend { display:flex; align-items:center; gap:4px; justify-content:flex-end; margin-top:.5rem; font-size:.65rem; color:var(--text-muted); }
.pghm-legend .pghm-cell { width:11px; height:11px; }

/* ===== Carte assiduité (dashboard) ===== */
.adherence-card { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.adherence-card__streak { display:flex; align-items:center; gap:.7rem; }
.adherence-card__flame { font-size:1.8rem; line-height:1; }
.adherence-card__streak-n { font-size:1.7rem; font-weight:700; line-height:1; font-variant-numeric:tabular-nums; }
.adherence-card__streak-n span { font-size:.9rem; font-weight:500; color:var(--text-muted); }
.adherence-card__streak-l { font-size:.72rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.08em; margin-top:2px; }
.adherence-card__pcts { display:flex; gap:1.1rem; }
.adherence-card__pcts > div { text-align:center; }
.adherence-card__pct { font-size:1.15rem; font-weight:700; color:var(--green); font-variant-numeric:tabular-nums; }
.adherence-card__pct-l { font-size:.65rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.08em; }

/* ===== Log de séance (module Elite — prototype) ===== */
.wl-day { font-size:1.3rem; font-weight:700; margin:0 0 14px; letter-spacing:-.02em; }
.wl-ex { background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:14px; padding:12px 14px; margin-bottom:12px; }
.wl-ex-h { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.wl-ex-n { font-weight:600; font-size:.95rem; }
.wl-1rm { margin-left:auto; font-size:.78rem; color:var(--text-muted); }
.wl-1rm b { color:var(--green); }
.wl-pr { font-size:.72rem; font-weight:700; color:var(--text-dark); background:var(--green); border-radius:100px; padding:2px 9px; }
.wl-table { width:100%; border-collapse:collapse; font-size:.85rem; }
.wl-table th { color:var(--text-muted); font-size:.62rem; text-transform:uppercase; letter-spacing:.06em; font-weight:500; text-align:center; padding:2px; }
.wl-table td { text-align:center; padding:3px 2px; }
.wl-in { width:56px; background:var(--bg-elevated); border:1px solid var(--border-subtle); border-radius:8px; color:var(--text-primary); font:inherit; font-size:.85rem; text-align:center; padding:5px 4px; }
.wl-warmup { width:26px; height:26px; border-radius:7px; background:var(--bg-elevated); border:1px solid var(--border-subtle); color:var(--text-muted); font:inherit; font-size:.75rem; cursor:pointer; }
tr.wl-warm .wl-warmup { color:#f0b95f; border-color:rgba(240,185,95,.5); }
.wl-check { width:28px; height:28px; border-radius:8px; background:transparent; border:1px solid var(--border-subtle); color:var(--green); font-weight:700; cursor:pointer; }
tr.wl-done .wl-check { background:var(--green); color:var(--text-dark); border-color:var(--green); }
tr.wl-done .wl-in { border-color:rgba(95,224,132,.4); }
.wl-add { margin-top:8px; background:transparent; border:1px dashed var(--border-subtle); color:var(--text-muted); border-radius:100px; font:inherit; font-size:.78rem; padding:6px 12px; cursor:pointer; }

/* ===== Muscles travaillés (vue balance — prototype Elite) ===== */
.mm-h { font-size:.66rem; letter-spacing:.12em; text-transform:uppercase; color:var(--green); font-weight:700; margin:0 0 .7rem; }
.mm { display:grid; gap:.4rem; }
.mm-row { display:grid; grid-template-columns:98px 1fr 34px; align-items:center; gap:.6rem; }
.mm-name { font-size:.8rem; color:var(--text-primary); }
.mm-bar { height:9px; background:var(--bg-elevated); border-radius:100px; overflow:hidden; }
.mm-fill { display:block; height:100%; background:linear-gradient(90deg,rgba(95,224,132,.5),var(--green)); border-radius:100px; }
.mm-val { font-size:.75rem; color:var(--text-muted); text-align:right; font-variant-numeric:tabular-nums; }
.mm-note { font-size:.72rem; color:var(--text-muted); margin-top:.8rem; line-height:1.5; }
.mm-empty { font-size:.82rem; color:var(--text-muted); }

/* ── Calculateur de disques (PGPlates) ───────────────────────────── */
.pl{ display:flex; flex-direction:column; gap:12px; }
.pl-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.pl-lab{ font-size:.82rem; color:var(--text-muted); display:flex; flex-direction:column; gap:6px; }
.pl-inwrap{ color:var(--text-primary); font-weight:600; }
.pl-in{ width:88px; font:inherit; font-weight:700; font-size:1.05rem; color:var(--text-primary);
  background:var(--bg-elevated); border:1px solid var(--border-subtle); border-radius:10px; padding:8px 10px; }
.pl-in:focus{ outline:none; border-color:var(--green); }
.pl-bar{ font-size:.74rem; color:var(--text-muted); background:var(--bg-elevated);
  border:1px solid var(--border-subtle); border-radius:100px; padding:5px 12px; white-space:nowrap; }
.pl-vis{ display:flex; align-items:center; gap:4px; min-height:66px; padding:8px 0;
  overflow-x:auto; -webkit-overflow-scrolling:touch; }
.pl-collar{ flex:0 0 10px; height:22px; border-radius:3px; background:var(--text-muted); opacity:.5; }
.pl-sleeve{ flex:1 0 40px; height:8px; border-radius:4px; align-self:center;
  background:linear-gradient(90deg,var(--text-muted),transparent); opacity:.35; }
.pl-disc{ flex:0 0 auto; display:flex; flex-direction:column; align-items:center; justify-content:center;
  min-width:40px; height:58px; padding:0 8px; border-radius:8px; font-weight:700; font-size:.9rem;
  color:var(--text-dark); background:var(--green); box-shadow:inset 0 0 0 1px rgba(0,0,0,.12); }
.pl-disc em{ font-style:normal; font-size:.64rem; font-weight:600; opacity:.75; margin-top:1px; }
.pl-empty{ font-size:.8rem; color:var(--text-muted); padding-left:8px; }
.pl-foot{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  font-size:.85rem; color:var(--text-primary); }
.pl-foot b{ color:var(--green); }
.pl-ok{ font-size:.78rem; font-weight:600; color:var(--green); }
.pl-warn{ font-size:.78rem; font-weight:600; color:var(--amber,#f0b95f); }

/* ── Progression du 1RM (PG1RMProgress) ──────────────────────────── */
.p1{ display:flex; flex-direction:column; gap:12px; }
.p1-chips{ display:flex; gap:6px; flex-wrap:wrap; }
.p1-chip{ font:inherit; font-size:.76rem; font-weight:600; border-radius:100px; padding:5px 12px; cursor:pointer;
  background:var(--bg-elevated); border:1px solid var(--border-subtle); color:var(--text-muted); }
.p1-chip.on{ background:var(--green); color:var(--text-dark); border-color:var(--green); }
.p1-stat{ display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; }
.p1-now{ font-size:1.5rem; font-weight:700; color:var(--text-primary); letter-spacing:-.02em; }
.p1-delta{ font-size:.85rem; font-weight:700; }
.p1-delta.up{ color:var(--green); }
.p1-delta.down{ color:var(--amber,#f0b95f); }
.p1-delta em{ font-style:normal; font-weight:600; opacity:.8; }
.p1-since{ font-size:.74rem; color:var(--text-muted); }
.p1-canvas{ width:100%; }
.p1-canvas canvas{ display:block; }
.p1-empty{ font-size:.82rem; color:var(--text-muted); padding:8px 0; }

/* ── Mensurations (PGMeasurements) ───────────────────────────────── */
.ms{ display:flex; flex-direction:column; gap:14px; }
.ms-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.ms-cell{ display:flex; flex-direction:column; gap:5px; }
.ms-lab{ font-size:.76rem; color:var(--text-muted); display:flex; justify-content:space-between; align-items:baseline; gap:6px; }
.ms-ref{ font-size:.68rem; color:var(--text-muted); opacity:.7; white-space:nowrap; }
.ms-inwrap{ display:flex; align-items:center; gap:6px; background:var(--bg-elevated);
  border:1px solid var(--border-subtle); border-radius:10px; padding:0 10px; }
.ms-inwrap:focus-within{ border-color:var(--green); }
.ms-in{ flex:1; min-width:0; font:inherit; font-weight:700; font-size:1rem; color:var(--text-primary);
  background:transparent; border:0; padding:9px 0; }
.ms-in:focus{ outline:none; }
.ms-inwrap em{ font-style:normal; font-size:.72rem; color:var(--text-muted); }
.ms-chips{ display:flex; gap:6px; flex-wrap:wrap; }
.ms-chip{ font:inherit; font-size:.74rem; font-weight:600; border-radius:100px; padding:5px 11px; cursor:pointer;
  background:var(--bg-elevated); border:1px solid var(--border-subtle); color:var(--text-muted); }
.ms-chip.on{ background:var(--green); color:var(--text-dark); border-color:var(--green); }
.ms-stat{ display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; }
.ms-now{ font-size:1.4rem; font-weight:700; color:var(--text-primary); letter-spacing:-.02em; }
.ms-delta{ font-size:.85rem; font-weight:700; color:var(--green); }
.ms-since{ font-size:.74rem; color:var(--text-muted); }
.ms-canvas{ width:100%; }
.ms-canvas canvas{ display:block; }
.ms-empty{ font-size:.82rem; color:var(--text-muted); }

/* ── Réglage repos dans le log de séance ─────────────────────────── */
.wl-restbar{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin:2px 0 12px; }
.wl-restbar-lab{ font-size:.72rem; color:var(--text-muted); margin-right:2px; }
.wl-restbar-p{ font:inherit; font-size:.72rem; font-weight:600; border-radius:100px; padding:4px 10px; cursor:pointer;
  background:var(--bg-elevated); border:1px solid var(--border-subtle); color:var(--text-muted); }
.wl-restbar-p.on{ background:var(--green); color:var(--text-dark); border-color:var(--green); }
.wl-ex-meta{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.wl-rest-badge{ font:inherit; font-size:.72rem; font-weight:600; border-radius:100px; padding:4px 9px; cursor:pointer;
  background:var(--bg-elevated); border:1px solid var(--border-subtle); color:var(--text-muted); white-space:nowrap; }
.wl-rest-badge.on{ color:var(--text-primary); border-color:var(--green); }
.wl-rest-badge em{ font-style:normal; opacity:.6; font-size:.64rem; }
