{"id":81412,"date":"2025-10-29T15:51:29","date_gmt":"2025-10-29T15:51:29","guid":{"rendered":"https:\/\/temp4.xprss-sandbox.com\/teste-denregistrement-client\/"},"modified":"2025-10-31T12:48:39","modified_gmt":"2025-10-31T12:48:39","slug":"teste-denregistrement-client","status":"publish","type":"page","link":"https:\/\/temp4.xprss-sandbox.com\/fr\/teste-denregistrement-client\/","title":{"rendered":"teste d&rsquo;enregistrement client"},"content":{"rendered":"\n<div class=\"xprs-registration-container\">\n    <div class=\"xprs-header\">\n        <div class=\"xprs-logo\">\n            <img decoding=\"async\" src=\"https:\/\/temp4.xprss-sandbox.com\/wp-content\/plugins\/xprs_registration_customers\/assets\/images\/Logo_RvCare_.png\" \n                 alt=\"RV Care\" class=\"xprs-logo-img\">\n        <\/div>\n        \n                <h2 class=\"xprs-form-title\">\n            Inscription Client RV Care        <\/h2>\n            <\/div>\n    \n    <div class=\"xprs-form-container\">\n        <form id=\"xprs-registration-form\" class=\"xprs-form \" method=\"post\">\n            \n            <!-- Section Information Personnelle -->\n            <div class=\"xprs-form-section\">\n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_email\">\n                            Adresse courriel *                        <\/label>\n                        <input type=\"email\" id=\"xprs_email\" name=\"email\" required>\n                        <div id=\"xprs_email_error\" class=\"xprs-field-error\" style=\"display: none;\"><\/div>\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_firstname\">\n                            Pr\u00e9nom *                        <\/label>\n                        <input type=\"text\" id=\"xprs_firstname\" name=\"firstname\" required>\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_lastname\">\n                            Nom de famille *                        <\/label>\n                        <input type=\"text\" id=\"xprs_lastname\" name=\"lastname\" required>\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_country\">\n                            Pays *                        <\/label>\n                        <select id=\"xprs_country\" name=\"country\" required onchange=\"handleCountryChange(this.value)\">\n                            <option value=\"CAN\">Canada<\/option>\n                            <option value=\"USA\">USA<\/option>\n                        <\/select>\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_city\">\n                            Ville                        <\/label>\n                        <input type=\"text\" id=\"xprs_city\" name=\"city\" >\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_state\">\n                            <span id=\"xprs_state_label\">Province<\/span>\n                        <\/label>\n                        <select id=\"xprs_state\" name=\"state\">\n                            <!-- Options dynamiques selon le pays -->\n                            <option value='Others'>Autres<\/option>\n                            <option value='AB'>Alberta<\/option>\n                            <option value='BC'>British Columbia<\/option>\n                            <option value='MB'>Manitoba<\/option>\n                            <option value='NB'>New Brunswick<\/option>\n                            <option value='NF'>Newfoundland and Labrador<\/option>\n                            <option value='NS'>Nova Scotia<\/option>\n                            <option value='ON'>Ontario<\/option>\n                            <option value='PEI'>Prince Edward Island<\/option>\n                            <option value='QC'>Quebec<\/option>\n                            <option value='SK'>Saskatchewan<\/option>\n                            <option value='NT'>Northwest Territories<\/option>\n                            <option value='NV'>Nunavut<\/option>\n                            <option value='YT'>Yukon<\/option>\n                        <\/select>\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_address\">\n                            Adresse                        <\/label>\n                        <input type=\"text\" id=\"xprs_address\" name=\"address\" >\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_postalcode\">\n                            <span id=\"xprs_postal_label\">Code postal<\/span> *                        <\/label>\n                        <input type=\"text\" id=\"xprs_postalcode\" name=\"postalcode\" required \n                               placeholder=\"A1A 1A1\">\n                    <\/div>\n                <\/div>\n            <\/div>\n            \n            <hr class=\"xprs-section-divider\">\n            \n            <!-- Section V\u00e9hicule -->\n            <div class=\"xprs-form-section\">\n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_dealer\">\n                            Concessionnaire *                        <\/label>\n                        <select id=\"xprs_dealer\" name=\"dealer\" class=\"xprs-searchable-select\" required>\n                            <option value=\"\">S\u00e9lectionnez un concessionnaire...<\/option>\n                            <option value=\"Alexandria Camping Centre\">Alexandria Camping Centre<\/option>\n<option value=\"Arrkann RV Edmonton West\">Arrkann RV Edmonton West<\/option>\n<option value=\"Arrkann Trailer &amp; RV Calgary\">Arrkann Trailer &amp; RV Calgary<\/option>\n<option value=\"Arrkann Trailer &amp; RV Carstairs\">Arrkann Trailer &amp; RV Carstairs<\/option>\n<option value=\"Arrkann Trailer &amp; RV Medicine Hat\">Arrkann Trailer &amp; RV Medicine Hat<\/option>\n<option value=\"Bluenose RV Centre\">Bluenose RV Centre<\/option>\n<option value=\"Bucars RV Centre\">Bucars RV Centre<\/option>\n<option value=\"Camp-Out RV\">Camp-Out RV<\/option>\n<option value=\"Campkin&#039;s RV Centre\">Campkin&#039;s RV Centre<\/option>\n<option value=\"Can-Am RV Centre\">Can-Am RV Centre<\/option>\n<option value=\"Carl Cox RV\">Carl Cox RV<\/option>\n<option value=\"Centre de camping d&#039;Amos\">Centre de camping d&#039;Amos<\/option>\n<option value=\"Chemo RV\">Chemo RV<\/option>\n<option value=\"Christie&#039;s RV\">Christie&#039;s RV<\/option>\n<option value=\"Classic Trailers\">Classic Trailers<\/option>\n<option value=\"Coastal Outdoors Carbonear\">Coastal Outdoors Carbonear<\/option>\n<option value=\"Coastal Outdoors Clarenville\">Coastal Outdoors Clarenville<\/option>\n<option value=\"Coastal Outdoors Mount Pearl\">Coastal Outdoors Mount Pearl<\/option>\n<option value=\"Country Camping Leisure Products\">Country Camping Leisure Products<\/option>\n<option value=\"Earlton Camping\">Earlton Camping<\/option>\n<option value=\"Earlton RV\">Earlton RV<\/option>\n<option value=\"Eldorado RV Sales\">Eldorado RV Sales<\/option>\n<option value=\"Ferguson RV World Inc.\">Ferguson RV World Inc.<\/option>\n<option value=\"Frank Dunn Trailer Sales\">Frank Dunn Trailer Sales<\/option>\n<option value=\"Globetrotter R.V.\">Globetrotter R.V.<\/option>\n<option value=\"Globetrotter RV\">Globetrotter RV<\/option>\n<option value=\"Great Canadian RV\">Great Canadian RV<\/option>\n<option value=\"Horizon Lussier\">Horizon Lussier<\/option>\n<option value=\"Jubilee RV Centre\">Jubilee RV Centre<\/option>\n<option value=\"Kapuskasing RV Ltd.\">Kapuskasing RV Ltd.<\/option>\n<option value=\"Kehoe RV Ltd.\">Kehoe RV Ltd.<\/option>\n<option value=\"Larry Autos Caravanes\">Larry Autos Caravanes<\/option>\n<option value=\"Leisure Time RV Centre\">Leisure Time RV Centre<\/option>\n<option value=\"Leisure Trailer Sales\">Leisure Trailer Sales<\/option>\n<option value=\"Marble RV\">Marble RV<\/option>\n<option value=\"McGoverns RV\">McGoverns RV<\/option>\n<option value=\"McPhail&#039;s of Harriston\">McPhail&#039;s of Harriston<\/option>\n<option value=\"Midtown RV\">Midtown RV<\/option>\n<option value=\"Mobilife RV Centre\">Mobilife RV Centre<\/option>\n<option value=\"Moncton RV Center\">Moncton RV Center<\/option>\n<option value=\"Niagara Trailers\">Niagara Trailers<\/option>\n<option value=\"Nickel Belt Camping\">Nickel Belt Camping<\/option>\n<option value=\"O&#039;Connor RV\">O&#039;Connor RV<\/option>\n<option value=\"Outdoor Travel\">Outdoor Travel<\/option>\n<option value=\"Passion VR Caravane Vaillancourt\">Passion VR Caravane Vaillancourt<\/option>\n<option value=\"Pik-A-Dilly RV Centre\">Pik-A-Dilly RV Centre<\/option>\n<option value=\"Primo RV\">Primo RV<\/option>\n<option value=\"Recreation World Ltd.\">Recreation World Ltd.<\/option>\n<option value=\"Roulottes Desjardins St-Jerome\">Roulottes Desjardins St-Jerome<\/option>\n<option value=\"Roulottes Lupien\">Roulottes Lupien<\/option>\n<option value=\"Roulottes MLR\">Roulottes MLR<\/option>\n<option value=\"Runners RV\">Runners RV<\/option>\n<option value=\"Ruston RV Centre\">Ruston RV Centre<\/option>\n<option value=\"Ruston RV Centre Limited\">Ruston RV Centre Limited<\/option>\n<option value=\"RV World\">RV World<\/option>\n<option value=\"Sellers R.V. Center Ltd.\">Sellers R.V. Center Ltd.<\/option>\n<option value=\"SMP-RV\">SMP-RV<\/option>\n<option value=\"SMP-RV Houston\">SMP-RV Houston<\/option>\n<option value=\"SMP-RV Prince-George\">SMP-RV Prince-George<\/option>\n<option value=\"Stone R.V. Sales &amp; Service\">Stone R.V. Sales &amp; Service (Alberta)<\/option>\n<option value=\"Stone&#039;s RV &amp; Home Center\">Stone&#039;s RV &amp; Home Center (Nova Scotia)<\/option>\n<option value=\"Stone&#039;s RV Center Sydney\">Stone&#039;s RV Center Sydney (Nova Scotia)<\/option>\n<option value=\"Straightline RV-Marine\">Straightline RV-Marine<\/option>\n<option value=\"Sunridge RV\">Sunridge RV<\/option>\n<option value=\"The Hitch House\">The Hitch House<\/option>\n<option value=\"Timmins RV\">Timmins RV<\/option>\n<option value=\"Toy Master Motor Sports\">Toy Master Motor Sports<\/option>\n<option value=\"Transcona Trailer Sales\">Transcona Trailer Sales<\/option>\n<option value=\"Triangle RV Centre Ltd.\">Triangle RV Centre Ltd.<\/option>\n<option value=\"Vellner Leisure Products\">Vellner Leisure Products<\/option>\n<option value=\"Village RV\">Village RV<\/option>\n<option value=\"Voyager RV Centre\">Voyager RV Centre<\/option>\n<option value=\"VR Prestige\">VR Prestige<\/option>\n<option value=\"VR Souliere Baie St. Paul\">VR Souliere Baie St. Paul<\/option>\n<option value=\"VR Souliere Lanoraie\">VR Souliere Lanoraie<\/option>\n<option value=\"VR Souliere Lavaltrie\">VR Souliere Lavaltrie<\/option>\n<option value=\"VR Souliere Quebec\">VR Souliere Quebec<\/option>\n<option value=\"VR Souliere Sherbrooke\">VR Souliere Sherbrooke<\/option>\n                        <\/select>\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_date_purchase\">\n                            Date d'achat *                        <\/label>\n                        <input type=\"date\" id=\"xprs_date_purchase\" name=\"date_purchase\" required>\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_make\">\n                            Fabricant *                        <\/label>\n                        <input type=\"text\" id=\"xprs_make\" name=\"make\" required>\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_model\">\n                            Mod\u00e8le *                        <\/label>\n                        <input type=\"text\" id=\"xprs_model\" name=\"model\" required>\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_year\">\n                            Ann\u00e9e *                        <\/label>\n                        <input type=\"number\" id=\"xprs_year\" name=\"year\" required max=\"2030\" min=\"1990\">\n                    <\/div>\n                <\/div>\n            <\/div>\n            \n            <hr class=\"xprs-section-divider\">\n            \n            <!-- Section Optionnelle -->\n            <div class=\"xprs-form-section\">\n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_regNumber\">\n                            Num\u00e9ro d'enregistrement                            <small>(affich\u00e9 sur la carte client)<\/small>\n                        <\/label>\n                        <input type=\"text\" id=\"xprs_regNumber\" name=\"regNumber\" pattern=\"\\d*\" minlength=\"6\" maxlength=\"6\" >\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_comments\">\n                            Commentaires                        <\/label>\n                        <textarea id=\"xprs_comments\" name=\"comments\" rows=\"3\" ><\/textarea>\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-information\">\n                    <p>Dans le cadre de l'inscription de votre carte client, nous enverrons un courriel de bienvenue expliquant les \u00e9tapes de notre politique de service et d'autres informations utiles \u00e0 l'adresse courriel que vous fournissez ci-dessous.<\/p>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_newsletter\">\n                            S'abonner \u00e0 l'infolettre *                        <\/label>\n                        <select id=\"xprs_newsletter\" name=\"newsletter\" required>\n                            <option value=\"Yes\">Oui<\/option>\n                            <option value=\"No\">Non<\/option>\n                        <\/select>\n                    <\/div>\n                <\/div>\n                \n                <div class=\"xprs-form-row\">\n                    <div class=\"xprs-field\">\n                        <label for=\"xprs_langue\">\n                            Langue *                        <\/label>\n                                                                                                        <!-- Langue s\u00e9lectionnable normalement -->\n                            <select id=\"xprs_langue\" name=\"langue\" required>\n                                <option value=\"en\" >\n                                    Anglais                                <\/option>\n                                <option value=\"fr\"  selected='selected'>\n                                    Fran\u00e7ais                                <\/option>\n                            <\/select>\n                                            <\/div>\n                <\/div>\n            <\/div>\n            \n            <!-- Section L\u00e9gale -->\n            <div class=\"xprs-legal-section\">\n                <div class=\"xprs-legal-content\"><div class=\"bee-col bee-col-2 bee-col-w6 text-padding\">\r\n      <div class=\"bee-block bee-block-1 bee-heading\">\r\n       <h3 style=\"color:#000000;direction:ltr;font-family:Arial, Helvetica Neue, Helvetica, sans-serif;font-size:24px;font-weight:700;letter-spacing:normal;line-height:120%;text-align:left;margin-top:0;margin-bottom:0\">\r\n        <span class=\"tinyMce-placeholder \">\r\n        Nous vous remercions de vous inscrire en tant que client RV Care        <\/span>\r\n       <\/h3>\r\n      <\/div>\r\n      <div class=\"bee-block bee-block-2 bee-paragraph text-padding\">\r\n       <p>\r\n       Assurez-vous d\u2019emporter votre &nbsp;\r\n        <span>\r\n        carte Promesse client RV Care<\/span>\r\n        &nbsp;\r\n        avec vous lorsque vous voyagez en VR. Si vous avez un probl\u00e8me pendant votre voyage, vous devrez pr\u00e9senter cette carte (ainsi qu\u2019une pi\u00e8ce d\u2019identit\u00e9) au concessionnaire RV Care | Route\u00a066 le plus proche pour b\u00e9n\u00e9ficier de tous les avantages du r\u00e9seau RV Care.\r\n       <\/p>\r\n       <p>\r\n       Vos avantages RV Care resteront en vigueur tant que vous demeurerez propri\u00e9taire du VR que vous avez achet\u00e9 chez un concessionnaire RV Care.       <\/p>\r\n       <p>\r\n        Note:&nbsp;votre carte de client RV Care et les avantages qui y sont associ\u00e9s ne sont pas transf\u00e9rables.\r\n\r\n       <\/p>\r\n      <\/div>\r\n      <div class=\"bee-block bee-block-3 bee-paragraph \">\r\n       <p>\r\n        &nbsp;\r\n       <\/p>\r\n       <p>\r\n        <strong>\r\n        Politique de confidentialit\u00e9\r\n        <\/strong>\r\n       <\/p>\r\n       <p>\r\n       Nous ne partagerons pas votre adresse courriel ou toute autre information que vous nous fournirez.       <\/p>\r\n       <p>\r\n       Probl\u00e8mes ou questions ?\r\n       <\/p>\r\n       <p>\r\n       Si vous rencontrez des probl\u00e8mes en utilisant ce formulaire ou si vous avez des questions, veuillez contacter&nbsp;\r\n        <a href=\"mailto:info@rvcare.ca?subject=information%20request\" rel=\"noopener\" style=\"text-decoration: underline\" target=\"_blank\" title=\"info@rvcare.ca\">\r\n         RV Care.<\/a>\r\n       <\/p>\r\n       <p>\r\n        &nbsp;\r\n       <\/p>\r\n      <\/div>\r\n     <\/div> \r\n<\/div>            <\/div>\n            \n            <!-- Champs cach\u00e9s -->\n            <input type=\"hidden\" id=\"xprs_recaptcha\" name=\"recaptcha\" value=\"\">\n            <input type=\"hidden\" id=\"xprs_typeRV\" name=\"typeRV\" value=\"\">\n            <input type=\"hidden\" name=\"action\" value=\"xprs_submit_registration\">\n            <input type=\"hidden\" name=\"nonce\" value=\"12569cc680\">\n            \n            <!-- Bouton de soumission -->\n            <div class=\"xprs-form-row xprs-submit-row\">\n                <button type=\"submit\" id=\"xprs_submit\" class=\"xprs-submit-btn\">\n                    S'inscrire maintenant                <\/button>\n            <\/div>\n            \n            <!-- Messages -->\n            <div id=\"xprs-messages\" class=\"xprs-messages\" style=\"display: none;\"><\/div>\n        <\/form>\n    <\/div>\n<\/div>\n\n<style>\n\/* Styles pour le dropdown searchable des dealers *\/\n.xprs-searchable-wrapper {\n    position: relative;\n    width: 100%;\n}\n\n.xprs-search-input {\n    width: 100%;\n    padding: 8px 12px;\n    border: 1px solid #ddd;\n    border-radius: 4px;\n    font-size: 14px;\n    box-sizing: border-box;\n    background-color: white;\n    transition: border-color 0.3s ease;\n}\n\n.xprs-search-input:focus {\n    outline: none;\n    border-color: #0073aa;\n    box-shadow: 0 0 0 1px #0073aa;\n}\n\n.xprs-search-dropdown {\n    position: absolute;\n    top: 100%;\n    left: 0;\n    right: 0;\n    background: white;\n    border: 1px solid #ddd;\n    border-top: none;\n    border-radius: 0 0 4px 4px;\n    max-height: 200px;\n    overflow-y: auto;\n    z-index: 1000;\n    display: none;\n    box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n}\n\n.xprs-search-option {\n    padding: 8px 12px;\n    cursor: pointer;\n    border-bottom: 1px solid #f0f0f0;\n    transition: background-color 0.2s ease;\n    font-size: 14px;\n}\n\n.xprs-search-option:hover {\n    background-color: #f5f5f5;\n}\n\n.xprs-search-option.selected {\n    background-color: #e6f3ff;\n}\n\n.xprs-search-option:last-child {\n    border-bottom: none;\n}\n\n.xprs-no-results {\n    padding: 8px 12px;\n    color: #666;\n    font-style: italic;\n    font-size: 14px;\n}\n\n\/* Scrollbar styles pour webkit browsers *\/\n.xprs-search-dropdown::-webkit-scrollbar {\n    width: 6px;\n}\n\n.xprs-search-dropdown::-webkit-scrollbar-track {\n    background: #f1f1f1;\n}\n\n.xprs-search-dropdown::-webkit-scrollbar-thumb {\n    background: #ccc;\n    border-radius: 3px;\n}\n\n.xprs-search-dropdown::-webkit-scrollbar-thumb:hover {\n    background: #999;\n}\n\n\/* Responsive *\/\n@media (max-width: 768px) {\n    .xprs-search-dropdown {\n        max-height: 150px;\n    }\n}\n\n\/* Styles pour la section l\u00e9gale *\/\n.xprs-legal-section {\n    margin: 20px 0;\n    padding: 20px;\n    background-color: #f9f9f9;\n    border: 1px solid #e0e0e0;\n    border-radius: 6px;\n    font-family: Arial, Helvetica, sans-serif;\n}\n\n.xprs-legal-title {\n    color: #000000;\n    font-size: 20px;\n    font-weight: 700;\n    line-height: 1.2;\n    margin-top: 0;\n    margin-bottom: 15px;\n    text-align: left;\n}\n\n.xprs-legal-text {\n    color: #333333;\n    font-size: 14px;\n    line-height: 1.5;\n}\n\n.xprs-legal-text p {\n    margin-bottom: 12px;\n    text-align: justify;\n}\n\n.xprs-legal-text h4 {\n    color: #000000;\n    font-size: 16px;\n    font-weight: 700;\n    margin-top: 20px;\n    margin-bottom: 10px;\n}\n\n.xprs-legal-text strong {\n    font-weight: 700;\n    color: #000000;\n}\n\n.xprs-legal-text a {\n    color: #0073aa;\n    text-decoration: underline;\n}\n\n.xprs-legal-text a:hover {\n    color: #005177;\n    text-decoration: none;\n}\n\n\/* Responsive pour la section l\u00e9gale *\/\n@media (max-width: 768px) {\n    .xprs-legal-section {\n        margin: 15px 0;\n        padding: 15px;\n    }\n    \n    .xprs-legal-title {\n        font-size: 18px;\n    }\n    \n    .xprs-legal-text {\n        font-size: 13px;\n    }\n}\n\n\/* Styles pour la validation en temps r\u00e9el *\/\n.xprs-invalid {\n    border-color: #dc3232 !important;\n    box-shadow: 0 0 2px rgba(220, 50, 50, 0.5) !important;\n}\n\n.xprs-valid {\n    border-color: #46b450 !important;\n    box-shadow: 0 0 2px rgba(70, 180, 80, 0.5) !important;\n}\n\n.xprs-error-message {\n    color: #dc3232;\n    font-size: 12px;\n    margin-top: 5px;\n    display: none;\n    font-weight: normal;\n}\n<\/style>\n\n\n<script>\n\/\/ Fonction globale appel\u00e9e directement par l'attribut onchange\nfunction handleCountryChange(country) {\n    console.log('=== handleCountryChange appel\u00e9e ===', country);\n    \n    const stateSelect = document.getElementById('xprs_state');\n    const stateLabel = document.getElementById('xprs_state_label');\n    const postalLabel = document.getElementById('xprs_postal_label');\n    const postalInput = document.getElementById('xprs_postalcode');\n    \n    console.log('\u00c9l\u00e9ments:', {\n        stateSelect: !!stateSelect,\n        stateLabel: !!stateLabel,\n        postalLabel: !!postalLabel,\n        postalInput: !!postalInput\n    });\n    \n    \/\/ Mise \u00e0 jour des options de province\/\u00e9tat\n    if (stateSelect && typeof xprsProvinces !== 'undefined') {\n        stateSelect.innerHTML = '';\n        const options = country === 'USA' ? xprsProvinces.USA : xprsProvinces.CAN;\n        \n        if (options) {\n            options.forEach(function(option) {\n                const opt = document.createElement('option');\n                opt.value = option.value;\n                opt.textContent = option.text;\n                stateSelect.appendChild(opt);\n            });\n            console.log('Options mises \u00e0 jour, total:', options.length);\n        }\n    }\n    \n    \/\/ Mise \u00e0 jour des labels\n    if (stateLabel) {\n        stateLabel.textContent = country === 'USA' ? 'State' : 'Province';\n        console.log('Label state chang\u00e9 vers:', stateLabel.textContent);\n    }\n    \n    if (postalLabel) {\n        postalLabel.textContent = country === 'USA' ? 'ZIP Code' : 'Postal Code';\n        console.log('Label postal chang\u00e9 vers:', postalLabel.textContent);\n    }\n    \n    if (postalInput) {\n        postalInput.placeholder = country === 'USA' ? '12345' : 'A1A 1A1';\n        console.log('Placeholder chang\u00e9 vers:', postalInput.placeholder);\n    }\n    \n    console.log('=== handleCountryChange termin\u00e9e ===');\n}\n\n\/\/ Donn\u00e9es des provinces\/\u00e9tats\nconst xprsProvinces = {\n    CAN: [\n        {value: 'Others', text: 'Autres'},\n        {value: 'AB', text: 'Alberta'},\n        {value: 'BC', text: 'British Columbia'},\n        {value: 'MB', text: 'Manitoba'},\n        {value: 'NB', text: 'New Brunswick'},\n        {value: 'NF', text: 'Newfoundland and Labrador'},\n        {value: 'NS', text: 'Nova Scotia'},\n        {value: 'ON', text: 'Ontario'},\n        {value: 'PEI', text: 'Prince Edward Island'},\n        {value: 'QC', text: 'Quebec'},\n        {value: 'SK', text: 'Saskatchewan'},\n        {value: 'NT', text: 'Northwest Territories'},\n        {value: 'NV', text: 'Nunavut'},\n        {value: 'YT', text: 'Yukon'}\n    ],\n    USA: [\n        {value: 'Others', text: 'Autres'},\n        {value: 'AL', text: 'Alabama'},\n        {value: 'AK', text: 'Alaska'},\n        {value: 'AZ', text: 'Arizona'},\n        {value: 'AR', text: 'Arkansas'},\n        {value: 'CA', text: 'California'},\n        {value: 'CO', text: 'Colorado'},\n        {value: 'CT', text: 'Connecticut'},\n        {value: 'DE', text: 'Delaware'},\n        {value: 'FL', text: 'Florida'},\n        {value: 'GA', text: 'Georgia'},\n        {value: 'HI', text: 'Hawaii'},\n        {value: 'ID', text: 'Idaho'},\n        {value: 'IL', text: 'Illinois'},\n        {value: 'IN', text: 'Indiana'},\n        {value: 'IA', text: 'Iowa'},\n        {value: 'KS', text: 'Kansas'},\n        {value: 'KY', text: 'Kentucky'},\n        {value: 'LA', text: 'Louisiana'},\n        {value: 'ME', text: 'Maine'},\n        {value: 'MD', text: 'Maryland'},\n        {value: 'MA', text: 'Massachusetts'},\n        {value: 'MI', text: 'Michigan'},\n        {value: 'MN', text: 'Minnesota'},\n        {value: 'MS', text: 'Mississippi'},\n        {value: 'MO', text: 'Missouri'},\n        {value: 'MT', text: 'Montana'},\n        {value: 'NE', text: 'Nebraska'},\n        {value: 'NV', text: 'Nevada'},\n        {value: 'NH', text: 'New Hampshire'},\n        {value: 'NJ', text: 'New Jersey'},\n        {value: 'NM', text: 'New Mexico'},\n        {value: 'NY', text: 'New York'},\n        {value: 'NC', text: 'North Carolina'},\n        {value: 'ND', text: 'North Dakota'},\n        {value: 'OH', text: 'Ohio'},\n        {value: 'OK', text: 'Oklahoma'},\n        {value: 'OR', text: 'Oregon'},\n        {value: 'PA', text: 'Pennsylvania'},\n        {value: 'RI', text: 'Rhode Island'},\n        {value: 'SC', text: 'South Carolina'},\n        {value: 'SD', text: 'South Dakota'},\n        {value: 'TN', text: 'Tennessee'},\n        {value: 'TX', text: 'Texas'},\n        {value: 'UT', text: 'Utah'},\n        {value: 'VT', text: 'Vermont'},\n        {value: 'VA', text: 'Virginia'},\n        {value: 'WA', text: 'Washington'},\n        {value: 'WV', text: 'West Virginia'},\n        {value: 'WI', text: 'Wisconsin'},\n        {value: 'WY', text: 'Wyoming'},\n        {value: 'DC', text: 'District of Columbia'}\n    ]\n};\n\n\/\/ Fonction simple pour test global\nfunction updateStatesProvinces(country) {\n    console.log('updateStatesProvinces appel\u00e9e (version globale):', country);\n    \/\/ Cette fonction sera utilis\u00e9e depuis la console pour test\n}\n\n\/\/ Validation email en temps r\u00e9el\nfunction validateEmailField() {\n    const emailInput = document.getElementById('xprs_email');\n    \n    if (!emailInput) {\n        console.error('XPRS Debug - Element xprs_email non trouv\u00e9');\n        return true;\n    }\n    \n    \/\/ Cr\u00e9er ou obtenir le div d'erreur\n    let errorDiv = document.getElementById('xprs_email_error');\n    if (!errorDiv) {\n        errorDiv = document.createElement('div');\n        errorDiv.id = 'xprs_email_error';\n        errorDiv.className = 'xprs-error-message';\n        errorDiv.style.cssText = 'color: #dc3232; font-size: 12px; margin-top: 5px; display: none;';\n        emailInput.parentNode.appendChild(errorDiv);\n    }\n    \n    const email = emailInput.value.trim();\n    \n    if (email === '') {\n        errorDiv.style.display = 'none';\n        emailInput.classList.remove('xprs-invalid', 'xprs-valid');\n        return true;\n    }\n    \n    \/\/ Pattern email simple mais efficace\n    const emailPattern = \/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$\/;\n    \n    if (!emailPattern.test(email)) {\n        errorDiv.textContent = 'Format d'email invalide';\n        errorDiv.style.display = 'block';\n        emailInput.classList.add('xprs-invalid');\n        emailInput.classList.remove('xprs-valid');\n        return false;\n    }\n    \n    \/\/ V\u00e9rifications suppl\u00e9mentaires\n    if (email.includes(' ')) {\n        errorDiv.textContent = 'L'email ne peut pas contenir d'espaces';\n        errorDiv.style.display = 'block';\n        emailInput.classList.add('xprs-invalid');\n        emailInput.classList.remove('xprs-valid');\n        return false;\n    }\n    \n    if (email.length > 254) {\n        errorDiv.textContent = 'Email trop long (maximum 254 caract\u00e8res)';\n        errorDiv.style.display = 'block';\n        emailInput.classList.add('xprs-invalid');\n        emailInput.classList.remove('xprs-valid');\n        return false;\n    }\n    \n    \/\/ Email valide\n    errorDiv.style.display = 'none';\n    emailInput.classList.remove('xprs-invalid');\n    emailInput.classList.add('xprs-valid');\n    return true;\n}\n\n\/\/ Validation code postal en temps r\u00e9el\nfunction validatePostalCodeField() {\n    const postalInput = document.getElementById('xprs_postalcode');\n    const countrySelect = document.getElementById('xprs_country');\n    \n    if (!postalInput || !countrySelect) {\n        console.error('XPRS Debug - Elements manquants pour validatePostalCodeField');\n        return true;\n    }\n    \n    const postalCode = postalInput.value.trim();\n    const country = countrySelect.value;\n    \n    \/\/ Cr\u00e9er ou obtenir le div d'erreur\n    let errorDiv = document.getElementById('xprs_postal_error');\n    if (!errorDiv) {\n        errorDiv = document.createElement('div');\n        errorDiv.id = 'xprs_postal_error';\n        errorDiv.className = 'xprs-error-message';\n        errorDiv.style.cssText = 'color: #dc3232; font-size: 12px; margin-top: 5px; display: none;';\n        postalInput.parentNode.appendChild(errorDiv);\n    }\n    \n    if (postalCode === '') {\n        errorDiv.style.display = 'none';\n        postalInput.classList.remove('xprs-invalid', 'xprs-valid');\n        return true;\n    }\n    \n    let isValid = false;\n    let errorMessage = '';\n    \n    if (country === 'CAN') {\n        \/\/ Format canadien: A1A 1A1 ou A1A1A1\n        const canadianPattern = \/^[A-Z]\\d[A-Z]\\s?\\d[A-Z]\\d$\/i;\n        isValid = canadianPattern.test(postalCode);\n        errorMessage = 'Format invalide. Attendu: A1A 1A1';\n    } else if (country === 'USA') {\n        \/\/ Format am\u00e9ricain: 12345 ou 12345-6789\n        const usPattern = \/^\\d{5}(-\\d{4})?$\/;\n        isValid = usPattern.test(postalCode);\n        errorMessage = 'Format invalide. Attendu: 12345 ou 12345-6789';\n    } else {\n        \/\/ Autres pays - validation basique\n        isValid = postalCode.length >= 3;\n        errorMessage = 'Code postal invalide';\n    }\n    \n    if (!isValid) {\n        errorDiv.textContent = errorMessage;\n        errorDiv.style.display = 'block';\n        postalInput.classList.add('xprs-invalid');\n        postalInput.classList.remove('xprs-valid');\n        return false;\n    } else {\n        postalInput.classList.remove('xprs-invalid');\n        postalInput.classList.add('xprs-valid');\n        errorDiv.style.display = 'none';\n        return true;\n    }\n}\n\n\/\/ Initialisation simplifi\u00e9e\ndocument.addEventListener('DOMContentLoaded', function() {\n    console.log('=== DOMContentLoaded - Initialisation ===');\n    \n    \/\/ Initialiser avec Canada par d\u00e9faut\n    const countrySelect = document.getElementById('xprs_country');\n    if (countrySelect) {\n        console.log('Initialisation avec pays:', countrySelect.value || 'CAN');\n        handleCountryChange(countrySelect.value || 'CAN');\n        \n        \/\/ Test automatique pour v\u00e9rifier que \u00e7a marche\n        setTimeout(function() {\n            console.log('=== TEST AUTOMATIQUE ===');\n            handleCountryChange('USA');\n            \n            setTimeout(function() {\n                handleCountryChange('CAN');\n            }, 2000);\n        }, 1000);\n    }\n    \n    \/\/ Validation email\n    const emailInput = document.getElementById('xprs_email');\n    if (emailInput) {\n        emailInput.addEventListener('input', validateEmailField);\n        emailInput.addEventListener('blur', validateEmailField);\n    }\n    \n    \/\/ Validation postal\n    const postalInput = document.getElementById('xprs_postalcode');\n    if (postalInput) {\n        postalInput.addEventListener('input', validatePostalCodeField);\n        postalInput.addEventListener('blur', validatePostalCodeField);\n    }\n    \n    \/\/ Dealers dropdown\n    initSearchableSelect('xprs_dealer');\n    \n    \/\/ Variables Ajax check\n    if (typeof xprs_ajax === 'undefined') {\n        console.warn('Variables AJAX manquantes');\n    }\n});\n\n\/\/ Fonction pour cr\u00e9er un dropdown searchable\nfunction initSearchableSelect(selectId) {\n    const originalSelect = document.getElementById(selectId);\n    if (!originalSelect) return;\n    \n    \/\/ Cr\u00e9er la structure du dropdown custom\n    const wrapper = document.createElement('div');\n    wrapper.className = 'xprs-searchable-wrapper';\n    wrapper.style.position = 'relative';\n    \n    const searchInput = document.createElement('input');\n    searchInput.type = 'text';\n    searchInput.className = 'xprs-search-input';\n    searchInput.placeholder = 'Rechercher des concessionnaires...';\n    searchInput.autocomplete = 'off';\n    searchInput.setAttribute('role', 'combobox');\n    searchInput.setAttribute('aria-expanded', 'false');\n    searchInput.setAttribute('aria-haspopup', 'listbox');\n    \n    \/\/ Copier les attributs de validation du select original\n    if (originalSelect.hasAttribute('required')) {\n        searchInput.setAttribute('required', '');\n    }\n    \n    searchInput.style.cssText = `\n        width: 100%;\n        padding: 8px 12px;\n        border: 1px solid #ddd;\n        border-radius: 4px;\n        font-size: 14px;\n        box-sizing: border-box;\n    `;\n    \n    const dropdown = document.createElement('div');\n    dropdown.className = 'xprs-search-dropdown';\n    dropdown.setAttribute('role', 'listbox');\n    dropdown.setAttribute('aria-label', 'Options de concessionnaire');\n    dropdown.style.cssText = `\n        position: absolute;\n        top: 100%;\n        left: 0;\n        right: 0;\n        background: white;\n        border: 1px solid #ddd;\n        border-top: none;\n        max-height: 200px;\n        overflow-y: auto;\n        z-index: 1000;\n        display: none;\n        box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n    `;\n    \n    \/\/ Collecter toutes les options\n    const options = Array.from(originalSelect.options).map(option => ({\n        value: option.value,\n        text: option.textContent,\n        element: option\n    }));\n    \n    \/\/ Masquer le select original\n    originalSelect.style.display = 'none';\n    \n    \/\/ Ins\u00e9rer la nouvelle structure\n    originalSelect.parentNode.insertBefore(wrapper, originalSelect);\n    wrapper.appendChild(searchInput);\n    wrapper.appendChild(dropdown);\n    \n    \/\/ Variables pour g\u00e9rer l'\u00e9tat\n    let isOpen = false;\n    let selectedIndex = -1;\n    let filteredOptions = options;\n    \n    \/\/ Fonction pour rendre les options\n    function renderOptions() {\n        dropdown.innerHTML = '';\n        \n        if (filteredOptions.length === 0) {\n            const noResults = document.createElement('div');\n            noResults.className = 'xprs-no-results';\n            noResults.textContent = 'Aucun concessionnaire trouv\u00e9';\n            noResults.style.cssText = 'padding: 8px 12px; color: #666; font-style: italic;';\n            dropdown.appendChild(noResults);\n            return;\n        }\n        \n        filteredOptions.forEach((option, index) => {\n            if (option.value === '') return; \/\/ Skip placeholder option\n            \n            const optionDiv = document.createElement('div');\n            optionDiv.className = 'xprs-search-option';\n            optionDiv.textContent = option.text;\n            optionDiv.setAttribute('role', 'option');\n            optionDiv.setAttribute('data-value', option.value);\n            optionDiv.style.cssText = `\n                padding: 8px 12px;\n                cursor: pointer;\n                border-bottom: 1px solid #f0f0f0;\n                transition: background-color 0.2s;\n            `;\n            \n            if (index === selectedIndex) {\n                optionDiv.style.backgroundColor = '#e6f3ff';\n                optionDiv.setAttribute('aria-selected', 'true');\n                searchInput.setAttribute('aria-activedescendant', 'option-' + index);\n            } else {\n                optionDiv.setAttribute('aria-selected', 'false');\n            }\n            \n            optionDiv.id = 'option-' + index;\n            \n            optionDiv.addEventListener('mouseenter', function() {\n                selectedIndex = index;\n                renderOptions();\n            });\n            \n            optionDiv.addEventListener('click', function() {\n                selectOption(option);\n            });\n            \n            dropdown.appendChild(optionDiv);\n        });\n    }\n    \n    \/\/ Fonction pour s\u00e9lectionner une option\n    function selectOption(option) {\n        originalSelect.value = option.value;\n        searchInput.value = option.text;\n        closeDropdown();\n        \n        \/\/ Copier la validation du select original vers l'input\n        searchInput.setCustomValidity('');\n        \n        \/\/ D\u00e9clencher l'\u00e9v\u00e9nement change sur le select original\n        const event = new Event('change', { bubbles: true });\n        originalSelect.dispatchEvent(event);\n    }\n    \n    \/\/ Fonction pour effacer la s\u00e9lection\n    function clearSelection() {\n        originalSelect.value = '';\n        searchInput.value = '';\n        \n        \/\/ G\u00e9rer la validation required\n        if (originalSelect.hasAttribute('required')) {\n            searchInput.setCustomValidity('Veuillez s\u00e9lectionner un concessionnaire');\n        }\n    }\n    \n    \/\/ Fonction pour ouvrir le dropdown\n    function openDropdown() {\n        isOpen = true;\n        dropdown.style.display = 'block';\n        searchInput.setAttribute('aria-expanded', 'true');\n        renderOptions();\n    }\n    \n    \/\/ Fonction pour fermer le dropdown\n    function closeDropdown() {\n        isOpen = false;\n        dropdown.style.display = 'none';\n        searchInput.setAttribute('aria-expanded', 'false');\n        searchInput.removeAttribute('aria-activedescendant');\n        selectedIndex = -1;\n    }\n    \n    \/\/ Fonction pour filtrer les options\n    function filterOptions(searchTerm) {\n        filteredOptions = options.filter(option => \n            option.text.toLowerCase().includes(searchTerm.toLowerCase()) && option.value !== ''\n        );\n        selectedIndex = -1;\n        renderOptions();\n    }\n    \n    \/\/ \u00c9v\u00e9nements du champ de recherche\n    searchInput.addEventListener('input', function() {\n        const searchTerm = this.value;\n        \n        \/\/ Si l'utilisateur efface compl\u00e8tement le champ, r\u00e9initialiser la s\u00e9lection\n        if (searchTerm === '') {\n            clearSelection();\n        } else {\n            \/\/ V\u00e9rifier si le texte correspond exactement \u00e0 une option s\u00e9lectionn\u00e9e\n            const exactMatch = options.find(option => option.text === searchTerm);\n            if (!exactMatch) {\n                \/\/ Le texte ne correspond pas exactement, r\u00e9initialiser la valeur du select\n                originalSelect.value = '';\n            }\n        }\n        \n        filterOptions(searchTerm);\n        \n        if (!isOpen && searchTerm !== '') {\n            openDropdown();\n        }\n    });\n    \n    searchInput.addEventListener('focus', function() {\n        if (!isOpen) {\n            filterOptions(this.value);\n            openDropdown();\n        }\n    });\n    \n    searchInput.addEventListener('keydown', function(e) {\n        if (!isOpen) return;\n        \n        switch(e.key) {\n            case 'ArrowDown':\n                e.preventDefault();\n                selectedIndex = Math.min(selectedIndex + 1, filteredOptions.length - 1);\n                renderOptions();\n                break;\n                \n            case 'ArrowUp':\n                e.preventDefault();\n                selectedIndex = Math.max(selectedIndex - 1, -1);\n                renderOptions();\n                break;\n                \n            case 'Enter':\n                e.preventDefault();\n                if (selectedIndex >= 0 && filteredOptions[selectedIndex]) {\n                    selectOption(filteredOptions[selectedIndex]);\n                }\n                break;\n                \n            case 'Escape':\n                closeDropdown();\n                break;\n        }\n    });\n    \n    \/\/ Fermer le dropdown quand on clique ailleurs\n    document.addEventListener('click', function(e) {\n        if (!wrapper.contains(e.target)) {\n            closeDropdown();\n        }\n    });\n    \n    \/\/ G\u00e9rer le hover sur les options\n    dropdown.addEventListener('mouseleave', function() {\n        selectedIndex = -1;\n        renderOptions();\n    });\n    \n    \/\/ Initialiser avec la valeur pr\u00e9-s\u00e9lectionn\u00e9e si elle existe\n    if (originalSelect.value !== '') {\n        const selectedOption = options.find(option => option.value === originalSelect.value);\n        if (selectedOption) {\n            searchInput.value = selectedOption.text;\n        }\n    }\n    \n    \/\/ Validation initiale\n    if (originalSelect.hasAttribute('required') && originalSelect.value === '') {\n        searchInput.setCustomValidity('Veuillez s\u00e9lectionner un concessionnaire');\n    }\n});\n<\/script>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/temp4.xprss-sandbox.com\/fr\/wp-json\/wp\/v2\/pages\/81412"}],"collection":[{"href":"https:\/\/temp4.xprss-sandbox.com\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/temp4.xprss-sandbox.com\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/temp4.xprss-sandbox.com\/fr\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/temp4.xprss-sandbox.com\/fr\/wp-json\/wp\/v2\/comments?post=81412"}],"version-history":[{"count":1,"href":"https:\/\/temp4.xprss-sandbox.com\/fr\/wp-json\/wp\/v2\/pages\/81412\/revisions"}],"predecessor-version":[{"id":81413,"href":"https:\/\/temp4.xprss-sandbox.com\/fr\/wp-json\/wp\/v2\/pages\/81412\/revisions\/81413"}],"wp:attachment":[{"href":"https:\/\/temp4.xprss-sandbox.com\/fr\/wp-json\/wp\/v2\/media?parent=81412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}