/* ============================================
   Cookie Banner - CNIL Compliant
   ============================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 2px solid var(--accent-primary);
    padding: 1.5rem;
    z-index: 9999;
    box-shadow: var(--shadow-xl);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cookie-banner-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-banner-title {
    font-size: 1.25rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.cookie-banner-text {
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

.cookie-banner-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    flex-shrink: 0;
}

.cookie-banner-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.cookie-banner-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-banner-btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    min-width: 120px;
}

.cookie-banner-btn-accept {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--text-primary);
}

.cookie-banner-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cookie-banner-btn-refuse {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.cookie-banner-btn-refuse:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.cookie-banner-btn-customize {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.cookie-banner-btn-customize:hover {
    background: var(--accent-primary);
    color: var(--text-primary);
}

.cookie-banner-link {
    color: var(--accent-primary);
    text-decoration: underline;
    margin-left: 0.5rem;
}

/* Cookie Preferences Modal */
.cookie-preferences {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.cookie-preferences.hidden {
    opacity: 0;
    pointer-events: none;
}

.cookie-preferences-modal {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s ease;
}

.cookie-preferences-header {
    margin-bottom: 2rem;
}

.cookie-preferences-title {
    font-size: 1.75rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.cookie-preferences-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

.cookie-category {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.cookie-category-title {
    font-size: 1.1rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.cookie-category-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--bg-hover);
    border-radius: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.cookie-category-toggle.active {
    background: var(--accent-primary);
}

.cookie-category-toggle::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: var(--transition);
}

.cookie-category-toggle.active::after {
    left: 27px;
}

.cookie-category-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.cookie-category-list {
    margin-top: 1rem;
    padding-left: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.cookie-category-list li {
    margin-bottom: 0.5rem;
}

.cookie-preferences-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.cookie-preferences-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    min-width: 150px;
}

.cookie-preferences-btn-save {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--text-primary);
}

.cookie-preferences-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cookie-preferences-btn-cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.cookie-preferences-btn-cancel:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

@media (max-width: 768px) {
    .cookie-banner-content {
        gap: 1rem;
    }
    
    .cookie-banner-header {
        flex-direction: column;
    }
    
    .cookie-banner-actions {
        flex-direction: column;
    }
    
    .cookie-banner-btn {
        width: 100%;
    }
    
    .cookie-preferences-modal {
        padding: 1.5rem;
    }
}

