import 'package:flutter/material.dart'; /// Charte inspirée du prototype web (dégradé violet, cartes blanches). abstract final class AppTheme { static const primaryGradient = LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Color(0xFF667EEA), Color(0xFF764BA2)], ); static const childColors = [ '#6C63FF', '#E91E8C', '#2196F3', '#FF9800', '#4CAF50', '#9C27B0', '#00BCD4', '#F44336', ]; static Color parseColor(String hex) { final value = hex.replaceFirst('#', ''); return Color(int.parse('FF$value', radix: 16)); } static ThemeData light() { final seed = parseColor('#667EEA'); return ThemeData( useMaterial3: true, colorScheme: ColorScheme.fromSeed( seedColor: seed, brightness: Brightness.light, ), scaffoldBackgroundColor: seed, appBarTheme: const AppBarTheme( backgroundColor: Colors.transparent, foregroundColor: Colors.white, elevation: 0, centerTitle: true, ), inputDecorationTheme: InputDecorationTheme( filled: true, fillColor: Colors.white, border: OutlineInputBorder(borderRadius: BorderRadius.circular(16)), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(16), borderSide: BorderSide(color: Colors.white.withValues(alpha: 0.3)), ), ), cardTheme: CardThemeData( color: Colors.white, elevation: 4, shadowColor: Colors.black26, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), ), filledButtonTheme: FilledButtonThemeData( style: FilledButton.styleFrom( backgroundColor: Colors.white, foregroundColor: seed, padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 14), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(24), ), textStyle: const TextStyle(fontWeight: FontWeight.w700, fontSize: 16), ), ), textButtonTheme: TextButtonThemeData( style: TextButton.styleFrom(foregroundColor: Colors.white), ), ); } }