Cette légende indienne
qui a révolutionné notre répertoire gestuel.
Yaniro
100,00€
Du nom de l’illustre grimpeur indien Tony Yaniro qui inventa le mouvement.
Coupe regular et genoux préformés, 2 poches avant + poche ticket, 1 poche arrière,
Double revers et cordon de serrage, Braguette à boutons, Magic Belt avec passants
Pour la grimpe et l’après grimpe.
Livraison estimée : mercredi 25 févr. - lundi 02 mars
Guide des tailles
<?php
<script>
(function () {
function runCalc(root) {
const h = parseInt(root.querySelector("#height")?.value, 10);
const w = parseInt(root.querySelector("#weight")?.value, 10);
if (!h || !w) return;
const sizes = ["XS","S","M","L","XL","XXL"];
const sizeData = [
{ fr:"34", waist:32, hip:48, thigh:31, legLength:95.5 },
{ fr:"36", waist:34, hip:50, thigh:32, legLength:98 },
{ fr:"38", waist:36, hip:52, thigh:33, legLength:100.5 },
{ fr:"40", waist:38, hip:54, thigh:34, legLength:103 },
{ fr:"42", waist:40, hip:56, thigh:35, legLength:105.5 },
{ fr:"44", waist:42, hip:58, thigh:36, legLength:107 }
];
let pivotIndex;
if (h < 170) pivotIndex = 1;
else if (h < 175) pivotIndex = 1;
else if (h < 180) pivotIndex = 2;
else if (h < 185) pivotIndex = 3;
else if (h < 190) pivotIndex = 4;
else pivotIndex = 5;
const weightRef = [55,63,71,83,88,96];
const delta = w - weightRef[pivotIndex];
let offset = delta / 10;
offset = Math.max(-1, Math.min(1, offset));
const left = sizes[Math.max(pivotIndex - 1, 0)];
const center = sizes[pivotIndex];
const right = sizes[Math.min(pivotIndex + 1, sizes.length - 1)];
root.querySelector("#size-left").innerText = left;
root.querySelector("#size-center").innerText = center;
root.querySelector("#size-right").innerText = right;
const cursor = root.querySelector("#cursor");
const position = 20 + (offset + 1) * 30;
cursor.style.left = position + "%";
let finalIndex = pivotIndex;
if (offset < -0.6 && pivotIndex > 0) finalIndex--;
if (offset > 0.6 && pivotIndex < sizes.length - 1) finalIndex++;
const finalSize = sizes[finalIndex];
const data = sizeData[finalIndex];
const correctedLegLength = (data.legLength + 3.5).toFixed(1);
root.querySelector("#final-size").innerHTML =
'👉 Taille Yaniro recommandée : <strong>' + finalSize + '</strong> (FR ' + data.fr + ')';
root.querySelector("#size-details").innerHTML = `
<div style="background:#f4f4f4;padding:12px;border-radius:8px;">
<strong>Mesures du pantalon :</strong><br>
Taille à plat : ${data.waist} cm<br>
Tour de bassin : ${data.hip} cm<br>
Cuisse : ${data.thigh} cm<br>
Longueur de jambe : ${correctedLegLength} cm
</div>
`;
root.querySelector("#result-block").style.display = "block";
}
// 1) Binding local (au cas où la lightbox stoppe la propagation)
function bindOneSimulator(root) {
if (root.dataset.yaniroBound === "1") return;
root.dataset.yaniroBound = "1";
const btn = root.querySelector("#calculate-btn");
if (!btn) return;
btn.addEventListener("click", function (e) {
e.preventDefault();
runCalc(root);
});
}
function bindAll() {
document.querySelectorAll(".yaniro-simulator").forEach(bindOneSimulator);
}
// 2) Observe l’apparition/remplacement du contenu (lightbox, ajax, clone)
const obs = new MutationObserver(function () {
bindAll();
});
obs.observe(document.documentElement, { childList: true, subtree: true });
// 3) En plus, écoute en CAPTURE (même si un script stoppe la propagation)
document.addEventListener("click", function (e) {
const btn = e.target.closest("#calculate-btn");
if (!btn) return;
const root = btn.closest(".yaniro-simulator");
if (!root) return;
e.preventDefault();
runCalc(root);
}, true);
// init
bindAll();
})();
</script>
















