<?php
/**
 * Application Configuration
 * Central configuration constants for the application.
 */

if (!defined('ROOT_PATH')) {
    // /lib/../ = project root
    define('ROOT_PATH', dirname(__DIR__));
}

// Application version
define('APP_VERSION', '1.0.0');

// Directory paths (not web accessible)
define('LIB_PATH',      ROOT_PATH . '/lib');
define('SECURITE_PATH', ROOT_PATH . '/securite');
define('LOG_PATH',      ROOT_PATH . '/log');
define('WEBROOT_PATH',  ROOT_PATH . '/mon-appli');
define('I18N_PATH',     WEBROOT_PATH . '/i18n');

// Database
define('DB_PATH', SECURITE_PATH . '/database.sqlite');

// Logging
define('LOG_APP_FILE',   LOG_PATH . '/app.log');
define('LOG_DEBUG_FILE', LOG_PATH . '/debug.log');
define('LOG_TRACE_FILE', LOG_PATH . '/trace.log');

// Debug/Trace modes (can be overridden in settings table)
define('DEBUG_MODE', false);
define('TRACE_MODE', false);

// Session
define('SESSION_NAME',     'mon_appli_sess');
define('SESSION_LIFETIME', 3600); // seconds

// Rôles (système multi-rôles) — voir lib/Auth::requireRole / hasRole
// app_admin est implicite : il valide tous les checks de rôle.
define('ROLE_APP_ADMIN', 'app_admin');

// Oracle module
define('ORACLE_SUBGROUPS',     ['dev', 'homol', 'perf', 'pre-prod', 'prod', 'secours']);
define('ORACLE_DEFAULT_GROUP', 'Default');

// Authentication methods
define('AUTH_LOCAL', 'local');
define('AUTH_OAUTH', 'oauth');
define('AUTH_LDAP',  'ldap');

// Themes
define('THEME_OS',         'os');
define('THEME_LIGHT',      'light');
define('THEME_DARK',       'dark');
define('THEME_COLORBLIND', 'colorblind');
// Custom : couleurs/fontes éditables via Developer > Thème.
// Les valeurs vivent dans la table settings (theme_custom_*) et sont
// injectées via un <style> en header — pas via un fichier CSS dédié.
define('THEME_CUSTOM',     'custom');
define('THEMES', [THEME_OS, THEME_LIGHT, THEME_DARK, THEME_COLORBLIND, THEME_CUSTOM]);

// Languages supported
define('LANGUAGES', ['fr', 'en', 'pl', 'it', 'es', 'ro', 'de']);
define('DEFAULT_LANGUAGE', 'en');
define('DEFAULT_THEME', THEME_LIGHT);
