{"id":919,"date":"2026-08-29T12:03:51","date_gmt":"2026-08-29T10:03:51","guid":{"rendered":"https:\/\/latourmedievale.fr\/?page_id=919"},"modified":"2026-08-29T21:09:09","modified_gmt":"2026-08-29T19:09:09","slug":"disponibilites-et-tarifs","status":"publish","type":"page","link":"https:\/\/latourmedievale.fr\/index.php\/disponibilites-et-tarifs\/","title":{"rendered":"Disponibilit\u00e9s et tarifs"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">PAGE EN CONSTRUCTION<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n<style data-wp-block-html=\"css\">\n#simulateur-tarif {\n  max-width: 700px;\n  margin: 30px auto;\n  padding: 30px;\n  background: #000000;\n  color: #ffffff;\n  border-radius: 15px;\n  box-shadow: 0 5px 20px rgba(0,0,0,0.25);\n  box-sizing: border-box;\n}\n\n#simulateur-tarif h2 {\n  margin-top: 0;\n  margin-bottom: 25px;\n  color: #ffffff;\n  text-align: center;\n}\n\n.tarif-formulaire {\n  display: grid;\n  grid-template-columns: 1fr 1fr;\n  gap: 20px;\n}\n\n.champ-tarif {\n  display: flex;\n  flex-direction: column;\n}\n\n.champ-tarif label {\n  margin-bottom: 7px;\n  font-weight: bold;\n  color: #ffffff;\n}\n\n.champ-tarif label span {\n  font-weight: normal;\n  font-size: 0.85em;\n}\n\n.champ-tarif input,\n.champ-tarif select {\n  width: 100%;\n  min-height: 45px;\n  padding: 8px 12px;\n  box-sizing: border-box;\n  border: 2px solid #ffffff;\n  border-radius: 8px;\n  background: #ffffff;\n  color: #000000;\n  font-size: 16px;\n}\n\n#calculer-tarif {\n  display: block;\n  margin: 25px auto 0;\n  padding: 12px 25px;\n  border: none;\n  border-radius: 8px;\n  background: #D73301;\n  color: #ffffff;\n  font-size: 17px;\n  font-weight: bold;\n  cursor: pointer;\n}\n\n#calculer-tarif:hover {\n  opacity: 0.9;\n}\n\n#resultat-tarif {\n  margin-top: 25px;\n  padding-top: 20px;\n  border-top: 1px solid rgba(255,255,255,0.3);\n}\n\n.resultat-erreur {\n  padding: 15px;\n  background: #D73301;\n  border-radius: 8px;\n  font-weight: bold;\n}\n\n.resultat-prix {\n  line-height: 1.7;\n}\n\n.resultat-prix h3 {\n  margin-top: 0;\n  color: #ffffff;\n}\n\n.ligne-prix {\n  display: flex;\n  justify-content: space-between;\n  gap: 20px;\n}\n\n.total-prix {\n  margin-top: 12px;\n  padding-top: 12px;\n  border-top: 2px solid #ffffff;\n  font-size: 1.3em;\n  font-weight: bold;\n}\n\n.reduction {\n  color: #D73301;\n  font-weight: bold;\n}\n\n.details-nuits {\n  margin-top: 20px;\n  font-size: 0.9em;\n  opacity: 0.85;\n}\n\n@media (max-width: 600px) {\n\n  #simulateur-tarif {\n    padding: 20px;\n  }\n\n  .tarif-formulaire {\n    grid-template-columns: 1fr;\n  }\n\n}\n<\/style>\n\n<script data-wp-block-html=\"js\">\nsetTimeout(function () {\n\n    const bouton = document.getElementById(\"calculer-tarif\");\n\n    if (!bouton) {\n        alert(\"ERREUR : bouton introuvable\");\n        return;\n    }\n\n    bouton.addEventListener(\"click\", function () {\n\n        const arrivee = document.getElementById(\"date-arrivee\").value;\n        const depart = document.getElementById(\"date-depart\").value;\n        const personnes = Number(\n            document.getElementById(\"nb-personnes\").value\n        );\n\n        if (!arrivee || !depart) {\n            alert(\"Merci de choisir les deux dates.\");\n            return;\n        }\n\n        const dateArrivee = new Date(arrivee + \"T00:00:00\");\n        const dateDepart = new Date(depart + \"T00:00:00\");\n\n        if (dateDepart <= dateArrivee) {\n            alert(\"La date de d\u00e9part doit \u00eatre apr\u00e8s la date d'arriv\u00e9e.\");\n            return;\n        }\n\n        const nuits = Math.round(\n            (dateDepart - dateArrivee) \/ 86400000\n        );\n\n\n        \/* =========================================\n           CALCUL DES NUITS\n           ========================================= *\/\n\n        let prixLocation = 0;\n        let detail = \"\";\n\n        let date = new Date(dateArrivee);\n\n        for (let i = 0; i < nuits; i++) {\n\n            const mois = date.getMonth() + 1;\n            const jour = date.getDate();\n            const jourSemaine = date.getDay();\n\n            let prix = 70;\n            let saison = \"basse\";\n            let type = \"semaine\";\n\n\n            \/* =====================================\n               SAISONS\n               ===================================== *\/\n\n            \/* Janvier *\/\n\n            if (mois === 1) {\n\n                if (jour <= 2) {\n                    prix = 90;\n                    saison = \"haute\";\n                } else {\n                    prix = 70;\n                    saison = \"basse\";\n                }\n            }\n\n\n            \/* F\u00e9vrier \/ Mars *\/\n\n            if (mois === 2 || mois === 3) {\n                prix = 70;\n                saison = \"basse\";\n            }\n\n\n            \/* Avril \/ Mai *\/\n\n            if (mois === 4 || mois === 5) {\n                prix = 75;\n                saison = \"moyenne\";\n            }\n\n\n            \/* Juin *\/\n\n            if (mois === 6) {\n\n                if (jour <= 14) {\n                    prix = 75;\n                    saison = \"moyenne\";\n                } else {\n                    prix = 90;\n                    saison = \"haute\";\n                }\n            }\n\n\n            \/* Juillet \/ Ao\u00fbt *\/\n\n            if (mois === 7 || mois === 8) {\n                prix = 90;\n                saison = \"haute\";\n            }\n\n\n            \/* Septembre *\/\n\n            if (mois === 9) {\n\n                if (jour <= 15) {\n                    prix = 90;\n                    saison = \"haute\";\n                } else {\n                    prix = 75;\n                    saison = \"moyenne\";\n                }\n            }\n\n\n            \/* Octobre *\/\n\n            if (mois === 10) {\n                prix = 75;\n                saison = \"moyenne\";\n            }\n\n\n            \/* Novembre *\/\n\n            if (mois === 11) {\n                prix = 70;\n                saison = \"basse\";\n            }\n\n\n            \/* D\u00e9cembre *\/\n\n            if (mois === 12) {\n\n                if (jour <= 19) {\n                    prix = 70;\n                    saison = \"basse\";\n                } else {\n                    prix = 90;\n                    saison = \"haute\";\n                }\n            }\n\n\n            \/* =====================================\n               WEEK-END\n               Vendredi soir + samedi soir\n               Dimanche soir = semaine\n               ===================================== *\/\n\n            if (jourSemaine === 5 || jourSemaine === 6) {\n\n                type = \"week-end\";\n\n                if (prix === 70) {\n                    prix = 80;\n                }\n\n                if (prix === 75) {\n                    prix = 85;\n                }\n            }\n\n\n            \/* =====================================\n               TOTAL DE LA LOCATION\n               ===================================== *\/\n\n            prixLocation += prix;\n\n\n            \/* =====================================\n               DETAIL\n               ===================================== *\/\n\n            const dateAffichee =\n                String(date.getDate()).padStart(2, \"0\") +\n                \"\/\" +\n                String(date.getMonth() + 1).padStart(2, \"0\") +\n                \"\/\" +\n                date.getFullYear();\n\n            let nomSaison = \"\";\n\n            if (saison === \"basse\") {\n                nomSaison = \"basse\";\n            }\n\n            if (saison === \"moyenne\") {\n                nomSaison = \"moyenne\";\n            }\n\n            if (saison === \"haute\") {\n                nomSaison = \"haute\";\n            }\n\n            detail +=\n                dateAffichee +\n                \" : \" +\n                nomSaison +\n                \" \/ \" +\n                type +\n                \" \/ \" +\n                prix +\n                \" \u20ac\\n\";\n\n\n            date.setDate(\n                date.getDate() + 1\n            );\n        }\n\n\n        \/* =========================================\n           FRAIS\n           ========================================= *\/\n\n        const menage = 30;\n\n        const taxe =\n            nuits *\n            personnes *\n            0.90;\n\n\n        \/* =========================================\n           TOTAL\n           ========================================= *\/\n\n        const total =\n            prixLocation +\n            menage +\n            taxe;\n\n\n        \/* =========================================\n           RESULTAT\n           ========================================= *\/\n\n        alert(\n            \"VOTRE ESTIMATION\\n\\n\" +\n\n            \"D\u00c9TAIL DES NUITS\\n\" +\n            \"-------------------------\\n\" +\n\n            detail +\n\n            \"\\n\" +\n\n            \"Location : \" +\n            prixLocation.toFixed(2) +\n            \" \u20ac\\n\" +\n\n            \"M\u00e9nage : \" +\n            menage.toFixed(2) +\n            \" \u20ac\\n\" +\n\n            \"Taxe de s\u00e9jour : \" +\n            taxe.toFixed(2) +\n            \" \u20ac\\n\\n\" +\n\n            \"TOTAL : \" +\n            total.toFixed(2) +\n            \" \u20ac\"\n        );\n\n    });\n\n}, 500);\n<\/script>\n\n<div id=\"simulateur-tarif\">\n\n  <h2>Calculer votre tarif<\/h2>\n\n  <div class=\"tarif-formulaire\">\n\n    <div class=\"champ-tarif\">\n      <label for=\"date-arrivee\">Date d'arriv\u00e9e<\/label>\n      <input type=\"date\" id=\"date-arrivee\">\n    <\/div>\n\n    <div class=\"champ-tarif\">\n      <label for=\"date-depart\">Date de d\u00e9part<\/label>\n      <input type=\"date\" id=\"date-depart\">\n    <\/div>\n\n    <div class=\"champ-tarif\">\n      <label for=\"nb-personnes\">Nombre de personnes<\/label>\n      <select id=\"nb-personnes\">\n        <option value=\"1\">1 personne<\/option>\n        <option value=\"2\">2 personnes<\/option>\n      <\/select>\n    <\/div>\n\n    <div class=\"champ-tarif\">\n      <label for=\"code-promo\">\n        Code promo <span>(facultatif)<\/span>\n      <\/label>\n      <input type=\"text\" id=\"code-promo\" inputmode=\"numeric\" maxlength=\"6\" placeholder=\"Code \u00e0 6 chiffres\">\n    <\/div>\n\n  <\/div>\n\n  <button type=\"button\" id=\"calculer-tarif\">\n    Calculer mon tarif\n  <\/button>\n\n  <div id=\"resultat-tarif\"><\/div>\n\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Ce simulateur propose une estimation. Il est en cours de construction et il reste des am\u00e9lioration \u00e0 apporter. Seul le tarif propos\u00e9 \u00e0 la suite de la prise de contact pr\u00e9vaut.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PAGE EN CONSTRUCTION Calculer votre tarif Date d&rsquo;arriv\u00e9e Date de d\u00e9part Nombre de personnes 1 personne2 personnes Code promo (facultatif) Calculer mon tarif Ce simulateur propose une estimation. Il est en cours de construction et il reste des am\u00e9lioration \u00e0 apporter. Seul le tarif propos\u00e9 \u00e0 la suite de la prise de contact pr\u00e9vaut.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"class_list":["post-919","page","type-page","status-publish","hentry"],"aioseo_notices":[],"featured_image_src":null,"_links":{"self":[{"href":"https:\/\/latourmedievale.fr\/index.php\/wp-json\/wp\/v2\/pages\/919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/latourmedievale.fr\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/latourmedievale.fr\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/latourmedievale.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/latourmedievale.fr\/index.php\/wp-json\/wp\/v2\/comments?post=919"}],"version-history":[{"count":62,"href":"https:\/\/latourmedievale.fr\/index.php\/wp-json\/wp\/v2\/pages\/919\/revisions"}],"predecessor-version":[{"id":982,"href":"https:\/\/latourmedievale.fr\/index.php\/wp-json\/wp\/v2\/pages\/919\/revisions\/982"}],"wp:attachment":[{"href":"https:\/\/latourmedievale.fr\/index.php\/wp-json\/wp\/v2\/media?parent=919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}