Trouver une chambre
Home » Trouver une chambre

Trouver une Chambre à Stayinhue.com – Homestay Jardin à Hué

<script type="application/ld+json">
{
    "@context": "https://schema.org",
    "@type": "LodgingBusiness",
    "name": "Stayinhue.com",
    "description": "Un homestay jardin à Hué, Vietnam, offrant des chambres privées avec balcons et vues sur le jardin fruitier.",
    "address": {
        "@type": "PostalAddress",
        "addressLocality": "Hue, Vietnam",
        "addressRegion": "Thua Thien Hue",
        "addressCountry": "VN"
    },
    "priceRange": "300,000-900,000 VND par nuit"
}
</script>

<link href="https://fonts.googleapis.com/css2?family=Georgia&display=swap" rel="stylesheet">
<style>
    /* Custom CSS Variables */
    :root {
        --primary-brown: #5D4037;   /* Nâu óc chó */
        --dark-brown: #3E2723;      /* Nâu đậm hơn */
        --light-cream: #FFF8E1;     /* Kem nhạt */
        --beige: #F5F5DC;           /* Be */
        --light-grey-brown: #D7CCC8;/* Xám nâu nhạt */
        --extra-light-cream: #F8F4E8;/* Kem rất nhạt */
        --border-grey: #E0E0E0;     /* Xám biên */
        --text-hint: #8D6E63;       /* Gợi ý màu chữ */

        /* Colors for buttons */
        --green-success: #4CAF50;
        --green-success-hover: #45a049;
        --red-error: #dc3545;
        --red-error-hover: #c82333;
        --booking-blue: #007bff;
        --booking-blue-hover: #0056b3;
        --facebook-blue: #1877F2;
        --facebook-blue-hover: #166FE5;
        --details-brown: #5D4037;
        --details-brown-hover: #795548;
    }

    /* General Body Styles */
    body {
        font-family: 'Georgia', serif;
        line-height: 1.6;
        margin: 0;
        padding: 0;
        background-color: var(--beige);
        color: var(--dark-brown);
    }

    /* Container for overall layout */
    .container {
        max-width: 960px;
        margin: 20px auto;
        padding: 15px;
        background: var(--light-cream);
        border-radius: 12px;
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--light-grey-brown);
        box-sizing: border-box;
    }

    h1 {
        text-align: center;
        color: var(--primary-brown);
        margin-bottom: 30px;
        font-size: 2.2em;
        font-weight: bold;
    }

    /* Filter Section Styles */
    .form-section {
        background-color: var(--extra-light-cream);
        padding: 25px;
        border-radius: 12px;
        margin-bottom: 40px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
        border: 1px solid var(--light-grey-brown);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .form-group {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 300px;
        margin-bottom: 0;
    }

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: bold;
        color: var(--primary-brown);
        font-size: 1.05em;
    }

    input[type="number"] {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid var(--border-grey);
        border-radius: 8px;
        font-size: 1em;
        background-color: #fff;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        cursor: pointer;
        box-sizing: border-box;
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

    input[type="number"]:focus {
        border-color: var(--primary-brown);
        outline: none;
        box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.15);
    }

    /* Specific style for the main search button */
    .btn-search {
        display: block;
        width: 100%;
        max-width: 300px;
        padding: 15px;
        background-color: var(--green-success);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 1.15em;
        font-weight: bold;
        cursor: pointer;
        transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        margin-top: 10px;
    }

    .btn-search:hover {
        background-color: var(--green-success-hover);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }

    #no-results {
        text-align: center;
        color: var(--red-error);
        font-size: 1.1em;
        margin-top: 30px;
        font-weight: bold;
        background-color: #FFEBEE;
        padding: 20px;
        border-radius: 10px;
        border: 1px solid #EF9A9A;
        display: none;
    }

    /* Room List Styles */
    #room-listings {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
        margin-top: 30px;
        align-items: stretch;
    }

    /* Room Card Styles */
    .room-card {
        background-color: #fff;
        border: 1px solid var(--border-grey);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .room-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }

    .room-card img {
        width: 100%;
        height: 220px;
        object-fit: cover;
        display: block;
        border-bottom: 1px solid var(--border-grey);
    }

    .room-card-content {
        padding: 20px;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    .room-card h3 {
        color: var(--primary-brown);
        font-size: 1.5em;
        margin: 0 0 10px 0;
        text-align: center;
    }

    .room-card p {
        padding: 0;
        margin-bottom: 8px;
        font-size: 1em;
        color: var(--dark-brown);
    }

    .room-card p.note {
        font-style: italic;
        font-size: 0.9em;
        color: var(--text-hint);
        margin-top: 5px;
        margin-bottom: 15px;
        flex-grow: 1;
    }

    .room-card p.price {
        font-weight: bold;
        color: #E67E22;
        font-size: 1.25em;
        margin-top: 15px;
        padding-top: 15px;
        padding-bottom: 0;
        border-top: 1px solid var(--border-grey);
        text-align: center;
    }

    /* Room Action Buttons (inside each room card) */
    .room-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: auto;
        padding: 0;
        background-color: transparent;
        border-top: none;
    }

    .room-actions a {
        display: block;
        padding: 12px 15px;
        text-align: center;
        border-radius: 25px;
        text-decoration: none;
        font-weight: bold;
        font-size: 1em;
        transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .room-details-btn {
        background-color: var(--details-brown);
        color: #fff;
        border: none;
    }
    .room-details-btn:hover {
        background-color: var(--details-brown-hover);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    }

    .booking-btn {
        background-color: var(--booking-blue);
        color: white;
        border: none;
    }

    .booking-btn:hover {
        background-color: var(--booking-blue-hover);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    }

    .facebook-btn {
        background-color: var(--facebook-blue);
        color: #fff;
        border: none;
    }

    .facebook-btn:hover {
        background-color: var(--facebook-blue-hover);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    }

    /* Responsive Adjustments */
    @media (max-width: 768px) {
        .container {
            padding: 10px;
        }

        h1 {
            font-size: 1.8em;
        }

        .form-section {
            padding: 20px 15px;
        }

        .form-group {
            max-width: 100%;
        }

        .btn-search {
            max-width: 100%;
            padding: 12px;
            font-size: 1.05em;
        }

        #room-listings {
            grid-template-columns: 1fr;
            gap: 20px;
        }

        .room-card img {
            height: 200px;
        }

        .room-card-content {
            padding: 15px;
        }

        .room-card h3 {
            font-size: 1.3em;
        }

        .room-card p {
            font-size: 0.95em;
        }

        .room-card p.price {
            font-size: 1.2em;
        }

        .room-actions {
            gap: 10px;
        }

        .room-actions a {
            width: 100%;
            padding: 10px 12px;
            font-size: 0.95em;
        }
    }

    @media (min-width: 769px) {
        .room-actions {
            flex-direction: row;
            justify-content: center;
            flex-wrap: wrap;
        }
        .room-actions a {
            flex-grow: 0;
            width: auto;
            min-width: 150px;
        }
    }
</style>

Trouver votre Chambre Idéale à Stayinhue.com – Homestay Jardin à Hué

    <div class="form-section">
        <div class="form-group">
            <label for="num-people">Nombre de personnes :</label>
            <input type="number" id="num-people" name="num-people" min="1" value="1">
        </div>
        <button class="btn-search" onclick="filterRooms()">Trouver une chambre</button>
    </div>

    <div id="no-results">
        Désolé, aucune chambre ne correspond à votre demande. Veuillez réessayer avec d'autres critères !
    </div>

    <div id="room-listings">
        <!-- Room cards will be rendered here by JavaScript -->
    </div>
</div>

<script>
const allRoomsData = [
    {
        name: "Chambre Galilée",
        minPeople: 4,
        maxPeople: 4,
        basePrice: 650000,
        description: "Chambre pour <strong>4 personnes</strong>, avec 2 lits doubles, au rez-de-chaussée avec balcon privé, vue sur les champs et le jardin.",
        note: "",
        image: "https://stayinhue.com/wp-content/uploads/2025/05/1-1.png",
        pageLink: "/phong-galilee-phong-2-giuong-doi-4-nguoi-view-canh-dong" // Keep original link for now
    },
    {
        name: "Chambre Jéricho",
        minPeople: 1,
        maxPeople: 2,
        basePrice: 450000,
        description: "Chambre pour <strong>1-2 personnes</strong>, au 2ème étage, balcon privé, table haute, fauteuil individuel, vue sur le verger (sưa, prunier, manguier).",
        note: "",
        image: "https://stayinhue.com/wp-content/uploads/2025/05/1.png",
        pageLink: "/phong-jericho-giuong-don-2-nguoi-view-vuon-cay" // Keep original link for now
    },
    {
        name: "Chambre Calvaire",
        minPeople: 4,
        maxPeople: 4,
        basePrice: 600000,
        description: "Chambre pour <strong>4 personnes</strong>, 2 lits doubles, très grand balcon privé, table haute, vue imprenable sur le jardin.",
        note: "",
        image: "https://stayinhue.com/wp-content/uploads/2025/05/1-2.png",
        pageLink: "/phong-calvary-4-nguoi-view-san-vuon" // Keep original link for now
    },
    {
        name: "Chambre Liban",
        minPeople: 1,
        maxPeople: 2,
        basePrice: 350000,
        description: "Chambre pour <strong>1-2 personnes</strong>, petite, confortable et privée, avec fenêtre donnant sur la prairie et la bambouseraie.",
        note: "",
        image: "https://stayinhue.com/wp-content/uploads/2025/05/1-3.png",
        pageLink: "/phong-liban-phong-don-2-nguoi-nho-am-ap-va-xinh-xan-view-dong-co" // Keep original link for now
    },
    {
        name: "Bungalow Ruche",
        minPeople: 1,
        maxPeople: 2,
        basePrice: 300000,
        description: "Chambre pour <strong>2 personnes/nid</strong>, design unique, située séparément dans le jardin, proche de la nature avec vue sur le lac et la bambouseraie.",
        note: "",
        image: "https://stayinhue.com/wp-content/uploads/2025/05/1-4.png",
        pageLink: "/bungalow-to-ong-phong-2-nguoi-to-doc-dao-gan-thien-nhien-ma-tien-nghi" // Keep original link for now
    }
];

function formatCurrency(amount) {
    return amount.toLocaleString('fr-FR', { style: 'currency', currency: 'VND' }) + '/nuit';
}

function renderRooms(roomsToRender) {
    const roomListings = document.getElementById('room-listings');
    roomListings.innerHTML = '';
    const noResultsDiv = document.getElementById('no-results');

    if (roomsToRender.length === 0) {
        noResultsDiv.style.display = 'block';
    } else {
        noResultsDiv.style.display = 'none';
        roomsToRender.forEach(room => {
            const roomCard = document.createElement('div');
            roomCard.className = 'room-card';
            roomCard.setAttribute('data-min-people', room.minPeople);
            roomCard.setAttribute('data-max-people', room.maxPeople);
            roomCard.setAttribute('data-base-price', room.basePrice);
            roomCard.setAttribute('data-name', room.name);

            let priceText = formatCurrency(room.basePrice);

            roomCard.innerHTML = `
                <img src="${room.image}" alt="Chambre ${room.name} à Stayinhue.com, homestay jardin à Hué">
                <div class="room-card-content">
                    <h3>${room.name}</h3>
                    <p>${room.description}</p>
                    ${room.note ? `<p class="note">${room.note}</p>` : ''}
                    <p class="price">${priceText}</p>
                    <div class="room-actions">
                        <a href="${room.pageLink}" class="room-details-btn">Voir les détails de la chambre</a>
                        <a href="https://www.booking.com/hotel/vn/mehome.vi.html" class="booking-btn" target="_blank" rel="noopener noreferrer">Réserver via Booking</a>
                    </div>
                </div>
            `;
            roomListings.appendChild(roomCard);
        });
    }
}

function filterRooms() {
    const numPeople = parseInt(document.getElementById('num-people').value);

    let filteredRooms = [];

    if (numPeople >= 1 && numPeople <= 2) {
        filteredRooms = allRoomsData.filter(room => 
            room.name === "Chambre Liban" || 
            room.name === "Chambre Jéricho" || 
            room.name === "Bungalow Ruche"
        );
    } else if (numPeople >= 3 && numPeople <= 5) {
        filteredRooms = allRoomsData.filter(room => 
            room.name === "Chambre Galilée" || 
            room.name === "Chambre Calvaire" || 
            room.name === "Bungalow Ruche"
        );
    }

    renderRooms(filteredRooms);
}

document.addEventListener('DOMContentLoaded', () => {
    filterRooms(); // Call filterRooms on load to display initial filtered set based on default value
});
</script>