Oasis, Casablanca
45 000 MAD/mois
Caractéristiques
Description
Villa commerciale a louer sur quartier Oasis, rue des papillons. Caractéristiques : - Terrain : 460 m² - Surface habitable : 250 m² - Villa sur 3 niveaux - 4 Salles de bain - Terrasse document.addEventListener(`DOMContentLoaded`,function(){let e=document.getElementById(`voir-plus`),t=document.querySelector(`.label`);e.addEventListener(`change`,function(){e.checked||t.scrollIntoView({behavior:`smooth`})})}); proposée par : UNES BELK Agence immobilière à Casablanca Localisation Normal Satellite Information financières Commission d'agent : 1 Mois de loyer HT --> --> Annonces Similaires Il y a 3 mois 27 000 DH / mois 3 Ch 2 sdb 500 m² Villa à louer Casablanca -Franceville Annonce par : Cantarel Immobilier Il y a 4 mois 30 000 DH / mois 3 Ch 2 sdb 355 m² Villa à louer Casablanca -Franceville Annonce par : Cantarel Immobilier (function(){const id = ""; const similarLen = 2; document.addEventListener("DOMContentLoaded", function () { const carousel = document.getElementById(`Cards-Container${id}`); const arrows = document.getElementById(`arrowsId${id}`); const indicators = document.getElementById(`indicators${id}`); // const prevStroke = document.getElementById(`prev-stroke${id}`); const nextButtons = document.querySelectorAll(`.next-btn${id}`); const prevButtons = document.querySelectorAll(`.prev-btn${id}`); if (!carousel) return; /* Card #4103 — measure the real card "step" (card width + gap) * by reading the two first children's offsetLeft. Falls back to * the first child's offsetWidth if there's only one card. This is * what makes the arrow navigation actually land on card edges * instead of being off by the gap. */ let currentIndex = 0; const cardWidth = carousel.firstElementChild?.offsetWidth || 320; const measureStep = () => { const first = carousel.children[0]; const second = carousel.children[1]; if (!first || !(first instanceof HTMLElement)) return cardWidth; if (second && second instanceof HTMLElement) { const delta = second.offsetLeft - first.offsetLeft; if (delta > 0) return delta; } return first.offsetWidth || cardWidth; }; let step = measureStep(); /* maxScroll is the true end of the scroll container. The card- * counted maxIndex is derived from it so the last "next" click * lands at scrollLeft = maxScroll and the final card sits fully * inside the viewport, no partial visibility. */ const getMaxScroll = () => Math.max(0, carousel.scrollWidth - carousel.clientWidth); let maxScroll = getMaxScroll(); let maxIndex = step > 0 ? Math.ceil(maxScroll / step) : 0; const maxDots = 5; const isRTL = getComputedStyle(carousel).direction === "rtl"; const recompute = () => { step = measureStep(); maxScroll = getMaxScroll(); maxIndex = step > 0 ? Math.ceil(maxScroll / step) : 0; }; const updateArrowsVisibility = () => { if (!arrows || !carousel) return; arrows.style.visibility = maxScroll > 0 ? "visible" : "hidden"; }; /* Dots window over the VALID scroll positions [0, maxIndex], * not over similarLen. Showing more dots than reachable positions * was the source of the "active dot stuck on an earlier position" * bug for cards = N where N - visibleCards maxDots and there's more content beyond an edge, * the dots closest to that edge shrink (1.0 → 0.7 → 0.5) so the * user gets a visual "there's more in this direction" cue without * the dot strip itself growing. */ const updateIndicators = () => { if (!indicators) return; const dots = indicators.querySelectorAll(".dot-indicator"); const pageCount = maxIndex + 1; // number of valid scroll positions let startDot = 0; if (pageCount > maxDots) { const half = Math.floor(maxDots / 2); if (currentIndex = pageCount - half - 1) { startDot = pageCount - maxDots; } else { startDot = currentIndex - half; } } const endDot = startDot + maxDots - 1; const overflowsAtStart = pageCount > maxDots && startDot > 0; const overflowsAtEnd = pageCount > maxDots && endDot { const actualIndex = startDot + dotPosition; const isVisible = actualIndex { if (!carousel) return; recompute(); currentIndex = Math.max(0, Math.min(index, maxIndex)); /* The container has `scroll-snap-type: x mandatory` and the cards * default to start-aligned snap. If we just scrollTo(maxScroll) * the browser snaps back to the PREVIOUS card's left edge when * maxScroll isn't an exact multiple of `step` — that's what * leaves the last card partially hidden behind the gap. * * For the final index, pin the LAST card's inline-end edge to * the container's inline-end edge via scrollIntoView. That * overrides snap proximity and guarantees full visibility of * the last card, no matter the gap or padding-right. */ if ( currentIndex >= maxIndex && maxIndex > 0 && carousel.children.length > 0 ) { const lastCard = carousel.children[carousel.children.length - 1]; if (lastCard instanceof HTMLElement) { lastCard.scrollIntoView({ inline: isRTL ? "start" : "end", block: "nearest", behavior: smooth ? "smooth" : "auto", }); } else { carousel.scrollTo({ left: maxScroll, behavior: smooth ? "smooth" : "auto", }); } } else { const scrollLeft = Math.min(currentIndex * step, maxScroll); carousel.scrollTo({ left: scrollLeft, behavior: smooth ? "smooth" : "auto", }); } updateIndicators(); prevButtons.forEach((btn) => { btn.style.display = currentIndex > 0 ? 'flex' : 'none'; }); // Hide next button when there are no more cards to scroll to. nextButtons.forEach((btn) => { btn.style.display = currentIndex { if (!carousel) return; // In RTL, browsers report scrollLeft as a negative value (or inverted), // so take the absolute distance from the start edge. const scrollPosition = Math.abs(carousel.scrollLeft); /* If the user dragged all the way to maxScroll, snap the index * to maxIndex even if scrollPosition / step rounds short. */ if (maxScroll > 0 && scrollPosition >= maxScroll - 1) { currentIndex = maxIndex; } else { currentIndex = step > 0 ? Math.round(scrollPosition / step) : 0; } currentIndex = Math.max(0, Math.min(currentIndex, maxIndex)); updateIndicators(); prevButtons.forEach((btn) => { btn.style.display = currentIndex > 0 ? 'flex' : 'none'; }); // Hide next button when there are no more cards to scroll to. nextButtons.forEach((btn) => { btn.style.display = currentIndex { if (resizeRaf) return; resizeRaf = requestAnimationFrame(() => { resizeRaf = 0; recompute(); updateArrowsVisibility(); updateIndicators(); if (currentIndex > maxIndex) { scrollToIndex(maxIndex, false); } else { // Re-evaluate next/prev visibility against the fresh maxIndex. prevButtons.forEach((btn) => { btn.style.display = currentIndex > 0 ? "flex" : "none"; }); nextButtons.forEach((btn) => { btn.style.display = currentIndex window.removeEventListener("resize", onResize), { once: true }, ); carousel.addEventListener("scroll", handleScroll); nextButtons.forEach((button) => { button.addEventListener("click", () => { scrollToIndex(currentIndex + 1); }); }); prevButtons.forEach((button) => { button.addEventListener("click", () => { scrollToIndex(currentIndex - 1); }); }); if (indicators) { const dots = indicators.querySelectorAll(".dot-indicator"); dots.forEach((dot) => { dot.addEventListener("click", () => { const index = parseInt(dot.dataset.index || "0"); scrollToIndex(index); }); }); } carousel.addEventListener("keydown", (e) => { if (e.key === "ArrowLeft") { scrollToIndex(currentIndex - 1); } else if (e.key === "ArrowRight") { scrollToIndex(currentIndex + 1); } }); scrollToIndex(0, false); }); })(); document.addEventListener(`DOMContentLoaded`,function(){let e=document.getElementById(`Cards-Containerannonces_one`),t=document.getElementById(`prev-strokeannonces_one`),n=document.getElementsByClassName(`next-btnannonces_one`),r=document.getElementsByClassName(`prev-btnannonces_one`),i=0,a=e=>{e 0?t.setAttribute(`stroke`,`#00111A`):t.setAttribute(`stroke`,`#A3A9AD`))};n[0]&&(n[0].addEventListener(`click`,()=>{i {a(-1),e.scrollBy({top:0,left:-227,behavior:`smooth`})}))}); document.addEventListener(`DOMContentLoaded`,function(){let e=document.getElementById(`Cards-Containerannonces_two`),t=document.getElementById(`prev-
Localisation
Position approximative
Annonces similaires
45 000 MAD/mois
Villa · 5 ch
Val d'Anfa, Casablancail y a 4 mois