Spaces:
Running
Running
File size: 78,260 Bytes
d16c068 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 | <!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nexus Predictive Dashboard | Intelligence Artificielle</title>
<script src="https:=== CONFIGURATION ET DONNÉES ==========
const roleConfig = {
'DG': {
color: 'cyan',
icon: 'user-tie',
description: 'Vue stratégique multi-domaines avec analytics prédictifs',
workspace: [
{ name: 'DG', icon: 'user-tie', color: 'cyan' },
{ name: 'COMPTABILITE', icon: 'calculator', color: 'green' },
{ name: 'RH', icon: 'users', color: 'pink' },
{ name: 'CONSULTATION', icon: 'stethoscope', color: 'red' },
{ name: 'ANALYSE MEDICAL', icon: 'microscope', color: 'purple' },
{ name: 'PHARMACIE', icon: 'pills', color: 'blue' },
{ name: 'STATISTIQUE', icon: 'chart-bar', color: 'yellow' },
{ name: 'RAPPORT MENSUEL', icon: 'file-alt', color: 'indigo' }
]
},
'DAF': {
color: 'green',
icon: 'calculator',
description: 'Vue financière et budgétaire avec prévisions avancées',
workspace: [
{ name: 'COMPTABILITE ANALYTIQUE', icon: 'chart-pie', color: 'green' },
{ name: 'PAIE', icon: 'money-check', color: 'blue' },
{ name: 'GESTION DE STOCK', icon: 'boxes', color: 'orange' },
{ name: 'FISCALITE & CARRIERE', icon: 'balance-scale', color: 'purple' }
]
},
// ... autres configurations de rôle
};
const mockData = {
finance: {
revenue: [12000, 19000, 15000, 25000, 22000, 30000, 28000, 32000],
expenses: [8000, 12000, 9000, 14000, 11000, 13000, 15000, 18000],
cashFlow: 145000,
unpaidInvoices: 3,
budgetVariance: -2.5,
projections: [35000, 38000, 42000, 45000]
},
// ... autres données mock
};
const predictiveData = {
salesForecast: {
actual: [65, 59, 80, 81, 56, 55, 40, 45, 50, 55, 60, 65],
predicted: [null, null, null, null, null, null, null, null, 62, 68, 72, 78],
confidence: [5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7]
}
};
// ========== FONCTIONS PRÉDICTIVES AVANCÉES ==========
function initPredictiveCharts() {
// Graphique de prévisions de vente
const salesCtx = document.getElementById('salesForecastChart');
if (salesCtx) {
const chart = new Chart(salesCtx, {
type: 'line',
data: {
labels: ['Jan', 'Fév', 'Mar', 'Avr', 'Mai', 'Jun', 'Jul', 'Aoû', 'Sep', 'Oct', 'Nov', 'Déc'],
datasets: [
{
label: 'Ventes Réelles',
data: predictiveData.salesForecast.actual,
borderColor: '#00f3ff',
backgroundColor: 'rgba(0, 243, 255, 0.1)',
tension: 0.4,
fill: true
},
{
label: 'Prévisions IA',
data: predictiveData.salesForecast.predicted,
borderColor: '#ff6b35',
borderDash: [5, 5],
backgroundColor: 'rgba(255, 107, 53, 0.1)',
tension: 0.4,
fill: false
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'top',
labels: {
color: '#e0e0ff'
}
}
},
scales: {
y: {
beginAtZero: true,
grid: {
color: 'rgba(255, 255, 255, 0.1)'
},
ticks: {
color: '#e0e0ff'
}
},
x: {
grid: {
color: 'rgba(255, 255, 255, 0.1)'
},
ticks: {
color: '#e0e0ff'
}
}
}
}
});
}
}
function setupPredictiveIntegration() {
// Configuration des placeholders d'intégration
const csvImport = document.getElementById('csv-import-placeholder');
const variablesEditor = document.getElementById('variables-editor-placeholder');
=======
// ========== CONFIGURATION ET DONNÉES ==========
const roleConfig = {
'DG': {
color: 'cyan',
icon: 'user-tie',
description: 'Vue stratégique multi-domaines avec analytics prédictifs',
workspace: [
{ name: 'DG', icon: 'user-tie', color: 'cyan' },
{ name: 'COMPTABILITE', icon: 'calculator', color: 'green' },
{ name: 'RH', icon: 'users', color: 'pink' },
{ name: 'CONSULTATION', icon: 'stethoscope', color: 'red' },
{ name: 'ANALYSE MEDICAL', icon: 'microscope', color: 'purple' },
{ name: 'PHARMACIE', icon: 'pills', color: 'blue' },
{ name: 'STATISTIQUE', icon: 'chart-bar', color: 'yellow' },
{ name: 'RAPPORT MENSUEL', icon: 'file-alt', color: 'indigo' }
]
},
'DAF': {
color: 'green',
icon: 'calculator',
description: 'Vue financière et budgétaire avec prévisions avancées',
workspace: [
{ name: 'COMPTABILITE ANALYTIQUE', icon: 'chart-pie', color: 'green' },
{ name: 'PAIE', icon: 'money-check', color: 'blue' },
{ name: 'GESTION DE STOCK', icon: 'boxes', color: 'orange' },
{ name: 'FISCALITE & CARRIERE', icon: 'balance-scale', color: 'purple' }
]
},
'DRH': {
color: 'pink',
icon: 'users',
description: 'Gestion des ressources humaines avec analytics prédictifs',
workspace: [
{ name: 'RECRUTEMENT', icon: 'user-plus', color: 'green' },
{ name: 'FORMATION', icon: 'graduation-cap', color: 'blue' },
{ name: 'EVALUATION', icon: 'chart-line', color: 'purple' },
{ name: 'CLIMAT SOCIAL', icon: 'smile', color: 'yellow' }
]
},
'MEDECIN': {
color: 'red',
icon: 'stethoscope',
description: 'Suivi médical et analyses prédictives santé',
workspace: [
{ name: 'CONSULTATIONS', icon: 'user-md', color: 'cyan' },
{ name: 'PRESCRIPTIONS', icon: 'prescription-bottle', color: 'green' },
{ name: 'ANALYSES LABO', icon: 'flask', color: 'purple' },
{ name: 'STATISTIQUES SANTE', icon: 'chart-bar', color: 'red' }
]
},
'DIRECTEUR_ECOLE': {
color: 'purple',
icon: 'graduation-cap',
description: 'Direction éducative avec analytics prédictifs',
workspace: [
{ name: 'PEDAGOGIE', icon: 'chalkboard-teacher', color: 'blue' },
{ name: 'ADMISTRATION', icon: 'building', color: 'green' },
{ name: 'EVALUATION ELEVES', icon: 'chart-pie', color: 'yellow' },
{ name: 'RESSOURCES HUMAINES', icon: 'users', color: 'pink' }
]
}
};
const mockData = {
finance: {
revenue: [12000, 19000, 15000, 25000, 22000, 30000, 28000, 32000],
expenses: [8000, 12000, 9000, 14000, 11000, 13000, 15000, 18000],
cashFlow: 145000,
unpaidInvoices: 3,
budgetVariance: -2.5,
projections: [35000, 38000, 42000, 45000]
},
rh: {
employees: 142,
turnover: 8.5,
satisfaction: 78,
recruitment: 12,
projections: [145, 148, 152, 155]
},
medical: {
patients: 892,
avgStay: 4.2,
satisfaction: 92,
readmission: 5.8,
projections: [920, 945, 960, 980]
},
academic: {
students: 1250,
passRate: 87,
satisfaction: 84,
enrollment: 1280,
projections: [1280, 1320, 1350, 1380]
}
};
const predictiveData = {
salesForecast: {
actual: [65, 59, 80, 81, 56, 55, 40, 45, 50, 55, 60, 65],
predicted: [null, null, null, null, null, null, null, null, 62, 68, 72, 78],
confidence: [5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7]
}
};
const sectorNames = {
sante: "Santé",
education: "Éducation",
entreprise: "Entreprise",
ong: "ONG",
industrie: "Industrie",
multi: "Multi-secteurs"
};
// ========== FONCTIONS PRÉDICTIVES AVANCÉES ==========
function initPredictiveCharts() {
// Graphique de prévisions de vente
const salesCtx = document.getElementById('salesForecastChart');
if (salesCtx) {
// Détruire le graphique existant s'il y en a un
if (salesCtx.chart) {
salesCtx.chart.destroy();
}
const chart = new Chart(salesCtx, {
type: 'line',
data: {
labels: ['Jan', 'Fév', 'Mar', 'Avr', 'Mai', 'Jun', 'Jul', 'Aoû', 'Sep', 'Oct', 'Nov', 'Déc'],
datasets: [
{
label: 'Ventes Réelles',
data: predictiveData.salesForecast.actual,
borderColor: '#00f3ff',
backgroundColor: 'rgba(0, 243, 255, 0.1)',
tension: 0.4,
fill: true
},
{
label: 'Prévisions IA',
data: predictiveData.salesForecast.predicted,
borderColor: '#ff6b35',
borderDash: [5, 5],
backgroundColor: 'rgba(255, 107, 53, 0.1)',
tension: 0.4,
fill: false
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'top',
labels: {
color: '#e0e0ff'
}
}
},
scales: {
y: {
beginAtZero: true,
grid: {
color: 'rgba(255, 255, 255, 0.1)'
},
ticks: {
color: '#e0e0ff'
}
},
x: {
grid: {
color: 'rgba(255, 255, 255, 0.1)'
},
ticks: {
color: '#e0e0ff'
}
}
}
}
});
// Stocker la référence du graphique
salesCtx.chart = chart;
}
}
function setupPredictiveIntegration() {
// Configuration des placeholders d'intégration
const csvImport = document.getElementById('csv-import-placeholder');
const variablesEditor = document.getElementById('variables-editor-placeholder');
cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
<style>
:root {
--neon-blue: #00f3ff;
--neon-purple: #b967ff;
--neon-pink: #ff2a6d;
--neon-green: #05ffa1;
--deep-space: #0a0a1a;
--cosmic-purple: #1a1a2e;
--stellar-blue: #16213e;
--nebula-pink: #2d1b3d;
--predictive-orange: #ff6b35;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: linear-gradient(135deg, var(--deep-space) 0%, var(--cosmic-purple) 50%, var(--stellar-blue) 100%);
color: #e0e0ff;
font-family: 'Segoe UI', system-ui, sans-serif;
min-height: 100vh;
overflow-x: hidden;
position: relative;
}
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background:
radial-gradient(circle at 20% 80%, rgba(0, 243, 255, 0.15) 0%, transparent 50%),
radial-gradient(circle at 80% 20%, rgba(185, 103, 255, 0.15) 0%, transparent 50%),
radial-gradient(circle at 40% 40%, rgba(255, 42, 109, 0.1) 0%, transparent 50%);
z-index: -1;
}
/* Header élégant avec effet glassmorphism */
.cosmic-header {
background: rgba(10, 10, 26, 0.7);
backdrop-filter: blur(15px);
border-bottom: 1px solid rgba(0, 243, 255, 0.2);
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
transition: all 0.4s ease;
}
.cosmic-header.scrolled {
background: rgba(10, 10, 26, 0.9);
border-bottom: 1px solid rgba(0, 243, 255, 0.4);
}
/* Cartes avec effets néon */
.cosmic-card {
background: rgba(22, 33, 62, 0.6);
backdrop-filter: blur(10px);
border: 1px solid rgba(0, 243, 255, 0.1);
border-radius: 16px;
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.3),
inset 0 1px 0 rgba(255, 255, 255, 0.1);
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
position: relative;
overflow: hidden;
}
.predictive-card {
background: rgba(22, 33, 62, 0.8);
border: 1px solid rgba(255, 107, 53, 0.3);
backdrop-filter: blur(10px);
border-radius: 16px;
box-shadow:
0 8px 32px rgba(255, 107, 53, 0.2),
inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.cosmic-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(90deg,
transparent,
var(--neon-blue),
var(--neon-purple),
transparent);
opacity: 0;
transition: opacity 0.4s ease;
}
.cosmic-card:hover {
transform: translateY(-8px);
border-color: rgba(0, 243, 255, 0.4);
box-shadow:
0 15px 40px rgba(0, 243, 255, 0.2),
0 0 20px rgba(185, 103, 255, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.cosmic-card:hover::before {
opacity: 1;
animation: shimmer 2s infinite;
}
@keyframes shimmer {
0% { background-position: -200% 0; }
100% { background-position: 200% 0; }
}
/* Boutons avec effets néon */
.nexus-btn {
background: linear-gradient(135deg, rgba(0, 243, 255, 0.1) 0%, rgba(185, 103, 255, 0.1) 100%);
border: 1px solid rgba(0, 243, 255, 0.3);
color: #e0e0ff;
border-radius: 12px;
padding: 12px 24px;
font-weight: 600;
position: relative;
overflow: hidden;
transition: all 0.4s ease;
backdrop-filter: blur(5px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.predictive-btn {
background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(255, 42, 109, 0.2) 100%);
border: 1px solid rgba(255, 107, 53, 0.4);
}
.nexus-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg,
transparent,
rgba(0, 243, 255, 0.2),
rgba(185, 103, 255, 0.2),
transparent);
transition: left 0.6s ease;
}
.nexus-btn:hover {
background: linear-gradient(135deg, rgba(0, 243, 255, 0.2) 0%, rgba(185, 103, 255, 0.2) 100%);
border-color: var(--neon-blue);
box-shadow:
0 0 20px rgba(0, 243, 255, 0.4),
0 0 40px rgba(185, 103, 255, 0.2);
transform: translateY(-3px);
}
.predictive-btn:hover {
background: linear-gradient(135deg, rgba(255, 107, 53, 0.3) 0%, rgba(255, 42, 109, 0.3) 100%);
border-color: var(--predictive-orange);
box-shadow:
0 0 20px rgba(255, 107, 53, 0.4),
0 0 40px rgba(255, 42, 109, 0.2);
}
.nexus-btn:hover::before {
left: 100%;
}
.nexus-btn-primary {
background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
border: none;
color: #0a0a1a;
font-weight: 700;
}
.nexus-btn-primary:hover {
background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-blue) 100%);
box-shadow:
0 0 25px rgba(0, 243, 255, 0.6),
0 0 50px rgba(185, 103, 255, 0.4);
}
/* Effets de texte néon */
.neon-text {
color: #e0e0ff;
text-shadow:
0 0 5px rgba(224, 224, 255, 0.8),
0 0 10px rgba(0, 243, 255, 0.5),
0 0 20px rgba(0, 243, 255, 0.3);
}
.neon-text-accent {
color: var(--neon-blue);
text-shadow:
0 0 5px var(--neon-blue),
0 0 10px rgba(0, 243, 255, 0.5),
0 0 20px rgba(0, 243, 255, 0.3);
}
.predictive-text {
color: var(--predictive-orange);
text-shadow:
0 0 5px var(--predictive-orange),
0 0 10px rgba(255, 107, 53, 0.5),
0 0 20px rgba(255, 107, 53, 0.3);
}
/* Animation des étoiles */
.stars-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -2;
pointer-events: none;
}
.star {
position: absolute;
background-color: white;
border-radius: 50%;
animation: twinkle 8s infinite;
}
@keyframes twinkle {
0%, 100% { opacity: 0.2; transform: scale(1); }
50% { opacity: 1; transform: scale(1.2); }
}
/* Effet de particules */
.particles-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
pointer-events: none;
}
.particle {
position: absolute;
width: 2px;
height: 2px;
background: var(--neon-blue);
border-radius: 50%;
animation: float 20s infinite linear;
opacity: 0;
}
@keyframes float {
0% {
transform: translateY(100vh) translateX(0) rotate(0deg);
opacity: 0;
}
10% {
opacity: 0.7;
}
90% {
opacity: 0.7;
}
100% {
transform: translateY(-100px) translateX(100px) rotate(360deg);
opacity: 0;
}
}
/* Indicateurs de statut avec effets néon */
.status-indicator {
position: relative;
}
.status-indicator::after {
content: '';
position: absolute;
top: 12px;
right: 12px;
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--neon-green);
box-shadow: 0 0 10px var(--neon-green);
}
.status-indicator.warning::after {
background: var(--neon-pink);
box-shadow: 0 0 10px var(--neon-pink);
animation: pulse 2s infinite;
}
.status-indicator.critical::after {
background: var(--neon-pink);
box-shadow: 0 0 15px var(--neon-pink);
animation: pulse 1s infinite;
}
.status-indicator.predictive::after {
background: var(--predictive-orange);
box-shadow: 0 0 10px var(--predictive-orange);
animation: pulse 1.5s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
/* Animations d'entrée */
.fade-in {
animation: fadeIn 0.8s ease-out;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.slide-in-left {
animation: slideInLeft 0.8s ease-out;
}
@keyframes slideInLeft {
from {
opacity: 0;
transform: translateX(-30px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
/* Barres de progression futuristes */
.nexus-progress {
height: 8px;
background: rgba(255, 255, 255, 0.1);
border-radius: 4px;
overflow: hidden;
position: relative;
}
.nexus-progress-bar {
height: 100%;
background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
border-radius: 4px;
position: relative;
transition: width 0.8s ease;
}
.predictive-progress-bar {
background: linear-gradient(90deg, var(--predictive-orange), var(--neon-pink));
}
.nexus-progress-bar::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
animation: shimmer 2s infinite;
}
/* Section d'installation avec design amélioré */
.sector-card {
background: rgba(22, 33, 62, 0.6);
border: 1px solid rgba(0, 243, 255, 0.1);
border-radius: 16px;
padding: 24px;
transition: all 0.4s ease;
cursor: pointer;
position: relative;
overflow: hidden;
}
.sector-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
transform: scaleX(0);
transition: transform 0.4s ease;
}
.sector-card:hover {
transform: translateY(-8px);
border-color: rgba(0, 243, 255, 0.4);
box-shadow:
0 15px 30px rgba(0, 243, 255, 0.2),
0 0 20px rgba(185, 103, 255, 0.1);
}
.sector-card:hover::before {
transform: scaleX(1);
}
/* Personnalisation par rôle avec effets améliorés */
.role-DG .role-header {
background: linear-gradient(135deg, rgba(0, 243, 255, 0.2), rgba(185, 103, 255, 0.2));
border: 1px solid rgba(0, 243, 255, 0.3);
}
.role-DAF .role-header {
background: linear-gradient(135deg, rgba(5, 255, 161, 0.2), rgba(0, 243, 255, 0.2));
border: 1px solid rgba(5, 255, 161, 0.3);
}
.role-DRH .role-header {
background: linear-gradient(135deg, rgba(255, 42, 109, 0.2), rgba(185, 103, 255, 0.2));
border: 1px solid rgba(255, 42, 109, 0.3);
}
.role-MEDECIN .role-header {
background: linear-gradient(135deg, rgba(255, 42, 109, 0.2), rgba(0, 243, 255, 0.2));
border: 1px solid rgba(255, 42, 109, 0.3);
}
.role-DIRECTEUR_ECOLE .role-header {
background: linear-gradient(135deg, rgba(185, 103, 255, 0.2), rgba(255, 42, 109, 0.2));
border: 1px solid rgba(185, 103, 255, 0.3);
}
.role-header {
transition: all 0.4s ease;
border-radius: 16px;
padding: 24px;
margin-bottom: 24px;
color: #e0e0ff;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
backdrop-filter: blur(10px);
}
/* Widgets avec design amélioré */
.nexus-widget {
background: rgba(22, 33, 62, 0.5);
border: 1px solid rgba(0, 243, 255, 0.1);
border-radius: 12px;
padding: 20px;
transition: all 0.3s ease;
backdrop-filter: blur(5px);
}
.predictive-widget {
border: 1px solid rgba(255, 107, 53, 0.3);
background: rgba(22, 33, 62, 0.7);
}
.nexus-widget:hover {
border-color: rgba(0, 243, 255, 0.4);
box-shadow: 0 8px 25px rgba(0, 243, 255, 0.15);
transform: translateY(-5px);
}
.predictive-widget:hover {
border-color: rgba(255, 107, 53, 0.5);
box-shadow: 0 8px 25px rgba(255, 107, 53, 0.2);
}
/* Boutons CTA */
.cta-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 16px;
}
.cta-btn {
background: rgba(22, 33, 62, 0.7);
border: 1px solid rgba(0, 243, 255, 0.2);
border-radius: 12px;
padding: 16px;
text-align: center;
transition: all 0.3s ease;
cursor: pointer;
position: relative;
overflow: hidden;
}
.cta-btn:hover {
border-color: var(--neon-blue);
box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
transform: translateY(-5px);
}
.cta-btn i {
font-size: 24px;
margin-bottom: 8px;
display: block;
}
/* Modal pour les espaces de travail */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(5px);
display: flex;
align-items: center;
justify-content: center;
z-index: 2000;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
}
.modal-overlay.active {
opacity: 1;
visibility: visible;
}
.modal-content {
background: rgba(22, 33, 62, 0.95);
border: 1px solid rgba(0, 243, 255, 0.3);
border-radius: 16px;
padding: 24px;
width: 90%;
max-width: 800px;
max-height: 90vh;
overflow-y: auto;
transform: scale(0.9);
transition: transform 0.3s ease;
}
.predictive-modal {
border: 1px solid rgba(255, 107, 53, 0.3);
max-width: 1000px;
}
.modal-overlay.active .modal-content {
transform: scale(1);
}
/* Zones de placeholders pour l'intégration predictive */
.integration-placeholder {
height: 180px;
border-radius: 8px;
border: 1px dashed rgba(255, 107, 53, 0.3);
display: flex;
align-items: center;
justify-content: center;
color: var(--muted);
background: rgba(255, 107, 53, 0.05);
transition: all 0.3s ease;
cursor: pointer;
}
.integration-placeholder:hover {
border-color: rgba(255, 107, 53, 0.6);
background: rgba(255, 107, 53, 0.1);
}
/* Code blocks pour la documentation intégrée */
.code-block {
background: rgba(2, 16, 40, 0.8);
padding: 12px;
border-radius: 8px;
color: #9bdcf0;
overflow: auto;
font-family: monospace;
font-size: 13px;
border: 1px solid rgba(0, 243, 255, 0.1);
}
/* Responsive design */
@media (max-width: 768px) {
.cosmic-header {
padding: 15px 0;
}
.cosmic-card {
margin-bottom: 20px;
}
.nexus-btn {
padding: 10px 20px;
font-size: 14px;
}
.cta-grid {
grid-template-columns: 1fr;
}
.predictive-modal {
width: 95%;
padding: 16px;
}
}
/* Styles pour les graphiques prédictifs */
.chart-container {
position: relative;
height: 300px;
width: 100%;
}
.prediction-line {
stroke: var(--predictive-orange);
stroke-width: 3;
fill: none;
stroke-dasharray: 5,5;
}
.confidence-band {
fill: rgba(255, 107, 53, 0.1);
stroke: none;
}
/* Fix pour le select */
.nexus-select {
background: rgba(22, 33, 62, 0.7);
border: 1px solid rgba(0, 243, 255, 0.3);
color: #e0e0ff;
border-radius: 8px;
padding: 8px 12px;
font-weight: 500;
backdrop-filter: blur(5px);
}
.nexus-select:focus {
outline: none;
border-color: var(--neon-blue);
box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}
/* Amélioration des cartes secteur */
.sector-card {
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.sector-card:hover {
transform: translateY(-5px) scale(1.02);
}
/* Amélioration des boutons CTA */
.cta-btn {
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.cta-btn:hover {
transform: translateY(-3px) scale(1.03);
}
</style>
</head>
<body class="min-h-screen">
<!-- Étoiles en arrière-plan -->
<div class="stars-container" id="starsContainer"></div>
<!-- Particules en arrière-plan -->
<div class="particles-container" id="particlesContainer"></div>
<!-- Header élégant -->
<header class="cosmic-header">
<div class="max-w-7xl mx-auto px-4 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-4">
<div class="flex items-center space-x-3">
<div class="w-10 h-10 rounded-full bg-gradient-to-r from-blue-400 to-purple-500 flex items-center justify-center">
<i class="fas fa-brain text-white"></i>
</div>
<div>
<h1 class="text-xl font-bold neon-text">Nexus Predictive Dashboard</h1>
<p class="text-xs text-cyan-300" id="roleDescription">Intelligence Artificielle & Analytics</p>
</div>
</div>
</div>
<div class="flex items-center gap-4">
<button id="predictiveModalBtn" class="nexus-btn predictive-btn">
<i class="fas fa-chart-line mr-2"></i>Analytics
</button>
<button id="themeToggle" class="nexus-btn w-10 h-10 flex items-center justify-center p-0">
<i class="fas fa-sun"></i>
</button>
<button id="exportPdfBtn" class="nexus-btn">
<i class="fas fa-file-pdf mr-2"></i>Export PDF
</button>
<button id="dashboardBtn" class="nexus-btn nexus-btn-primary">
<i class="fas fa-tachometer-alt mr-2"></i>Tableau de bord
</button>
</div>
</div>
</div>
</header>
<!-- Modal pour les analytics prédictifs -->
<div id="predictiveModal" class="modal-overlay">
<div class="modal-content predictive-modal">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold predictive-text">Centre d'Analytics Prédictif</h2>
<button id="closePredictiveModal" class="nexus-btn w-10 h-10 flex items-center justify-center p-0">
<i class="fas fa-times"></i>
</button>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
<div class="integration-placeholder" id="csv-import-placeholder">
<div class="text-center">
<i class="fas fa-file-csv text-3xl mb-3 predictive-text"></i>
<div class="font-bold predictive-text">Import CSV</div>
<div class="text-xs text-gray-400 mt-1">Zone d'import de données</div>
</div>
</div>
<div class="integration-placeholder" id="variables-editor-placeholder">
<div class="text-center">
<i class="fas fa-sliders-h text-3xl mb-3 predictive-text"></i>
<div class="font-bold predictive-text">Éditeur de Variables</div>
<div class="text-xs text-gray-400 mt-1">Gestion des variables prédictives</div>
</div>
</div>
</div>
<div class="cosmic-card p-6">
<h3 class="text-lg font-bold predictive-text mb-4">API & Intégration</h3>
<div class="code-block">
<code>
// Endpoints API Prédictifs<br>
GET /api/produits → liste produits JSON<br>
GET /api/ventes?start=&end=&sku= → séries temporelles<br>
POST /api/variables → créer variable (payload JSON)<br>
GET /api/previsions?sku=&horizon= → prévisions par date<br>
POST /api/import/csv → importer fichier CSV
</code>
</div>
</div>
</div>
</div>
<!-- Modal pour les espaces de travail -->
<div id="workspaceModal" class="modal-overlay">
<div class="modal-content">
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-bold neon-text-accent" id="modalTitle">Espace de Travail</h2>
<button id="closeModal" class="nexus-btn w-10 h-10 flex items-center justify-center p-0">
<i class="fas fa-times"></i>
</button>
</div>
<div id="modalContent" class="cta-grid">
<!-- Contenu dynamique pour les espaces de travail -->
</div>
</div>
</div>
<!-- Contenu principal -->
<div id="app" class="min-h-screen pt-24 pb-12 px-4">
<div class="max-w-7xl mx-auto">
<!-- Section d'installation avec design élégant -->
<section id="installSection" class="cosmic-card p-8 fade-in">
<h2 class="text-2xl font-bold mb-2 neon-text-accent flex items-center">
<i class="fas fa-cogs mr-3"></i>Configuration Initiale du Système
</h2>
<p class="text-gray-300 mb-8">Sélectionnez le secteur d'activité principal pour activer automatiquement les modules pertinents.</p>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<div data-sector="sante" class="sector-card group">
<div class="flex items-start mb-4">
<div class="w-12 h-12 rounded-lg bg-gradient-to-r from-cyan-500 to-blue-500 flex items-center justify-center mr-4">
<i class="fas fa-hospital text-white text-lg"></i>
</div>
<div>
<h3 class="font-bold text-lg text-white group-hover:text-cyan-300 transition-colors">Santé</h3>
<p class="text-sm text-gray-400">Hôpital, Clinique</p>
</div>
</div>
<p class="text-gray-300 text-sm">Active les modules adaptés pour les établissements de santé.</p>
</div>
<div data-sector="education" class="sector-card group">
<div class="flex items-start mb-4">
<div class="w-12 h-12 rounded-lg bg-gradient-to-r from-purple-500 to-pink-500 flex items-center justify-center mr-4">
<i class="fas fa-graduation-cap text-white text-lg"></i>
</div>
<div>
<h3 class="font-bold text-lg text-white group-hover:text-purple-300 transition-colors">Éducation</h3>
<p class="text-sm text-gray-400">École, Université</p>
</div>
</div>
<p class="text-gray-300 text-sm">Active les modules adaptés pour les établissements éducatifs.</p>
</div>
<div data-sector="entreprise" class="sector-card group">
<div class="flex items-start mb-4">
<div class="w-12 h-12 rounded-lg bg-gradient-to-r from-green-500 to-teal-500 flex items-center justify-center mr-4">
<i class="fas fa-building text-white text-lg"></i>
</div>
<div>
<h3 class="font-bold text-lg text-white group-hover:text-green-300 transition-colors">Entreprise</h3>
<p class="text-sm text-gray-400">Finance + RH</p>
</div>
</div>
<p class="text-gray-300 text-sm">Active les modules adaptés pour les entreprises.</p>
</div>
<div data-sector="ong" class="sector-card group">
<div class="flex items-start mb-4">
<div class="w-12 h-12 rounded-lg bg-gradient-to-r from-yellow-500 to-orange-500 flex items-center justify-center mr-4">
<i class="fas fa-hands-helping text-white text-lg"></i>
</div>
<div>
<h3 class="font-bold text-lg text-white group-hover:text-yellow-300 transition-colors">ONG</h3>
<p class="text-sm text-gray-400">Associations</p>
</div>
</div>
<p class="text-gray-300 text-sm">Active les modules adaptés pour les ONG et associations.</p>
</div>
<div data-sector="industrie" class="sector-card group">
<div class="flex items-start mb-4">
<div class="w-12 h-12 rounded-lg bg-gradient-to-r from-red-500 to-pink-500 flex items-center justify-center mr-4">
<i class="fas fa-industry text-white text-lg"></i>
</div>
<div>
<h3 class="font-bold text-lg text-white group-hover:text-red-300 transition-colors">Industrie</h3>
<p class="text-sm text-gray-400">Usine, Production</p>
</div>
</div>
<p class="text-gray-300 text-sm">Active les modules adaptés pour l'industrie.</p>
</div>
<div data-sector="multi" class="sector-card group">
<div class="flex items-start mb-4">
<div class="w-12 h-12 rounded-lg bg-gradient-to-r from-indigo-500 to-blue-500 flex items-center justify-center mr-4">
<i class="fas fa-globe text-white text-lg"></i>
</div>
<div>
<h3 class="font-bold text-lg text-white group-hover:text-indigo-300 transition-colors">Multi-secteurs</h3>
<p class="text-sm text-gray-400">Organisations diversifiées</p>
</div>
</div>
<p class="text-gray-300 text-sm">Active tous les modules pour les organisations multi-secteurs.</p>
</div>
</div>
<div class="mt-8 text-sm text-gray-400 flex items-center">
<i class="fas fa-info-circle mr-2 text-cyan-400"></i>
Vous pourrez modifier ce choix ultérieurement dans les paramètres du système.
</div>
</section>
<!-- Dashboard principal (caché initialement) -->
<main id="dashboardSection" class="mt-8 hidden">
<!-- Indicateur de secteur sélectionné -->
<div class="cosmic-card p-6 mb-8 flex items-center fade-in">
<i class="fas fa-info-circle text-cyan-400 mr-3 text-xl"></i>
<span class="text-gray-300">Secteur actif: <strong id="currentSector" class="text-cyan-300"></strong></span>
<button id="changeSectorBtn" class="ml-4 nexus-btn text-sm">
<i class="fas fa-edit mr-1"></i> Modifier
</button>
<div class="ml-auto flex items-center">
<span class="text-gray-300 mr-3">Rôle:</span>
<select id="roleSelect" class="nexus-select">
<option value="Choisir" selected>Choisir un Rôle</option>
<option value="DG">Directeur Général</option>
<option value="DAF">Directeur Financier</option>
<option value="DRH">Directeur RH</option>
<option value="MEDECIN">Médecin Chef</option>
<option value="DIRECTEUR_ECOLE">Directeur d'École</option>
<option value="CAISSIERE">Caissière</option>
<option value="BIOLOGISTE">Biologiste</option>
<option value="MAJOR">Major</option>
<option value="PHARMACIEN">Pharmacien</option>
<option value="AIDE_SOIGNANTE">Aide-Soignante</option>
<option value="ASSISTANTE_SOCIALE">Assistante Sociale</option>
<option value="PGP">PGP</option>
<option value="MEDECIN_CONSEIL">Médecin Conseil</option>
</select>
</div>
</div>
<!-- Vue Personnalisée par Rôle -->
<section id="roleSpecificDashboard" class="cosmic-card p-8 mb-8 fade-in">
<h3 class="text-xl font-bold mb-6 neon-text flex items-center">
<i class="fas fa-user-tie mr-3"></i>Tableau de Bord -
<span id="currentRoleLabel" class="capitalize ml-2 text-cyan-300">Sélectionnez un rôle</span>
</h3>
<!-- Vue par défaut (quand aucun rôle n'est sélectionné) -->
<div id="defaultRoleView" class="text-center py-12">
<i class="fas fa-user-circle text-5xl text-gray-500 mb-4"></i>
<h4 class="text-xl font-bold text-gray-400 mb-2">Aucun rôle sélectionné</h4>
<p class="text-gray-500">Veuillez sélectionner un rôle dans le menu déroulant ci-dessus pour accéder à votre tableau de bord personnalisé.</p>
</div>
<!-- Vue DG -->
<div data-role="DG" class="hidden">
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="nexus-widget status-indicator predictive">
<h4 class="font-bold text-lg text-white mb-3 flex items-center">
<i class="fas fa-chart-line mr-2 text-cyan-400"></i>Vue Stratégique Globale
</h4>
<p class="text-gray-400 mb-4">KPI multi-départements • Performance globale</p>
<div class="space-y-3">
<div class="flex items-center justify-between">
<div class="flex items-center">
<i class="fas fa-chart-line text-green-400 mr-2"></i>
<span>Croissance</span>
</div>
<span class="font-bold text-green-400">+12%</span>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<i class="fas fa-bullseye text-cyan-400 mr-2"></i>
<span>Objectifs atteints</span>
</div>
<span class="font-bold text-cyan-400">78%</span>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<i class="fas fa-money-bill-wave text-purple-400 mr-2"></i>
<span>Trésorerie</span>
</div>
<span class="font-bold text-purple-400">145K€</span>
</div>
</div>
</div>
<div class="predictive-widget">
<h4 class="font-bold text-lg text-white mb-3 flex items-center">
<i class="fas fa-robot mr-2 text-purple-400"></i>Prévisions IA Direction
</h4>
<p class="text-gray-400 mb-4">Projections stratégiques 12 mois</p>
<div class="mb-4">
<div class="flex justify-between text-sm mb-1">
<span>Croissance prévisionnelle</span>
<span>+18%</span>
</div>
<div class="nexus-progress">
<div class="nexus-progress-bar predictive-progress-bar" style="width: 75%"></div>
</div>
</div>
<button class="nexus-btn predictive-btn w-full">
<i class="fas fa-chart-bar mr-2"></i>Consulter scénarios
</button>
</div>
</div>
</div>
<!-- Autres vues rôle seraient implémentées de manière similaire -->
<div data-role="DAF" class="hidden">
<div class="predictive-widget">
<h4 class="font-bold text-lg text-white mb-3 flex items-center">
<i class="fas fa-calculator mr-2 text-green-400"></i>Vue Financière Prédictive
</h4>
<p class="text-gray-400 mb-4">Analyse prédictive des flux financiers</p>
<div class="space-y-3">
<div class="flex items-center justify-between">
<div class="flex items-center">
<i class="fas fa-chart-line text-green-400 mr-2"></i>
<span>Revenus mensuels</span>
</div>
<span class="font-bold text-green-400">245K€</span>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<i class="fas fa-money-bill-wave text-red-400 mr-2"></i>
<span>Dépenses</span>
</div>
<span class="font-bold text-red-400">-189K€</span>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<i class="fas fa-piggy-bank text-cyan-400 mr-2"></i>
<span>Bénéfice net</span>
</div>
<span class="font-bold text-cyan-400">56K€</span>
</div>
</div>
</div>
</div>
<!-- Les autres vues rôle suivent le même pattern -->
</section>
<!-- Section analytics prédictifs intégrée -->
<section class="cosmic-card p-8 mb-8 fade-in">
<h3 class="text-xl font-bold mb-6 predictive-text flex items-center">
<i class="fas fa-brain mr-3"></i>Analytics Prédictifs
</h3>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<div class="predictive-widget">
<h4 class="font-bold text-lg text-white mb-4 flex items-center">
<i class="fas fa-chart-bar mr-2 predictive-text"></i>Prévisions de Vente
</h4>
<div class="chart-container" id="salesForecastChart">
<!-- Graphique sera généré par JavaScript -->
</div>
<div class="mt-4 flex justify-between items-center">
<span class="text-sm text-gray-400">Précision: 92%</span>
<button class="nexus-btn predictive-btn text-sm">
<i class="fas fa-sync-alt mr-1"></i>Actualiser
</button>
</div>
</div>
<div class="predictive-widget">
<h4 class="font-bold text-lg text-white mb-4 flex items-center">
<i class="fas fa-boxes mr-2 predictive-text"></i>Optimisation des Stocks
</h4>
<div class="space-y-4">
<div>
<div class="flex justify-between text-sm mb-1">
<span>Niveau stock optimal</span>
<span>78%</span>
</div>
<div class="nexus-progress">
<div class="nexus-progress-bar" style="width: 78%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>Réduction gaspillage</span>
<span>-23%</span>
</div>
<div class="nexus-progress">
<div class="nexus-progress-bar predictive-progress-bar" style="width: 65%"></div>
</div>
</div>
<div class="text-sm text-gray-400">
<i class="fas fa-lightbulb predictive-text mr-1"></i>
Recommandation: Augmenter stock produits A de 15%
</div>
</div>
</div>
</div>
</section>
<!-- Section widgets et actions rapides -->
<div class="grid grid-cols-1 lg:grid-cols-4 gap-8 mb-8">
<div class="col-span-1 lg:col-span-3 cosmic-card p-8 fade-in">
<h3 class="text-xl font-bold mb-6 neon-text flex items-center">
<i class="fas fa-home mr-3"></i>Vue d'Ensemble
</h3>
<p class="text-gray-400 mb-6">Résumé des performances et indicateurs clés</p>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-8">
<div id="financeWidget" class="nexus-widget hidden">
<!-- Rempli dynamiquement par JavaScript -->
</div>
<div id="rhWidget" class="nexus-widget hidden">
<!-- Rempli dynamiquement par JavaScript -->
</div>
<div id="medicalWidget" class="nexus-widget hidden">
<!-- Rempli dynamiquement par JavaScript -->
</div>
<div id="academicWidget" class="nexus-widget hidden">
<!-- Rempli dynamiquement par JavaScript -->
</div>
<div id="predictiveWidget" class="predictive-widget">
<div class="flex items-center justify-between mb-3">
<div class="flex items-center">
<div class="w-10 h-10 rounded-lg bg-gradient-to-r from-orange-500 to-red-500 flex items-center justify-center mr-3">
<i class="fas fa-brain text-white"></i>
</div>
<div>
<h4 class="font-bold text-white">IA Prédictive</h4>
<p class="text-xs text-gray-400">Active</p>
</div>
</div>
<span class="text-xs text-green-400 font-bold">
+92%
</span>
</div>
<div class="text-2xl font-bold predictive-text mb-2">24/7</div>
<div class="text-xs text-gray-400 flex items-center">
<i class="fas fa-check-circle predictive-text mr-1"></i>
Modèles entraînés
</div>
</div>
</div>
<div class="cosmic-card p-6">
<div class="font-bold text-lg text-white mb-4 flex items-center">
<i class="fas fa-bell mr-3 text-yellow-400"></i>Alertes Intelligentes
</div>
<ul class="space-y-3" id="smartAlerts">
<!-- Rempli dynamiquement par JavaScript -->
</ul>
</div>
</div>
<div class="cosmic-card p-8 fade-in">
<h4 class="text-lg font-bold mb-6 neon-text flex items-center">
<i class="fas fa-bolt mr-3"></i>Actions Rapides
</h4>
<div class="space-y-4">
<button id="workspaceBtn" class="nexus-btn nexus-btn-primary w-full flex items-center justify-center">
<i class="fas fa-door-open mr-2"></i>Espace de Travail
</button>
<button class="nexus-btn w-full flex items-center justify-center">
<i class="fas fa-file-pdf mr-2"></i>Export PDF
</button>
<button class="nexus-btn predictive-btn w-full flex items-center justify-center">
<i class="fas fa-robot mr-2"></i>Prévision IA
</button>
<button class="nexus-btn w-full flex items-center justify-center">
<i class="fas fa-expand mr-2"></i>Mode Présentation
</button>
<button class="nexus-btn nexus-btn-primary w-full flex items-center justify-center">
<i class="fas fa-video mr-2"></i>Réunion Teams
</button>
</div>
</div>
</div>
<!-- Modules détaillés -->
<section class="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-8">
<!-- Analytics toujours visible -->
<div class="cosmic-card p-8 fade-in">
<h3 class="text-xl font-bold mb-6 neon-text flex items-center">
<i class="fas fa-chart-pie mr-3"></i>Analytics & IA
</h3>
<p class="text-gray-400 mb-6">Prévisions globales • Scénarios • Détection d'anomalies</p>
<div class="cosmic-card p-6">
<div class="flex items-center mb-4">
<i class="fas fa-robot text-cyan-400 mr-3 text-xl"></i>
<span class="font-bold text-white">Assistant IA conversationnel</span>
</div>
<div class="bg-gray-800 p-4 rounded-lg border border-gray-700 text-sm mb-4">
<p class="text-gray-300">"Bonjour! Je détecte une opportunité d'optimisation des coûts RH de 15%."</p>
</div>
<div class="flex gap-2">
<input type="text" placeholder="Posez votre question..." class="flex-1 p-3 bg-gray-800 border border-gray-700 rounded-lg text-white text-sm focus:outline-none focus:border-cyan-500">
<button class="nexus-btn nexus-btn-primary p-3">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
</div>
<!-- Module d'intégration API -->
<div class="predictive-card p-8 fade-in">
<h3 class="text-xl font-bold mb-6 predictive-text flex items-center">
<i class="fas fa-code mr-3"></i>Intégration API
</h3>
<p class="text-gray-400 mb-6">Connectez vos données et systèmes</p>
<div class="code-block mb-4">
<code>// Configuration API de base<br>const API_BASE = '/api';<br>const ENDPOINTS = {<br> PRODUITS: '/produits',<br> VENTES: '/ventes',<br> PREVISIONS: '/previsions'<br>};</code>
</div>
<button class="nexus-btn predictive-btn w-full">
<i class="fas fa-plug mr-2"></i>Configurer l'API
</button>
</div>
<!-- Documentation intégrée -->
<div class="cosmic-card p-8 fade-in">
<h3 class="text-xl font-bold mb-6 neon-text flex items-center">
<i class="fas fa-book mr-3"></i>Documentation
</h3>
<p class="text-gray-400 mb-6">Guides et ressources</p>
<div class="space-y-3">
<div class="flex items-center p-3 bg-gray-800 rounded-lg cursor-pointer hover:bg-gray-700 transition-colors">
<i class="fas fa-database predictive-text mr-3"></i>
<span>Schéma de données</span>
</div>
<div class="flex items-center p-3 bg-gray-800 rounded-lg cursor-pointer hover:bg-gray-700 transition-colors">
<i class="fas fa-cube predictive-text mr-3"></i>
<span>Architecture ML</span>
</div>
<div class="flex items-center p-3 bg-gray-800 rounded-lg cursor-pointer hover:bg-gray-700 transition-colors">
<i class="fas fa-shield-alt predictive-text mr-3"></i>
<span>Sécurité & API</span>
</div>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer class="mt-12 text-center text-gray-500 text-sm">
<p>Nexus Predictive Dashboard v5.0 • Intelligence Artificielle • Système Prêt pour la Production</p>
</footer>
</div>
</div>
<script>
// ========== CONFIGURATION ET DONNÉES ==========
const roleConfig = {
'DG': {
color: 'cyan',
icon: 'user-tie',
description: 'Vue stratégique multi-domaines avec analytics prédictifs',
workspace: [
{ name: 'DG', icon: 'user-tie', color: 'cyan' },
{ name: 'COMPTABILITE', icon: 'calculator', color: 'green' },
{ name: 'RH', icon: 'users', color: 'pink' },
{ name: 'CONSULTATION', icon: 'stethoscope', color: 'red' },
{ name: 'ANALYSE MEDICAL', icon: 'microscope', color: 'purple' },
{ name: 'PHARMACIE', icon: 'pills', color: 'blue' },
{ name: 'STATISTIQUE', icon: 'chart-bar', color: 'yellow' },
{ name: 'RAPPORT MENSUEL', icon: 'file-alt', color: 'indigo' }
]
},
'DAF': {
color: 'green',
icon: 'calculator',
description: 'Vue financière et budgétaire avec prévisions avancées',
workspace: [
{ name: 'COMPTABILITE ANALYTIQUE', icon: 'chart-pie', color: 'green' },
{ name: 'PAIE', icon: 'money-check', color: 'blue' },
{ name: 'GESTION DE STOCK', icon: 'boxes', color: 'orange' },
{ name: 'FISCALITE & CARRIERE', icon: 'balance-scale', color: 'purple' }
]
},
// ... autres configurations de rôle
};
const mockData = {
finance: {
revenue: [12000, 19000, 15000, 25000, 22000, 30000, 28000, 32000],
expenses: [8000, 12000, 9000, 14000, 11000, 13000, 15000, 18000],
cashFlow: 145000,
unpaidInvoices: 3,
budgetVariance: -2.5,
projections: [35000, 38000, 42000, 45000]
},
// ... autres données mock
};
const predictiveData = {
salesForecast: {
actual: [65, 59, 80, 81, 56, 55, 40, 45, 50, 55, 60, 65],
predicted: [null, null, null, null, null, null, null, null, 62, 68, 72, 78],
confidence: [5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7]
}
};
// ========== FONCTIONS PRÉDICTIVES AVANCÉES ==========
function initPredictiveCharts() {
// Graphique de prévisions de vente
const salesCtx = document.getElementById('salesForecastChart');
if (salesCtx) {
const chart = new Chart(salesCtx, {
type: 'line',
data: {
labels: ['Jan', 'Fév', 'Mar', 'Avr', 'Mai', 'Jun', 'Jul', 'Aoû', 'Sep', 'Oct', 'Nov', 'Déc'],
datasets: [
{
label: 'Ventes Réelles',
data: predictiveData.salesForecast.actual,
borderColor: '#00f3ff',
backgroundColor: 'rgba(0, 243, 255, 0.1)',
tension: 0.4,
fill: true
},
{
label: 'Prévisions IA',
data: predictiveData.salesForecast.predicted,
borderColor: '#ff6b35',
borderDash: [5, 5],
backgroundColor: 'rgba(255, 107, 53, 0.1)',
tension: 0.4,
fill: false
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'top',
labels: {
color: '#e0e0ff'
}
}
},
scales: {
y: {
beginAtZero: true,
grid: {
color: 'rgba(255, 255, 255, 0.1)'
},
ticks: {
color: '#e0e0ff'
}
},
x: {
grid: {
color: 'rgba(255, 255, 255, 0.1)'
},
ticks: {
color: '#e0e0ff'
}
}
}
}
});
}
}
function setupPredictiveIntegration() {
// Configuration des placeholders d'intégration
const csvImport = document.getElementById('csv-import-placeholder');
const variablesEditor = document.getElementById('variables-editor-placeholder');
if (csvImport) {
csvImport.addEventListener('click', function() {
alert('Intégrez votre système d\'import CSV ici. Connectez-vous à /api/import/csv');
});
}
if (variablesEditor) {
variablesEditor.addEventListener('click', function() {
alert('Éditeur de variables prédictives. Connectez-vous à /api/variables');
});=== FONCTIONS EXISTANTES AVEC EXTENSIONS PRÉDICTIVES ==========
// Les fonctions existantes du Nexus Dashboard sont conservées et étendues
function applySectorSelection(selected) {
currentSector = selected;
currentSectorElement.textContent = sectorNames[selected];
=======
}
}
// ========== FONCTIONS EXISTANTES AVEC EXTENSIONS PRÉDICTIVES ==========
// Les fonctions existantes du Nexus Dashboard sont conservées et étendues
function applySectorSelection(selected) {
currentSector = selected;
currentSectorElement.textContent = sectorNames[selected];
========== FONCTIONS EXISTANTES AVEC EXTENSIONS PRÉDICTIVES ==========
// Les fonctions existantes du Nexus Dashboard sont conservées et étendues
function applySectorSelection(selected) {
currentSector = selected;
currentSectorElement.textContent = sectorNames[selected];
const modules = {
finance: false,
rh: false,
medical: false,
academic: false,
analytics: true,
predictive: true // Module prédictif toujours activé
};
// Logique de sélection des modules par secteur
switch (selected) {
case "sante":
modules.medical = true;
modules.rh = true;
modules.finance = true;
break;
// ... autres cas
}
enabledModules = modules;
updateModuleDisplay();
showDashboard();
// Initialiser les graphiques prédictifs
setTimeout(initPredictiveCharts, 500);
}
// ========== ÉVÉNEMENTS PRÉDICTIFS ==========
document.getElementById('predictiveModalBtn').addEventListener('click', function() {
document.getElementById('predictiveModal').classList.add('active');
});
document.getElementById('closePredictiveModal').addEventListener('click', function() {
document.getElementById('predictiveModal').classList.remove('active');
});
// ========== INITIALISATION AVANCÉE ==========
document.addEventListener('DOMContentLoaded', function() {
// Initialisation existante
createStars();
createParticles();
loadFromLocalStorage();
if (!currentSector) {
showInstallScreen();
} else {
showDashboard();
}
// Initialisation des fonctionnalités prédictives
setupPredictiveIntegration();
// Initialisation différée des graphiques
setTimeout(initPredictiveCharts, 1000);
});
// ========== FONCTIONS EXISTANTES (conservées pour compatibilité) ==========
// Toutes les fonctions du Nexus Dashboard original sont conservées ici
let currentStep = "install";
let currentSector = "";
let enabledModules = {};
let currentRole = "Choisir";
// Les références DOM et fonctions restent identiques
const installSection = document.getElementById('installSection');
const dashboardSection = document.getElementById('dashboardSection');
const sectorCards = document.querySelectorAll('.sector-card');
const roleSelect = document.getElementById('roleSelect');
const dashboardBtn = document.getElementById('dashboardBtn');
const changeSectorBtn = document.getElementById('changeSectorBtn');
const currentSectorElement = document.getElementById('currentSector');
const exportPdfBtn = document.getElementById('exportPdfBtn');
const themeToggle = document.getElementById('themeToggle');
const header = document.querySelector('.cosmic-header');
const workspaceBtn = document.getElementById('workspaceBtn');
const workspaceModal = document.getElementById('workspaceModal');
const closeModal = document.getElementById('closeModal');
const modalContent = document.getElementById('modalContent');
const modalTitle = document.getElementById('modalTitle');
const defaultRoleView = document.getElementById('defaultRoleView');
// Les fonctions createStars, createParticles, handleScroll, etc. sont conservées
function createStars() {
const starsContainer = document.getElementById('starsContainer');
const starCount = 150;
for (let i = 0; i < starCount; i++) {
const star = document.createElement('div');
star.classList.add('star');
star.style.left = `${Math.random() * 100}%`;
star.style.top = `${Math.random() * 100}%`;
const size = Math.random() * 3;
star.style.width = `${size}px`;
star.style.height = `${size}px`;
star.style.animationDelay = `${Math.random() * 8}s`;
starsContainer.appendChild(star);
}
}
function createParticles() {
const particlesContainer = document.getElementById('particlesContainer');
const particleCount = 50;
for (let i = 0; i < particleCount; i++) {
const particle = document.createElement('div');
particle.classList.add('particle');
particle.style.left = `${Math.random() * 100}%`;
const colors = ['#00f3ff', '#b967ff', '#ff2a6d', '#05ffa1', '#ff6b35'];
particle.style.background = colors[Math.floor(Math.random() * colors.length)];
particle.style.animationDelay = `${Math.random() * 20}s`;
particle.style.animationDuration = `${15 + Math.random() * 15}s`;
particlesContainer.appendChild(particle);
}
}
// ... autres fonctions existantes
</script>
</body>
</html> |