/**
 * Programme Intermédiaire — 4 semaines, 4 séances/semaine
 * Source: TabataKine_Guide_Complet.md — Section 3
 * Tier: PREMIUM
 */

import type { TabataProgram, TabataSession, TabataWeek, TabataBlock, TabataExercise } from '../../types/program'

const ex = (
  name: string, nameEn: string,
  conseil: string, conseilEn: string,
  opts?: { modification?: string; modificationEn?: string; progression?: string; progressionEn?: string }
): TabataExercise => ({ name, nameEn, conseil, conseilEn, ...opts })

const block = (
  id: string, odd: TabataExercise, even: TabataExercise,
  rounds = 8, workTime = 20, restTime = 10,
): TabataBlock => ({ id, oddExercise: odd, evenExercise: even, rounds, workTime, restTime })

// ─── Exercises ─────────────────────────────────────────────────

const SQUAT_JUMP = ex(
  'Squat jump', 'Squat Jump',
  'Descente contrôlée, explosion vers le haut, réception silencieuse avant-pied. Si la réception fait du bruit : réduire la hauteur.',
  'Controlled descent, explode upward, silent forefoot landing. If landing makes noise: reduce height.',
)

const PONT_UNILAT = ex(
  'Pont fessier unilatéral', 'Single-leg Glute Bridge',
  'Le bassin ne s\'inclined pas du côté de la jambe levée — signe de faiblesse du moyen fessier.',
  'Pelvis should not tilt toward raised leg — indicates gluteus medius weakness.',
)

const FENTE_SAUTEE = ex(
  'Fente sautée alternée', 'Alternating Jump Lunge',
  'Si douleur antérieure du genou : revenir à la fente marchée. Réception absorbée sur 2–3 secondes.',
  'If anterior knee pain: return to walking lunge. Absorb landing over 2–3 seconds.',
)

const ISO_SQUAT = ex(
  'Isométrie squat (chaise)', 'Wall Sit',
  'L\'isométrie renforce l\'endurance musculaire sans impact. Excellent pour skieurs et cyclistes.',
  'Isometrics build muscular endurance without impact. Great for skiers and cyclists.',
)

const STEP_EXPLOSIF = ex(
  'Step-up explosif', 'Explosive Step-up',
  'La descente est aussi importante que la montée. Ne pas sauter en bas.',
  'The descent is as important as the ascent. Don\'t jump down.',
)

const GLUTE_KICKBACK = ex(
  'Glute kickback à quatre pattes', 'Quadruped Glute Kickback',
  'Ne pas cambrer le bas du dos pour aller plus haut — c\'est la hanche qui travaille, pas les lombaires.',
  'Don\'t arch your lower back to go higher — hip does the work, not the lumbar spine.',
)

const POMPE_CLASSIQUE = ex(
  'Pompes classiques complètes', 'Full Push-ups',
  'Corps aligné, coudes à 45°, descendre jusqu\'au contact de la poitrine.',
  'Body aligned, elbows at 45°, lower until chest contacts floor.',
)

const RENEGADE_ROW = ex(
  'Renegade row sans poids', 'Weightless Renegade Row',
  'Gainage total pendant le mouvement. Le bassin ne se balance pas.',
  'Full core engagement throughout. Pelvis doesn\'t sway.',
)

const POMPE_ROTATION_T = ex(
  'Pompe avec rotation en T', 'T-push-up',
  'Exercice combiné : obliques + dentatés antérieurs + rotateurs d\'épaule. Ouvrir complètement la hanche.',
  'Combined exercise: obliques + serratus anterior + shoulder rotators. Fully open the hip.',
)

const PLANCHE_TAP = ex(
  'Planche tap épaule', 'Plank Shoulder Tap',
  'La résistance à la rotation du bassin est l\'objectif. Pieds plus écartés pour stabiliser.',
  'Resisting pelvic rotation is the goal. Wider feet for stability.',
)

const DIPS_CHAISE = ex(
  'Dips sur chaise', 'Chair Dips',
  'Si inconfort à l\'avant de l\'épaule : réduire l\'amplitude. Contre-indiqué si tendinopathie du biceps.',
  'If anterior shoulder discomfort: reduce range. Contraindicated with biceps tendinopathy.',
)

const SUPERMAN_YWT = ex(
  'Superman en Y·W·T', 'Y-W-T Superman',
  'Travail intense des rhomboïdes et trapèzes inférieurs. Muscles posturaux clés.',
  'Intense work for rhomboids and lower traps. Key postural muscles.',
)

const BURPEE_MODIFIE = ex(
  'Burpee modifié', 'Modified Burpee',
  'Marcher les pieds en arrière jusqu\'à planche, marcher retour, se relever. Pas de saut.',
  'Walk feet back to plank, walk return, stand up. No jump.',
)

const MC_RAPIDE = ex(
  'Mountain climber rapide', 'Fast Mountain Climber',
  'Les hanches ne remontent pas au-dessus des épaules. Regard vers le sol.',
  'Hips don\'t rise above shoulders. Eyes toward the floor.',
)

const SKATERS = ex(
  'Skaters', 'Skaters',
  'Atterrissage sur un pied — demande bonne proprioception de cheville. En cas d\'entorse récente : éviter.',
  'Single-foot landing — requires good ankle proprioception. If recent sprain: avoid.',
)

const PLANCHE_DOWNDOG = ex(
  'Planche to downward dog', 'Plank to Downward Dog',
  'Tirer les talons vers le sol en V inversé pour étirer les mollets.',
  'Pull heels toward floor in inverted V to stretch calves.',
)

const HIGH_KNEES = ex(
  'High knees', 'High Knees',
  'Le but est le rythme, pas la hauteur maximale. Les bras pompeurs contribuent à 15% de la dépense.',
  'Focus on rhythm, not max height. Pumping arms contribute 15% of calorie burn.',
)

const BEAR_CRAWL = ex(
  'Bear crawl sur place', 'Stationary Bear Crawl',
  'Très intense pour le gainage et les épaules. Genoux à 3 cm du sol.',
  'Very intense for core and shoulders. Knees 3cm off the floor.',
)

const BURPEE_COMPLET = ex(
  'Burpee complet', 'Full Burpee',
  'Ne jamais arrondir violemment le dos sous fatigue.',
  'Never violently round your back under fatigue.',
)

const HOLLOW_BODY = ex(
  'Hollow body', 'Hollow Body Hold',
  'Gainage profond issu de la gymnastique artistique — le plus efficace pour les abdominaux profonds.',
  'Deep core hold from artistic gymnastics — most effective for deep abs.',
)

const V_SIT = ex(
  'V-sit hold', 'V-sit Hold',
  'Si douleur lombaire : fléchir légèrement les genoux.',
  'If lower back pain: slightly bend knees.',
)

const THRUSTER = ex(
  'Thruster', 'Thruster (Bodyweight)',
  'La montée en pression intra-abdominale est importante — expirer lors de la poussée vers le haut.',
  'Intra-abdominal pressure buildup matters — exhale on the upward push.',
)

const PISTOL_ASSIST = ex(
  'Pistol squat assisté', 'Assisted Pistol Squat',
  'Révélateur des asymétries de force et de mobilité.',
  'Reveals strength and mobility asymmetries.',
)

const ARCHER_PUSHUP = ex(
  'Archer push-up', 'Archer Push-up',
  'Maintenir l\'alignement corps-bras porteur parfait.',
  'Maintain perfect body-supporting arm alignment.',
)

// ─── Week 1: Transition avec impacts (3 blocs/séance) ─────────

const week1: TabataWeek = {
  weekNumber: 1,
  title: 'Transition avec impacts',
  titleEn: 'Transition to Impact',
  description: '3 blocs tabata + 1 min récupération entre chaque. Durée totale : ~35 minutes.',
  descriptionEn: '3 tabata blocks + 1 min recovery between each. Total: ~35 min.',
  focus: 'Introduction de la plyométrie contrôlée, travail unilatéral',
  focusEn: 'Introduction to controlled plyometrics, unilateral work',
  isDeload: false,
  sessions: [
    {
      id: 'int-w1-s1', week: 1, order: 1,
      title: 'Membres inférieurs plyométriques', titleEn: 'Plyometric Lower Body',
      description: 'Squat jump, fente sautée, step-up explosif.', descriptionEn: 'Squat jump, jump lunge, explosive step-up.',
      focus: ['Quadriceps', 'Fessiers', 'Puissance'], focusEn: ['Quads', 'Glutes', 'Power'],
      warmup: { movements: [
        { name: 'Marche rapide bras actifs', nameEn: 'Brisk Walk Active Arms', duration: 60 },
        { name: 'Squats lents x10', nameEn: 'Slow Squats x10', duration: 60 },
        { name: 'Fentes alternées lentes x8', nameEn: 'Slow Alt Lunges x8', duration: 60 },
        { name: 'Sauts très légers sur place', nameEn: 'Very Light Jumps', duration: 30 },
        { name: 'Hip circles', nameEn: 'Hip Circles', duration: 60 },
      ], totalDuration: 270 },
      blocks: [
        block('int-w1-s1-b1', SQUAT_JUMP, PONT_UNILAT),
        block('int-w1-s1-b2', FENTE_SAUTEE, ISO_SQUAT),
        block('int-w1-s1-b3', STEP_EXPLOSIF, GLUTE_KICKBACK),
      ],
      cooldown: { movements: [
        { name: 'Étirement psoas en fente basse', nameEn: 'Low Lunge Psoas Stretch', duration: 60 },
        { name: 'Étirement mollets contre mur', nameEn: 'Wall Calf Stretch', duration: 45 },
        { name: 'Automassage quadriceps', nameEn: 'Self-massage Quads', duration: 60 },
        { name: 'Respiration guidée', nameEn: 'Guided Breathing', duration: 30 },
      ], totalDuration: 195 },
      equipment: ['Marche ou step bas'], totalRounds: 24, totalDuration: 35, calories: 135,
    },
    {
      id: 'int-w1-s2', week: 1, order: 2,
      title: 'Haut du corps & gainage dynamique', titleEn: 'Dynamic Upper Body & Core',
      description: 'Pompes classiques, pompes rotation, dips sur chaise.', descriptionEn: 'Full push-ups, T-push-ups, chair dips.',
      focus: ['Pectoraux', 'Épaules', 'Triceps'], focusEn: ['Chest', 'Shoulders', 'Triceps'],
      warmup: { movements: [
        { name: 'Rotations épaules avec serviette', nameEn: 'Shoulder Rotations with Towel', duration: 60 },
        { name: 'Pompes lentes x8', nameEn: 'Slow Push-ups x8', duration: 60 },
        { name: 'Planche dynamique haute↔basse', nameEn: 'Dynamic Plank High↔Low', duration: 60 },
        { name: 'Dead bug lent', nameEn: 'Slow Dead Bug', duration: 60 },
      ], totalDuration: 240 },
      blocks: [
        block('int-w1-s2-b1', POMPE_CLASSIQUE, RENEGADE_ROW),
        block('int-w1-s2-b2', POMPE_ROTATION_T, PLANCHE_TAP),
        block('int-w1-s2-b3', DIPS_CHAISE, SUPERMAN_YWT),
      ],
      cooldown: { movements: [
        { name: 'Étirement pectoraux en porte', nameEn: 'Doorway Chest Stretch', duration: 45 },
        { name: 'Étirement grand dorsal', nameEn: 'Lat Stretch', duration: 45 },
        { name: 'Mobilisation cervicale douce', nameEn: 'Gentle Neck Mobilization', duration: 60 },
      ], totalDuration: 150 },
      equipment: ['Chaise stable'], totalRounds: 24, totalDuration: 35, calories: 125,
    },
    {
      id: 'int-w1-s3', week: 1, order: 3,
      title: 'Corps entier cardio dominant', titleEn: 'Cardio Full Body',
      description: 'Burpee modifié, skaters, high knees, bear crawl.', descriptionEn: 'Modified burpee, skaters, high knees, bear crawl.',
      focus: ['Cardio', 'Coordination', 'Endurance'], focusEn: ['Cardio', 'Coordination', 'Endurance'],
      warmup: { movements: [
        { name: 'Jumping jacks', nameEn: 'Jumping Jacks', duration: 60 },
        { name: 'High knees légers', nameEn: 'Light High Knees', duration: 60 },
        { name: 'Fentes dynamiques', nameEn: 'Dynamic Lunges', duration: 60 },
        { name: 'Cat-cow', nameEn: 'Cat-Cow', duration: 60 },
      ], totalDuration: 240 },
      blocks: [
        block('int-w1-s3-b1', BURPEE_MODIFIE, MC_RAPIDE),
        block('int-w1-s3-b2', SKATERS, PLANCHE_DOWNDOG),
        block('int-w1-s3-b3', HIGH_KNEES, BEAR_CRAWL),
      ],
      cooldown: { movements: [
        { name: 'Foam roller mollets', nameEn: 'Foam Roll Calves', duration: 60 },
        { name: 'Pigeon yoga (chaque côté)', nameEn: 'Pigeon Pose (each side)', duration: 45 },
        { name: 'Respiration 4-7-8 × 4', nameEn: '4-7-8 Breathing × 4', duration: 60 },
      ], totalDuration: 165 },
      equipment: [], totalRounds: 24, totalDuration: 35, calories: 140,
    },
    {
      id: 'int-w1-s4', week: 1, order: 4,
      title: 'Mobilité & récupération active', titleEn: 'Active Recovery & Mobility',
      description: 'Pas de blocs 20/10. Mobilité articulaire + étirements + respiration guidée.', descriptionEn: 'No 20/10 blocks. Joint mobility + stretching + guided breathing.',
      focus: ['Récupération', 'Mobilité', 'Respiration'], focusEn: ['Recovery', 'Mobility', 'Breathing'],
      warmup: { movements: [], totalDuration: 0 },
      blocks: [], // Special: no tabata blocks
      cooldown: { movements: [], totalDuration: 0 },
      equipment: [], totalRounds: 0, totalDuration: 25, calories: 30,
    },
  ],
}

// ─── Week 2: Montée en densité (4 blocs/séance) ──────────────

const week2: TabataWeek = {
  weekNumber: 2,
  title: 'Montée en densité', titleEn: 'Increasing Density',
  description: '4 blocs tabata + 1 min récup. Nouveaux: Thruster, Burpee complet, Hollow body.',
  descriptionEn: '4 tabata blocks + 1 min recovery. New: Thruster, Full Burpee, Hollow body.',
  focus: 'Augmentation du volume, nouveaux exercices composés',
  focusEn: 'Volume increase, new compound exercises',
  isDeload: false,
  sessions: [
    {
      id: 'int-w2-s1', week: 2, order: 1,
      title: 'Corps entier — Densité', titleEn: 'Full Body — Density',
      description: 'Squat jump, fente sautée, thruster, burpee complet.', descriptionEn: 'Squat jump, jump lunge, thruster, full burpee.',
      focus: ['Puissance', 'Endurance', 'Composé'], focusEn: ['Power', 'Endurance', 'Compound'],
      warmup: { movements: [
        { name: 'Marche rapide bras actifs', nameEn: 'Brisk Walk Active Arms', duration: 60 },
        { name: 'Squats d\'activation x10', nameEn: 'Activation Squats x10', duration: 60 },
        { name: 'Fentes dynamiques x8', nameEn: 'Dynamic Lunges x8', duration: 60 },
        { name: '2 burpees complets', nameEn: '2 Full Burpees', duration: 30 },
      ], totalDuration: 210 },
      blocks: [
        block('int-w2-s1-b1', SQUAT_JUMP, PONT_UNILAT),
        block('int-w2-s1-b2', FENTE_SAUTEE, ISO_SQUAT),
        block('int-w2-s1-b3', THRUSTER, HOLLOW_BODY),
        block('int-w2-s1-b4', BURPEE_COMPLET, V_SIT),
      ],
      cooldown: { movements: [
        { name: 'Étirement psoas en fente basse', nameEn: 'Low Lunge Psoas Stretch', duration: 60 },
        { name: 'Étirement ischio-jambiers', nameEn: 'Hamstring Stretch', duration: 45 },
        { name: 'Respiration guidée', nameEn: 'Guided Breathing', duration: 30 },
      ], totalDuration: 135 },
      equipment: [], totalRounds: 32, totalDuration: 40, calories: 185,
    },
    {
      id: 'int-w2-s2', week: 2, order: 2,
      title: 'Haut du corps — Densité', titleEn: 'Upper Body — Density',
      description: 'Pompes classiques, pompes rotation, dips, archer push-up.', descriptionEn: 'Full push-ups, T-push-ups, dips, archer push-up.',
      focus: ['Force', 'Stabilité', 'Endurance'], focusEn: ['Strength', 'Stability', 'Endurance'],
      warmup: { movements: [
        { name: 'Rotations épaules', nameEn: 'Shoulder Rotations', duration: 60 },
        { name: 'Pompes lentes x8', nameEn: 'Slow Push-ups x8', duration: 60 },
        { name: 'Planche dynamique', nameEn: 'Dynamic Plank', duration: 60 },
      ], totalDuration: 180 },
      blocks: [
        block('int-w2-s2-b1', POMPE_CLASSIQUE, PLANCHE_TAP),
        block('int-w2-s2-b2', POMPE_ROTATION_T, HOLLOW_BODY),
        block('int-w2-s2-b3', DIPS_CHAISE, SUPERMAN_YWT),
        block('int-w2-s2-b4', ARCHER_PUSHUP, V_SIT),
      ],
      cooldown: { movements: [
        { name: 'Étirement pectoraux', nameEn: 'Chest Stretch', duration: 45 },
        { name: 'Étirement triceps', nameEn: 'Triceps Stretch', duration: 30 },
        { name: 'Respiration guidée', nameEn: 'Guided Breathing', duration: 30 },
      ], totalDuration: 105 },
      equipment: ['Chaise stable'], totalRounds: 32, totalDuration: 40, calories: 170,
    },
    {
      id: 'int-w2-s3', week: 2, order: 3,
      title: 'Cardio — Densité', titleEn: 'Cardio — Density',
      description: 'Burpee complet, skaters, high knees, MC rapide.', descriptionEn: 'Full burpee, skaters, high knees, fast MC.',
      focus: ['Cardio', 'Agilité', 'Vitesse'], focusEn: ['Cardio', 'Agility', 'Speed'],
      warmup: { movements: [
        { name: 'Jumping jacks', nameEn: 'Jumping Jacks', duration: 60 },
        { name: 'High knees légers', nameEn: 'Light High Knees', duration: 60 },
        { name: 'Squats activation', nameEn: 'Activation Squats', duration: 60 },
      ], totalDuration: 180 },
      blocks: [
        block('int-w2-s3-b1', BURPEE_COMPLET, MC_RAPIDE),
        block('int-w2-s3-b2', SKATERS, BEAR_CRAWL),
        block('int-w2-s3-b3', HIGH_KNEES, PLANCHE_DOWNDOG),
        block('int-w2-s3-b4', BURPEE_MODIFIE, HOLLOW_BODY),
      ],
      cooldown: { movements: [
        { name: 'Foam roller IT band', nameEn: 'Foam Roll IT Band', duration: 60 },
        { name: 'Pigeon yoga', nameEn: 'Pigeon Pose', duration: 60 },
        { name: 'Respiration 4-7-8', nameEn: '4-7-8 Breathing', duration: 60 },
      ], totalDuration: 180 },
      equipment: [], totalRounds: 32, totalDuration: 40, calories: 195,
    },
    {
      id: 'int-w2-s4', week: 2, order: 4,
      title: 'Force & gainage', titleEn: 'Strength & Core',
      description: 'Thruster, pistol squat assisté, archer push-up, hollow body.', descriptionEn: 'Thruster, assisted pistol squat, archer push-up, hollow body.',
      focus: ['Force unilatérale', 'Gainage profond'], focusEn: ['Unilateral strength', 'Deep core'],
      warmup: { movements: [
        { name: 'Marche active', nameEn: 'Active Walk', duration: 60 },
        { name: 'Squats profonds x8', nameEn: 'Deep Squats x8', duration: 60 },
        { name: 'Pompes x6', nameEn: 'Push-ups x6', duration: 60 },
        { name: 'Dead bug x8', nameEn: 'Dead Bug x8', duration: 60 },
      ], totalDuration: 240 },
      blocks: [
        block('int-w2-s4-b1', THRUSTER, PISTOL_ASSIST),
        block('int-w2-s4-b2', ARCHER_PUSHUP, HOLLOW_BODY),
        block('int-w2-s4-b3', FENTE_SAUTEE, GLUTE_KICKBACK),
        block('int-w2-s4-b4', POMPE_CLASSIQUE, V_SIT),
      ],
      cooldown: { movements: [
        { name: 'Étirement psoas', nameEn: 'Psoas Stretch', duration: 60 },
        { name: 'Étirement mollets', nameEn: 'Calf Stretch', duration: 45 },
        { name: 'Respiration guidée', nameEn: 'Guided Breathing', duration: 30 },
      ], totalDuration: 135 },
      equipment: [], totalRounds: 32, totalDuration: 40, calories: 175,
    },
  ],
}

// ─── Week 3 & 4 (simplified — full content in production) ─────

const week3: TabataWeek = {
  weekNumber: 3,
  title: 'Intensité maximale', titleEn: 'Maximum Intensity',
  description: '4 blocs/séance. Exercices signature: Burpee saut latéral, Pistol squat, Archer push-up.',
  descriptionEn: '4 blocks/session. Signature moves: Lateral burpee, Pistol squat, Archer push-up.',
  focus: 'Intensité maximale, mouvements complexes',
  focusEn: 'Maximum intensity, complex movements',
  isDeload: false,
  sessions: [
    {
      id: 'int-w3-s1', week: 3, order: 1,
      title: 'Jambes puissance max', titleEn: 'Max Leg Power',
      description: 'Squat jump, pistol squat assisté, fente sautée, step-up explosif.', descriptionEn: 'Squat jump, assisted pistol squat, jump lunge, explosive step-up.',
      focus: ['Puissance', 'Unilatéral'], focusEn: ['Power', 'Unilateral'],
      warmup: { movements: [
        { name: 'Marche rapide', nameEn: 'Brisk Walk', duration: 60 },
        { name: 'Squats x10', nameEn: 'Squats x10', duration: 60 },
        { name: 'Fentes dynamiques', nameEn: 'Dynamic Lunges', duration: 60 },
      ], totalDuration: 180 },
      blocks: [
        block('int-w3-s1-b1', SQUAT_JUMP, PISTOL_ASSIST),
        block('int-w3-s1-b2', FENTE_SAUTEE, PONT_UNILAT),
        block('int-w3-s1-b3', STEP_EXPLOSIF, ISO_SQUAT),
        block('int-w3-s1-b4', THRUSTER, GLUTE_KICKBACK),
      ],
      cooldown: { movements: [
        { name: 'Étirement psoas', nameEn: 'Psoas Stretch', duration: 60 },
        { name: 'Étirement mollets', nameEn: 'Calf Stretch', duration: 45 },
        { name: 'Respiration', nameEn: 'Breathing', duration: 30 },
      ], totalDuration: 135 },
      equipment: ['Marche/step'], totalRounds: 32, totalDuration: 40, calories: 190,
    },
    {
      id: 'int-w3-s2', week: 3, order: 2,
      title: 'Haut du corps avancé', titleEn: 'Advanced Upper Body',
      description: 'Archer push-up, pompe rotation T, dips, pompes classiques.', descriptionEn: 'Archer push-up, T-push-up, dips, full push-ups.',
      focus: ['Force', 'Stabilité scapulaire'], focusEn: ['Strength', 'Scapular Stability'],
      warmup: { movements: [
        { name: 'Rotations épaules', nameEn: 'Shoulder Rotations', duration: 60 },
        { name: 'Pompes x8', nameEn: 'Push-ups x8', duration: 60 },
        { name: 'Planche dynamique', nameEn: 'Dynamic Plank', duration: 60 },
      ], totalDuration: 180 },
      blocks: [
        block('int-w3-s2-b1', ARCHER_PUSHUP, PLANCHE_TAP),
        block('int-w3-s2-b2', POMPE_ROTATION_T, HOLLOW_BODY),
        block('int-w3-s2-b3', DIPS_CHAISE, SUPERMAN_YWT),
        block('int-w3-s2-b4', POMPE_CLASSIQUE, V_SIT),
      ],
      cooldown: { movements: [
        { name: 'Étirement pectoraux', nameEn: 'Chest Stretch', duration: 45 },
        { name: 'Étirement triceps', nameEn: 'Triceps Stretch', duration: 30 },
        { name: 'Respiration', nameEn: 'Breathing', duration: 30 },
      ], totalDuration: 105 },
      equipment: ['Chaise'], totalRounds: 32, totalDuration: 40, calories: 180,
    },
    {
      id: 'int-w3-s3', week: 3, order: 3,
      title: 'Cardio extrême', titleEn: 'Extreme Cardio',
      description: 'Burpee complet, high knees, skaters, MC rapide.', descriptionEn: 'Full burpee, high knees, skaters, fast MC.',
      focus: ['Cardio max', 'Endurance'], focusEn: ['Max cardio', 'Endurance'],
      warmup: { movements: [
        { name: 'Jumping jacks', nameEn: 'Jumping Jacks', duration: 60 },
        { name: 'High knees', nameEn: 'High Knees', duration: 60 },
        { name: '2 burpees complets', nameEn: '2 Full Burpees', duration: 30 },
      ], totalDuration: 150 },
      blocks: [
        block('int-w3-s3-b1', BURPEE_COMPLET, MC_RAPIDE),
        block('int-w3-s3-b2', HIGH_KNEES, BEAR_CRAWL),
        block('int-w3-s3-b3', SKATERS, PLANCHE_DOWNDOG),
        block('int-w3-s3-b4', BURPEE_COMPLET, HOLLOW_BODY),
      ],
      cooldown: { movements: [
        { name: 'Foam roller', nameEn: 'Foam Roll', duration: 60 },
        { name: 'Respiration 4-7-8', nameEn: '4-7-8 Breathing', duration: 60 },
      ], totalDuration: 120 },
      equipment: [], totalRounds: 32, totalDuration: 40, calories: 200,
    },
    {
      id: 'int-w3-s4', week: 3, order: 4,
      title: 'Mix force + cardio', titleEn: 'Strength + Cardio Mix',
      description: 'Thruster, squat jump, archer push-up, burpee.', descriptionEn: 'Thruster, squat jump, archer push-up, burpee.',
      focus: ['Composé', 'Endurance de force'], focusEn: ['Compound', 'Strength Endurance'],
      warmup: { movements: [
        { name: 'Marche active', nameEn: 'Active Walk', duration: 60 },
        { name: 'Squats x8', nameEn: 'Squats x8', duration: 60 },
        { name: 'Pompes x6', nameEn: 'Push-ups x6', duration: 60 },
      ], totalDuration: 180 },
      blocks: [
        block('int-w3-s4-b1', THRUSTER, PISTOL_ASSIST),
        block('int-w3-s4-b2', SQUAT_JUMP, FENTE_SAUTEE),
        block('int-w3-s4-b3', ARCHER_PUSHUP, V_SIT),
        block('int-w3-s4-b4', BURPEE_COMPLET, HOLLOW_BODY),
      ],
      cooldown: { movements: [
        { name: 'Étirement complet', nameEn: 'Full Stretch', duration: 60 },
        { name: 'Respiration', nameEn: 'Breathing', duration: 30 },
      ], totalDuration: 90 },
      equipment: [], totalRounds: 32, totalDuration: 40, calories: 195,
    },
  ],
}

const week4: TabataWeek = {
  weekNumber: 4,
  title: 'Décharge & bilan', titleEn: 'Deload & Assessment',
  description: 'Retour à 3 blocs. Exercices maîtrisés, focus technique. Tests de fin de programme.',
  descriptionEn: 'Back to 3 blocks. Mastered exercises, technique focus. End-of-program tests.',
  focus: 'Technique parfaite, récupération, tests',
  focusEn: 'Perfect technique, recovery, tests',
  isDeload: true,
  sessions: [
    {
      id: 'int-w4-s1', week: 4, order: 1,
      title: 'Jambes (décharge)', titleEn: 'Legs (Deload)',
      description: 'Squat jump maîtrisé, fente contrôlée, pont unilatéral.', descriptionEn: 'Controlled squat jump, controlled lunge, single-leg bridge.',
      focus: ['Technique', 'Contrôle'], focusEn: ['Technique', 'Control'],
      warmup: { movements: [
        { name: 'Marche sur place', nameEn: 'March in Place', duration: 60 },
        { name: 'Squats lents', nameEn: 'Slow Squats', duration: 60 },
        { name: 'Fentes statiques', nameEn: 'Static Lunges', duration: 60 },
      ], totalDuration: 180 },
      blocks: [
        block('int-w4-s1-b1', SQUAT_JUMP, PONT_UNILAT),
        block('int-w4-s1-b2', FENTE_SAUTEE, ISO_SQUAT),
        block('int-w4-s1-b3', STEP_EXPLOSIF, GLUTE_KICKBACK),
      ],
      cooldown: { movements: [
        { name: 'Étirement complet jambes', nameEn: 'Full Leg Stretch', duration: 90 },
        { name: 'Respiration', nameEn: 'Breathing', duration: 30 },
      ], totalDuration: 120 },
      equipment: ['Marche/step'], totalRounds: 24, totalDuration: 35, calories: 140,
    },
    {
      id: 'int-w4-s2', week: 4, order: 2,
      title: 'Haut du corps (décharge)', titleEn: 'Upper Body (Deload)',
      description: 'Pompes classiques, planche tap, dips modérés.', descriptionEn: 'Full push-ups, shoulder taps, moderate dips.',
      focus: ['Qualité', 'Stabilité'], focusEn: ['Quality', 'Stability'],
      warmup: { movements: [
        { name: 'Rotations épaules', nameEn: 'Shoulder Rotations', duration: 60 },
        { name: 'Pompes genoux x8', nameEn: 'Knee Push-ups x8', duration: 60 },
      ], totalDuration: 120 },
      blocks: [
        block('int-w4-s2-b1', POMPE_CLASSIQUE, PLANCHE_TAP),
        block('int-w4-s2-b2', POMPE_ROTATION_T, SUPERMAN_YWT),
        block('int-w4-s2-b3', DIPS_CHAISE, HOLLOW_BODY),
      ],
      cooldown: { movements: [
        { name: 'Étirement haut du corps', nameEn: 'Upper Body Stretch', duration: 90 },
        { name: 'Respiration', nameEn: 'Breathing', duration: 30 },
      ], totalDuration: 120 },
      equipment: ['Chaise'], totalRounds: 24, totalDuration: 35, calories: 130,
    },
    {
      id: 'int-w4-s3', week: 4, order: 3,
      title: 'Cardio léger + tests', titleEn: 'Light Cardio + Tests',
      description: 'Burpee modéré, MC rapide, skaters légers.', descriptionEn: 'Moderate burpee, fast MC, light skaters.',
      focus: ['Récupération active', 'Bilan'], focusEn: ['Active Recovery', 'Assessment'],
      warmup: { movements: [
        { name: 'Marche active', nameEn: 'Active Walk', duration: 60 },
        { name: 'Mobilisation articulaire', nameEn: 'Joint Mobility', duration: 60 },
      ], totalDuration: 120 },
      blocks: [
        block('int-w4-s3-b1', BURPEE_MODIFIE, MC_RAPIDE),
        block('int-w4-s3-b2', SKATERS, PLANCHE_DOWNDOG),
        block('int-w4-s3-b3', HIGH_KNEES, BEAR_CRAWL),
      ],
      cooldown: { movements: [
        { name: 'Étirement complet', nameEn: 'Full Stretch', duration: 90 },
        { name: 'Respiration 4-7-8', nameEn: '4-7-8 Breathing', duration: 60 },
      ], totalDuration: 150 },
      equipment: [], totalRounds: 24, totalDuration: 35, calories: 135,
    },
    {
      id: 'int-w4-s4', week: 4, order: 4,
      title: 'Bilan final', titleEn: 'Final Assessment',
      description: 'Tests: planche 60s, burpees 1min, squat jump ×8, asymétrie G/D.', descriptionEn: 'Tests: 60s plank, 1min burpees, 8 rounds squat jump, L/R asymmetry.',
      focus: ['Tests de passage', 'Évaluation'], focusEn: ['Passing Tests', 'Assessment'],
      warmup: { movements: [
        { name: 'Marche active', nameEn: 'Active Walk', duration: 60 },
        { name: 'Mobilisation complète', nameEn: 'Full Mobility', duration: 60 },
      ], totalDuration: 120 },
      blocks: [
        block('int-w4-s4-b1', THRUSTER, HOLLOW_BODY),
        block('int-w4-s4-b2', ARCHER_PUSHUP, V_SIT),
        block('int-w4-s4-b3', PISTOL_ASSIST, SUPERMAN_YWT),
      ],
      cooldown: { movements: [
        { name: 'Savasana + respiration', nameEn: 'Savasana + Breathing', duration: 120 },
      ], totalDuration: 120 },
      equipment: [], totalRounds: 24, totalDuration: 35, calories: 125,
    },
  ],
}

// ─── Export ─────────────────────────────────────────────────────

export const INTERMEDIAIRE_PROGRAM: TabataProgram = {
  id: 'intermediaire',
  title: 'Intermédiaire',
  titleEn: 'Intermediate',
  description: 'Introduire la plyométrie contrôlée, intensifier le travail unilatéral, passer à 4 blocs tabata.',
  descriptionEn: 'Introduce controlled plyometrics, intensify unilateral work, progress to 4 tabata blocks.',
  tier: 'premium',
  accentColor: '#85C7F2',
  icon: 'flame',
  durationWeeks: 4,
  sessionsPerWeek: 4,
  totalSessions: 16,
  equipment: { required: [], optional: ['Marche ou step bas', 'Chaise stable', 'Foam roller'] },
  focusAreas: ['Plyométrie', 'Gainage dynamique', 'Burpees', 'Force unilatérale'],
  focusAreasEn: ['Plyometrics', 'Dynamic Core', 'Burpees', 'Unilateral Strength'],
  principles: [
    'Réception silencieuse sur avant-pied',
    'Ne jamais faire 2 séances intenses consécutives',
    'La fatigue neurologique = réduire d\'une séance',
  ],
  principlesEn: [
    'Silent forefoot landing',
    'Never do 2 intense sessions back-to-back',
    'Neurological fatigue = reduce by one session',
  ],
  completionCriteria: [
    'Planche avant-bras 60 secondes',
    '12-15 burpees en 1 minute',
    'Squat jump ×8 rounds rythme maintenu',
    'Asymétrie G/D < 20% au pistol squat',
  ],
  completionCriteriaEn: [
    '60-second forearm plank',
    '12-15 burpees in 1 minute',
    '8-round squat jump maintaining pace',
    'L/R asymmetry < 20% on pistol squat',
  ],
  nextProgramId: 'avance',
  weeks: [week1, week2, week3, week4],
}

export const INTERMEDIAIRE_SESSIONS: TabataSession[] = INTERMEDIAIRE_PROGRAM.weeks.flatMap(w => w.sessions)
