/* ============================================
   PROGRAMME CANDITO 6 SEMAINES
   Apple iOS / Minimalisme Premium
   ============================================ */

/* ============================================
   1. CUSTOM PROPERTIES
   ============================================ */
:root {
    /* ── Surfaces (Sand & Cream) ── */
    --bg:          #F4F1EA;
    --card-bg:     #FFFFFF;
    --card-bg-glass: rgba(255, 255, 255, 0.65);
    --surface:     #E8E3DA;

    /* ── Texte (Deep Charcoal & Soft Browns) ── */
    --text:   #231F1C;
    --text-2: #7C7365;
    --text-3: #B0A899;

    /* ── Accents Luxury ── */
    --gold:       #C2A060;
    --gold-light: #DFC287;
    --bronze:     #8A6732;
    --blue:       #3A4E5E;
    --red:        #BA453D;
    
    /* ── Ombres (Soft Warm Shadows) ── */
    --shadow-s: 0 4px 16px rgba(35, 31, 28, 0.05);
    --shadow-m: 0 8px 24px rgba(35, 31, 28, 0.06);
    --shadow-l: 0 16px 48px rgba(35, 31, 28, 0.08);
    --shadow-glow: 0 0 24px rgba(194, 160, 96, 0.35);

    /* ── Motion ── */
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --spring-fast: cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* ── Géométrie ── */
    --r-card: 20px;
    --r-btn: 14px;
    --r-pill: 100px;
    --r-input: 12px;
    --nav-h: 52px;

    /* ── Typographie additionnelle ── */
    --mono: 'SF Mono', 'Menlo', 'Courier New', monospace;
}

/* ============================================
   2. RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', system-ui, sans-serif;
    background: var(--bg);
    background-image: radial-gradient(circle at 50% 0%, rgba(248, 245, 238, 0.85) 0%, transparent 80%),
                      url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img, svg { display: block; max-width: 100% }
button, input, select { font-family: inherit; font-size: inherit }
button { cursor: pointer; border: none; background: none; color: var(--text) }

/* ============================================
   SPLASH SCREEN (App Intro)
   ============================================ */
#splash-screen {
    position: fixed; inset: 0;
    z-index: 10000;
    background: var(--bg);
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.6s var(--ease), visibility 0.6s;
    /* Optional paper noise to hide app loading cleanly */
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0%, transparent 80%),
                      url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
}

.splash-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}

.splash-logo {
    animation: splashZoom 2s var(--spring) forwards;
    transform-origin: center;
}

@keyframes splashZoom {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(12); opacity: 0; }
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', 'Merriweather', 'Georgia', serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}
h2 { font-size: 1.6rem; margin-bottom: 8px; font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 600; font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;}
.card h3 { margin-bottom: 16px; font-weight: 700; letter-spacing: -0.01em; }

.label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Tabular nums for data alignment */
.value, .tracker-load, .pr-weight,
.stat-card .value, .stat-total .value,
td input[type="number"] {
    font-variant-numeric: tabular-nums;
}

/* ============================================
   4. LAYOUT
   ============================================ */
.container { max-width: 840px; margin: 0 auto; padding: 0 20px }
.app-section { padding: 28px 20px; max-width: 840px; margin: 0 auto }

/* ============================================
   5. NAVIGATION (SMART BOTTOM BAR)
   ============================================ */
#smart-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid rgba(0, 0, 0, 0.05); /* Subtile séparation */
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom) !important;
    padding-top: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-3);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s var(--spring);
    flex: 1;
    padding: 4px 0;
}

.nav-item svg {
    color: currentColor;
    opacity: 0.6;
    transition: transform 0.3s var(--spring), opacity 0.3s ease;
}

/* État Actif */
.nav-item.active {
    color: var(--text); /* Charcoal Luxury */
}
.nav-item.active svg {
    opacity: 1;
    color: var(--gold); /* Highlight Gold ! */
    transform: scale(1.15);
}

.nav-item:active {
    transform: scale(0.92);
}

/* Espace bas pour que le contenu ne soit pas caché par la tab-bar */
#main {
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* ============================================
   6. SECTION HEADERS
   ============================================ */
.section-header {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border-radius: var(--r-card);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: box-shadow 0.3s ease;
}
.section-header h2 {
    color: var(--text);
    margin: 0;
    letter-spacing: -0.01em;
}
.section-header .subtitle {
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 6px;
}

/* ============================================
   7. CARDS (iOS Elevated Surface)
   ============================================ */
.card {
    background: var(--card-bg-glass);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--r-card);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-s), inset 0 0 0 1px rgba(194, 160, 96, 0.15); /* Subtile outline or */
    transition: transform 0.35s var(--spring), box-shadow 0.35s ease;
    will-change: transform;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-m), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.card:active {
    transform: scale(0.98);
}

/* ============================================
   8. BUTTONS
   ============================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--text);
    color: #fff;
    border-radius: var(--r-btn);
    padding: 13px 24px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: transform 0.3s var(--spring), box-shadow 0.3s ease, background 0.2s ease;
    min-height: 48px;
    cursor: pointer;
    letter-spacing: -0.01em;
}
.btn:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: var(--shadow-m);
}
.btn:active { transform: scale(0.96) }
.btn-outline {
    background: transparent;
    color: var(--text-2);
    border: 1.5px solid rgba(0, 0, 0, 0.1);
}
.btn-outline:hover {
    color: var(--text);
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.02);
    transform: none;
    box-shadow: none;
}
.btn-block { width: 100% }
.btn-sm { padding: 9px 18px; font-size: 0.8125rem; min-height: 38px }

/* ============================================
   9. FORM INPUTS
   ============================================ */
.input {
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--r-input);
    padding: 10px 14px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    background: var(--card-bg);
    color: var(--text);
    transition: all 0.2s var(--ease);
    width: 100%;
    min-height: 44px;
    font-variant-numeric: tabular-nums;
}
.input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}
.input-sm {
    padding: 7px 10px;
    font-size: 0.8125rem;
    width: 76px;
    min-height: 36px;
}

/* ============================================
   10. BADGES
   ============================================ */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.badge-red {
    background: rgba(255, 59, 48, 0.1);
    color: var(--red);
}
.badge-green {
    background: rgba(52, 199, 89, 0.1);
    color: var(--green);
}
.badge-orange {
    background: rgba(255, 159, 10, 0.1);
    color: var(--orange);
}

/* ============================================
   11. ALERTS / NOTES
   ============================================ */
.note {
    border-left: 4px solid var(--orange);
    background: rgba(255, 159, 10, 0.05);
    border-radius: 0 var(--r-input) var(--r-input) 0;
    padding: 14px 18px;
    margin-bottom: 14px;
    font-size: 0.8125rem;
    color: var(--text);
}
.note strong { color: var(--orange) }
.note-red {
    border-left: 4px solid var(--red);
    background: rgba(255, 59, 48, 0.04);
    border-radius: 0 var(--r-input) var(--r-input) 0;
    padding: 14px 18px;
    margin-bottom: 14px;
    font-size: 0.8125rem;
    color: var(--text);
}
.note-red strong { color: var(--red) }

/* ============================================
   12. TABLES
   ============================================ */
.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-s), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0; 
    font-size: 0.875rem; 
    text-align: left;
}
thead th {
    background: rgba(255, 255, 255, 0.4);
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    backdrop-filter: blur(8px);
}
td {
    padding: 14px 16px;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.04);
    color: var(--text);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(0, 122, 255, 0.02); }
tbody tr { transition: background 0.2s var(--ease); }

/* ============================================
   13. ONBOARDING (Apple Style — Frosted Glass)
   ============================================ */
#onboarding {
    position: fixed; inset: 0; z-index: 1000;
    background: linear-gradient(145deg, #F5F5F7 0%, #E8E8ED 50%, #F5F5F7 100%);
    color: var(--text);
    display: flex; justify-content: center; align-items: center;
    padding: 24px;
    transition: opacity 0.6s var(--ease);
}
.onb-card {
    background: var(--card-bg);
    border: 0.5px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 380px; width: 100%;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    opacity: 0; transform: translateY(16px) scale(0.98);
    animation: onbIn 0.7s var(--ease) 0.2s forwards;
}
.onb-card h1 {
    color: var(--text);
    font-size: 1.5rem;
    letter-spacing: -0.025em;
    margin-bottom: 6px;
}
.onb-card p {
    color: var(--text-2);
    font-size: 0.875rem;
    margin-bottom: 28px;
    line-height: 1.5;
}
.onb-fields { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px }
.onb-field { display: flex; align-items: center; justify-content: space-between; gap: 14px }
.onb-field label {
    font-weight: 600;
    font-size: 0.875rem;
    text-align: left;
    flex: 1;
    color: var(--text);
    letter-spacing: -0.01em;
}
.onb-field .unit {
    font-size: 0.75rem;
    color: var(--text-3);
    margin-left: 6px;
}
.onb-field input {
    background: var(--surface);
    color: var(--text);
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--r-input);
    padding: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    width: 96px;
    text-align: center;
    transition: all 0.2s var(--ease);
}
.onb-field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
    outline: none;
    background: #fff;
}
.onb-btn {
    background: var(--text);
    color: #fff;
    border: none;
    border-radius: var(--r-btn);
    padding: 15px;
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: all 0.25s var(--ease);
    min-height: 50px;
    cursor: pointer;
}
.onb-btn:hover {
    background: #000;
    transform: scale(1.02);
    box-shadow: var(--shadow-l);
}
.onb-btn:active { transform: scale(0.97) }

/* Cascade overlay */
#calc-overlay {
    position: fixed; inset: 0; z-index: 1001;
    background: var(--bg);
    display: flex; flex-wrap: wrap; align-content: center; justify-content: center;
    font-variant-numeric: tabular-nums;
    font-size: 0.75rem;
    overflow: hidden; opacity: 0; pointer-events: none;
    transition: opacity 0.4s var(--ease);
}

/* ============================================
   14. TAB TRANSITIONS (SPA)
   ============================================ */
.tab-enter { animation: tabFadeIn 0.35s var(--ease) both }
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(10px) }
    to   { opacity: 1; transform: translateY(0) }
}
.reveal { opacity: 1; transform: none }

/* ============================================
   15. ACCUEIL COMPONENTS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card--total { grid-column: 1 / -1; }
.stat-card--squat { grid-column: span 1; }
.stat-card--bench { grid-column: span 1; }
.stat-card--deadlift { grid-column: span 1; }

@media (max-width: 500px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-card--deadlift { grid-column: 1 / -1; }
}

.stat-card {
    text-align: center;
    padding: 24px 12px;
}
.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
}
.stat-card .label { 
    margin-top: 8px; 
    font-size: 0.8125rem; 
    font-weight: 700; 
    color: var(--text-2); 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
}
.stat-total {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border-radius: var(--r-card);
    padding: 32px 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s var(--spring), box-shadow 0.35s ease;
    will-change: transform;
}
.stat-total:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.stat-total:active {
    transform: scale(0.98);
}
.stat-total .value {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.04em;
    text-shadow: 0 4px 16px rgba(255, 255, 255, 0.6);
}
.stat-total .label { 
    color: var(--text-2); 
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 4px;
}

.next-session {
    border-left: 4px solid var(--blue);
    position: relative;
}
.next-session.rest {
    border-left-color: var(--green);
    background: rgba(52, 199, 89, 0.03);
}
.next-session .session-day {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.next-session .session-focus {
    color: var(--text-2);
    font-size: 0.8125rem;
    margin-bottom: 14px;
}
.next-session .exercise-preview {
    display: flex; flex-direction: column; gap: 6px;
    margin-bottom: 14px;
}
.exercise-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 12px;
    background: var(--surface);
    border-radius: 10px;
    font-size: 0.75rem;
}
.exercise-mini .ex-name { font-weight: 600; flex: 1 }
.exercise-mini .ex-detail {
    color: var(--text-2);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.progress-bar-wrap { margin-bottom: 14px }
.progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--green));
    border-radius: 3px;
    transition: width 0.5s var(--ease);
}
.progress-label {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.6875rem;
    color: var(--text-3);
    font-weight: 600;
}

/* ============================================
   16. TRACKER TABLE
   ============================================ */
.tracker-row-done { opacity: 0.35 }
.tracker-row-done td { text-decoration: line-through; text-decoration-color: var(--text-3) }
.tracker-row-done td:first-child,
.tracker-row-done td:nth-child(2),
.tracker-row-done td:nth-child(3) { text-decoration: none; opacity: 1 }

/* ============================================
   17. RPE SLIDER (iOS Brightness Style)
   ============================================ */
.rpe-slider {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px; border-radius: 3px;
    outline: none;
    background: linear-gradient(90deg, var(--green), var(--orange), var(--red));
    transition: background 0.2s var(--ease);
    cursor: pointer;
}
.rpe-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 0.5px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s var(--ease);
}
.rpe-slider::-moz-range-thumb {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 0.5px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.rpe-slider::-webkit-slider-thumb:active { transform: scale(1.12) }

/* Grind zone (RPE ≥ 9.5) */
.rpe-slider.grind::-webkit-slider-thumb {
    animation: grindShake 0.08s infinite alternate;
    box-shadow: 0 2px 12px rgba(255, 59, 48, 0.3), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
}

.rpe-value {
    font-size: 0.6875rem;
    font-weight: 700;
    text-align: center;
    margin-top: 2px;
    min-width: 44px;
    color: var(--text-2);
}
.rpe-value.redline {
    color: var(--red);
    animation: blink 0.5s steps(1) infinite;
}

@keyframes grindShake {
    0%   { transform: translateX(-1.5px) }
    100% { transform: translateX(1.5px) }
}
@keyframes blink {
    0%, 49% { opacity: 1 }
    50%, 100% { opacity: 0.3 }
}

/* ============================================
   18. PR CELEBRATION — Warm Glow
   ============================================ */
.exercise-card.pr-celebration {
    animation: prGlow 1.5s var(--ease) forwards;
}
@keyframes prGlow {
    0%   { transform: scale(1);   box-shadow: var(--shadow-s) }
    30%  { transform: scale(1.01) translateY(-3px); box-shadow: 0 8px 32px rgba(255, 59, 48, 0.18), 0 0 24px rgba(255, 149, 0, 0.12) }
    100% { transform: scale(1);   box-shadow: var(--shadow-glow) }
}

.pr-badge-inline {
    position: absolute; top: -6px; right: -6px;
    background: linear-gradient(135deg, #FF3B30, #FF6B30);
    color: #fff;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
    animation: badgePop 0.4s var(--spring);
}
@keyframes badgePop {
    from { transform: scale(0); opacity: 0 }
    to   { transform: scale(1); opacity: 1 }
}

/* PR Override message */
.pr-override-msg {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--red);
    text-align: center;
    padding: 10px;
    animation: tabFadeIn 0.3s var(--ease);
}

/* ============================================
   19. SESSION FATIGUE GAUGE (SVG Ring)
   ============================================ */
.fatigue-gauge {
    display: flex; align-items: center; gap: 10px;
    margin-top: 12px;
}
.fatigue-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-3);
}
.fatigue-ring { flex-shrink: 0; }
.ring-progress {
    animation: ringFill 0.9s var(--spring) both;
    animation-delay: 0.3s;
}
@keyframes ringFill {
    from { stroke-dashoffset: 100.53px; }
}

/* Surchauffe alert */
.fatigue-alert {
    font-size: 0.75rem;
    color: var(--red);
    padding: 10px 14px;
    margin-top: 8px;
    border-radius: var(--r-input);
    background: rgba(255, 59, 48, 0.04);
    border: 1px solid rgba(255, 59, 48, 0.1);
}

/* ============================================
   20. WALL OF FAME (PR Log)
   ============================================ */
.wall-of-fame {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    color: var(--text);
}
.wall-of-fame h3 {
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}
.pr-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.pr-item:last-child { border: none; padding-bottom: 0 }
.pr-item .pr-lift {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--text);
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--r-pill);
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.pr-item .pr-weight {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    flex: 1;
}
.pr-item .pr-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-3);
    flex-shrink: 0;
}

/* ============================================
   21. EXERCISE CARDS
   ============================================ */
.exercise-card {
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.exercise-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-m);
}

.section-cards-grid > * {
    animation: cardSlideUp 0.4s var(--ease) both;
}
.section-cards-grid > *:nth-child(1) { animation-delay: 0.00s }
.section-cards-grid > *:nth-child(2) { animation-delay: 0.06s }
.section-cards-grid > *:nth-child(3) { animation-delay: 0.08s }
.section-cards-grid > *:nth-child(4) { animation-delay: 0.12s }
.section-cards-grid > *:nth-child(5) { animation-delay: 0.16s }

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

/* ============================================
   22. CHECKBOX TOUCH TARGET (44×44px — UX Pro Max)
   ============================================ */
.set-checkbox {
    min-width: 44px;
    min-height: 44px;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
}
.set-checkbox input[type="checkbox"] {
    width: 20px; height: 20px;
    cursor: pointer;
    accent-color: var(--green);
}

/* ============================================
   23. FOOTER
   ============================================ */
.app-footer {
    text-align: center;
    padding: 32px 20px 48px;
}
.app-footer .btn { max-width: 280px; margin: 0 auto }

/* ============================================
   24. AMBIENT BACKGROUND (Mesh Gradient)
   ============================================ */
.ambient-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.48;
    will-change: transform;
    animation: blobDrift var(--duration, 20s) ease-in-out infinite alternate;
}
.blob-1 {
    width: 520px; height: 520px;
    background: var(--blob-1, #D4B872); /* Soft Gold */
    top: -10%; left: -10%;
    --duration: 22s;
}
.blob-2 {
    width: 420px; height: 420px;
    background: var(--blob-2, #CBA36B); /* Warm Sand / Bronze */
    top: 40%; right: -10%;
    --duration: 18s;
    animation-delay: -6s;
}
.blob-3 {
    width: 360px; height: 360px;
    background: var(--blob-3, #D6AD94); /* Warm Terracotta / Cream */
    bottom: -10%; left: 30%;
    --duration: 25s;
    animation-delay: -12s;
}
.ambient-background {
    transition: opacity 1s ease;
}
@keyframes blobDrift {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(40px, -30px) scale(1.05); }
    66%  { transform: translate(-20px, 40px) scale(0.97); }
    100% { transform: translate(30px, 20px) scale(1.03); }
}

/* ============================================
   25. SHIMMER GLASS
   ============================================ */
.btn:not(.btn-outline):not(.btn-tunnel-vision) {
    position: relative;
    overflow: hidden;
}
.btn:not(.btn-outline):not(.btn-tunnel-vision)::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        rgba(255,255,255,0)    0%,
        rgba(255,255,255,0.22) 50%,
        rgba(255,255,255,0)    100%
    );
    transform: translateX(-150%);
    pointer-events: none;
}
.btn:not(.btn-outline):not(.btn-tunnel-vision):hover::after {
    animation: shimmerSwipe 0.55s ease forwards;
}
@keyframes shimmerSwipe {
    from { transform: translateX(-150%); }
    to   { transform: translateX(150%); }
}

/* ============================================
   26. TUNNEL VISION (Focus Mode)
   ============================================ */
#tunnel-vision-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 20vh;
    gap: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#tunnel-vision-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.tunnel-lift-name {
    font-size: clamp(1.1rem, 4vw, 1.8rem);
    color: rgba(235, 235, 245, 0.65);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
}
.tunnel-load-wrap {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.tunnel-load {
    font-size: clamp(5rem, 18vw, 8rem);
    font-weight: 800;
    color: #FF3B30;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.tunnel-unit {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #FF3B30;
    opacity: 0.7;
    padding-bottom: 0.6rem;
}
.tunnel-btn-validate {
    margin-top: 16px;
    padding: 18px 52px;
    background: #FF3B30;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: transform 0.3s var(--spring), opacity 0.2s;
    min-height: 56px;
}
.tunnel-btn-validate:active { transform: scale(0.96); }
.tunnel-btn-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    width: 44px; height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.tunnel-btn-close:hover { background: rgba(255, 255, 255, 0.2); }
.btn-tunnel-vision {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 4px 10px;
    background: rgba(255, 59, 48, 0.08);
    color: var(--red);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: var(--r-pill);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s var(--spring);
    white-space: nowrap;
}
.btn-tunnel-vision:hover {
    background: rgba(255, 59, 48, 0.15);
    transform: scale(1.04);
}

/* ============================================
   27. RESPONSIVE (DESKTOP)
   ============================================ */
/* Bento Grid — responsive mobile */
@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "total total"
            "squat bench"
            "deadlift deadlift";
    }
}
@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "total"
            "squat"
            "bench"
            "deadlift";
    }
}

@media (min-width: 768px) {
    .app-section { padding: 36px 28px }
    .onb-card { padding: 44px 36px }
    h2 { font-size: 1.625rem }
}
@media (min-width: 1024px) {
    .container { max-width: 960px }
    .card:hover { transform: translateY(-3px) }
}

/* ============================================
   6. LOCKER ROOM (Accueil)
   ============================================ */
.locker-room-header h2 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.05em;
    color: var(--text);
    margin-bottom: 24px;
}

.hero-card-workout {
    background: #2B2622;
    border-radius: 20px;
    padding: 28px 24px;
    color: white;
    box-shadow: 0 16px 40px rgba(35, 31, 28, 0.4), inset 0 0 0 1px rgba(202, 164, 93, 0.15);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
/* Touch or subtile */
.hero-card-workout::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 60px; height: 100%;
    background: linear-gradient(90deg, rgba(202, 164, 93, 0.15) 0%, transparent 100%);
    pointer-events: none;
}

.hero-lift-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.hero-lift-load {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: white;
    letter-spacing: -0.04em;
    text-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
    margin-bottom: 12px;
}

.battle-plan-list {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.battle-plan-item {
    display: flex; justify-content: space-between; align-items: center;
    padding-left: 14px;
    border-left: 3px solid rgba(0,0,0,0.1);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-2);
}

.btn-start-war {
    display: block; width: 100%;
    background: linear-gradient(135deg, var(--gold), var(--bronze));
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 24px 20px;
    border-radius: 100px;
    border: none;
    box-shadow: 0 8px 24px rgba(202, 164, 93, 0.3);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s var(--spring), box-shadow 0.2s;
    animation: gold-pulse 3s infinite alternate;
}
.btn-start-war::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: skewX(-20deg);
    animation: shimmer 4s infinite;
}
.btn-start-war:active {
    transform: scale(0.96);
}

@keyframes gold-pulse {
    0% { box-shadow: 0 8px 24px rgba(202, 164, 93, 0.2); transform: scale(1); }
    100% { box-shadow: 0 12px 32px rgba(202, 164, 93, 0.5); transform: scale(1.01); }
}

@keyframes shimmer {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.stats-title {
    font-size: 0.9rem; font-weight: 700; color: var(--text-3); text-transform: uppercase;
    letter-spacing: 0.05em; margin: 40px 0 16px; text-align: center;
}

/* ============================================
   25. REDUCED MOTION (Accessibility — CRITICAL)
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none }
    .tab-enter { animation: none }
    .rpe-slider.grind::-webkit-slider-thumb { animation: none }
    .rpe-value.redline { animation: none; opacity: 1 }
    .pr-celebration { animation: none }
    .pr-badge-inline { animation: none }
    .exercise-card, .exercise-card:hover,
    .card, .card:hover {
        transform: none !important;
        transition: none !important;
    }
    /* Nouveaux éléments V2 */
    .blob { animation: none !important; }
    .ring-progress { animation: none !important; }
    .btn::after, .onb-btn::after { display: none; }
}

@keyframes onbIn { to { opacity: 1; transform: translateY(0) scale(1) } }

/* Hidden utility */
.hidden { display: none !important }
