demande-integration.php 201 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175
  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-2 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 matinée</label>
  608. <input type="time" class="heure-debut-matin-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 matinée</label>
  612. <input type="time" class="heure-fin-matin-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">Heure de début après-midi</label>
  616. <input type="time" class="heure-debut-apresmidi-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">
  617. </div>
  618. <div>
  619. <label class="block text-xs font-medium mb-1 text-gray-600 dark:text-neutral-400">Heure de fin après-midi</label>
  620. <input type="time" class="heure-fin-apresmidi-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">
  621. </div>
  622. </div>
  623. </div>
  624. </template>
  625. <!-- Liste des jours -->
  626. <div id="liste-jours-cdd" class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
  627. <!-- Les jours seront générés par JavaScript -->
  628. </div>
  629. <!-- Champ caché pour stocker le résumé -->
  630. <input type="hidden" id="horaires_travail" name="horaires_travail" value="">
  631. </div>
  632. <!-- Besoin d'une lettre d'engagement ? -->
  633. <div class="md:col-span-1">
  634. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300 inline-flex items-center gap-2">
  635. BESOIN D'UNE LETTRE D'ENGAGEMENT ?
  636. <div class="hs-tooltip inline-block [--placement:top]">
  637. <button type="button" class="hs-tooltip-toggle">
  638. <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">
  639. <circle cx="12" cy="12" r="10"/>
  640. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/>
  641. <path d="M12 17h.01"/>
  642. </svg>
  643. <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">
  644. Nécessaire uniquement si le candidat est en poste actuellement.
  645. </span>
  646. </button>
  647. </div>
  648. </label>
  649. <div class="flex flex-col gap-2">
  650. <div class="flex">
  651. <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>
  652. <label for="lettre_engagement_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  653. </div>
  654. <div class="flex">
  655. <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">
  656. <label for="lettre_engagement_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  657. </div>
  658. </div>
  659. <p class="text-xs text-gray-500 mt-2 dark:text-neutral-500">Nécessaire uniquement si le candidat est en poste actuellement.</p>
  660. </div>
  661. <!-- Cette embauche est-elle une cooptation ? -->
  662. <div class="md:col-span-1">
  663. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300 inline-flex items-center gap-2">
  664. CETTE EMBAUCHE EST-ELLE UNE COOPTATION ?
  665. <div class="hs-tooltip inline-block [--placement:top]">
  666. <button type="button" class="hs-tooltip-toggle">
  667. <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">
  668. <circle cx="12" cy="12" r="10"/>
  669. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/>
  670. <path d="M12 17h.01"/>
  671. </svg>
  672. <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">
  673. Pensez à transmettre la fiche de cooptation.
  674. </span>
  675. </button>
  676. </div>
  677. </label>
  678. <div class="flex flex-col gap-2">
  679. <div class="flex">
  680. <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">
  681. <label for="cooptation_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  682. </div>
  683. <div class="flex">
  684. <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>
  685. <label for="cooptation_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  686. </div>
  687. </div>
  688. <p class="text-xs text-gray-500 mt-2 dark:text-neutral-500">Pensez à transmettre la fiche de cooptation.</p>
  689. </div>
  690. <!-- Reconnaissance handicap ? -->
  691. <div class="md:col-span-1">
  692. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  693. RECONNAISSANCE HANDICAP ?
  694. </label>
  695. <div class="flex flex-col gap-2">
  696. <div class="flex">
  697. <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>
  698. <label for="handicap_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  699. </div>
  700. <div class="flex">
  701. <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">
  702. <label for="handicap_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  703. </div>
  704. </div>
  705. <p class="text-xs text-gray-500 mt-2 dark:text-neutral-500">Pensez à joindre le justificatif dans LUCCA.</p>
  706. </div>
  707. <!-- Ce collaborateur était-il en intérim auparavant ? -->
  708. <div class="md:col-span-1">
  709. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  710. CE COLLABORATEUR ÉTAIT-IL EN INTÉRIM AUPARAVANT DANS NOTRE ENTREPRISE ?
  711. </label>
  712. <div class="flex flex-col gap-2">
  713. <div class="flex">
  714. <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">
  715. <label for="interim_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  716. </div>
  717. <div class="flex">
  718. <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>
  719. <label for="interim_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  720. </div>
  721. </div>
  722. </div>
  723. <!-- Date début période intérim (conditionnel) -->
  724. <div id="date_interim_container" class="md:col-span-1 conditional-field" style="display: none;">
  725. <label for="date_debut_interim" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  726. DATE DÉBUT PÉRIODE INTÉRIM
  727. </label>
  728. <div class="relative">
  729. <input type="text" id="date_debut_interim" name="date_debut_interim"
  730. 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"
  731. placeholder="Sélectionner une date">
  732. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none pe-4">
  733. <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">
  734. <rect width="18" height="18" x="3" y="4" rx="2" ry="2"></rect>
  735. <line x1="16" x2="16" y1="2" y2="6"></line>
  736. <line x1="8" x2="8" y1="2" y2="6"></line>
  737. <line x1="3" x2="21" y1="10" y2="10"></line>
  738. </svg>
  739. </div>
  740. </div>
  741. </div>
  742. <!-- Samedi travaillé ? -->
  743. <div class="md:col-span-1">
  744. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  745. SAMEDI TRAVAILLÉ ?
  746. </label>
  747. <div class="flex flex-col gap-2">
  748. <div class="flex">
  749. <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>
  750. <label for="samedi_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  751. </div>
  752. <div class="flex">
  753. <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">
  754. <label for="samedi_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  755. </div>
  756. </div>
  757. </div>
  758. <!-- Jours de repos -->
  759. <div id="jours_repos_container" class="md:col-span-1 conditional-field" style="display: none;">
  760. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  761. JOURS DE REPOS
  762. </label>
  763. <div class="flex flex-col gap-2">
  764. <div class="flex">
  765. <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">
  766. <label for="repos_lundi" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Lundi</label>
  767. </div>
  768. <div class="flex">
  769. <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>
  770. <label for="repos_mardi" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Mardi</label>
  771. </div>
  772. <div class="flex">
  773. <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">
  774. <label for="repos_mercredi" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Mercredi</label>
  775. </div>
  776. <div class="flex">
  777. <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">
  778. <label for="repos_jeudi" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Jeudi</label>
  779. </div>
  780. <div class="flex">
  781. <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">
  782. <label for="repos_vendredi" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Vendredi</label>
  783. </div>
  784. </div>
  785. </div>
  786. <!-- Qui sera son manager ? -->
  787. <div class="md:col-span-2">
  788. <label for="manager_cdd" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  789. QUI SERA SON MANAGER ? <span class="text-red-500">*</span>
  790. </label>
  791. <input type="text" id="manager_cdd" name="manager_cdd" required
  792. 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"
  793. placeholder="Ex: Sophie BERNARD">
  794. <p class="text-xs text-gray-500 mt-1 dark:text-neutral-500">Auto-complétion disponible</p>
  795. </div>
  796. <!-- Sera-t-il lui même manager ? -->
  797. <div class="md:col-span-4">
  798. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  799. SERA-T-IL LUI MÊME MANAGER :
  800. </label>
  801. <div class="flex flex-col gap-2">
  802. <div class="flex">
  803. <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>
  804. <label for="est_manager_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  805. </div>
  806. <div class="flex">
  807. <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">
  808. <label for="est_manager_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  809. </div>
  810. </div>
  811. </div>
  812. <!-- Quelles seront les personnes supervisées (conditionnel) -->
  813. <div id="personnes_supervisees_container" class="md:col-span-4 conditional-field is-active">
  814. <div class="grid grid-cols-1 lg:grid-cols-2 gap-4 items-start">
  815. <!-- Colonne gauche : Zone d'affichage des personnes -->
  816. <div>
  817. <label class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  818. QUELLES SERONT LES PERSONNES SUPERVISÉES
  819. </label>
  820. <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">
  821. <span class="text-xs text-gray-400 dark:text-neutral-500" id="placeholder_persons">Ajoutez des personnes...</span>
  822. </div>
  823. <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>
  824. </div>
  825. <!-- Colonne droite : Champ d'ajout -->
  826. <div class="flex flex-col justify-center h-full">
  827. <label for="add_personne_libre" class="block text-xs font-medium mb-1 text-gray-600 dark:text-neutral-400">
  828. Ajouter :
  829. </label>
  830. <div class="flex items-center gap-2">
  831. <input type="text" id="add_personne_libre" placeholder="Prénom NOM"
  832. 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">
  833. <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">
  834. <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">
  835. <path d="M5 12h14"/><path d="M12 5v14"/>
  836. </svg>
  837. Ajouter
  838. </button>
  839. </div>
  840. </div>
  841. </div>
  842. <!-- Champ caché pour stocker les valeurs -->
  843. <input type="hidden" id="personnes_supervisees_hidden" name="personnes_supervisees" value="">
  844. </div>
  845. </div>
  846. </div>
  847. </div>
  848. <!-- Section 2: Informations personnelles -->
  849. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition">
  850. <div class="p-6">
  851. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Informations personnelles</h2>
  852. <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
  853. <!-- Date de naissance -->
  854. <div>
  855. <label for="date_naissance" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  856. Date de naissance <span class="text-red-500">*</span>
  857. </label>
  858. <div class="relative">
  859. <input type="text" id="date_naissance" name="date_naissance" required
  860. 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"
  861. placeholder="Sélectionner une date">
  862. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none pe-4">
  863. <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">
  864. <rect width="18" height="18" x="3" y="4" rx="2" ry="2"></rect>
  865. <line x1="16" x2="16" y1="2" y2="6"></line>
  866. <line x1="8" x2="8" y1="2" y2="6"></line>
  867. <line x1="3" x2="21" y1="10" y2="10"></line>
  868. </svg>
  869. </div>
  870. </div>
  871. </div>
  872. <!-- Email professionnel -->
  873. <div class="max-w-sm">
  874. <label for="email_pro" class="block text-sm font-medium mb-2 dark:text-white">
  875. Adresse mail professionnelle (Office 365) <span class="text-red-500">*</span>
  876. </label>
  877. <input type="email" id="email_pro" name="email_pro" required
  878. 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"
  879. placeholder="jean.dupont@sipa.fr">
  880. <p class="text-xs text-gray-500 mt-1 dark:text-neutral-500">Email généré automatiquement</p>
  881. </div>
  882. <!-- Email personnel -->
  883. <div class="max-w-sm">
  884. <label for="email_perso" class="block text-sm font-medium mb-2 dark:text-white">Email personnel</label>
  885. <input type="email" id="email_perso" name="email_perso"
  886. 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"
  887. placeholder="jean.dupont@gmail.com">
  888. </div>
  889. <!-- Téléphone -->
  890. <div class="max-w-sm">
  891. <label for="telephone" class="block text-sm font-medium mb-2 dark:text-white">Numéro de téléphone</label>
  892. <input type="tel" id="telephone" name="telephone"
  893. 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"
  894. placeholder="06 12 34 56 78">
  895. </div>
  896. </div>
  897. </div>
  898. </div>
  899. <!-- Section 3: CONTRAT -->
  900. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition">
  901. <div class="p-6">
  902. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-6">CONTRAT</h2>
  903. <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
  904. <!-- Panneau gauche : Champs de saisie -->
  905. <div class="space-y-6">
  906. <!-- SERVICE -->
  907. <div>
  908. <label for="service_contrat" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  909. SERVICE <span class="text-red-500">*</span>
  910. </label>
  911. <select id="service_contrat" name="service_contrat" required
  912. 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">
  913. <option value="">Sélectionner un service</option>
  914. <option value="vente_pra" selected>Vente P.R.A.</option>
  915. <option value="vente_neuf">Vente Neuf</option>
  916. <option value="apres_vente">Après-Vente</option>
  917. <option value="pieces">Pièces</option>
  918. <option value="accueil">Accueil</option>
  919. <option value="administration">Administration</option>
  920. <option value="autre">Autre IMPORTANT A FAIRE </option>
  921. </select>
  922. </div>
  923. <!-- INTITULE DE POSTE -->
  924. <div>
  925. <label for="intitule_poste_contrat" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  926. INTITULE DE POSTE <span class="text-red-500">*</span>
  927. </label>
  928. <select id="intitule_poste_contrat" name="intitule_poste_contrat" required
  929. 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">
  930. <option value="">Sélectionner un intitulé</option>
  931. <option value="chef_ventes_pra" selected>Chef des ventes PRA</option>
  932. <option value="conseiller_commercial">Conseiller commercial</option>
  933. <option value="responsable_atelier">Responsable atelier</option>
  934. <option value="mecanicien">Mécanicien</option>
  935. <option value="chef_equipe">Chef d'équipe</option>
  936. <option value="comptable">Comptable</option>
  937. </select>
  938. </div>
  939. <!-- ECHELON -->
  940. <div>
  941. <label for="echelon_contrat" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  942. ECHELON <span class="text-red-500">*</span>
  943. </label>
  944. <select id="echelon_contrat" name="echelon_contrat" required
  945. 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">
  946. <option value="">Sélectionner un échelon</option>
  947. <option value="III_A">III A</option>
  948. <option value="III_B">III B</option>
  949. <option value="III_C">III C</option>
  950. <option value="IV_A">IV A</option>
  951. <option value="IV_B">IV B</option>
  952. <option value="IV_C">IV C</option>
  953. </select>
  954. </div>
  955. <!-- STATUT -->
  956. <div>
  957. <label for="statut_contrat" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  958. STATUT <span class="text-red-500">*</span>
  959. </label>
  960. <select id="statut_contrat" name="statut_contrat" required
  961. 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">
  962. <option value="">Sélectionner un statut</option>
  963. <option value="cadre" selected>Cadre</option>
  964. <option value="non_cadre">Non-cadre</option>
  965. <option value="agent_maitrise">Agent de maîtrise</option>
  966. </select>
  967. </div>
  968. </div>
  969. <!-- Panneau droit : Tableau des minima -->
  970. <div>
  971. <!-- Tableau des minima conventionnels -->
  972. <div id="tableau_minima">
  973. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  974. Minima conventionnels (Convention collective de l'automobile)
  975. </label>
  976. <div class="overflow-x-auto">
  977. <table class="min-w-full divide-y divide-gray-200 dark:divide-neutral-700">
  978. <thead class="bg-gray-50 dark:bg-neutral-800">
  979. <tr>
  980. <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>
  981. <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>
  982. <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>
  983. <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>
  984. </tr>
  985. </thead>
  986. <tbody class="bg-white divide-y divide-gray-200 dark:bg-neutral-900 dark:divide-neutral-700">
  987. <tr class="hover:bg-gray-50 dark:hover:bg-neutral-800">
  988. <td class="px-4 py-3 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">III A</td>
  989. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">3804</td>
  990. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4075,61</td>
  991. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4347,21</td>
  992. </tr>
  993. <tr class="hover:bg-gray-50 dark:hover:bg-neutral-800">
  994. <td class="px-4 py-3 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">III B</td>
  995. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4093</td>
  996. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4385,24</td>
  997. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4677,48</td>
  998. </tr>
  999. <tr class="hover:bg-gray-50 dark:hover:bg-neutral-800">
  1000. <td class="px-4 py-3 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white">III C</td>
  1001. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4383</td>
  1002. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">4695,95</td>
  1003. <td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500 dark:text-neutral-400">5008,89</td>
  1004. </tr>
  1005. </tbody>
  1006. </table>
  1007. </div>
  1008. </div>
  1009. <!-- Message alternatif pour "Autre" -->
  1010. <div id="message_service_autre" class="hidden">
  1011. <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">
  1012. <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">
  1013. <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"/>
  1014. <path d="M12 9v4"/>
  1015. <path d="M12 17h.01"/>
  1016. </svg>
  1017. <div>
  1018. <h3 class="text-sm font-semibold text-orange-800 dark:text-orange-300">Information importante</h3>
  1019. <p class="mt-1 text-sm text-orange-700 dark:text-orange-400">
  1020. Prenez contact avec le service RH pour vérifier ces valeurs (échelon, statut, rémunération, etc.).
  1021. </p>
  1022. </div>
  1023. </div>
  1024. </div>
  1025. </div>
  1026. </div>
  1027. <!-- Sous-section: POSTE D'ALTERNANCE -->
  1028. <div class="mt-8 pt-8 border-t border-gray-200 dark:border-neutral-700">
  1029. <h3 class="text-base font-semibold text-gray-800 dark:text-white mb-4">POSTE D'ALTERNANCE</h3>
  1030. <div class="max-w-xl">
  1031. <label for="poste_alternance" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1032. Sélectionner un poste d'alternance
  1033. </label>
  1034. <select id="poste_alternance" name="poste_alternance"
  1035. 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">
  1036. <option value="">Sélectionner un poste d'alternance</option>
  1037. <option value="apprentie_assistante_marketing_digital">Apprentie Assistante marketing digital</option>
  1038. <option value="apprenti_chef_projets_digitaux">Apprenti Chef de projets digitaux</option>
  1039. <option value="apprentie_comptable">Apprentie Comptable</option>
  1040. <option value="apprenti_conseiller_client_apv">Apprenti Conseiller client APV</option>
  1041. <option value="apprentie_conseillere_client_apv">Apprentie Conseillère client APV</option>
  1042. <option value="apprenti_expert_financier_administratif">Apprenti Expert financier et administratif</option>
  1043. <option value="apprenti_magasinier">Apprenti Magasinier</option>
  1044. <option value="apprentie_magasiniere">Apprentie Magasinière</option>
  1045. <option value="apprenti_manager_developpement_commercial">Apprenti Manager développement commercial</option>
  1046. <option value="apprenti_marketing">Apprenti Marketing</option>
  1047. <option value="apprentie_marketing">Apprentie Marketing</option>
  1048. <option value="apprenti_mecanicien">Apprenti Mécanicien</option>
  1049. <option value="apprentie_mecanicienne">Apprentie Mécanicienne</option>
  1050. <option value="apprenti_peintre">Apprenti Peintre</option>
  1051. <option value="apprentie_secretaire">Apprentie Secrétaire</option>
  1052. <option value="apprentie_systemes_information">Apprentie Systèmes d'information</option>
  1053. <option value="apprenti_technicien_expert_apv">Apprenti Technicien expert APV</option>
  1054. <option value="apprentie_technicienne_expert_apv">Apprentie Technicienne expert APV</option>
  1055. <option value="apprenti_vendeur_automobile">Apprenti Vendeur automobile</option>
  1056. <option value="apprentie_vendeuse_automobile">Apprentie Vendeuse automobile</option>
  1057. <option value="cprof_mecanicien">C.PROF Mécanicien</option>
  1058. <option value="cprof_technicien_apv">C.PROF Technicien APV</option>
  1059. </select>
  1060. </div>
  1061. </div>
  1062. </div>
  1063. </div>
  1064. <!-- Section 3: Informations de rémunération -->
  1065. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition">
  1066. <div class="p-6">
  1067. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">REMUNERATION</h2>
  1068. <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
  1069. <!-- Temps partiel (radio) -->
  1070. <div class="md:col-span-2">
  1071. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1072. TEMPS PARTIEL ?
  1073. </label>
  1074. <div class="flex gap-4">
  1075. <div class="flex">
  1076. <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">
  1077. <label for="temps_partiel_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1078. </div>
  1079. <div class="flex">
  1080. <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>
  1081. <label for="temps_partiel_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1082. </div>
  1083. </div>
  1084. </div>
  1085. <!-- Champs conditionnels si temps partiel = Oui -->
  1086. <div id="champs_temps_partiel" class="md:col-span-2 grid grid-cols-1 md:grid-cols-2 gap-6 conditional-field">
  1087. <!-- Horaires et jours travaillés -->
  1088. <div class="md:col-span-2">
  1089. <label for="horaires_temps_partiel" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1090. HORAIRES ET JOURS TRAVAILLES
  1091. </label>
  1092. <textarea id="horaires_temps_partiel" name="horaires_temps_partiel" rows="4"
  1093. 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"
  1094. placeholder=""></textarea>
  1095. </div>
  1096. <!-- Salaire temps partiel -->
  1097. <div class="max-w-sm">
  1098. <label for="salaire_temps_partiel" class="block text-sm font-medium mb-2 dark:text-white">
  1099. SALAIRE TEMPS PARTIEL
  1100. </label>
  1101. <div class="relative">
  1102. <input type="text" id="salaire_temps_partiel" name="salaire_temps_partiel"
  1103. 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"
  1104. placeholder="0.00">
  1105. <div class="absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4">
  1106. <span class="text-gray-500 dark:text-neutral-500">€</span>
  1107. </div>
  1108. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-4">
  1109. <span class="text-gray-500 dark:text-neutral-500">EUR</span>
  1110. </div>
  1111. </div>
  1112. </div>
  1113. </div>
  1114. <!-- Base horaire (select) -->
  1115. <div class="md:col-span-2">
  1116. <label for="base_horaire" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1117. BASE HORAIRE
  1118. </label>
  1119. <select id="base_horaire" name="base_horaire"
  1120. 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">
  1121. <option value="">Sélectionner une base horaire</option>
  1122. <option value="35" data-hours="35">35h (Temps plein)</option>
  1123. <option value="39" data-hours="35">Forfait 39h avec 2h sup + 1 JRTT (2h)</option>
  1124. <option value="30" data-hours="30">30h</option>
  1125. <option value="28" data-hours="28">28h</option>
  1126. <option value="24" data-hours="24">24h</option>
  1127. <option value="20" data-hours="20">20h</option>
  1128. </select>
  1129. </div>
  1130. <!-- Salaire mensuel brut (number) -->
  1131. <div class="max-w-sm space-y-3">
  1132. <div>
  1133. <label for="salaire" class="block text-sm font-medium mb-2 dark:text-white">
  1134. SALAIRE MENSUEL BRUT SUR LA BASE HORAIRE CHOISIE <span class="text-red-500">*</span>
  1135. </label>
  1136. <div class="relative">
  1137. <input type="text" id="salaire" name="salaire" required
  1138. 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"
  1139. placeholder="0.00">
  1140. <div class="absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4">
  1141. <span class="text-gray-500 dark:text-neutral-500">€</span>
  1142. </div>
  1143. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-4">
  1144. <span class="text-gray-500 dark:text-neutral-500">EUR</span>
  1145. </div>
  1146. </div>
  1147. </div>
  1148. <!-- Équivalent 35h (readonly) -->
  1149. <div>
  1150. <label for="salaire_35h" class="block text-sm font-medium mb-2 dark:text-white">
  1151. EQUIVALENT 35h :
  1152. </label>
  1153. <div class="relative">
  1154. <input type="text" id="salaire_35h" name="salaire_35h" readonly
  1155. 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"
  1156. placeholder="0.00">
  1157. <div class="absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4">
  1158. <span class="text-gray-500 dark:text-neutral-500">€</span>
  1159. </div>
  1160. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-4">
  1161. <span class="text-gray-500 dark:text-neutral-500">EUR</span>
  1162. </div>
  1163. </div>
  1164. </div>
  1165. </div>
  1166. <!-- Rémunération variable (radio) -->
  1167. <div class="md:col-span-2">
  1168. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1169. REMUNERATION VARIABLE
  1170. </label>
  1171. <div class="flex gap-4">
  1172. <div class="flex">
  1173. <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">
  1174. <label for="remuneration_variable_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1175. </div>
  1176. <div class="flex">
  1177. <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>
  1178. <label for="remuneration_variable_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1179. </div>
  1180. </div>
  1181. </div>
  1182. <!-- Montant variable (number) - Conditionnel -->
  1183. <div id="montant_variable_container" class="conditional-field max-w-sm">
  1184. <label for="montant_variable" class="block text-sm font-medium mb-2 dark:text-white">
  1185. Montant variable annuel (€)
  1186. </label>
  1187. <div class="relative">
  1188. <input type="text" id="montant_variable" name="montant_variable"
  1189. 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"
  1190. placeholder="0.00">
  1191. <div class="absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4">
  1192. <span class="text-gray-500 dark:text-neutral-500">€</span>
  1193. </div>
  1194. <div class="absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-4">
  1195. <span class="text-gray-500 dark:text-neutral-500">EUR</span>
  1196. </div>
  1197. </div>
  1198. </div>
  1199. <!-- Avantages en nature (number) -->
  1200. <div>
  1201. <label for="avantages_nature" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1202. Avantages en nature (€/an)
  1203. </label>
  1204. <input type="number" id="avantages_nature" name="avantages_nature" min="0" step="0.01"
  1205. 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"
  1206. placeholder="0">
  1207. </div>
  1208. <!-- Véhicule de fonction (radio) -->
  1209. <div class="md:col-span-2">
  1210. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1211. Véhicule de fonction ?
  1212. </label>
  1213. <div class="flex gap-4">
  1214. <div class="flex">
  1215. <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>
  1216. <label for="vehicule_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1217. </div>
  1218. <div class="flex">
  1219. <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">
  1220. <label for="vehicule_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1221. </div>
  1222. </div>
  1223. </div>
  1224. </div>
  1225. </div>
  1226. </div>
  1227. <!-- Section 4: Formation et diplômes -->
  1228. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition">
  1229. <div class="p-6">
  1230. <h2 class="text-lg font-semibold text-[#21B6BA] dark:text-[#21B6BA] mb-4">Formation et diplômes</h2>
  1231. <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
  1232. <!-- CV (file) -->
  1233. <div>
  1234. <label for="cv" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1235. CV <span class="text-red-500">*</span>
  1236. </label>
  1237. <input type="file" id="cv" name="cv" required accept=".pdf,.doc,.docx"
  1238. 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]">
  1239. <p class="mt-1 text-xs text-gray-500 dark:text-neutral-500">PDF, DOC ou DOCX. Max 5MB.</p>
  1240. </div>
  1241. <!-- Pièce d'identité (file) -->
  1242. <div>
  1243. <label for="piece_identite" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1244. Pièce d'identité <span class="text-red-500">*</span>
  1245. </label>
  1246. <input type="file" id="piece_identite" name="piece_identite" required accept=".pdf,.jpg,.jpeg,.png"
  1247. 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]">
  1248. <p class="mt-1 text-xs text-gray-500 dark:text-neutral-500">PDF ou image. Max 5MB.</p>
  1249. </div>
  1250. <!-- Autres documents (file) -->
  1251. <div class="md:col-span-2">
  1252. <label for="autres_documents" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1253. Autres documents
  1254. </label>
  1255. <input type="file" id="autres_documents" name="autres_documents[]" multiple accept=".pdf,.jpg,.jpeg,.png,.doc,.docx"
  1256. 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]">
  1257. <p class="mt-1 text-xs text-gray-500 dark:text-neutral-500">Plusieurs fichiers possibles. Max 5MB par fichier.</p>
  1258. </div>
  1259. </div>
  1260. </div>
  1261. </div>
  1262. <!-- Section 5: INFORMATIQUE -->
  1263. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition">
  1264. <div class="p-6">
  1265. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-6">INFORMATIQUE</h2>
  1266. <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
  1267. <!-- Compte Windows avec bouton Copier -->
  1268. <div>
  1269. <label for="compte_windows" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1270. Compte Windows
  1271. </label>
  1272. <div class="flex gap-2">
  1273. <input type="text" id="compte_windows" name="compte_windows" readonly
  1274. 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"
  1275. value="augustin.podvin">
  1276. <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">
  1277. <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">
  1278. <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>
  1279. <path d="M4 16c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h8c1.1 0 2 .9 2 2"></path>
  1280. </svg>
  1281. Copier
  1282. </button>
  1283. </div>
  1284. </div>
  1285. <!-- Compte Office 365 avec bouton Copier -->
  1286. <div>
  1287. <label for="compte_office365" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1288. Compte Office 365
  1289. </label>
  1290. <div class="flex gap-2">
  1291. <input type="text" id="compte_office365" name="compte_office365" readonly
  1292. 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"
  1293. value="augustin.podvin@sipa-automobiles.fr">
  1294. <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">
  1295. <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">
  1296. <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>
  1297. <path d="M4 16c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h8c1.1 0 2 .9 2 2"></path>
  1298. </svg>
  1299. Copier
  1300. </button>
  1301. </div>
  1302. </div>
  1303. <!-- MDP Temporaire avec bouton Copier -->
  1304. <div>
  1305. <label for="mot_de_passe" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1306. MDP Temporaire
  1307. </label>
  1308. <div class="flex gap-2">
  1309. <input type="text" id="mot_de_passe" name="mot_de_passe" readonly
  1310. 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"
  1311. value="Sip@OGU4my">
  1312. <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">
  1313. <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">
  1314. <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>
  1315. <path d="M4 16c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h8c1.1 0 2 .9 2 2"></path>
  1316. </svg>
  1317. Copier
  1318. </button>
  1319. </div>
  1320. </div>
  1321. <div class="space-y-8 mt-8 pt-8 border-t border-gray-200 dark:border-neutral-700">
  1322. <!-- TÉLÉPHONE MOBILE -->
  1323. <div class="border-b border-gray-200 dark:border-neutral-700 pb-6">
  1324. <div class="flex items-center gap-3 mb-4">
  1325. <h3 class="text-base font-semibold text-gray-800 dark:text-white">TÉLÉPHONE MOBILE</h3>
  1326. <label for="switch-telephone-mobile" class="relative inline-flex items-center cursor-pointer">
  1327. <input type="checkbox" id="switch-telephone-mobile" class="sr-only peer">
  1328. <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>
  1329. </label>
  1330. </div>
  1331. <div id="contenu-telephone-mobile" class="space-y-4 conditional-field">
  1332. <div>
  1333. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1334. RÉCUPÈRE T-IL LE MOBILE D'UN COLLABORATEUR ?
  1335. </label>
  1336. <div class="flex gap-4">
  1337. <div class="flex">
  1338. <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">
  1339. <label for="recupere_mobile_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1340. </div>
  1341. <div class="flex">
  1342. <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>
  1343. <label for="recupere_mobile_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1344. </div>
  1345. </div>
  1346. </div>
  1347. <!-- Numéro de ligne récupéré (affiché si recupere_mobile = oui) -->
  1348. <div id="numero_ligne_recupere_container" class="conditional-field">
  1349. <label for="numero_ligne_recupere" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1350. Numéro de ligne récupéré
  1351. </label>
  1352. <input type="tel" id="numero_ligne_recupere" name="numero_ligne_recupere"
  1353. 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"
  1354. placeholder="06 12 34 56 78">
  1355. </div>
  1356. <!-- NOUVEAU MOBILE (affiché seulement si recupere_mobile = non) -->
  1357. <div id="nouveau_mobile_container" class="conditional-field is-active">
  1358. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1359. NOUVEAU MOBILE
  1360. </label>
  1361. <div class="flex gap-4">
  1362. <div class="flex">
  1363. <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">
  1364. <label for="mobile_iphone" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">IPHONE</label>
  1365. </div>
  1366. <div class="flex">
  1367. <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">
  1368. <label for="mobile_android" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">ANDROID</label>
  1369. </div>
  1370. </div>
  1371. </div>
  1372. </div>
  1373. </div>
  1374. <!-- TÉLÉPHONE FIXE -->
  1375. <div class="border-b border-gray-200 dark:border-neutral-700 pb-6">
  1376. <div class="flex items-center gap-3 mb-4">
  1377. <h3 class="text-base font-semibold text-gray-800 dark:text-white">TÉLÉPHONE FIXE</h3>
  1378. <label for="switch-telephone-fixe" class="relative inline-flex items-center cursor-pointer">
  1379. <input type="checkbox" id="switch-telephone-fixe" class="sr-only peer">
  1380. <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>
  1381. </label>
  1382. </div>
  1383. <div id="contenu-telephone-fixe" class="space-y-4 conditional-field">
  1384. <div>
  1385. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1386. RÉCUPÈRE T-IL LE TELEPHONE D'UN COLLABORATEUR ?
  1387. </label>
  1388. <div class="flex gap-4">
  1389. <div class="flex">
  1390. <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">
  1391. <label for="recupere_telephone_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1392. </div>
  1393. <div class="flex">
  1394. <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>
  1395. <label for="recupere_telephone_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1396. </div>
  1397. </div>
  1398. </div>
  1399. <!-- Numéro de ligne récupéré (affiché si recupere_telephone = oui) -->
  1400. <div id="numero_ligne_recupere_fixe_container" class="conditional-field">
  1401. <label for="numero_ligne_recupere_fixe" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1402. Numéro de ligne récupéré
  1403. </label>
  1404. <input type="tel" id="numero_ligne_recupere_fixe" name="numero_ligne_recupere_fixe"
  1405. 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"
  1406. placeholder="01 23 45 67 89">
  1407. </div>
  1408. <!-- NOUVEAU TEL FIXE (affiché seulement si recupere_telephone = non) -->
  1409. <div id="nouveau_tel_fixe_container" class="conditional-field is-active">
  1410. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1411. NOUVEAU TEL FIXE
  1412. </label>
  1413. <div class="flex gap-4">
  1414. <div class="flex">
  1415. <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">
  1416. <label for="tel_classique" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">POSTE CLASSIQUE</label>
  1417. </div>
  1418. <div class="flex">
  1419. <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">
  1420. <label for="tel_sans_fil" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">POSTE SANS FIL</label>
  1421. </div>
  1422. </div>
  1423. </div>
  1424. </div>
  1425. </div>
  1426. <!-- ORDINATEUR -->
  1427. <div>
  1428. <div class="flex items-center gap-3 mb-4">
  1429. <h3 class="text-base font-semibold text-gray-800 dark:text-white">ORDINATEUR</h3>
  1430. <label for="switch-ordinateur" class="relative inline-flex items-center cursor-pointer">
  1431. <input type="checkbox" id="switch-ordinateur" class="sr-only peer">
  1432. <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>
  1433. </label>
  1434. </div>
  1435. <div id="contenu-ordinateur" class="space-y-6 conditional-field">
  1436. <!-- Question récupération PC -->
  1437. <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
  1438. <div>
  1439. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1440. RÉCUPÈRE T-IL LE PC D'UN COLLABORATEUR ?
  1441. </label>
  1442. <div class="flex gap-4">
  1443. <div class="flex">
  1444. <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">
  1445. <label for="recupere_pc_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1446. </div>
  1447. <div class="flex">
  1448. <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>
  1449. <label for="recupere_pc_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1450. </div>
  1451. </div>
  1452. </div>
  1453. <!-- NOUVEAU PC (affiché seulement si recupere_pc = non) -->
  1454. <div id="nouveau_pc_container" class="conditional-field is-active">
  1455. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1456. NOUVEAU PC
  1457. </label>
  1458. <div class="flex gap-4">
  1459. <div class="flex">
  1460. <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">
  1461. <label for="pc_fixe" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Fixe</label>
  1462. </div>
  1463. <div class="flex">
  1464. <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">
  1465. <label for="pc_portable" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Portable</label>
  1466. </div>
  1467. </div>
  1468. </div>
  1469. <!-- ECRAN SUPPLEMENTAIRE -->
  1470. <div>
  1471. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1472. ECRAN SUPPLEMENTAIRE
  1473. </label>
  1474. <div class="flex gap-4">
  1475. <div class="flex">
  1476. <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">
  1477. <label for="ecran_supp_oui" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Oui</label>
  1478. </div>
  1479. <div class="flex">
  1480. <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">
  1481. <label for="ecran_supp_non" class="text-sm text-gray-700 ms-2 dark:text-neutral-400">Non</label>
  1482. </div>
  1483. </div>
  1484. </div>
  1485. </div>
  1486. <!-- Numéro de ligne récupéré (affiché si recupere_pc = oui) -->
  1487. <div id="numero_ligne_recupere_pc_container" class="conditional-field">
  1488. <label for="numero_ligne_recupere_pc" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1489. Numéro de ligne récupéré
  1490. </label>
  1491. <input type="text" id="numero_ligne_recupere_pc" name="numero_ligne_recupere_pc"
  1492. 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"
  1493. placeholder="">
  1494. </div>
  1495. <!-- Logiciels nécessaires -->
  1496. <div>
  1497. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1498. Logiciels nécessaires
  1499. </label>
  1500. <div class="grid grid-cols-1 md:grid-cols-2 gap-2">
  1501. <div class="flex">
  1502. <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">
  1503. <label for="log_office" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">Office 365</label>
  1504. </div>
  1505. <div class="flex">
  1506. <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">
  1507. <label for="log_teams" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">Microsoft Teams</label>
  1508. </div>
  1509. <div class="flex">
  1510. <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">
  1511. <label for="log_crm" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">CRM (Salesforce)</label>
  1512. </div>
  1513. <div class="flex">
  1514. <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">
  1515. <label for="log_erp" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">ERP</label>
  1516. </div>
  1517. <div class="flex">
  1518. <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">
  1519. <label for="log_adobe" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">Suite Adobe</label>
  1520. </div>
  1521. <div class="flex">
  1522. <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">
  1523. <label for="log_autocad" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">AutoCAD</label>
  1524. </div>
  1525. </div>
  1526. </div>
  1527. <!-- Listes de diffusion -->
  1528. <div>
  1529. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1530. Listes de diffusion
  1531. </label>
  1532. <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
  1533. <!-- Colonne LISTES DE DIFFUSION -->
  1534. <div>
  1535. <label class="block text-sm font-semibold mb-3 text-gray-800 dark:text-white">
  1536. LISTES DE DIFFUSION
  1537. </label>
  1538. <div class="space-y-2">
  1539. <div class="flex">
  1540. <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>
  1541. <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>
  1542. </div>
  1543. <div class="flex">
  1544. <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">
  1545. <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>
  1546. </div>
  1547. <div class="flex">
  1548. <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">
  1549. <label for="ld_comptabilite" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_COMPTABILITE_AUTO_33</label>
  1550. </div>
  1551. <div class="flex">
  1552. <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">
  1553. <label for="ld_fiat" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_FIAT_AUTO_33</label>
  1554. </div>
  1555. <div class="flex">
  1556. <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">
  1557. <label for="ld_magasin" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_MAGASIN_AUTO_33</label>
  1558. </div>
  1559. <div class="flex">
  1560. <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">
  1561. <label for="ld_restitution" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_RESTITUTION_LOA_LLD_AUTO_33</label>
  1562. </div>
  1563. <div class="flex">
  1564. <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">
  1565. <label for="ld_sav" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_SAV_AUTO_33</label>
  1566. </div>
  1567. <div class="flex">
  1568. <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">
  1569. <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>
  1570. </div>
  1571. <div class="flex">
  1572. <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">
  1573. <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>
  1574. </div>
  1575. <div class="flex">
  1576. <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">
  1577. <label for="ld_service_vo" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_SERVICE_VO_AUTO_33</label>
  1578. </div>
  1579. </div>
  1580. </div>
  1581. <!-- Colonne ORGA -->
  1582. <div>
  1583. <label class="block text-sm font-semibold mb-3 text-gray-800 dark:text-white">
  1584. ORGA
  1585. </label>
  1586. <div class="space-y-2">
  1587. <div class="flex">
  1588. <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">
  1589. <label for="ld_comptabilites" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_COMPTABILITES</label>
  1590. </div>
  1591. <div class="flex">
  1592. <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">
  1593. <label for="ld_directeurs" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_DIRECTEURS</label>
  1594. </div>
  1595. <div class="flex">
  1596. <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">
  1597. <label for="ld_secretaires_apv" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_SECRETAIRES_APV</label>
  1598. </div>
  1599. <div class="flex">
  1600. <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">
  1601. <label for="ld_secretaires_vn" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_SECRETAIRES_VN</label>
  1602. </div>
  1603. <div class="flex">
  1604. <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">
  1605. <label for="ld_secretaires_vo" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_SECRETAIRES_VO</label>
  1606. </div>
  1607. <div class="flex">
  1608. <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">
  1609. <label for="ld_resp_apv" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_RESPONSABLES_APV_SIPA</label>
  1610. </div>
  1611. <div class="flex">
  1612. <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">
  1613. <label for="ld_resp_atelier" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_RESPONSABLES_ATELIER_SIPA</label>
  1614. </div>
  1615. <div class="flex">
  1616. <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">
  1617. <label for="ld_resp_magasin" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_RESPONSABLES_MAGASIN_SIPA</label>
  1618. </div>
  1619. <div class="flex">
  1620. <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">
  1621. <label for="ld_resp_vn" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_RESPONSABLES_VN_SIPA</label>
  1622. </div>
  1623. <div class="flex">
  1624. <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">
  1625. <label for="ld_resp_vo" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_RESPONSABLES_VO_SIPA</label>
  1626. </div>
  1627. <div class="flex">
  1628. <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">
  1629. <label for="ld_mds" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">LD_MDS</label>
  1630. </div>
  1631. </div>
  1632. </div>
  1633. </div>
  1634. </div>
  1635. <!-- Accès spécifiques -->
  1636. <div>
  1637. <label class="block text-sm font-medium mb-3 text-gray-700 dark:text-neutral-300">
  1638. Accès spécifiques
  1639. </label>
  1640. <div class="space-y-2">
  1641. <div class="flex">
  1642. <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">
  1643. <label for="acc_vpn" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">Accès VPN</label>
  1644. </div>
  1645. <div class="flex">
  1646. <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">
  1647. <label for="acc_files" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">Serveur de fichiers</label>
  1648. </div>
  1649. <div class="flex">
  1650. <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">
  1651. <label for="acc_admin" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">Droits administrateur</label>
  1652. </div>
  1653. </div>
  1654. </div>
  1655. <!-- Intitulé de signature -->
  1656. <div>
  1657. <label for="intitule_signature" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1658. Intitulé de signature
  1659. </label>
  1660. <input type="text" id="intitule_signature" name="intitule_signature"
  1661. 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"
  1662. placeholder="Ex: Directeur Commercial">
  1663. </div>
  1664. </div>
  1665. </div>
  1666. </div>
  1667. </div>
  1668. </div>
  1669. <!-- Section 6: Commentaires et informations supplémentaires -->
  1670. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition mt-6">
  1671. <div class="p-6">
  1672. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-4">Commentaires et informations supplémentaires</h2>
  1673. <div class="space-y-6">
  1674. <!-- Commentaires RH (textarea) -->
  1675. <div>
  1676. <label for="commentaires_rh" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1677. Commentaires internes RH
  1678. </label>
  1679. <textarea id="commentaires_rh" name="commentaires_rh" rows="4"
  1680. 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"
  1681. placeholder="Remarques particulières, informations supplémentaires..."></textarea>
  1682. </div>
  1683. <!-- Remarques IT (textarea) -->
  1684. <div>
  1685. <label for="remarques_it" class="block text-sm font-medium mb-2 text-gray-700 dark:text-neutral-300">
  1686. Remarques IT
  1687. </label>
  1688. <textarea id="remarques_it" name="remarques_it" rows="3"
  1689. 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"
  1690. placeholder="Besoins spécifiques, configurations particulières..."></textarea>
  1691. </div>
  1692. <!-- Validation de lecture (checkbox) -->
  1693. <div class="flex items-start">
  1694. <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">
  1695. <label for="validation_lecture" class="text-sm text-gray-700 ms-3 dark:text-neutral-400">
  1696. Je confirme avoir lu et vérifié toutes les informations saisies. <span class="text-red-500">*</span>
  1697. </label>
  1698. </div>
  1699. </div>
  1700. </div>
  1701. </div>
  1702. <!-- Section Component -->
  1703. <div class="bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-neutral-800 dark:border-neutral-700 smooth-transition mt-6">
  1704. <div class="p-6">
  1705. <h2 class="text-lg font-semibold text-gray-800 dark:text-white mb-6">Component</h2>
  1706. <div class="space-y-8">
  1707. <!-- Input with leading button and trailing span -->
  1708. <div>
  1709. <label for="hs-leading-button-add-on-with-leading-and-leading" class="sr-only">URL</label>
  1710. <div class="flex rounded-lg">
  1711. <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">
  1712. <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">
  1713. <circle cx="11" cy="11" r="8"></circle>
  1714. <path d="m21 21-4.3-4.3"></path>
  1715. </svg>
  1716. </button>
  1717. <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">
  1718. <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">
  1719. <span class="text-sm text-gray-500 dark:text-neutral-400">http://</span>
  1720. </span>
  1721. </div>
  1722. </div>
  1723. <!-- Search box with loading -->
  1724. <div>
  1725. <label for="hs-search-box-with-loading-5" class="block text-sm font-medium mb-2 dark:text-white">Search</label>
  1726. <div class="relative flex rounded-lg">
  1727. <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">
  1728. <div class="absolute inset-y-0 start-0 z-10 flex items-center pointer-events-none ps-4">
  1729. <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">
  1730. <circle cx="11" cy="11" r="8"></circle>
  1731. <path d="m21 21-4.3-4.3"></path>
  1732. </svg>
  1733. </div>
  1734. <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">
  1735. <span class="animate-spin inline-block size-4 border-3 border-current border-t-transparent text-white rounded-full" role="status" aria-label="loading">
  1736. <span class="sr-only">Loading...</span>
  1737. </span>
  1738. Search
  1739. </button>
  1740. </div>
  1741. </div>
  1742. <!-- Horizontal list group with checkboxes -->
  1743. <div>
  1744. <label class="block text-sm font-medium mb-3 dark:text-white">Sélection multiple</label>
  1745. <ul class="flex flex-col sm:flex-row">
  1746. <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">
  1747. <div class="relative flex items-start w-full">
  1748. <div class="flex items-center h-5">
  1749. <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="">
  1750. </div>
  1751. <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">
  1752. Chris Lynch
  1753. </label>
  1754. </div>
  1755. </li>
  1756. <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">
  1757. <div class="relative flex items-start w-full">
  1758. <div class="flex items-center h-5">
  1759. <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">
  1760. </div>
  1761. <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">
  1762. Maria Guan
  1763. </label>
  1764. </div>
  1765. </li>
  1766. <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">
  1767. <div class="relative flex items-start w-full">
  1768. <div class="flex items-center h-5">
  1769. <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">
  1770. </div>
  1771. <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">
  1772. Bob Arum
  1773. </label>
  1774. </div>
  1775. </li>
  1776. </ul>
  1777. </div>
  1778. <!-- Radio buttons with descriptions -->
  1779. <div>
  1780. <label class="block text-sm font-medium mb-3 dark:text-white">Options avec descriptions</label>
  1781. <div class="grid space-y-3">
  1782. <div class="relative flex items-start">
  1783. <div class="flex items-center h-5 mt-1">
  1784. <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="">
  1785. </div>
  1786. <label for="hs-radio-delete" class="ms-3">
  1787. <span class="block text-sm font-semibold text-gray-800 dark:text-neutral-300">Delete</span>
  1788. <span id="hs-radio-delete-description" class="block text-sm text-gray-600 dark:text-neutral-500">Notify me when this action happens.</span>
  1789. </label>
  1790. </div>
  1791. <div class="relative flex items-start">
  1792. <div class="flex items-center h-5 mt-1">
  1793. <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">
  1794. </div>
  1795. <label for="hs-radio-archive" class="ms-3">
  1796. <span class="block text-sm font-semibold text-gray-800 dark:text-neutral-300">Archive</span>
  1797. <span id="hs-radio-archive-description" class="block text-sm text-gray-600 dark:text-neutral-500">Notify me when this action happens.</span>
  1798. </label>
  1799. </div>
  1800. </div>
  1801. </div>
  1802. <!-- Vertical radio group -->
  1803. <div>
  1804. <label class="block text-sm font-medium mb-3 dark:text-white">Groupe de radios vertical</label>
  1805. <div class="flex flex-col gap-y-3">
  1806. <div class="flex">
  1807. <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="">
  1808. <label for="hs-radio-vertical-group-1" class="text-sm text-gray-500 ms-2 dark:text-neutral-400">Apple</label>
  1809. </div>
  1810. <div class="flex">
  1811. <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">
  1812. <label for="hs-radio-vertical-group-2" class="text-sm text-gray-500 ms-2 dark:text-neutral-400">Pear</label>
  1813. </div>
  1814. <div class="flex">
  1815. <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">
  1816. <label for="hs-radio-vertical-group-3" class="text-sm text-gray-500 ms-2 dark:text-neutral-400">Orange</label>
  1817. </div>
  1818. </div>
  1819. </div>
  1820. </div>
  1821. </div>
  1822. </div>
  1823. <!-- Boutons d'action -->
  1824. <div class="flex justify-end gap-3">
  1825. <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">
  1826. Annuler
  1827. </button>
  1828. <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">
  1829. Enregistrer en brouillon
  1830. </button>
  1831. <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">
  1832. Soumettre la demande
  1833. </button>
  1834. </div>
  1835. </form>
  1836. </div>
  1837. </div>
  1838. <!-- Flatpickr JS -->
  1839. <script src="https://cdn.jsdelivr.net/npm/flatpickr"></script>
  1840. <script src="https://cdn.jsdelivr.net/npm/flatpickr/dist/l10n/fr.js"></script>
  1841. <!-- Preline JS -->
  1842. <script src="https://cdn.jsdelivr.net/npm/preline/dist/preline.js"></script>
  1843. <!-- Script pour les champs conditionnels -->
  1844. <script>
  1845. document.addEventListener('DOMContentLoaded', function() {
  1846. // Initialisation des datepickers avec flatpickr
  1847. const datepickerConfig = {
  1848. locale: 'fr',
  1849. dateFormat: 'd/m/Y',
  1850. altInput: true,
  1851. altFormat: 'd/m/Y',
  1852. allowInput: true
  1853. };
  1854. // Initialiser tous les champs de date
  1855. const dateEntreePicker = flatpickr('#date_entree', {
  1856. ...datepickerConfig,
  1857. onChange: function(selectedDates, dateStr, instance) {
  1858. // Copier la valeur vers date_debut_contrat
  1859. const dateDebutContrat = document.getElementById('date_debut_contrat');
  1860. if (dateDebutContrat && selectedDates.length > 0) {
  1861. // Utiliser le format d'affichage (altInput) qui est plus lisible
  1862. const altInput = instance.altInput;
  1863. if (altInput && altInput.value) {
  1864. dateDebutContrat.value = altInput.value;
  1865. } else {
  1866. // Formater la date en format français si altInput n'est pas disponible
  1867. const date = selectedDates[0];
  1868. const day = String(date.getDate()).padStart(2, '0');
  1869. const month = String(date.getMonth() + 1).padStart(2, '0');
  1870. const year = date.getFullYear();
  1871. dateDebutContrat.value = `${day}/${month}/${year}`;
  1872. }
  1873. } else if (dateDebutContrat && !dateStr) {
  1874. // Vider le champ si la date est supprimée
  1875. dateDebutContrat.value = '';
  1876. }
  1877. }
  1878. });
  1879. // Copier la valeur initiale de date_entree vers date_debut_contrat si elle existe
  1880. setTimeout(() => {
  1881. const dateEntreeInput = document.getElementById('date_entree');
  1882. const dateDebutContrat = document.getElementById('date_debut_contrat');
  1883. if (dateEntreeInput && dateDebutContrat && dateEntreeInput.value) {
  1884. // Récupérer la valeur depuis l'input alternatif de flatpickr si disponible
  1885. const dateEntreePicker = dateEntreeInput._flatpickr;
  1886. if (dateEntreePicker && dateEntreePicker.altInput && dateEntreePicker.altInput.value) {
  1887. dateDebutContrat.value = dateEntreePicker.altInput.value;
  1888. } else if (dateEntreeInput.value) {
  1889. dateDebutContrat.value = dateEntreeInput.value;
  1890. }
  1891. }
  1892. }, 100);
  1893. flatpickr('#date_transfert', datepickerConfig);
  1894. flatpickr('#date_nouveau_contrat', datepickerConfig);
  1895. flatpickr('#date_sortie_remplace', datepickerConfig);
  1896. // date_debut_contrat n'est plus initialisé avec flatpickr car il est disabled et copie automatiquement depuis date_entree
  1897. flatpickr('#date_fin_contrat', datepickerConfig);
  1898. flatpickr('#date_debut_interim', datepickerConfig);
  1899. flatpickr('#date_naissance', {
  1900. ...datepickerConfig,
  1901. maxDate: 'today',
  1902. defaultDate: new Date(2000, 0, 1)
  1903. });
  1904. // Gestion du type de demande (Recrutement/Transfert/Succession)
  1905. const typeDemandeSelect = document.getElementById('type_demande');
  1906. const champsRecrutement = document.getElementById('champs_recrutement');
  1907. const champsTransfert = document.getElementById('champs_transfert');
  1908. const champsSuccession = document.getElementById('champs_succession');
  1909. function updateTypeDemande() {
  1910. const value = typeDemandeSelect.value;
  1911. // Masquer tous les champs
  1912. champsRecrutement.classList.remove('is-active');
  1913. champsTransfert.classList.remove('is-active');
  1914. champsSuccession.classList.remove('is-active');
  1915. // Afficher les champs correspondants
  1916. if (value === 'recrutement') {
  1917. champsRecrutement.classList.add('is-active');
  1918. champsRecrutement.style.display = 'grid';
  1919. champsTransfert.style.display = 'none';
  1920. champsSuccession.style.display = 'none';
  1921. } else if (value === 'transfert') {
  1922. champsTransfert.classList.add('is-active');
  1923. champsRecrutement.style.display = 'none';
  1924. champsTransfert.style.display = 'grid';
  1925. champsSuccession.style.display = 'none';
  1926. } else if (value === 'succession') {
  1927. champsSuccession.classList.add('is-active');
  1928. champsRecrutement.style.display = 'none';
  1929. champsTransfert.style.display = 'none';
  1930. champsSuccession.style.display = 'grid';
  1931. }
  1932. }
  1933. typeDemandeSelect.addEventListener('change', updateTypeDemande);
  1934. // Initialiser au chargement (afficher recrutement par défaut)
  1935. updateTypeDemande();
  1936. // Gestion du type de contrat (affiche section CDD complète)
  1937. const typeContratRadios = document.querySelectorAll('input[name="type_contrat"]');
  1938. const sectionCDD = document.getElementById('section_cdd');
  1939. typeContratRadios.forEach(radio => {
  1940. radio.addEventListener('change', function() {
  1941. if (this.value === 'CDD') {
  1942. sectionCDD.classList.add('is-active');
  1943. } else {
  1944. sectionCDD.classList.remove('is-active');
  1945. }
  1946. });
  1947. });
  1948. // Gestion du temps partiel (affiche champs horaires et salaire)
  1949. const tempsPartielRadios = document.querySelectorAll('input[name="temps_partiel"]');
  1950. const champsTempsPartiel = document.getElementById('champs_temps_partiel');
  1951. tempsPartielRadios.forEach(radio => {
  1952. radio.addEventListener('change', function() {
  1953. if (this.value === 'oui') {
  1954. champsTempsPartiel.classList.add('is-active');
  1955. } else {
  1956. champsTempsPartiel.classList.remove('is-active');
  1957. }
  1958. });
  1959. });
  1960. // Gestion de l'intérim (affiche date début période intérim)
  1961. const interimRadios = document.querySelectorAll('input[name="interim_avant"]');
  1962. const dateInterimContainer = document.getElementById('date_interim_container');
  1963. function toggleDateInterim() {
  1964. const interimValue = document.querySelector('input[name="interim_avant"]:checked');
  1965. if (interimValue && interimValue.value === 'oui') {
  1966. dateInterimContainer.style.display = 'block';
  1967. setTimeout(() => {
  1968. dateInterimContainer.classList.add('is-active');
  1969. }, 10);
  1970. } else {
  1971. dateInterimContainer.classList.remove('is-active');
  1972. setTimeout(() => {
  1973. if (!dateInterimContainer.classList.contains('is-active')) {
  1974. dateInterimContainer.style.display = 'none';
  1975. }
  1976. }, 500);
  1977. }
  1978. }
  1979. interimRadios.forEach(radio => {
  1980. radio.addEventListener('change', toggleDateInterim);
  1981. });
  1982. // Initialiser l'état au chargement
  1983. toggleDateInterim();
  1984. // Gestion du samedi travaillé (affiche jours de repos)
  1985. const samediTravailleRadios = document.querySelectorAll('input[name="samedi_travaille"]');
  1986. const joursReposContainer = document.getElementById('jours_repos_container');
  1987. function toggleJoursRepos() {
  1988. const samediTravaille = document.querySelector('input[name="samedi_travaille"]:checked');
  1989. if (samediTravaille && samediTravaille.value === 'oui') {
  1990. joursReposContainer.style.display = 'block';
  1991. setTimeout(() => {
  1992. joursReposContainer.classList.add('is-active');
  1993. }, 10);
  1994. } else {
  1995. joursReposContainer.classList.remove('is-active');
  1996. setTimeout(() => {
  1997. if (!joursReposContainer.classList.contains('is-active')) {
  1998. joursReposContainer.style.display = 'none';
  1999. }
  2000. }, 500);
  2001. }
  2002. }
  2003. samediTravailleRadios.forEach(radio => {
  2004. radio.addEventListener('change', toggleJoursRepos);
  2005. });
  2006. // Initialiser l'état au chargement
  2007. toggleJoursRepos();
  2008. // Gestion du champ "Est manager" (affiche personnes supervisées)
  2009. const estManagerRadios = document.querySelectorAll('input[name="est_manager"]');
  2010. const personnesSupervisees = document.getElementById('personnes_supervisees_container');
  2011. estManagerRadios.forEach(radio => {
  2012. radio.addEventListener('change', function() {
  2013. if (this.value === 'oui') {
  2014. personnesSupervisees.classList.add('is-active');
  2015. } else {
  2016. personnesSupervisees.classList.remove('is-active');
  2017. }
  2018. });
  2019. });
  2020. // Gestion des personnes supervisées (système de badges)
  2021. const selectedPersonsContainer = document.getElementById('selected_persons');
  2022. const placeholderPersons = document.getElementById('placeholder_persons');
  2023. const addPersonneLibre = document.getElementById('add_personne_libre');
  2024. const btnAddPersonne = document.getElementById('btn_add_personne');
  2025. const personnesSuperviseeHidden = document.getElementById('personnes_supervisees_hidden');
  2026. let selectedPersons = [];
  2027. function updateHiddenField() {
  2028. personnesSuperviseeHidden.value = selectedPersons.join(', ');
  2029. }
  2030. function togglePlaceholder() {
  2031. if (selectedPersons.length > 0) {
  2032. placeholderPersons.style.display = 'none';
  2033. } else {
  2034. placeholderPersons.style.display = 'inline';
  2035. }
  2036. }
  2037. function addPerson(name) {
  2038. if (!name || name.trim() === '') return;
  2039. const trimmedName = name.trim();
  2040. // Vérifier si la personne n'est pas déjà ajoutée
  2041. if (selectedPersons.includes(trimmedName)) {
  2042. return;
  2043. }
  2044. selectedPersons.push(trimmedName);
  2045. // Marquer le formulaire comme modifié
  2046. markFormAsModified();
  2047. // Créer le badge
  2048. const badge = document.createElement('span');
  2049. badge.className = 'person-badge';
  2050. badge.innerHTML = `
  2051. <span>${trimmedName}</span>
  2052. <button type="button" class="remove-person" data-name="${trimmedName}">
  2053. <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">
  2054. <path d="M18 6 6 18"/><path d="m6 6 12 12"/>
  2055. </svg>
  2056. </button>
  2057. `;
  2058. selectedPersonsContainer.appendChild(badge);
  2059. // Ajouter l'événement de suppression
  2060. badge.querySelector('.remove-person').addEventListener('click', function() {
  2061. removePerson(this.dataset.name, badge);
  2062. });
  2063. togglePlaceholder();
  2064. updateHiddenField();
  2065. }
  2066. function removePerson(name, badgeElement) {
  2067. const index = selectedPersons.indexOf(name);
  2068. if (index > -1) {
  2069. selectedPersons.splice(index, 1);
  2070. }
  2071. // Marquer le formulaire comme modifié
  2072. markFormAsModified();
  2073. // Animation de sortie
  2074. badgeElement.style.animation = 'slideOutBadge 0.2s ease-in';
  2075. setTimeout(() => {
  2076. badgeElement.remove();
  2077. togglePlaceholder();
  2078. updateHiddenField();
  2079. }, 200);
  2080. }
  2081. // Événement sur le bouton Ajouter
  2082. btnAddPersonne.addEventListener('click', function() {
  2083. const value = addPersonneLibre.value.trim();
  2084. if (value) {
  2085. addPerson(value);
  2086. addPersonneLibre.value = ''; // Vider le champ
  2087. addPersonneLibre.focus(); // Garder le focus sur le champ
  2088. }
  2089. });
  2090. // Permettre l'ajout avec la touche Entrée
  2091. addPersonneLibre.addEventListener('keypress', function(e) {
  2092. if (e.key === 'Enter') {
  2093. e.preventDefault();
  2094. btnAddPersonne.click();
  2095. }
  2096. });
  2097. // Gestion du dropdown création de poste / remplacement
  2098. const creationPosteSelect = document.getElementById('creation_poste');
  2099. const champsRemplacementPoste = document.getElementById('champs_remplacement_poste');
  2100. function updateCreationPoste() {
  2101. if (creationPosteSelect.value === 'remplacement') {
  2102. // Forcer le display grid avant d'ajouter la classe active
  2103. champsRemplacementPoste.style.display = 'grid';
  2104. // Petit délai pour permettre au navigateur de traiter le changement de display
  2105. setTimeout(() => {
  2106. champsRemplacementPoste.classList.add('is-active');
  2107. }, 10);
  2108. } else {
  2109. champsRemplacementPoste.classList.remove('is-active');
  2110. // Masquer complètement après l'animation
  2111. setTimeout(() => {
  2112. if (!champsRemplacementPoste.classList.contains('is-active')) {
  2113. champsRemplacementPoste.style.display = 'none';
  2114. }
  2115. }, 500); // Attendre la fin de l'animation
  2116. }
  2117. }
  2118. creationPosteSelect.addEventListener('change', updateCreationPoste);
  2119. // Initialiser au chargement
  2120. updateCreationPoste();
  2121. // Gestion de la rémunération variable
  2122. const remunerationVariableRadios = document.querySelectorAll('input[name="remuneration_variable"]');
  2123. const montantVariableContainer = document.getElementById('montant_variable_container');
  2124. remunerationVariableRadios.forEach(radio => {
  2125. radio.addEventListener('change', function() {
  2126. if (this.value === 'oui') {
  2127. montantVariableContainer.classList.add('is-active');
  2128. } else {
  2129. montantVariableContainer.classList.remove('is-active');
  2130. }
  2131. });
  2132. });
  2133. // Gestion du service "Autre" - affichage/masquage du tableau des minima
  2134. const serviceContratSelect = document.getElementById('service_contrat');
  2135. const tableauMinima = document.getElementById('tableau_minima');
  2136. const messageServiceAutre = document.getElementById('message_service_autre');
  2137. function toggleTableauMinima() {
  2138. const serviceValue = serviceContratSelect.value;
  2139. if (serviceValue === 'autre') {
  2140. // Masquer le tableau et afficher le message
  2141. tableauMinima.classList.add('hidden');
  2142. messageServiceAutre.classList.remove('hidden');
  2143. } else {
  2144. // Afficher le tableau et masquer le message
  2145. tableauMinima.classList.remove('hidden');
  2146. messageServiceAutre.classList.add('hidden');
  2147. }
  2148. }
  2149. serviceContratSelect.addEventListener('change', toggleTableauMinima);
  2150. // Initialiser l'état au chargement
  2151. toggleTableauMinima();
  2152. // Génération automatique du compte Windows et email
  2153. const prenomInput = document.getElementById('prenom');
  2154. const nomInput = document.getElementById('nom');
  2155. const compteWindowsInput = document.getElementById('compte_windows');
  2156. const compteOffice365Input = document.getElementById('compte_office365');
  2157. const emailProInput = document.getElementById('email_pro');
  2158. function genererCompte() {
  2159. const prenom = prenomInput.value.toLowerCase().trim();
  2160. const nom = nomInput.value.toLowerCase().trim();
  2161. if (prenom && nom) {
  2162. const compte = prenom.charAt(0) + nom.replace(/\s+/g, '');
  2163. compteWindowsInput.value = compte;
  2164. const email = prenom + '.' + nom.replace(/\s+/g, '') + '@sipa-automobiles.fr';
  2165. compteOffice365Input.value = email;
  2166. emailProInput.value = email;
  2167. }
  2168. }
  2169. prenomInput.addEventListener('blur', genererCompte);
  2170. nomInput.addEventListener('blur', genererCompte);
  2171. // Fonction pour copier le texte dans le presse-papiers
  2172. window.copierTexte = function(elementId, evt) {
  2173. const element = document.getElementById(elementId);
  2174. const texteACopier = element.value;
  2175. const event = evt || window.event;
  2176. navigator.clipboard.writeText(texteACopier).then(function() {
  2177. // Feedback visuel
  2178. const button = event ? (event.target.closest('button') || event.target) : document.querySelector(`button[onclick*="${elementId}"]`);
  2179. if (button) {
  2180. const originalText = button.innerHTML;
  2181. 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é';
  2182. button.classList.add('bg-[#1AA5A9]');
  2183. setTimeout(() => {
  2184. button.innerHTML = originalText;
  2185. button.classList.remove('bg-[#1AA5A9]');
  2186. }, 2000);
  2187. }
  2188. }).catch(function(err) {
  2189. console.error('Erreur lors de la copie:', err);
  2190. // Fallback pour les navigateurs plus anciens
  2191. element.select();
  2192. element.setSelectionRange(0, 99999);
  2193. try {
  2194. document.execCommand('copy');
  2195. alert('Copié dans le presse-papiers');
  2196. } catch (e) {
  2197. alert('Erreur lors de la copie');
  2198. }
  2199. });
  2200. }
  2201. // Calcul automatique de la période d'essai
  2202. const typeContratForPeriod = document.querySelectorAll('input[name="type_contrat"]');
  2203. const periodeEssaiInput = document.getElementById('periode_essai');
  2204. typeContratForPeriod.forEach(radio => {
  2205. radio.addEventListener('change', function() {
  2206. switch(this.value) {
  2207. case 'CDI':
  2208. periodeEssaiInput.value = '3 mois';
  2209. break;
  2210. case 'CDD':
  2211. periodeEssaiInput.value = '1 mois';
  2212. break;
  2213. case 'Alternance':
  2214. periodeEssaiInput.value = '45 jours';
  2215. break;
  2216. case 'Stage':
  2217. periodeEssaiInput.value = 'N/A';
  2218. break;
  2219. case 'Externe':
  2220. periodeEssaiInput.value = 'N/A';
  2221. break;
  2222. }
  2223. });
  2224. });
  2225. // Initialiser la période d'essai au chargement
  2226. const checkedContrat = document.querySelector('input[name="type_contrat"]:checked');
  2227. if (checkedContrat && checkedContrat.value === 'CDD') {
  2228. periodeEssaiInput.value = '1 mois';
  2229. }
  2230. // Calcul du salaire 35h équivalent
  2231. const salaireInput = document.getElementById('salaire');
  2232. const baseHoraireSelect = document.getElementById('base_horaire');
  2233. const salaire35hInput = document.getElementById('salaire_35h');
  2234. function calculerSalaire35h() {
  2235. const salaire = parseFloat(salaireInput.value);
  2236. const selectedOption = baseHoraireSelect.options[baseHoraireSelect.selectedIndex];
  2237. if (salaire && selectedOption && selectedOption.value) {
  2238. let heuresEquivalentes;
  2239. // Cas spécial pour le forfait 39h avec heures sup
  2240. if (selectedOption.value === '39') {
  2241. // 35h de base + 2h sup à 125% + 2h JRTT
  2242. // Heures équivalentes pour le calcul: 35 + (2 * 1.25) = 37.5h
  2243. heuresEquivalentes = 37.5;
  2244. } else {
  2245. // Pour les autres bases, utiliser les heures normales
  2246. heuresEquivalentes = parseFloat(selectedOption.value);
  2247. }
  2248. // Si c'est déjà du 35h, pas de conversion
  2249. if (heuresEquivalentes === 35) {
  2250. salaire35hInput.value = salaire.toFixed(2);
  2251. } else {
  2252. // Calculer l'équivalent 35h
  2253. const salaire35h = (salaire / heuresEquivalentes * 35).toFixed(2);
  2254. salaire35hInput.value = salaire35h;
  2255. }
  2256. } else {
  2257. salaire35hInput.value = '';
  2258. }
  2259. }
  2260. salaireInput.addEventListener('input', calculerSalaire35h);
  2261. baseHoraireSelect.addEventListener('change', calculerSalaire35h);
  2262. // Gestion des switches pour l'équipement informatique
  2263. const switchTelephoneMobile = document.getElementById('switch-telephone-mobile');
  2264. const contenuTelephoneMobile = document.getElementById('contenu-telephone-mobile');
  2265. const switchTelephoneFixe = document.getElementById('switch-telephone-fixe');
  2266. const contenuTelephoneFixe = document.getElementById('contenu-telephone-fixe');
  2267. const switchOrdinateur = document.getElementById('switch-ordinateur');
  2268. const contenuOrdinateur = document.getElementById('contenu-ordinateur');
  2269. function toggleContenuMobile() {
  2270. if (switchTelephoneMobile.checked) {
  2271. contenuTelephoneMobile.style.display = 'block';
  2272. contenuTelephoneMobile.classList.add('is-active');
  2273. } else {
  2274. contenuTelephoneMobile.classList.remove('is-active');
  2275. setTimeout(() => {
  2276. if (!contenuTelephoneMobile.classList.contains('is-active')) {
  2277. contenuTelephoneMobile.style.display = 'none';
  2278. }
  2279. }, 500);
  2280. }
  2281. }
  2282. function toggleContenuFixe() {
  2283. if (switchTelephoneFixe.checked) {
  2284. contenuTelephoneFixe.style.display = 'block';
  2285. contenuTelephoneFixe.classList.add('is-active');
  2286. } else {
  2287. contenuTelephoneFixe.classList.remove('is-active');
  2288. setTimeout(() => {
  2289. if (!contenuTelephoneFixe.classList.contains('is-active')) {
  2290. contenuTelephoneFixe.style.display = 'none';
  2291. }
  2292. }, 500);
  2293. }
  2294. }
  2295. function toggleContenuOrdinateur() {
  2296. if (switchOrdinateur.checked) {
  2297. contenuOrdinateur.style.display = 'block';
  2298. contenuOrdinateur.classList.add('is-active');
  2299. } else {
  2300. contenuOrdinateur.classList.remove('is-active');
  2301. setTimeout(() => {
  2302. if (!contenuOrdinateur.classList.contains('is-active')) {
  2303. contenuOrdinateur.style.display = 'none';
  2304. }
  2305. }, 500);
  2306. }
  2307. }
  2308. switchTelephoneMobile.addEventListener('change', toggleContenuMobile);
  2309. switchTelephoneFixe.addEventListener('change', toggleContenuFixe);
  2310. switchOrdinateur.addEventListener('change', toggleContenuOrdinateur);
  2311. // Initialiser l'état au chargement
  2312. toggleContenuMobile();
  2313. toggleContenuFixe();
  2314. toggleContenuOrdinateur();
  2315. // Gestion de l'affichage conditionnel pour récupération mobile
  2316. const recupereMobileRadios = document.querySelectorAll('input[name="recupere_mobile"]');
  2317. const numeroLigneRecupereContainer = document.getElementById('numero_ligne_recupere_container');
  2318. const nouveauMobileContainer = document.getElementById('nouveau_mobile_container');
  2319. function toggleRecupereMobile() {
  2320. const recupereMobile = document.querySelector('input[name="recupere_mobile"]:checked');
  2321. if (recupereMobile && recupereMobile.value === 'oui') {
  2322. // Afficher le champ numéro de ligne récupéré
  2323. numeroLigneRecupereContainer.style.display = 'block';
  2324. numeroLigneRecupereContainer.classList.add('is-active');
  2325. // Masquer la section nouveau mobile
  2326. nouveauMobileContainer.classList.remove('is-active');
  2327. setTimeout(() => {
  2328. if (!nouveauMobileContainer.classList.contains('is-active')) {
  2329. nouveauMobileContainer.style.display = 'none';
  2330. }
  2331. }, 500);
  2332. } else {
  2333. // Masquer le champ numéro de ligne récupéré
  2334. numeroLigneRecupereContainer.classList.remove('is-active');
  2335. setTimeout(() => {
  2336. if (!numeroLigneRecupereContainer.classList.contains('is-active')) {
  2337. numeroLigneRecupereContainer.style.display = 'none';
  2338. }
  2339. }, 500);
  2340. // Afficher la section nouveau mobile
  2341. nouveauMobileContainer.style.display = 'block';
  2342. nouveauMobileContainer.classList.add('is-active');
  2343. }
  2344. }
  2345. recupereMobileRadios.forEach(radio => {
  2346. radio.addEventListener('change', toggleRecupereMobile);
  2347. });
  2348. // Initialiser l'état au chargement
  2349. toggleRecupereMobile();
  2350. // Gestion de l'affichage conditionnel pour récupération téléphone fixe
  2351. const recupereTelephoneRadios = document.querySelectorAll('input[name="recupere_telephone"]');
  2352. const numeroLigneRecupereFixeContainer = document.getElementById('numero_ligne_recupere_fixe_container');
  2353. const nouveauTelFixeContainer = document.getElementById('nouveau_tel_fixe_container');
  2354. function toggleRecupereTelephone() {
  2355. const recupereTelephone = document.querySelector('input[name="recupere_telephone"]:checked');
  2356. if (recupereTelephone && recupereTelephone.value === 'oui') {
  2357. // Afficher le champ numéro de ligne récupéré
  2358. numeroLigneRecupereFixeContainer.style.display = 'block';
  2359. numeroLigneRecupereFixeContainer.classList.add('is-active');
  2360. // Masquer la section nouveau tel fixe
  2361. nouveauTelFixeContainer.classList.remove('is-active');
  2362. setTimeout(() => {
  2363. if (!nouveauTelFixeContainer.classList.contains('is-active')) {
  2364. nouveauTelFixeContainer.style.display = 'none';
  2365. }
  2366. }, 500);
  2367. } else {
  2368. // Masquer le champ numéro de ligne récupéré
  2369. numeroLigneRecupereFixeContainer.classList.remove('is-active');
  2370. setTimeout(() => {
  2371. if (!numeroLigneRecupereFixeContainer.classList.contains('is-active')) {
  2372. numeroLigneRecupereFixeContainer.style.display = 'none';
  2373. }
  2374. }, 500);
  2375. // Afficher la section nouveau tel fixe
  2376. nouveauTelFixeContainer.style.display = 'block';
  2377. nouveauTelFixeContainer.classList.add('is-active');
  2378. }
  2379. }
  2380. recupereTelephoneRadios.forEach(radio => {
  2381. radio.addEventListener('change', toggleRecupereTelephone);
  2382. });
  2383. // Initialiser l'état au chargement
  2384. toggleRecupereTelephone();
  2385. // Gestion de l'affichage conditionnel pour récupération PC
  2386. const recuperePCRadios = document.querySelectorAll('input[name="recupere_pc"]');
  2387. const numeroLigneRecuperePCContainer = document.getElementById('numero_ligne_recupere_pc_container');
  2388. const nouveauPCContainer = document.getElementById('nouveau_pc_container');
  2389. function toggleRecuperePC() {
  2390. const recuperePC = document.querySelector('input[name="recupere_pc"]:checked');
  2391. if (recuperePC && recuperePC.value === 'oui') {
  2392. // Afficher le champ numéro de ligne récupéré
  2393. numeroLigneRecuperePCContainer.style.display = 'block';
  2394. numeroLigneRecuperePCContainer.classList.add('is-active');
  2395. // Masquer la section nouveau PC
  2396. nouveauPCContainer.classList.remove('is-active');
  2397. setTimeout(() => {
  2398. if (!nouveauPCContainer.classList.contains('is-active')) {
  2399. nouveauPCContainer.style.display = 'none';
  2400. }
  2401. }, 500);
  2402. } else {
  2403. // Masquer le champ numéro de ligne récupéré
  2404. numeroLigneRecuperePCContainer.classList.remove('is-active');
  2405. setTimeout(() => {
  2406. if (!numeroLigneRecuperePCContainer.classList.contains('is-active')) {
  2407. numeroLigneRecuperePCContainer.style.display = 'none';
  2408. }
  2409. }, 500);
  2410. // Afficher la section nouveau PC
  2411. nouveauPCContainer.style.display = 'block';
  2412. nouveauPCContainer.classList.add('is-active');
  2413. }
  2414. }
  2415. recuperePCRadios.forEach(radio => {
  2416. radio.addEventListener('change', toggleRecuperePC);
  2417. });
  2418. // Initialiser l'état au chargement
  2419. toggleRecuperePC();
  2420. // Gestion du toggle du statut global (edit)
  2421. const toggleStatutBtn = document.getElementById('toggle_statut_global');
  2422. const statutGlobalSelect = document.getElementById('statut_global');
  2423. if (toggleStatutBtn && statutGlobalSelect) {
  2424. toggleStatutBtn.addEventListener('click', function() {
  2425. if (statutGlobalSelect.disabled) {
  2426. statutGlobalSelect.removeAttribute('disabled');
  2427. this.classList.add('text-blue-600', 'dark:text-blue-400');
  2428. } else {
  2429. statutGlobalSelect.setAttribute('disabled', 'disabled');
  2430. this.classList.remove('text-blue-600', 'dark:text-blue-400');
  2431. }
  2432. });
  2433. }
  2434. // Gestion des horaires et jours de travail dans la section CDD
  2435. const joursSemaineCDD = [
  2436. { nom: 'Lundi', code: 'lundi' },
  2437. { nom: 'Mardi', code: 'mardi' },
  2438. { nom: 'Mercredi', code: 'mercredi' },
  2439. { nom: 'Jeudi', code: 'jeudi' },
  2440. { nom: 'Vendredi', code: 'vendredi' },
  2441. { nom: 'Samedi', code: 'samedi' }
  2442. ];
  2443. const listeJoursCDD = document.getElementById('liste-jours-cdd');
  2444. const templateCDD = document.getElementById('template-jour-cdd');
  2445. const horairesDataCDD = {};
  2446. const joursParDefautCDD = ['lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi'];
  2447. // Générer les jours de la semaine pour CDD
  2448. if (listeJoursCDD && templateCDD) {
  2449. joursSemaineCDD.forEach((jour) => {
  2450. const clone = templateCDD.content.cloneNode(true);
  2451. const jourItem = clone.querySelector('.jour-item-cdd');
  2452. const jourLabel = clone.querySelector('.jour-label-cdd');
  2453. const jourActif = clone.querySelector('.jour-actif-cdd');
  2454. const jourContenu = clone.querySelector('.jour-contenu-cdd');
  2455. jourItem.setAttribute('data-jour', jour.code);
  2456. jourLabel.textContent = jour.nom;
  2457. jourLabel.setAttribute('for', `jour-cdd-${jour.code}`);
  2458. jourActif.id = `jour-cdd-${jour.code}`;
  2459. jourActif.name = `jours_cdd[${jour.code}][actif]`;
  2460. const heureDebutMatin = clone.querySelector('.heure-debut-matin-cdd');
  2461. const heureFinMatin = clone.querySelector('.heure-fin-matin-cdd');
  2462. const heureDebutApresmidi = clone.querySelector('.heure-debut-apresmidi-cdd');
  2463. const heureFinApresmidi = clone.querySelector('.heure-fin-apresmidi-cdd');
  2464. heureDebutMatin.name = `jours_cdd[${jour.code}][debut_matin]`;
  2465. heureDebutMatin.id = `debut-matin-cdd-${jour.code}`;
  2466. heureFinMatin.name = `jours_cdd[${jour.code}][fin_matin]`;
  2467. heureFinMatin.id = `fin-matin-cdd-${jour.code}`;
  2468. heureDebutApresmidi.name = `jours_cdd[${jour.code}][debut_apresmidi]`;
  2469. heureDebutApresmidi.id = `debut-apresmidi-cdd-${jour.code}`;
  2470. heureFinApresmidi.name = `jours_cdd[${jour.code}][fin_apresmidi]`;
  2471. heureFinApresmidi.id = `fin-apresmidi-cdd-${jour.code}`;
  2472. const estCocheParDefaut = joursParDefautCDD.includes(jour.code);
  2473. horairesDataCDD[jour.code] = {
  2474. actif: estCocheParDefaut,
  2475. debut_matin: estCocheParDefaut ? '09:00' : '',
  2476. fin_matin: estCocheParDefaut ? '12:00' : '',
  2477. debut_apresmidi: estCocheParDefaut ? '14:00' : '',
  2478. fin_apresmidi: estCocheParDefaut ? '18:00' : ''
  2479. };
  2480. if (estCocheParDefaut) {
  2481. jourActif.checked = true;
  2482. jourContenu.style.display = 'grid';
  2483. heureDebutMatin.value = '09:00';
  2484. heureFinMatin.value = '12:00';
  2485. heureDebutApresmidi.value = '14:00';
  2486. heureFinApresmidi.value = '18:00';
  2487. }
  2488. jourActif.addEventListener('change', function() {
  2489. horairesDataCDD[jour.code].actif = this.checked;
  2490. if (this.checked) {
  2491. jourContenu.style.display = 'grid';
  2492. if (!heureDebutMatin.value) heureDebutMatin.value = '09:00';
  2493. if (!heureFinMatin.value) heureFinMatin.value = '12:00';
  2494. if (!heureDebutApresmidi.value) heureDebutApresmidi.value = '14:00';
  2495. if (!heureFinApresmidi.value) heureFinApresmidi.value = '18:00';
  2496. } else {
  2497. jourContenu.style.display = 'none';
  2498. heureDebutMatin.value = '';
  2499. heureFinMatin.value = '';
  2500. heureDebutApresmidi.value = '';
  2501. heureFinApresmidi.value = '';
  2502. }
  2503. updateRecapitulatifCDD();
  2504. });
  2505. heureDebutMatin.addEventListener('change', function() {
  2506. horairesDataCDD[jour.code].debut_matin = this.value;
  2507. updateRecapitulatifCDD();
  2508. });
  2509. heureFinMatin.addEventListener('change', function() {
  2510. horairesDataCDD[jour.code].fin_matin = this.value;
  2511. updateRecapitulatifCDD();
  2512. });
  2513. heureDebutApresmidi.addEventListener('change', function() {
  2514. horairesDataCDD[jour.code].debut_apresmidi = this.value;
  2515. updateRecapitulatifCDD();
  2516. });
  2517. heureFinApresmidi.addEventListener('change', function() {
  2518. horairesDataCDD[jour.code].fin_apresmidi = this.value;
  2519. updateRecapitulatifCDD();
  2520. });
  2521. listeJoursCDD.appendChild(clone);
  2522. });
  2523. }
  2524. function calculerHeuresCDD(debutMatin, finMatin, debutApresmidi, finApresmidi) {
  2525. let totalMinutes = 0;
  2526. // Calculer les heures de matinée
  2527. if (debutMatin && finMatin) {
  2528. const [debutH, debutM] = debutMatin.split(':').map(Number);
  2529. const [finH, finM] = finMatin.split(':').map(Number);
  2530. let debutTotalMinutes = debutH * 60 + debutM;
  2531. let finTotalMinutes = finH * 60 + finM;
  2532. if (finTotalMinutes < debutTotalMinutes) {
  2533. finTotalMinutes += 24 * 60;
  2534. }
  2535. totalMinutes += finTotalMinutes - debutTotalMinutes;
  2536. }
  2537. // Calculer les heures d'après-midi
  2538. if (debutApresmidi && finApresmidi) {
  2539. const [debutH, debutM] = debutApresmidi.split(':').map(Number);
  2540. const [finH, finM] = finApresmidi.split(':').map(Number);
  2541. let debutTotalMinutes = debutH * 60 + debutM;
  2542. let finTotalMinutes = finH * 60 + finM;
  2543. if (finTotalMinutes < debutTotalMinutes) {
  2544. finTotalMinutes += 24 * 60;
  2545. }
  2546. totalMinutes += finTotalMinutes - debutTotalMinutes;
  2547. }
  2548. return totalMinutes / 60;
  2549. }
  2550. function formaterHeuresCDD(heures) {
  2551. const heuresEntieres = Math.floor(heures);
  2552. const minutes = Math.round((heures - heuresEntieres) * 60);
  2553. if (minutes === 0) {
  2554. return `${heuresEntieres}h`;
  2555. } else {
  2556. return `${heuresEntieres}h${minutes.toString().padStart(2, '0')}`;
  2557. }
  2558. }
  2559. function updateRecapitulatifCDD() {
  2560. const horairesTravailInput = document.getElementById('horaires_travail');
  2561. if (!horairesTravailInput) return;
  2562. let totalHeures = 0;
  2563. let nbJoursTravailles = 0;
  2564. const resumeTexte = [];
  2565. joursSemaineCDD.forEach((jour) => {
  2566. const data = horairesDataCDD[jour.code];
  2567. if (data && data.actif && (data.debut_matin || data.debut_apresmidi)) {
  2568. const heures = calculerHeuresCDD(
  2569. data.debut_matin,
  2570. data.fin_matin,
  2571. data.debut_apresmidi,
  2572. data.fin_apresmidi
  2573. );
  2574. totalHeures += heures;
  2575. nbJoursTravailles++;
  2576. let jourTexte = `${jour.nom}: `;
  2577. const parties = [];
  2578. if (data.debut_matin && data.fin_matin) {
  2579. parties.push(`Matin: ${data.debut_matin} - ${data.fin_matin}`);
  2580. }
  2581. if (data.debut_apresmidi && data.fin_apresmidi) {
  2582. parties.push(`Après-midi: ${data.debut_apresmidi} - ${data.fin_apresmidi}`);
  2583. }
  2584. jourTexte += parties.join(' | ');
  2585. jourTexte += ` (${formaterHeuresCDD(heures)})`;
  2586. resumeTexte.push(jourTexte);
  2587. }
  2588. });
  2589. horairesTravailInput.value = resumeTexte.join('\n');
  2590. }
  2591. // Bouton copier le lundi sur tous (CDD)
  2592. const btnCopierLundiCDD = document.getElementById('btn-copier-lundi-cdd');
  2593. if (btnCopierLundiCDD) {
  2594. btnCopierLundiCDD.addEventListener('click', function() {
  2595. const lundiItem = document.querySelector('[data-jour="lundi"].jour-item-cdd');
  2596. if (lundiItem) {
  2597. const lundiDebutMatin = lundiItem.querySelector('.heure-debut-matin-cdd');
  2598. const lundiFinMatin = lundiItem.querySelector('.heure-fin-matin-cdd');
  2599. const lundiDebutApresmidi = lundiItem.querySelector('.heure-debut-apresmidi-cdd');
  2600. const lundiFinApresmidi = lundiItem.querySelector('.heure-fin-apresmidi-cdd');
  2601. const sourceDebutMatin = lundiDebutMatin.value || '09:00';
  2602. const sourceFinMatin = lundiFinMatin.value || '12:00';
  2603. const sourceDebutApresmidi = lundiDebutApresmidi.value || '14:00';
  2604. const sourceFinApresmidi = lundiFinApresmidi.value || '18:00';
  2605. joursSemaineCDD.forEach((autreJour) => {
  2606. if (autreJour.code !== 'lundi') {
  2607. const autreItem = document.querySelector(`[data-jour="${autreJour.code}"].jour-item-cdd`);
  2608. if (autreItem) {
  2609. const autreDebutMatin = autreItem.querySelector('.heure-debut-matin-cdd');
  2610. const autreFinMatin = autreItem.querySelector('.heure-fin-matin-cdd');
  2611. const autreDebutApresmidi = autreItem.querySelector('.heure-debut-apresmidi-cdd');
  2612. const autreFinApresmidi = autreItem.querySelector('.heure-fin-apresmidi-cdd');
  2613. const autreActif = autreItem.querySelector('.jour-actif-cdd');
  2614. const autreContenu = autreItem.querySelector('.jour-contenu-cdd');
  2615. autreDebutMatin.value = sourceDebutMatin;
  2616. autreFinMatin.value = sourceFinMatin;
  2617. autreDebutApresmidi.value = sourceDebutApresmidi;
  2618. autreFinApresmidi.value = sourceFinApresmidi;
  2619. autreActif.checked = true;
  2620. autreContenu.style.display = 'grid';
  2621. horairesDataCDD[autreJour.code] = {
  2622. actif: true,
  2623. debut_matin: sourceDebutMatin,
  2624. fin_matin: sourceFinMatin,
  2625. debut_apresmidi: sourceDebutApresmidi,
  2626. fin_apresmidi: sourceFinApresmidi
  2627. };
  2628. }
  2629. }
  2630. });
  2631. updateRecapitulatifCDD();
  2632. }
  2633. });
  2634. }
  2635. // Mettre à jour le récapitulatif après génération
  2636. setTimeout(() => {
  2637. if (listeJoursCDD && templateCDD) {
  2638. updateRecapitulatifCDD();
  2639. }
  2640. }, 100);
  2641. // Gestion de la soumission du formulaire
  2642. const form = document.getElementById('integration-form');
  2643. const submitButton = form.querySelector('button[type="submit"]');
  2644. // Variable pour suivre si le formulaire a été modifié
  2645. let formModified = false;
  2646. let formSubmitted = false;
  2647. // Fonction pour marquer le formulaire comme modifié
  2648. function markFormAsModified() {
  2649. if (!formSubmitted) {
  2650. formModified = true;
  2651. }
  2652. }
  2653. // Écouter les modifications sur tous les champs du formulaire
  2654. const formInputs = form.querySelectorAll('input, select, textarea');
  2655. formInputs.forEach(input => {
  2656. // Ignorer les champs readonly et les boutons
  2657. if (input.readOnly || input.disabled || input.type === 'button' || input.type === 'submit') {
  2658. return;
  2659. }
  2660. // Écouter les changements selon le type de champ
  2661. if (input.type === 'checkbox' || input.type === 'radio') {
  2662. input.addEventListener('change', markFormAsModified);
  2663. } else {
  2664. input.addEventListener('input', markFormAsModified);
  2665. input.addEventListener('change', markFormAsModified);
  2666. }
  2667. });
  2668. // Écouter les changements sur les fichiers
  2669. const fileInputs = form.querySelectorAll('input[type="file"]');
  2670. fileInputs.forEach(input => {
  2671. input.addEventListener('change', markFormAsModified);
  2672. });
  2673. // Afficher une alerte avant de quitter la page si le formulaire a été modifié
  2674. window.addEventListener('beforeunload', function(e) {
  2675. if (formModified && !formSubmitted) {
  2676. // Message standard pour les navigateurs modernes
  2677. e.preventDefault();
  2678. // Chrome nécessite que returnValue soit défini
  2679. e.returnValue = '';
  2680. // Message personnalisé (la plupart des navigateurs modernes l'ignorent)
  2681. return 'Vous avez des modifications non sauvegardées. Êtes-vous sûr de vouloir quitter cette page ?';
  2682. }
  2683. });
  2684. form.addEventListener('submit', function(e) {
  2685. e.preventDefault();
  2686. // Validation personnalisée
  2687. const validationLecture = document.getElementById('validation_lecture');
  2688. if (!validationLecture.checked) {
  2689. showNotification('error', 'Veuillez confirmer la lecture et la vérification des informations.');
  2690. return;
  2691. }
  2692. // Vérifier la validité du formulaire
  2693. if (!form.checkValidity()) {
  2694. form.reportValidity();
  2695. showNotification('error', 'Veuillez remplir tous les champs requis.');
  2696. return;
  2697. }
  2698. // Marquer le formulaire comme soumis pour désactiver l'alerte
  2699. formSubmitted = true;
  2700. formModified = false;
  2701. // Désactiver le bouton et afficher le spinner
  2702. submitButton.disabled = true;
  2703. const originalButtonContent = submitButton.innerHTML;
  2704. submitButton.innerHTML = `
  2705. <svg class="animate-spin inline-block size-4 mr-2" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
  2706. <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
  2707. <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>
  2708. </svg>
  2709. Envoi en cours...
  2710. `;
  2711. // Simuler l'envoi AJAX (remplacer par votre code d'envoi réel)
  2712. setTimeout(() => {
  2713. // Restaurer le bouton
  2714. submitButton.disabled = false;
  2715. submitButton.innerHTML = originalButtonContent;
  2716. // Afficher la notification de succès
  2717. showNotification('success', 'Demande d\'intégration soumise avec succès !');
  2718. // Redirection après 2 secondes (optionnel)
  2719. // setTimeout(() => {
  2720. // window.location.href = 'confirmation.php';
  2721. // }, 2000);
  2722. }, 1500);
  2723. });
  2724. // Gérer le bouton "Enregistrer en brouillon" pour désactiver l'alerte
  2725. const buttons = form.querySelectorAll('button[type="button"]');
  2726. buttons.forEach(button => {
  2727. const buttonText = button.textContent.trim().toLowerCase();
  2728. if (buttonText.includes('brouillon')) {
  2729. button.addEventListener('click', function() {
  2730. // Ici vous pouvez ajouter la logique de sauvegarde en brouillon
  2731. // Après la sauvegarde réussie, désactiver l'alerte :
  2732. // formSubmitted = true;
  2733. // formModified = false;
  2734. showNotification('info', 'Brouillon enregistré avec succès.');
  2735. });
  2736. }
  2737. // Gérer le bouton "Annuler" - désactiver l'alerte si l'utilisateur confirme
  2738. if (buttonText.includes('annuler')) {
  2739. button.addEventListener('click', function(e) {
  2740. if (formModified && !formSubmitted) {
  2741. const confirmLeave = confirm('Vous avez des modifications non sauvegardées. Êtes-vous sûr de vouloir annuler ?');
  2742. if (confirmLeave) {
  2743. formSubmitted = true;
  2744. formModified = false;
  2745. // Rediriger ou réinitialiser le formulaire
  2746. // window.location.href = 'index.php'; // Exemple de redirection
  2747. } else {
  2748. e.preventDefault();
  2749. e.stopPropagation();
  2750. return false;
  2751. }
  2752. }
  2753. });
  2754. }
  2755. });
  2756. // Fonction pour afficher les notifications Preline
  2757. function showNotification(type, message) {
  2758. // Créer le conteneur de notification s'il n'existe pas
  2759. let notificationContainer = document.getElementById('notification-container');
  2760. if (!notificationContainer) {
  2761. notificationContainer = document.createElement('div');
  2762. notificationContainer.id = 'notification-container';
  2763. notificationContainer.className = 'fixed top-4 right-4 z-50 space-y-3';
  2764. document.body.appendChild(notificationContainer);
  2765. }
  2766. // Déterminer les couleurs selon le type
  2767. const colors = {
  2768. success: {
  2769. bg: 'bg-green-500',
  2770. 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>`
  2771. },
  2772. error: {
  2773. bg: 'bg-red-500',
  2774. 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>`
  2775. },
  2776. info: {
  2777. bg: 'bg-blue-500',
  2778. 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>`
  2779. }
  2780. };
  2781. const color = colors[type] || colors.info;
  2782. // Créer la notification
  2783. const notification = document.createElement('div');
  2784. 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`;
  2785. notification.innerHTML = `
  2786. ${color.icon}
  2787. <p class="text-sm font-medium flex-1">${message}</p>
  2788. <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">
  2789. <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>
  2790. </button>
  2791. `;
  2792. // Ajouter l'événement de fermeture
  2793. const closeBtn = notification.querySelector('button');
  2794. closeBtn.addEventListener('click', () => {
  2795. notification.style.animation = 'fadeOutUp 0.3s ease-out';
  2796. setTimeout(() => notification.remove(), 300);
  2797. });
  2798. // Ajouter au conteneur
  2799. notificationContainer.appendChild(notification);
  2800. // Auto-fermeture après 5 secondes
  2801. setTimeout(() => {
  2802. if (notification.parentElement) {
  2803. notification.style.animation = 'fadeOutUp 0.3s ease-out';
  2804. setTimeout(() => notification.remove(), 300);
  2805. }
  2806. }, 5000);
  2807. }
  2808. // Fallback pour les tooltips Preline - s'assurer qu'ils fonctionnent
  2809. function initTooltips() {
  2810. const tooltipToggles = document.querySelectorAll('.hs-tooltip-toggle');
  2811. tooltipToggles.forEach(toggle => {
  2812. const tooltipContent = toggle.querySelector('.hs-tooltip-content');
  2813. if (!tooltipContent) return;
  2814. // Ajouter position relative au parent si nécessaire
  2815. const tooltipParent = toggle.closest('.hs-tooltip');
  2816. if (tooltipParent && getComputedStyle(tooltipParent).position === 'static') {
  2817. tooltipParent.style.position = 'relative';
  2818. }
  2819. // Gérer le hover
  2820. toggle.addEventListener('mouseenter', function() {
  2821. tooltipContent.classList.add('hs-tooltip-shown');
  2822. tooltipContent.classList.remove('opacity-0', 'invisible');
  2823. tooltipContent.classList.add('opacity-100', 'visible');
  2824. });
  2825. toggle.addEventListener('mouseleave', function() {
  2826. tooltipContent.classList.remove('hs-tooltip-shown');
  2827. tooltipContent.classList.add('opacity-0', 'invisible');
  2828. tooltipContent.classList.remove('opacity-100', 'visible');
  2829. });
  2830. // Gérer le focus pour l'accessibilité
  2831. toggle.addEventListener('focus', function() {
  2832. tooltipContent.classList.add('hs-tooltip-shown');
  2833. tooltipContent.classList.remove('opacity-0', 'invisible');
  2834. tooltipContent.classList.add('opacity-100', 'visible');
  2835. });
  2836. toggle.addEventListener('blur', function() {
  2837. tooltipContent.classList.remove('hs-tooltip-shown');
  2838. tooltipContent.classList.add('opacity-0', 'invisible');
  2839. tooltipContent.classList.remove('opacity-100', 'visible');
  2840. });
  2841. });
  2842. }
  2843. // Initialiser les tooltips après le chargement
  2844. setTimeout(initTooltips, 100);
  2845. });
  2846. </script>
  2847. </body>
  2848. </html>