.block-carrousel {
    width: 100%;
    max-width: 80% !important;
    position: relative;
    margin: 2rem 0;
    padding: 0 30px;
}

.carrousel-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.carrousel-titre {
    font-size: 2rem;
    margin: 0;
    padding: 0;
    position: relative;
    display: inline-block;
    font-weight: 600;
}

.carrousel-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y; 
}

.carrousel-track {
    width: 100%;
    overflow: hidden;
    position: relative;
    cursor: grab; 
}

.carrousel-track:active {
    cursor: grabbing;
}

.carrousel-items {
    display: flex;
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.carrousel-items.dragging {
    transition: none;
}

.carrousel-item {
    flex: 0 0 auto;
    margin-right: var(--wp--preset--spacing--70);
    position: relative;
    width: 380px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.carrousel-image {
    width: 100%;
    height: 410px;
    object-fit: cover;
    display: block;
    pointer-events: all;
    cursor: pointer;
}

/* position des flèches en bas à gauche */
.carrousel-navigation {
    display: flex;
    justify-content: space-between;
    padding: var(--wp--preset--spacing--60) 0;
}

.carrousel-nav {
    display: flex;
    align-items: center;
    height: 60px;
    font-family: var(--wp--preset--font-family--citrusgothic);
    font-size: var(--wp--preset--font-size--petit-titre);
    color: var(--wp--preset--color--bleu-fonce);
    background: none;
    border: none;
    cursor: pointer;
}

.carrousel-nav:focus {
    outline: none;
}

.carrousel-nav.disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.carrousel-next {
    justify-content: flex-end;
}

.carrousel-prev_img {
    height: 100%;
    margin-right: var(--wp--preset--spacing--40);
    object-fit: contain;
    transition: transform 0.3s ease-in-out;
}

.carrousel-next_img {
    height: 100%;
    margin-left: var(--wp--preset--spacing--40);
    object-fit: contain;
    transition: transform 0.3s ease-in-out;
}

.carrousel-nav:hover .carrousel-prev_img {
    transform: translateX(-10px);
}

.carrousel-nav:hover .carrousel-next_img {
    transform: translateX(10px);
}

/* Style Sinoo */
.style-sinoo .carrousel-item {
    width: 280px;
    border-radius: 0;
    box-shadow: none;
    background-color: var(--wp--preset--color--blanc);
    margin-right: 10px;
}

.style-sinoo .carrousel-nav {
    background-color: var(--wp--preset--color--bleu-gris);
    color: var(--wp--preset--color--blanc);
}

/* Style pour le message vide */
.carrousel-empty {
    padding: 2rem;
    background-color: var(--wp--preset--color--blanc);
    border-radius: 8px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .carrousel-item {
        width: 250px;
    }
    
    .carrousel-image {
        height: 350px;
    }
    
    .carrousel-nav {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .carrousel-item {
        width: 230px;
    }
    
    .carrousel-image {
        height: 320px;
    }
}

/* Nouvelle popup complètement séparée */
.pi-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.pi-popup-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.pi-popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
}

.pi-popup-content {
    position: relative;
    background-color: var(--wp--preset--color--blanc);
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    max-width: 90%;
    cursor: default;
}

.pi-popup-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pi-popup-image {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    transition: opacity 0.2s ease;
}

.pi-popup-close {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 40px;
    height: 40px;
    background-color: #000;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--wp--preset--color--blanc);
    transition: all 0.2s ease;
}

.pi-popup-close:hover {
    background-color: #333;
    transform: scale(1.1);
}

.pi-popup-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--wp--preset--color--blanc);
}

/* Style pour rendre les images cliquables */
.carrousel-item {
    position: relative;
    z-index: 1;
}

.carrousel-item .carrousel-image {
    cursor: pointer;
    pointer-events: all !important;
    transition: transform 0.3s ease;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    touch-action: manipulation;
}

.carrousel-item:hover .carrousel-image {
    transform: scale(1.02);
}

/* Media queries pour la popup */
@media (max-width: 768px) {
    .pi-popup-image {
        max-height: 70vh;
    }
    
    .pi-popup-close {
        top: -15px;
        right: -15px;
        width: 35px;
        height: 35px;
    }
    
    .carrousel-image {
        height: 350px;
    }
}

@media (max-width: 576px) {
    .pi-popup-content {
        padding: 10px;
        max-width: 80%;
    }
    
    .pi-popup-close {
        top: -10px;
        right: -10px;
        width: 30px;
        height: 30px;
    }
    
    .carrousel-image {
        height: 320px;
    }
    
    /* S'assurer que les images sont cliquables sur mobile */
    .carrousel-item {
        position: relative;
        touch-action: manipulation;
    }
    
    .carrousel-item::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2;
        cursor: pointer;
    }
}

/* Styles pour les flèches de navigation dans la popup */
.pi-popup-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--wp--preset--color--bleu-gris);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--wp--preset--color--blanc);
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.pi-popup-nav:hover {
    background-color: var(--wp--preset--color--bleu-fonce);
    transform: translateY(-50%) scale(1.1);
}

.pi-popup-prev {
    left: -20px;
}

.pi-popup-next {
    right: -20px;
}

.pi-popup-nav svg {
    width: 24px;
    height: 24px;
    stroke: var(--wp--preset--color--blanc);
}

.pi-popup-close {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 40px;
    height: 40px;
    background-color: #000;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--wp--preset--color--blanc);
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Media queries pour les flèches sur mobile */
@media (max-width: 768px) {
    .pi-popup-nav {
        width: 35px;
        height: 35px;
    }
    
    .pi-popup-nav svg {
        width: 20px;
        height: 20px;
    }
    
    .pi-popup-prev {
        left: -15px;
    }
    
    .pi-popup-next {
        right: -15px;
    }
}

@media (max-width: 576px) {
    .pi-popup-nav {
        width: 30px;
        height: 30px;
    }
    
    .pi-popup-nav svg {
        width: 18px;
        height: 18px;
    }
    
    /* Déplacer les flèches vers le bas en mode mobile pour éviter qu'elles soient hors écran */
    .pi-popup-prev, .pi-popup-next {
        top: auto;
        bottom: -40px;
        transform: none;
    }
    
    .pi-popup-prev {
        left: calc(50% - 40px);
    }
    
    .pi-popup-next {
        right: calc(50% - 40px);
    }
    
    .pi-popup-content {
        padding-bottom: 10px; /* Ajouter de l'espace pour les flèches en bas */
    }
} 