/* Styles personnalisés pour la galerie */

/* Conteneur de la galerie */
.gallery-slider {
    margin: 0 -10px;
}

/* Éléments individuels de la galerie */
.single-gallery {
    position: relative;
    margin: 0 10px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.single-gallery:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Images de la galerie */
.single-gallery img {
    width: 100%;
    height: 250px; /* Hauteur fixe pour uniformiser */
    object-fit: cover; /* Maintient les proportions et remplit le conteneur */
    object-position: center; /* Centre l'image */
    transition: transform 0.3s ease;
}

.single-gallery:hover img {
    transform: scale(1.05);
}

/* Bouton de visualisation */
.view-gallery {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 140, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    opacity: 0;
    transition: all 0.3s ease;
    text-decoration: none;
}

.single-gallery:hover .view-gallery {
    opacity: 1;
}

.view-gallery:hover {
    background: rgba(255, 140, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .single-gallery img {
        height: 200px;
    }
    
    .gallery-slider {
        margin: 0 -5px;
    }
    
    .single-gallery {
        margin: 0 5px;
    }
    
    .view-gallery {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .single-gallery img {
        height: 180px;
    }
}

/* Amélioration des formes décoratives */
.gallery-shape-1,
.gallery-shape-2 {
    position: absolute;
    z-index: -1;
}

.gallery-shape-1 img,
.gallery-shape-2 img {
    width: 100%;
    height: auto;
    opacity: 0.1;
}

/* Animation pour le carousel */
.gallery-slider .owl-item {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.gallery-slider .owl-item.active {
    opacity: 1;
}

/* Navigation du carousel */
.gallery-slider .owl-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    pointer-events: none;
}

.gallery-slider .owl-nav button {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255, 140, 0, 0.9) !important;
    color: white !important;
    border-radius: 50%;
    font-size: 20px;
    transition: all 0.3s ease;
    pointer-events: all;
}

.gallery-slider .owl-nav button:hover {
    background: rgba(255, 140, 0, 1) !important;
    transform: scale(1.1);
}

.gallery-slider .owl-nav .owl-prev {
    left: -25px;
}

.gallery-slider .owl-nav .owl-next {
    right: -25px;
}

/* Points de navigation */
.gallery-slider .owl-dots {
    text-align: center;
    margin-top: 30px;
}

.gallery-slider .owl-dots .owl-dot {
    width: 12px;
    height: 12px;
    background: #ddd;
    border-radius: 50%;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.gallery-slider .owl-dots .owl-dot.active {
    background: #ff8c00;
    transform: scale(1.2);
}

/* Styles pour le popup d'image */
.image-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.image-popup-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.image-popup-overlay.active .image-popup-container {
    transform: scale(1);
}

.image-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: all 0.3s ease;
}

.image-popup-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.image-popup-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.image-popup-info {
    padding: 20px;
    background: white;
}

.image-popup-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.image-popup-description {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Responsive pour le popup */
@media (max-width: 768px) {
    .image-popup-container {
        max-width: 95%;
        max-height: 95%;
        margin: 20px;
    }
    
    .image-popup-image {
        max-height: 60vh;
    }
    
    .image-popup-close {
        width: 35px;
        height: 35px;
        font-size: 18px;
        top: 10px;
        right: 10px;
    }
    
    .image-popup-info {
        padding: 15px;
    }
    
    .image-popup-title {
        font-size: 16px;
    }
    
    .image-popup-description {
        font-size: 13px;
    }
}

/* Styles pour les images cliquables */
.gallery-image {
    cursor: pointer;
    position: relative;
}

.gallery-image img {
    cursor: pointer;
    transition: transform 0.3s ease;
    pointer-events: auto;
    user-select: none;
}

.gallery-image:hover img {
    transform: scale(1.05);
}

.gallery-image:hover {
    opacity: 0.9;
}
