{"id":10,"date":"2026-08-13T22:02:40","date_gmt":"2026-08-13T22:02:40","guid":{"rendered":"https:\/\/arsenal-fr.eu\/my-account\/"},"modified":"2026-08-14T13:58:24","modified_gmt":"2026-08-14T13:58:24","slug":"my-account","status":"publish","type":"page","link":"https:\/\/arsenal-fr.eu\/?page_id=10","title":{"rendered":"Mon compte"},"content":{"rendered":"<div class=\"woocommerce\">\n<div class=\"afu-auth\">\n\n\t\n\t\n\t\t<div class=\"afu-choice\">\n\t\t\t<h1>Votre espace client<\/h1>\n\t\t\t<p>Suivez vos commandes, retrouvez vos devis et g\u00e9rez vos adresses de livraison et de facturation.<\/p>\n\t\t\t<div class=\"afu-choice-actions\">\n\t\t\t\t<a class=\"afu-cta afu-cta-solid\" href=\"https:\/\/arsenal-fr.eu\/?page_id=10&#038;af=connexion\">Se connecter<\/a>\n\t\t\t\t<a class=\"afu-cta afu-cta-outline\" href=\"https:\/\/arsenal-fr.eu\/?page_id=10&#038;af=inscription\">S'inscrire<\/a>\n\t\t\t<\/div>\n\t\t\t<ul class=\"afu-choice-perks\">\n\t\t\t\t<li>Historique et suivi de vos commandes<\/li>\n\t\t\t\t<li>Adresses enregistr\u00e9es pour commander plus vite<\/li>\n\t\t\t\t<li>Vos donn\u00e9es prot\u00e9g\u00e9es et un e-mail v\u00e9rifi\u00e9<\/li>\n\t\t\t<\/ul>\n\t\t<\/div>\n\n\t<\/div>\n\n<script>\n(function () {\n\t\/\/ Afficher \/ masquer un mot de passe\n\tdocument.querySelectorAll('[data-afu-toggle]').forEach(function (b) {\n\t\tb.addEventListener('click', function () {\n\t\t\tvar i = document.getElementById(b.getAttribute('data-afu-toggle'));\n\t\t\tif (!i) { return; }\n\t\t\tvar show = i.type === 'password';\n\t\t\ti.type = show ? 'text' : 'password';\n\t\t\tb.textContent = show ? 'Masquer' : 'Afficher';\n\t\t});\n\t});\n\n\t\/\/ Jauge de robustesse (indicative : la vraie validation est faite par le serveur)\n\tdocument.querySelectorAll('[data-afu-strength]').forEach(function (i) {\n\t\tvar wrap = i.closest('.afu-field');\n\t\tvar bar  = wrap ? wrap.querySelector('.afu-meter > span') : null;\n\t\tif (!bar) { return; }\n\t\ti.addEventListener('input', function () {\n\t\t\tvar v = i.value, s = 0;\n\t\t\tif (v.length >= 8) { s++; }\n\t\t\tif (v.length >= 12) { s++; }\n\t\t\tif (\/[a-z]\/.test(v) && \/[A-Z]\/.test(v)) { s++; }\n\t\t\tif (\/[0-9]\/.test(v)) { s++; }\n\t\t\tif (\/[^A-Za-z0-9]\/.test(v)) { s++; }\n\t\t\tif (v.length < 8) { s = Math.min(s, 1); }\n\t\t\tbar.className = 'afu-s' + s;\n\t\t\tbar.style.width = (s * 20) + '%';\n\t\t});\n\t});\n\n\t\/\/ Adresse de facturation differente\n\tvar billToggle = document.querySelector('[data-afu-billing]');\n\tif (billToggle) {\n\t\tvar box = document.querySelector('.afu-billing');\n\t\tbillToggle.addEventListener('change', function () {\n\t\t\tif (box) { box.hidden = !billToggle.checked; }\n\t\t\tbox.querySelectorAll('input[name^=\"b_\"]').forEach(function (f) { f.required = billToggle.checked; });\n\t\t});\n\t}\n\n\t\/\/ Navigation entre les etapes, avec verification serveur a chaque etape\n\tvar form = document.querySelector('.afu-register');\n\tif (!form) { return; }\n\tvar steps = Array.prototype.slice.call(form.querySelectorAll('.afu-step'));\n\tvar dots  = Array.prototype.slice.call(document.querySelectorAll('.afu-steps li'));\n\tvar ajaxUrl = form.getAttribute('data-ajax-url');\n\n\tfunction show(n) {\n\t\tsteps.forEach(function (s) { s.classList.toggle('is-on', s.dataset.step === String(n)); });\n\t\tdots.forEach(function (d) {\n\t\t\td.classList.toggle('is-on', Number(d.dataset.step) === n);\n\t\t\td.classList.toggle('is-done', Number(d.dataset.step) < n);\n\t\t});\n\t\tvar first = steps[n - 1] && steps[n - 1].querySelector('input:not([type=hidden]),select');\n\t\tif (first) { first.focus({ preventScroll: true }); }\n\t\tvar panel = form.closest('.afu-panel');\n\t\tif (panel) { window.scrollTo({ top: panel.offsetTop - 120 }); }\n\t}\n\n\tfunction current() {\n\t\tvar on = form.querySelector('.afu-step.is-on');\n\t\treturn on ? Number(on.dataset.step) : 1;\n\t}\n\n\tfunction validateNative(n) {\n\t\tvar step = steps[n - 1];\n\t\tvar ok = true;\n\t\tstep.querySelectorAll('input,select').forEach(function (f) {\n\t\t\tif (f.type === 'hidden' || f.disabled) { return; }\n\t\t\tf.classList.remove('is-bad');\n\t\t\tif (!f.checkValidity()) { f.classList.add('is-bad'); ok = false; }\n\t\t});\n\t\tif (!ok) {\n\t\t\tvar bad = step.querySelector('.is-bad');\n\t\t\tif (bad) { bad.focus(); bad.reportValidity && bad.reportValidity(); }\n\t\t}\n\t\treturn ok;\n\t}\n\n\tfunction clearServerErrors(n) {\n\t\tsteps[n - 1].querySelectorAll('input,select').forEach(function (f) { f.setCustomValidity(''); f.classList.remove('is-bad'); });\n\t}\n\n\tfunction applyServerErrors(n, fields) {\n\t\tvar step = steps[n - 1];\n\t\tvar first = null;\n\t\tObject.keys(fields).forEach(function (name) {\n\t\t\tvar f = step.querySelector('[name=\"' + name + '\"]');\n\t\t\tif (!f) { return; }\n\t\t\tf.classList.add('is-bad');\n\t\t\tf.setCustomValidity(fields[name]);\n\t\t\tif (!first) { first = f; }\n\t\t});\n\t\tif (first) { first.focus(); first.reportValidity && first.reportValidity(); }\n\t}\n\n\tfunction checkStepOnServer(n, btn) {\n\t\tif (!ajaxUrl) { return Promise.resolve(true); }\n\t\tvar data = new FormData(form);\n\t\tdata.set('action', 'afu_check_step');\n\t\tdata.set('afu_step', String(n));\n\t\tif (btn) { btn.disabled = true; }\n\t\treturn fetch(ajaxUrl, { method: 'POST', body: data, credentials: 'same-origin' })\n\t\t\t.then(function (r) { return r.json(); })\n\t\t\t.catch(function () { return { success: true }; })\n\t\t\t.then(function (json) {\n\t\t\t\tif (btn) { btn.disabled = false; }\n\t\t\t\tif (json && json.success) { return true; }\n\t\t\t\tvar fields = (json && json.data && json.data.fields) || {};\n\t\t\t\tapplyServerErrors(n, fields);\n\t\t\t\treturn false;\n\t\t\t});\n\t}\n\n\tfunction goNext(btn) {\n\t\tvar n = current();\n\t\tclearServerErrors(n);\n\t\tif (!validateNative(n)) { return; }\n\t\tcheckStepOnServer(n, btn).then(function (ok) { if (ok) { show(n + 1); } });\n\t}\n\n\tform.querySelectorAll('[data-afu-next]').forEach(function (b) {\n\t\tb.addEventListener('click', function () { goNext(b); });\n\t});\n\tform.querySelectorAll('[data-afu-prev]').forEach(function (b) {\n\t\tb.addEventListener('click', function () { show(Math.max(1, current() - 1)); });\n\t});\n\n\t\/\/ Entree = etape suivante plutot qu'envoi premature\n\tform.addEventListener('keydown', function (e) {\n\t\tif (e.key === 'Enter' && e.target.tagName === 'INPUT' && current() < steps.length) {\n\t\t\te.preventDefault();\n\t\t\tgoNext(null);\n\t\t}\n\t});\n\n\t\/\/ Confirmation du mot de passe\n\tvar p1 = document.getElementById('r-pw'), p2 = document.getElementById('r-pw2');\n\tif (p1 && p2) {\n\t\tvar check = function () {\n\t\t\tp2.setCustomValidity(p2.value && p1.value !== p2.value ? 'Les deux mots de passe ne sont pas identiques.' : '');\n\t\t};\n\t\tp1.addEventListener('input', check);\n\t\tp2.addEventListener('input', check);\n\t}\n})();\n<\/script>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-10","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/arsenal-fr.eu\/index.php?rest_route=\/wp\/v2\/pages\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arsenal-fr.eu\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/arsenal-fr.eu\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/arsenal-fr.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arsenal-fr.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10"}],"version-history":[{"count":2,"href":"https:\/\/arsenal-fr.eu\/index.php?rest_route=\/wp\/v2\/pages\/10\/revisions"}],"predecessor-version":[{"id":133,"href":"https:\/\/arsenal-fr.eu\/index.php?rest_route=\/wp\/v2\/pages\/10\/revisions\/133"}],"wp:attachment":[{"href":"https:\/\/arsenal-fr.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}