This study addresses the lack of region-specific tools for academic counseling in Morocco by proposing a machine learning framework to predict student performance across secondary education pathways. Using academic records of students from the Greater Casablanca region, we evaluate four models – Random Forest, Support Vector Machine (SVM), Decision Tree, and Linear Regression – following a methodology that integrates data preprocessing, feature selection, and synthetic data enrichment to address class imbalance. The Random Forest algorithm achieved an accuracy rate of 75.20%, significantly outperforming the other models. By linking predictive outcomes to actionable academic guidance, the proposed framework enables educators to recommend pathways tailored to individual student strengths, thus addressing a critical gap in Morocco's education system.