/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.portfolio-hero {
    background: linear-gradient(135deg, #1E5959 0%, #3B8C6E 100%);
    position: relative;
    overflow: hidden;
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.page-title {
    animation: fadeInDown 1s ease-out;
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    animation: fadeInUp 1s ease-out 0.2s backwards;
    font-size: 1.2rem;
}

/* Filtres */
.portfolio-filters {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border: 2px solid #3B8C6E;
    border-radius: 25px;
    background: transparent;
    color: #3B8C6E;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #89D99D 0%, #3B8C6E 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 140, 110, 0.3);
}

/* Portfolio Cards */
.portfolio-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.portfolio-card .card-body p {
    text-align: justify;
}

/* Portfolio Logo */
.portfolio-logo-container {
    height: 220px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.portfolio-logo {
    max-height: 90%;
    max-width: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.portfolio-logo-wide {
    transform: scale(1.4);
}

.portfolio-image-placeholder {
    height: 220px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #3B8C6E;
    gap: 0.5rem;
}

.portfolio-image-placeholder i {
    font-size: 3rem;
    opacity: 0.5;
}

.portfolio-image-placeholder span {
    font-size: 0.9rem;
    opacity: 0.6;
    font-weight: 500;
}

/* Tags */
.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.portfolio-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(137, 217, 157, 0.15);
    border: 1px solid rgba(137, 217, 157, 0.4);
    border-radius: 20px;
    color: #1E5959;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Bouton outline */
.btn-outline-portfolio {
    border: 2px solid #3B8C6E;
    color: #3B8C6E;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-portfolio:hover {
    background: linear-gradient(135deg, #89D99D 0%, #3B8C6E 100%);
    color: white;
    border-color: transparent;
}

/* Portfolio item visibility for filtering */
.portfolio-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.portfolio-item.hidden {
    display: none;
}

/* CTA Section */
.cta-box {
    background: linear-gradient(135deg, #89D99D 0%, #3B8C6E 100%);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta-box .btn {
    position: relative;
    z-index: 1;
}

/* Animate on scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
}

.animate-on-scroll.animated {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }

    .cta-box {
        padding: 2rem;
    }

    .portfolio-image-placeholder {
        height: 180px;
    }
}
