/* 
 * EnviroGreen - Styles pour la galerie interactive
 */

/* Modal Gallery */
.modal-gallery {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-media-container {
    position: relative;
    width: 100%;
    height: 70vh;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.modal-media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: black;
    border-radius: 6px;
    overflow: hidden;
}

.modal-media img,
.modal-media video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.media-count {
    color: white;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
}

.modal-controls {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 2005;
}

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

.prev-slide:hover,
.next-slide:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-thumbnails {
    display: flex;
    overflow-x: auto;
    margin-top: 10px;
    gap: 10px;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.1);
}

.modal-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.modal-thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.modal-thumbnails::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
}

.thumbnail {
    min-width: 80px;
    height: 60px;
    background-color: #333;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    opacity: 0.6;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.thumbnail.active {
    opacity: 1;
    border: 2px solid var(--primary-color);
}

.thumbnail:hover {
    opacity: 0.9;
}

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

.thumbnail i {
    color: white;
    font-size: 24px;
}

/* Améliorations pour les galeries de services */
.service-gallery {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.service-gallery img,
.service-gallery video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.service-gallery img:hover,
.service-gallery video:hover {
    transform: translateY(-5px);
    filter: brightness(1.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    background-color: #000;
    grid-column: span 2;
}

.video-thumbnail::before {
    content: '\f144';
    font-family: 'Font Awesome 5 Free';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    opacity: 0.8;
    z-index: 10;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
}

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

@media (max-width: 991px) {
    .video-thumbnail {
        grid-column: span 1;
    }
}

.video-thumbnail:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}
