/* 
.widgets {
display: none;
}

.title {
padding-top: 20px;
}

.sortie-bloc {
display: flex;
}
*/

.widgets {
    width: 35%;
    float: right;
    margin: 30px 0 20px 30px;
    display: block;
    --widget-gradient: linear-gradient(60deg, #ff9800, #ff5722);

    & .widget {
        width: 100%;
        margin-bottom: 30px;
        position: relative;
        border: none;
        display: inline-block;
        background: var(--widget-gradient); /* Fond en dégradé pour tout le widget */
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Légère ombre pour un effet de profondeur */
        overflow: hidden; /* Pour que le contenu reste dans le widget */
        
        /* Suppression des pseudo-éléments qui ne sont plus nécessaires */
        &::before, &::after {
            display: none;
        }

        & .widget-title {
            text-align: center;
            letter-spacing: 3px;
            font-size: 14px;
            /* Pas de background, utilise le dégradé du parent */
            line-height: 3em;
            color: #fff; /* Séparation subtile */
            margin: 0;
            padding-top: 2px;
            font-weight: 500;
            text-transform: uppercase;
        }

        & .menu-search {
            padding: 15px;
            background: white; /* Fond blanc */
            color: #333; /* Texte en noir */
            margin: 0 5px 5px;
            border-radius: 4px;
            
            & input, 
            & select, 
            & .select2 {
                border: 1px solid lightgrey;
                margin-bottom: 5px;
            } 
        }
    }

    /* PLAYLIST */

    & .playlist-container {
        max-height: 300px;
        overflow-y: auto;
        counter-reset: playlist-counter;
        background: white; /* Fond blanc */
        margin: 0 5px 5px;
        border-radius: 4px;
    }

    & .video-item {
        cursor: pointer;
        transition: all 0.3s ease-in-out;
        position: relative;
        padding-left: 45px;

        &:hover {
        background-color: #f0f0f0;
        
        & h6 {
            color: #666;
        }
        }

        &.is-playing {
        background-color: #e9ecef;
        cursor: default;

        & .video-thumbnail {
            opacity: 1;
        }

        & .video-info h6 {
            color: #333;
            font-weight: 500;
        }

        &::before {
            /* color: var(--pico-primary); */
            font-weight: 500;
        }

        &:hover {
            background-color: #e9ecef;
        }
        }

        &::before {
        content: counter(playlist-counter);
        counter-increment: playlist-counter;
        position: absolute;
        left: 0;
        width: 35px;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        color: #999;
        font-weight: 300;
        }

        & h6 {
        font-weight: 300;
        color: #444;
        font-size: 0.9rem;
        transition: color 0.3s ease;
        }
    }

    & .video-item:hover {
        background-color: #f8f9fa;
    }

    & .video-thumbnail {
        width: 80px;
        flex: 0 0 80px;
        height: 45px; /* Ratio 16/9 pour 80px de large */
        overflow: hidden;
    }

    & .video-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }


    /* CARTE */

    .widget-map {
        /* display:none; */
        & .event-map {
            padding: 10px;
            background: white;
            color: #333;
            margin: 0 5px 5px;
            border-radius: 4px;

            & a:hover {
                text-decoration: none;
                color: orange;

                & h4 {
                    color: orange;
                }
            }
        }

        & .blockMap {
            overflow: hidden; 
            position: relative;
            background: white;
            margin: 0 5px 5px;
            border-radius: 4px;
        }

        & .blocFiltreCarte {
            display:block; 
            cursor: pointer;
            position:absolute;
            z-index: 500;
            right: 10px;
            top: 13px;
            background:white;
            padding: 5px 8px;
            border-radius: 3px;
            box-shadow: 0px 0px 3px 2px rgba(0, 0, 0, 0.2);

            & input[type="radio"] {
                &:checked + label {
                    font-weight: bold;
                }
            }
            
            & label {
                display:block;

                & .form-check-input[type="radio"] {display:none}

                /* Reinitialise class Bootstrap */
                & .form-check {
                    display:inline-block;
                    min-height: 0;
                    padding-left: 0;
                    margin-bottom: 0;
                }

                & .form-check-label {
                    display:none; 
                    padding-right: 7px; 
                    cursor: pointer; 
                    /* float: right; */ /* line-height: 21px; */
                }

                & img {
                    float: right;
                    cursor: pointer;
                    padding-top:4px;
                }

                & span {
                    float: right;
                    width: 4px;
                }
            }

            &:hover { 
                background: linear-gradient(to right, rgba(255,255,255,0.6) 0%,rgba(255,255,255,1) 70%,rgba(255,255,255,1) 100%);
                filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ccffffff', endColorstr='#ffffff',GradientType=1 );
                transition: all 0.3s ease;

                & .form-check-label {display:inline-block; }
            }
        }

        /* Styles pour les tooltips de la carte */
        & .map-tooltip {
            background-color: rgba(0, 0, 0, 0.8);
            border: none;
            border-radius: 4px;
            color: white;
            font-size: 14px;
            padding: 5px 10px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        & .map-tooltip::before {
            border-top-color: rgba(0, 0, 0, 0.8);
        }

        & .leaflet-tooltip-top:before {
            border-top-color: rgba(0, 0, 0, 0.8);
        }

        /* Effet de transition pour l'apparition */
        & .leaflet-tooltip {
            transition: opacity 0.2s ease;
        }

        /* Style spécifique pour notre tooltip */
        & .map-tooltip.leaflet-tooltip {
            white-space: nowrap;
            font-weight: 500;
        }
    }

    /* MOTS-CLES */

    & .category-filter {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
        margin: 0 5px 5px;
        text-align: center;
        padding: 15px 10px;
        background: white; /* Fond blanc */
        color: #333; /* Texte en noir */
        border-radius: 4px;

        & .radio-group {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 8px;
            width: 100%;
        }

        & .form-check { /* Debug Bootstrap */
            padding: 0;
            font-size: 14px;
            font-weight: 300;
            margin: 0;
        }

        & .radio-wrapper {
            display: inline-flex;
            align-items: center;
            margin: 0;
            transition: all 0.3s ease;
            position: relative;
            transform-origin: center;
            will-change: transform, box-shadow;
            z-index: 1;
            
            &:hover {
                transform: scale(1.08);
                z-index: 2;
            }
        }

        & input[type="radio"] {
            display: none;

            & + label {
                display: inline-block;
                cursor: pointer;
                padding: 5px 10px;
                border: 1px solid #ccc;
                white-space: nowrap;
                border-radius: 20px;
                font-size: 0.9rem;
                transition: all 0.3s ease;
                background: #fff;
                box-shadow: 0 1px 2px rgba(0,0,0,0.05);
            }

            &:checked + label {
                color: white;
                background: var(--widget-gradient);
                border-color: transparent;
                box-shadow: 0 2px 4px rgba(255, 121, 0, 0.3);
            }

            & + label:hover {
                border-color: #ff9800;
                box-shadow: 0 3px 6px rgba(0,0,0,0.1);
            }
        }

        /* font-size: 11px;
        font-weight: bold;
        padding: 10px;
        letter-spacing: 1.7px;
        text-align: justify;

        & input {display:none;}

        & label {
        display: inline-block;
        line-height: 23px;
        padding: 7px;
        margin-top: 10px;
        font-size:1.4em;
        border: 1px solid black;
        border-radius: 15px;
        } */

        /* & a {
        display: inline-block;
        line-height: 23px;
        padding-left: 7px;
        margin-top: 10px;
        border: 1px solid black;
        border-radius: 12px;
        overflow: hidden;

        & span {
            padding: 0 5px;
            margin-left: 5px;
            border-left: 1px solid;
            float: right;
        }
        }

        & a:hover {
        background: black;
        color: white;
        text-decoration: none;

        & span {
            background: white;
            color: black;
        }
        } */
    }
  
    .video-player {display:flex; margin-top:20px}


}

.video-player-container {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
    will-change: max-height, opacity;
    padding: 0 0.5rem;

    &.is-visible {
        max-height: 1500px;
        opacity: 1;
    }

    & .video-player-wrapper {
        transform: translateY(-20px);
        transition: transform 0.5s ease-in-out;
        will-change: transform;
        margin: 2rem auto;
        max-width: 800px;
        background-color: #fff;
        border-radius: 4px;
        box-shadow: 0 1px 3px #bbb;
        overflow: hidden;

        & .video-header {
            border-bottom: 1px solid #eee;
    
            & .video-title {
            text-align: center;
            
            & h6 {
                color: #666;
                font-weight: 500;
                letter-spacing: 0.5px;
            }
            }
        }
    
        & .ratio {
            background-color: #000;
        }
    
        & .video-description {
            border-top: 1px solid #eee;
    
            & h5 {
            font-size: 1rem;
            font-weight: 500;
            }
    
            & p {
            font-size: 0.9rem;
            line-height: 1.5;
            }
        }
    
        & .logo-date {
            margin-top: 10px;
        }
    }

    &.is-visible .video-player-wrapper {
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    .widgets {
        display: none;
    }
}


.widget-map .block-visual {
    height: 150px;
}

.leaflet-popup-content {
    margin:0 !important;
}

.leaflet-popup-content-wrapper {
    padding: 0 !important;;
}

.leaflet-container a.leaflet-popup-close-button {
    background: white !important;
    border-radius: 50%;
    z-index: 1000;
    top: -10px !important;
    right: -10px !important;
}

