/* ===============================================
   CHIPO PORTFOLIO INFINI - LIQUID GLASS
   =============================================== */

/* WRAPPER */
.chipo-portfolio-wrapper {
    background-color: #f8f9fa;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

/* TITRE LIQUID GLASS */
.chipo-portfolio-title {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    margin: 0 0 50px 0;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 40px;
    
    /* Effet liquid glass sur le texte lui-même */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 25%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 75%,
        rgba(255, 255, 255, 0.3) 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: liquidFlow 8s ease-in-out infinite;
    
    /* Glass blur sur le fond */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    /* Ombre portée pour contraste */
    filter: drop-shadow(0 2px 4px rgba(26, 26, 46, 0.3));
}

@keyframes liquidFlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Fallback pour navigateurs sans support */
@supports not (background-clip: text) {
    .chipo-portfolio-title {
        background: none;
        -webkit-text-fill-color: #1a1a2e;
        color: #1a1a2e;
    }
}

/* SLIDER CONTAINER */
.chipo-slider-container {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    padding: 20px 0;
}

/* TRACK - géré entièrement par JS */
.chipo-slider-track {
    display: flex;
    gap: 25px;
    will-change: transform;
}

/* CARTE PROJET */
.chipo-project-card {
    flex-shrink: 0;
    width: 300px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    
    /* Liquid glass effect */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.3) 100%
    );
    background-size: 200% 200%;
    animation: liquidGlass 6s ease-in-out infinite;
    
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes liquidGlass {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.chipo-project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 15px 45px rgba(31, 38, 135, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-color: rgba(81, 164, 180, 0.5);
}

/* IMAGE */
.chipo-project-image {
    width: 100%;
    height: 170px;
    overflow: hidden;
    position: relative;
}

.chipo-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.chipo-project-card:hover .chipo-project-image img {
    transform: scale(1.1);
}

/* Overlay glass sur image */
.chipo-project-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 100%
    );
    pointer-events: none;
}

/* BOUTON LIQUID GLASS */
.chipo-project-btn {
    display: block;
    text-align: center;
    padding: 10px 20px;
    margin: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #51a4b4;
    
    /* Liquid glass background */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.4) 100%
    );
    background-size: 200% 200%;
    animation: liquidGlassBtn 5s ease-in-out infinite;
    
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 4px 15px rgba(81, 164, 180, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

@keyframes liquidGlassBtn {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.chipo-project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(81, 164, 180, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-color: rgba(81, 164, 180, 0.6);
    color: #3d8896;
}

/* CONTRÔLES */
.chipo-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* FLÈCHES LIQUID GLASS */
.chipo-arrow {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    
    /* Liquid glass */
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.35) 100%
    );
    background-size: 200% 200%;
    animation: liquidGlassArrow 7s ease-in-out infinite;
    
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 4px 15px rgba(81, 164, 180, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    
    color: #51a4b4;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes liquidGlassArrow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.chipo-arrow:hover {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(81, 164, 180, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border-color: rgba(81, 164, 180, 0.5);
    color: #3d8896;
}

.chipo-arrow:active {
    transform: scale(0.95);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .chipo-portfolio-wrapper {
        padding: 40px 15px;
    }
    
    .chipo-portfolio-title {
        font-size: 36px;
        margin-bottom: 35px;
        padding: 0 20px;
    }
    
    .chipo-project-card {
        width: 250px;
    }
    
    .chipo-project-image {
        height: 140px;
    }
    
    .chipo-arrow {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .chipo-portfolio-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .chipo-project-card {
        width: 220px;
    }
    
    .chipo-project-image {
        height: 125px;
    }
    
    .chipo-slider-track {
        gap: 20px;
    }
    
    .chipo-controls {
        gap: 15px;
        margin-top: 30px;
    }
    
    .chipo-arrow {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* PERFORMANCE */
.chipo-slider-track,
.chipo-project-card,
.chipo-project-image img,
.chipo-arrow {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
}

/* ACCESSIBILITÉ */
@media (prefers-reduced-motion: reduce) {
    .chipo-slider-track {
        animation: none !important;
    }
    
    .chipo-portfolio-title,
    .chipo-project-card,
    .chipo-project-btn,
    .chipo-arrow {
        animation: none !important;
        transition: none !important;
    }
}

.chipo-arrow:focus-visible {
    outline: 3px solid #51a4b4;
    outline-offset: 3px;
}
