{"id":2790,"date":"2025-10-24T08:41:52","date_gmt":"2025-10-24T08:41:52","guid":{"rendered":"https:\/\/pro.barestho.com\/?page_id=2790"},"modified":"2026-03-03T08:07:18","modified_gmt":"2026-03-03T08:07:18","slug":"sidentifier","status":"publish","type":"page","link":"https:\/\/pro.barestho.com\/nl\/sidentifier\/","title":{"rendered":"S&rsquo;identifier"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"2790\" class=\"elementor elementor-2790\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ef9b9a8 e-con-full e-flex e-con e-parent\" data-id=\"ef9b9a8\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;gradient&quot;}\">\n\t\t<div class=\"elementor-element elementor-element-3383a4f e-con-full e-flex e-con e-child\" data-id=\"3383a4f\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;slideshow&quot;,&quot;background_slideshow_gallery&quot;:[],&quot;background_slideshow_loop&quot;:&quot;yes&quot;,&quot;background_slideshow_slide_duration&quot;:5000,&quot;background_slideshow_slide_transition&quot;:&quot;fade&quot;,&quot;background_slideshow_transition_duration&quot;:500}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-0d5a844 elementor-widget__width-inherit elementor-widget elementor-widget-html\" data-id=\"0d5a844\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<style>\n.login-container {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    font-family: 'Arial', sans-serif;\n    background: transparent;\n    background-image: url(\"https:\/\/pro.barestho.com\/wp-content\/uploads\/2025\/10\/Sidentifier-sur-Barestho.svg\");\n    background-repeat: no-repeat;\n    background-position: right bottom;\n    background-size: auto 95%;\n    position: relative;\n    min-height: 90vh;\n}\n\n\/* Loader sur le cadre complet *\/\n.login-loader-overlay {\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    background: rgba(255, 255, 255, 0.95);\n    backdrop-filter: blur(10px);\n    border-radius: 24px;\n    display: none;\n    align-items: center;\n    justify-content: center;\n    flex-direction: column;\n    z-index: 1000;\n    opacity: 0;\n    transition: opacity 0.3s ease;\n}\n\n.login-loader-overlay.active {\n    display: flex;\n    opacity: 1;\n}\n\n.login-loader-content {\n    text-align: center;\n}\n\n.login-loader-spinner {\n    width: 50px;\n    height: 50px;\n    border: 3px solid #f1f3f4;\n    border-top: 3px solid #252332;\n    border-radius: 50%;\n    animation: spin 1s linear infinite;\n    margin: 0 auto 20px;\n}\n\n.login-loader-text {\n    color: #252332;\n    font-size: 16px;\n    font-weight: 600;\n}\n\n@keyframes spin {\n    0% { transform: rotate(0deg); }\n    100% { transform: rotate(360deg); }\n}\n\n.restaurant-button {\n    text-decoration: none !important;\n}\n.restaurant-button:hover {\n    color: white !important;\n}\n\n.login-div {\n    background: rgba(255, 255, 255, 0.95);\n    backdrop-filter: blur(20px);\n    border-radius: 24px;\n    padding: 50px 40px;\n    border: 1px solid rgba(255, 255, 255, 0.2);\n    width: 100%;\n    max-width: 440px;\n    box-shadow: \n        0 20px 40px rgba(0, 0, 0, 0.1),\n        0 0 0 1px rgba(255, 255, 255, 0.3);\n    position: relative;\n    overflow: hidden;\n}\n\n.login-div.justify {\n    max-width: 600px;\n}\n\n\/* Header avec logo *\/\n.login-header {\n    text-align: center;\n    margin-bottom: 40px;\n}\n\n.login-logo {\n    width: 60px;\n    height: 60px;\n    margin: 0 auto 20px;\n    background: #252332;\n    border-radius: 12px;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    padding: 15px;\n    box-shadow: 0 8px 25px rgba(37, 35, 50, 0.2);\n}\n\n.login-logo img {\n    width: 100%;\n    height: 100%;\n}\n\n.login-title {\n    font-size: 28px;\n    font-weight: 700;\n    color: #252332;\n    margin-bottom: 8px;\n}\n\n.login-subtitle {\n    font-size: 16px;\n    color: #666;\n    font-weight: 500;\n}\n\n\/* Form styles *\/\n.form-container {\n    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.form-container:not(.visible) {\n    display: none;\n    opacity: 0;\n    transform: translateY(20px);\n}\n\n.form-container.visible {\n    display: block;\n    opacity: 1;\n    transform: translateY(0);\n}\n\n.login-form {\n    padding: 0;\n    display: flex;\n    flex-direction: column;\n}\n\n\/* Input style am\u00e9lior\u00e9 *\/\n.inputContainer {\n    margin-bottom: 30px;\n    position: relative;\n}\n\n.inputContainer::before {\n    content: '\u2709\ufe0f';\n    position: absolute;\n    left: 18px;\n    top: 50%;\n    transform: translateY(-50%);\n    font-size: 18px;\n    z-index: 2;\n    transition: all 0.3s ease;\n}\n\n.inputContainer:focus-within::before {\n    transform: translateY(-50%) scale(1.1);\n}\n\n#email {\n    width: 100%;\n    padding: 18px 20px 18px 50px;\n    background: rgba(248, 249, 250, 0.8);\n    border: 2px solid #e8ecef;\n    border-radius: 16px;\n    color: #252332;\n    font-size: 16px;\n    font-weight: 500;\n    transition: all 0.3s ease;\n    box-sizing: border-box;\n    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);\n}\n\n#email:focus {\n    outline: none;\n    border-color: #252332;\n    background: white;\n    box-shadow: \n        0 0 0 3px rgba(37, 35, 50, 0.1),\n        0 4px 20px rgba(0, 0, 0, 0.08);\n    transform: translateY(-1px);\n}\n\n#email::placeholder {\n    color: #999;\n    font-weight: 400;\n}\n\n\/* Button style premium - Box shadow r\u00e9duite *\/\n#submitbutton {\n    width: 100%;\n    padding: 18px;\n    background: linear-gradient(135deg, #252332, #1a1826);\n    color: white;\n    border: none;\n    border-radius: 16px;\n    font-size: 16px;\n    font-weight: 700;\n    cursor: pointer;\n    transition: all 0.3s ease;\n    margin-bottom: 20px;\n    position: relative;\n    overflow: hidden;\n    box-shadow: 0 4px 12px rgba(37, 35, 50, 0.2); \/* Box shadow r\u00e9duite *\/\n}\n\n#submitbutton::before {\n    content: '';\n    position: absolute;\n    top: 0;\n    left: -100%;\n    width: 100%;\n    height: 100%;\n    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);\n    transition: left 0.5s;\n}\n\n#submitbutton:hover::before {\n    left: 100%;\n}\n\n#submitbutton:enabled:hover {\n    transform: translateY(-2px);\n    box-shadow: 0 6px 20px rgba(37, 35, 50, 0.3); \/* Box shadow r\u00e9duite *\/\n}\n\n#submitbutton:enabled:active {\n    transform: translateY(-1px);\n}\n\n#submitbutton:disabled {\n    background: #f1f3f4;\n    color: #bdc1c6;\n    cursor: not-allowed;\n    box-shadow: none;\n    transform: none;\n}\n\n\/* Loader style \u00e9l\u00e9gant (ancien - gard\u00e9 pour compatibilit\u00e9) *\/\n#loader {\n    display: none;\n    justify-content: center;\n    gap: 8px;\n    margin: 30px 0;\n}\n\n.loader-dot {\n    width: 10px;\n    height: 10px;\n    background: #252332;\n    border-radius: 50%;\n    animation: pulse 1.4s ease-in-out infinite both;\n}\n\n.loader-dot:nth-child(2) {\n    animation-delay: 0.16s;\n    background: #DC0044;\n}\n\n.loader-dot:nth-child(3) {\n    animation-delay: 0.32s;\n    background: #252332;\n}\n\n@keyframes pulse {\n    0%, 80%, 100% {\n        transform: scale(0.8);\n        opacity: 0.5;\n    }\n    40% {\n        transform: scale(1.2);\n        opacity: 1;\n    }\n}\n\n\/* Error message simple - Masqu\u00e9 par d\u00e9faut *\/\n.error-sentence {\n    color: #DC0044;\n    text-align: center;\n    margin: 0;\n    font-size: 14px;\n    font-weight: 500;\n    display: none;\n}\n\n.error-sentence:not(:empty) {\n    display: block;\n    margin: 15px 0;\n    animation: fadeInUp 0.3s ease;\n}\n\n\/* Return button \u00e9l\u00e9gant - Box shadow r\u00e9duite *\/\n#return-button {\n    width: 100%;\n    padding: 15px;\n    background: transparent;\n    color: #666;\n    border: 2px solid #e8ecef;\n    border-radius: 16px;\n    font-size: 15px;\n    font-weight: 600;\n    cursor: pointer;\n    transition: all 0.3s ease;\n    margin: 20px 0;\n    display: none;\n    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); \/* Box shadow r\u00e9duite *\/\n}\n\n#return-button:hover {\n    color: #252332;\n    border-color: #252332;\n    background: rgba(37, 35, 50, 0.04);\n    transform: translateY(-1px);\n    box-shadow: 0 4px 12px rgba(37, 35, 50, 0.1); \/* Box shadow r\u00e9duite *\/\n}\n\n\/* Section restaurants *\/\n.maillogin {\n    display: none;\n    text-align: center;\n    color: #252332;\n    font-size: 20px;\n    margin-bottom: 30px;\n    font-weight: 600;\n}\n\n.maillogin.visible {\n    display: block;\n    animation: fadeInUp 0.5s ease;\n}\n\n\/* Restaurants list - Design en ligne *\/\n#restaurants-list {\n    display: none;\n    flex-direction: column;\n    gap: 12px;\n    margin-top: 10px;\n    max-height: 400px;\n    overflow-y: auto;\n    padding-right: 8px;\n    padding-inline-start: 0;\n}\n\n#restaurants-list.visible {\n    display: flex;\n    animation: fadeInUp 0.6s ease;\n}\n\n\/* Scrollbar personnalis\u00e9e *\/\n#restaurants-list::-webkit-scrollbar {\n    width: 6px;\n}\n\n#restaurants-list::-webkit-scrollbar-track {\n    background: #f1f1f1;\n    border-radius: 10px;\n}\n\n#restaurants-list::-webkit-scrollbar-thumb {\n    background: #252332;\n    border-radius: 10px;\n}\n\n#restaurants-list::-webkit-scrollbar-thumb:hover {\n    background: #DC0044;\n}\n\n.restaurant-item {\n    background: white;\n    border: 1px solid #f0f0f0;\n    border-radius: 16px;\n    padding: 20px;\n    cursor: pointer;\n    transition: all 0.3s ease;\n    display: flex;\n    align-items: center;\n    gap: 16px;\n    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); \/* Box shadow r\u00e9duite *\/\n    position: relative;\n    overflow: hidden;\n}\n\n\/* SUPPRIM\u00c9: Hover effects pour la carte restaurant *\/\n\/* .restaurant-item:hover {\n    background: #252332;\n    transform: translateX(5px);\n    box-shadow: 0 4px 15px rgba(37, 35, 50, 0.2);\n    border-color: #252332;\n}\n\n.restaurant-item:hover .restaurant-name {\n    color: white;\n}\n\n.restaurant-item:hover .restaurant-city {\n    color: rgba(255, 255, 255, 0.8);\n} *\/\n\n.restaurant-logo {\n    width: 50px;\n    height: 50px;\n    border-radius: 12px;\n    background: linear-gradient(135deg, #f8f9fa, #ffffff);\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    flex-shrink: 0;\n    border: 2px solid #f0f0f0;\n    transition: all 0.3s ease;\n    overflow: hidden;\n}\n\n\/* SUPPRIM\u00c9: Hover effects pour le logo *\/\n\/* .restaurant-item:hover .restaurant-logo {\n    transform: scale(1.05);\n    border-color: white;\n    background: white;\n    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);\n}\n\n.restaurant-item:hover .restaurant-logo img {\n    transform: scale(1.1);\n} *\/\n\n.restaurant-logo img {\n    width: 50px;\n    height: 50px;\n    object-fit: contain;\n    border-radius: 6px;\n    transition: transform 0.3s ease;\n}\n\n.restaurant-info {\n    flex: 1;\n    min-width: 0;\n}\n\n.restaurant-name {\n    color: #252332;\n    font-weight: 600;\n    font-size: 16px;\n    margin: 0 0 4px 0;\n    line-height: 1.3;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    transition: color 0.3s ease;\n}\n\n.restaurant-city {\n    color: #666;\n    font-size: 13px;\n    font-weight: 500;\n    margin: 0;\n    transition: color 0.3s ease;\n}\n\n.restaurant-button {\n    padding: 10px 20px;\n    background: linear-gradient(135deg, #252332, #1a1826);\n    color: white;\n    border: none;\n    border-radius: 12px;\n    font-size: 14px;\n    font-weight: 600;\n    cursor: pointer;\n    transition: all 0.3s ease;\n    text-decoration: none; \/* Supprim\u00e9 le soulignement *\/\n    display: flex;\n    align-items: center;\n    gap: 6px;\n    flex-shrink: 0;\n    box-shadow: 0 2px 8px rgba(37, 35, 50, 0.15); \/* Box shadow r\u00e9duite *\/\n}\n\n\/* SUPPRIM\u00c9: Hover effects pour le bouton *\/\n\/* .restaurant-item:hover .restaurant-button {\n    background: linear-gradient(135deg, #DC0044, #C0003A);\n    transform: translateY(-2px);\n    box-shadow: 0 4px 12px rgba(220, 0, 68, 0.25);\n}\n\n.restaurant-button:hover {\n    background: linear-gradient(135deg, #DC0044, #C0003A);\n    transform: translateY(-2px);\n    box-shadow: 0 4px 12px rgba(220, 0, 68, 0.25);\n    text-decoration: none;\n} *\/\n\n.restaurant-button img {\n    width: 14px;\n    height: 14px;\n    filter: brightness(0) invert(1);\n}\n\n\/* Animations *\/\n@keyframes fadeInUp {\n    from {\n        opacity: 0;\n        transform: translateY(30px);\n    }\n    to {\n        opacity: 1;\n        transform: translateY(0);\n    }\n}\n\n\/* Version mobile am\u00e9lior\u00e9e *\/\n@media (max-width: 768px) {\n    .login-container {\n        min-height: 80vh;\n        padding: 20px 15px;\n    }\n    \n    .login-div {\n        padding: 30px 25px;\n        margin: 15px;\n        max-width: calc(100% - 30px);\n    }\n    \n    .login-div.justify {\n        max-width: calc(100% - 30px);\n    }\n    \n    #restaurants-list {\n        max-height: 350px;\n        gap: 10px;\n    }\n    \n    .login-title {\n        font-size: 24px;\n    }\n    \n    .login-subtitle {\n        font-size: 15px;\n    }\n    \n    \/* Version mobile - Restaurants en ligne compacte *\/\n    .restaurant-item {\n        padding: 15px;\n        gap: 12px;\n        align-items: center;\n    }\n    \n    .restaurant-logo {\n        width: 40px;\n        height: 40px;\n        border-radius: 10px;\n    }\n    \n    .restaurant-logo img {\n        width: 22px;\n        height: 22px;\n    }\n    \n    .restaurant-info {\n        flex: 1;\n        min-width: 0;\n    }\n    \n    .restaurant-name {\n        font-size: 15px;\n        white-space: nowrap;\n        overflow: hidden;\n        text-overflow: ellipsis;\n    }\n    \n    .restaurant-city {\n        font-size: 12px;\n    }\n    \n    \/* Bouton mobile - Ic\u00f4ne seulement *\/\n    .restaurant-button {\n        width: 40px;\n        height: 40px;\n        padding: 0;\n        border-radius: 50%;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        background: #252332;\n        box-shadow: 0 2px 6px rgba(37, 35, 50, 0.2);\n    }\n    \n    .restaurant-button span {\n        display: none; \/* Cache le texte \"Acc\u00e9der\" *\/\n    }\n    \n    .restaurant-button img {\n        width: 16px;\n        height: 16px;\n        margin: 0;\n    }\n    \n    \/* SUPPRIM\u00c9: Hover effects mobile *\/\n    \/* .restaurant-item:hover .restaurant-button {\n        background: #DC0044;\n        transform: scale(1.1);\n        box-shadow: 0 3px 10px rgba(220, 0, 68, 0.3);\n    }\n\n    .restaurant-button:hover {\n        background: #DC0044;\n        transform: scale(1.1);\n        box-shadow: 0 3px 10px rgba(220, 0, 68, 0.3);\n    } *\/\n}\n\n@media (max-width: 480px) {\n    .login-div {\n        padding: 25px 20px;\n    }\n    \n    #email {\n        padding: 14px 14px 14px 45px;\n        font-size: 16px;\n    }\n    \n    .restaurant-item {\n        padding: 12px;\n        gap: 10px;\n    }\n    \n    .restaurant-logo {\n        width: 36px;\n        height: 36px;\n    }\n    \n    .restaurant-logo img {\n        width: 20px;\n        height: 20px;\n    }\n    \n    .restaurant-name {\n        font-size: 14px;\n    }\n    \n    .restaurant-city {\n        font-size: 11px;\n    }\n    \n    .restaurant-button {\n        width: 36px;\n        height: 36px;\n    }\n    \n    .restaurant-button img {\n        width: 14px;\n        height: 14px;\n    }\n    \n    \/* Pour les tr\u00e8s petits \u00e9crans, on garde la pr\u00e9sentation en ligne *\/\n    .restaurant-item {\n        flex-direction: row; \/* Toujours en ligne m\u00eame sur mobile *\/\n        text-align: left;\n    }\n    \n    .restaurant-info {\n        width: auto;\n    }\n    \n    .restaurant-name {\n        white-space: nowrap;\n        text-align: left;\n    }\n}\n\n\/* Pour les \u00e9crans tr\u00e8s \u00e9troits *\/\n@media (max-width: 360px) {\n    .restaurant-item {\n        padding: 10px;\n        gap: 8px;\n    }\n    \n    .restaurant-name {\n        font-size: 13px;\n    }\n    \n    .restaurant-city {\n        font-size: 10px;\n    }\n    \n    .restaurant-logo {\n        width: 32px;\n        height: 32px;\n    }\n    \n    .restaurant-logo img {\n        width: 18px;\n        height: 18px;\n    }\n    \n    .restaurant-button {\n        width: 32px;\n        height: 32px;\n    }\n    \n    .restaurant-button img {\n        width: 12px;\n        height: 12px;\n    }\n}\n\/* SVG ic\u00f4ne bouton Acc\u00e9der (mobile & desktop) *\/\n.restaurant-button svg {\n    width: 14px;\n    height: 14px;\n    stroke: white;\n    flex-shrink: 0;\n}\n\n\/* Mobile *\/\n@media (max-width: 768px) {\n    .restaurant-button svg {\n        width: 16px;\n        height: 16px;\n    }\n}\n\n@media (max-width: 480px) {\n    .restaurant-button svg {\n        width: 14px;\n        height: 14px;\n    }\n}\n\n@media (max-width: 360px) {\n    .restaurant-button svg {\n        width: 12px;\n        height: 12px;\n    }\n}\n\n\/* Ic\u00f4ne SVG Font Awesome dans le bouton Acc\u00e9der *\/\n.restaurant-button svg {\n    width: 20px;\n    height: 20px;\n    fill: white;\n    flex-shrink: 0;\n}\n\n\/* Mobile *\/\n@media (max-width: 768px) {\n    .restaurant-button svg {\n        width: 20px;\n        height: 20px;\n    }\n}\n\n@media (max-width: 360px) {\n    .restaurant-button svg {\n        width: 20px;\n        height: 20px;\n    }\n}\n<\/style>\n\n<div class=\"login-container\">\n  <div class=\"login-div\">\n    <!-- Loader sur le cadre complet -->\n    <div class=\"login-loader-overlay\" id=\"fullLoader\">\n        <div class=\"login-loader-content\">\n            <div class=\"login-loader-spinner\"><\/div>\n            <div class=\"login-loader-text\">Aan het laden...<\/div>\n        <\/div>\n    <\/div>\n    \n    <!-- Header avec logo -->\n    <div class=\"login-header\">\n      <div class=\"login-logo\">\n        <img decoding=\"async\" src=\"https:\/\/pro.barestho.com\/wp-content\/uploads\/2025\/10\/logo3.svg\" alt=\"Barestho\">\n      <\/div>\n      <h1 class=\"login-title\">Identificatie<\/h1>\n      <p class=\"login-subtitle\">Toegang tot uw restaurantgedeelte<\/p>\n    <\/div>\n    \n    <div class=\"form-container visible\">\n      <div id=\"loader\" style=\"display:none;\">\n        <div class=\"loader-dot\"><\/div>\n        <div class=\"loader-dot\"><\/div>\n        <div class=\"loader-dot\"><\/div>\n      <\/div>\n      <form class=\"login-form\" onsubmit=\"renderRestaurantsList(event)\" action=\"\">\n        <div class=\"inputContainer\">\n          <input type=\"email\" id=\"email\" name=\"email\" onkeyup=\"success()\" placeholder=\"Professioneel e-mailadres\" required>\n        <\/div>\n        <button type=\"submit\" id=\"submitbutton\" disabled>Aanmelden<\/button>\n      <input type=\"hidden\" name=\"trp-form-language\" value=\"nl\"\/><\/form>\n    <\/div>\n    \n    <div class=\"maillogin\">Selecteer uw restaurant<\/div>\n    \n    <p class=\"error-sentence\"><\/p>\n    <button id=\"return-button\" onclick=\"onBackClick()\">\u2190 Terug naar identificatie<\/button>\n    <ul id=\"restaurants-list\"><\/ul>\n  <\/div>\n<\/div>\n\n<script>\nconst list = document.querySelector(\"#restaurants-list\");\nconst form = document.querySelector(\".form-container\");\nconst maillogin = document.querySelector(\".maillogin\");\nconst error = document.querySelector(\".error-sentence\")\nconst returnbutton = document.querySelector(\"#return-button\");\nconst loginDiv = document.querySelector(\".login-div\")\nconst fullLoader = document.querySelector(\"#fullLoader\");\n\nconst getRestaurantsByEmail = async (email) => {\n    const res = await fetch(\"https:\/\/public.api.barestho.com\/api\/public\/get-restaurants\/identify\/\", { \n        method: \"POST\", \n        body: JSON.stringify({ email }), \n        headers: { \"Content-Type\": \"application\/json\" } \n    });\n    return await res.json();\n}\n\nconst onBackClick = () => {\n    returnbutton.style.display = \"none\";\n    form.classList.add(\"visible\");\n    maillogin.classList.remove(\"visible\");\n    list.classList.remove(\"visible\");\n    list.innerHTML = \"\";\n    error.innerHTML = \"\"; \/\/ Vide le message d'erreur\n    loginDiv.classList.remove(\"justify\");\n}\n\nfunction success() {\n    const emailInput = document.getElementById(\"email\");\n    const submitButton = document.getElementById(\"submitbutton\");\n    \n    if(emailInput.value === \"\") { \n        submitButton.disabled = true; \n    } else { \n        submitButton.disabled = false;\n    }\n}\n\nconst renderRestaurantsList = async (e) => {\n    e.preventDefault();\n    const data = new FormData(e.target);\n    const body = Object.fromEntries(data.entries());\n\n    const loader = document.querySelector(\"#loader\");\n    loader.style.display = \"none\"; \/\/ Cache l'ancien loader\n    fullLoader.classList.add(\"active\"); \/\/ Active le nouveau loader sur le cadre complet\n    error.innerHTML = \"\"; \/\/ R\u00e9initialise le message d'erreur\n\n    try {\n        const restaurants = await getRestaurantsByEmail(String(body.email).toLowerCase());\n        \n        if (!restaurants || restaurants.length === 0) {\n            error.innerHTML = `Aucun restaurant trouv\u00e9 pour cette adresse e-mail.`;\n        } else {\n            loginDiv.classList.add(\"justify\");\n            list.innerHTML = \"\";\n            for (const restaurant of restaurants) {\n                list.innerHTML += getRestaurantHTML(restaurant);\n            }\n        }\n        \n        form.classList.remove(\"visible\");\n        maillogin.classList.add(\"visible\");\n        returnbutton.style.display = \"block\";\n        list.classList.add(\"visible\");\n    } catch (err) {\n        console.error(\"Erreur:\", err);\n        error.innerHTML = \"Erreur de connexion. Veuillez r\u00e9essayer.\";\n    } finally {\n        fullLoader.classList.remove(\"active\"); \/\/ D\u00e9sactive le loader\n    }\n};\n\nconst getRestaurantHTML = (restaurant) => {\n    const imageUrl = `https:\/\/public.api.barestho.com\/media\/${restaurant.merchant_name}\/${restaurant.logo}`;\n    const appUrl = `https:\/\/${restaurant.merchant_name}.app.barestho.com`;\n\n    return `\n      <div class=\"restaurant-item\" onclick=\"window.open('${appUrl}', '_blank')\">\n          <div class=\"restaurant-logo\">\n            ${restaurant.logo ? \n              `<img decoding=\"async\" src=\"${imageUrl}\" onError=\"this.onerror=null;this.src='https:\/\/barestho-new-website.com\/wp-content\/uploads\/2023\/12\/logo-resto.png';\">` : \n              `<img decoding=\"async\" src=\"https:\/\/barestho-new-website.com\/wp-content\/uploads\/2023\/12\/logo-resto.png\">`\n            }\n          <\/div>\n          <div class=\"restaurant-info\">\n            <div class=\"restaurant-name\">${restaurant.name}<\/div>\n            <div class=\"restaurant-city\">${restaurant.city || ''}<\/div>\n          <\/div>\n<a class=\"restaurant-button\" href=\"${appUrl}\" target=\"_blank\" aria-label=\"Acc\u00e9der\">\n    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 640 640\">\n        <path d=\"M409 337C418.4 327.6 418.4 312.4 409 303.1L265 159C258.1 152.1 247.8 150.1 238.8 153.8C229.8 157.5 224 166.3 224 176L224 256L112 256C85.5 256 64 277.5 64 304L64 336C64 362.5 85.5 384 112 384L224 384L224 464C224 473.7 229.8 482.5 238.8 486.2C247.8 489.9 258.1 487.9 265 481L409 337zM416 480C398.3 480 384 494.3 384 512C384 529.7 398.3 544 416 544L480 544C533 544 576 501 576 448L576 192C576 139 533 96 480 96L416 96C398.3 96 384 110.3 384 128C384 145.7 398.3 160 416 160L480 160C497.7 160 512 174.3 512 192L512 448C512 465.7 497.7 480 480 480L416 480z\"\/>\n    <\/svg>\n    <span>Acc\u00e9der<\/span>\n<\/a>\n      <\/div>\n    `;\n};\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Chargement&#8230; Identification Acc\u00e9dez \u00e0 votre espace restaurant Se connecter S\u00e9lectionnez votre restaurant \u2190 Retour \u00e0 l&rsquo;identification<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2790","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pro.barestho.com\/nl\/wp-json\/wp\/v2\/pages\/2790","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pro.barestho.com\/nl\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pro.barestho.com\/nl\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pro.barestho.com\/nl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pro.barestho.com\/nl\/wp-json\/wp\/v2\/comments?post=2790"}],"version-history":[{"count":268,"href":"https:\/\/pro.barestho.com\/nl\/wp-json\/wp\/v2\/pages\/2790\/revisions"}],"predecessor-version":[{"id":5571,"href":"https:\/\/pro.barestho.com\/nl\/wp-json\/wp\/v2\/pages\/2790\/revisions\/5571"}],"wp:attachment":[{"href":"https:\/\/pro.barestho.com\/nl\/wp-json\/wp\/v2\/media?parent=2790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}