/* Styles pour la page individuelle d'hébergement */
.gite-content {
    display: flex;
    margin-top: 20px;
    gap: 30px;
    flex-direction: row; /* Par défaut en ligne pour desktop */
    align-items: stretch;
}

.gallery-container {
    width: 60%;
}

.gallery-container,
.gite-description {
    height: auto;
    display: flex;
    flex-direction: column;
}

.slider-container {
    flex-grow: 1;
    height: 100%;
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
    pointer-events: none;
}

.prev-btn,
.next-btn {
    pointer-events: auto;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.prev-btn:hover,
.next-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.thumbnail {
    width: 100px;
    min-width: 100px;
    height: 70px;
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
}

.thumbnail.active {
    border-color: #6BA9C7;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gite-equipments {
    width: 100%;
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex-wrap: nowrap; /* Par défaut pas de retour à la ligne */
}

.item-equipment>i {
    padding-right: 10px;
}

.gite-description {
    width: 40%;
    padding: 20px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gite-description h1 {
    color: #333;
    margin-bottom: 15px;
    font-size: 28px;
}

.gite-description p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

.price-container {
    margin: 20px 0;
    padding: 15px;
    background-color: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.book-btn {
    background-color: #6BA9C7;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.book-btn:hover {
    background-color: #5a98b6;
}

/* Media queries pour l'affichage mobile */
@media (max-width: 767px) {
    .gite-content {
        flex-direction: column; /* Empiler les éléments en colonne sur mobile */
        gap: 20px;
    }
    
    .gallery-container {
        width: 100%; /* Pleine largeur sur mobile */
    }
    
    .gite-description {
        width: 100%; /* Pleine largeur sur mobile */
    }
    
    .gite-equipments {
        flex-wrap: wrap; /* Permettre le retour à la ligne sur mobile */
        gap: 15px;
    }
    
    .item-equipment {
        width: 45%; /* Deux éléments par ligne */
        margin-bottom: 10px;
    }
    
    .price-container {
        flex-direction: column; /* Empiler prix et bouton sur mobile */
        gap: 15px;
    }
    
    .price {
        font-size: 20px; /* Réduire légèrement la taille du texte */
    }
    
    .book-btn {
        width: 100%; /* Bouton pleine largeur */
        text-align: center;
    }
    
    .thumbnails {
        justify-content: flex-start; /* Aligner les miniatures à gauche */
    }
    
    .thumbnail {
        width: 80px; /* Réduire légèrement la taille des miniatures */
        min-width: 80px;
        height: 60px;
    }

    .zoom-icon {
        opacity: 1 !important;
    }

    .slider-container {
        height: 200px !important;
    }
}

/* Pour les très petits écrans */
@media (max-width: 480px) {
    .item-equipment {
        width: 100%; /* Un élément par ligne sur très petit écran */
    }
    
    .gite-equipments {
        padding: 15px 10px;
    }
}

/* Lightbox styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox .lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
    z-index: 1001;
}

.lightbox.visible {
    opacity: 1;
    visibility: visible;
}

.lightbox.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Boutons de navigation dans la lightbox */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: background-color 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Icône de loupe sur les images */
.zoom-icon {
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-size: 20px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.slide {
    position: relative;
}

.slider-container:hover .zoom-icon {
    opacity: 1;
}