/* CSS Custom - Web Ad Banner Style Transparent Modal Popup */

.charte-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4); /* Transparent pour voir la page en arrière-plan */
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
}

.charte-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Boîte style Pub / Ad Popup ajustée exactement à la taille de l'image */
.charte-modal-container {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.charte-modal-overlay.active .charte-modal-container {
    transform: scale(1);
}

/* Bouton Fermer à l'intérieur de l'image en haut à droite (Style Pub Web) */
.charte-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100000;
    transition: all 0.2s ease;
    outline: none;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.charte-modal-close:hover {
    background: #e74c3c;
    border-color: #e74c3c;
    transform: scale(1.1) rotate(90deg);
}

/* Zone du slider */
.charte-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 85vh;
}

.charte-slides-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 85vh;
}

.charte-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.charte-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

/* L'image définit directement les dimensions du popup ad */
.charte-slide img {
    max-width: 90vw;
    max-height: 84vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    user-select: none;
    -webkit-user-drag: none;
}

/* Flèches de navigation ancrées À L'INTÉRIEUR de l'image (Gauche / Droite) */
.charte-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100000;
    transition: all 0.2s ease;
    outline: none;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.charte-slider-nav:hover {
    background: #00bcd4;
    border-color: #00bcd4;
    transform: translateY(-50%) scale(1.1);
}

.charte-slider-nav.prev {
    left: 10px;
}

.charte-slider-nav.next {
    right: 10px;
}

/* Dots indicateurs ancrés en bas à L'INTÉRIEUR de l'image */
.charte-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 12px;
    border-radius: 15px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.charte-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.charte-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.charte-dot.active {
    width: 20px;
    border-radius: 6px;
    background: #00bcd4;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .charte-modal-close {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
    }

    .charte-slider-nav {
        width: 34px;
        height: 34px;
    }

    .charte-slider-nav.prev {
        left: 6px;
    }

    .charte-slider-nav.next {
        right: 6px;
    }

    .charte-slide img {
        max-width: 94vw;
        max-height: 80vh;
    }

    .charte-dots {
        bottom: 8px;
    }
}
