/// Facade de compatibilité — redirige vers [AppColors]
///
/// Cette classe existe uniquement pour ne pas casser le code existant.
/// Pour tout nouveau code, utiliser [AppColors] directement.
///
/// @deprecated Utiliser [AppColors]
library color_tokens;

import 'package:flutter/material.dart';
import 'app_colors.dart';

class ColorTokens {
  ColorTokens._();

  // ── Primaire ────────────────────────────────────────────────────────────
  static const Color primary          = AppColors.primary;
  static const Color primaryLight     = AppColors.primaryLight;
  static const Color primaryDark      = AppColors.primaryDark;
  static const Color primaryContainer = AppColors.primaryContainer;
  static const Color onPrimary        = AppColors.onPrimary;
  static const Color onPrimaryContainer = AppColors.onPrimaryContainer;

  // ── Secondaire (= Accent) ────────────────────────────────────────────────
  static const Color secondary          = AppColors.accent;
  static const Color secondaryLight     = AppColors.accentLight;
  static const Color secondaryDark      = AppColors.accentDark;
  static const Color secondaryContainer = AppColors.accentContainer;
  static const Color onSecondary        = AppColors.onAccent;
  static const Color onSecondaryContainer = AppColors.onAccentContainer;

  // ── Tertiaire ────────────────────────────────────────────────────────────
  static const Color tertiary          = AppColors.tertiary;
  static const Color tertiaryLight     = AppColors.tertiaryLight;
  static const Color tertiaryDark      = AppColors.primaryDark;
  static const Color tertiaryContainer = AppColors.tertiaryContainer;
  static const Color onTertiary        = AppColors.onPrimary;
  static const Color onTertiaryContainer = AppColors.onPrimaryContainer;

  // ── Surfaces Mode Jour ───────────────────────────────────────────────────
  static const Color background              = AppColors.background;
  static const Color surface                 = AppColors.surface;
  static const Color surfaceVariant          = AppColors.surfaceContainer;
  static const Color surfaceContainer        = AppColors.surface;
  static const Color surfaceContainerHigh    = AppColors.surfaceContainer;
  static const Color surfaceContainerHighest = AppColors.surfaceContainerHigh;
  static const Color onSurface              = AppColors.textPrimary;
  static const Color onSurfaceVariant       = AppColors.textSecondary;
  static const Color textSecondary          = AppColors.textTertiary;
  static const Color outline                = AppColors.border;
  static const Color outlineVariant         = AppColors.borderStrong;

  // ── Surfaces Mode Nuit ───────────────────────────────────────────────────
  static const Color backgroundDark        = AppColors.backgroundDark;
  static const Color surfaceDark           = AppColors.surfaceDark;
  static const Color surfaceVariantDark    = AppColors.surfaceVariantDark;
  static const Color surfaceContainerDark  = AppColors.surfaceContainerDark;
  static const Color onSurfaceDark         = AppColors.textPrimaryDark;
  static const Color onSurfaceVariantDark  = AppColors.textSecondaryDark;
  static const Color outlineDark           = AppColors.borderDark;

  // ── Sémantique ───────────────────────────────────────────────────────────
  static const Color success             = AppColors.success;
  static const Color successLight        = AppColors.successUI;
  static const Color successDark         = AppColors.successDark;
  static const Color successContainer    = AppColors.successContainer;
  static const Color onSuccess           = AppColors.onSuccess;
  static const Color onSuccessContainer  = AppColors.onSuccessContainer;

  static const Color error               = AppColors.error;
  static const Color errorLight          = AppColors.errorLight;
  static const Color errorDark           = AppColors.errorDark;
  static const Color errorContainer      = AppColors.errorContainer;
  static const Color onError             = AppColors.onError;
  static const Color onErrorContainer    = AppColors.onErrorContainer;

  static const Color warning             = AppColors.warning;
  static const Color warningLight        = AppColors.warningUI;
  static const Color warningDark         = AppColors.warningDark;
  static const Color warningContainer    = AppColors.warningContainer;
  static const Color onWarning           = AppColors.onWarning;
  static const Color onWarningContainer  = AppColors.onWarningContainer;

  static const Color info                = AppColors.info;
  static const Color infoLight           = AppColors.infoLight;
  static const Color infoDark            = AppColors.infoDark;
  static const Color infoContainer       = AppColors.infoContainer;
  static const Color onInfo              = AppColors.onPrimary;
  static const Color onInfoContainer     = AppColors.onInfoContainer;

  // ── Navigation ───────────────────────────────────────────────────────────
  static const Color navigationBackground     = AppColors.navigationBackground;
  static const Color navigationSelected       = AppColors.navigationSelected;
  static const Color navigationUnselected     = AppColors.navigationUnselected;
  static const Color navigationIndicator      = AppColors.navigationIndicator;
  static const Color navigationBackgroundDark = AppColors.navigationBackgroundDark;
  static const Color navigationSelectedDark   = AppColors.navigationSelectedDark;
  static const Color navigationUnselectedDark = AppColors.navigationUnselectedDark;
  static const Color navigationIndicatorDark  = AppColors.navigationIndicatorDark;

  // ── Ombres & Effets ──────────────────────────────────────────────────────
  static const Color shadow       = AppColors.shadow;
  static const Color shadowMedium = AppColors.shadowMedium;
  static const Color shadowHigh   = AppColors.shadowHigh;

  static const Color glassBackground = AppColors.glassBackground;
  static const Color glassBorder     = AppColors.glassBorder;
  static const Color glassOverlay    = AppColors.glassOverlay;

  // ── Gradients ────────────────────────────────────────────────────────────
  static const List<Color> logoGradient        = AppColors.logoGradientColors;
  static const List<Color> primaryGradient     = AppColors.primaryGradientColors;
  static const List<Color> loginGradient       = AppColors.loginGradientColors;
  static const List<Color> primaryGradientDark = AppColors.darkGradientColors;
  static const List<Color> secondaryGradient   = [AppColors.tertiary, AppColors.accent];
  static const List<Color> successGradient     = AppColors.successGradientColors;

  // ── Utilitaires ──────────────────────────────────────────────────────────
  static Color withOpacity(Color color, double opacity) =>
      AppColors.withOpacity(color, opacity);

  static Color lighten(Color color, [double amount = 0.1]) =>
      AppColors.lighten(color, amount);

  static Color darken(Color color, [double amount = 0.1]) =>
      AppColors.darken(color, amount);
}
