/* Section Portfolio */
.portfolio-section {
    padding: 100px 0;
    background: var(--light-color);
}

/* Section Portfolio avec fond fixe et vagues (PC uniquement) */
@media (min-width: 992px) {
    .portfolio-bg-wrapper {
        position: relative;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        padding: 80px calc(50vw - 50%);
        overflow: hidden;
    }

    .portfolio-bg-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('../img/2.png');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        background-repeat: no-repeat;
        opacity: 0.95;
        z-index: 0;
    }

    .portfolio-bg-wrapper::after {
        content: '';
        position: absolute;
        top: -2px;
        left: 0;
        width: 100%;
        height: 80px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23f8f9fa'/%3E%3C/svg%3E") no-repeat;
        background-size: cover;
        z-index: 2;
        pointer-events: none;
    }

    .portfolio-bg-wrapper>.container {
        position: relative;
        z-index: 1;
    }

    .portfolio-bg-wrapper>.container>.row:last-child::after {
        content: '';
        position: absolute;
        bottom: -80px;
        left: calc(-50vw + 50%);
        width: 100vw;
        height: 80px;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23f8f9fa'/%3E%3C/svg%3E") no-repeat;
        background-size: cover;
        transform: rotate(180deg);
        z-index: 2;
        pointer-events: none;
    }

    .portfolio-bg-wrapper h2 {
        color: white !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }

    .portfolio-bg-wrapper .lead {
        color: white !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }

    /* Vagues noires en mode sombre */
    body.dark-mode .portfolio-bg-wrapper::after {
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%231a1a2e'/%3E%3C/svg%3E") no-repeat;
        background-size: cover;
    }

    body.dark-mode .portfolio-bg-wrapper>.container>.row:last-child::after {
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%231a1a2e'/%3E%3C/svg%3E") no-repeat;
        background-size: cover;
    }
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.portfolio-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 60px rgba(108, 92, 231, 0.3);
}

.portfolio-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(108, 92, 231, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h4 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.portfolio-overlay p {
    margin-bottom: 1rem;
}

.portfolio-overlay .btn {
    background: white;
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
}

/* Bouton Voir Plus pour tous les projets */
.portfolio-section .btn-see-more {
    display: inline-flex;
    align-items: center;
    background: var(--gradient-1);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.3);
    position: relative;
    overflow: hidden;
}

.portfolio-section .btn-see-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.portfolio-section .btn-see-more:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(108, 92, 231, 0.5);
    color: white;
}

.portfolio-section .btn-see-more:hover::before {
    left: 100%;
}

.portfolio-section .btn-see-more i {
    transition: transform 0.3s ease;
}

.portfolio-section .btn-see-more:hover i {
    transform: translateX(5px);
}