feat(design): Warm Cinema theme + event-driven adaptive players

Replaces the Projector Noir palette with "Warm Cinema" and rebuilds the
web players around a shared, event-driven engine.

Design
- app_colors: warm charcoal (#0B0908), cream (#F3E9DF), ember (#D9541F);
  adds posterScrim/heroScrim gradients, lift()/emberFocus() shadows,
  const cream-alpha tokens replacing Colors.whiteNN, and primaryFill,
  a deeper ember reserved for text-bearing fills so white labels clear
  the 4.5:1 AA threshold that #D9541F alone does not
- app_theme / mobile_theme: Fraunces (display serif) + Karla (body),
  tighter radii, 20+ component themes
- glass_container: opaque layered surfaces replace the blurred glass
- themed_loading_screen restyled; players and boot splash follow

Performance
- drop every BackdropFilter: backdrop blur forced a full framebuffer
  read per frame per card, the main source of scroll jank
- bundle Fraunces/Karla as assets so google_fonts stops fetching from
  fonts.gstatic.com at startup
- bound image decode size on 12 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)
- start on media events instead of polling the buffer every 100-200 ms
- hls.js/mpegts.js loaded on demand, so ~213 KB of mpegts is never
  fetched for HLS streams
- liveSyncDurationCount 10 -> 2, startFragPrefetch on, testBandwidth
  off, MPEG-TS initial stash 512 KB -> 64 KB
- adaptive escalation fast -> balanced -> safe after repeated stalls in
  a 60 s window, applied live for HLS so there is no visible cut

Preserved from the recent streaming work on main: server-side quality
selection, stable player viewId, the turbo direct MPEG-TS path, vendored
library cache headers and the CI/Docker changes. Only the theme layer and
the player front-end were replaced; GlassCard stays in ui_components.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Opus 5 committed 2026-08-10 21:42:56 +02:00
1 parent e332895d7d
commit 1feeaae78a
49 files changed
+2341 -1751

No files matched your search

+36 -31
View File
@@ -1,25 +1,25 @@
import 'package:flutter/material.dart';
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.syne(
displayLarge: GoogleFonts.fraunces(
fontSize: 32,
fontWeight: FontWeight.w700,
letterSpacing: -0.02,
height: 1.1,
color: AppColors.onSurface,
),
displayMedium: GoogleFonts.syne(
displayMedium: GoogleFonts.fraunces(
fontSize: 28,
fontWeight: FontWeight.w600,
letterSpacing: -0.01,
height: 1.2,
color: AppColors.onSurface,
),
displaySmall: GoogleFonts.syne(
displaySmall: GoogleFonts.fraunces(
fontSize: 22,
fontWeight: FontWeight.w500,
height: 1.3,
color: AppColors.onSurface,
),
headlineMedium: GoogleFonts.syne(
headlineMedium: GoogleFonts.fraunces(
fontSize: 20,
fontWeight: FontWeight.w500,
height: 1.3,
color: AppColors.onSurface,
),
titleLarge: GoogleFonts.syne(
titleLarge: GoogleFonts.fraunces(
fontSize: 18,
fontWeight: FontWeight.w600,
color: AppColors.onSurface,
),
titleMedium: GoogleFonts.instrumentSans(
titleMedium: GoogleFonts.karla(
fontSize: 16,
fontWeight: FontWeight.w600,
color: AppColors.onSurface,
),
bodyLarge: GoogleFonts.instrumentSans(
bodyLarge: GoogleFonts.karla(
fontSize: 16,
fontWeight: FontWeight.w400,
height: 1.5,
color: AppColors.onSurfaceVariant,
),
bodyMedium: GoogleFonts.instrumentSans(
bodyMedium: GoogleFonts.karla(
fontSize: 14,
fontWeight: FontWeight.w400,
height: 1.5,
color: AppColors.onSurfaceVariant,
),
labelLarge: GoogleFonts.instrumentSans(
labelLarge: GoogleFonts.karla(
fontSize: 14,
fontWeight: FontWeight.w600,
letterSpacing: 0.05,
height: 1.2,
color: AppColors.onSurface,
),
labelMedium: GoogleFonts.instrumentSans(
labelMedium: GoogleFonts.karla(
fontSize: 12,
fontWeight: FontWeight.w500,
letterSpacing: 0.02,
height: 1.2,
color: AppColors.onSurface,
),
labelSmall: GoogleFonts.instrumentSans(
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.syne(
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.instrumentSans(
selectedLabelStyle: GoogleFonts.karla(
fontSize: 11,
fontWeight: FontWeight.w600,
),
unselectedLabelStyle: GoogleFonts.instrumentSans(
unselectedLabelStyle: GoogleFonts.karla(
fontSize: 11,
fontWeight: FontWeight.w500,
),
@@ -157,7 +159,7 @@ class MobileTheme {
width: 2,
),
),
hintStyle: GoogleFonts.instrumentSans(
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: AppColors.onSurface,
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.instrumentSans(
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(