<?php
// ── Application Configuration ──────────────────────────────────────────────
define('APP_NAME',    'NT Study Guide');
define('APP_VERSION', '1.0.0');
define('BASE_PATH',   dirname(__DIR__, 2));
define('DATA_PATH',   BASE_PATH . '/data');
define('DB_PATH',     DATA_PATH . '/nt_study.db');

// Session
define('SESSION_NAME',    'nt_study_session');
define('SESSION_LIFETIME', 86400 * 7); // 7 days

// Security
define('HASH_ALGO', PASSWORD_BCRYPT);
define('HASH_COST', 12);

// Pagination
define('VERSES_PER_PAGE', 50);

// Start session
if (session_status() === PHP_SESSION_NONE) {
    session_name(SESSION_NAME);
    session_set_cookie_params([
        'lifetime' => SESSION_LIFETIME,
        'path'     => '/',
        'secure'   => false,
        'httponly' => true,
        'samesite' => 'Lax',
    ]);
    session_start();
}

// Error reporting (disable in production)
error_reporting(E_ALL);
ini_set('display_errors', '0');
ini_set('log_errors', '1');