demande-integration.php 194 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083
  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Demande d'Intégration - SIPA Automobiles</title>
  7. <!-- Tailwind CSS CDN -->
  8. <script src="https://cdn.tailwindcss.com"></script>
  9. <!-- Flatpickr CSS -->
  10. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">
  11. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/preline/dist/preline.css" />
  12. <style>
  13. /* Style pour les onglets actifs Preline */
  14. button[role="tab"].active,
  15. button[role="tab"][aria-selected="true"] {
  16. background-color: white !important;
  17. color: rgb(31, 41, 55) !important;
  18. }
  19. @media (prefers-color-scheme: dark) {
  20. button[role="tab"].active,
  21. button[role="tab"][aria-selected="true"] {
  22. background-color: rgb(38, 38, 38) !important;
  23. color: white !important;
  24. }
  25. }
  26. /* Styles pour les champs conditionnels */
  27. .conditional-field {
  28. opacity: 0;
  29. max-height: 0;
  30. overflow: hidden;
  31. transition: opacity 0.5s ease-in-out, max-height 0.5s ease-in-out, transform 0.5s ease-in-out;
  32. transform: translateY(-15px) scale(0.95);
  33. pointer-events: none;
  34. }
  35. .conditional-field.is-active {
  36. opacity: 1;
  37. max-height: 3000px;
  38. transform: translateY(0) scale(1);
  39. pointer-events: auto;
  40. }
  41. /* Animations douces */
  42. .smooth-transition {
  43. transition: all 0.3s ease-in-out;
  44. }
  45. /* Animation fade-in pour les cards */
  46. @keyframes fadeInUp {
  47. from {
  48. opacity: 0;
  49. transform: translateY(20px);
  50. }
  51. to {
  52. opacity: 1;
  53. transform: translateY(0);
  54. }
  55. }
  56. @keyframes fadeOutUp {
  57. from {
  58. opacity: 1;
  59. transform: translateY(0);
  60. }
  61. to {
  62. opacity: 0;
  63. transform: translateY(-20px);
  64. }
  65. }
  66. .animate-fade-in-up {
  67. animation: fadeInUp 0.5s ease-out;
  68. }
  69. /* Animation pour les tooltips */
  70. .hs-tooltip-toggle:hover svg {
  71. transform: scale(1.1);
  72. transition: transform 0.2s ease-in-out;
  73. color: #21B6BA;
  74. }
  75. /* Styles globaux pour les hover des boutons */
  76. button:hover:not(:disabled) {
  77. transition: all 0.2s ease-in-out;
  78. }
  79. /* Classe réutilisable pour les champs readonly */
  80. .readonly-field {
  81. background-color: rgb(243, 244, 246);
  82. color: rgb(107, 114, 128);
  83. cursor: not-allowed;
  84. }
  85. @media (prefers-color-scheme: dark) {
  86. .readonly-field {
  87. background-color: rgb(38, 38, 38);
  88. color: rgb(163, 163, 163);
  89. }
  90. }
  91. /* Styles pour la validation de formulaire Preline */
  92. .error-message {
  93. display: none;
  94. color: rgb(239, 68, 68);
  95. font-size: 0.875rem;
  96. margin-top: 0.25rem;
  97. }
  98. input:invalid:not(:focus):not(:placeholder-shown) ~ .error-message,
  99. select:invalid:not(:focus) ~ .error-message,
  100. textarea:invalid:not(:focus):not(:placeholder-shown) ~ .error-message {
  101. display: block;
  102. }
  103. input:invalid:not(:focus):not(:placeholder-shown),
  104. select:invalid:not(:focus),
  105. textarea:invalid:not(:focus):not(:placeholder-shown) {
  106. border-color: rgb(239, 68, 68);
  107. }
  108. input:valid:not(:placeholder-shown),
  109. select:valid,
  110. textarea:valid:not(:placeholder-shown) {
  111. border-color: rgb(34, 197, 94);
  112. }
  113. /* Styles personnalisés pour radio buttons et checkboxes avec couleur SIPA */
  114. input[type="radio"],
  115. input[type="checkbox"] {
  116. accent-color: #21B6BA;
  117. }
  118. input[type="radio"]:focus,
  119. input[type="checkbox"]:focus {
  120. --tw-ring-color: rgba(33, 182, 186, 0.5);
  121. }
  122. /* Styles pour les toggles/switches avec couleur SIPA */
  123. input[type="checkbox"].sr-only:checked + div {
  124. background-color: #21B6BA;
  125. }
  126. input[type="checkbox"].sr-only:focus + div {
  127. --tw-ring-color: rgba(33, 182, 186, 0.5);
  128. }
  129. /* Styles pour les tooltips Preline */
  130. .hs-tooltip {
  131. position: relative;
  132. }
  133. .hs-tooltip-content {
  134. position: absolute;
  135. bottom: 100%;
  136. left: 50%;
  137. transform: translateX(-50%);
  138. margin-bottom: 8px;
  139. white-space: nowrap;
  140. pointer-events: none;
  141. }
  142. .hs-tooltip-content.hs-tooltip-shown {
  143. pointer-events: auto;
  144. }
  145. /* Flèche pour le tooltip */
  146. .hs-tooltip-content::after {
  147. content: '';
  148. position: absolute;
  149. top: 100%;
  150. left: 50%;
  151. transform: translateX(-50%);
  152. border: 5px solid transparent;
  153. border-top-color: rgb(17, 24, 39);
  154. }
  155. @media (prefers-color-scheme: dark) {
  156. .hs-tooltip-content::after {
  157. border-top-color: rgb(51, 51, 51);
  158. }
  159. }
  160. /* Animation pour les dropdowns cyan */
  161. select.border-cyan-300 {
  162. transition: all 0.3s ease-in-out;
  163. }
  164. select.border-cyan-300:focus {
  165. box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.2);
  166. transform: scale(1.01);
  167. }
  168. /* Animation pour textarea cyan */
  169. textarea.border-cyan-300 {
  170. transition: all 0.3s ease-in-out;
  171. }
  172. textarea.border-cyan-300:focus {
  173. box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.2);
  174. transform: scale(1.005);
  175. }
  176. /* Styles pour les badges de personnes */
  177. .person-badge {
  178. display: inline-flex;
  179. align-items: center;
  180. gap: 0.5rem;
  181. padding: 0.375rem 0.75rem;
  182. background-color: #21B6BA;
  183. color: white;
  184. border-radius: 0.5rem;
  185. font-size: 0.875rem;
  186. transition: all 0.2s ease-in-out;
  187. animation: slideInBadge 0.3s ease-out;
  188. }
  189. .person-badge:hover {
  190. background-color: #1AA5A9;
  191. transform: translateY(-1px);
  192. box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  193. }
  194. .person-badge button {
  195. display: flex;
  196. align-items: center;
  197. justify-content: center;
  198. padding: 0;
  199. background: transparent;
  200. border: none;
  201. color: white;
  202. cursor: pointer;
  203. transition: transform 0.2s ease-in-out;
  204. }
  205. .person-badge button:hover {
  206. transform: scale(1.2);
  207. color: #21B6BA;
  208. }
  209. @keyframes slideInBadge {
  210. from {
  211. opacity: 0;
  212. transform: translateX(-10px) scale(0.9);
  213. }
  214. to {
  215. opacity: 1;
  216. transform: translateX(0) scale(1);
  217. }
  218. }
  219. @keyframes slideOutBadge {
  220. from {
  221. opacity: 1;
  222. transform: translateX(0) scale(1);
  223. }
  224. to {
  225. opacity: 0;
  226. transform: translateX(10px) scale(0.8);
  227. }
  228. }
  229. /* Style pour les notifications */
  230. .notification-badge {
  231. animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  232. }
  233. @keyframes pulse {
  234. 0%, 100% {
  235. opacity: 1;
  236. }
  237. 50% {
  238. opacity: .5;
  239. }
  240. }
  241. </style>
  242. </head>
  243. <body class="bg-gray-50 dark:bg-neutral-900">
  244. <?php
  245. $skip_default_content = true;
  246. include 'menu.php';
  247. ?>
  248. <!-- Content -->
  249. <div class="pt-12 lg:pt-16 lg:ps-64">
  250. <div class="min-h-screen p-4 md:p-8">
  251. <!-- Header avec notifications -->
  252. <div class="mb-6 flex justify-between items-start">
  253. <div>
  254. <h1 class="text-2xl font-semibold text-[#21B6BA] dark:text-[#21B6BA]">Demande d'Intégration</h1>
  255. <p class="mt-1 text-sm text-gray-600 dark:text-neutral-400">Créez une nouvelle demande d'intégration pour un collaborateur</p>
  256. </div>
  257. <!-- Zone de notification -->
  258. </div>
  259. <!-- Formulaire -->
  260. <form id="integration-form" class="space-y-6">
  261. <!-- Champs cachés (hidden) -->
  262. <input type="hidden" id="demande_id" name="demande_id" value="">
  263. <input type="hidden" id="statut_technique" name="statut_technique" value="nouveau">
  264. <input type="hidden" id="azure_user_id" name="azure_user_id" value="">
  265. <!-- Section: Informations de suivi -->
  266. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition animate-fade-in-up">
  267. <div class="p-6">
  268. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Informations de suivi</h2>
  269. <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
  270. <!-- Créé par (readonly) -->
  271. <div>
  272. <label for="cree_par" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  273. Créé par
  274. </label>
  275. <input type="text" id="cree_par" name="cree_par" readonly
  276. class="readonly-field py-3 px-4 block w-full border-gray-200 rounded-lg text-sm focus:border-gray-200 focus:ring-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:border-neutral-700"
  277. value="Sophie Bernard (RH)">
  278. </div>
  279. <!-- Date de création (readonly) -->
  280. <div>
  281. <label for="date_creation" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  282. Date de création
  283. </label>
  284. <input type="text" id="date_creation" name="date_creation" readonly
  285. class="readonly-field py-3 px-4 block w-full border-gray-200 rounded-lg text-sm focus:border-gray-200 focus:ring-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:border-neutral-700"
  286. value="03/11/2025 14:30">
  287. </div>
  288. <!-- Statut global (select) -->
  289. <div>
  290. <label for="statut_global" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  291. Statut de la demande
  292. </label>
  293. <div class="flex items-center gap-2">
  294. <select id="statut_global" name="statut_global" disabled
  295. class="py-3 px-4 pe-9 block w-full border border-gray-200 rounded-lg text-sm bg-gray-50 focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600">
  296. <option value="nouveau" selected>Nouveau</option>
  297. <option value="en_attente">En attente</option>
  298. <option value="en_cours">En cours</option>
  299. <option value="valide">Validé</option>
  300. <option value="supprime">Supprimé</option>
  301. </select>
  302. <button type="button" id="toggle_statut_global" class="shrink-0 inline-flex items-center justify-center size-10 text-gray-500 hover:text-[#21B6BA] dark:text-neutral-400 dark:hover:text-[#21B6BA] transition-colors">
  303. <svg class="shrink-0 size-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
  304. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path>
  305. </svg>
  306. </button>
  307. </div>
  308. </div>
  309. <!-- Site sélectionné -->
  310. <div class="md:col-span-3">
  311. <label for="site_selectionne" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  312. SITE SÉLECTIONNÉ <span class="text-red-500">*</span>
  313. </label>
  314. <select id="site_selectionne" name="site_selectionne" required
  315. class="py-3 px-4 pe-9 block w-full border-2 border-gray-200 bg-gray-100 rounded-lg text-sm text-gray-700 focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-cyan-600 dark:text-neutral-400">
  316. <option value="">Sélectionner un site</option>
  317. <option value="auto33">Auto 33</option>
  318. <option value="autoport">Auto Port</option>
  319. </select>
  320. <p class="error-message">Veuillez sélectionner un site</p>
  321. </div>
  322. </div>
  323. </div>
  324. </div>
  325. <!-- Section 1: Informations sur le collaborateur concerné -->
  326. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition animate-fade-in-up">
  327. <div class="p-6">
  328. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-6">Informations sur le collaborateur concerné</h2>
  329. <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
  330. <!-- Type de demande et Création de poste - Dropdowns côte à côte avec style cyan -->
  331. <div class="md:col-span-3 flex justify-start gap-4 mb-6">
  332. <div class="w-full max-w-md">
  333. <select id="type_demande" name="type_demande" required
  334. class="py-3 px-4 pe-9 block w-full border-2 border-gray-200 bg-gray-100 rounded-lg text-sm text-gray-700 focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-cyan-600 dark:text-neutral-400">
  335. <option value="recrutement">Recrutement</option>
  336. <option value="transfert">Transfert</option>
  337. <option value="succession">Succession de contrat</option>
  338. </select>
  339. </div>
  340. <div class="w-full max-w-md">
  341. <select id="creation_poste" name="creation_poste"
  342. class="py-3 px-4 pe-9 block w-full border-2 border-gray-200 bg-gray-100 rounded-lg text-sm text-gray-700 focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-cyan-600 dark:text-neutral-400">
  343. <option value="creation_poste">Création de poste</option>
  344. <option value="remplacement">Remplacement</option>
  345. </select>
  346. </div>
  347. </div>
  348. <!-- Champs pour RECRUTEMENT -->
  349. <div id="champs_recrutement" class="md:col-span-3 grid grid-cols-1 md:grid-cols-3 gap-6">
  350. <!-- Prénom -->
  351. <div>
  352. <label for="prenom" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  353. PRÉNOM <span class="text-red-500">*</span>
  354. </label>
  355. <input type="text" id="prenom" name="prenom" required
  356. class="py-3 px-4 block w-full border-gray-200 rounded-lg text-sm focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  357. placeholder="Jean">
  358. <p class="error-message">Veuillez saisir le prénom</p>
  359. </div>
  360. <!-- Nom -->
  361. <div>
  362. <label for="nom" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  363. NOM <span class="text-red-500">*</span>
  364. </label>
  365. <input type="text" id="nom" name="nom" required
  366. class="py-3 px-4 block w-full border-gray-200 rounded-lg text-sm focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  367. placeholder="DUPONT">
  368. <p class="error-message">Veuillez saisir le nom</p>
  369. </div>
  370. <!-- Date d'entrée -->
  371. <div>
  372. <label for="date_entree" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  373. DATE ENTRÉE <span class="text-red-500">*</span>
  374. </label>
  375. <div class="relative">
  376. <input type="text" id="date_entree" name="date_entree" required
  377. class="py-3 px-4 pe-11 block w-full border-gray-200 rounded-lg text-sm focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  378. placeholder="Sélectionner une date">
  379. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none pe-4">
  380. <svg class="shrink-0 size-4 text-gray-500 dark:text-neutral-400" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  381. <rect width="18" height="18" x="3" y="4" rx="2" ry="2"></rect>
  382. <line x1="16" x2="16" y1="2" y2="6"></line>
  383. <line x1="8" x2="8" y1="2" y2="6"></line>
  384. <line x1="3" x2="21" y1="10" y2="10"></line>
  385. </svg>
  386. </div>
  387. </div>
  388. </div>
  389. </div>
  390. <!-- Champs pour TRANSFERT -->
  391. <div id="champs_transfert" class="md:col-span-3 grid grid-cols-1 md:grid-cols-2 gap-6 conditional-field">
  392. <!-- Collaborateur existant -->
  393. <div>
  394. <label for="collaborateur_transfert" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  395. COLLABORATEUR EXISTANT <span class="text-red-500">*</span>
  396. </label>
  397. <select id="collaborateur_transfert" name="collaborateur_transfert"
  398. class="py-3 px-4 pe-9 block w-full border border-gray-200 rounded-lg text-sm bg-gray-50 focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600">
  399. <option value="">Sélectionner un collaborateur...</option>
  400. <option value="c1">GIRARD Céline</option>
  401. <option value="c2">LEROY Marc</option>
  402. <option value="c3">LAMBERT Julie</option>
  403. <option value="c4">DUBOIS Anne</option>
  404. </select>
  405. </div>
  406. <!-- Date du transfert -->
  407. <div>
  408. <label for="date_transfert" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  409. DATE DU TRANSFERT <span class="text-red-500">*</span>
  410. </label>
  411. <div class="relative">
  412. <input type="text" id="date_transfert" name="date_transfert"
  413. class="py-3 px-4 pe-11 block w-full border-gray-200 rounded-lg text-sm focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  414. placeholder="Sélectionner une date">
  415. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none pe-4">
  416. <svg class="shrink-0 size-4 text-gray-500 dark:text-neutral-400" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  417. <rect width="18" height="18" x="3" y="4" rx="2" ry="2"></rect>
  418. <line x1="16" x2="16" y1="2" y2="6"></line>
  419. <line x1="8" x2="8" y1="2" y2="6"></line>
  420. <line x1="3" x2="21" y1="10" y2="10"></line>
  421. </svg>
  422. </div>
  423. </div>
  424. </div>
  425. </div>
  426. <!-- Champs pour SUCCESSION DE CONTRAT -->
  427. <div id="champs_succession" class="md:col-span-3 grid grid-cols-1 md:grid-cols-2 gap-6 conditional-field">
  428. <!-- Collaborateur existant -->
  429. <div>
  430. <label for="collaborateur_succession" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  431. COLLABORATEUR EXISTANT <span class="text-red-500">*</span>
  432. </label>
  433. <select id="collaborateur_succession" name="collaborateur_succession"
  434. class="py-3 px-4 pe-9 block w-full border border-gray-200 rounded-lg text-sm bg-gray-50 focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600">
  435. <option value="">Sélectionner un collaborateur...</option>
  436. <option value="c1">GIRARD Céline</option>
  437. <option value="c2">LEROY Marc</option>
  438. <option value="c3">LAMBERT Julie</option>
  439. <option value="c4">DUBOIS Anne</option>
  440. </select>
  441. </div>
  442. <!-- Date du nouveau contrat -->
  443. <div>
  444. <label for="date_nouveau_contrat" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  445. DATE DU NOUVEAU CONTRAT <span class="text-red-500">*</span>
  446. </label>
  447. <div class="relative">
  448. <input type="text" id="date_nouveau_contrat" name="date_nouveau_contrat"
  449. class="py-3 px-4 pe-11 block w-full border-gray-200 rounded-lg text-sm focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  450. placeholder="Sélectionner une date">
  451. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none pe-4">
  452. <svg class="shrink-0 size-4 text-gray-500 dark:text-neutral-400" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  453. <rect width="18" height="18" x="3" y="4" rx="2" ry="2"></rect>
  454. <line x1="16" x2="16" y1="2" y2="6"></line>
  455. <line x1="8" x2="8" y1="2" y2="6"></line>
  456. <line x1="3" x2="21" y1="10" y2="10"></line>
  457. </svg>
  458. </div>
  459. </div>
  460. </div>
  461. </div>
  462. <!-- Champs de remplacement (conditionnels) -->
  463. <div id="champs_remplacement_poste" class="md:col-span-3 grid grid-cols-1 md:grid-cols-2 gap-6 conditional-field" style="display: none;">
  464. <!-- Collaborateur remplacé -->
  465. <div>
  466. <label for="collaborateur_remplace_poste" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  467. COLLABORATEUR REMPLACÉ
  468. </label>
  469. <select id="collaborateur_remplace_poste" name="collaborateur_remplace_poste"
  470. class="py-3 px-4 pe-9 block w-full border border-gray-200 rounded-lg text-sm bg-gray-50 focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600">
  471. <option value="">Sélectionner un collaborateur...</option>
  472. <option value="girard">GIRARD Céline</option>
  473. <option value="leroy">LEROY Marc</option>
  474. <option value="lambert">LAMBERT Julie</option>
  475. <option value="dubois">DUBOIS Anne</option>
  476. </select>
  477. </div>
  478. <!-- Date de sortie -->
  479. <div>
  480. <label for="date_sortie_remplace" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  481. DATE DE SORTIE
  482. </label>
  483. <div class="relative">
  484. <input type="text" id="date_sortie_remplace" name="date_sortie_remplace"
  485. class="py-3 px-4 pe-11 block w-full border-gray-200 rounded-lg text-sm focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  486. placeholder="Sélectionner une date">
  487. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none pe-4">
  488. <svg class="shrink-0 size-4 text-gray-500 dark:text-neutral-400" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  489. <rect width="18" height="18" x="3" y="4" rx="2" ry="2"></rect>
  490. <line x1="16" x2="16" y1="2" y2="6"></line>
  491. <line x1="8" x2="8" y1="2" y2="6"></line>
  492. <line x1="3" x2="21" y1="10" y2="10"></line>
  493. </svg>
  494. </div>
  495. </div>
  496. </div>
  497. </div>
  498. <!-- Type de contrat (commun à tous) -->
  499. <div class="md:col-span-3 mt-6 pt-6 border-t border-gray-200 dark:border-neutral-700">
  500. <label class="block text-sm font-medium mb-3 text-center text-gray-700 dark:text-neutral-300">
  501. TYPE DE CONTRAT : <span class="text-red-500">*</span>
  502. </label>
  503. <div class="flex flex-wrap justify-center gap-4">
  504. <div class="flex">
  505. <input type="radio" name="type_contrat" id="contrat_cdd" value="CDD" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  506. <label for="contrat_cdd" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">CDD</label>
  507. </div>
  508. <div class="flex">
  509. <input type="radio" name="type_contrat" id="contrat_cdi" value="CDI" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  510. <label for="contrat_cdi" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">CDI</label>
  511. </div>
  512. <div class="flex">
  513. <input type="radio" name="type_contrat" id="contrat_alternance" value="Alternance" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  514. <label for="contrat_alternance" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Alternance</label>
  515. </div>
  516. <div class="flex">
  517. <input type="radio" name="type_contrat" id="contrat_stage" value="Stage" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  518. <label for="contrat_stage" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Stage</label>
  519. </div>
  520. <div class="flex">
  521. <input type="radio" name="type_contrat" id="contrat_externe" value="Externe" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  522. <label for="contrat_externe" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Externe</label>
  523. </div>
  524. </div>
  525. </div>
  526. </div>
  527. </div>
  528. </div>
  529. <!-- Section CDD (conditionnelle) -->
  530. <div id="section_cdd" class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition conditional-field animate-fade-in-up">
  531. <div class="p-6">
  532. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-6">CDD</h2>
  533. <div class="grid grid-cols-1 md:grid-cols-4 gap-6">
  534. <!-- Motif du contrat -->
  535. <div class="md:col-span-4">
  536. <label for="motif_contrat" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  537. MOTIF DU CONTRAT :
  538. </label>
  539. <select id="motif_contrat" name="motif_contrat"
  540. class="py-3 px-4 pe-9 block w-full border border-gray-200 rounded-lg text-sm bg-gray-50 focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600">
  541. <option value="">Sélectionner un motif</option>
  542. <option value="remplacement" selected>Remplacement</option>
  543. <option value="accroissement">Accroissement temporaire d'activité</option>
  544. <option value="saisonnier">Emploi saisonnier</option>
  545. <option value="usage">Contrat d'usage</option>
  546. </select>
  547. </div>
  548. <!-- Date début contrat -->
  549. <div class="md:col-span-1">
  550. <label for="date_debut_contrat" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  551. DATE DÉBUT CONTRAT :
  552. </label>
  553. <div class="relative">
  554. <input type="text" id="date_debut_contrat" name="date_debut_contrat" readonly disabled
  555. class="readonly-field py-3 px-4 pe-11 block w-full border border-gray-200 rounded-lg text-sm dark:border-neutral-700"
  556. placeholder="Sélectionner une date">
  557. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none pe-4">
  558. <svg class="shrink-0 size-4 text-gray-500 dark:text-neutral-400" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  559. <rect width="18" height="18" x="3" y="4" rx="2" ry="2"></rect>
  560. <line x1="16" x2="16" y1="2" y2="6"></line>
  561. <line x1="8" x2="8" y1="2" y2="6"></line>
  562. <line x1="3" x2="21" y1="10" y2="10"></line>
  563. </svg>
  564. </div>
  565. </div>
  566. </div>
  567. <!-- Date fin contrat -->
  568. <div class="md:col-span-1">
  569. <label for="date_fin_contrat" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  570. DATE FIN CONTRAT :
  571. </label>
  572. <div class="relative">
  573. <input type="text" id="date_fin_contrat" name="date_fin_contrat"
  574. class="py-3 px-4 pe-11 block w-full border-gray-200 rounded-lg text-sm focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  575. placeholder="Sélectionner une date">
  576. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none pe-4">
  577. <svg class="shrink-0 size-4 text-gray-500 dark:text-neutral-400" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  578. <rect width="18" height="18" x="3" y="4" rx="2" ry="2"></rect>
  579. <line x1="16" x2="16" y1="2" y2="6"></line>
  580. <line x1="8" x2="8" y1="2" y2="6"></line>
  581. <line x1="3" x2="21" y1="10" y2="10"></line>
  582. </svg>
  583. </div>
  584. </div>
  585. </div>
  586. <!-- Horaires et jours de travail -->
  587. <div class="md:col-span-4">
  588. <div class="flex items-center justify-between mb-4">
  589. <label class="block text-sm font-medium text-gray-700 dark:text-neutral-300">
  590. HORAIRES ET JOURS DE TRAVAIL
  591. </label>
  592. <button type="button" id="btn-copier-lundi-cdd" class="py-2 px-3 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-700 hover:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700">
  593. Copier le lundi sur tous
  594. </button>
  595. </div>
  596. <!-- Jour de la semaine - Template -->
  597. <template id="template-jour-cdd">
  598. <div class="jour-item-cdd border border-gray-200 rounded-lg p-4 dark:border-neutral-700" data-jour="">
  599. <div class="flex items-center mb-4">
  600. <div class="flex items-center gap-3">
  601. <input type="checkbox" class="jour-actif-cdd shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA]">
  602. <label class="jour-label-cdd text-sm font-semibold text-gray-800 dark:text-white"></label>
  603. </div>
  604. </div>
  605. <div class="grid grid-cols-1 md:grid-cols-3 gap-4 jour-contenu-cdd" style="display: none;">
  606. <div>
  607. <label class="block text-xs font-medium mb-1 text-gray-600 dark:text-neutral-400">Heure de début</label>
  608. <input type="time" class="heure-debut-cdd py-2 px-3 block w-full border border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400">
  609. </div>
  610. <div>
  611. <label class="block text-xs font-medium mb-1 text-gray-600 dark:text-neutral-400">Heure de fin</label>
  612. <input type="time" class="heure-fin-cdd py-2 px-3 block w-full border border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400">
  613. </div>
  614. <div>
  615. <label class="block text-xs font-medium mb-1 text-gray-600 dark:text-neutral-400">Pause (minutes)</label>
  616. <input type="number" class="pause-duree-cdd py-2 px-3 block w-full border border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400" min="0" max="480" step="15" placeholder="0">
  617. </div>
  618. </div>
  619. </div>
  620. </template>
  621. <!-- Liste des jours -->
  622. <div id="liste-jours-cdd" class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
  623. <!-- Les jours seront générés par JavaScript -->
  624. </div>
  625. <!-- Champ caché pour stocker le résumé -->
  626. <input type="hidden" id="horaires_travail" name="horaires_travail" value="">
  627. </div>
  628. <!-- Besoin d'une lettre d'engagement ? -->
  629. <div class="md:col-span-1">
  630. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300 inline-flex items-center gap-2">
  631. BESOIN D'UNE LETTRE D'ENGAGEMENT ?
  632. <div class="hs-tooltip inline-block [--placement:top]">
  633. <button type="button" class="hs-tooltip-toggle">
  634. <svg class="shrink-0 size-4 text-gray-500 hover:text-gray-700 dark:text-neutral-400 dark:hover:text-neutral-300" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  635. <circle cx="12" cy="12" r="10"/>
  636. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/>
  637. <path d="M12 17h.01"/>
  638. </svg>
  639. <span class="hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 transition-opacity inline-block absolute invisible z-10 py-2 px-3 bg-gray-900 text-xs font-medium text-white rounded-lg shadow-sm dark:bg-neutral-700" role="tooltip">
  640. Nécessaire uniquement si le candidat est en poste actuellement.
  641. </span>
  642. </button>
  643. </div>
  644. </label>
  645. <div class="flex flex-col gap-2">
  646. <div class="flex">
  647. <input type="radio" name="lettre_engagement" id="lettre_engagement_oui" value="oui" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  648. <label for="lettre_engagement_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  649. </div>
  650. <div class="flex">
  651. <input type="radio" name="lettre_engagement" id="lettre_engagement_non" value="non" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  652. <label for="lettre_engagement_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  653. </div>
  654. </div>
  655. <p class="text-xs text-gray-500 mt-2 dark:text-neutral-500">Nécessaire uniquement si le candidat est en poste actuellement.</p>
  656. </div>
  657. <!-- Cette embauche est-elle une cooptation ? -->
  658. <div class="md:col-span-1">
  659. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300 inline-flex items-center gap-2">
  660. CETTE EMBAUCHE EST-ELLE UNE COOPTATION ?
  661. <div class="hs-tooltip inline-block [--placement:top]">
  662. <button type="button" class="hs-tooltip-toggle">
  663. <svg class="shrink-0 size-4 text-gray-500 hover:text-gray-700 dark:text-neutral-400 dark:hover:text-neutral-300" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  664. <circle cx="12" cy="12" r="10"/>
  665. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/>
  666. <path d="M12 17h.01"/>
  667. </svg>
  668. <span class="hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 transition-opacity inline-block absolute invisible z-10 py-2 px-3 bg-gray-900 text-xs font-medium text-white rounded-lg shadow-sm dark:bg-neutral-700" role="tooltip">
  669. Pensez à transmettre la fiche de cooptation.
  670. </span>
  671. </button>
  672. </div>
  673. </label>
  674. <div class="flex flex-col gap-2">
  675. <div class="flex">
  676. <input type="radio" name="cooptation" id="cooptation_oui" value="oui" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  677. <label for="cooptation_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  678. </div>
  679. <div class="flex">
  680. <input type="radio" name="cooptation" id="cooptation_non" value="non" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  681. <label for="cooptation_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  682. </div>
  683. </div>
  684. <p class="text-xs text-gray-500 mt-2 dark:text-neutral-500">Pensez à transmettre la fiche de cooptation.</p>
  685. </div>
  686. <!-- Reconnaissance handicap ? -->
  687. <div class="md:col-span-1">
  688. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  689. RECONNAISSANCE HANDICAP ?
  690. </label>
  691. <div class="flex flex-col gap-2">
  692. <div class="flex">
  693. <input type="radio" name="reconnaissance_handicap" id="handicap_oui" value="oui" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  694. <label for="handicap_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  695. </div>
  696. <div class="flex">
  697. <input type="radio" name="reconnaissance_handicap" id="handicap_non" value="non" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  698. <label for="handicap_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  699. </div>
  700. </div>
  701. <p class="text-xs text-gray-500 mt-2 dark:text-neutral-500">Pensez à joindre le justificatif dans LUCCA.</p>
  702. </div>
  703. <!-- Ce collaborateur était-il en intérim auparavant ? -->
  704. <div class="md:col-span-1">
  705. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  706. CE COLLABORATEUR ÉTAIT-IL EN INTÉRIM AUPARAVANT DANS NOTRE ENTREPRISE ?
  707. </label>
  708. <div class="flex flex-col gap-2">
  709. <div class="flex">
  710. <input type="radio" name="interim_avant" id="interim_oui" value="oui" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  711. <label for="interim_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  712. </div>
  713. <div class="flex">
  714. <input type="radio" name="interim_avant" id="interim_non" value="non" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  715. <label for="interim_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  716. </div>
  717. </div>
  718. </div>
  719. <!-- Date début période intérim (conditionnel) -->
  720. <div id="date_interim_container" class="md:col-span-1 conditional-field" style="display: none;">
  721. <label for="date_debut_interim" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  722. DATE DÉBUT PÉRIODE INTÉRIM
  723. </label>
  724. <div class="relative">
  725. <input type="text" id="date_debut_interim" name="date_debut_interim"
  726. class="py-3 px-4 pe-11 block w-full border-gray-200 rounded-lg text-sm focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  727. placeholder="Sélectionner une date">
  728. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none pe-4">
  729. <svg class="shrink-0 size-4 text-gray-500 dark:text-neutral-400" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  730. <rect width="18" height="18" x="3" y="4" rx="2" ry="2"></rect>
  731. <line x1="16" x2="16" y1="2" y2="6"></line>
  732. <line x1="8" x2="8" y1="2" y2="6"></line>
  733. <line x1="3" x2="21" y1="10" y2="10"></line>
  734. </svg>
  735. </div>
  736. </div>
  737. </div>
  738. <!-- Samedi travaillé ? -->
  739. <div class="md:col-span-1">
  740. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  741. SAMEDI TRAVAILLÉ ?
  742. </label>
  743. <div class="flex flex-col gap-2">
  744. <div class="flex">
  745. <input type="radio" name="samedi_travaille" id="samedi_oui" value="oui" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  746. <label for="samedi_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  747. </div>
  748. <div class="flex">
  749. <input type="radio" name="samedi_travaille" id="samedi_non" value="non" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  750. <label for="samedi_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  751. </div>
  752. </div>
  753. </div>
  754. <!-- Jours de repos -->
  755. <div id="jours_repos_container" class="md:col-span-1 conditional-field" style="display: none;">
  756. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  757. JOURS DE REPOS
  758. </label>
  759. <div class="flex flex-col gap-2">
  760. <div class="flex">
  761. <input type="radio" name="jour_repos" id="repos_lundi" value="lundi" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  762. <label for="repos_lundi" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Lundi</label>
  763. </div>
  764. <div class="flex">
  765. <input type="radio" name="jour_repos" id="repos_mardi" value="mardi" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  766. <label for="repos_mardi" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Mardi</label>
  767. </div>
  768. <div class="flex">
  769. <input type="radio" name="jour_repos" id="repos_mercredi" value="mercredi" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  770. <label for="repos_mercredi" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Mercredi</label>
  771. </div>
  772. <div class="flex">
  773. <input type="radio" name="jour_repos" id="repos_jeudi" value="jeudi" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  774. <label for="repos_jeudi" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Jeudi</label>
  775. </div>
  776. <div class="flex">
  777. <input type="radio" name="jour_repos" id="repos_vendredi" value="vendredi" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  778. <label for="repos_vendredi" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Vendredi</label>
  779. </div>
  780. </div>
  781. </div>
  782. <!-- Qui sera son manager ? -->
  783. <div class="md:col-span-2">
  784. <label for="manager_cdd" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  785. QUI SERA SON MANAGER ? <span class="text-red-500">*</span>
  786. </label>
  787. <input type="text" id="manager_cdd" name="manager_cdd" required
  788. class="py-3 px-4 block w-full border-gray-200 rounded-lg text-sm focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  789. placeholder="Ex: Sophie BERNARD">
  790. <p class="text-xs text-gray-500 mt-1 dark:text-neutral-500">Auto-complétion disponible</p>
  791. </div>
  792. <!-- Sera-t-il lui même manager ? -->
  793. <div class="md:col-span-4">
  794. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  795. SERA-T-IL LUI MÊME MANAGER :
  796. </label>
  797. <div class="flex flex-col gap-2">
  798. <div class="flex">
  799. <input type="radio" name="est_manager" id="est_manager_oui" value="oui" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  800. <label for="est_manager_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  801. </div>
  802. <div class="flex">
  803. <input type="radio" name="est_manager" id="est_manager_non" value="non" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  804. <label for="est_manager_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  805. </div>
  806. </div>
  807. </div>
  808. <!-- Quelles seront les personnes supervisées (conditionnel) -->
  809. <div id="personnes_supervisees_container" class="md:col-span-4 conditional-field is-active">
  810. <div class="grid grid-cols-1 lg:grid-cols-2 gap-4 items-start">
  811. <!-- Colonne gauche : Zone d'affichage des personnes -->
  812. <div>
  813. <label class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  814. QUELLES SERONT LES PERSONNES SUPERVISÉES
  815. </label>
  816. <div id="selected_persons" class="flex flex-wrap gap-2 min-h-[40px] p-3 border-2 border-cyan-300 bg-gray-100 rounded-lg dark:bg-neutral-900 dark:border-cyan-700">
  817. <span class="text-xs text-gray-400 dark:text-neutral-500" id="placeholder_persons">Ajoutez des personnes...</span>
  818. </div>
  819. <p class="text-xs text-gray-500 mt-1 dark:text-neutral-500">Merci d'indiquer le prénom et le nom de chaque personne.</p>
  820. </div>
  821. <!-- Colonne droite : Champ d'ajout -->
  822. <div class="flex flex-col justify-center h-full">
  823. <label for="add_personne_libre" class="block text-xs font-medium mb-1 text-gray-600 dark:text-neutral-400">
  824. Ajouter :
  825. </label>
  826. <div class="flex items-center gap-2">
  827. <input type="text" id="add_personne_libre" placeholder="Prénom NOM"
  828. class="py-2 px-3 block w-full border border-gray-200 rounded-lg text-sm focus:border-[#21B6BA] focus:ring-[#21B6BA] dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400">
  829. <button type="button" id="btn_add_personne" class="py-2 px-4 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-[#21B6BA] text-white hover:bg-[#1AA5A9] disabled:opacity-50 disabled:pointer-events-none whitespace-nowrap">
  830. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  831. <path d="M5 12h14"/><path d="M12 5v14"/>
  832. </svg>
  833. Ajouter
  834. </button>
  835. </div>
  836. </div>
  837. </div>
  838. <!-- Champ caché pour stocker les valeurs -->
  839. <input type="hidden" id="personnes_supervisees_hidden" name="personnes_supervisees" value="">
  840. </div>
  841. </div>
  842. </div>
  843. </div>
  844. <!-- Section 2: Informations personnelles -->
  845. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition">
  846. <div class="p-6">
  847. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Informations personnelles</h2>
  848. <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
  849. <!-- Date de naissance -->
  850. <div>
  851. <label for="date_naissance" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  852. Date de naissance <span class="text-red-500">*</span>
  853. </label>
  854. <div class="relative">
  855. <input type="text" id="date_naissance" name="date_naissance" required
  856. class="py-3 px-4 pe-11 block w-full border border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  857. placeholder="Sélectionner une date">
  858. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none pe-4">
  859. <svg class="shrink-0 size-4 text-gray-500 dark:text-neutral-400" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  860. <rect width="18" height="18" x="3" y="4" rx="2" ry="2"></rect>
  861. <line x1="16" x2="16" y1="2" y2="6"></line>
  862. <line x1="8" x2="8" y1="2" y2="6"></line>
  863. <line x1="3" x2="21" y1="10" y2="10"></line>
  864. </svg>
  865. </div>
  866. </div>
  867. </div>
  868. <!-- Email professionnel -->
  869. <div class="max-w-sm">
  870. <label for="email_pro" class="block text-sm font-medium mb-2 dark:text-white">
  871. Adresse mail professionnelle (Office 365) <span class="text-red-500">*</span>
  872. </label>
  873. <input type="email" id="email_pro" name="email_pro" required
  874. class="py-2.5 sm:py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  875. placeholder="jean.dupont@sipa.fr">
  876. <p class="text-xs text-gray-500 mt-1 dark:text-neutral-500">Email généré automatiquement</p>
  877. </div>
  878. <!-- Email personnel -->
  879. <div class="max-w-sm">
  880. <label for="email_perso" class="block text-sm font-medium mb-2 dark:text-white">Email personnel</label>
  881. <input type="email" id="email_perso" name="email_perso"
  882. class="py-2.5 sm:py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  883. placeholder="jean.dupont@gmail.com">
  884. </div>
  885. <!-- Téléphone -->
  886. <div class="max-w-sm">
  887. <label for="telephone" class="block text-sm font-medium mb-2 dark:text-white">Numéro de téléphone</label>
  888. <input type="tel" id="telephone" name="telephone"
  889. class="py-2.5 sm:py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  890. placeholder="06 12 34 56 78">
  891. </div>
  892. </div>
  893. </div>
  894. </div>
  895. <!-- Section 3: CONTRAT -->
  896. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition">
  897. <div class="p-6">
  898. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-6">CONTRAT</h2>
  899. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  900. <!-- Panneau gauche : Champs de saisie -->
  901. <div class="space-y-6">
  902. <!-- SERVICE -->
  903. <div>
  904. <label for="service_contrat" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  905. SERVICE <span class="text-red-500">*</span>
  906. </label>
  907. <select id="service_contrat" name="service_contrat" required
  908. class="py-3 px-4 pe-9 block w-full border border-gray-200 rounded-lg text-sm bg-gray-50 focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600">
  909. <option value="">Sélectionner un service</option>
  910. <option value="vente_pra" selected>Vente P.R.A.</option>
  911. <option value="vente_neuf">Vente Neuf</option>
  912. <option value="apres_vente">Après-Vente</option>
  913. <option value="pieces">Pièces</option>
  914. <option value="accueil">Accueil</option>
  915. <option value="administration">Administration</option>
  916. <option value="autre">Autre IMPORTANT A FAIRE </option>
  917. </select>
  918. </div>
  919. <!-- INTITULE DE POSTE -->
  920. <div>
  921. <label for="intitule_poste_contrat" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  922. INTITULE DE POSTE <span class="text-red-500">*</span>
  923. </label>
  924. <select id="intitule_poste_contrat" name="intitule_poste_contrat" required
  925. class="py-3 px-4 pe-9 block w-full border-2 border-gray-200 bg-gray-100 rounded-lg text-sm text-gray-700 focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-cyan-600 dark:text-neutral-400">
  926. <option value="">Sélectionner un intitulé</option>
  927. <option value="chef_ventes_pra" selected>Chef des ventes PRA</option>
  928. <option value="conseiller_commercial">Conseiller commercial</option>
  929. <option value="responsable_atelier">Responsable atelier</option>
  930. <option value="mecanicien">Mécanicien</option>
  931. <option value="chef_equipe">Chef d'équipe</option>
  932. <option value="comptable">Comptable</option>
  933. </select>
  934. </div>
  935. <!-- ECHELON -->
  936. <div>
  937. <label for="echelon_contrat" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  938. ECHELON <span class="text-red-500">*</span>
  939. </label>
  940. <select id="echelon_contrat" name="echelon_contrat" required
  941. class="py-3 px-4 pe-9 block w-full border border-gray-200 rounded-lg text-sm bg-gray-50 focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600">
  942. <option value="">Sélectionner un échelon</option>
  943. <option value="III_A">III A</option>
  944. <option value="III_B">III B</option>
  945. <option value="III_C">III C</option>
  946. <option value="IV_A">IV A</option>
  947. <option value="IV_B">IV B</option>
  948. <option value="IV_C">IV C</option>
  949. </select>
  950. </div>
  951. <!-- STATUT -->
  952. <div>
  953. <label for="statut_contrat" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  954. STATUT <span class="text-red-500">*</span>
  955. </label>
  956. <select id="statut_contrat" name="statut_contrat" required
  957. class="py-3 px-4 pe-9 block w-full border border-gray-200 rounded-lg text-sm bg-gray-50 focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600">
  958. <option value="">Sélectionner un statut</option>
  959. <option value="cadre" selected>Cadre</option>
  960. <option value="non_cadre">Non-cadre</option>
  961. <option value="agent_maitrise">Agent de maîtrise</option>
  962. </select>
  963. </div>
  964. </div>
  965. <!-- Panneau droit : Tableau des minima -->
  966. <div>
  967. <!-- Tableau des minima conventionnels -->
  968. <div id="tableau_minima">
  969. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  970. Minima conventionnels (Convention collective de l'automobile)
  971. </label>
  972. <div class="overflow-x-auto">
  973. <table class="min-w-full divide-y divide-gray-200 dark:divide-neutral-700">
  974. <thead class="bg-gray-50 dark:bg-neutral-800">
  975. <tr>
  976. <th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:text-neutral-400">Échelon</th>
  977. <th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:text-neutral-400">Minima 35h00</th>
  978. <th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:text-neutral-400">Minima 37h00</th>
  979. <th scope="col" class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:text-neutral-400">Minima 39h00</th>
  980. </tr>
  981. </thead>
  982. <tbody class="bg-white divide-y divide-gray-200 dark:bg-neutral-900 dark:divide-neutral-700">
  983. <tr class="hover:bg-gray-50 dark:hover:bg-neutral-800">
  984. <td class="px-4 py-3 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">III A</td>
  985. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">3804</td>
  986. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4075,61</td>
  987. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4347,21</td>
  988. </tr>
  989. <tr class="hover:bg-gray-50 dark:hover:bg-neutral-800">
  990. <td class="px-4 py-3 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">III B</td>
  991. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4093</td>
  992. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4385,24</td>
  993. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4677,48</td>
  994. </tr>
  995. <tr class="hover:bg-gray-50 dark:hover:bg-neutral-800">
  996. <td class="px-4 py-3 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">III C</td>
  997. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4383</td>
  998. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4695,95</td>
  999. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">5008,89</td>
  1000. </tr>
  1001. </tbody>
  1002. </table>
  1003. </div>
  1004. </div>
  1005. <!-- Message alternatif pour "Autre" -->
  1006. <div id="message_service_autre" class="hidden">
  1007. <div class="flex items-start gap-3 p-4 bg-orange-50 border border-orange-200 rounded-lg dark:bg-orange-900/20 dark:border-orange-800">
  1008. <svg class="shrink-0 size-5 text-orange-600 dark:text-orange-400 mt-0.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  1009. <path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/>
  1010. <path d="M12 9v4"/>
  1011. <path d="M12 17h.01"/>
  1012. </svg>
  1013. <div>
  1014. <h3 class="text-sm font-semibold text-orange-800 dark:text-orange-300">Information importante</h3>
  1015. <p class="mt-1 text-sm text-orange-700 dark:text-orange-400">
  1016. Prenez contact avec le service RH pour vérifier ces valeurs (échelon, statut, rémunération, etc.).
  1017. </p>
  1018. </div>
  1019. </div>
  1020. </div>
  1021. </div>
  1022. </div>
  1023. </div>
  1024. </div>
  1025. <!-- Section 3: Informations de rémunération -->
  1026. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition">
  1027. <div class="p-6">
  1028. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">REMUNERATION</h2>
  1029. <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
  1030. <!-- Temps partiel (radio) -->
  1031. <div class="md:col-span-2">
  1032. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1033. TEMPS PARTIEL ?
  1034. </label>
  1035. <div class="flex gap-4">
  1036. <div class="flex">
  1037. <input type="radio" name="temps_partiel" id="temps_partiel_oui" value="oui" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1038. <label for="temps_partiel_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1039. </div>
  1040. <div class="flex">
  1041. <input type="radio" name="temps_partiel" id="temps_partiel_non" value="non" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  1042. <label for="temps_partiel_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1043. </div>
  1044. </div>
  1045. </div>
  1046. <!-- Champs conditionnels si temps partiel = Oui -->
  1047. <div id="champs_temps_partiel" class="md:col-span-2 grid grid-cols-1 md:grid-cols-2 gap-6 conditional-field">
  1048. <!-- Horaires et jours travaillés -->
  1049. <div class="md:col-span-2">
  1050. <label for="horaires_temps_partiel" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1051. HORAIRES ET JOURS TRAVAILLES
  1052. </label>
  1053. <textarea id="horaires_temps_partiel" name="horaires_temps_partiel" rows="4"
  1054. class="py-3 px-4 block w-full border-2 border-cyan-300 bg-gray-100 rounded-lg text-sm text-gray-700 focus:border-cyan-500 focus:ring-cyan-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-cyan-700 dark:text-neutral-400"
  1055. placeholder=""></textarea>
  1056. </div>
  1057. <!-- Salaire temps partiel -->
  1058. <div class="max-w-sm">
  1059. <label for="salaire_temps_partiel" class="block text-sm font-medium mb-2 dark:text-white">
  1060. SALAIRE TEMPS PARTIEL
  1061. </label>
  1062. <div class="relative">
  1063. <input type="text" id="salaire_temps_partiel" name="salaire_temps_partiel"
  1064. class="py-2.5 sm:py-3 px-4 ps-9 pe-16 block w-full border border-gray-200 rounded-lg sm:text-sm focus:z-10 focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  1065. placeholder="0.00">
  1066. <div class="absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4">
  1067. <span class="text-gray-500 dark:text-neutral-500">€</span>
  1068. </div>
  1069. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-4">
  1070. <span class="text-gray-500 dark:text-neutral-500">EUR</span>
  1071. </div>
  1072. </div>
  1073. </div>
  1074. </div>
  1075. <!-- Base horaire (select) -->
  1076. <div class="md:col-span-2">
  1077. <label for="base_horaire" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1078. BASE HORAIRE
  1079. </label>
  1080. <select id="base_horaire" name="base_horaire"
  1081. class="py-3 px-4 pe-9 block w-full border border-gray-200 rounded-lg text-sm bg-gray-50 focus:border-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600">
  1082. <option value="">Sélectionner une base horaire</option>
  1083. <option value="35" data-hours="35">35h (Temps plein)</option>
  1084. <option value="39" data-hours="35">Forfait 39h avec 2h sup + 1 JRTT (2h)</option>
  1085. <option value="30" data-hours="30">30h</option>
  1086. <option value="28" data-hours="28">28h</option>
  1087. <option value="24" data-hours="24">24h</option>
  1088. <option value="20" data-hours="20">20h</option>
  1089. </select>
  1090. </div>
  1091. <!-- Salaire mensuel brut (number) -->
  1092. <div class="max-w-sm space-y-3">
  1093. <div>
  1094. <label for="salaire" class="block text-sm font-medium mb-2 dark:text-white">
  1095. SALAIRE MENSUEL BRUT SUR LA BASE HORAIRE CHOISIE <span class="text-red-500">*</span>
  1096. </label>
  1097. <div class="relative">
  1098. <input type="text" id="salaire" name="salaire" required
  1099. class="py-2.5 sm:py-3 px-4 ps-9 pe-16 block w-full border border-gray-200 rounded-lg sm:text-sm focus:z-10 focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  1100. placeholder="0.00">
  1101. <div class="absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4">
  1102. <span class="text-gray-500 dark:text-neutral-500">€</span>
  1103. </div>
  1104. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-4">
  1105. <span class="text-gray-500 dark:text-neutral-500">EUR</span>
  1106. </div>
  1107. </div>
  1108. </div>
  1109. <!-- Équivalent 35h (readonly) -->
  1110. <div>
  1111. <label for="salaire_35h" class="block text-sm font-medium mb-2 dark:text-white">
  1112. EQUIVALENT 35h :
  1113. </label>
  1114. <div class="relative">
  1115. <input type="text" id="salaire_35h" name="salaire_35h" readonly
  1116. class="readonly-field py-2.5 sm:py-3 px-4 ps-9 pe-16 block w-full border border-gray-200 rounded-lg sm:text-sm dark:border-neutral-700"
  1117. placeholder="0.00">
  1118. <div class="absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4">
  1119. <span class="text-gray-500 dark:text-neutral-500">€</span>
  1120. </div>
  1121. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-4">
  1122. <span class="text-gray-500 dark:text-neutral-500">EUR</span>
  1123. </div>
  1124. </div>
  1125. </div>
  1126. </div>
  1127. <!-- Rémunération variable (radio) -->
  1128. <div class="md:col-span-2">
  1129. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1130. REMUNERATION VARIABLE
  1131. </label>
  1132. <div class="flex gap-4">
  1133. <div class="flex">
  1134. <input type="radio" name="remuneration_variable" id="remuneration_variable_oui" value="oui" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1135. <label for="remuneration_variable_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1136. </div>
  1137. <div class="flex">
  1138. <input type="radio" name="remuneration_variable" id="remuneration_variable_non" value="non" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  1139. <label for="remuneration_variable_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1140. </div>
  1141. </div>
  1142. </div>
  1143. <!-- Montant variable (number) - Conditionnel -->
  1144. <div id="montant_variable_container" class="conditional-field max-w-sm">
  1145. <label for="montant_variable" class="block text-sm font-medium mb-2 dark:text-white">
  1146. Montant variable annuel (€)
  1147. </label>
  1148. <div class="relative">
  1149. <input type="text" id="montant_variable" name="montant_variable"
  1150. class="py-2.5 sm:py-3 px-4 ps-9 pe-16 block w-full border border-gray-200 rounded-lg sm:text-sm focus:z-10 focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  1151. placeholder="0.00">
  1152. <div class="absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4">
  1153. <span class="text-gray-500 dark:text-neutral-500">€</span>
  1154. </div>
  1155. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-4">
  1156. <span class="text-gray-500 dark:text-neutral-500">EUR</span>
  1157. </div>
  1158. </div>
  1159. </div>
  1160. <!-- Avantages en nature (number) -->
  1161. <div>
  1162. <label for="avantages_nature" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1163. Avantages en nature (€/an)
  1164. </label>
  1165. <input type="number" id="avantages_nature" name="avantages_nature" min="0" step="0.01"
  1166. class="py-3 px-4 block w-full border border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  1167. placeholder="0">
  1168. </div>
  1169. <!-- Véhicule de fonction (radio) -->
  1170. <div class="md:col-span-2">
  1171. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1172. Véhicule de fonction ?
  1173. </label>
  1174. <div class="flex gap-4">
  1175. <div class="flex">
  1176. <input type="radio" name="vehicule" id="vehicule_non" value="non" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  1177. <label for="vehicule_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1178. </div>
  1179. <div class="flex">
  1180. <input type="radio" name="vehicule" id="vehicule_oui" value="oui" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1181. <label for="vehicule_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1182. </div>
  1183. </div>
  1184. </div>
  1185. </div>
  1186. </div>
  1187. </div>
  1188. <!-- Section 4: Formation et diplômes -->
  1189. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition">
  1190. <div class="p-6">
  1191. <h2 class="text-lg font-semibold text-[#21B6BA] dark:text-[#21B6BA] mb-4">Formation et diplômes</h2>
  1192. <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
  1193. <!-- CV (file) -->
  1194. <div>
  1195. <label for="cv" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1196. CV <span class="text-red-500">*</span>
  1197. </label>
  1198. <input type="file" id="cv" name="cv" required accept=".pdf,.doc,.docx"
  1199. class="block w-full text-sm text-gray-500 file:me-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-[#21B6BA] file:text-white hover:file:bg-[#1AA5A9] file:disabled:opacity-50 file:disabled:pointer-events-none dark:text-neutral-500 dark:file:bg-[#21B6BA] dark:hover:file:bg-[#1AA5A9]">
  1200. <p class="mt-1 text-xs text-gray-500 dark:text-neutral-500">PDF, DOC ou DOCX. Max 5MB.</p>
  1201. </div>
  1202. <!-- Pièce d'identité (file) -->
  1203. <div>
  1204. <label for="piece_identite" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1205. Pièce d'identité <span class="text-red-500">*</span>
  1206. </label>
  1207. <input type="file" id="piece_identite" name="piece_identite" required accept=".pdf,.jpg,.jpeg,.png"
  1208. class="block w-full text-sm text-gray-500 file:me-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-[#21B6BA] file:text-white hover:file:bg-[#1AA5A9] file:disabled:opacity-50 file:disabled:pointer-events-none dark:text-neutral-500 dark:file:bg-[#21B6BA] dark:hover:file:bg-[#1AA5A9]">
  1209. <p class="mt-1 text-xs text-gray-500 dark:text-neutral-500">PDF ou image. Max 5MB.</p>
  1210. </div>
  1211. <!-- Autres documents (file) -->
  1212. <div class="md:col-span-2">
  1213. <label for="autres_documents" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1214. Autres documents (RQTH, justificatifs, etc.)
  1215. </label>
  1216. <input type="file" id="autres_documents" name="autres_documents[]" multiple accept=".pdf,.jpg,.jpeg,.png,.doc,.docx"
  1217. class="block w-full text-sm text-gray-500 file:me-4 file:py-2 file:px-4 file:rounded-lg file:border-0 file:text-sm file:font-semibold file:bg-[#21B6BA] file:text-white hover:file:bg-[#1AA5A9] file:disabled:opacity-50 file:disabled:pointer-events-none dark:text-neutral-500 dark:file:bg-[#21B6BA] dark:hover:file:bg-[#1AA5A9]">
  1218. <p class="mt-1 text-xs text-gray-500 dark:text-neutral-500">Plusieurs fichiers possibles. Max 5MB par fichier.</p>
  1219. </div>
  1220. </div>
  1221. </div>
  1222. </div>
  1223. <!-- Section 5: INFORMATIQUE -->
  1224. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition">
  1225. <div class="p-6">
  1226. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-6">INFORMATIQUE</h2>
  1227. <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
  1228. <!-- Compte Windows avec bouton Copier -->
  1229. <div>
  1230. <label for="compte_windows" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1231. Compte Windows
  1232. </label>
  1233. <div class="flex gap-2">
  1234. <input type="text" id="compte_windows" name="compte_windows" readonly
  1235. class="readonly-field py-2.5 sm:py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm dark:border-neutral-600"
  1236. value="augustin.podvin">
  1237. <button type="button" onclick="copierTexte('compte_windows', event)" class="py-2.5 sm:py-3 px-4 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-[#21B6BA] text-white hover:bg-[#1AA5A9] focus:outline-hidden focus:bg-[#1AA5A9] disabled:opacity-50 disabled:pointer-events-none">
  1238. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  1239. <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>
  1240. <path d="M4 16c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h8c1.1 0 2 .9 2 2"></path>
  1241. </svg>
  1242. Copier
  1243. </button>
  1244. </div>
  1245. </div>
  1246. <!-- Compte Office 365 avec bouton Copier -->
  1247. <div>
  1248. <label for="compte_office365" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1249. Compte Office 365
  1250. </label>
  1251. <div class="flex gap-2">
  1252. <input type="text" id="compte_office365" name="compte_office365" readonly
  1253. class="readonly-field py-2.5 sm:py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm dark:border-neutral-600"
  1254. value="augustin.podvin@sipa-automobiles.fr">
  1255. <button type="button" onclick="copierTexte('compte_office365', event)" class="py-2.5 sm:py-3 px-4 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-[#21B6BA] text-white hover:bg-[#1AA5A9] focus:outline-hidden focus:bg-[#1AA5A9] disabled:opacity-50 disabled:pointer-events-none">
  1256. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  1257. <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>
  1258. <path d="M4 16c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h8c1.1 0 2 .9 2 2"></path>
  1259. </svg>
  1260. Copier
  1261. </button>
  1262. </div>
  1263. </div>
  1264. <!-- MDP Temporaire avec bouton Copier -->
  1265. <div>
  1266. <label for="mot_de_passe" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1267. MDP Temporaire
  1268. </label>
  1269. <div class="flex gap-2">
  1270. <input type="text" id="mot_de_passe" name="mot_de_passe" readonly
  1271. class="readonly-field py-2.5 sm:py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm dark:border-neutral-600"
  1272. value="Sip@OGU4my">
  1273. <button type="button" onclick="copierTexte('mot_de_passe', event)" class="py-2.5 sm:py-3 px-4 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-[#21B6BA] text-white hover:bg-[#1AA5A9] focus:outline-hidden focus:bg-[#1AA5A9] disabled:opacity-50 disabled:pointer-events-none">
  1274. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  1275. <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>
  1276. <path d="M4 16c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h8c1.1 0 2 .9 2 2"></path>
  1277. </svg>
  1278. Copier
  1279. </button>
  1280. </div>
  1281. </div>
  1282. <div class="space-y-8 mt-8 pt-8 border-t border-gray-200 dark:border-neutral-700">
  1283. <!-- TÉLÉPHONE MOBILE -->
  1284. <div class="border-b border-gray-200 dark:border-neutral-700 pb-6">
  1285. <div class="flex items-center gap-3 mb-4">
  1286. <h3 class="text-base font-semibold text-gray-800 dark:text-white">TÉLÉPHONE MOBILE</h3>
  1287. <label for="switch-telephone-mobile" class="relative inline-flex items-center cursor-pointer">
  1288. <input type="checkbox" id="switch-telephone-mobile" class="sr-only peer">
  1289. <div class="relative w-11 h-6 bg-gray-200 peer-focus:outline-hidden peer-focus:ring-4 peer-focus:ring-[#21B6BA]/30 rounded-full peer dark:bg-neutral-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-neutral-600 peer-checked:bg-[#21B6BA]"></div>
  1290. </label>
  1291. </div>
  1292. <div id="contenu-telephone-mobile" class="space-y-4 conditional-field">
  1293. <div>
  1294. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1295. RÉCUPÈRE T-IL LE MOBILE D'UN COLLABORATEUR ?
  1296. </label>
  1297. <div class="flex gap-4">
  1298. <div class="flex">
  1299. <input type="radio" name="recupere_mobile" id="recupere_mobile_oui" value="oui" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1300. <label for="recupere_mobile_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1301. </div>
  1302. <div class="flex">
  1303. <input type="radio" name="recupere_mobile" id="recupere_mobile_non" value="non" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  1304. <label for="recupere_mobile_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1305. </div>
  1306. </div>
  1307. </div>
  1308. <!-- Numéro de ligne récupéré (affiché si recupere_mobile = oui) -->
  1309. <div id="numero_ligne_recupere_container" class="conditional-field">
  1310. <label for="numero_ligne_recupere" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1311. Numéro de ligne récupéré
  1312. </label>
  1313. <input type="tel" id="numero_ligne_recupere" name="numero_ligne_recupere"
  1314. class="py-2.5 sm:py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  1315. placeholder="06 12 34 56 78">
  1316. </div>
  1317. <!-- NOUVEAU MOBILE (affiché seulement si recupere_mobile = non) -->
  1318. <div id="nouveau_mobile_container" class="conditional-field is-active">
  1319. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1320. NOUVEAU MOBILE
  1321. </label>
  1322. <div class="flex gap-4">
  1323. <div class="flex">
  1324. <input type="radio" name="nouveau_mobile" id="mobile_iphone" value="iphone" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1325. <label for="mobile_iphone" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">IPHONE</label>
  1326. </div>
  1327. <div class="flex">
  1328. <input type="radio" name="nouveau_mobile" id="mobile_android" value="android" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1329. <label for="mobile_android" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">ANDROID</label>
  1330. </div>
  1331. </div>
  1332. </div>
  1333. </div>
  1334. </div>
  1335. <!-- TÉLÉPHONE FIXE -->
  1336. <div class="border-b border-gray-200 dark:border-neutral-700 pb-6">
  1337. <div class="flex items-center gap-3 mb-4">
  1338. <h3 class="text-base font-semibold text-gray-800 dark:text-white">TÉLÉPHONE FIXE</h3>
  1339. <label for="switch-telephone-fixe" class="relative inline-flex items-center cursor-pointer">
  1340. <input type="checkbox" id="switch-telephone-fixe" class="sr-only peer">
  1341. <div class="relative w-11 h-6 bg-gray-200 peer-focus:outline-hidden peer-focus:ring-4 peer-focus:ring-[#21B6BA]/30 rounded-full peer dark:bg-neutral-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-neutral-600 peer-checked:bg-[#21B6BA]"></div>
  1342. </label>
  1343. </div>
  1344. <div id="contenu-telephone-fixe" class="space-y-4 conditional-field">
  1345. <div>
  1346. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1347. RÉCUPÈRE T-IL LE TELEPHONE D'UN COLLABORATEUR ?
  1348. </label>
  1349. <div class="flex gap-4">
  1350. <div class="flex">
  1351. <input type="radio" name="recupere_telephone" id="recupere_telephone_oui" value="oui" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1352. <label for="recupere_telephone_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1353. </div>
  1354. <div class="flex">
  1355. <input type="radio" name="recupere_telephone" id="recupere_telephone_non" value="non" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  1356. <label for="recupere_telephone_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1357. </div>
  1358. </div>
  1359. </div>
  1360. <!-- Numéro de ligne récupéré (affiché si recupere_telephone = oui) -->
  1361. <div id="numero_ligne_recupere_fixe_container" class="conditional-field">
  1362. <label for="numero_ligne_recupere_fixe" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1363. Numéro de ligne récupéré
  1364. </label>
  1365. <input type="tel" id="numero_ligne_recupere_fixe" name="numero_ligne_recupere_fixe"
  1366. class="py-2.5 sm:py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  1367. placeholder="01 23 45 67 89">
  1368. </div>
  1369. <!-- NOUVEAU TEL FIXE (affiché seulement si recupere_telephone = non) -->
  1370. <div id="nouveau_tel_fixe_container" class="conditional-field is-active">
  1371. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1372. NOUVEAU TEL FIXE
  1373. </label>
  1374. <div class="flex gap-4">
  1375. <div class="flex">
  1376. <input type="radio" name="nouveau_tel_fixe" id="tel_classique" value="classique" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1377. <label for="tel_classique" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">POSTE CLASSIQUE</label>
  1378. </div>
  1379. <div class="flex">
  1380. <input type="radio" name="nouveau_tel_fixe" id="tel_sans_fil" value="sans_fil" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1381. <label for="tel_sans_fil" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">POSTE SANS FIL</label>
  1382. </div>
  1383. </div>
  1384. </div>
  1385. </div>
  1386. </div>
  1387. <!-- ORDINATEUR -->
  1388. <div>
  1389. <div class="flex items-center gap-3 mb-4">
  1390. <h3 class="text-base font-semibold text-gray-800 dark:text-white">ORDINATEUR</h3>
  1391. <label for="switch-ordinateur" class="relative inline-flex items-center cursor-pointer">
  1392. <input type="checkbox" id="switch-ordinateur" class="sr-only peer">
  1393. <div class="relative w-11 h-6 bg-gray-200 peer-focus:outline-hidden peer-focus:ring-4 peer-focus:ring-[#21B6BA]/30 rounded-full peer dark:bg-neutral-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-neutral-600 peer-checked:bg-[#21B6BA]"></div>
  1394. </label>
  1395. </div>
  1396. <div id="contenu-ordinateur" class="space-y-6 conditional-field">
  1397. <!-- Question récupération PC -->
  1398. <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
  1399. <div>
  1400. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1401. RÉCUPÈRE T-IL LE PC D'UN COLLABORATEUR ?
  1402. </label>
  1403. <div class="flex gap-4">
  1404. <div class="flex">
  1405. <input type="radio" name="recupere_pc" id="recupere_pc_oui" value="oui" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1406. <label for="recupere_pc_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1407. </div>
  1408. <div class="flex">
  1409. <input type="radio" name="recupere_pc" id="recupere_pc_non" value="non" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  1410. <label for="recupere_pc_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1411. </div>
  1412. </div>
  1413. </div>
  1414. <!-- NOUVEAU PC (affiché seulement si recupere_pc = non) -->
  1415. <div id="nouveau_pc_container" class="conditional-field is-active">
  1416. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1417. NOUVEAU PC
  1418. </label>
  1419. <div class="flex gap-4">
  1420. <div class="flex">
  1421. <input type="radio" name="nouveau_pc" id="pc_fixe" value="fixe" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1422. <label for="pc_fixe" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Fixe</label>
  1423. </div>
  1424. <div class="flex">
  1425. <input type="radio" name="nouveau_pc" id="pc_portable" value="portable" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1426. <label for="pc_portable" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Portable</label>
  1427. </div>
  1428. </div>
  1429. </div>
  1430. <!-- ECRAN SUPPLEMENTAIRE -->
  1431. <div>
  1432. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1433. ECRAN SUPPLEMENTAIRE
  1434. </label>
  1435. <div class="flex gap-4">
  1436. <div class="flex">
  1437. <input type="radio" name="ecran_supplementaire" id="ecran_supp_oui" value="oui" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1438. <label for="ecran_supp_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1439. </div>
  1440. <div class="flex">
  1441. <input type="radio" name="ecran_supplementaire" id="ecran_supp_non" value="non" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1442. <label for="ecran_supp_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1443. </div>
  1444. </div>
  1445. </div>
  1446. </div>
  1447. <!-- Numéro de ligne récupéré (affiché si recupere_pc = oui) -->
  1448. <div id="numero_ligne_recupere_pc_container" class="conditional-field">
  1449. <label for="numero_ligne_recupere_pc" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1450. Numéro de ligne récupéré
  1451. </label>
  1452. <input type="text" id="numero_ligne_recupere_pc" name="numero_ligne_recupere_pc"
  1453. class="py-2.5 sm:py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  1454. placeholder="">
  1455. </div>
  1456. <!-- Logiciels nécessaires -->
  1457. <div>
  1458. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1459. Logiciels nécessaires
  1460. </label>
  1461. <div class="grid grid-cols-1 md:grid-cols-2 gap-2">
  1462. <div class="flex">
  1463. <input type="checkbox" name="logiciels[]" value="office365" id="log_office" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1464. <label for="log_office" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">Office 365</label>
  1465. </div>
  1466. <div class="flex">
  1467. <input type="checkbox" name="logiciels[]" value="teams" id="log_teams" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1468. <label for="log_teams" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">Microsoft Teams</label>
  1469. </div>
  1470. <div class="flex">
  1471. <input type="checkbox" name="logiciels[]" value="crm" id="log_crm" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1472. <label for="log_crm" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">CRM (Salesforce)</label>
  1473. </div>
  1474. <div class="flex">
  1475. <input type="checkbox" name="logiciels[]" value="erp" id="log_erp" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1476. <label for="log_erp" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">ERP</label>
  1477. </div>
  1478. <div class="flex">
  1479. <input type="checkbox" name="logiciels[]" value="adobe" id="log_adobe" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1480. <label for="log_adobe" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">Suite Adobe</label>
  1481. </div>
  1482. <div class="flex">
  1483. <input type="checkbox" name="logiciels[]" value="autocad" id="log_autocad" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1484. <label for="log_autocad" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">AutoCAD</label>
  1485. </div>
  1486. </div>
  1487. </div>
  1488. <!-- Listes de diffusion -->
  1489. <div>
  1490. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1491. Listes de diffusion
  1492. </label>
  1493. <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
  1494. <!-- Colonne LISTES DE DIFFUSION -->
  1495. <div>
  1496. <label class="block text-sm font-semibold mb-3 text-gray-800 dark:text-white">
  1497. LISTES DE DIFFUSION
  1498. </label>
  1499. <div class="space-y-2">
  1500. <div class="flex">
  1501. <input type="checkbox" name="listes_diffusion[]" value="LD_ADMINISTRATIF_VN_HYUNDAI_AUTO_33" id="ld_admin_vn_hyundai" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800" checked>
  1502. <label for="ld_admin_vn_hyundai" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_ADMINISTRATIF_VN_HYUNDAI_AUTO_33</label>
  1503. </div>
  1504. <div class="flex">
  1505. <input type="checkbox" name="listes_diffusion[]" value="LD_ADMINISTRATIF_VN_VO_FCA_AUTO_33" id="ld_admin_vn_vo_fca" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1506. <label for="ld_admin_vn_vo_fca" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_ADMINISTRATIF_VN_VO_FCA_AUTO_33</label>
  1507. </div>
  1508. <div class="flex">
  1509. <input type="checkbox" name="listes_diffusion[]" value="LD_COMPTABILITE_AUTO_33" id="ld_comptabilite" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1510. <label for="ld_comptabilite" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_COMPTABILITE_AUTO_33</label>
  1511. </div>
  1512. <div class="flex">
  1513. <input type="checkbox" name="listes_diffusion[]" value="LD_FIAT_AUTO_33" id="ld_fiat" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1514. <label for="ld_fiat" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_FIAT_AUTO_33</label>
  1515. </div>
  1516. <div class="flex">
  1517. <input type="checkbox" name="listes_diffusion[]" value="LD_MAGASIN_AUTO_33" id="ld_magasin" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1518. <label for="ld_magasin" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_MAGASIN_AUTO_33</label>
  1519. </div>
  1520. <div class="flex">
  1521. <input type="checkbox" name="listes_diffusion[]" value="LD_RESTITUTION_LOA_LLD_AUTO_33" id="ld_restitution" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1522. <label for="ld_restitution" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_RESTITUTION_LOA_LLD_AUTO_33</label>
  1523. </div>
  1524. <div class="flex">
  1525. <input type="checkbox" name="listes_diffusion[]" value="LD_SAV_AUTO_33" id="ld_sav" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1526. <label for="ld_sav" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_SAV_AUTO_33</label>
  1527. </div>
  1528. <div class="flex">
  1529. <input type="checkbox" name="listes_diffusion[]" value="LD_SERVICE_VN_FIAT_AUTO_33" id="ld_service_vn_fiat" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1530. <label for="ld_service_vn_fiat" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_SERVICE_VN_FIAT_AUTO_33</label>
  1531. </div>
  1532. <div class="flex">
  1533. <input type="checkbox" name="listes_diffusion[]" value="LD_SERVICE_VN_HYUNDAI_AUTO_33" id="ld_service_vn_hyundai" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1534. <label for="ld_service_vn_hyundai" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_SERVICE_VN_HYUNDAI_AUTO_33</label>
  1535. </div>
  1536. <div class="flex">
  1537. <input type="checkbox" name="listes_diffusion[]" value="LD_SERVICE_VO_AUTO_33" id="ld_service_vo" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1538. <label for="ld_service_vo" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_SERVICE_VO_AUTO_33</label>
  1539. </div>
  1540. </div>
  1541. </div>
  1542. <!-- Colonne ORGA -->
  1543. <div>
  1544. <label class="block text-sm font-semibold mb-3 text-gray-800 dark:text-white">
  1545. ORGA
  1546. </label>
  1547. <div class="space-y-2">
  1548. <div class="flex">
  1549. <input type="checkbox" name="listes_diffusion[]" value="LD_COMPTABILITES" id="ld_comptabilites" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1550. <label for="ld_comptabilites" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_COMPTABILITES</label>
  1551. </div>
  1552. <div class="flex">
  1553. <input type="checkbox" name="listes_diffusion[]" value="LD_DIRECTEURS" id="ld_directeurs" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1554. <label for="ld_directeurs" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_DIRECTEURS</label>
  1555. </div>
  1556. <div class="flex">
  1557. <input type="checkbox" name="listes_diffusion[]" value="LD_SECRETAIRES_APV" id="ld_secretaires_apv" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1558. <label for="ld_secretaires_apv" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_SECRETAIRES_APV</label>
  1559. </div>
  1560. <div class="flex">
  1561. <input type="checkbox" name="listes_diffusion[]" value="LD_SECRETAIRES_VN" id="ld_secretaires_vn" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1562. <label for="ld_secretaires_vn" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_SECRETAIRES_VN</label>
  1563. </div>
  1564. <div class="flex">
  1565. <input type="checkbox" name="listes_diffusion[]" value="LD_SECRETAIRES_VO" id="ld_secretaires_vo" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1566. <label for="ld_secretaires_vo" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_SECRETAIRES_VO</label>
  1567. </div>
  1568. <div class="flex">
  1569. <input type="checkbox" name="listes_diffusion[]" value="LD_RESPONSABLES_APV_SIPA" id="ld_resp_apv" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1570. <label for="ld_resp_apv" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_RESPONSABLES_APV_SIPA</label>
  1571. </div>
  1572. <div class="flex">
  1573. <input type="checkbox" name="listes_diffusion[]" value="LD_RESPONSABLES_ATELIER_SIPA" id="ld_resp_atelier" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1574. <label for="ld_resp_atelier" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_RESPONSABLES_ATELIER_SIPA</label>
  1575. </div>
  1576. <div class="flex">
  1577. <input type="checkbox" name="listes_diffusion[]" value="LD_RESPONSABLES_MAGASIN_SIPA" id="ld_resp_magasin" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1578. <label for="ld_resp_magasin" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_RESPONSABLES_MAGASIN_SIPA</label>
  1579. </div>
  1580. <div class="flex">
  1581. <input type="checkbox" name="listes_diffusion[]" value="LD_RESPONSABLES_VN_SIPA" id="ld_resp_vn" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1582. <label for="ld_resp_vn" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_RESPONSABLES_VN_SIPA</label>
  1583. </div>
  1584. <div class="flex">
  1585. <input type="checkbox" name="listes_diffusion[]" value="LD_RESPONSABLES_VO_SIPA" id="ld_resp_vo" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1586. <label for="ld_resp_vo" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_RESPONSABLES_VO_SIPA</label>
  1587. </div>
  1588. <div class="flex">
  1589. <input type="checkbox" name="listes_diffusion[]" value="LD_MDS" id="ld_mds" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1590. <label for="ld_mds" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_MDS</label>
  1591. </div>
  1592. </div>
  1593. </div>
  1594. </div>
  1595. </div>
  1596. <!-- Accès spécifiques -->
  1597. <div>
  1598. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1599. Accès spécifiques
  1600. </label>
  1601. <div class="space-y-2">
  1602. <div class="flex">
  1603. <input type="checkbox" name="acces[]" value="vpn" id="acc_vpn" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1604. <label for="acc_vpn" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">Accès VPN</label>
  1605. </div>
  1606. <div class="flex">
  1607. <input type="checkbox" name="acces[]" value="serveur_fichiers" id="acc_files" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1608. <label for="acc_files" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">Serveur de fichiers</label>
  1609. </div>
  1610. <div class="flex">
  1611. <input type="checkbox" name="acces[]" value="admin" id="acc_admin" class="shrink-0 mt-0.5 border-gray-200 rounded text-[#21B6BA] focus:ring-[#21B6BA] disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-[#21B6BA] dark:checked:border-[#21B6BA] dark:focus:ring-offset-gray-800">
  1612. <label for="acc_admin" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">Droits administrateur</label>
  1613. </div>
  1614. </div>
  1615. </div>
  1616. <!-- Intitulé de signature -->
  1617. <div>
  1618. <label for="intitule_signature" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1619. Intitulé de signature
  1620. </label>
  1621. <input type="text" id="intitule_signature" name="intitule_signature"
  1622. class="py-2.5 sm:py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  1623. placeholder="Ex: Directeur Commercial">
  1624. </div>
  1625. </div>
  1626. </div>
  1627. </div>
  1628. </div>
  1629. </div>
  1630. <!-- Section 6: Commentaires et informations supplémentaires -->
  1631. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition mt-6">
  1632. <div class="p-6">
  1633. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Commentaires et informations supplémentaires</h2>
  1634. <div class="space-y-6">
  1635. <!-- Commentaires RH (textarea) -->
  1636. <div>
  1637. <label for="commentaires_rh" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1638. Commentaires internes RH
  1639. </label>
  1640. <textarea id="commentaires_rh" name="commentaires_rh" rows="4"
  1641. class="py-3 px-4 block w-full border border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  1642. placeholder="Remarques particulières, informations supplémentaires..."></textarea>
  1643. </div>
  1644. <!-- Remarques IT (textarea) -->
  1645. <div>
  1646. <label for="remarques_it" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1647. Remarques IT
  1648. </label>
  1649. <textarea id="remarques_it" name="remarques_it" rows="3"
  1650. class="py-3 px-4 block w-full border border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600"
  1651. placeholder="Besoins spécifiques, configurations particulières..."></textarea>
  1652. </div>
  1653. <!-- Validation de lecture (checkbox) -->
  1654. <div class="flex items-start">
  1655. <input type="checkbox" id="validation_lecture" name="validation_lecture" required class="shrink-0 mt-1 border-gray-200 rounded text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800">
  1656. <label for="validation_lecture" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">
  1657. Je confirme avoir lu et vérifié toutes les informations saisies. <span class="text-red-500">*</span>
  1658. </label>
  1659. </div>
  1660. </div>
  1661. </div>
  1662. </div>
  1663. <!-- Section Component -->
  1664. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition mt-6">
  1665. <div class="p-6">
  1666. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-6">Component</h2>
  1667. <div class="space-y-8">
  1668. <!-- Input with leading button and trailing span -->
  1669. <div>
  1670. <label for="hs-leading-button-add-on-with-leading-and-leading" class="sr-only">URL</label>
  1671. <div class="flex rounded-lg">
  1672. <button type="button" class="size-11.5 shrink-0 inline-flex justify-center items-center gap-x-2 text-sm font-semibold rounded-s-md border border-transparent bg-[#21B6BA] text-white hover:bg-[#1AA5A9] focus:outline-hidden focus:bg-[#1AA5A9] disabled:opacity-50 disabled:pointer-events-none">
  1673. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  1674. <circle cx="11" cy="11" r="8"></circle>
  1675. <path d="m21 21-4.3-4.3"></path>
  1676. </svg>
  1677. </button>
  1678. <input type="text" id="hs-leading-button-add-on-with-leading-and-leading" name="hs-leading-button-add-on-with-leading-and-leading" class="py-2.5 sm:py-3 px-4 block w-full border-gray-200 rounded-0 sm:text-sm focus:z-10 focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600" placeholder="Entrez votre URL">
  1679. <span class="px-4 inline-flex items-center min-w-fit rounded-e-md border border-s-0 border-gray-200 bg-gray-50 text-sm dark:bg-neutral-700 dark:border-neutral-700">
  1680. <span class="text-sm text-gray-500 dark:text-neutral-400">http://</span>
  1681. </span>
  1682. </div>
  1683. </div>
  1684. <!-- Search box with loading -->
  1685. <div>
  1686. <label for="hs-search-box-with-loading-5" class="block text-sm font-medium mb-2 dark:text-white">Search</label>
  1687. <div class="relative flex rounded-lg">
  1688. <input type="text" id="hs-search-box-with-loading-5" name="hs-search-box-with-loading-5" class="py-2.5 sm:py-3 px-4 ps-11 block w-full border-gray-200 rounded-s-lg sm:text-sm focus:z-10 focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600" placeholder="Input search">
  1689. <div class="absolute inset-y-0 start-0 z-10 flex items-center pointer-events-none ps-4">
  1690. <svg class="shrink-0 size-4 text-gray-400 dark:text-neutral-500" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  1691. <circle cx="11" cy="11" r="8"></circle>
  1692. <path d="m21 21-4.3-4.3"></path>
  1693. </svg>
  1694. </div>
  1695. <button type="button" class="py-3 px-4 inline-flex justify-center items-center gap-x-2 text-sm font-semibold rounded-e-md border border-transparent bg-[#21B6BA] text-white hover:bg-[#1AA5A9] focus:outline-hidden focus:bg-[#1AA5A9] disabled:opacity-50 disabled:pointer-events-none">
  1696. <span class="animate-spin inline-block size-4 border-3 border-current border-t-transparent text-white rounded-full" role="status" aria-label="loading">
  1697. <span class="sr-only">Loading...</span>
  1698. </span>
  1699. Search
  1700. </button>
  1701. </div>
  1702. </div>
  1703. <!-- Horizontal list group with checkboxes -->
  1704. <div>
  1705. <label class="block text-sm font-medium mb-3 dark:text-white">Sélection multiple</label>
  1706. <ul class="flex flex-col sm:flex-row">
  1707. <li class="inline-flex items-center gap-x-2.5 py-3 px-4 text-sm font-medium bg-white border border-gray-200 text-gray-800 -mt-px first:rounded-t-lg first:mt-0 last:rounded-b-lg sm:-ms-px sm:mt-0 sm:first:rounded-se-none sm:first:rounded-es-lg sm:last:rounded-es-none sm:last:rounded-se-lg dark:bg-neutral-800 dark:border-neutral-700 dark:text-white">
  1708. <div class="relative flex items-start w-full">
  1709. <div class="flex items-center h-5">
  1710. <input id="hs-horizontal-list-group-item-checkbox-1" name="hs-horizontal-list-group-item-checkbox-1" type="checkbox" class="border-gray-200 rounded-sm disabled:opacity-50 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800" checked="">
  1711. </div>
  1712. <label for="hs-horizontal-list-group-item-checkbox-1" class="ms-3.5 block w-full text-sm text-gray-600 dark:text-neutral-500">
  1713. Chris Lynch
  1714. </label>
  1715. </div>
  1716. </li>
  1717. <li class="inline-flex items-center gap-x-2.5 py-3 px-4 text-sm font-medium bg-white border border-gray-200 text-gray-800 -mt-px first:rounded-t-lg first:mt-0 last:rounded-b-lg sm:-ms-px sm:mt-0 sm:first:rounded-se-none sm:first:rounded-es-lg sm:last:rounded-es-none sm:last:rounded-se-lg dark:bg-neutral-800 dark:border-neutral-700 dark:text-white">
  1718. <div class="relative flex items-start w-full">
  1719. <div class="flex items-center h-5">
  1720. <input id="hs-horizontal-list-group-item-checkbox-2" name="hs-horizontal-list-group-item-checkbox-2" type="checkbox" class="border-gray-200 rounded-sm disabled:opacity-50 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800">
  1721. </div>
  1722. <label for="hs-horizontal-list-group-item-checkbox-2" class="ms-3.5 block w-full text-sm text-gray-600 dark:text-neutral-500">
  1723. Maria Guan
  1724. </label>
  1725. </div>
  1726. </li>
  1727. <li class="inline-flex items-center gap-x-2.5 py-3 px-4 text-sm font-medium bg-white border border-gray-200 text-gray-800 -mt-px first:rounded-t-lg first:mt-0 last:rounded-b-lg sm:-ms-px sm:mt-0 sm:first:rounded-se-none sm:first:rounded-es-lg sm:last:rounded-es-none sm:last:rounded-se-lg dark:bg-neutral-800 dark:border-neutral-700 dark:text-white">
  1728. <div class="relative flex items-start w-full">
  1729. <div class="flex items-center h-5">
  1730. <input id="hs-horizontal-list-group-item-checkbox-3" name="hs-horizontal-list-group-item-checkbox-3" type="checkbox" class="border-gray-200 rounded-sm disabled:opacity-50 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800">
  1731. </div>
  1732. <label for="hs-horizontal-list-group-item-checkbox-3" class="ms-3.5 block w-full text-sm text-gray-600 dark:text-neutral-500">
  1733. Bob Arum
  1734. </label>
  1735. </div>
  1736. </li>
  1737. </ul>
  1738. </div>
  1739. <!-- Radio buttons with descriptions -->
  1740. <div>
  1741. <label class="block text-sm font-medium mb-3 dark:text-white">Options avec descriptions</label>
  1742. <div class="grid space-y-3">
  1743. <div class="relative flex items-start">
  1744. <div class="flex items-center h-5 mt-1">
  1745. <input id="hs-radio-delete" name="hs-radio-with-description" type="radio" class="border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800" aria-describedby="hs-radio-delete-description" checked="">
  1746. </div>
  1747. <label for="hs-radio-delete" class="ms-3">
  1748. <span class="block text-sm font-semibold text-gray-800 dark:text-neutral-300">Delete</span>
  1749. <span id="hs-radio-delete-description" class="block text-sm text-gray-600 dark:text-neutral-500">Notify me when this action happens.</span>
  1750. </label>
  1751. </div>
  1752. <div class="relative flex items-start">
  1753. <div class="flex items-center h-5 mt-1">
  1754. <input id="hs-radio-archive" name="hs-radio-with-description" type="radio" class="border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800" aria-describedby="hs-radio-archive-description">
  1755. </div>
  1756. <label for="hs-radio-archive" class="ms-3">
  1757. <span class="block text-sm font-semibold text-gray-800 dark:text-neutral-300">Archive</span>
  1758. <span id="hs-radio-archive-description" class="block text-sm text-gray-600 dark:text-neutral-500">Notify me when this action happens.</span>
  1759. </label>
  1760. </div>
  1761. </div>
  1762. </div>
  1763. <!-- Vertical radio group -->
  1764. <div>
  1765. <label class="block text-sm font-medium mb-3 dark:text-white">Groupe de radios vertical</label>
  1766. <div class="flex flex-col gap-y-3">
  1767. <div class="flex">
  1768. <input type="radio" name="hs-radio-vertical-group" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 checked:border-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800" id="hs-radio-vertical-group-1" checked="">
  1769. <label for="hs-radio-vertical-group-1" class="text-sm text-gray-500 ms-2 dark:text-neutral-400">Apple</label>
  1770. </div>
  1771. <div class="flex">
  1772. <input type="radio" name="hs-radio-vertical-group" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 checked:border-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800" id="hs-radio-vertical-group-2">
  1773. <label for="hs-radio-vertical-group-2" class="text-sm text-gray-500 ms-2 dark:text-neutral-400">Pear</label>
  1774. </div>
  1775. <div class="flex">
  1776. <input type="radio" name="hs-radio-vertical-group" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 checked:border-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800" id="hs-radio-vertical-group-3">
  1777. <label for="hs-radio-vertical-group-3" class="text-sm text-gray-500 ms-2 dark:text-neutral-400">Orange</label>
  1778. </div>
  1779. </div>
  1780. </div>
  1781. </div>
  1782. </div>
  1783. </div>
  1784. <!-- Boutons d'action -->
  1785. <div class="flex justify-end gap-3">
  1786. <button type="button" class="py-3 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700">
  1787. Annuler
  1788. </button>
  1789. <button type="button" class="py-3 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-gray-600 text-white hover:bg-gray-700 focus:outline-hidden focus:bg-gray-700 disabled:opacity-50 disabled:pointer-events-none">
  1790. Enregistrer en brouillon
  1791. </button>
  1792. <button type="submit" class="py-3 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-[#21B6BA] text-white hover:bg-[#1AA5A9] focus:outline-hidden focus:bg-[#1AA5A9] disabled:opacity-50 disabled:pointer-events-none">
  1793. Soumettre la demande
  1794. </button>
  1795. </div>
  1796. </form>
  1797. </div>
  1798. </div>
  1799. <!-- Flatpickr JS -->
  1800. <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
  1801. <script src="https://cdn.jsdelivr.net/npm/flatpickr/dist/l10n/fr.js"></script>
  1802. <!-- Preline JS -->
  1803. <script src="https://cdn.jsdelivr.net/npm/preline/dist/preline.js"></script>
  1804. <!-- Script pour les champs conditionnels -->
  1805. <script>
  1806. document.addEventListener('DOMContentLoaded', function() {
  1807. // Initialisation des datepickers avec flatpickr
  1808. const datepickerConfig = {
  1809. locale: 'fr',
  1810. dateFormat: 'd/m/Y',
  1811. altInput: true,
  1812. altFormat: 'd/m/Y',
  1813. allowInput: true
  1814. };
  1815. // Initialiser tous les champs de date
  1816. const dateEntreePicker = flatpickr('#date_entree', {
  1817. ...datepickerConfig,
  1818. onChange: function(selectedDates, dateStr, instance) {
  1819. // Copier la valeur vers date_debut_contrat
  1820. const dateDebutContrat = document.getElementById('date_debut_contrat');
  1821. if (dateDebutContrat && selectedDates.length > 0) {
  1822. // Utiliser le format d'affichage (altInput) qui est plus lisible
  1823. const altInput = instance.altInput;
  1824. if (altInput && altInput.value) {
  1825. dateDebutContrat.value = altInput.value;
  1826. } else {
  1827. // Formater la date en format français si altInput n'est pas disponible
  1828. const date = selectedDates[0];
  1829. const day = String(date.getDate()).padStart(2, '0');
  1830. const month = String(date.getMonth() + 1).padStart(2, '0');
  1831. const year = date.getFullYear();
  1832. dateDebutContrat.value = `${day}/${month}/${year}`;
  1833. }
  1834. } else if (dateDebutContrat && !dateStr) {
  1835. // Vider le champ si la date est supprimée
  1836. dateDebutContrat.value = '';
  1837. }
  1838. }
  1839. });
  1840. // Copier la valeur initiale de date_entree vers date_debut_contrat si elle existe
  1841. setTimeout(() => {
  1842. const dateEntreeInput = document.getElementById('date_entree');
  1843. const dateDebutContrat = document.getElementById('date_debut_contrat');
  1844. if (dateEntreeInput && dateDebutContrat && dateEntreeInput.value) {
  1845. // Récupérer la valeur depuis l'input alternatif de flatpickr si disponible
  1846. const dateEntreePicker = dateEntreeInput._flatpickr;
  1847. if (dateEntreePicker && dateEntreePicker.altInput && dateEntreePicker.altInput.value) {
  1848. dateDebutContrat.value = dateEntreePicker.altInput.value;
  1849. } else if (dateEntreeInput.value) {
  1850. dateDebutContrat.value = dateEntreeInput.value;
  1851. }
  1852. }
  1853. }, 100);
  1854. flatpickr('#date_transfert', datepickerConfig);
  1855. flatpickr('#date_nouveau_contrat', datepickerConfig);
  1856. flatpickr('#date_sortie_remplace', datepickerConfig);
  1857. // date_debut_contrat n'est plus initialisé avec flatpickr car il est disabled et copie automatiquement depuis date_entree
  1858. flatpickr('#date_fin_contrat', datepickerConfig);
  1859. flatpickr('#date_debut_interim', datepickerConfig);
  1860. flatpickr('#date_naissance', {
  1861. ...datepickerConfig,
  1862. maxDate: 'today',
  1863. defaultDate: new Date(2000, 0, 1)
  1864. });
  1865. // Gestion du type de demande (Recrutement/Transfert/Succession)
  1866. const typeDemandeSelect = document.getElementById('type_demande');
  1867. const champsRecrutement = document.getElementById('champs_recrutement');
  1868. const champsTransfert = document.getElementById('champs_transfert');
  1869. const champsSuccession = document.getElementById('champs_succession');
  1870. function updateTypeDemande() {
  1871. const value = typeDemandeSelect.value;
  1872. // Masquer tous les champs
  1873. champsRecrutement.classList.remove('is-active');
  1874. champsTransfert.classList.remove('is-active');
  1875. champsSuccession.classList.remove('is-active');
  1876. // Afficher les champs correspondants
  1877. if (value === 'recrutement') {
  1878. champsRecrutement.classList.add('is-active');
  1879. champsRecrutement.style.display = 'grid';
  1880. champsTransfert.style.display = 'none';
  1881. champsSuccession.style.display = 'none';
  1882. } else if (value === 'transfert') {
  1883. champsTransfert.classList.add('is-active');
  1884. champsRecrutement.style.display = 'none';
  1885. champsTransfert.style.display = 'grid';
  1886. champsSuccession.style.display = 'none';
  1887. } else if (value === 'succession') {
  1888. champsSuccession.classList.add('is-active');
  1889. champsRecrutement.style.display = 'none';
  1890. champsTransfert.style.display = 'none';
  1891. champsSuccession.style.display = 'grid';
  1892. }
  1893. }
  1894. typeDemandeSelect.addEventListener('change', updateTypeDemande);
  1895. // Initialiser au chargement (afficher recrutement par défaut)
  1896. updateTypeDemande();
  1897. // Gestion du type de contrat (affiche section CDD complète)
  1898. const typeContratRadios = document.querySelectorAll('input[name="type_contrat"]');
  1899. const sectionCDD = document.getElementById('section_cdd');
  1900. typeContratRadios.forEach(radio => {
  1901. radio.addEventListener('change', function() {
  1902. if (this.value === 'CDD') {
  1903. sectionCDD.classList.add('is-active');
  1904. } else {
  1905. sectionCDD.classList.remove('is-active');
  1906. }
  1907. });
  1908. });
  1909. // Gestion du temps partiel (affiche champs horaires et salaire)
  1910. const tempsPartielRadios = document.querySelectorAll('input[name="temps_partiel"]');
  1911. const champsTempsPartiel = document.getElementById('champs_temps_partiel');
  1912. tempsPartielRadios.forEach(radio => {
  1913. radio.addEventListener('change', function() {
  1914. if (this.value === 'oui') {
  1915. champsTempsPartiel.classList.add('is-active');
  1916. } else {
  1917. champsTempsPartiel.classList.remove('is-active');
  1918. }
  1919. });
  1920. });
  1921. // Gestion de l'intérim (affiche date début période intérim)
  1922. const interimRadios = document.querySelectorAll('input[name="interim_avant"]');
  1923. const dateInterimContainer = document.getElementById('date_interim_container');
  1924. function toggleDateInterim() {
  1925. const interimValue = document.querySelector('input[name="interim_avant"]:checked');
  1926. if (interimValue && interimValue.value === 'oui') {
  1927. dateInterimContainer.style.display = 'block';
  1928. setTimeout(() => {
  1929. dateInterimContainer.classList.add('is-active');
  1930. }, 10);
  1931. } else {
  1932. dateInterimContainer.classList.remove('is-active');
  1933. setTimeout(() => {
  1934. if (!dateInterimContainer.classList.contains('is-active')) {
  1935. dateInterimContainer.style.display = 'none';
  1936. }
  1937. }, 500);
  1938. }
  1939. }
  1940. interimRadios.forEach(radio => {
  1941. radio.addEventListener('change', toggleDateInterim);
  1942. });
  1943. // Initialiser l'état au chargement
  1944. toggleDateInterim();
  1945. // Gestion du samedi travaillé (affiche jours de repos)
  1946. const samediTravailleRadios = document.querySelectorAll('input[name="samedi_travaille"]');
  1947. const joursReposContainer = document.getElementById('jours_repos_container');
  1948. function toggleJoursRepos() {
  1949. const samediTravaille = document.querySelector('input[name="samedi_travaille"]:checked');
  1950. if (samediTravaille && samediTravaille.value === 'oui') {
  1951. joursReposContainer.style.display = 'block';
  1952. setTimeout(() => {
  1953. joursReposContainer.classList.add('is-active');
  1954. }, 10);
  1955. } else {
  1956. joursReposContainer.classList.remove('is-active');
  1957. setTimeout(() => {
  1958. if (!joursReposContainer.classList.contains('is-active')) {
  1959. joursReposContainer.style.display = 'none';
  1960. }
  1961. }, 500);
  1962. }
  1963. }
  1964. samediTravailleRadios.forEach(radio => {
  1965. radio.addEventListener('change', toggleJoursRepos);
  1966. });
  1967. // Initialiser l'état au chargement
  1968. toggleJoursRepos();
  1969. // Gestion du champ "Est manager" (affiche personnes supervisées)
  1970. const estManagerRadios = document.querySelectorAll('input[name="est_manager"]');
  1971. const personnesSupervisees = document.getElementById('personnes_supervisees_container');
  1972. estManagerRadios.forEach(radio => {
  1973. radio.addEventListener('change', function() {
  1974. if (this.value === 'oui') {
  1975. personnesSupervisees.classList.add('is-active');
  1976. } else {
  1977. personnesSupervisees.classList.remove('is-active');
  1978. }
  1979. });
  1980. });
  1981. // Gestion des personnes supervisées (système de badges)
  1982. const selectedPersonsContainer = document.getElementById('selected_persons');
  1983. const placeholderPersons = document.getElementById('placeholder_persons');
  1984. const addPersonneLibre = document.getElementById('add_personne_libre');
  1985. const btnAddPersonne = document.getElementById('btn_add_personne');
  1986. const personnesSuperviseeHidden = document.getElementById('personnes_supervisees_hidden');
  1987. let selectedPersons = [];
  1988. function updateHiddenField() {
  1989. personnesSuperviseeHidden.value = selectedPersons.join(', ');
  1990. }
  1991. function togglePlaceholder() {
  1992. if (selectedPersons.length > 0) {
  1993. placeholderPersons.style.display = 'none';
  1994. } else {
  1995. placeholderPersons.style.display = 'inline';
  1996. }
  1997. }
  1998. function addPerson(name) {
  1999. if (!name || name.trim() === '') return;
  2000. const trimmedName = name.trim();
  2001. // Vérifier si la personne n'est pas déjà ajoutée
  2002. if (selectedPersons.includes(trimmedName)) {
  2003. return;
  2004. }
  2005. selectedPersons.push(trimmedName);
  2006. // Marquer le formulaire comme modifié
  2007. markFormAsModified();
  2008. // Créer le badge
  2009. const badge = document.createElement('span');
  2010. badge.className = 'person-badge';
  2011. badge.innerHTML = `
  2012. <span>${trimmedName}</span>
  2013. <button type="button" class="remove-person" data-name="${trimmedName}">
  2014. <svg class="size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  2015. <path d="M18 6 6 18"/><path d="m6 6 12 12"/>
  2016. </svg>
  2017. </button>
  2018. `;
  2019. selectedPersonsContainer.appendChild(badge);
  2020. // Ajouter l'événement de suppression
  2021. badge.querySelector('.remove-person').addEventListener('click', function() {
  2022. removePerson(this.dataset.name, badge);
  2023. });
  2024. togglePlaceholder();
  2025. updateHiddenField();
  2026. }
  2027. function removePerson(name, badgeElement) {
  2028. const index = selectedPersons.indexOf(name);
  2029. if (index > -1) {
  2030. selectedPersons.splice(index, 1);
  2031. }
  2032. // Marquer le formulaire comme modifié
  2033. markFormAsModified();
  2034. // Animation de sortie
  2035. badgeElement.style.animation = 'slideOutBadge 0.2s ease-in';
  2036. setTimeout(() => {
  2037. badgeElement.remove();
  2038. togglePlaceholder();
  2039. updateHiddenField();
  2040. }, 200);
  2041. }
  2042. // Événement sur le bouton Ajouter
  2043. btnAddPersonne.addEventListener('click', function() {
  2044. const value = addPersonneLibre.value.trim();
  2045. if (value) {
  2046. addPerson(value);
  2047. addPersonneLibre.value = ''; // Vider le champ
  2048. addPersonneLibre.focus(); // Garder le focus sur le champ
  2049. }
  2050. });
  2051. // Permettre l'ajout avec la touche Entrée
  2052. addPersonneLibre.addEventListener('keypress', function(e) {
  2053. if (e.key === 'Enter') {
  2054. e.preventDefault();
  2055. btnAddPersonne.click();
  2056. }
  2057. });
  2058. // Gestion du dropdown création de poste / remplacement
  2059. const creationPosteSelect = document.getElementById('creation_poste');
  2060. const champsRemplacementPoste = document.getElementById('champs_remplacement_poste');
  2061. function updateCreationPoste() {
  2062. if (creationPosteSelect.value === 'remplacement') {
  2063. // Forcer le display grid avant d'ajouter la classe active
  2064. champsRemplacementPoste.style.display = 'grid';
  2065. // Petit délai pour permettre au navigateur de traiter le changement de display
  2066. setTimeout(() => {
  2067. champsRemplacementPoste.classList.add('is-active');
  2068. }, 10);
  2069. } else {
  2070. champsRemplacementPoste.classList.remove('is-active');
  2071. // Masquer complètement après l'animation
  2072. setTimeout(() => {
  2073. if (!champsRemplacementPoste.classList.contains('is-active')) {
  2074. champsRemplacementPoste.style.display = 'none';
  2075. }
  2076. }, 500); // Attendre la fin de l'animation
  2077. }
  2078. }
  2079. creationPosteSelect.addEventListener('change', updateCreationPoste);
  2080. // Initialiser au chargement
  2081. updateCreationPoste();
  2082. // Gestion de la rémunération variable
  2083. const remunerationVariableRadios = document.querySelectorAll('input[name="remuneration_variable"]');
  2084. const montantVariableContainer = document.getElementById('montant_variable_container');
  2085. remunerationVariableRadios.forEach(radio => {
  2086. radio.addEventListener('change', function() {
  2087. if (this.value === 'oui') {
  2088. montantVariableContainer.classList.add('is-active');
  2089. } else {
  2090. montantVariableContainer.classList.remove('is-active');
  2091. }
  2092. });
  2093. });
  2094. // Gestion du service "Autre" - affichage/masquage du tableau des minima
  2095. const serviceContratSelect = document.getElementById('service_contrat');
  2096. const tableauMinima = document.getElementById('tableau_minima');
  2097. const messageServiceAutre = document.getElementById('message_service_autre');
  2098. function toggleTableauMinima() {
  2099. const serviceValue = serviceContratSelect.value;
  2100. if (serviceValue === 'autre') {
  2101. // Masquer le tableau et afficher le message
  2102. tableauMinima.classList.add('hidden');
  2103. messageServiceAutre.classList.remove('hidden');
  2104. } else {
  2105. // Afficher le tableau et masquer le message
  2106. tableauMinima.classList.remove('hidden');
  2107. messageServiceAutre.classList.add('hidden');
  2108. }
  2109. }
  2110. serviceContratSelect.addEventListener('change', toggleTableauMinima);
  2111. // Initialiser l'état au chargement
  2112. toggleTableauMinima();
  2113. // Génération automatique du compte Windows et email
  2114. const prenomInput = document.getElementById('prenom');
  2115. const nomInput = document.getElementById('nom');
  2116. const compteWindowsInput = document.getElementById('compte_windows');
  2117. const compteOffice365Input = document.getElementById('compte_office365');
  2118. const emailProInput = document.getElementById('email_pro');
  2119. function genererCompte() {
  2120. const prenom = prenomInput.value.toLowerCase().trim();
  2121. const nom = nomInput.value.toLowerCase().trim();
  2122. if (prenom && nom) {
  2123. const compte = prenom.charAt(0) + nom.replace(/\s+/g, '');
  2124. compteWindowsInput.value = compte;
  2125. const email = prenom + '.' + nom.replace(/\s+/g, '') + '@sipa-automobiles.fr';
  2126. compteOffice365Input.value = email;
  2127. emailProInput.value = email;
  2128. }
  2129. }
  2130. prenomInput.addEventListener('blur', genererCompte);
  2131. nomInput.addEventListener('blur', genererCompte);
  2132. // Fonction pour copier le texte dans le presse-papiers
  2133. window.copierTexte = function(elementId, evt) {
  2134. const element = document.getElementById(elementId);
  2135. const texteACopier = element.value;
  2136. const event = evt || window.event;
  2137. navigator.clipboard.writeText(texteACopier).then(function() {
  2138. // Feedback visuel
  2139. const button = event ? (event.target.closest('button') || event.target) : document.querySelector(`button[onclick*="${elementId}"]`);
  2140. if (button) {
  2141. const originalText = button.innerHTML;
  2142. button.innerHTML = '<svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>Copié';
  2143. button.classList.add('bg-[#1AA5A9]');
  2144. setTimeout(() => {
  2145. button.innerHTML = originalText;
  2146. button.classList.remove('bg-[#1AA5A9]');
  2147. }, 2000);
  2148. }
  2149. }).catch(function(err) {
  2150. console.error('Erreur lors de la copie:', err);
  2151. // Fallback pour les navigateurs plus anciens
  2152. element.select();
  2153. element.setSelectionRange(0, 99999);
  2154. try {
  2155. document.execCommand('copy');
  2156. alert('Copié dans le presse-papiers');
  2157. } catch (e) {
  2158. alert('Erreur lors de la copie');
  2159. }
  2160. });
  2161. }
  2162. // Calcul automatique de la période d'essai
  2163. const typeContratForPeriod = document.querySelectorAll('input[name="type_contrat"]');
  2164. const periodeEssaiInput = document.getElementById('periode_essai');
  2165. typeContratForPeriod.forEach(radio => {
  2166. radio.addEventListener('change', function() {
  2167. switch(this.value) {
  2168. case 'CDI':
  2169. periodeEssaiInput.value = '3 mois';
  2170. break;
  2171. case 'CDD':
  2172. periodeEssaiInput.value = '1 mois';
  2173. break;
  2174. case 'Alternance':
  2175. periodeEssaiInput.value = '45 jours';
  2176. break;
  2177. case 'Stage':
  2178. periodeEssaiInput.value = 'N/A';
  2179. break;
  2180. case 'Externe':
  2181. periodeEssaiInput.value = 'N/A';
  2182. break;
  2183. }
  2184. });
  2185. });
  2186. // Initialiser la période d'essai au chargement
  2187. const checkedContrat = document.querySelector('input[name="type_contrat"]:checked');
  2188. if (checkedContrat && checkedContrat.value === 'CDD') {
  2189. periodeEssaiInput.value = '1 mois';
  2190. }
  2191. // Calcul du salaire 35h équivalent
  2192. const salaireInput = document.getElementById('salaire');
  2193. const baseHoraireSelect = document.getElementById('base_horaire');
  2194. const salaire35hInput = document.getElementById('salaire_35h');
  2195. function calculerSalaire35h() {
  2196. const salaire = parseFloat(salaireInput.value);
  2197. const selectedOption = baseHoraireSelect.options[baseHoraireSelect.selectedIndex];
  2198. if (salaire && selectedOption && selectedOption.value) {
  2199. let heuresEquivalentes;
  2200. // Cas spécial pour le forfait 39h avec heures sup
  2201. if (selectedOption.value === '39') {
  2202. // 35h de base + 2h sup à 125% + 2h JRTT
  2203. // Heures équivalentes pour le calcul: 35 + (2 * 1.25) = 37.5h
  2204. heuresEquivalentes = 37.5;
  2205. } else {
  2206. // Pour les autres bases, utiliser les heures normales
  2207. heuresEquivalentes = parseFloat(selectedOption.value);
  2208. }
  2209. // Si c'est déjà du 35h, pas de conversion
  2210. if (heuresEquivalentes === 35) {
  2211. salaire35hInput.value = salaire.toFixed(2);
  2212. } else {
  2213. // Calculer l'équivalent 35h
  2214. const salaire35h = (salaire / heuresEquivalentes * 35).toFixed(2);
  2215. salaire35hInput.value = salaire35h;
  2216. }
  2217. } else {
  2218. salaire35hInput.value = '';
  2219. }
  2220. }
  2221. salaireInput.addEventListener('input', calculerSalaire35h);
  2222. baseHoraireSelect.addEventListener('change', calculerSalaire35h);
  2223. // Gestion des switches pour l'équipement informatique
  2224. const switchTelephoneMobile = document.getElementById('switch-telephone-mobile');
  2225. const contenuTelephoneMobile = document.getElementById('contenu-telephone-mobile');
  2226. const switchTelephoneFixe = document.getElementById('switch-telephone-fixe');
  2227. const contenuTelephoneFixe = document.getElementById('contenu-telephone-fixe');
  2228. const switchOrdinateur = document.getElementById('switch-ordinateur');
  2229. const contenuOrdinateur = document.getElementById('contenu-ordinateur');
  2230. function toggleContenuMobile() {
  2231. if (switchTelephoneMobile.checked) {
  2232. contenuTelephoneMobile.style.display = 'block';
  2233. contenuTelephoneMobile.classList.add('is-active');
  2234. } else {
  2235. contenuTelephoneMobile.classList.remove('is-active');
  2236. setTimeout(() => {
  2237. if (!contenuTelephoneMobile.classList.contains('is-active')) {
  2238. contenuTelephoneMobile.style.display = 'none';
  2239. }
  2240. }, 500);
  2241. }
  2242. }
  2243. function toggleContenuFixe() {
  2244. if (switchTelephoneFixe.checked) {
  2245. contenuTelephoneFixe.style.display = 'block';
  2246. contenuTelephoneFixe.classList.add('is-active');
  2247. } else {
  2248. contenuTelephoneFixe.classList.remove('is-active');
  2249. setTimeout(() => {
  2250. if (!contenuTelephoneFixe.classList.contains('is-active')) {
  2251. contenuTelephoneFixe.style.display = 'none';
  2252. }
  2253. }, 500);
  2254. }
  2255. }
  2256. function toggleContenuOrdinateur() {
  2257. if (switchOrdinateur.checked) {
  2258. contenuOrdinateur.style.display = 'block';
  2259. contenuOrdinateur.classList.add('is-active');
  2260. } else {
  2261. contenuOrdinateur.classList.remove('is-active');
  2262. setTimeout(() => {
  2263. if (!contenuOrdinateur.classList.contains('is-active')) {
  2264. contenuOrdinateur.style.display = 'none';
  2265. }
  2266. }, 500);
  2267. }
  2268. }
  2269. switchTelephoneMobile.addEventListener('change', toggleContenuMobile);
  2270. switchTelephoneFixe.addEventListener('change', toggleContenuFixe);
  2271. switchOrdinateur.addEventListener('change', toggleContenuOrdinateur);
  2272. // Initialiser l'état au chargement
  2273. toggleContenuMobile();
  2274. toggleContenuFixe();
  2275. toggleContenuOrdinateur();
  2276. // Gestion de l'affichage conditionnel pour récupération mobile
  2277. const recupereMobileRadios = document.querySelectorAll('input[name="recupere_mobile"]');
  2278. const numeroLigneRecupereContainer = document.getElementById('numero_ligne_recupere_container');
  2279. const nouveauMobileContainer = document.getElementById('nouveau_mobile_container');
  2280. function toggleRecupereMobile() {
  2281. const recupereMobile = document.querySelector('input[name="recupere_mobile"]:checked');
  2282. if (recupereMobile && recupereMobile.value === 'oui') {
  2283. // Afficher le champ numéro de ligne récupéré
  2284. numeroLigneRecupereContainer.style.display = 'block';
  2285. numeroLigneRecupereContainer.classList.add('is-active');
  2286. // Masquer la section nouveau mobile
  2287. nouveauMobileContainer.classList.remove('is-active');
  2288. setTimeout(() => {
  2289. if (!nouveauMobileContainer.classList.contains('is-active')) {
  2290. nouveauMobileContainer.style.display = 'none';
  2291. }
  2292. }, 500);
  2293. } else {
  2294. // Masquer le champ numéro de ligne récupéré
  2295. numeroLigneRecupereContainer.classList.remove('is-active');
  2296. setTimeout(() => {
  2297. if (!numeroLigneRecupereContainer.classList.contains('is-active')) {
  2298. numeroLigneRecupereContainer.style.display = 'none';
  2299. }
  2300. }, 500);
  2301. // Afficher la section nouveau mobile
  2302. nouveauMobileContainer.style.display = 'block';
  2303. nouveauMobileContainer.classList.add('is-active');
  2304. }
  2305. }
  2306. recupereMobileRadios.forEach(radio => {
  2307. radio.addEventListener('change', toggleRecupereMobile);
  2308. });
  2309. // Initialiser l'état au chargement
  2310. toggleRecupereMobile();
  2311. // Gestion de l'affichage conditionnel pour récupération téléphone fixe
  2312. const recupereTelephoneRadios = document.querySelectorAll('input[name="recupere_telephone"]');
  2313. const numeroLigneRecupereFixeContainer = document.getElementById('numero_ligne_recupere_fixe_container');
  2314. const nouveauTelFixeContainer = document.getElementById('nouveau_tel_fixe_container');
  2315. function toggleRecupereTelephone() {
  2316. const recupereTelephone = document.querySelector('input[name="recupere_telephone"]:checked');
  2317. if (recupereTelephone && recupereTelephone.value === 'oui') {
  2318. // Afficher le champ numéro de ligne récupéré
  2319. numeroLigneRecupereFixeContainer.style.display = 'block';
  2320. numeroLigneRecupereFixeContainer.classList.add('is-active');
  2321. // Masquer la section nouveau tel fixe
  2322. nouveauTelFixeContainer.classList.remove('is-active');
  2323. setTimeout(() => {
  2324. if (!nouveauTelFixeContainer.classList.contains('is-active')) {
  2325. nouveauTelFixeContainer.style.display = 'none';
  2326. }
  2327. }, 500);
  2328. } else {
  2329. // Masquer le champ numéro de ligne récupéré
  2330. numeroLigneRecupereFixeContainer.classList.remove('is-active');
  2331. setTimeout(() => {
  2332. if (!numeroLigneRecupereFixeContainer.classList.contains('is-active')) {
  2333. numeroLigneRecupereFixeContainer.style.display = 'none';
  2334. }
  2335. }, 500);
  2336. // Afficher la section nouveau tel fixe
  2337. nouveauTelFixeContainer.style.display = 'block';
  2338. nouveauTelFixeContainer.classList.add('is-active');
  2339. }
  2340. }
  2341. recupereTelephoneRadios.forEach(radio => {
  2342. radio.addEventListener('change', toggleRecupereTelephone);
  2343. });
  2344. // Initialiser l'état au chargement
  2345. toggleRecupereTelephone();
  2346. // Gestion de l'affichage conditionnel pour récupération PC
  2347. const recuperePCRadios = document.querySelectorAll('input[name="recupere_pc"]');
  2348. const numeroLigneRecuperePCContainer = document.getElementById('numero_ligne_recupere_pc_container');
  2349. const nouveauPCContainer = document.getElementById('nouveau_pc_container');
  2350. function toggleRecuperePC() {
  2351. const recuperePC = document.querySelector('input[name="recupere_pc"]:checked');
  2352. if (recuperePC && recuperePC.value === 'oui') {
  2353. // Afficher le champ numéro de ligne récupéré
  2354. numeroLigneRecuperePCContainer.style.display = 'block';
  2355. numeroLigneRecuperePCContainer.classList.add('is-active');
  2356. // Masquer la section nouveau PC
  2357. nouveauPCContainer.classList.remove('is-active');
  2358. setTimeout(() => {
  2359. if (!nouveauPCContainer.classList.contains('is-active')) {
  2360. nouveauPCContainer.style.display = 'none';
  2361. }
  2362. }, 500);
  2363. } else {
  2364. // Masquer le champ numéro de ligne récupéré
  2365. numeroLigneRecuperePCContainer.classList.remove('is-active');
  2366. setTimeout(() => {
  2367. if (!numeroLigneRecuperePCContainer.classList.contains('is-active')) {
  2368. numeroLigneRecuperePCContainer.style.display = 'none';
  2369. }
  2370. }, 500);
  2371. // Afficher la section nouveau PC
  2372. nouveauPCContainer.style.display = 'block';
  2373. nouveauPCContainer.classList.add('is-active');
  2374. }
  2375. }
  2376. recuperePCRadios.forEach(radio => {
  2377. radio.addEventListener('change', toggleRecuperePC);
  2378. });
  2379. // Initialiser l'état au chargement
  2380. toggleRecuperePC();
  2381. // Gestion du toggle du statut global (edit)
  2382. const toggleStatutBtn = document.getElementById('toggle_statut_global');
  2383. const statutGlobalSelect = document.getElementById('statut_global');
  2384. if (toggleStatutBtn && statutGlobalSelect) {
  2385. toggleStatutBtn.addEventListener('click', function() {
  2386. if (statutGlobalSelect.disabled) {
  2387. statutGlobalSelect.removeAttribute('disabled');
  2388. this.classList.add('text-blue-600', 'dark:text-blue-400');
  2389. } else {
  2390. statutGlobalSelect.setAttribute('disabled', 'disabled');
  2391. this.classList.remove('text-blue-600', 'dark:text-blue-400');
  2392. }
  2393. });
  2394. }
  2395. // Gestion des horaires et jours de travail dans la section CDD
  2396. const joursSemaineCDD = [
  2397. { nom: 'Lundi', code: 'lundi' },
  2398. { nom: 'Mardi', code: 'mardi' },
  2399. { nom: 'Mercredi', code: 'mercredi' },
  2400. { nom: 'Jeudi', code: 'jeudi' },
  2401. { nom: 'Vendredi', code: 'vendredi' },
  2402. { nom: 'Samedi', code: 'samedi' }
  2403. ];
  2404. const listeJoursCDD = document.getElementById('liste-jours-cdd');
  2405. const templateCDD = document.getElementById('template-jour-cdd');
  2406. const horairesDataCDD = {};
  2407. const joursParDefautCDD = ['lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi'];
  2408. // Générer les jours de la semaine pour CDD
  2409. if (listeJoursCDD && templateCDD) {
  2410. joursSemaineCDD.forEach((jour) => {
  2411. const clone = templateCDD.content.cloneNode(true);
  2412. const jourItem = clone.querySelector('.jour-item-cdd');
  2413. const jourLabel = clone.querySelector('.jour-label-cdd');
  2414. const jourActif = clone.querySelector('.jour-actif-cdd');
  2415. const jourContenu = clone.querySelector('.jour-contenu-cdd');
  2416. jourItem.setAttribute('data-jour', jour.code);
  2417. jourLabel.textContent = jour.nom;
  2418. jourLabel.setAttribute('for', `jour-cdd-${jour.code}`);
  2419. jourActif.id = `jour-cdd-${jour.code}`;
  2420. jourActif.name = `jours_cdd[${jour.code}][actif]`;
  2421. const heureDebut = clone.querySelector('.heure-debut-cdd');
  2422. const heureFin = clone.querySelector('.heure-fin-cdd');
  2423. const pauseDuree = clone.querySelector('.pause-duree-cdd');
  2424. heureDebut.name = `jours_cdd[${jour.code}][debut]`;
  2425. heureDebut.id = `debut-cdd-${jour.code}`;
  2426. heureFin.name = `jours_cdd[${jour.code}][fin]`;
  2427. heureFin.id = `fin-cdd-${jour.code}`;
  2428. pauseDuree.name = `jours_cdd[${jour.code}][pause]`;
  2429. pauseDuree.id = `pause-cdd-${jour.code}`;
  2430. const estCocheParDefaut = joursParDefautCDD.includes(jour.code);
  2431. horairesDataCDD[jour.code] = {
  2432. actif: estCocheParDefaut,
  2433. debut: estCocheParDefaut ? '09:00' : '',
  2434. fin: estCocheParDefaut ? '18:00' : '',
  2435. pause: 0
  2436. };
  2437. if (estCocheParDefaut) {
  2438. jourActif.checked = true;
  2439. jourContenu.style.display = 'grid';
  2440. heureDebut.value = '09:00';
  2441. heureFin.value = '18:00';
  2442. }
  2443. jourActif.addEventListener('change', function() {
  2444. horairesDataCDD[jour.code].actif = this.checked;
  2445. if (this.checked) {
  2446. jourContenu.style.display = 'grid';
  2447. if (!heureDebut.value) heureDebut.value = '09:00';
  2448. if (!heureFin.value) heureFin.value = '18:00';
  2449. } else {
  2450. jourContenu.style.display = 'none';
  2451. heureDebut.value = '';
  2452. heureFin.value = '';
  2453. pauseDuree.value = '';
  2454. }
  2455. updateRecapitulatifCDD();
  2456. });
  2457. heureDebut.addEventListener('change', function() {
  2458. horairesDataCDD[jour.code].debut = this.value;
  2459. updateRecapitulatifCDD();
  2460. });
  2461. heureFin.addEventListener('change', function() {
  2462. horairesDataCDD[jour.code].fin = this.value;
  2463. updateRecapitulatifCDD();
  2464. });
  2465. pauseDuree.addEventListener('change', function() {
  2466. horairesDataCDD[jour.code].pause = parseInt(this.value) || 0;
  2467. updateRecapitulatifCDD();
  2468. });
  2469. listeJoursCDD.appendChild(clone);
  2470. });
  2471. }
  2472. function calculerHeuresCDD(debut, fin, pauseMinutes) {
  2473. if (!debut || !fin) return 0;
  2474. const [debutH, debutM] = debut.split(':').map(Number);
  2475. const [finH, finM] = fin.split(':').map(Number);
  2476. let debutTotalMinutes = debutH * 60 + debutM;
  2477. let finTotalMinutes = finH * 60 + finM;
  2478. if (finTotalMinutes < debutTotalMinutes) {
  2479. finTotalMinutes += 24 * 60;
  2480. }
  2481. const dureeMinutes = finTotalMinutes - debutTotalMinutes - pauseMinutes;
  2482. return dureeMinutes / 60;
  2483. }
  2484. function formaterHeuresCDD(heures) {
  2485. const heuresEntieres = Math.floor(heures);
  2486. const minutes = Math.round((heures - heuresEntieres) * 60);
  2487. if (minutes === 0) {
  2488. return `${heuresEntieres}h`;
  2489. } else {
  2490. return `${heuresEntieres}h${minutes.toString().padStart(2, '0')}`;
  2491. }
  2492. }
  2493. function updateRecapitulatifCDD() {
  2494. const horairesTravailInput = document.getElementById('horaires_travail');
  2495. if (!horairesTravailInput) return;
  2496. let totalHeures = 0;
  2497. let nbJoursTravailles = 0;
  2498. const resumeTexte = [];
  2499. joursSemaineCDD.forEach((jour) => {
  2500. const data = horairesDataCDD[jour.code];
  2501. if (data && data.actif && data.debut && data.fin) {
  2502. const heures = calculerHeuresCDD(data.debut, data.fin, data.pause);
  2503. totalHeures += heures;
  2504. nbJoursTravailles++;
  2505. let jourTexte = `${jour.nom}: ${data.debut} - ${data.fin}`;
  2506. if (data.pause > 0) {
  2507. jourTexte += ` (pause: ${data.pause} min)`;
  2508. }
  2509. jourTexte += ` (${formaterHeuresCDD(heures)})`;
  2510. resumeTexte.push(jourTexte);
  2511. }
  2512. });
  2513. horairesTravailInput.value = resumeTexte.join('\n');
  2514. }
  2515. // Bouton copier le lundi sur tous (CDD)
  2516. const btnCopierLundiCDD = document.getElementById('btn-copier-lundi-cdd');
  2517. if (btnCopierLundiCDD) {
  2518. btnCopierLundiCDD.addEventListener('click', function() {
  2519. const lundiItem = document.querySelector('[data-jour="lundi"].jour-item-cdd');
  2520. if (lundiItem) {
  2521. const lundiDebut = lundiItem.querySelector('.heure-debut-cdd');
  2522. const lundiFin = lundiItem.querySelector('.heure-fin-cdd');
  2523. const lundiPause = lundiItem.querySelector('.pause-duree-cdd');
  2524. const sourceDebut = lundiDebut.value || '09:00';
  2525. const sourceFin = lundiFin.value || '18:00';
  2526. const sourcePause = lundiPause.value || '0';
  2527. joursSemaineCDD.forEach((autreJour) => {
  2528. if (autreJour.code !== 'lundi') {
  2529. const autreItem = document.querySelector(`[data-jour="${autreJour.code}"].jour-item-cdd`);
  2530. if (autreItem) {
  2531. const autreDebut = autreItem.querySelector('.heure-debut-cdd');
  2532. const autreFin = autreItem.querySelector('.heure-fin-cdd');
  2533. const autrePause = autreItem.querySelector('.pause-duree-cdd');
  2534. const autreActif = autreItem.querySelector('.jour-actif-cdd');
  2535. const autreContenu = autreItem.querySelector('.jour-contenu-cdd');
  2536. autreDebut.value = sourceDebut;
  2537. autreFin.value = sourceFin;
  2538. autrePause.value = sourcePause;
  2539. autreActif.checked = true;
  2540. autreContenu.style.display = 'grid';
  2541. horairesDataCDD[autreJour.code] = {
  2542. actif: true,
  2543. debut: sourceDebut,
  2544. fin: sourceFin,
  2545. pause: parseInt(sourcePause) || 0
  2546. };
  2547. }
  2548. }
  2549. });
  2550. updateRecapitulatifCDD();
  2551. }
  2552. });
  2553. }
  2554. // Mettre à jour le récapitulatif après génération
  2555. setTimeout(() => {
  2556. if (listeJoursCDD && templateCDD) {
  2557. updateRecapitulatifCDD();
  2558. }
  2559. }, 100);
  2560. // Gestion de la soumission du formulaire
  2561. const form = document.getElementById('integration-form');
  2562. const submitButton = form.querySelector('button[type="submit"]');
  2563. // Variable pour suivre si le formulaire a été modifié
  2564. let formModified = false;
  2565. let formSubmitted = false;
  2566. // Fonction pour marquer le formulaire comme modifié
  2567. function markFormAsModified() {
  2568. if (!formSubmitted) {
  2569. formModified = true;
  2570. }
  2571. }
  2572. // Écouter les modifications sur tous les champs du formulaire
  2573. const formInputs = form.querySelectorAll('input, select, textarea');
  2574. formInputs.forEach(input => {
  2575. // Ignorer les champs readonly et les boutons
  2576. if (input.readOnly || input.disabled || input.type === 'button' || input.type === 'submit') {
  2577. return;
  2578. }
  2579. // Écouter les changements selon le type de champ
  2580. if (input.type === 'checkbox' || input.type === 'radio') {
  2581. input.addEventListener('change', markFormAsModified);
  2582. } else {
  2583. input.addEventListener('input', markFormAsModified);
  2584. input.addEventListener('change', markFormAsModified);
  2585. }
  2586. });
  2587. // Écouter les changements sur les fichiers
  2588. const fileInputs = form.querySelectorAll('input[type="file"]');
  2589. fileInputs.forEach(input => {
  2590. input.addEventListener('change', markFormAsModified);
  2591. });
  2592. // Afficher une alerte avant de quitter la page si le formulaire a été modifié
  2593. window.addEventListener('beforeunload', function(e) {
  2594. if (formModified && !formSubmitted) {
  2595. // Message standard pour les navigateurs modernes
  2596. e.preventDefault();
  2597. // Chrome nécessite que returnValue soit défini
  2598. e.returnValue = '';
  2599. // Message personnalisé (la plupart des navigateurs modernes l'ignorent)
  2600. return 'Vous avez des modifications non sauvegardées. Êtes-vous sûr de vouloir quitter cette page ?';
  2601. }
  2602. });
  2603. form.addEventListener('submit', function(e) {
  2604. e.preventDefault();
  2605. // Validation personnalisée
  2606. const validationLecture = document.getElementById('validation_lecture');
  2607. if (!validationLecture.checked) {
  2608. showNotification('error', 'Veuillez confirmer la lecture et la vérification des informations.');
  2609. return;
  2610. }
  2611. // Vérifier la validité du formulaire
  2612. if (!form.checkValidity()) {
  2613. form.reportValidity();
  2614. showNotification('error', 'Veuillez remplir tous les champs requis.');
  2615. return;
  2616. }
  2617. // Marquer le formulaire comme soumis pour désactiver l'alerte
  2618. formSubmitted = true;
  2619. formModified = false;
  2620. // Désactiver le bouton et afficher le spinner
  2621. submitButton.disabled = true;
  2622. const originalButtonContent = submitButton.innerHTML;
  2623. submitButton.innerHTML = `
  2624. <svg class="animate-spin inline-block size-4 mr-2" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
  2625. <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
  2626. <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
  2627. </svg>
  2628. Envoi en cours...
  2629. `;
  2630. // Simuler l'envoi AJAX (remplacer par votre code d'envoi réel)
  2631. setTimeout(() => {
  2632. // Restaurer le bouton
  2633. submitButton.disabled = false;
  2634. submitButton.innerHTML = originalButtonContent;
  2635. // Afficher la notification de succès
  2636. showNotification('success', 'Demande d\'intégration soumise avec succès !');
  2637. // Redirection après 2 secondes (optionnel)
  2638. // setTimeout(() => {
  2639. // window.location.href = 'confirmation.php';
  2640. // }, 2000);
  2641. }, 1500);
  2642. });
  2643. // Gérer le bouton "Enregistrer en brouillon" pour désactiver l'alerte
  2644. const buttons = form.querySelectorAll('button[type="button"]');
  2645. buttons.forEach(button => {
  2646. const buttonText = button.textContent.trim().toLowerCase();
  2647. if (buttonText.includes('brouillon')) {
  2648. button.addEventListener('click', function() {
  2649. // Ici vous pouvez ajouter la logique de sauvegarde en brouillon
  2650. // Après la sauvegarde réussie, désactiver l'alerte :
  2651. // formSubmitted = true;
  2652. // formModified = false;
  2653. showNotification('info', 'Brouillon enregistré avec succès.');
  2654. });
  2655. }
  2656. // Gérer le bouton "Annuler" - désactiver l'alerte si l'utilisateur confirme
  2657. if (buttonText.includes('annuler')) {
  2658. button.addEventListener('click', function(e) {
  2659. if (formModified && !formSubmitted) {
  2660. const confirmLeave = confirm('Vous avez des modifications non sauvegardées. Êtes-vous sûr de vouloir annuler ?');
  2661. if (confirmLeave) {
  2662. formSubmitted = true;
  2663. formModified = false;
  2664. // Rediriger ou réinitialiser le formulaire
  2665. // window.location.href = 'index.php'; // Exemple de redirection
  2666. } else {
  2667. e.preventDefault();
  2668. e.stopPropagation();
  2669. return false;
  2670. }
  2671. }
  2672. });
  2673. }
  2674. });
  2675. // Fonction pour afficher les notifications Preline
  2676. function showNotification(type, message) {
  2677. // Créer le conteneur de notification s'il n'existe pas
  2678. let notificationContainer = document.getElementById('notification-container');
  2679. if (!notificationContainer) {
  2680. notificationContainer = document.createElement('div');
  2681. notificationContainer.id = 'notification-container';
  2682. notificationContainer.className = 'fixed top-4 right-4 z-50 space-y-3';
  2683. document.body.appendChild(notificationContainer);
  2684. }
  2685. // Déterminer les couleurs selon le type
  2686. const colors = {
  2687. success: {
  2688. bg: 'bg-green-500',
  2689. icon: `<svg class="shrink-0 size-5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"></path><path d="m9 12 2 2 4-4"></path></svg>`
  2690. },
  2691. error: {
  2692. bg: 'bg-red-500',
  2693. icon: `<svg class="shrink-0 size-5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"></path><path d="M12 9v4"></path><path d="M12 17h.01"></path></svg>`
  2694. },
  2695. info: {
  2696. bg: 'bg-blue-500',
  2697. icon: `<svg class="shrink-0 size-5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg>`
  2698. }
  2699. };
  2700. const color = colors[type] || colors.info;
  2701. // Créer la notification
  2702. const notification = document.createElement('div');
  2703. notification.className = `${color.bg} text-white rounded-lg shadow-lg p-4 min-w-[300px] max-w-md flex items-center gap-3 animate-fade-in-up`;
  2704. notification.innerHTML = `
  2705. ${color.icon}
  2706. <p class="text-sm font-medium flex-1">${message}</p>
  2707. <button type="button" class="inline-flex shrink-0 justify-center items-center size-5 rounded-lg text-white hover:bg-white/20 focus:outline-none focus:bg-white/20">
  2708. <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg>
  2709. </button>
  2710. `;
  2711. // Ajouter l'événement de fermeture
  2712. const closeBtn = notification.querySelector('button');
  2713. closeBtn.addEventListener('click', () => {
  2714. notification.style.animation = 'fadeOutUp 0.3s ease-out';
  2715. setTimeout(() => notification.remove(), 300);
  2716. });
  2717. // Ajouter au conteneur
  2718. notificationContainer.appendChild(notification);
  2719. // Auto-fermeture après 5 secondes
  2720. setTimeout(() => {
  2721. if (notification.parentElement) {
  2722. notification.style.animation = 'fadeOutUp 0.3s ease-out';
  2723. setTimeout(() => notification.remove(), 300);
  2724. }
  2725. }, 5000);
  2726. }
  2727. // Fallback pour les tooltips Preline - s'assurer qu'ils fonctionnent
  2728. function initTooltips() {
  2729. const tooltipToggles = document.querySelectorAll('.hs-tooltip-toggle');
  2730. tooltipToggles.forEach(toggle => {
  2731. const tooltipContent = toggle.querySelector('.hs-tooltip-content');
  2732. if (!tooltipContent) return;
  2733. // Ajouter position relative au parent si nécessaire
  2734. const tooltipParent = toggle.closest('.hs-tooltip');
  2735. if (tooltipParent && getComputedStyle(tooltipParent).position === 'static') {
  2736. tooltipParent.style.position = 'relative';
  2737. }
  2738. // Gérer le hover
  2739. toggle.addEventListener('mouseenter', function() {
  2740. tooltipContent.classList.add('hs-tooltip-shown');
  2741. tooltipContent.classList.remove('opacity-0', 'invisible');
  2742. tooltipContent.classList.add('opacity-100', 'visible');
  2743. });
  2744. toggle.addEventListener('mouseleave', function() {
  2745. tooltipContent.classList.remove('hs-tooltip-shown');
  2746. tooltipContent.classList.add('opacity-0', 'invisible');
  2747. tooltipContent.classList.remove('opacity-100', 'visible');
  2748. });
  2749. // Gérer le focus pour l'accessibilité
  2750. toggle.addEventListener('focus', function() {
  2751. tooltipContent.classList.add('hs-tooltip-shown');
  2752. tooltipContent.classList.remove('opacity-0', 'invisible');
  2753. tooltipContent.classList.add('opacity-100', 'visible');
  2754. });
  2755. toggle.addEventListener('blur', function() {
  2756. tooltipContent.classList.remove('hs-tooltip-shown');
  2757. tooltipContent.classList.add('opacity-0', 'invisible');
  2758. tooltipContent.classList.remove('opacity-100', 'visible');
  2759. });
  2760. });
  2761. }
  2762. // Initialiser les tooltips après le chargement
  2763. setTimeout(initTooltips, 100);
  2764. });
  2765. </script>
  2766. </body>
  2767. </html>