/* Portfolio Header */
.portfolio-header-section {
    padding: 120px 0 40px 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.02) 0%, transparent 50%);
}

.portfolio-header-content {
    max-width: 600px;
    margin: 0 auto;
}

.portfolio-section {
    padding: 40px 0 100px 0;
}

/* Liquid Glass Menu */
.liquid-menu {
    position: fixed;
    top: 120px;
    left: 30px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(220, 38, 38, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.menu-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 18px;
}

.menu-icon span {
    height: 2px;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-icon span:nth-child(1) { width: 100%; }
.menu-icon span:nth-child(2) { width: 75%; }
.menu-icon span:nth-child(3) { width: 50%; }

.liquid-menu.active .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    width: 75%;
}

.liquid-menu.active .menu-icon span:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

.liquid-menu.active .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    width: 75%;
}

.menu-text {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.menu-content {
    position: absolute;
    top: 70px;
    left: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(220, 38, 38, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.liquid-menu.active .menu-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.menu-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-title {
    color: #dc2626;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.menu-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.1), transparent);
    transition: left 0.6s ease;
}

.menu-item:hover::before {
    left: 100%;
}

.menu-item:hover,
.menu-item.active {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2);
}

.menu-item.active {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(239, 68, 68, 0.1));
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.menu-item-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.menu-item:hover .menu-item-icon,
.menu-item.active .menu-item-icon {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    border-color: rgba(220, 38, 38, 0.3);
    color: white;
    transform: scale(1.1);
}

.menu-item-icon i {
    font-size: 0.9rem;
}

.menu-item-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-item-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.menu-item-count {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.menu-item.active .menu-item-count {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
}

.menu-search {
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    z-index: 1;
}

.search-input-wrapper input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 12px 10px 35px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.search-input-wrapper input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(220, 38, 38, 0.4);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.search-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Portfolio Items */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    height: 300px;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 0, 0, 0.1) 0%, 
        rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.portfolio-item:hover::before {
    opacity: 1;
}

.portfolio-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px var(--shadow-red);
    border-color: var(--text-red);
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-category {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.portfolio-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.2;
}

.portfolio-description {
    color: var(--text-light-50);
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

.tech-badge {
    background: rgba(255, 0, 0, 0.2);
    color: var(--text-red);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 500;
}

.portfolio-actions {
    display: flex;
    gap: 6px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-1px);
}

/* Loading State */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(220, 38, 38, 0.3);
    border-top: 3px solid var(--text-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Filter Animations */
.portfolio-item.filtered-out {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: all 0.4s ease;
}

.portfolio-item.filtered-in {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    transition: all 0.4s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .liquid-menu {
        top: 100px;
        left: 20px;
    }
    
    .menu-content {
        min-width: 260px;
        padding: 20px;
    }
    
    .portfolio-header-section {
        padding: 100px 0 30px 0;
    }
    
    .portfolio-section {
        padding: 30px 0 80px 0;
    }
}

/* Import de la police */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

/* Animation glitch avec police moderne */
.portfolio-header-content h1 {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #dc2626, #ffffff, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: digitalPulse 2s ease-in-out infinite;
}

.portfolio-header-content h1::before,
.portfolio-header-content h1::after {
    content: 'Portfolio';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: glitchSkew 0.8s ease-in-out infinite;
    z-index: -1;
}

.portfolio-header-content h1::before {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.7), transparent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation-delay: 0.1s;
    transform: translateX(2px);
}

.portfolio-header-content h1::after {
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation-delay: 0.2s;
    transform: translateX(-2px);
}

@keyframes digitalPulse {
    0%, 100% {
        filter: brightness(1);
        text-shadow: 0 0 10px rgba(220, 38, 38, 0.2);
    }
    50% {
        filter: brightness(1.2);
        text-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
    }
}

@keyframes glitchSkew {
    0%, 100% {
        transform: translateX(0) skew(0deg);
        opacity: 0.7;
    }
    20% {
        transform: translateX(1px) skew(1deg);
        opacity: 0.8;
    }
    80% {
        transform: translateX(-1px) skew(-1deg);
        opacity: 0.6;
    }
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .portfolio-header-content h1 {
        letter-spacing: 2px;
        font-size: 2.5rem;
    }
    
    .portfolio-header-content h1::before,
    .portfolio-header-content h1::after {
        letter-spacing: 2px;
    }
}

/* Modal Styles */
.portfolio-modal-content {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    color: white;
    max-height: 90vh;
    overflow-y: auto;
}