:root {
    --ic-gradient-start: #667eea;
    --ic-gradient-end: #764ba2;
    --ic-title-color: #000000;
    --ic-glass-opacity: 0.15;
    --ic-blur-amount: 10px;
}

.ic-portfolio-container {
    padding: 20px;
}

.ic-portfolio-title {
    text-align: center;
    color: var(--ic-title-color);
    font-size: 3em;
    margin-bottom: 50px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
}

.portfolio-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.portfolio-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.portfolio-item {
    background: rgba(255, 255, 255, var(--ic-glass-opacity));
    backdrop-filter: blur(var(--ic-blur-amount));
    -webkit-backdrop-filter: blur(var(--ic-blur-amount));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

.overlay-btn {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    cursor: pointer;
}

.overlay-btn:hover {
    transform: scale(1.15);
    background: #764ba2;
    color: white;
}

/* Style pour les icônes SVG */
.overlay-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: fill 0.3s ease;
}

.portfolio-title {
    padding: 20px;
    text-align: center;
}

.portfolio-title h3 {
    color: var(--ic-title-color);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 10px;
}

.portfolio-short-desc {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Lightbox - Uniquement pour la description */
.ic-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.ic-lightbox.active {
    display: flex;
}

.ic-lightbox-content {
    background: #1e1e1e;
    border-radius: 10px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 50px rgba(255,255,255,0.3);
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ic-lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.ic-lightbox-close:hover {
    transform: rotate(90deg);
    background: rgba(255,255,255,0.2);
}

.ic-lightbox-close svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.ic-lightbox-title {
    color: white;
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.ic-lightbox-description {
    color: #cccccc;
    font-size: 1.1em;
    line-height: 1.8;
    text-align: justify;
}

.ic-lightbox-description h1, 
.ic-lightbox-description h2, 
.ic-lightbox-description h3,
.ic-lightbox-description h4,
.ic-lightbox-description h5,
.ic-lightbox-description h6 {
    color: white;
    margin: 20px 0 15px 0;
}

.ic-lightbox-description p {
    margin-bottom: 15px;
}

.ic-lightbox-description ul,
.ic-lightbox-description ol {
    margin: 15px 0;
    padding-left: 30px;
}

.ic-lightbox-description blockquote {
    border-left: 4px solid #667eea;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #aaa;
}

/* Scrollbar personnalisée pour la lightbox */
.ic-lightbox-content::-webkit-scrollbar {
    width: 8px;
}

.ic-lightbox-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.ic-lightbox-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

.ic-lightbox-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .ic-portfolio-title {
        font-size: 2em;
        margin-bottom: 30px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-image {
        height: 200px;
    }
    
    .overlay-btn {
        width: 45px;
        height: 45px;
    }
    
    .overlay-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .ic-lightbox-content {
        padding: 30px 20px;
        padding-top: 50px;
    }
    
    .ic-lightbox-title {
        font-size: 1.5em;
    }
    
    .ic-lightbox-description {
        font-size: 1em;
    }
    
    .ic-lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
    
    .ic-lightbox-close svg {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 480px) {
    .ic-portfolio-title {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .portfolio-title h3 {
        font-size: 1.1em;
    }
    
    .portfolio-short-desc {
        font-size: 0.85em;
    }
}