Spaces:
Running
Running
la moteur de recherche doit être bien plus grand - Follow Up Deployment
Browse files2 unmodified lines34567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989992 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Tableau de gestion des risques</title><script src="https://cdn.tailwindcss.com"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"><style>/* Mobile tiles */@media (max-width: 768px) {table {display: none;}.mobile-tile {display: block;background: white;border-radius: 0.5rem;padding: 1rem;margin-bottom: 1rem;box-shadow: 0 1px 3px rgba(0,0,0,0.1);transition: all 0.2s ease;}.mobile-tile:hover {transform: translateY(-2px);box-shadow: 0 4px 6px rgba(0,0,0,0.1);background-color: #f8fafc;}.mobile-tile-row {display: flex;justify-content: space-between;padding: 0.5rem 0;border-bottom: 1px solid #f3f4f6;}.mobile-tile-row:last-child {border-bottom: none;}.mobile-tile-label {font-weight: 600;color: #6b7280;min-width: 120px;}.mobile-tile-value {text-align: right;flex-grow: 1;}}@media (min-width: 769px) {.mobile-tiles-container {display: none;}}/* Custom styles for scrollbar and sidebar transition */::-webkit-scrollbar {width: 8px;height: 8px;}::-webkit-scrollbar-track {background: #f1f1f1;}::-webkit-scrollbar-thumb {background: #888;border-radius: 4px;}::-webkit-scrollbar-thumb:hover {background: #555;}.sidebar {transition: transform 0.3s ease-in-out;}.sidebar-hidden {transform: translateX(100%);}.sidebar-visible {transform: translateX(0);}.row-highlight:hover {background-color: #f0f9ff;}.modal-overlay {background-color: rgba(0, 0, 0, 0.5);transition: opacity 0.3s ease;}.filter-dropdown {max-height: 300px;overflow-y: auto;}</style></head><body class="bg-gray-50 font-sans"><!-- Header Sticky --><header class="sticky top-0 z-50 bg-white shadow-md"><div class="container mx-auto px-4 py-3 flex items-center justify-between"><div class="flex items-center space-x-4"><h1 class="text-xl font-bold text-blue-600">RiskManager Pro</h1></div><div class="relative w-1/3 hidden sm:block"><input type="text" placeholder="Rechercher..." class="w-full pl-10 pr-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500"><i class="fas fa-search absolute left-3 top-3 text-gray-400"></i></div><button id="mobile-search-button" class="sm:hidden text-gray-700 hover:text-blue-600"><i class="fas fa-search text-xl"></i></button><div class="flex items-center space-x-4"><div class="relative"><button class="flex items-center space-x-2 text-gray-700 hover:text-blue-600"><i class="fas fa-bell text-xl"></i></button><span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-5 w-5 flex items-center justify-center">3</span></div><div class="flex items-center space-x-2"><img src="https://randomuser.me/api/portraits/women/44.jpg" alt="Profile" class="h-8 w-8 rounded-full"><span class="font-medium">Sarah Dupont</span></div></div></div></header><!-- Breadcrumb --><div class="bg-gray-100 py-2 px-4 border-b"><div class="container mx-auto"><nav class="flex" aria-label="Breadcrumb"><ol class="inline-flex items-center space-x-1 md:space-x-3"><li class="inline-flex items-center"><a href="#" class="inline-flex items-center text-sm font-medium text-gray-700 hover:text-blue-600"><i class="fas fa-home mr-2"></i>Accueil</a></li><li><div class="flex items-center"><i class="fas fa-chevron-right text-gray-400"></i><a href="#" class="ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2">Risques</a></div></li><li aria-current="page"><div class="flex items-center"><i class="fas fa-chevron-right text-gray-400"></i><span class="ml-1 text-sm font-medium text-blue-600 md:ml-2">Tableau des risques</span></div></li></ol></nav></div></div><!-- Main Content --><main class="container mx-auto px-4 py-6"><!-- Filters and Actions --><div class="mb-6 flex flex-col md:flex-row justify-between items-start md:items-center space-y-4 md:space-y-0 relative"><h2 class="text-2xl font-bold text-gray-800">Tableau des risques</h2><!-- Bulk Actions (hidden by default) --><div id="bulk-actions" class="hidden absolute top-0 right-0 bg-white p-2 rounded-lg shadow-sm"><div class="flex flex-row items-center space-x-3"><span id="selected-count" class="text-sm text-gray-600 whitespace-nowrap"></span><button class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 flex items-center whitespace-nowrap"><i class="fas fa-edit mr-2"></i> Modifier en masse</button><button class="px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 flex items-center whitespace-nowrap"><i class="fas fa-trash mr-2"></i> Supprimer</button><button onclick="clearSelection()" class="px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-100 flex items-center whitespace-nowrap"><i class="fas fa-times mr-2"></i> Annuler</button></div></div><!-- Normal Actions --><div id="normal-actions" class="flex space-x-3"><button class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 flex items-center"><i class="fas fa-plus mr-2"></i> Ajouter un risque</button><button class="px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-100 flex items-center"><i class="fas fa-download mr-2"></i> Exporter</button></div></div><!-- Table Filters --><div class="bg-white p-4 rounded-lg shadow-sm mb-4"><div class="grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Tâche</label><div class="relative"><button onclick="toggleFilter('task')" class="w-full flex justify-between items-center px-3 py-2 bg-white border border-gray-300 rounded-md shadow-sm text-left text-sm focus:outline-none focus:ring-1 focus:ring-blue-500"><span>Toutes les tâches</span><i class="fas fa-chevron-down"></i></button><div id="task-filter" class="hidden absolute z-10 mt-1 w-full bg-white shadow-lg rounded-md py-1 filter-dropdown"><input type="text" placeholder="Rechercher..." class="w-full px-3 py-2 border-b"><div class="max-h-48 overflow-y-auto"><a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-blue-100">Manipulation produits chimiques</a><a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-blue-100">Nettoyage salle blanche</a><a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-blue-100">Déplacement chariot</a><a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-blue-100">Poste informatique</a><a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-blue-100">Stockage matières</a><a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-blue-100">Maintenance équipement</a><a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-blue-100">Gestion déchets</a></div></div></div></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Danger</label><select class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"><option>Tous les dangers</option><option>Biologique</option><option>Chimique</option><option>Déplacement</option><option>Ambiance de travail</option></select></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Statut</label><select class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"><option>Tous les statuts</option><option>À traiter</option><option>En cours</option><option>Résolu</option><option>Archivé</option></select></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Tri</label><select class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"><option>Par défaut</option><option>Cotation brute (croissant)</option><option>Cotation brute (décroissant)</option><option>Cotation réelle (croissant)</option><option>Cotation réelle (décroissant)</option></select></div></div></div><!-- Table --><div class="bg-white shadow-sm rounded-lg overflow-hidden"><div class="overflow-x-auto"><!-- Desktop table --><table class="min-w-full divide-y divide-gray-200"><thead class="bg-gray-50"><tr><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" draggable="true"><input type="checkbox" id="select-all" class="h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500"><div class="resize-handle"></div></th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100" draggable="true"><div class="flex items-center">Tâche<i class="fas fa-sort ml-1 text-gray-400"></i></div></th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"><div class="flex items-center">Danger<i class="fas fa-sort ml-1 text-gray-400"></i></div></th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"><div class="flex items-center">Situation<i class="fas fa-sort ml-1 text-gray-400"></i></div></th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"><div class="flex items-center">Risque<i class="fas fa-sort ml-1 text-gray-400"></i></div></th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"><div class="flex items-center">Cotation brute<i class="fas fa-sort ml-1 text-gray-400"></i></div></th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"><div class="flex items-center">Mesure<i class="fas fa-sort ml-1 text-gray-400"></i></div></th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"><div class="flex items-center">Cotation réelle<i class="fas fa-sort ml-1 text-gray-400"></i></div></th><th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100"><div class="flex items-center">Statut<i class="fas fa-sort ml-1 text-gray-400"></i></div></th></tr></thead><tbody class="bg-white divide-y divide-gray-200"><!-- Sample rows (should be 30 total) --><tr class="row-highlight hover:bg-blue-50 cursor-pointer" onclick="openSidebar(1)"><td class="px-6 py-4 whitespace-nowrap" onclick="event.stopPropagation()"><input type="checkbox" class="row-checkbox h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500" data-id="1"></td><td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Manipulation produits chimiques</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Chimique</span></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Laboratoire</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Brûlure chimique</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><div class="flex items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-yellow-500 rounded-full" style="width: 70%"></div></div><span class="ml-2">14</span></div></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Gants, lunettes</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><div class="flex items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-green-500 rounded-full" style="width: 30%"></div></div><span class="ml-2">6</span></div></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">En cours</span></td></tr><!-- Row 2 --><tr class="row-highlight hover:bg-blue-50 cursor-pointer" onclick="openSidebar(2)"><td class="px-6 py-4 whitespace-nowrap" onclick="event.stopPropagation()"><input type="checkbox" class="row-checkbox h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500" data-id="2"></td><td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Nettoyage salle blanche</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-purple-100 text-purple-800">Biologique</span></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Zone stérile</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Contamination</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><div class="flex items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-red-500 rounded-full" style="width: 90%"></div></div><span class="ml-2">18</span></div></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Protocole strict</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><div class="flex items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-green-500 rounded-full" style="width: 20%"></div></div><span class="ml-2">4</span></div></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Résolu</span></td></tr><!-- Row 3 --><tr class="row-highlight hover:bg-blue-50 cursor-pointer" onclick="openSidebar(3)"><td class="px-6 py-4 whitespace-nowrap" onclick="event.stopPropagation()"><input type="checkbox" class="row-checkbox h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500" data-id="3"></td><td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Déplacement chariot</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">Déplacement</span></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Couloir étroit</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Collision</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><div class="flex items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-orange-500 rounded-full" style="width: 50%"></div></div><span class="ml-2">10</span></div></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Signalisation</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><div class="flex items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-green-500 rounded-full" style="width: 20%"></div></div><span class="ml-2">4</span></div></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">À traiter</span></td></tr><!-- Row 4 --><tr class="row-highlight hover:bg-blue-50 cursor-pointer" onclick="openSidebar(4)"><td class="px-6 py-4 whitespace-nowrap" onclick="event.stopPropagation()"><input type="checkbox" class="row-checkbox h-4 w-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500" data-id="4"></td><td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Poste informatique</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-indigo-100 text-indigo-800">Ambiance</span></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Bureau open space</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">TMS</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><div class="flex items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-yellow-500 rounded-full" style="width: 60%"></div></div><span class="ml-2">12</span></div></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Chaise ergonomique</td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><div class="flex items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-green-500 rounded-full" style="width: 30%"></div></div><span class="ml-2">6</span></div></td><td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">En cours</span></td></tr></tbody></table><!-- Mobile tiles --><div class="mobile-tiles-container"><div class="mobile-tile" onclick="openSidebar(1)"><div class="mobile-tile-row"><span class="mobile-tile-label">Tâche</span><span class="mobile-tile-value">Manipulation produits chimiques</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Danger</span><span class="mobile-tile-value" onclick="event.stopPropagation()"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Chimique</span></span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Situation</span><span class="mobile-tile-value">Laboratoire</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Risque</span><span class="mobile-tile-value">Brûlure chimique</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Cotation brute</span><span class="mobile-tile-value"><div class="flex justify-end items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-yellow-500 rounded-full" style="width: 70%"></div></div><span class="ml-2">14</span></div></span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Mesure</span><span class="mobile-tile-value">Gants, lunettes</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Cotation réelle</span><span class="mobile-tile-value"><div class="flex justify-end items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-green-500 rounded-full" style="width: 30%"></div></div><span class="ml-2">6</span></div></span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Statut</span><span class="mobile-tile-value"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">En cours</span></span></div></div><!-- Row 2 --><div class="mobile-tile" onclick="openSidebar(2)"><div class="mobile-tile-row"><span class="mobile-tile-label">Tâche</span><span class="mobile-tile-value">Nettoyage salle blanche</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Danger</span><span class="mobile-tile-value" onclick="event.stopPropagation()"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-purple-100 text-purple-800">Biologique</span></span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Situation</span><span class="mobile-tile-value">Zone stérile</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Risque</span><span class="mobile-tile-value">Contamination</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Cotation brute</span><span class="mobile-tile-value"><div class="flex justify-end items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-red-500 rounded-full" style="width: 90%"></div></div><span class="ml-2">18</span></div></span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Mesure</span><span class="mobile-tile-value">Protocole strict</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Cotation réelle</span><span class="mobile-tile-value"><div class="flex justify-end items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-green-500 rounded-full" style="width: 20%"></div></div><span class="ml-2">4</span></div></span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Statut</span><span class="mobile-tile-value"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Résolu</span></span></div></div><!-- Row 3 --><div class="mobile-tile" onclick="openSidebar(3)"><div class="mobile-tile-row"><span class="mobile-tile-label">Tâche</span><span class="mobile-tile-value">Déplacement chariot</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Danger</span><span class="mobile-tile-value" onclick="event.stopPropagation()"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">Déplacement</span></span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Situation</span><span class="mobile-tile-value">Couloir étroit</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Risque</span><span class="mobile-tile-value">Collision</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Cotation brute</span><span class="mobile-tile-value"><div class="flex justify-end items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-orange-500 rounded-full" style="width: 50%"></div></div><span class="ml-2">10</span></div></span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Mesure</span><span class="mobile-tile-value">Signalisation</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Cotation réelle</span><span class="mobile-tile-value"><div class="flex justify-end items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-green-500 rounded-full" style="width: 20%"></div></div><span class="ml-2">4</span></div></span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Statut</span><span class="mobile-tile-value"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">À traiter</span></span></div></div><!-- Row 4 --><div class="mobile-tile" onclick="openSidebar(4)"><div class="mobile-tile-row"><span class="mobile-tile-label">Tâche</span><span class="mobile-tile-value">Poste informatique</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Danger</span><span class="mobile-tile-value" onclick="event.stopPropagation()"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-indigo-100 text-indigo-800">Ambiance</span></span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Situation</span><span class="mobile-tile-value">Bureau open space</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Risque</span><span class="mobile-tile-value">TMS</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Cotation brute</span><span class="mobile-tile-value"><div class="flex justify-end items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-yellow-500 rounded-full" style="width: 60%"></div></div><span class="ml-2">12</span></div></span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Mesure</span><span class="mobile-tile-value">Chaise ergonomique</span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Cotation réelle</span><span class="mobile-tile-value"><div class="flex justify-end items-center"><div class="h-2 w-16 bg-gray-200 rounded-full"><div class="h-2 bg-green-500 rounded-full" style="width: 30%"></div></div><span class="ml-2">6</span></div></span></div><div class="mobile-tile-row"><span class="mobile-tile-label">Statut</span><span class="mobile-tile-value"><span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">En cours</span></span></div></div></div></div><!-- Pagination --><div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6"><div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"><div><p class="text-sm text-gray-700">Affichage de<span class="font-medium">1</span>à<span class="font-medium">10</span>sur<span class="font-medium">30</span>résultats</p></div><div><nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination"><a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"><span class="sr-only">Précédent</span><i class="fas fa-chevron-left"></i></a><a href="#" aria-current="page" class="z-10 bg-blue-50 border-blue-500 text-blue-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium">1</a><a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">2</a><a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">3</a><span class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">...</span><a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">8</a><a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"><span class="sr-only">Suivant</span><i class="fas fa-chevron-right"></i></a></nav></div></div></div></div></main><!-- Sidebar for editing --><div id="sidebar-overlay" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden modal-overlay" onclick="closeSidebar()"></div><div id="edit-sidebar" class="sidebar sidebar-hidden fixed top-0 right-0 z-50 w-full sm:w-96 h-full bg-white shadow-xl flex flex-col"><!-- Sticky Header --><div class="sticky top-0 bg-white p-6 border-b z-10"><div class="flex justify-between items-center"><h3 class="text-lg font-bold text-gray-900">Modifier le risque</h3><button id="close-sidebar" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times"></i></button></div></div><!-- Scrollable Content --><div class="flex-1 overflow-y-auto p-6"><div class="space-y-6"><!-- Task Section --><div><h4 class="text-md font-medium text-gray-900 mb-3 border-b pb-2 flex items-center"><i class="fas fa-tasks mr-2 text-blue-500"></i>Tâche</h4><div class="space-y-4"><div><label for="task-description" class="block text-sm font-medium text-gray-700 mb-1">Description</label><textarea id="task-description" rows="3" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm" placeholder="Décrivez la tâche..."></textarea></div><div><label for="task-comment" class="block text-sm font-medium text-gray-700 mb-1">Commentaire</label><textarea id="task-comment" rows="2" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm" placeholder="Ajoutez des notes..."></textarea></div></div></div><!-- Danger Section --><div class="mt-6"><h4 class="text-md font-medium text-gray-900 mb-3 border-b pb-2 flex items-center"><i class="fas fa-exclamation-triangle mr-2 text-red-500"></i>Danger</h4><div class="space-y-4"><div><label for="biological" class="block text-sm font-medium text-gray-700 mb-1">Biologique</label><select id="biological" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"><option value="">Sélectionner...</option><option>Bactéries</option><option>Virus</option><option>Parasites</option><option>Champignons</option><option>Toxines biologiques</option></select></div><div><label for="chemical" class="block text-sm font-medium text-gray-700 mb-1">Chimique</label><select id="chemical" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"><option value="">Sélectionner...</option><option>Solvants</option><option>Acides</option><option>Bases</option><option>Métaux lourds</option><option>Pesticides</option></select></div><div><label for="movement" class="block text-sm font-medium text-gray-700 mb-1">Déplacement</label><select id="movement" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"><option value="">Sélectionner...</option><option>Chute de plain-pied</option><option>Chute de hauteur</option><option>Heurt par objet</option><option>Collision</option><option>Glissade</option></select></div><div><label for="environment" class="block text-sm font-medium text-gray-700 mb-1">Ambiance de travail</label><select id="environment" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm"><option value="">Sélectionner...</option><option>Bruit</option><option>Lumière</option><option>Température</option><option>Humidité</option><option>Charge mentale</option></select></div></div></div><!-- Content remains here --></div></div><!-- Sticky Footer with Action Buttons --><div class="sticky bottom-0 bg-white p-4 border-t z-10"><div class="flex space-x-3"><button id="cancel-button" type="button" class="flex-1 px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 flex items-center justify-center"><i class="fas fa-times mr-2"></i>Fermer</button><button id="save-button" type="button" class="flex-1 px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 flex items-center justify-center"><i class="fas fa-save mr-2"></i>Enregistrer</button></div></div></div></div><script>// Selection handlinglet selectedRows = new Set();document.addEventListener('DOMContentLoaded', function() {// Select all checkboxdocument.getElementById('select-all').addEventListener('change', function(e) {const checkboxes = document.querySelectorAll('.row-checkbox');checkboxes.forEach(checkbox => {checkbox.checked = e.target.checked;if (e.target.checked) {selectedRows.add(checkbox.dataset.id);} else {selectedRows.delete(checkbox.dataset.id);}});updateBulkActions();});// Individual row checkboxesdocument.querySelectorAll('.row-checkbox').forEach(checkbox => {checkbox.addEventListener('change', function(e) {if (e.target.checked) {selectedRows.add(e.target.dataset.id);} else {selectedRows.delete(e.target.dataset.id);document.getElementById('select-all').checked = false;}updateBulkActions();});});});function updateBulkActions() {const bulkActions = document.getElementById('bulk-actions');const normalActions = document.getElementById('normal-actions');const countElement = document.getElementById('selected-count');if (selectedRows.size > 0) {bulkActions.classList.remove('hidden');normalActions.classList.add('hidden');countElement.textContent = `${selectedRows.size} sélectionné(s)`;} else {bulkActions.classList.add('hidden');normalActions.classList.remove('hidden');}}function clearSelection() {selectedRows.clear();document.querySelectorAll('.row-checkbox').forEach(checkbox => {checkbox.checked = false;});document.getElementById('select-all').checked = false;updateBulkActions();}// Toggle filter dropdownfunction toggleFilter(filterId) {const filter = document.getElementById(`${filterId}-filter`);filter.classList.toggle('hidden');}// Close all filter dropdowns when clicking outsidedocument.addEventListener('click', function(event) {if (!event.target.matches('button[onclick^="toggleFilter"]')) {const dropdowns = document.querySelectorAll('.filter-dropdown');dropdowns.forEach(function(dropdown) {if (!dropdown.classList.contains('hidden')) {dropdown.classList.add('hidden');}});}});// Sidebar functionslet currentRowId = null;function openSidebar(rowId) {currentRowId = rowId;document.getElementById('sidebar-overlay').classList.remove('hidden');document.getElementById('edit-sidebar').classList.remove('sidebar-hidden');document.getElementById('edit-sidebar').classList.add('sidebar-visible');// Simulate loading data for the selected rowloadRowData(rowId);}function closeSidebar() {document.getElementById('sidebar-overlay').classList.add('hidden');document.getElementById('edit-sidebar').classList.remove('sidebar-visible');document.getElementById('edit-sidebar').classList.add('sidebar-hidden');}function loadRowData(rowId) {// In a real app, this would fetch data from an API// Here we just simulate with some sample dataconst sampleData = {1: {description: "Manipulation produits chimiques",comment: "Attention aux produits corrosifs",biological: "",chemical: "Acides",movement: "",environment: ""},2: {description: "Nettoyage salle blanche",comment: "Respecter le protocole de stérilisation",biological: "Bactéries",chemical: "",movement: "",environment: ""},3: {description: "Déplacement chariot",comment: "Couloirs encombrés",biological: "",chemical: "",movement: "Collision",environment: ""},4: {description: "Poste informatique",comment: "Problèmes de posture fréquents",biological: "",chemical: "",movement: "",environment: "Charge mentale"}};const data = sampleData[rowId] || {};document.getElementById('task-description').value = data.description || '';document.getElementById('task-comment').value = data.comment || '';document.getElementById('biological').value = data.biological || '';document.getElementById('chemical').value = data.chemical || '';document.getElementById('movement').value = data.movement || '';document.getElementById('environment').value = data.environment || '';}// Event listeners for sidebar buttonsdocument.getElementById('close-sidebar').addEventListener('click', closeSidebar);document.getElementById('cancel-button').addEventListener('click', closeSidebar);document.getElementById('save-button').addEventListener('click', function() {// In a real app, this would save the dataalert('Modifications enregistrées pour le risque #' + currentRowId);closeSidebar();});// Prevent closing sidebar when clicking inside itdocument.getElementById('edit-sidebar').addEventListener('click', function(e) {e.stopPropagation();});</script><!-- Search Modal --><div id="search-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden modal-overlay" onclick="closeSearchModal()"><div class="absolute top-1/4 left-1/2 transform -translate-x-1/2 w-11/12 max-w-md bg-white rounded-lg shadow-xl p-6" onclick="event.stopPropagation()"><div class="flex justify-between items-center mb-4"><h3 class="text-lg font-bold">Rechercher</h3><button onclick="closeSearchModal()" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times"></i></button></div><div class="relative"><input type="text" placeholder="Rechercher..." class="w-full pl-10 pr-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500"><i class="fas fa-search absolute left-3 top-4 text-gray-400"></i></div><div class="mt-4"><button class="w-full py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">Rechercher</button></div></div></div><script>// Search modal functionsfunction openSearchModal() {document.getElementById('search-modal').classList.remove('hidden');}function closeSearchModal() {document.getElementById('search-modal').classList.add('hidden');}// Add event listener to mobile search buttondocument.getElementById('mobile-search-button').addEventListener('click', openSearchModal);</script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=LoicUX/evaluteo-2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>2 unmodified lines34567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295302 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Moteur de Recherche SaaS - UX Optimisé</title><script src="https://cdn.tailwindcss.com"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"><style>.search-dropdown {display: none;position: absolute;top: 100%;left: 0;width: 100%;max-height: 400px;overflow-y: auto;z-index: 1000;box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);border-radius: 0.5rem;}.search-dropdown.active {display: block;}.search-item:hover {background-color: #f3f4f6;}.highlight {background-color: #fef08a;padding: 0.1rem 0.2rem;border-radius: 0.2rem;}.search-loader {display: none;}.search-loader.active {display: block;}@keyframes spin {0% { transform: rotate(0deg); }100% { transform: rotate(360deg); }}.animate-spin {animation: spin 1s linear infinite;}/* Transition pour l'apparition du champ de recherche */.search-expand {transition: all 0.3s ease;width: 0;opacity: 0;}.search-expand.active {width: 100%;opacity: 1;}/* Style pour mobile */@media (max-width: 768px) {.search-container {position: relative;}.search-fullscreen {position: fixed;top: 0;left: 0;right: 0;bottom: 0;background: white;z-index: 100;padding: 1rem;display: flex;flex-direction: column;}.search-fullscreen .search-input-container {width: 100%;}.search-fullscreen .search-dropdown {position: relative;max-height: calc(100vh - 100px);}}</style></head><body class="bg-gray-50"><header class="bg-white shadow-sm sticky top-0 z-50"><div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"><div class="flex justify-between items-center h-16"><!-- Logo --><div class="flex-shrink-0 flex items-center"><a href="#" class="text-indigo-600 font-bold text-xl">SaaSPro</a></div><!-- Zone de recherche et actions utilisateur --><div class="flex items-center"><!-- Conteneur de recherche --><div class="search-container flex-1 flex items-center justify-center px-4 lg:ml-6 lg:justify-end"><div class="w-full max-w-7xl relative"><!-- Icône de recherche (mobile) --><button id="mobile-search-toggle" class="md:hidden text-gray-500 hover:text-gray-700 focus:outline-none"><i class="fas fa-search h-5 w-5"></i></button><!-- Champ de recherche (desktop) --><div class="hidden md:block relative"><div class="relative"><div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"><i class="fas fa-search text-gray-400"></i></div><input id="search-input" type="text" class="block w-full pl-10 pr-3 py-3 text-base border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500" placeholder="Rechercher projets, tâches, clients..." autocomplete="off"><button id="clear-search" class="absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400 hover:text-gray-600 hidden"><i class="fas fa-times"></i></button></div><!-- Dropdown des résultats --><div id="search-dropdown" class="search-dropdown mt-1 bg-white"><div class="px-4 py-2 border-b border-gray-200 flex justify-between items-center"><span class="text-xs font-semibold text-gray-500">RÉSULTATS DE RECHERCHE</span><span class="text-xs text-gray-500">0 trouvé</span></div><div class="search-loader py-4 flex justify-center"><div class="animate-spin rounded-full h-6 w-6 border-b-2 border-indigo-600"></div></div><div id="search-results" class="divide-y divide-gray-200"><!-- Les résultats seront injectés ici par JavaScript --></div><div id="no-results" class="px-4 py-6 text-center hidden"><i class="fas fa-search text-gray-400 text-3xl mb-2"></i><h3 class="text-sm font-medium text-gray-900">Aucun résultat trouvé</h3><p class="mt-1 text-sm text-gray-500">Essayez avec d'autres termes de recherche.</p></div></div></div></div></div><!-- Menu utilisateur --><div class="ml-4 flex items-center md:ml-6"><button type="button" class="bg-white p-1 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"><span class="sr-only">Notifications</span><i class="fas fa-bell h-6 w-6"></i></button><!-- Menu déroulant profil --><div class="ml-3 relative"><div><button type="button" class="max-w-xs bg-white flex items-center text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" id="user-menu-button" aria-expanded="false" aria-haspopup="true"><span class="sr-only">Ouvrir le menu utilisateur</span><img class="h-8 w-8 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt=""></button></div></div></div></div></div></div><!-- Recherche mobile en plein écran --><div id="mobile-search-fullscreen" class="search-fullscreen hidden"><div class="flex justify-between items-center mb-4"><h2 class="text-lg font-medium">Rechercher</h2><button id="mobile-search-close" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times text-xl"></i></button></div><div class="search-input-container"><div class="relative"><div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"><i class="fas fa-search text-gray-400"></i></div><input id="mobile-search-input" type="text" class="block w-full pl-10 pr-3 py-4 text-base border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500" placeholder="Rechercher projets, tâches, clients..." autocomplete="off"><button id="mobile-clear-search" class="absolute inset-y-0 right-0 pr-3 flex items-center text-gray-400 hover:text-gray-600 hidden"><i class="fas fa-times"></i></button></div><!-- Dropdown des résultats mobile --><div id="mobile-search-dropdown" class="search-dropdown mt-2 bg-white"><div class="px-4 py-2 border-b border-gray-200 flex justify-between items-center"><span class="text-xs font-semibold text-gray-500">RÉSULTATS DE RECHERCHE</span><span class="text-xs text-gray-500">0 trouvé</span></div><div class="mobile-search-loader py-4 flex justify-center"><div class="animate-spin rounded-full h-6 w-6 border-b-2 border-indigo-600"></div></div><div id="mobile-search-results" class="divide-y divide-gray-200"><!-- Les résultats seront injectés ici par JavaScript --></div><div id="mobile-no-results" class="px-4 py-6 text-center hidden"><i class="fas fa-search text-gray-400 text-3xl mb-2"></i><h3 class="text-sm font-medium text-gray-900">Aucun résultat trouvé</h3><p class="mt-1 text-sm text-gray-500">Essayez avec d'autres termes de recherche.</p></div></div></div></div></header><script>document.addEventListener('DOMContentLoaded', function() {// Éléments du DOMconst searchInput = document.getElementById('search-input');const clearSearch = document.getElementById('clear-search');const searchDropdown = document.getElementById('search-dropdown');const searchResults = document.getElementById('search-results');const noResults = document.getElementById('no-results');const searchLoader = document.querySelector('.search-loader');// Éléments mobileconst mobileSearchToggle = document.getElementById('mobile-search-toggle');const mobileSearchFullscreen = document.getElementById('mobile-search-fullscreen');const mobileSearchClose = document.getElementById('mobile-search-close');const mobileSearchInput = document.getElementById('mobile-search-input');const mobileClearSearch = document.getElementById('mobile-clear-search');const mobileSearchDropdown = document.getElementById('mobile-search-dropdown');const mobileSearchResults = document.getElementById('mobile-search-results');const mobileNoResults = document.getElementById('mobile-no-results');const mobileSearchLoader = document.querySelector('.mobile-search-loader');// Données de test pour les résultats de rechercheconst mockResults = [{type: 'projet',icon: 'fas fa-folder',title: 'Migration vers SaaSPro',description: 'Projet de migration des données clients vers la nouvelle plateforme SaaSPro',date: '15/06/2023',url: '#'},{type: 'tâche',icon: 'fas fa-tasks',title: 'Configurer les permissions',description: 'Configurer les permissions des utilisateurs pour le module de reporting',date: '10/06/2023',url: '#'},{type: 'client',icon: 'fas fa-building',title: 'Acme Corporation',description: 'Client depuis 2018 - Contrat Premium - 45 utilisateurs',date: '',url: '#'},{type: 'document',icon: 'fas fa-file-pdf',title: 'Rapport trimestriel Q2 2023',description: 'Rapport des performances et indicateurs clés pour le deuxième trimestre 2023',date: '05/06/2023',url: '#'}];// Gestionnaires d'événements pour la recherche desktopsearchInput.addEventListener('focus', function() {searchDropdown.classList.add('active');if (searchInput.value.trim() !== '') {showLoader();setTimeout(showResults, 800);}});searchInput.addEventListener('blur', function() {// On laisse un petit délai pour permettre le clic sur les résultatssetTimeout(() => {searchDropdown.classList.remove('active');}, 200);});searchInput.addEventListener('input', function() {const query = searchInput.value.trim();if (query !== '') {clearSearch.classList.remove('hidden');showLoader();setTimeout(showResults, 800);} else {clearSearch.classList.add('hidden');hideResults();}});clearSearch.addEventListener('click', function() {searchInput.value = '';searchInput.focus();clearSearch.classList.add('hidden');hideResults();});// Gestionnaires d'événements pour la recherche mobilemobileSearchToggle.addEventListener('click', function() {mobileSearchFullscreen.classList.remove('hidden');mobileSearchInput.focus();});mobileSearchClose.addEventListener('click', function() {mobileSearchFullscreen.classList.add('hidden');mobileSearchInput.value = '';mobileClearSearch.classList.add('hidden');mobileSearchDropdown.classList.remove('active');});mobileSearchInput.addEventListener('input', function() {const query = mobileSearchInput.value.trim();if (query !== '') {mobileClearSearch.classList.remove('hidden');mobileSearchLoader.classList.add('active');mobileSearchDropdown.classList.add('active');setTimeout(showMobileResults, 800);} else {mobileClearSearch.classList.add('hidden');mobileSearchDropdown.classList.remove('active');}});mobileClearSearch.addEventListener('click', function() {mobileSearchInput.value = '';mobileSearchInput.focus();mobileClearSearch.classList.add('hidden');mobileSearchDropdown.classList.remove('active');});// Raccourci clavier (/) pour focus sur la recherchedocument.addEventListener('keydown', function(e) {if (e.key === '/' && !mobileSearchFullscreen.classList.contains('hidden')) {e.preventDefault();mobileSearchInput.focus();} else if (e.key === '/' && document.activeElement !== searchInput) {e.preventDefault();searchInput.focus();} else if (e.key === 'Escape' && mobileSearchFullscreen.classList.contains('hidden') === false) {mobileSearchFullscreen.classList.add('hidden');}});// Fonctions utilitairesfunction showLoader() {searchLoader.classList.add('active');searchResults.innerHTML = '';noResults.classList.add('hidden');}function hideLoader() {searchLoader.classList.remove('active');}function showResults() {hideLoader();const query = searchInput.value.trim().toLowerCase();if (query === '') {hideResults();return;}// Filtrage des résultats mock (dans une vraie app, ce serait une requête API)const filteredResults = mockResults.filter(item =>item.title.toLowerCase().includes(query) ||item.description.toLowerCase().includes(query));// Mise à jour du compteur de résultatsdocument.querySelector('#search-dropdown .text-xs:last-child').textContent =`${filteredResults.length} trouvé${filteredResults.length !== 1 ? 's' : ''}`;if (filteredResults.length === 0) {noResults.classList.remove('hidden');searchResults.innerHTML = '';} else {noResults.classList.add('hidden');searchResults.innerHTML = '';// Groupement par typeconst groupedResults = {};filteredResults.forEach(result => {if (!groupedResults[result.type]) {groupedResults[result.type] = [];}groupedResults[result.type].push(result);});// Affichage par groupefor (const type in groupedResults) {const group = groupedResults[type];// En-tête du groupeconst groupHeader = document.createElement('div');groupHeader.className = 'px-4 py-2 bg-gray-50 text-xs font-medium text-gray-500 uppercase tracking-wider';groupHeader.textContent = type === 'projet' ? 'PROJETS' :type === 'tâche' ? 'TÂCHES' :type === 'client' ? 'CLIENTS' : 'DOCUMENTS';searchResults.appendChild(groupHeader);// Items du groupegroup.forEach(result => {const resultItem = document.createElement('a');resultItem.href = result.url;resultItem.className = 'search-item px-4 py-3 block cursor-pointer';// Highlight des termes recherchésconst highlightedTitle = highlightText(result.title, query);const highlightedDesc = highlightText(result.description, query);resultItem.innerHTML = `<div class="flex items-start"><div class="flex-shrink-0 pt-0.5"><i class="${result.icon} text-gray-500"></i></div><div class="ml-3 flex-1 min-w-0"><p class="text-sm font-medium text-gray-900 truncate">${highlightedTitle}</p><p class="text-sm text-gray-500 mt-1">${highlightedDesc}</p>${result.date ? `<p class="text-xs text-gray-400 mt-1">${result.date}</p>` : ''}</div></div>`;searchResults.appendChild(resultItem);});}}}function showMobileResults() {mobileSearchLoader.classList.remove('active');const query = mobileSearchInput.value.trim().toLowerCase();if (query === '') {mobileSearchDropdown.classList.remove('active');return;}// Filtrage des résultats mockconst filteredResults = mockResults.filter(item =>item.title.toLowerCase().includes(query) ||item.description.toLowerCase().includes(query));// Mise à jour du compteur de résultatsdocument.querySelector('#mobile-search-dropdown .text-xs:last-child').textContent =`${filteredResults.length} trouvé${filteredResults.length !== 1 ? 's' : ''}`;if (filteredResults.length === 0) {mobileNoResults.classList.remove('hidden');mobileSearchResults.innerHTML = '';} else {mobileNoResults.classList.add('hidden');mobileSearchResults.innerHTML = '';// Groupement par typeconst groupedResults = {};filteredResults.forEach(result => {if (!groupedResults[result.type]) {groupedResults[result.type] = [];}groupedResults[result.type].push(result);});// Affichage par groupefor (const type in groupedResults) {const group = groupedResults[type];// En-tête du groupeconst groupHeader = document.createElement('div');groupHeader.className = 'px-4 py-2 bg-gray-50 text-xs font-medium text-gray-500 uppercase tracking-wider';groupHeader.textContent = type === 'projet' ? 'PROJETS' :type === 'tâche' ? 'TÂCHES' :type === 'client' ? 'CLIENTS' : 'DOCUMENTS';mobileSearchResults.appendChild(groupHeader);// Items du groupegroup.forEach(result => {const resultItem = document.createElement('a');resultItem.href = result.url;resultItem.className = 'search-item px-4 py-3 block cursor-pointer';// Highlight des termes recherchésconst highlightedTitle = highlightText(result.title, query);const highlightedDesc = highlightText(result.description, query);resultItem.innerHTML = `<div class="flex items-start"><div class="flex-shrink-0 pt-0.5"><i class="${result.icon} text-gray-500"></i></div><div class="ml-3 flex-1 min-w-0"><p class="text-sm font-medium text-gray-900 truncate">${highlightedTitle}</p><p class="text-sm text-gray-500 mt-1">${highlightedDesc}</p>${result.date ? `<p class="text-xs text-gray-400 mt-1">${result.date}</p>` : ''}</div></div>`;mobileSearchResults.appendChild(resultItem);});}}}function hideResults() {searchDropdown.classList.remove('active');searchResults.innerHTML = '';noResults.classList.add('hidden');}function highlightText(text, query) {if (!query) return text;const regex = new RegExp(query, 'gi');return text.replace(regex, match => `<span class="highlight">${match}</span>`);}});</script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=LoicUX/evaluteo-2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>
index.html+456-925