﻿.mythumb {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    border: 4px solid white;
    margin: 0;
    min-height: 136px;
    width: 100%;
    height: 100%;
}

    .mythumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .mythumb:hover img {
        transform: scale(1.05);
    }

    /* Effet shimmer pour le chargement des miniatures */
    .mythumb::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(110deg, #222 8%, #333 18%, #222 33%);
        background-size: 200% 100%;
        animation: shimmer 1.5s linear infinite;
        border-radius: 6px;
    }

    /* Quand l'image est chargée, on masque le fond animé */
    .mythumb.loaded::before {
        display: none;
    }

    /* Transition douce quand la miniature apparaît */
    .mythumb img {
        opacity: 0;
        transition: opacity 0.5s ease;
        transition: all 0.8s ease-in-out;
    }

    .mythumb.loaded img {
        opacity: 1;
    }

    .mythumb .info {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(0,0,0,0.9);
        color: #fff;
        padding: 4px;
        font-size: 1em;
        text-align: center;
        opacity: 0.4;
        font-weight: 300;
        transition: opacity 0.8s;
        /* transition: all 0.8s ease-in-out;*/
    }

        .mythumb .info.top {
            bottom: auto;
            top: 0;
        }

    .mythumb:hover .info {
        font-weight: 600;
        opacity: 1;
    }

    .mythumb .info strong {
        display: block;
        color: #fff;
    }

    .mythumb .action-btn {
        position: absolute;
        top: 6px;
        right: 6px;
        background: rgba(0, 0, 0, 0.9);
        color: white;
        border: none;
        border-radius: 50%;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        opacity: 1;
        transition: opacity 0.3s, background 0.3s;
        font-size: 16px;
        z-index: 2000;
    }

        .mythumb .action-btn.topleft {
            left: 6px;
        }

@keyframes shimmer {
    100% {
        background-position-x: -200%;
    }
}


.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    flex-direction: column;
}

    .lightbox img {
        max-width: 100%;
        max-height: 100%;
        /* margin-bottom: 10px; */
        border: 8px solid white;
    }

    .lightbox .basket {
        position: absolute;
        bottom: 15px; /* 3px au-dessus de la bordure */
        left: 12px;
        right: 12px;
        text-align: center;
        background: rgba(0,0,0,0.5); /* fond semi-transparent */
        color: #fff;
        padding: 6px 12px;
        font-size: 28px;
        backdrop-filter: blur(4px); /* effet verre dépoli */
        pointer-events: none; /* ne bloque pas les clics sur l’image */
        transition: all 0.25s ease-in-out;
        opacity: 1;
    }



        .lightbox .basket.hide {
            opacity: 0;
            /*display:none;*/
        }

        .lightbox .basket.ok {
            background: rgba(0,255,0,0.7);
        }

        .lightbox .basket.ko {
            background: rgba(255,0,0,0.7);
        }

    .lightbox .title.hide {
        display: none;
    }


div.hide, .lightbox.hide {
    display: none;
}

/* On ajoute un conteneur autour de l'image */
.image-wrapper {
    position: relative;
    display: inline-block;
    border: 8px solid transparent;
    max-width: 90%;
    max-height: 80%;
}

/* Spinner stylisé avec fondu */
.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 8px solid rgba(63,169,245,0.2);
    border-top: 8px solid #3fa9f5;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    box-shadow: 0 0 20px #3fa9f5;
    opacity: 0;
    transition: opacity 0.3s;
}

    .spinner.show {
        opacity: 1;
    }

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
    color: #fff;
    background: rgba(0,0,0,0.4);
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    user-select: none;
    z-index: 2500;
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.close {
    position: absolute;
    top: 120px;
    right: 20px;
    font-size: 2em;
    cursor: pointer;
    color: #fff;
    z-index: 2500;
}

.geo p {
    margin: 6px 0 8px 0;
    color: gray;
}

.geo iframe {
    width: 100%;
    border: 2px solid black;
    height: 200px;
}

/* SPINNER Tournant */
.xspinner {
    width: 26px;
    height: 26px;
    border: 3px solid rgba(0, 255, 0, 0.3);
    border-top-color: green; /* partie visible */
    border-radius: 50%;
    animation: xspin 1s linear infinite;
    float:left;
    margin-right:6px;
}

/* Animation rotation */
@keyframes xspin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* Sélecteur sombre par défaut */
select.modern-select {
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    height: calc(6 * 1.8em);
    background-color: #1e1e1e; /* fond sombre principal */
    color: #f2f2f2;
    border: 0px solid #444;
    border-radius: 8px;
    padding: 10px 6px 10px 9px;
    margin: 4px 0 12px 0;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    outline: none;
    /* effet subtil de relief */
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* Mobile : enlever la hauteur forcée pour que la liste fonctionne */
@media (max-width: 600px) {
    select.modern-select {
        height: auto;
        line-height: normal;
    }
}
/* Survol */
select .modern-select:hover {
    border-color: #3fa9f5;
    box-shadow: 0 0 6px rgba(63,169,245,0.3);
}

}
/* Focus (clic ou navigation clavier) */
select.modern-select:focus {
    border-color: #3fa9f5;
    box-shadow: 0 0 0 3px rgba(63,169,245,0.35);
}

/* Désactivé */
select.modern-select:disabled {
    background-color: #333;
    color: #777;
    cursor: not-allowed;
    border-color: #333;
}

/* Options internes (dans le menu déroulant) */
select.modern-select option {
    padding: 4px;
    border-radius: 3px;
    background-color: #1e1e1e;
    color: #f2f2f2;
}

    /* Option survolée (certains navigateurs la prennent en compte) */
    select.modern-select option:hover {
        background-color: var(--nav-hover-color);
    }

    /* Style de l'option sélectionnée (quand le menu est ouvert) */
    select.modern-select option:checked {
        background-color: #3fa9f5; /* bleu VideoCiel */
        color: #0f1724; /* texte sombre sur fond bleu */
        font-weight: 600;
    }
