/* ==========================================================================
   Zepros Media Carousel - Styles principaux
   ========================================================================== */

/* Container principal */
.zpmc-media-carousel {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Carrousel
   ========================================================================== */

.zpmc-carousel-wrapper {
    position: relative;
    width: 100%;
}

.zpmc-carousel-container {
    overflow: hidden;
    width: 102%;
}

.zpmc-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
}

/* Centrer les items sur desktop uniquement (pas de carrousel) */
@media (min-width: 1431px) {
    .zpmc-carousel-track {
        justify-content: center;
    }
}

/* Boutons de navigation */
.zpmc-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 28px;
    height: 56px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    padding: 0;
}

.zpmc-nav svg {
    width: 28px;
    height: 56px;
}

.zpmc-nav:hover svg path {
    stroke: #0B3CB7;
}

.zpmc-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.zpmc-nav:disabled:hover svg path {
    stroke: #0E4CE76E;
}

.zpmc-nav-prev {
    left: -50px;
}

.zpmc-nav-next {
    right: -50px;
}

.zpmc-carousel-wrapper.show-nav .zpmc-nav {
    display: flex;
}

/* ==========================================================================
   Item du carrousel
   ========================================================================== */

.zpmc-carousel-item {
    flex: 0 0 calc(20% - 16px);
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
    border-radius: 12px;
    overflow: visible;
    transition: transform 0.3s ease;
    position: relative;
}

.zpmc-carousel-item.zpmc-active .zpmc-item-top {
    background: #0B3CB7;
}

.zpmc-carousel-item.zpmc-active .zpmc-chevron {
    opacity: 1;
    bottom: -20px;
}

/* Top de l'item (logo) */
.zpmc-item-top {
    position: relative;
    width: 210px;
    padding: 20px;
    background: #fff;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.zpmc-logo-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.zpmc-item-top:hover,
.zpmc-carousel-item.zpmc-active .zpmc-item-top {
    background-color: #0B3CB7;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.zpmc-logo-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 10px;
}

.zpmc-logo {
    max-width: 100%;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.zpmc-logo-default {
    opacity: 1;
    transform: scale(1);
}

.zpmc-logo-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hover et état actif : afficher l'image hover et scaler */
.zpmc-carousel-item:hover .zpmc-logo-default,
.zpmc-carousel-item.zpmc-active .zpmc-logo-default {
    opacity: 0;
}

.zpmc-carousel-item:hover .zpmc-logo-hover,
.zpmc-carousel-item.zpmc-active .zpmc-logo-hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Si pas d'image hover, scaler l'image par défaut */
.zpmc-carousel-item:hover .zpmc-logo-default:only-child,
.zpmc-carousel-item.zpmc-active .zpmc-logo-default:only-child {
    opacity: 1;
    transform: scale(1.1);
}

.zpmc-logo-name {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

/* Chevron (en dessous du carré) */
.zpmc-chevron {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    color: #0b3cb7;
    opacity: 0;
    transition: opacity 0.3s ease, bottom 0.3s ease;
    z-index: 10;
}

.zpmc-item-top:hover .zpmc-chevron,
.zpmc-carousel-item.zpmc-active .zpmc-chevron {
    opacity: 1;
    bottom: -37px;
}

/* ==========================================================================
   Zone de détails commune (en dessous de tous les carrés)
   ========================================================================== */

.zpmc-details-container {
    width: 100%;
    max-height: 0;
    opacity: 0;
    margin-top: 20px;
    /* padding: 0 40px; */
    transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease;
}

.zpmc-details-container.zpmc-visible {
    max-height: 1150px;
    opacity: 1;
    padding: 40px 0;
    max-width: 1120px;
    margin: auto;
}

/* Layout de la zone de détails : couverture à gauche, contenu à droite */
.zpmc-details-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto auto;
    column-gap: 110px;
    align-items: start;
}

/* Couverture prend toute la hauteur de la première colonne */
.zpmc-details-wrapper .zpmc-cover-container {
    grid-column: 1;
    grid-row: 1 / 3;
    text-align: center;
    margin: 0;
}

.zpmc-details-wrapper .zpmc-cover-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Titre en haut de la deuxième colonne */
.zpmc-details-wrapper .zpmc-item-title {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    margin: 0 0 0 0;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 700;
    text-transform: uppercase;
}

/* Features en dessous du titre */
.zpmc-details-wrapper .zpmc-features {
    grid-column: 2;
    grid-row: 2;
    flex-wrap: wrap;
}

/* Animation selon le type de transition */
.zpmc-media-carousel[data-transition="fade"] .zpmc-details-container {
    transition: opacity 0.5s ease, padding 0.5s ease;
}

.zpmc-media-carousel[data-transition="expand"] .zpmc-details-container {
    transition: max-height 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.5s ease, padding 0.5s ease;
}

/* Bottom de l'item (OBSOLÈTE - supprimé car tout est dans la zone commune) */
.zpmc-item-bottom {
    display: none;
}

/* Couverture */
.zpmc-details-container .zpmc-cover-container {
    margin: 0;
    text-align: center;
    width: 330px;
}

.zpmc-details-container .zpmc-cover-container img {
    max-width: 100%;
    height: auto;
    margin-top: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Titre de l'item */
.zpmc-details-container .zpmc-item-title {
    font-size: 24px;
    max-width: 550px;
    line-height: 1.3;
    font-weight: 600;
    margin: 0 0 30px 0;
    text-transform: uppercase;
    text-align: left;
}

/* ==========================================================================
   Features (dans la zone de détails commune)
   ========================================================================== */

.zpmc-details-container .zpmc-features {
    display: flex;
    justify-content: space-between;
    max-width: 780px;
    align-items: flex-start;
    row-gap: 20px;
    column-gap: 0;
    gap: 0;
    row-gap: 20px;
}

.zpmc-details-container .zpmc-feature-item {
    display: flex;
    align-items: normal;
    text-align: center;
    gap: 8px;
    flex: 0 0 auto;
    width: calc(50% - 35px);
}

.zpmc-details-container .zpmc-feature-item:nth-child(2),
.zpmc-details-container .zpmc-feature-item:nth-child(4) {
    max-width: fit-content;
}
.zpmc-details-container .zpmc-feature-icon {
    width: 91px;
    height: 84px;
    object-fit: contain;
    flex-shrink: 0;
    margin-bottom: 8px;
}

.zpmc-details-container .zpmc-feature-icon-placeholder {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.zpmc-details-container .zpmc-feature-content {
    flex: 1;
    max-width: fit-content;
    text-align: left;
    padding-left: 5px;
}

.zpmc-details-container .zpmc-feature-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

/* Si le titre est un compteur, styles spécifiques */
/* .zpmc-details-container .zpmc-feature-title .zpmc-feature-counter {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
} */

.zpmc-details-container .zpmc-feature-title .zpmc-counter-prefix,
.zpmc-details-container .zpmc-feature-title .zpmc-counter-suffix {
    font-size: 28px;
    font-weight: 600;
}

.zpmc-details-container .zpmc-feature-title .zpmc-counter-number {
    font-size: 28px;
    font-weight: 700;
}

.zpmc-details-container .zpmc-feature-text {
    font-size: 13px;
    line-height: 1;
    width: 300px;
}

.zpmc-details-container .zpmc-feature-text p {
    margin: 0;
    font-size: 22px;
}

@media (max-width: 1370px) {
    .zpmc-details-container .zpmc-feature-text {
        width: 250px;
    }
}
@media (max-width: 1150px) {
    .zpmc-details-container .zpmc-feature-item {
        flex-direction: column;
        gap: 0;
    }
    .zpmc-details-container .zpmc-features {
        row-gap: 0;
    }
}
@media (max-width: 1024px) {
    .zpmc-details-wrapper {
        display: flex;
        flex-direction: column;
    }
}
@media (max-width: 985px) {
    .zpmc-item-title {
        order: -1;
        margin-bottom: 0;
    }
    .zpmc-details-container .zpmc-features {
        justify-content: start;
    }
    .zpmc-details-container.zpmc-visible {
        max-height: 1300px;
    }
}
@media (max-width: 980px) {
    .zpmc-cover-container {
        margin-top: -3em !important;
    }
}
@media (max-width: 768px) {
    .zpmc-details-wrapper .zpmc-features {
        flex-direction: row;
    }
    /* Features en 1 colonne sur mobile */
    .zpmc-details-wrapper .zpmc-features {
        flex-direction: row;
    }
    .zpmc-cover-container {
        margin-top: -3em !important;
        align-self: anchor-center;
    }
    .zpmc-details-container .zpmc-feature-item {
        flex-direction: row;
        align-items: inherit;
        text-align: inherit;
    }
    .zpmc-details-wrapper .zpmc-features {
        justify-content: center;
    }
}

/* Suppression de l'ancien .zpmc-feature-counter en dehors du titre */

/* ==========================================================================
   Responsive - Tablette
   ========================================================================== */

@media (max-width: 1024px) {
    .zpmc-carousel-item {
        flex: 0 0 calc(33.333% - 14px);
    }
    
    .zpmc-carousel-wrapper.show-nav .zpmc-nav {
        display: flex;
    }
    
    .zpmc-section-title {
        font-size: 28px;
    }
    
    /* Features en 3 colonnes sur tablette */
    .zpmc-details-wrapper .zpmc-features {
        gap: 20px;
    }
    .zpmc-nav-next {
        right: -60px;
    }
    .zpmc-nav-prev {
        left: -50px;
    }
}

/* ==========================================================================
   Responsive - Mobile
   ========================================================================== */

@media (max-width: 768px) {
    .zpmc-media-carousel {
        padding: 40px 15px;
    }
    
    .zpmc-carousel-item {
        flex: 0 0 100%;
    }
    
    /* Sur mobile, la zone de détails est toujours visible en dessous */
    .zpmc-details-container {
        max-height: none;
        opacity: 1;
        padding: 30px 20px;
        display: block;
        margin-top: 30px;
    }
    
    .zpmc-details-container.zpmc-visible {
        padding: 30px 20px;
    }
    
    /* Layout en colonne sur mobile */
    .zpmc-details-wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 20px;
    }
    
    .zpmc-details-wrapper .zpmc-cover-container {
        grid-column: 1;
        grid-row: 1;
        max-width: 264px;
        margin-right: auto;
    }
    
    .zpmc-details-wrapper .zpmc-item-title {
        grid-column: 1;
        grid-row: 2;
        /* text-align: center; */
    }
    
    .zpmc-details-wrapper .zpmc-features {
        grid-column: 1;
        grid-row: 3;
    }
    
    /* Le chevron n'est pas nécessaire sur mobile */
    .zpmc-chevron {
        display: none;
    }
    
    .zpmc-carousel-wrapper.show-nav .zpmc-nav {
        display: flex;
    }
    
    .zpmc-nav {
        width: 40px;
        height: 40px;
    }
    
    .zpmc-nav-prev {
        left: -50px;
    }
    
    .zpmc-nav-next {
        right: -60px;
    }
    

    
    /* Features gardent leur style en colonne sur mobile */
    .zpmc-details-container .zpmc-feature-item {
        /* flex-direction: column; */
        align-items: center;
        text-align: center;
        width: inherit;
    }
    
    .zpmc-details-container .zpmc-feature-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .zpmc-section-title {
        font-size: 20px;
    }
    
    .zpmc-link {
        font-size: 14px;
    }
    
    .zpmc-details-container .zpmc-item-title {
        font-size: 22px;
    }
    .zpmc-nav-next {
        right: -50px;
    }
}
