feat(design): Warm Cinema redesign + fast-start players

Full visual overhaul from Cyber-Cinematic Glass to "Warm Cinema":
warm charcoal (#0B0908), cream (#F3E9DF), ember (#D9541F).
Fraunces (editorial serif) for display, Karla for body/UI.

Design
- app_colors: new palette, all existing token names preserved,
  plus posterScrim/heroScrim gradients and lift()/emberFocus() shadows
- app_theme: new type scale, tighter radii, 20+ component themes
- mobile_theme aligned on the same tokens
- glass_container: opaque layered surfaces replace glassmorphism;
  adds GlassCard (hover + remote-focus states) and CinemaBackdrop
- players and boot splash restyled (film-leader motif, no web fonts)

Performance
- remove every BackdropFilter (33 call sites): backdrop blur forced a
  full framebuffer read per frame per card, the main scroll jank source
- bundle Fraunces/Karla as assets: google_fonts no longer fetches from
  fonts.gstatic.com at startup
- drop the blocking hls.js CDN script from index.html; no Dart code
  ever used it, only the player iframes need it
- self-host hls.js/mpegts.js and load them on demand, so ~213 KB of
  mpegts is never downloaded for HLS streams
- bound image decode size on 10 sites: a 40-poster grid drops from
  ~240 MB to a few tens of MB of GPU memory

Players (new shared engine: web/xf-player-core.js)
- event-driven start instead of a 200 ms buffer poll plus a 1.5 s wait
- initialLiveManifestSize 3 -> 1, liveSyncDurationCount 10 -> 2,
  startFragPrefetch on, testBandwidth off
- MPEG-TS initial stash 512 KB -> 64 KB
- adaptive escalation fast -> balanced -> safe on repeated stalls
  (60 s rolling window), applied live for HLS so there is no visible cut

Pre-existing build breakage fixed along the way
- undefined AppColors.shimmer, AppTheme.durationXs and spacing8/12/16/32
- broken relative imports in channel_card and quality_selector_widget
- missing GlassCard widget and hasBorder/showShadow parameters

Also resolves a leftover unmerged .claude/settings.local.json by
keeping the remote version.

Still broken (pre-existing, dead code, not reachable from main.dart):
recommendations_provider.dart and continue_watching_widget.dart import
a models/playlist.dart that no longer exists.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Opus 5 committed 2026-08-10 21:26:25 +02:00
1 parent cb5eca7547
commit 6f0f51384a
54 files changed
+2425 -1775

No files matched your search

+35 -30
View File
@@ -2,24 +2,24 @@ import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import '../../core/theme/app_colors.dart';
/// XtremFlow Mobile Theme
/// Thème mobile XtremFlow — déclinaison tactile de « Warm Cinema ».
///
/// Adapted from AppTheme for touch-first screens.
/// Uses the same Cyber-Cinematic Glass design system.
/// Mêmes tokens que [AppTheme] (charbon chaud / crème / braise), échelles
/// typographiques réduites et cibles tactiles élargies.
class MobileTheme {
MobileTheme._();
// ============ SPACING (8px rhythmic system) ============
// ============ ESPACEMENT ============
static const double spacingXs = 4.0;
static const double spacingSm = 8.0;
static const double spacingMd = 16.0;
static const double spacingLg = 24.0;
static const double spacingXl = 32.0;
// ============ RADIUS ============
static const double radiusSm = 8.0;
static const double radiusMd = 12.0;
static const double radiusLg = 16.0;
// ============ RAYONS (alignés sur AppTheme) ============
static const double radiusSm = 6.0;
static const double radiusMd = 10.0;
static const double radiusLg = 14.0;
static const double radiusXl = 20.0;
// ============ DARK THEME (Mobile Main) ============
@@ -32,69 +32,69 @@ class MobileTheme {
// Typography: Scaled down for mobile
textTheme: TextTheme(
displayLarge: GoogleFonts.spaceGrotesk(
displayLarge: GoogleFonts.fraunces(
fontSize: 32,
fontWeight: FontWeight.w700,
letterSpacing: -0.02,
height: 1.1,
color: AppColors.onSurface,
),
displayMedium: GoogleFonts.spaceGrotesk(
displayMedium: GoogleFonts.fraunces(
fontSize: 28,
fontWeight: FontWeight.w600,
letterSpacing: -0.01,
height: 1.2,
color: AppColors.onSurface,
),
displaySmall: GoogleFonts.spaceGrotesk(
displaySmall: GoogleFonts.fraunces(
fontSize: 22,
fontWeight: FontWeight.w500,
height: 1.3,
color: AppColors.onSurface,
),
headlineMedium: GoogleFonts.spaceGrotesk(
headlineMedium: GoogleFonts.fraunces(
fontSize: 20,
fontWeight: FontWeight.w500,
height: 1.3,
color: AppColors.onSurface,
),
titleLarge: GoogleFonts.spaceGrotesk(
titleLarge: GoogleFonts.fraunces(
fontSize: 18,
fontWeight: FontWeight.w600,
color: AppColors.onSurface,
),
titleMedium: GoogleFonts.inter(
titleMedium: GoogleFonts.karla(
fontSize: 16,
fontWeight: FontWeight.w600,
color: AppColors.onSurface,
),
bodyLarge: GoogleFonts.inter(
bodyLarge: GoogleFonts.karla(
fontSize: 16,
fontWeight: FontWeight.w400,
height: 1.5,
color: AppColors.onSurfaceVariant,
),
bodyMedium: GoogleFonts.inter(
bodyMedium: GoogleFonts.karla(
fontSize: 14,
fontWeight: FontWeight.w400,
height: 1.5,
color: AppColors.onSurfaceVariant,
),
labelLarge: GoogleFonts.inter(
labelLarge: GoogleFonts.karla(
fontSize: 14,
fontWeight: FontWeight.w600,
letterSpacing: 0.05,
height: 1.2,
color: AppColors.onSurface,
),
labelMedium: GoogleFonts.inter(
labelMedium: GoogleFonts.karla(
fontSize: 12,
fontWeight: FontWeight.w500,
letterSpacing: 0.02,
height: 1.2,
color: AppColors.onSurface,
),
labelSmall: GoogleFonts.inter(
labelSmall: GoogleFonts.karla(
fontSize: 11,
fontWeight: FontWeight.w500,
letterSpacing: 0.02,
@@ -110,7 +110,7 @@ class MobileTheme {
elevation: 0,
centerTitle: true,
scrolledUnderElevation: 0,
titleTextStyle: GoogleFonts.spaceGrotesk(
titleTextStyle: GoogleFonts.fraunces(
fontSize: 18,
fontWeight: FontWeight.w600,
color: AppColors.onSurface,
@@ -119,14 +119,16 @@ class MobileTheme {
// Bottom Navigation Bar
bottomNavigationBarTheme: BottomNavigationBarThemeData(
backgroundColor: AppColors.surfaceContainerLow.withOpacity(0.9),
selectedItemColor: AppColors.onSurface,
// Opaque : une barre translucide impose une couche de composition
// supplementaire sur toute la largeur, a chaque frame.
backgroundColor: AppColors.surfaceContainerLowest,
selectedItemColor: AppColors.primary,
unselectedItemColor: AppColors.outline,
selectedLabelStyle: GoogleFonts.inter(
selectedLabelStyle: GoogleFonts.karla(
fontSize: 11,
fontWeight: FontWeight.w600,
),
unselectedLabelStyle: GoogleFonts.inter(
unselectedLabelStyle: GoogleFonts.karla(
fontSize: 11,
fontWeight: FontWeight.w500,
),
@@ -157,7 +159,7 @@ class MobileTheme {
width: 2,
),
),
hintStyle: GoogleFonts.inter(
hintStyle: GoogleFonts.karla(
color: AppColors.outline,
fontSize: 14,
),
@@ -166,14 +168,16 @@ class MobileTheme {
// Buttons
filledButtonTheme: FilledButtonThemeData(
style: FilledButton.styleFrom(
backgroundColor: AppColors.primaryContainer,
foregroundColor: AppColors.onPrimaryContainer,
// Braise profonde : seule variante qui tient le contraste AA
// (4,5:1) avec du texte blanc.
backgroundColor: AppColors.primaryFill,
foregroundColor: Colors.white,
elevation: 0,
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(radiusMd),
),
textStyle: GoogleFonts.inter(
textStyle: GoogleFonts.karla(
fontWeight: FontWeight.w600,
fontSize: 14,
),
@@ -182,7 +186,8 @@ class MobileTheme {
// Cards
cardTheme: CardThemeData(
color: AppColors.glassLevel1Bg,
color: AppColors.surfaceContainerLow,
surfaceTintColor: Colors.transparent,
elevation: 0,
margin: EdgeInsets.zero,
shape: RoundedRectangleBorder(