/* ========================================
   PROJECT ACTIONS CONTAINER
   ======================================== */

.project-actions {
    margin: var(--gap-lg) 0 2rem 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--gap-sm);
}

/* Ajustements pour btn-action dans le contexte des projets */
.project-actions .btn-action {
    flex: 1;
    max-width: calc(50% - 0.375rem);
}

/* btn-action-icon dans les projets reste à sa taille fixe */
.project-actions .btn-action-icon {
    flex: none;
}

/* ========================================
   POPUP ACTIONS FUNCTIONALITY
   ======================================== */

.actions-popup {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: popupFadeIn 0.3s ease-out;
}

/* S'assurer que le popup soit caché par défaut */
.actions-popup[style*="display: none"] {
    display: none !important;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
}

.popup-content {
    position: relative;
    background: rgba(20, 24, 32, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    min-width: 320px;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    animation: popupSlideIn 0.3s ease-out 0.1s forwards;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-header h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.popup-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.popup-close svg {
    width: 20px;
    height: 20px;
}

.popup-actions {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.popup-action-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
    position: relative;
    overflow: hidden;
}

.popup-action-item:last-child {
    margin-bottom: 0;
}

.popup-action-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.popup-action-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.popup-action-item:hover::before {
    left: 100%;
}

/* YouTube action items (clickable divs) should have pointer cursor */
.popup-action-item.youtube-action {
    cursor: pointer;
}

.popup-action-item.youtube-action:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Animation pour l'indicateur de chargement YouTube */
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.youtube-loading-indicator {
    animation: fadeIn 0.3s ease, pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Animations pour les notifications */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Styles pour les notifications */
.notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
}

.action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.action-icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.action-content {
    flex: 1;
}

.action-label {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.action-type {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Couleurs spÃ©cialisÃ©es pour les icÃ´nes dans le popup */
.popup-action-item[href*="steam"] .action-icon {
    background: rgba(102, 192, 244, 0.2);
    color: #66c0f4;
}

.popup-action-item[href*="youtube"] .action-icon {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
}

.popup-action-item[href*="github"] .action-icon {
    background: rgba(240, 246, 252, 0.2);
    color: #f0f6fc;
}

.popup-action-item[href*="itch.io"] .action-icon {
    background: rgba(250, 92, 92, 0.2);
    color: #fa5c5c;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Responsive pour le popup */
@media (max-width: 480px) {
    .popup-content {
        min-width: 90vw;
        max-width: 90vw;
        margin: 0 5vw;
    }
    
    .popup-header {
        padding: 1rem;
    }
    
    .popup-actions {
        padding: 0.75rem 1rem 1rem 1rem;
    }
    
    .popup-action-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .action-icon {
        width: 35px;
        height: 35px;
    }
    
    .action-icon svg {
        width: 18px;
        height: 18px;
    }
}

.description-content {
    /* Using glass-effect class properties */
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass);
    position: relative;
    overflow: hidden;
    /* Custom properties */
    padding: var(--padding-glass);
    border-radius: var(--border-radius-md);
}

.description-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--glass-bg-light);
    border-radius: var(--border-radius-md);
    z-index: -1;
}

.description-title {
    color: var(--primary-blue);
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
